Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/eosbn2.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/eosbn2.F90	(revision 13521)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/eosbn2.F90	(revision 13539)
@@ -234,8 +234,8 @@
       !!----------------------------------------------------------------------
       INTEGER                                 , INTENT(in   ) ::   ktts, ktrd, ktdep
-      REAL(wp), DIMENSION(ST_2DT(ktts) ,jpk,jpts), INTENT(in   ) ::   pts   ! 1 : potential temperature  [Celsius]
+      REAL(wp), DIMENSION(ST_2DT(ktts) ,JPK,JPTS), INTENT(in   ) ::   pts   ! 1 : potential temperature  [Celsius]
       !                                                                  ! 2 : salinity               [psu]
-      REAL(wp), DIMENSION(ST_2DT(ktrd) ,jpk     ), INTENT(  out) ::   prd   ! in situ density            [-]
-      REAL(wp), DIMENSION(ST_2DT(ktdep),jpk     ), INTENT(in   ) ::   pdep  ! depth                      [m]
+      REAL(wp), DIMENSION(ST_2DT(ktrd) ,JPK     ), INTENT(  out) ::   prd   ! in situ density            [-]
+      REAL(wp), DIMENSION(ST_2DT(ktdep),JPK     ), INTENT(in   ) ::   pdep  ! depth                      [m]
       !
       INTEGER  ::   ji, jj, jk                ! dummy loop indices
@@ -334,9 +334,9 @@
       !!----------------------------------------------------------------------
       INTEGER                                  , INTENT(in   ) ::   ktts, ktrd, ktrhop, ktdep
-      REAL(wp), DIMENSION(ST_2DT(ktts)  ,jpk,jpts), INTENT(in   ) ::   pts    ! 1 : potential temperature  [Celsius]
+      REAL(wp), DIMENSION(ST_2DT(ktts)  ,JPK,JPTS), INTENT(in   ) ::   pts    ! 1 : potential temperature  [Celsius]
       !                                                                    ! 2 : salinity               [psu]
-      REAL(wp), DIMENSION(ST_2DT(ktrd)  ,jpk     ), INTENT(  out) ::   prd    ! in situ density            [-]
-      REAL(wp), DIMENSION(ST_2DT(ktrhop),jpk     ), INTENT(  out) ::   prhop  ! potential density (surface referenced)
-      REAL(wp), DIMENSION(ST_2DT(ktdep) ,jpk     ), INTENT(in   ) ::   pdep   ! depth                      [m]
+      REAL(wp), DIMENSION(ST_2DT(ktrd)  ,JPK     ), INTENT(  out) ::   prd    ! in situ density            [-]
+      REAL(wp), DIMENSION(ST_2DT(ktrhop),JPK     ), INTENT(  out) ::   prhop  ! potential density (surface referenced)
+      REAL(wp), DIMENSION(ST_2DT(ktdep) ,JPK     ), INTENT(in   ) ::   pdep   ! depth                      [m]
       !
       INTEGER  ::   ji, jj, jk, jsmp             ! dummy loop indices
@@ -500,5 +500,5 @@
       !!----------------------------------------------------------------------
       INTEGER                            , INTENT(in   ) ::   ktts, ktdep, ktrd
-      REAL(wp), DIMENSION(ST_2DT(ktts),jpts), INTENT(in   ) ::   pts   ! 1 : potential temperature  [Celsius]
+      REAL(wp), DIMENSION(ST_2DT(ktts),JPTS), INTENT(in   ) ::   pts   ! 1 : potential temperature  [Celsius]
       !                                                             ! 2 : salinity               [psu]
       REAL(wp), DIMENSION(ST_2DT(ktdep)    ), INTENT(in   ) ::   pdep  ! depth                      [m]
@@ -598,6 +598,6 @@
       INTEGER                                , INTENT(in   ) ::   Kmm   ! time level index
       INTEGER                                , INTENT(in   ) ::   ktts, ktab
-      REAL(wp), DIMENSION(ST_2DT(ktts),jpk,jpts), INTENT(in   ) ::   pts   ! pot. temperature & salinity
-      REAL(wp), DIMENSION(ST_2DT(ktab),jpk,jpts), INTENT(  out) ::   pab   ! thermal/haline expansion ratio
+      REAL(wp), DIMENSION(ST_2DT(ktts),JPK,JPTS), INTENT(in   ) ::   pts   ! pot. temperature & salinity
+      REAL(wp), DIMENSION(ST_2DT(ktab),JPK,JPTS), INTENT(  out) ::   pab   ! thermal/haline expansion ratio
       !
       INTEGER  ::   ji, jj, jk                ! dummy loop indices
@@ -714,7 +714,7 @@
       INTEGER                            , INTENT(in   ) ::   Kmm   ! time level index
       INTEGER                            , INTENT(in   ) ::   ktts, ktdep, ktab
