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 13295 for NEMO/trunk/tests/VORTEX – NEMO

Ignore:
Timestamp:
2020-07-10T20:24:21+02:00 (4 years ago)
Author:
acc
Message:

Replace do-loop macros in the trunk with alternative forms with greater flexibility for extra halo applications. This alters a lot of routines but does not change any behaviour or results. do_loop_substitute.h90 is greatly simplified by this change. SETTE results are identical to those with the previous revision

Location:
NEMO/trunk/tests/VORTEX/MY_SRC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/tests/VORTEX/MY_SRC/domvvl.F90

    r13286 r13295  
    190190      gdept(:,:,1,Kbb) = 0.5_wp * e3w(:,:,1,Kbb) 
    191191      gdepw(:,:,1,Kbb) = 0.0_wp 
    192       DO_3D_11_11( 2, jpk ) 
     192      DO_3D( 1, 1, 1, 1, 2, jpk ) 
    193193         !    zcoef = tmask - wmask    ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt 
    194194         !                             ! 1 everywhere from mbkt to mikt + 1 or 1 (if no isf) 
     
    238238         ENDIF 
    239239         IF ( ln_vvl_zstar_at_eqtor ) THEN   ! use z-star in vicinity of the Equator 
    240             DO_2D_11_11 
     240            DO_2D( 1, 1, 1, 1 ) 
    241241!!gm  case |gphi| >= 6 degrees is useless   initialized just above by default 
    242242               IF( ABS(gphit(ji,jj)) >= 6.) THEN 
     
    407407         zwu(:,:) = 0._wp 
    408408         zwv(:,:) = 0._wp 
    409          DO_3D_10_10( 1, jpkm1 ) 
     409         DO_3D( 1, 0, 1, 0, 1, jpkm1 ) 
    410410            un_td(ji,jj,jk) = rn_ahe3 * umask(ji,jj,jk) * e2_e1u(ji,jj)           & 
    411411               &            * ( tilde_e3t_b(ji,jj,jk) - tilde_e3t_b(ji+1,jj  ,jk) ) 
     
    415415            zwv(ji,jj) = zwv(ji,jj) + vn_td(ji,jj,jk) 
    416416         END_3D 
    417          DO_2D_11_11 
     417         DO_2D( 1, 1, 1, 1 ) 
    418418            un_td(ji,jj,mbku(ji,jj)) = un_td(ji,jj,mbku(ji,jj)) - zwu(ji,jj) 
    419419            vn_td(ji,jj,mbkv(ji,jj)) = vn_td(ji,jj,mbkv(ji,jj)) - zwv(ji,jj) 
    420420         END_2D 
    421          DO_3D_00_00( 1, jpkm1 ) 
     421         DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
    422422            tilde_e3t_a(ji,jj,jk) = tilde_e3t_a(ji,jj,jk) + (   un_td(ji-1,jj  ,jk) - un_td(ji,jj,jk)    & 
    423423               &                                          +     vn_td(ji  ,jj-1,jk) - vn_td(ji,jj,jk)    & 
     
    647647      gdepw(:,:,1,Kmm) = 0.0_wp 
    648648      gde3w(:,:,1) = gdept(:,:,1,Kmm) - ssh(:,:,Kmm) 
    649       DO_3D_11_11( 2, jpk ) 
     649      DO_3D( 1, 1, 1, 1, 2, jpk ) 
    650650        !    zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk))   ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt 
    651651                                                           ! 1 for jk = mikt 
     
    702702         ! 
    703703      CASE( 'U' )                   !* from T- to U-point : hor. surface weighted mean 
    704          DO_3D_10_10( 1, jpk ) 
     704         DO_3D( 1, 0, 1, 0, 1, jpk ) 
    705705            pe3_out(ji,jj,jk) = 0.5_wp * (  umask(ji,jj,jk) * (1.0_wp - zlnwd) + zlnwd ) * r1_e1e2u(ji,jj)   & 
    706706               &                       * (   e1e2t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) )     & 
     
    711711         ! 
    712712      CASE( 'V' )                   !* from T- to V-point : hor. surface weighted mean 
    713          DO_3D_10_10( 1, jpk ) 
     713         DO_3D( 1, 0, 1, 0, 1, jpk ) 
    714714            pe3_out(ji,jj,jk) = 0.5_wp * ( vmask(ji,jj,jk)  * (1.0_wp - zlnwd) + zlnwd ) * r1_e1e2v(ji,jj)   & 
    715715               &                       * (   e1e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) )     & 
     
    720720         ! 
    721721      CASE( 'F' )                   !* from U-point to F-point : hor. surface weighted mean 
    722          DO_3D_10_10( 1, jpk ) 
     722         DO_3D( 1, 0, 1, 0, 1, jpk ) 
    723723            pe3_out(ji,jj,jk) = 0.5_wp * (  umask(ji,jj,jk) * umask(ji,jj+1,jk) * (1.0_wp - zlnwd) + zlnwd ) & 
    724724               &                       *    r1_e1e2f(ji,jj)                                                  & 
     
    887887                  ssh(:,:,Kbb) = -ssh_ref 
    888888 
    889                   DO_2D_11_11 
     889                  DO_2D( 1, 1, 1, 1 ) 
    890890                     IF( ht_0(ji,jj)-ssh_ref <  rn_wdmin1 ) THEN ! if total depth is less than min depth 
    891891                        ssh(ji,jj,Kbb) = rn_wdmin1 - (ht_0(ji,jj) ) 
     
    903903               e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 
    904904 
    905                DO_2D_11_11 
     905               DO_2D( 1, 1, 1, 1 ) 
    906906                  IF ( ht_0(ji,jj) .LE. 0.0 .AND. NINT( ssmask(ji,jj) ) .EQ. 1) THEN 
    907907                     CALL ctl_stop( 'dom_vvl_rst: ht_0 must be positive at potentially wet points' ) 
  • NEMO/trunk/tests/VORTEX/MY_SRC/usrdef_hgr.F90

    r13286 r13295  
    9898#endif 
    9999          
    100       DO_2D_11_11 
     100      DO_2D( 1, 1, 1, 1 ) 
    101101         zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos 
    102102         ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos 
  • NEMO/trunk/tests/VORTEX/MY_SRC/usrdef_istate.F90

    r12740 r13295  
    7575      ! Sea level: 
    7676      za = -zP0 * (1._wp-EXP(-zH)) / (grav*(zH-1._wp + EXP(-zH))) 
    77       DO_2D_11_11 
     77      DO_2D( 1, 1, 1, 1 ) 
    7878         zx = glamt(ji,jj) * 1.e3 
    7979         zy = gphit(ji,jj) * 1.e3 
     
    8383      ! 
    8484      ! temperature:          
    85       DO_2D_11_11 
     85      DO_2D( 1, 1, 1, 1 ) 
    8686         zx = glamt(ji,jj) * 1.e3 
    8787         zy = gphit(ji,jj) * 1.e3 
     
    102102      ! velocities: 
    103103      za = 2._wp * zP0 / (zf0 * rho0 * zlambda**2) 
    104       DO_2D_00_00 
     104      DO_2D( 0, 0, 0, 0 ) 
    105105         zx = glamu(ji,jj) * 1.e3 
    106106         zy = gphiu(ji,jj) * 1.e3 
     
    116116      END_2D 
    117117      ! 
    118       DO_2D_00_00 
     118      DO_2D( 0, 0, 0, 0 ) 
    119119         zx = glamv(ji,jj) * 1.e3 
    120120         zy = gphiv(ji,jj) * 1.e3 
Note: See TracChangeset for help on using the changeset viewer.