Changeset 2026 for palm/trunk/SOURCE/flow_statistics.f90
 Timestamp:
 Oct 18, 2016 10:27:02 AM (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

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 domainaveraged 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 domainaveraged 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.