-      REAL(wp), DIMENSION(ST_2DT(ktts),jpts), INTENT(in   ) ::   pts    ! pot. temperature & salinity
+      REAL(wp), DIMENSION(ST_2DT(ktts),JPTS), INTENT(in   ) ::   pts    ! pot. temperature & salinity
       REAL(wp), DIMENSION(ST_2DT(ktdep)    ), INTENT(in   ) ::   pdep   ! depth                  [m]
-      REAL(wp), DIMENSION(ST_2DT(ktab),jpts), INTENT(  out) ::   pab    ! thermal/haline expansion ratio
+      REAL(wp), DIMENSION(ST_2DT(ktab),JPTS), INTENT(  out) ::   pab    ! thermal/haline expansion ratio
       !
       INTEGER  ::   ji, jj, jk                ! dummy loop indices
@@ -937,6 +937,6 @@
       INTEGER                                , INTENT(in   ) ::  ktab, ktn2
       REAL(wp), DIMENSION(jpi,jpj,  jpk,jpts), INTENT(in   ) ::  pts   ! pot. temperature and salinity   [Celsius,psu]
-      REAL(wp), DIMENSION(ST_2DT(ktab),jpk,jpts), INTENT(in   ) ::  pab   ! thermal/haline expansion coef.  [Celsius-1,psu-1]
-      REAL(wp), DIMENSION(ST_2DT(ktn2),jpk     ), INTENT(  out) ::  pn2   ! Brunt-Vaisala frequency squared [1/s^2]
+      REAL(wp), DIMENSION(ST_2DT(ktab),JPK,JPTS), INTENT(in   ) ::  pab   ! thermal/haline expansion coef.  [Celsius-1,psu-1]
+      REAL(wp), DIMENSION(ST_2DT(ktn2),JPK     ), INTENT(  out) ::  pn2   ! Brunt-Vaisala frequency squared [1/s^2]
       !
       INTEGER  ::   ji, jj, jk      ! dummy loop indices
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traldf_iso.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traldf_iso.F90	(revision 13521)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traldf_iso.F90	(revision 13539)
@@ -123,10 +123,10 @@
       INTEGER                                   , INTENT(in   ) ::   Kmm        ! ocean time level index
       INTEGER                                   , INTENT(in   ) ::   ktah, ktg, ktgi, ktt, ktt2, ktt_rhs
-      REAL(wp), DIMENSION(ST_2DT(ktah)   ,jpk)     , INTENT(in   ) ::   pahu, pahv ! eddy diffusivity at u- and v-points  [m2/s]
-      REAL(wp), DIMENSION(ST_2DT(ktg)        ,kjpt), INTENT(in   ) ::   pgu, pgv   ! tracer gradient at pstep levels
-      REAL(wp), DIMENSION(ST_2DT(ktgi)       ,kjpt), INTENT(in   ) ::   pgui, pgvi ! tracer gradient at top   levels
-      REAL(wp), DIMENSION(ST_2DT(ktt)    ,jpk,kjpt), INTENT(in   ) ::   pt         ! tracer (kpass=1) or laplacian of tracer (kpass=2)
-      REAL(wp), DIMENSION(ST_2DT(ktt2)   ,jpk,kjpt), INTENT(in   ) ::   pt2        ! tracer (only used in kpass=2)
-      REAL(wp), DIMENSION(ST_2DT(ktt_rhs),jpk,kjpt), INTENT(inout) ::   pt_rhs     ! tracer trend
+      REAL(wp), DIMENSION(ST_2DT(ktah)   ,JPK)     , INTENT(in   ) ::   pahu, pahv ! eddy diffusivity at u- and v-points  [m2/s]
+      REAL(wp), DIMENSION(ST_2DT(ktg)        ,KJPT), INTENT(in   ) ::   pgu, pgv   ! tracer gradient at pstep levels
+      REAL(wp), DIMENSION(ST_2DT(ktgi)       ,KJPT), INTENT(in   ) ::   pgui, pgvi ! tracer gradient at top   levels
+      REAL(wp), DIMENSION(ST_2DT(ktt)    ,JPK,KJPT), INTENT(in   ) ::   pt         ! tracer (kpass=1) or laplacian of tracer (kpass=2)
+      REAL(wp), DIMENSION(ST_2DT(ktt2)   ,JPK,KJPT), INTENT(in   ) ::   pt2        ! tracer (only used in kpass=2)
+      REAL(wp), DIMENSION(ST_2DT(ktt_rhs),JPK,KJPT), INTENT(inout) ::   pt_rhs     ! tracer trend
       !
       INTEGER  ::  ji, jj, jk, jn   ! dummy loop indices
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traldf_lap_blp.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traldf_lap_blp.F90	(revision 13521)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traldf_lap_blp.F90	(revision 13539)
@@ -96,9 +96,9 @@
       INTEGER                              , INTENT(in   ) ::   Kmm        ! ocean time level index
       INTEGER                              , INTENT(in   ) ::   ktah, ktg, ktgi, ktt, ktt_rhs
