Changeset 4318
- Timestamp:
- Dec 3, 2019 4:06:05 PM (5 years ago)
- Location:
- palm/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/advec_ws.f90
r4317 r4318 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Indirect indexing for calculating vertical fluxes close to boundaries is only 28 ! used for loop indizes where it is really necessary 29 ! 30 ! 4317 2019-12-03 12:43:22Z Giersch 27 31 ! Comments revised/added, formatting improved, fluxes for u,v, and scalars are 28 32 ! explicitly set to zero at nzt+1, fluxes of w-component are now calculated only … … 1476 1480 ! 1477 1481 !-- Now, compute vertical fluxes. Split loop into a part treating the 1478 !-- lowest 2grid points with indirect indexing, a main loop without1479 !-- indirect indexing, and a loop for the uppermost 2grip points with1482 !-- lowest grid points with indirect indexing, a main loop without 1483 !-- indirect indexing, and a loop for the uppermost grip points with 1480 1484 !-- indirect indexing. This allows better vectorization for the main loop. 1481 1485 !-- First, compute the flux at model surface, which need has to be … … 1486 1490 diss_t(nzb) = 0.0_wp 1487 1491 1488 DO k = nzb+1, nzb+ 21492 DO k = nzb+1, nzb+1 1489 1493 ibit8 = REAL( IBITS(advc_flag(k,j,i),8,1), KIND = wp ) 1490 1494 ibit7 = REAL( IBITS(advc_flag(k,j,i),7,1), KIND = wp ) … … 1528 1532 ENDDO 1529 1533 1530 DO k = nzb+ 3, nzt-21534 DO k = nzb+2, nzt-2 1531 1535 ibit8 = REAL( IBITS(advc_flag(k,j,i),8,1), KIND = wp ) 1532 1536 ibit7 = REAL( IBITS(advc_flag(k,j,i),7,1), KIND = wp ) … … 2198 2202 ! 2199 2203 !-- Now, compute vertical fluxes. Split loop into a part treating the 2200 !-- lowest 2grid points with indirect indexing, a main loop without2201 !-- indirect indexing, and a loop for the uppermost 2grip points with2204 !-- lowest grid points with indirect indexing, a main loop without 2205 !-- indirect indexing, and a loop for the uppermost grip points with 2202 2206 !-- indirect indexing. This allows better vectorization for the main loop. 2203 2207 !-- First, compute the flux at model surface, which need has to be … … 2209 2213 w_comp(nzb) = 0.0_wp 2210 2214 2211 DO k = nzb+1, nzb+ 22215 DO k = nzb+1, nzb+1 2212 2216 ! 2213 2217 !-- k index has to be modified near bottom and top, else array … … 2253 2257 ENDDO 2254 2258 2255 DO k = nzb+ 3, nzt-22259 DO k = nzb+2, nzt-2 2256 2260 2257 2261 ibit8 = REAL( IBITS(advc_flags_m(k,j,i),8,1), KIND = wp ) … … 2762 2766 ! 2763 2767 !-- Now, compute vertical fluxes. Split loop into a part treating the 2764 !-- lowest 2grid points with indirect indexing, a main loop without2765 !-- indirect indexing, and a loop for the uppermost 2grip points with2768 !-- lowest grid points with indirect indexing, a main loop without 2769 !-- indirect indexing, and a loop for the uppermost grip points with 2766 2770 !-- indirect indexing. This allows better vectorization for the main loop. 2767 2771 !-- First, compute the flux at model surface, which need has to be … … 2773 2777 w_comp(nzb) = 0.0_wp 2774 2778 2775 DO k = nzb+1, nzb+ 22779 DO k = nzb+1, nzb+1 2776 2780 ! 2777 2781 !-- k index has to be modified near bottom and top, else array … … 2817 2821 ENDDO 2818 2822 2819 DO k = nzb+ 3, nzt-22823 DO k = nzb+2, nzt-2 2820 2824 2821 2825 ibit17 = REAL( IBITS(advc_flags_m(k,j,i),17,1), KIND = wp ) … … 3325 3329 ! 3326 3330 !-- Now, compute vertical fluxes. Split loop into a part treating the 3327 !-- lowest 2grid points with indirect indexing, a main loop without3328 !-- indirect indexing, and a loop for the uppermost 2grip points with3331 !-- lowest grid points with indirect indexing, a main loop without 3332 !-- indirect indexing, and a loop for the uppermost grip points with 3329 3333 !-- indirect indexing. This allows better vectorization for the main loop. 3330 3334 !-- First, compute the flux at model surface, which need has to be … … 3337 3341 diss_t(0) = -ABS(w_comp(k)) * ( w(k,j,i) - w(k-1,j,i) ) * adv_mom_1 3338 3342 3339 DO k = nzb+1, nzb+ 23343 DO k = nzb+1, nzb+1 3340 3344 ! 3341 3345 !-- k index has to be modified near bottom and top, else array … … 3381 3385 ENDDO 3382 3386 3383 DO k = nzb+ 3, nzt-23387 DO k = nzb+2, nzt-2 3384 3388 3385 3389 ibit26 = REAL( IBITS(advc_flags_m(k,j,i),26,1), KIND = wp )
Note: See TracChangeset
for help on using the changeset viewer.