- Timestamp:
- Oct 18, 2016 10:27:02 AM (8 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/check_parameters.f90
r2025 r2026 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Bugfix, enable output of s*2 23 23 ! 24 24 ! Former revisions: … … 2799 2799 ENDIF 2800 2800 2801 CASE ( 's*2' ) 2802 IF ( .NOT. passive_scalar ) THEN 2803 message_string = 'data_output_pr = ' // & 2804 TRIM( data_output_pr(i) ) // ' is not imp' // & 2805 'lemented for passive_scalar = .FALSE.' 2806 CALL message( 'check_parameters', 'PA0185', 1, 2, 0, 6, 0 ) 2807 ELSE 2808 dopr_index(i) = 118 2809 dopr_unit(i) = 'kg2/kg2' 2810 hom(:,2,118,:) = SPREAD( zu, 2, statistic_regions+1 ) 2811 ENDIF 2812 2801 2813 2802 2814 -
palm/trunk/SOURCE/data_output_profiles.f90
r2001 r2026 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Formatting adjustment 23 23 ! 24 24 ! Former revisions: … … 164 164 !-- runs, has a negative value 165 165 DO i = 1, dopr_n 166 IF ( dopr_initial_index(i) /= 0 ) THEN167 nc_stat = NF90_PUT_VAR( id_set_pr, id_var_time_pr,&168 (/ -coupling_start_time /), &166 IF ( dopr_initial_index(i) /= 0 ) THEN 167 nc_stat = NF90_PUT_VAR( id_set_pr, id_var_time_pr, & 168 (/ -coupling_start_time /), & 169 169 start = (/ 1 /), count = (/ 1 /) ) 170 170 CALL netcdf_handle_error( 'data_output_profiles', 329 ) -
palm/trunk/SOURCE/flow_statistics.f90
r2001 r2026 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Bugfix, enable output of s*2. 23 ! Change, calculation of domain-averaged perturbation energy. 24 ! Some formatting adjustments. 23 25 ! 24 26 ! Former revisions: … … 358 360 ( sums_us2_ws_l(:,i) + sums_vs2_ws_l(:,i) + & 359 361 sums_ws2_ws_l(:,i) ) ! e* 360 DO k = nzb, nzt361 sums_l(nzb+5,pr_palm,i) = sums_l(nzb+5,pr_palm,i) + 0.5_wp * ( &362 sums_us2_ws_l(k,i) + &363 sums_vs2_ws_l(k,i) + &364 sums_ws2_ws_l(k,i) )365 ENDDO366 362 ENDDO 367 363 … … 657 653 DO i = nxl, nxr 658 654 DO j = nys, nyn 659 sums_l_eper = 0.0_wp660 655 DO k = nzb_s_inner(j,i), nzt+1 661 656 u2 = u(k,j,i)**2 … … 669 664 sums_l(k,32,tn) = sums_l(k,32,tn) + w2 * rmask(j,i,sr) 670 665 ! 671 !-- Perturbation energy666 !-- Perturbation energy 672 667 673 668 sums_l(k,34,tn) = sums_l(k,34,tn) + 0.5_wp * & 674 669 ( ust2 + vst2 + w2 ) * rmask(j,i,sr) 675 sums_l_eper = sums_l_eper + & 676 0.5_wp * ( ust2+vst2+w2 ) * rmask(j,i,sr) 677 678 ENDDO 670 ENDDO 671 ENDDO 672 ENDDO 673 ENDIF 674 ! 675 !-- Computaion of domain-averaged perturbation energy. Please note, 676 !-- to prevent that perturbation energy is larger (even if only slightly) 677 !-- than the total kinetic energy, calculation is based on deviations from 678 !-- the horizontal mean, instead of spatial descretization of the advection 679 !-- term. 680 !$OMP DO 681 DO i = nxl, nxr 682 DO j = nys, nyn 683 DO k = nzb_s_inner(j,i), nzt+1 684 w2 = w(k,j,i)**2 685 ust2 = ( u(k,j,i) - hom(k,1,1,sr) )**2 686 vst2 = ( v(k,j,i) - hom(k,1,2,sr) )**2 687 w2 = w(k,j,i)**2 688 679 689 sums_l(nzb+5,pr_palm,tn) = sums_l(nzb+5,pr_palm,tn) & 680 + sums_l_eper681 ENDDO 682 ENDDO 683 END IF690 + 0.5_wp * ( ust2 + vst2 + w2 ) * rmask(j,i,sr) 691 ENDDO 692 ENDDO 693 ENDDO 684 694 685 695 ! … … 758 768 sums_l(k,119,tn) = sums_l(k,119,tn) & 759 769 - 0.5_wp * ( kh(k,j,i) + kh(k+1,j,i) )& 760 * ( s(k+1,j,i) - s(k,j,i) )&761 * ddzu(k+1) * rmask(j,i,sr)770 * ( s(k+1,j,i) - s(k,j,i) ) & 771 * ddzu(k+1) * rmask(j,i,sr) 762 772 ENDIF 763 773 … … 803 813 IF ( passive_scalar ) THEN 804 814 sums_l(nzb,119,tn) = sums_l(nzb,119,tn) + & 805 ssws(j,i) * rmask(j,i,sr) ! w"s"815 ssws(j,i) * rmask(j,i,sr) ! w"s" 806 816 ENDIF 807 817 ENDIF … … 880 890 IF ( passive_scalar ) THEN 881 891 sums_l(nzt,119,tn) = sums_l(nzt,119,tn) + & 882 sswst(j,i) * rmask(j,i,sr) ! w"s"892 sswst(j,i) * rmask(j,i,sr) ! w"s" 883 893 ENDIF 884 894 ENDIF … … 1032 1042 pts = 0.5_wp * ( s(k,j,i) - hom(k,1,117,sr) + & 1033 1043 s(k+1,j,i) - hom(k+1,1,117,sr) ) 1034 sums_l(k,116,tn) = sums_l(k,116,tn) + pts * w(k,j,i) * 1035 rmask(j,i,sr)1044 sums_l(k,116,tn) = sums_l(k,116,tn) + pts * w(k,j,i) * & 1045 rmask(j,i,sr) 1036 1046 ENDIF 1037 1047 ENDDO … … 1470 1480 hom(:,1,116,sr) = sums(:,116) ! w*s* 1471 1481 hom(:,1,120,sr) = sums(:,119) + sums(:,116) ! ws 1482 hom(:,1,118,sr) = sums(:,118) ! s*2 1472 1483 ENDIF 1473 1484
Note: See TracChangeset
for help on using the changeset viewer.