-      REAL(wp), DIMENSION(ST_2DT(ktah),   jpk)     , INTENT(in   ) ::   pahu, pahv ! eddy diffusivity at u- and v-points  [m2/s]
-      REAL(wp), DIMENSION(ST_2DT(ktg),        kjpt), INTENT(in   ) ::   pgu, pgv   ! tracer gradient at pstep levels
-      REAL(wp), DIMENSION(ST_2DT(ktgi),       kjpt), INTENT(in   ) ::   pgui, pgvi ! tracer gradient at top   levels
-      REAL(wp), DIMENSION(ST_2DT(ktt),    jpk,kjpt), INTENT(in   ) ::   pt         ! before tracer fields
-      REAL(wp), DIMENSION(ST_2DT(ktt_rhs),jpk,kjpt), INTENT(inout) ::   pt_rhs     ! tracer trend
+      REAL(wp), DIMENSION(ST_2DT(ktah),   JPK)     , INTENT(in   ) ::   pahu, pahv ! eddy diffusivity at u- and v-points  [m2/s]
+      REAL(wp), DIMENSION(ST_2DT(ktg),        KJPT), INTENT(in   ) ::   pgu, pgv   ! tracer gradient at pstep levels
+      REAL(wp), DIMENSION(ST_2DT(ktgi),       KJPT), INTENT(in   ) ::   pgui, pgvi ! tracer gradient at top   levels
+      REAL(wp), DIMENSION(ST_2DT(ktt),    JPK,KJPT), INTENT(in   ) ::   pt         ! before tracer fields
+      REAL(wp), DIMENSION(ST_2DT(ktt_rhs),JPK,KJPT), INTENT(inout) ::   pt_rhs     ! tracer trend
       !
       INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traldf_triad.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traldf_triad.F90	(revision 13521)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traldf_triad.F90	(revision 13539)
@@ -102,10 +102,10 @@
       INTEGER                              , INTENT(in)    ::   Kmm        ! ocean time level indices
       INTEGER                              , INTENT(in   ) ::   ktah, ktg, ktgi, ktt, ktt2, ktt_rhs
-      REAL(wp), DIMENSION(ST_2DT(ktah),   jpk)     , INTENT(in   ) ::   pahu, pahv ! eddy diffusivity at u- and v-points  [m2/s]
-      REAL(wp), DIMENSION(ST_2DT(ktg),        kjpt), INTENT(in   ) ::   pgu , pgv  ! tracer gradient at pstep levels
-      REAL(wp), DIMENSION(ST_2DT(ktgi),       kjpt), INTENT(in   ) ::   pgui, pgvi ! tracer gradient at top   levels
-      REAL(wp), DIMENSION(ST_2DT(ktt),    jpk,kjpt), INTENT(in   ) ::   pt         ! tracer (kpass=1) or laplacian of tracer (kpass=2)
-      REAL(wp), DIMENSION(ST_2DT(ktt2),   jpk,kjpt), INTENT(in   ) ::   pt2        ! tracer (only used in kpass=2)
-      REAL(wp), DIMENSION(ST_2DT(ktt_rhs),jpk,kjpt), INTENT(inout) ::   pt_rhs     ! tracer trend
+      REAL(wp), DIMENSION(ST_2DT(ktah),   JPK)     , INTENT(in   ) ::   pahu, pahv ! eddy diffusivity at u- and v-points  [m2/s]
+      REAL(wp), DIMENSION(ST_2DT(ktg),        KJPT), INTENT(in   ) ::   pgu , pgv  ! tracer gradient at pstep levels
+      REAL(wp), DIMENSION(ST_2DT(ktgi),       KJPT), INTENT(in   ) ::   pgui, pgvi ! tracer gradient at top   levels
+      REAL(wp), DIMENSION(ST_2DT(ktt),    JPK,KJPT), INTENT(in   ) ::   pt         ! tracer (kpass=1) or laplacian of tracer (kpass=2)
+      REAL(wp), DIMENSION(ST_2DT(ktt2),   JPK,KJPT), INTENT(in   ) ::   pt2        ! tracer (only used in kpass=2)
+      REAL(wp), DIMENSION(ST_2DT(ktt_rhs),JPK,KJPT), INTENT(inout) ::   pt_rhs     ! tracer trend
       !
       INTEGER  ::  ji, jj, jk, jn   ! dummy loop indices
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/zpshde.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/zpshde.F90	(revision 13521)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/zpshde.F90	(revision 13539)
@@ -112,7 +112,7 @@
       INTEGER                                , INTENT(in   )           ::  kjpt        ! number of tracers
       INTEGER                                , INTENT(in   )           ::  ktta, ktgt, ktrd, ktgr
