Changeset 4318 for palm


Ignore:
Timestamp:
Dec 3, 2019 4:06:05 PM (20 months ago)
Author:
Giersch
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

Legend:

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

    r4317 r4318  
    2525! -----------------
    2626! $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
    2731! Comments revised/added, formatting improved, fluxes for u,v, and scalars are
    2832! explicitly set to zero at nzt+1, fluxes of w-component are now calculated only
     
    14761480!
    14771481!--    Now, compute vertical fluxes. Split loop into a part treating the
    1478 !--    lowest 2 grid points with indirect indexing, a main loop without
    1479 !--    indirect indexing, and a loop for the uppermost 2 grip points with
     1482!--    lowest grid points with indirect indexing, a main loop without
     1483!--    indirect indexing, and a loop for the uppermost grip points with
    14801484!--    indirect indexing. This allows better vectorization for the main loop.
    14811485!--    First, compute the flux at model surface, which need has to be
     
    14861490       diss_t(nzb) = 0.0_wp
    14871491       
    1488        DO  k = nzb+1, nzb+2
     1492       DO  k = nzb+1, nzb+1
    14891493          ibit8 = REAL( IBITS(advc_flag(k,j,i),8,1), KIND = wp )
    14901494          ibit7 = REAL( IBITS(advc_flag(k,j,i),7,1), KIND = wp )
     
    15281532       ENDDO
    15291533       
    1530        DO  k = nzb+3, nzt-2
     1534       DO  k = nzb+2, nzt-2
    15311535          ibit8 = REAL( IBITS(advc_flag(k,j,i),8,1), KIND = wp )
    15321536          ibit7 = REAL( IBITS(advc_flag(k,j,i),7,1), KIND = wp )
     
    21982202!
    21992203!--    Now, compute vertical fluxes. Split loop into a part treating the
    2200 !--    lowest 2 grid points with indirect indexing, a main loop without
    2201 !--    indirect indexing, and a loop for the uppermost 2 grip points with
     2204!--    lowest grid points with indirect indexing, a main loop without
     2205!--    indirect indexing, and a loop for the uppermost grip points with
    22022206!--    indirect indexing. This allows better vectorization for the main loop.
    22032207!--    First, compute the flux at model surface, which need has to be
     
    22092213       w_comp(nzb) = 0.0_wp
    22102214       
    2211        DO  k = nzb+1, nzb+2
     2215       DO  k = nzb+1, nzb+1
    22122216!
    22132217!--       k index has to be modified near bottom and top, else array
     
    22532257       ENDDO
    22542258       
    2255        DO  k = nzb+3, nzt-2
     2259       DO  k = nzb+2, nzt-2
    22562260
    22572261          ibit8 = REAL( IBITS(advc_flags_m(k,j,i),8,1), KIND = wp )
     
    27622766!
    27632767!--    Now, compute vertical fluxes. Split loop into a part treating the
    2764 !--    lowest 2 grid points with indirect indexing, a main loop without
    2765 !--    indirect indexing, and a loop for the uppermost 2 grip points with
     2768!--    lowest grid points with indirect indexing, a main loop without
     2769!--    indirect indexing, and a loop for the uppermost grip points with
    27662770!--    indirect indexing. This allows better vectorization for the main loop.
    27672771!--    First, compute the flux at model surface, which need has to be
     
    27732777       w_comp(nzb) = 0.0_wp
    27742778       
    2775        DO  k = nzb+1, nzb+2
     2779       DO  k = nzb+1, nzb+1
    27762780!
    27772781!--       k index has to be modified near bottom and top, else array
     
    28172821       ENDDO
    28182822       
    2819        DO  k = nzb+3, nzt-2
     2823       DO  k = nzb+2, nzt-2
    28202824
    28212825          ibit17 = REAL( IBITS(advc_flags_m(k,j,i),17,1), KIND = wp )
     
    33253329!
    33263330!--    Now, compute vertical fluxes. Split loop into a part treating the
    3327 !--    lowest 2 grid points with indirect indexing, a main loop without
    3328 !--    indirect indexing, and a loop for the uppermost 2 grip points with
     3331!--    lowest grid points with indirect indexing, a main loop without
     3332!--    indirect indexing, and a loop for the uppermost grip points with
    33293333!--    indirect indexing. This allows better vectorization for the main loop.
    33303334!--    First, compute the flux at model surface, which need has to be
     
    33373341       diss_t(0) = -ABS(w_comp(k)) * ( w(k,j,i) - w(k-1,j,i) ) * adv_mom_1
    33383342       
    3339        DO  k = nzb+1, nzb+2
     3343       DO  k = nzb+1, nzb+1
    33403344!
    33413345!--       k index has to be modified near bottom and top, else array
     
    33813385       ENDDO
    33823386       
    3383        DO  k = nzb+3, nzt-2
     3387       DO  k = nzb+2, nzt-2
    33843388       
    33853389          ibit26 = REAL( IBITS(advc_flags_m(k,j,i),26,1), KIND = wp )
Note: See TracChangeset for help on using the changeset viewer.