Changeset 743
- Timestamp:
- Aug 18, 2011 4:10:16 PM (13 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/advec_ws.f90
r737 r743 4 4 ! Current revisions: 5 5 ! ------------------ 6 ! Evaluation of turbulent fluxes with WS-scheme only for the whole model 7 ! domain. Therefor dimension of arrays needed for statistical evaluation 8 ! decreased. 6 9 ! 7 10 ! Former revisions: … … 130 133 IF ( ws_scheme_mom ) THEN 131 134 132 ALLOCATE( sums_wsus_ws_l(nzb:nzt+1,0:statistic_regions), & 133 sums_wsvs_ws_l(nzb:nzt+1,0:statistic_regions), & 134 sums_us2_ws_l(nzb:nzt+1,0:statistic_regions), & 135 sums_vs2_ws_l(nzb:nzt+1,0:statistic_regions), & 136 sums_ws2_ws_l(nzb:nzt+1,0:statistic_regions)) 135 ALLOCATE( sums_wsus_ws_l(nzb:nzt+1), sums_wsvs_ws_l(nzb:nzt+1), & 136 sums_us2_ws_l(nzb:nzt+1), sums_vs2_ws_l(nzb:nzt+1), & 137 sums_ws2_ws_l(nzb:nzt+1) ) 137 138 138 139 sums_wsus_ws_l = 0.0 … … 146 147 IF ( ws_scheme_sca ) THEN 147 148 148 ALLOCATE( sums_wspts_ws_l(nzb:nzt+1 ,0:statistic_regions) )149 ALLOCATE( sums_wspts_ws_l(nzb:nzt+1) ) 149 150 sums_wspts_ws_l = 0.0 150 151 151 152 IF ( humidity .OR. passive_scalar ) THEN 152 ALLOCATE( sums_wsqs_ws_l(nzb:nzt+1 ,0:statistic_regions) )153 ALLOCATE( sums_wsqs_ws_l(nzb:nzt+1) ) 153 154 sums_wsqs_ws_l = 0.0 154 155 ENDIF 155 156 156 157 IF ( ocean ) THEN 157 ALLOCATE( sums_wssas_ws_l(nzb:nzt+1 ,0:statistic_regions) )158 ALLOCATE( sums_wssas_ws_l(nzb:nzt+1) ) 158 159 sums_wssas_ws_l = 0.0 159 160 ENDIF … … 640 641 641 642 DO k = nzb_s_inner(j,i), nzt 642 sums_wspts_ws_l(k ,:) = sums_wspts_ws_l(k,:) +&643 sums_wspts_ws_l(k) = sums_wspts_ws_l(k) + & 643 644 ( flux_t(k) + diss_t(k) ) & 644 * weight_substep(intermediate_timestep_count) & 645 * rmask(j,i,:) 645 * weight_substep(intermediate_timestep_count) 646 646 ENDDO 647 647 … … 649 649 650 650 DO k = nzb_s_inner(j,i), nzt 651 sums_wssas_ws_l(k ,:) = sums_wssas_ws_l(k,:) +&651 sums_wssas_ws_l(k) = sums_wssas_ws_l(k) + & 652 652 ( flux_t(k) + diss_t(k) ) & 653 * weight_substep(intermediate_timestep_count) & 654 * rmask(j,i,:) 653 * weight_substep(intermediate_timestep_count) 655 654 ENDDO 656 655 … … 658 657 659 658 DO k = nzb_s_inner(j,i), nzt 660 sums_wsqs_ws_l(k ,:) = sums_wsqs_ws_l(k,:) +&659 sums_wsqs_ws_l(k) = sums_wsqs_ws_l(k) + & 661 660 ( flux_t(k) + diss_t(k) ) & 662 * weight_substep(intermediate_timestep_count) & 663 * rmask(j,i,:) 661 * weight_substep(intermediate_timestep_count) 664 662 ENDDO 665 663 … … 905 903 !-- Statistical Evaluation of u'u'. The factor has to be applied for 906 904 !-- right evaluation when gallilei_trans = .T. . 907 sums_us2_ws_l(k ,:) = sums_us2_ws_l(k,:)&905 sums_us2_ws_l(k) = sums_us2_ws_l(k) & 908 906 + ( flux_r(k) * & 909 ( u_comp(k) - 2.0 * hom(k,1,1, :) ) &907 ( u_comp(k) - 2.0 * hom(k,1,1,0) ) & 910 908 / ( u_comp(k) - gu + 1.0E-20 ) & 911 909 + diss_r(k) * & 912 ABS( u_comp(k) - 2.0 * hom(k,1,1, :) ) &910 ABS( u_comp(k) - 2.0 * hom(k,1,1,0) ) & 913 911 / ( ABS( u_comp(k) - gu ) + 1.0E-20 ) ) & 914 * weight_substep(intermediate_timestep_count) * rmask(j,i,:)912 * weight_substep(intermediate_timestep_count) 915 913 ENDDO 916 sums_us2_ws_l(nzb_u_inner(j,i) ,:) = sums_us2_ws_l(nzb_u_inner(j,i)+1,:)914 sums_us2_ws_l(nzb_u_inner(j,i)) = sums_us2_ws_l(nzb_u_inner(j,i)+1) 917 915 918 916 … … 1000 998 !-- sum up the vertical momentum fluxes 1001 999 DO k = nzb_u_inner(j,i), nzt 1002 sums_wsus_ws_l(k ,:) = sums_wsus_ws_l(k,:)&1000 sums_wsus_ws_l(k) = sums_wsus_ws_l(k) & 1003 1001 + ( flux_t(k) + diss_t(k) ) & 1004 * weight_substep(intermediate_timestep_count) * rmask(j,i,:)1002 * weight_substep(intermediate_timestep_count) 1005 1003 ENDDO 1006 1004 … … 1243 1241 !-- right evaluation when gallilei_trans = .T. . 1244 1242 1245 sums_vs2_ws_l(k ,:) = sums_vs2_ws_l(k,:)&1243 sums_vs2_ws_l(k) = sums_vs2_ws_l(k) & 1246 1244 + ( flux_n(k) & 1247 * ( v_comp(k) - 2.0 * hom(k,1,2, :) ) &1245 * ( v_comp(k) - 2.0 * hom(k,1,2,0) ) & 1248 1246 / ( v_comp(k) - gv + 1.0E-20 ) & 1249 1247 + diss_n(k) & 1250 * ABS( v_comp(k) - 2.0 * hom(k,1,2, :) ) &1248 * ABS( v_comp(k) - 2.0 * hom(k,1,2,0) ) & 1251 1249 / ( ABS( v_comp(k) - gv ) +1.0E-20 ) ) & 1252 * weight_substep(intermediate_timestep_count) * rmask(j,i,:)1250 * weight_substep(intermediate_timestep_count) 1253 1251 1254 1252 ENDDO 1255 sums_vs2_ws_l(nzb_v_inner(j,i) ,:) = sums_vs2_ws_l(nzb_v_inner(j,i)+1,:)1253 sums_vs2_ws_l(nzb_v_inner(j,i)) = sums_vs2_ws_l(nzb_v_inner(j,i)+1) 1256 1254 1257 1255 ! … … 1335 1333 1336 1334 DO k = nzb_v_inner(j,i), nzt 1337 sums_wsvs_ws_l(k ,:) = sums_wsvs_ws_l(k,:)&1335 sums_wsvs_ws_l(k) = sums_wsvs_ws_l(k) & 1338 1336 + ( flux_t(k) + diss_t(k) ) & 1339 * weight_substep(intermediate_timestep_count) * rmask(j,i,:)1337 * weight_substep(intermediate_timestep_count) 1340 1338 ENDDO 1341 1339 … … 1667 1665 1668 1666 DO k = nzb_w_inner(j,i), nzt 1669 sums_ws2_ws_l(k ,:) = sums_ws2_ws_l(k,:)&1667 sums_ws2_ws_l(k) = sums_ws2_ws_l(k) & 1670 1668 + ( flux_t(k) + diss_t(k) ) & 1671 * weight_substep(intermediate_timestep_count) * rmask(j,i,:)1669 * weight_substep(intermediate_timestep_count) 1672 1670 ENDDO 1673 1671 … … 2039 2037 CASE ( 'pt' ) 2040 2038 DO k = nzb_s_inner(j,i), nzt 2041 sums_wspts_ws_l(k ,:) = sums_wspts_ws_l(k,:)&2039 sums_wspts_ws_l(k) = sums_wspts_ws_l(k) & 2042 2040 + ( flux_t(k) + diss_t(k) ) & 2043 * weight_substep(intermediate_timestep_count) & 2044 * rmask(j,i,:) 2041 * weight_substep(intermediate_timestep_count) 2045 2042 ENDDO 2046 2043 CASE ( 'sa' ) 2047 2044 DO k = nzb_s_inner(j,i), nzt 2048 sums_wssas_ws_l(k ,:) = sums_wssas_ws_l(k,:)&2045 sums_wssas_ws_l(k) = sums_wssas_ws_l(k) & 2049 2046 + ( flux_t(k) + diss_t(k) ) & 2050 * weight_substep(intermediate_timestep_count) & 2051 * rmask(j,i,:) 2047 * weight_substep(intermediate_timestep_count) 2052 2048 ENDDO 2053 2049 CASE ( 'q' ) 2054 2050 DO k = nzb_s_inner(j,i), nzt 2055 sums_wsqs_ws_l(k ,:) = sums_wsqs_ws_l(k,:)&2051 sums_wsqs_ws_l(k) = sums_wsqs_ws_l(k) & 2056 2052 + ( flux_t(k) + diss_t(k) ) & 2057 * weight_substep(intermediate_timestep_count) & 2058 * rmask(j,i,:) 2053 * weight_substep(intermediate_timestep_count) 2059 2054 ENDDO 2060 2055 … … 2335 2330 swap_diss_y_local_u(k) = diss_n(k) 2336 2331 2337 sums_us2_ws_l(k ,:) = sums_us2_ws_l(k,:)&2332 sums_us2_ws_l(k) = sums_us2_ws_l(k) & 2338 2333 + ( flux_r(k) & 2339 * ( u_comp(k) - 2.0 * hom(k,1,1, :) ) &2334 * ( u_comp(k) - 2.0 * hom(k,1,1,0) ) & 2340 2335 / ( u_comp(k) - gu + 1.0E-20 ) & 2341 2336 + diss_r(k) & 2342 * ABS( u_comp(k) - 2.0 * hom(k,1,1, :) ) &2337 * ABS( u_comp(k) - 2.0 * hom(k,1,1,0) ) & 2343 2338 / ( ABS( u_comp(k) - gu) + 1.0E-20) ) & 2344 * weight_substep(intermediate_timestep_count) * rmask(j,i,:)2339 * weight_substep(intermediate_timestep_count) 2345 2340 ENDDO 2346 sums_us2_ws_l(nzb_u_inner(j,i),:) = & 2347 sums_us2_ws_l(nzb_u_inner(j,i)+1,:) 2341 sums_us2_ws_l(nzb_u_inner(j,i)) = sums_us2_ws_l(nzb_u_inner(j,i)+1) 2348 2342 ENDDO 2349 2343 ENDDO … … 2438 2432 !-- at last vertical momentum flux is accumulated 2439 2433 DO k = nzb_u_inner(j,i), nzt 2440 sums_wsus_ws_l(k ,:) = sums_wsus_ws_l(k,:)&2434 sums_wsus_ws_l(k) = sums_wsus_ws_l(k) & 2441 2435 + ( flux_t(k) + diss_t(k) ) & 2442 * weight_substep(intermediate_timestep_count) & 2443 * rmask(j,i,:) 2436 * weight_substep(intermediate_timestep_count) 2444 2437 ENDDO 2445 2438 ENDDO … … 2716 2709 swap_diss_y_local_v(k) = diss_n(k) 2717 2710 2718 sums_vs2_ws_l(k ,:) = sums_vs2_ws_l(k,:)&2719 + ( flux_n(k) * ( v_comp(k) - 2.0 * hom(k,1,2, :) ) &2711 sums_vs2_ws_l(k) = sums_vs2_ws_l(k) & 2712 + ( flux_n(k) * ( v_comp(k) - 2.0 * hom(k,1,2,0) ) & 2720 2713 / ( v_comp(k) - gv + 1.0E-20 ) & 2721 + diss_n(k) * ABS( v_comp(k) - 2.0 * hom(k,1,2, :) ) &2714 + diss_n(k) * ABS( v_comp(k) - 2.0 * hom(k,1,2,0) ) & 2722 2715 / ( ABS( v_comp(k) - gv ) + 1.0E-20 ) ) & 2723 * weight_substep(intermediate_timestep_count) * rmask(j,i,:)2716 * weight_substep(intermediate_timestep_count) 2724 2717 ENDDO 2725 sums_vs2_ws_l(nzb_v_inner(j,i),:) = & 2726 sums_vs2_ws_l(nzb_v_inner(j,i)+1,:) 2718 sums_vs2_ws_l(nzb_v_inner(j,i)) = sums_vs2_ws_l(nzb_v_inner(j,i)+1) 2727 2719 ENDDO 2728 2720 ENDDO … … 2814 2806 !- At last vertical momentum flux is accumulated. 2815 2807 DO k = nzb_v_inner(j,i), nzt 2816 sums_wsvs_ws_l(k ,:) = sums_wsvs_ws_l(k,:)&2808 sums_wsvs_ws_l(k) = sums_wsvs_ws_l(k) & 2817 2809 + ( flux_t(k) + diss_t(k) ) & 2818 * weight_substep(intermediate_timestep_count) & 2819 * rmask(j,i,:) 2810 * weight_substep(intermediate_timestep_count) 2820 2811 ENDDO 2821 sums_vs2_ws_l(nzb_v_inner(j,i),:) = & 2822 sums_vs2_ws_l(nzb_v_inner(j,i)+1,:) 2812 sums_vs2_ws_l(nzb_v_inner(j,i)) = sums_vs2_ws_l(nzb_v_inner(j,i)+1) 2823 2813 ENDDO 2824 2814 ENDDO … … 3192 3182 !-- at last vertical momentum flux is accumulated 3193 3183 DO k = nzb_w_inner(j,i), nzt 3194 sums_ws2_ws_l(k ,:) = sums_ws2_ws_l(k,:)&3184 sums_ws2_ws_l(k) = sums_ws2_ws_l(k) & 3195 3185 + ( flux_t(k) + diss_t(k) ) & 3196 * weight_substep(intermediate_timestep_count) & 3197 * rmask(j,i,:) 3186 * weight_substep(intermediate_timestep_count) 3198 3187 ENDDO 3199 3188 -
palm/trunk/SOURCE/flow_statistics.f90
r710 r743 4 4 ! Current revisions: 5 5 ! ----------------- 6 ! 6 ! Calculation of turbulent fluxes with WS-scheme only for the whole model 7 ! domain, not for user-defined subregions. 7 8 ! 8 9 ! Former revisions: … … 168 169 !-- Copy the turbulent quantities, evaluated in the advection routines to 169 170 !-- the local array sums_l() for further computations 170 IF ( ws_scheme_mom ) THEN171 IF ( ws_scheme_mom .AND. sr == 0 ) THEN 171 172 172 173 ! … … 174 175 !-- the corresponding fluxes has to satisfiy the same bc. 175 176 IF ( ocean ) THEN 176 sums_us2_ws_l(nzt+1 ,sr) = sums_us2_ws_l(nzt,sr)177 sums_vs2_ws_l(nzt+1 ,sr) = sums_vs2_ws_l(nzt,sr)177 sums_us2_ws_l(nzt+1) = sums_us2_ws_l(nzt) 178 sums_vs2_ws_l(nzt+1) = sums_vs2_ws_l(nzt) 178 179 ENDIF 179 180 … … 181 182 ! 182 183 !-- Swap the turbulent quantities evaluated in advec_ws. 183 sums_l(:,13,i) = sums_wsus_ws_l(: ,sr) ! w*u*184 sums_l(:,15,i) = sums_wsvs_ws_l(: ,sr) ! w*v*185 sums_l(:,30,i) = sums_us2_ws_l(: ,sr) ! u*2186 sums_l(:,31,i) = sums_vs2_ws_l(: ,sr) ! v*2187 sums_l(:,32,i) = sums_ws2_ws_l(: ,sr) ! w*2184 sums_l(:,13,i) = sums_wsus_ws_l(:) ! w*u* 185 sums_l(:,15,i) = sums_wsvs_ws_l(:) ! w*v* 186 sums_l(:,30,i) = sums_us2_ws_l(:) ! u*2 187 sums_l(:,31,i) = sums_vs2_ws_l(:) ! v*2 188 sums_l(:,32,i) = sums_ws2_ws_l(:) ! w*2 188 189 sums_l(:,34,i) = sums_l(:,34,i) + 0.5 * & 189 ( sums_us2_ws_l(: ,sr) + sums_vs2_ws_l(:,sr) +&190 sums_ws2_ws_l(: ,sr) ) ! e*190 ( sums_us2_ws_l(:) + sums_vs2_ws_l(:) + & 191 sums_ws2_ws_l(:) ) ! e* 191 192 DO k = nzb, nzt 192 193 sums_l(nzb+5,pr_palm,i) = sums_l(nzb+5,pr_palm,i) + 0.5 * ( & 193 sums_us2_ws_l(k ,sr) +&194 sums_vs2_ws_l(k ,sr) +&195 sums_ws2_ws_l(k ,sr) )194 sums_us2_ws_l(k) + & 195 sums_vs2_ws_l(k) + & 196 sums_ws2_ws_l(k) ) 196 197 ENDDO 197 198 ENDDO … … 199 200 ENDIF 200 201 201 IF ( ws_scheme_sca ) THEN202 IF ( ws_scheme_sca .AND. sr == 0 ) THEN 202 203 203 204 DO i = 0, threads_per_task-1 204 sums_l(:,17,i) = sums_wspts_ws_l(: ,sr) ! w*pt* from advec_s_ws205 IF ( ocean ) sums_l(:,66,i) = sums_wssas_ws_l(: ,sr) ! w*sa*205 sums_l(:,17,i) = sums_wspts_ws_l(:) ! w*pt* from advec_s_ws 206 IF ( ocean ) sums_l(:,66,i) = sums_wssas_ws_l(:) ! w*sa* 206 207 IF ( humidity .OR. passive_scalar ) sums_l(:,49,i) = & 207 sums_wsqs_ws_l(: ,sr) !w*q*208 sums_wsqs_ws_l(:) !w*q* 208 209 ENDDO 209 210 … … 483 484 !-- Computation of statistics when ws-scheme is not used. Else these 484 485 !-- quantities are evaluated in the advection routines. 485 IF ( .NOT. ws_scheme_mom ) THEN486 IF ( .NOT. ws_scheme_mom .OR. sr /= 0 ) THEN 486 487 !$OMP DO 487 488 DO i = nxl, nxr … … 692 693 !-- but so far there is no other suitable place to calculate) 693 694 IF ( ocean ) THEN 694 IF( .NOT. ws_scheme_sca ) THEN695 IF( .NOT. ws_scheme_sca .OR. sr /= 0 ) THEN 695 696 pts = 0.5 * ( sa(k,j,i) - hom(k,1,23,sr) + & 696 697 sa(k+1,j,i) - hom(k+1,1,23,sr) ) … … 726 727 ! 727 728 !-- Passive scalar flux 728 IF ( passive_scalar .AND. ( .NOT. ws_scheme_sca )) THEN 729 IF ( passive_scalar .AND. ( .NOT. ws_scheme_sca & 730 .OR. sr /= 0 ) ) THEN 729 731 pts = 0.5 * ( q(k,j,i) - hom(k,1,41,sr) + & 730 732 q(k+1,j,i) - hom(k+1,1,41,sr) ) … … 746 748 !-- inside the WS advection routines are treated seperatly 747 749 !-- Momentum fluxes first: 748 IF ( .NOT. ws_scheme_mom ) THEN750 IF ( .NOT. ws_scheme_mom .OR. sr /= 0 ) THEN 749 751 !$OMP DO 750 752 DO i = nxl, nxr … … 770 772 771 773 ENDIF 772 IF ( .NOT. ws_scheme_sca ) THEN774 IF ( .NOT. ws_scheme_sca .OR. sr /= 0 ) THEN 773 775 !$OMP DO 774 776 DO i = nxl, nxr -
palm/trunk/SOURCE/modules.f90
r737 r743 5 5 ! Current revisions: 6 6 ! ----------------- 7 ! Dimension of sums_wsus_ws_l, sums_wsvs_ws_l, sums_us2_ws_l, sums_vs2_ws_l, 8 ! sums_ws2_ws_l, sums_wspts_ws_l, sums_wssas_ws_l,sums_wsqs_ws_l needed for 9 ! statistical evaluation of turbulent fluxes in WS-scheme decreased. 7 10 ! 8 11 ! Former revisions: … … 1406 1409 LOGICAL :: flow_statistics_called = .FALSE. 1407 1410 REAL :: u_max, v_max, w_max 1408 REAL, DIMENSION(:), ALLOCATABLE :: sums_divnew_l, sums_divold_l, & 1411 REAL, DIMENSION(:), ALLOCATABLE :: sums_divnew_l, sums_divold_l, & 1412 sums_wsus_ws_l, sums_wsvs_ws_l, & 1413 sums_us2_ws_l, sums_vs2_ws_l, & 1414 sums_ws2_ws_l, & 1415 sums_wspts_ws_l, & 1416 sums_wssas_ws_l,sums_wsqs_ws_l, & 1409 1417 weight_substep, weight_pres 1410 REAL, DIMENSION(:,:), ALLOCATABLE :: sums, sums_wsts_bc_l, & 1411 sums_wsus_ws_l, sums_wsvs_ws_l,& 1412 sums_us2_ws_l, sums_vs2_ws_l, & 1413 sums_ws2_ws_l, & 1414 sums_wspts_ws_l, sums_wssas_ws_l, & 1415 sums_wsqs_ws_l, ts_value 1418 REAL, DIMENSION(:,:), ALLOCATABLE :: sums, sums_wsts_bc_l, ts_value 1416 1419 REAL, DIMENSION(:,:,:), ALLOCATABLE :: hom_sum, rmask, spectrum_x, & 1417 1420 spectrum_y, sums_l, sums_l_l, &
Note: See TracChangeset
for help on using the changeset viewer.