-      REAL(wp), DIMENSION(ST_2DT(ktta),jpk,kjpt), INTENT(in   )           ::  pta         ! 4D tracers fields
-      REAL(wp), DIMENSION(ST_2DT(ktgt)    ,kjpt), INTENT(  out)           ::  pgtu, pgtv  ! hor. grad. of ptra at u- & v-pts
-      REAL(wp), DIMENSION(ST_2DT(ktrd),jpk     ), INTENT(in   ), OPTIONAL ::  prd         ! 3D density anomaly fields
+      REAL(wp), DIMENSION(ST_2DT(ktta),JPK,KJPT), INTENT(in   )           ::  pta         ! 4D tracers fields
+      REAL(wp), DIMENSION(ST_2DT(ktgt)    ,KJPT), INTENT(  out)           ::  pgtu, pgtv  ! hor. grad. of ptra at u- & v-pts
+      REAL(wp), DIMENSION(ST_2DT(ktrd),JPK     ), INTENT(in   ), OPTIONAL ::  prd         ! 3D density anomaly fields
       REAL(wp), DIMENSION(ST_2DT(ktgr)         ), INTENT(  out), OPTIONAL ::  pgru, pgrv  ! hor. grad of prd at u- & v-pts (bottom)
       !
@@ -289,8 +289,8 @@
       INTEGER                                , INTENT(in   )           ::  kjpt         ! number of tracers
       INTEGER                                , INTENT(in   )           ::  ktta, ktgt, ktgti, ktrd, ktgr, ktgri
-      REAL(wp), DIMENSION(ST_2DT(ktta),jpk,kjpt), INTENT(in   )           ::  pta          ! 4D tracers fields
-      REAL(wp), DIMENSION(ST_2DT(ktgt)    ,kjpt), INTENT(  out)           ::  pgtu, pgtv   ! hor. grad. of ptra at u- & v-pts
-      REAL(wp), DIMENSION(ST_2DT(ktgti)   ,kjpt), INTENT(  out)           ::  pgtui, pgtvi ! hor. grad. of stra at u- & v-pts (ISF)
-      REAL(wp), DIMENSION(ST_2DT(ktrd),jpk     ), INTENT(in   ), OPTIONAL ::  prd          ! 3D density anomaly fields
+      REAL(wp), DIMENSION(ST_2DT(ktta),JPK,KJPT), INTENT(in   )           ::  pta          ! 4D tracers fields
+      REAL(wp), DIMENSION(ST_2DT(ktgt)    ,KJPT), INTENT(  out)           ::  pgtu, pgtv   ! hor. grad. of ptra at u- & v-pts
+      REAL(wp), DIMENSION(ST_2DT(ktgti)   ,KJPT), INTENT(  out)           ::  pgtui, pgtvi ! hor. grad. of stra at u- & v-pts (ISF)
+      REAL(wp), DIMENSION(ST_2DT(ktrd),JPK     ), INTENT(in   ), OPTIONAL ::  prd          ! 3D density anomaly fields
       REAL(wp), DIMENSION(ST_2DT(ktgr)         ), INTENT(  out), OPTIONAL ::  pgru, pgrv   ! hor. grad of prd at u- & v-pts (bottom)
       REAL(wp), DIMENSION(ST_2DT(ktgri)        ), INTENT(  out), OPTIONAL ::  pgrui, pgrvi ! hor. grad of prd at u- & v-pts (top)
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/do_loop_substitute.h90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/do_loop_substitute.h90	(revision 13521)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/do_loop_substitute.h90	(revision 13539)
@@ -63,7 +63,10 @@
 #define ST_1Dj(H) ntsj-H:ntej+H
 #define ST_2D(H) ST_1Di(H),ST_1Dj(H)
-#define ST_1DTi(T) (ntsi-nn_hls-1)*T+1:(ntei+nn_hls-jpi)*T+jpi
-#define ST_1DTj(T) (ntsj-nn_hls-1)*T+1:(ntej+nn_hls-jpj)*T+jpj
+#define ST_1DTi(T) (ntsi-nn_hls-1)*T+1:
+#define ST_1DTj(T) (ntsj-nn_hls-1)*T+1:
 #define ST_2DT(T) ST_1DTi(T),ST_1DTj(T)
+#define JPK  :
+#define JPTS  :
+#define KJPT  :
 
 #define DO_3D(B, T, L, R, ks, ke) DO jk = ks, ke   ;   DO_2D(B, T, L, R)
