Index: NEMO/branches/2020/r12581_ticket2418/tests/BENCH/MY_SRC/usrdef_hgr.F90
===================================================================
--- NEMO/branches/2020/r12581_ticket2418/tests/BENCH/MY_SRC/usrdef_hgr.F90	(revision 12582)
+++ NEMO/branches/2020/r12581_ticket2418/tests/BENCH/MY_SRC/usrdef_hgr.F90	(revision 12844)
@@ -24,4 +24,6 @@
    PUBLIC   usr_def_hgr   ! called by domhgr.F90
 
+   !! * Substitutions
+#  include "do_loop_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 4.0, NEMO Consortium (2016)
@@ -72,23 +74,21 @@
       !                          
       ! Position coordinates (in grid points)
-      !                          ==========         
-      DO jj = 1, jpj
-         DO ji = 1, jpi
-            
-            zti = REAL( ji - 1 + nimpp - 1, wp )          ;  ztj = REAL( jj - 1 + njmpp - 1, wp )
-            zui = REAL( ji - 1 + nimpp - 1, wp ) + 0.5_wp ;  zvj = REAL( jj - 1 + njmpp - 1, wp ) + 0.5_wp
+      !                          ==========
+      DO_2D_11_11
+         
+         zti = REAL( ji - 1 + nimpp - 1, wp )          ;  ztj = REAL( jj - 1 + njmpp - 1, wp )
+         zui = REAL( ji - 1 + nimpp - 1, wp ) + 0.5_wp ;  zvj = REAL( jj - 1 + njmpp - 1, wp ) + 0.5_wp
+         
+         plamt(ji,jj) = zti
+         plamu(ji,jj) = zui
+         plamv(ji,jj) = zti
+         plamf(ji,jj) = zui
+         
+         pphit(ji,jj) = ztj
+         pphiv(ji,jj) = zvj
+         pphiu(ji,jj) = ztj
+         pphif(ji,jj) = zvj
 
-            plamt(ji,jj) = zti
-            plamu(ji,jj) = zui
-            plamv(ji,jj) = zti
-            plamf(ji,jj) = zui
-   
-            pphit(ji,jj) = ztj
-            pphiv(ji,jj) = zvj
-            pphiu(ji,jj) = ztj
-            pphif(ji,jj) = zvj
-            
-         END DO
-      END DO
+      END_2D
       !     
       ! Horizontal scale factors (in meters)
Index: NEMO/branches/2020/r12581_ticket2418/tests/BENCH/MY_SRC/usrdef_istate.F90
===================================================================
--- NEMO/branches/2020/r12581_ticket2418/tests/BENCH/MY_SRC/usrdef_istate.F90	(revision 12582)
+++ NEMO/branches/2020/r12581_ticket2418/tests/BENCH/MY_SRC/usrdef_istate.F90	(revision 12844)
@@ -28,4 +28,6 @@
    PUBLIC   usr_def_istate   ! called by istate.F90
 
+   !! * Substitutions
+#  include "do_loop_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 4.0 , NEMO Consortium (2016)
@@ -62,9 +64,7 @@
       !
       ! define unique value on each point. z2d ranging from 0.05 to -0.05
-      DO jj = 1, jpj
-         DO ji = 1, jpi
-            z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig(ji) + mjg(jj) * jpiglo, wp ) / REAL( jpiglo * jpjglo, wp ) )
-         ENDDO
-      ENDDO
+      DO_2D_11_11
+         z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig(ji) + (mjg(jj)-1) * jpiglo, wp ) / REAL( jpiglo * jpjglo, wp ) )
+      END_2D
       !
       ! sea level:
@@ -78,6 +78,6 @@
          pts(:,:,jk,jp_sal) = 30._wp + 1._wp * zfact + z2d(:,:)           ! 30 to 31 +/- 0.05 psu
          ! velocities:
-         pu(:,:,jk) = z2d(:,:) * 0.1_wp                                   ! +/- 0.005  m/s
-         pv(:,:,jk) = z2d(:,:) * 0.01_wp                                  ! +/- 0.0005 m/s
+         pu(:,:,jk) = z2d(:,:) *  0.1_wp * umask(:,:,jk)                  ! +/- 0.005  m/s
+         pv(:,:,jk) = z2d(:,:) * 0.01_wp * vmask(:,:,jk)                  ! +/- 0.0005 m/s
       ENDDO
       !
Index: NEMO/branches/2020/r12581_ticket2418/tests/BENCH/MY_SRC/usrdef_sbc.F90
===================================================================
--- NEMO/branches/2020/r12581_ticket2418/tests/BENCH/MY_SRC/usrdef_sbc.F90	(revision 12582)
+++ NEMO/branches/2020/r12581_ticket2418/tests/BENCH/MY_SRC/usrdef_sbc.F90	(revision 12844)
@@ -34,4 +34,6 @@
    PUBLIC   usrdef_sbc_ice_flx  ! routine called by sbcice_lim.F90 for ice thermo
 
+   !! * Substitutions
+#  include "do_loop_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 4.0 , NEMO Consortium (2016)
@@ -102,9 +104,7 @@
       !
       ! define unique value on each point. z2d ranging from 0.05 to -0.05
-      DO jj = 1, jpj
-         DO ji = 1, jpi
-            z2d(ji,jj) = 0.1 * ( 0.5 - REAL( nimpp + ji - 1 + ( njmpp + jj - 2 ) * jpiglo, wp ) / REAL( jpiglo * jpjglo, wp ) )
-         ENDDO
-      ENDDO
+      DO_2D_11_11
+         z2d(ji,jj) = 0.1 * ( 0.5 - REAL( nimpp + ji - 1 + ( njmpp + jj - 2 ) * jpiglo, wp ) / REAL( jpiglo * jpjglo, wp ) )
+      END_2D
       utau_ice(:,:) = 0.1_wp +  z2d(:,:)
       vtau_ice(:,:) = 0.1_wp +  z2d(:,:)
