# Changeset 4318

Ignore:
Timestamp:
Dec 3, 2019 4:06:05 PM (19 months ago)
Message:

Indirect indexing for calculating vertical fluxes close to boundaries is only used for loop indices where it is really necessary

Location:
palm/trunk
Files:
2 edited

Unmodified
Added
Removed
• ## palm/trunk/SOURCE/advec_ws.f90

 r4317 ! ----------------- ! \$Id\$ ! Indirect indexing for calculating vertical fluxes close to boundaries is only ! used for loop indizes where it is really necessary ! ! 4317 2019-12-03 12:43:22Z Giersch ! Comments revised/added, formatting improved, fluxes for u,v, and scalars are ! explicitly set to zero at nzt+1, fluxes of w-component are now calculated only ! !--    Now, compute vertical fluxes. Split loop into a part treating the !--    lowest 2 grid points with indirect indexing, a main loop without !--    indirect indexing, and a loop for the uppermost 2 grip points with !--    lowest grid points with indirect indexing, a main loop without !--    indirect indexing, and a loop for the uppermost grip points with !--    indirect indexing. This allows better vectorization for the main loop. !--    First, compute the flux at model surface, which need has to be diss_t(nzb) = 0.0_wp DO  k = nzb+1, nzb+2 DO  k = nzb+1, nzb+1 ibit8 = REAL( IBITS(advc_flag(k,j,i),8,1), KIND = wp ) ibit7 = REAL( IBITS(advc_flag(k,j,i),7,1), KIND = wp ) ENDDO DO  k = nzb+3, nzt-2 DO  k = nzb+2, nzt-2 ibit8 = REAL( IBITS(advc_flag(k,j,i),8,1), KIND = wp ) ibit7 = REAL( IBITS(advc_flag(k,j,i),7,1), KIND = wp ) ! !--    Now, compute vertical fluxes. Split loop into a part treating the !--    lowest 2 grid points with indirect indexing, a main loop without !--    indirect indexing, and a loop for the uppermost 2 grip points with !--    lowest grid points with indirect indexing, a main loop without !--    indirect indexing, and a loop for the uppermost grip points with !--    indirect indexing. This allows better vectorization for the main loop. !--    First, compute the flux at model surface, which need has to be w_comp(nzb) = 0.0_wp DO  k = nzb+1, nzb+2 DO  k = nzb+1, nzb+1 ! !--       k index has to be modified near bottom and top, else array ENDDO DO  k = nzb+3, nzt-2 DO  k = nzb+2, nzt-2 ibit8 = REAL( IBITS(advc_flags_m(k,j,i),8,1), KIND = wp ) ! !--    Now, compute vertical fluxes. Split loop into a part treating the !--    lowest 2 grid points with indirect indexing, a main loop without !--    indirect indexing, and a loop for the uppermost 2 grip points with !--    lowest grid points with indirect indexing, a main loop without !--    indirect indexing, and a loop for the uppermost grip points with !--    indirect indexing. This allows better vectorization for the main loop. !--    First, compute the flux at model surface, which need has to be w_comp(nzb) = 0.0_wp DO  k = nzb+1, nzb+2 DO  k = nzb+1, nzb+1 ! !--       k index has to be modified near bottom and top, else array ENDDO DO  k = nzb+3, nzt-2 DO  k = nzb+2, nzt-2 ibit17 = REAL( IBITS(advc_flags_m(k,j,i),17,1), KIND = wp ) ! !--    Now, compute vertical fluxes. Split loop into a part treating the !--    lowest 2 grid points with indirect indexing, a main loop without !--    indirect indexing, and a loop for the uppermost 2 grip points with !--    lowest grid points with indirect indexing, a main loop without !--    indirect indexing, and a loop for the uppermost grip points with !--    indirect indexing. This allows better vectorization for the main loop. !--    First, compute the flux at model surface, which need has to be diss_t(0) = -ABS(w_comp(k)) * ( w(k,j,i) - w(k-1,j,i) ) * adv_mom_1 DO  k = nzb+1, nzb+2 DO  k = nzb+1, nzb+1 ! !--       k index has to be modified near bottom and top, else array ENDDO DO  k = nzb+3, nzt-2 DO  k = nzb+2, nzt-2 ibit26 = REAL( IBITS(advc_flags_m(k,j,i),26,1), KIND = wp )
Note: See TracChangeset for help on using the changeset viewer.