New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 14215 for NEMO/trunk/src/OCE/TRA/traadv_qck.F90 – NEMO

Ignore:
Timestamp:
2020-12-18T14:49:22+01:00 (4 years ago)
Author:
acc
Message:

trunk changes to swap the order of arguments to the DO LOOP macros. These changes result in a more natural i-j-k ordering as explained in #2595. SETTE is passed before and after these changes and results are unchanged. This fixes #2595

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/TRA/traadv_qck.F90

    r14189 r14215  
    145145         ! 
    146146!!gm why not using a SHIFT instruction... 
    147          DO_3D( 0, 0, nn_hls-1, nn_hls-1, 1, jpkm1 )     !--- Computation of the ustream and downstream value of the tracer and the mask 
     147         DO_3D( nn_hls-1, nn_hls-1, 0, 0, 1, jpkm1 )     !--- Computation of the ustream and downstream value of the tracer and the mask 
    148148            zfc(ji,jj,jk) = pt(ji-1,jj,jk,jn,Kbb)        ! Upstream   in the x-direction for the tracer 
    149149            zfd(ji,jj,jk) = pt(ji+1,jj,jk,jn,Kbb)        ! Downstream in the x-direction for the tracer 
     
    154154         ! Horizontal advective fluxes 
    155155         ! --------------------------- 
    156          DO_3D( 0, 0, nn_hls-1, 0, 1, jpkm1 ) 
     156         DO_3D( nn_hls-1, 0, 0, 0, 1, jpkm1 ) 
    157157            zdir = 0.5 + SIGN( 0.5_wp, pU(ji,jj,jk) )   ! if pU > 0 : zdir = 1 otherwise zdir = 0 
    158158            zfu(ji,jj,jk) = zdir * zfc(ji,jj,jk ) + ( 1. - zdir ) * zfd(ji+1,jj,jk)  ! FU in the x-direction for T 
    159159         END_3D 
    160160         ! 
    161          DO_3D( 0, 0, nn_hls-1, 0, 1, jpkm1 ) 
     161         DO_3D( nn_hls-1, 0, 0, 0, 1, jpkm1 ) 
    162162            zdir = 0.5 + SIGN( 0.5_wp, pU(ji,jj,jk) )   ! if pU > 0 : zdir = 1 otherwise zdir = 0 
    163163            zdx = ( zdir * e1t(ji,jj) + ( 1. - zdir ) * e1t(ji+1,jj) ) * e2u(ji,jj) * e3u(ji,jj,jk,Kmm) 
     
    173173         ! 
    174174         ! Mask at the T-points in the x-direction (mask=0 or mask=1) 
    175          DO_3D( 0, 0, nn_hls-1, nn_hls-1, 1, jpkm1 ) 
     175         DO_3D( nn_hls-1, nn_hls-1, 0, 0, 1, jpkm1 ) 
    176176            zfu(ji,jj,jk) = tmask(ji-1,jj,jk) + tmask(ji,jj,jk) + tmask(ji+1,jj,jk) - 2. 
    177177         END_3D 
     
    180180         ! 
    181181         ! Tracer flux on the x-direction 
    182          DO_3D( 0, 0, 1, 0, 1, jpkm1 ) 
     182         DO_3D( 1, 0, 0, 0, 1, jpkm1 ) 
    183183            zdir = 0.5 + SIGN( 0.5_wp, pU(ji,jj,jk) )   ! if pU > 0 : zdir = 1 otherwise zdir = 0 
    184184            !--- If the second ustream point is a land point 
     
    232232            ! 
    233233            !--- Computation of the ustream and downstream value of the tracer and the mask 
    234             DO_2D( nn_hls-1, nn_hls-1, 0, 0 ) 
     234            DO_2D( 0, 0, nn_hls-1, nn_hls-1 ) 
    235235               ! Upstream in the x-direction for the tracer 
    236236               zfc(ji,jj,jk) = pt(ji,jj-1,jk,jn,Kbb) 
     
    245245         ! --------------------------- 
    246246         ! 
    247          DO_3D( nn_hls-1, 0, 0, 0, 1, jpkm1 ) 
     247         DO_3D( 0, 0, nn_hls-1, 0, 1, jpkm1 ) 
    248248            zdir = 0.5 + SIGN( 0.5_wp, pV(ji,jj,jk) )   ! if pU > 0 : zdir = 1 otherwise zdir = 0 
    249249            zfu(ji,jj,jk) = zdir * zfc(ji,jj,jk ) + ( 1. - zdir ) * zfd(ji,jj+1,jk)  ! FU in the x-direction for T 
    250250         END_3D 
    251251         ! 
    252          DO_3D( nn_hls-1, 0, 0, 0, 1, jpkm1 ) 
     252         DO_3D( 0, 0, nn_hls-1, 0, 1, jpkm1 ) 
    253253            zdir = 0.5 + SIGN( 0.5_wp, pV(ji,jj,jk) )   ! if pU > 0 : zdir = 1 otherwise zdir = 0 
    254254            zdx = ( zdir * e2t(ji,jj) + ( 1. - zdir ) * e2t(ji,jj+1) ) * e1v(ji,jj) * e3v(ji,jj,jk,Kmm) 
     
    265265         ! 
    266266         ! Mask at the T-points in the x-direction (mask=0 or mask=1) 
    267          DO_3D( nn_hls-1, nn_hls-1, 0, 0, 1, jpkm1 ) 
     267         DO_3D( 0, 0, nn_hls-1, nn_hls-1, 1, jpkm1 ) 
    268268            zfu(ji,jj,jk) = tmask(ji,jj-1,jk) + tmask(ji,jj,jk) + tmask(ji,jj+1,jk) - 2. 
    269269         END_3D 
     
    271271         ! 
    272272         ! Tracer flux on the x-direction 
    273          DO_3D( 1, 0, 0, 0, 1, jpkm1 ) 
     273         DO_3D( 0, 0, 1, 0, 1, jpkm1 ) 
    274274            zdir = 0.5 + SIGN( 0.5_wp, pV(ji,jj,jk) )   ! if pU > 0 : zdir = 1 otherwise zdir = 0 
    275275            !--- If the second ustream point is a land point 
Note: See TracChangeset for help on using the changeset viewer.