Index: NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/do_loop_substitute.h90
===================================================================
--- NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/do_loop_substitute.h90	(revision 12760)
+++ NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/do_loop_substitute.h90	(revision 12807)
@@ -50,6 +50,6 @@
 ! includes the possibility of strides for which an extra set of DO_3DS macros are defined.
 !
-! In the following definitions the inner PE domain is defined by start indices of (_nIs_0, nJs_0) and end indices of (nIe_0, nJs_0)
-! The following macros are defined just below: _nIs_0, nJs_0, _nIs_1, nJs_1, _nIe_0, nJs_0, _nIe_1, nJe_1. 
+! In the following definitions the inner PE domain is defined by start indices of (_Nis0, Njs0) and end indices of (Nie0, Njs0)
+! The following macros are defined just below: _Nis0, Njs0, _Nis1, Njs1, _Nie0, Njs0, _Nie1, Nje1. 
 ! These names are chosen to, hopefully, avoid any future, unintended matches elsewhere in the code.
 !
@@ -58,8 +58,8 @@
 ! -0- fortran code : defined in par_oce.F90 the folowwing valiables :
 !!# 
-!!#    INTEGER, PUBLIC ::   nIs_0, nIs_1, nIs_2   !: start I-index (_0: no halo, _1 & _2: 1 & 2-halos)
-!!#    INTEGER, PUBLIC ::   nIe_0, nIe_1, nIe_2   !: end   I-index (_0: no halo, _1 & _2: 1 & 2-halos)
-!!#    INTEGER, PUBLIC ::   nJs_0, nJs_1, nJs_2   !: start J-index (_0: no halo, _1 & _2: 1 & 2-halos)
-!!#    INTEGER, PUBLIC ::   nJe_0, nJe_1, nJe_2   !: end   J-index (_0: no halo, _1 & _2: 1 & 2-halos)
+!!#    INTEGER, PUBLIC ::   Nis0, Nis1, Nis2   !: start I-index (_0: no halo, _1 & _2: 1 & 2-halos)
+!!#    INTEGER, PUBLIC ::   Nie0, Nie1, Nie2   !: end   I-index (_0: no halo, _1 & _2: 1 & 2-halos)
+!!#    INTEGER, PUBLIC ::   Njs0, Njs1, Njs2   !: start J-index (_0: no halo, _1 & _2: 1 & 2-halos)
+!!#    INTEGER, PUBLIC ::   Nje0, Nje1, Nje2   !: end   J-index (_0: no halo, _1 & _2: 1 & 2-halos)
 !!# 
 ! -1- fortran code  put in  mppinit.F90 :   
@@ -76,17 +76,17 @@
 !!#      IF(     nn_hls == 1 ) THEN          !* halo size of 1
 !!#         !
-!!#         nIs_0 =   2     ;   nIs_1 =   1     ;   nIs_2 = nIs_1
-!!#         nJs_0 = nIs_0   ;   nJs_1 = nIs_1   ;   nJs_2 = nIs_1
-!!#         !
-!!#         nIe_0 = jpi-1   ;   nJe_1 = jpi     ;   nIe_2 = nIe_1
-!!#         nJe_0 = jpj-1   ;   nJe_1 = jpj-1   ;   nJe_2 = nIe_1
+!!#         Nis0 =   2     ;   Nis1 =   1     ;   Nis2 = Nis1
+!!#         Njs0 = Nis0    ;   Njs1 = Nis1    ;   Njs2 = Nis1
+!!#         !
+!!#         Nie0 = jpi-1   ;   Nje1 = jpi     ;   Nie2 = Nie1
+!!#         Nje0 = jpj-1   ;   Nje1 = jpj-1   ;   Nje2 = Nie1
 !!#         !
 !!#      ELSEIF( nn_hls == 2 ) THEN          !* halo size of 2
 !!#         !
-!!#         nIs_0 =   3     ;   nIs_1 =   2     ;   nIs_2 =   1
-!!#         nJs_0 = nIs_0   ;   nJs_1 = nIs_1   ;   nJs_2 = nIs_2
-!!#         !
-!!#         nIe_0 = jpi-2   ;   nJe_1 = jpi-1   ;   nIe_2 = jpi
-!!#         nJe_0 = jpj-2   ;   nJe_1 = jpj-1   ;   nJe_2 = jpj
+!!#         Nis0 =   3     ;   Nis1 =   2     ;   Nis2 =   1
+!!#         Njs0 = Nis0    ;   Njs1 = Nis1    ;   Njs2 = Nis2
+!!#         !
+!!#         Nie0 = jpi-2   ;   Nje1 = jpi-1   ;   Nie2 = jpi
+!!#         Nje0 = jpj-2   ;   Nje1 = jpj-1   ;   Nje2 = jpj
 !!#         !
 !!#      ELSE                                !* unexpected halo size
@@ -103,65 +103,65 @@
 ! 2D loops with 1
 
-#define DO_2D_00_00   DO jj = nJs_0, nJe_0   ;   DO ji = nIs_0, nIe_0
-#define DO_2D_00_01   DO jj = nJs_0, nJe_0   ;   DO ji = nIs_0, nIe_1
-#define DO_2D_00_10   DO jj = nJs_0, nJe_0   ;   DO ji = nIs_1, nIe_0
-#define DO_2D_00_11   DO jj = nJs_0, nJe_0   ;   DO ji = nIs_1, nIe_1
- 
-#define DO_2D_01_00   DO jj = nJs_0, nJe_1   ;   DO ji = nIs_0, nIe_0
-#define DO_2D_01_01   DO jj = nJs_0, nJe_1   ;   DO ji = nIs_0, nIe_1
-#define DO_2D_01_10   DO jj = nJs_0, nJe_1   ;   DO ji = nIs_1, nIe_0
-#define DO_2D_01_11   DO jj = nJs_0, nJe_1   ;   DO ji = nIs_1, nIe_1
- 
-#define DO_2D_10_00   DO jj = nJs_1, nJe_0   ;   DO ji = nIs_0, nIe_0
-#define DO_2D_10_01   DO jj = nJs_1, nJe_0   ;   DO ji = nIs_0, nIe_1   ! not used ?
-#define DO_2D_10_10   DO jj = nJs_1, nJe_0   ;   DO ji = nIs_1, nIe_0
-#define DO_2D_10_11   DO jj = nJs_1, nJe_0   ;   DO ji = nIs_1, nIe_1
- 
-#define DO_2D_11_00   DO jj = nJs_1, nJe_1   ;   DO ji = nIs_0, nIe_0
-#define DO_2D_11_01   DO jj = nJs_1, nJe_1   ;   DO ji = nIs_0, nIe_1
-#define DO_2D_11_10   DO jj = nJs_1, nJe_1   ;   DO ji = nIs_1, nIe_0
-#define DO_2D_11_11   DO jj = nJs_1, nJe_1   ;   DO ji = nIs_1, nIe_1
+#define DO_2D_00_00   DO jj = Njs0, Nje0   ;   DO ji = Nis0, Nie0
+#define DO_2D_00_01   DO jj = Njs0, Nje0   ;   DO ji = Nis0, Nie1
+#define DO_2D_00_10   DO jj = Njs0, Nje0   ;   DO ji = Nis1, Nie0
+#define DO_2D_00_11   DO jj = Njs0, Nje0   ;   DO ji = Nis1, Nie1
+ 
+#define DO_2D_01_00   DO jj = Njs0, Nje1   ;   DO ji = Nis0, Nie0
+#define DO_2D_01_01   DO jj = Njs0, Nje1   ;   DO ji = Nis0, Nie1
+#define DO_2D_01_10   DO jj = Njs0, Nje1   ;   DO ji = Nis1, Nie0
+#define DO_2D_01_11   DO jj = Njs0, Nje1   ;   DO ji = Nis1, Nie1
+ 
+#define DO_2D_10_00   DO jj = Njs1, Nje0   ;   DO ji = Nis0, Nie0
+#define DO_2D_10_01   DO jj = Njs1, Nje0   ;   DO ji = Nis0, Nie1   ! not used ?
+#define DO_2D_10_10   DO jj = Njs1, Nje0   ;   DO ji = Nis1, Nie0
+#define DO_2D_10_11   DO jj = Njs1, Nje0   ;   DO ji = Nis1, Nie1
+ 
+#define DO_2D_11_00   DO jj = Njs1, Nje1   ;   DO ji = Nis0, Nie0
+#define DO_2D_11_01   DO jj = Njs1, Nje1   ;   DO ji = Nis0, Nie1
+#define DO_2D_11_10   DO jj = Njs1, Nje1   ;   DO ji = Nis1, Nie0
+#define DO_2D_11_11   DO jj = Njs1, Nje1   ;   DO ji = Nis1, Nie1
 
 ! 2D loops with 1 following a 2/3D loop with 2
 
-#define DO_2D_00_01nxt2   DO jj = nJs_0    , nJe_0       ;   DO ji = nIs_0    , nIe_1nxt2
-#define DO_2D_00_10nxt2   DO jj = nJs_0    , nJe_0       ;   DO ji = nIs_1nxt2, nIe_0
-#define DO_2D_00_11nxt2   DO jj = nJs_0    , nJe_0       ;   DO ji = nIs_1nxt2, nIe_1nxt2
-
-#define DO_2D_01_00nxt2   DO jj = nJs_0    , nJe_1nxt2   ;   DO ji = nIs_0    , nIe_0
-#define DO_2D_01_01nxt2   DO jj = nJs_0    , nJe_1nxt2   ;   DO ji = nIs_0    , nIe_1nxt2
-#define DO_2D_01_10nxt2   DO jj = nJs_0    , nJe_1nxt2   ;   DO ji = nIs_1nxt2, nIe_0
-#define DO_2D_01_11nxt2   DO jj = nJs_0    , nJe_1nxt2   ;   DO ji = nIs_1nxt2, nIe_1nxt2
-
-#define DO_2D_10_00nxt2   DO jj = nJs_1nxt2, nJe_0       ;   DO ji = nIs_0    , nIe_0
-#define DO_2D_10_01nxt2   DO jj = nJs_1nxt2, nJe_0       ;   DO ji = nIs_0    , nIe_1nxt2   ! not used ?
-#define DO_2D_10_10nxt2   DO jj = nJs_1nxt2, nJe_0       ;   DO ji = nIs_1nxt2, nIe_0
-#define DO_2D_10_11nxt2   DO jj = nJs_1nxt2, nJe_0       ;   DO ji = nIs_1nxt2, nIe_1nxt2
-
-#define DO_2D_11_00nxt2   DO jj = nJs_1nxt2, nJe_1nxt2   ;   DO ji = nIs_0    , nIe_0
-#define DO_2D_11_01nxt2   DO jj = nJs_1nxt2, nJe_1nxt2   ;   DO ji = nIs_0    , nIe_1nxt2
-#define DO_2D_11_10nxt2   DO jj = nJs_1nxt2, nJe_1nxt2   ;   DO ji = nIs_1nxt2, nIe_0
-#define DO_2D_11_11nxt2   DO jj = nJs_1nxt2, nJe_1nxt2   ;   DO ji = nIs_1nxt2, nIe_1nxt2
+#define DO_2D_00_01nxt2   DO jj = Njs0    , Nje0       ;   DO ji = Nis0    , Nie1nxt2
+#define DO_2D_00_10nxt2   DO jj = Njs0    , Nje0       ;   DO ji = Nis1nxt2, Nie0
+#define DO_2D_00_11nxt2   DO jj = Njs0    , Nje0       ;   DO ji = Nis1nxt2, Nie1nxt2
+
+#define DO_2D_01_00nxt2   DO jj = Njs0    , Nje1nxt2   ;   DO ji = Nis0    , Nie0
+#define DO_2D_01_01nxt2   DO jj = Njs0    , Nje1nxt2   ;   DO ji = Nis0    , Nie1nxt2
+#define DO_2D_01_10nxt2   DO jj = Njs0    , Nje1nxt2   ;   DO ji = Nis1nxt2, Nie0
+#define DO_2D_01_11nxt2   DO jj = Njs0    , Nje1nxt2   ;   DO ji = Nis1nxt2, Nie1nxt2
+
+#define DO_2D_10_00nxt2   DO jj = Njs1nxt2, Nje0       ;   DO ji = Nis0    , Nie0
+#define DO_2D_10_01nxt2   DO jj = Njs1nxt2, Nje0       ;   DO ji = Nis0    , Nie1nxt2   ! not used ?
+#define DO_2D_10_10nxt2   DO jj = Njs1nxt2, Nje0       ;   DO ji = Nis1nxt2, Nie0
+#define DO_2D_10_11nxt2   DO jj = Njs1nxt2, Nje0       ;   DO ji = Nis1nxt2, Nie1nxt2
+
+#define DO_2D_11_00nxt2   DO jj = Njs1nxt2, Nje1nxt2   ;   DO ji = Nis0    , Nie0
+#define DO_2D_11_01nxt2   DO jj = Njs1nxt2, Nje1nxt2   ;   DO ji = Nis0    , Nie1nxt2
+#define DO_2D_11_10nxt2   DO jj = Njs1nxt2, Nje1nxt2   ;   DO ji = Nis1nxt2, Nie0
+#define DO_2D_11_11nxt2   DO jj = Njs1nxt2, Nje1nxt2   ;   DO ji = Nis1nxt2, Nie1nxt2
 
 ! 2D loops with 2
 
-#define DO_2D_11_12   DO jj = nJs_1nxt2, nJe_1nxt2   ;   DO ji = nIs_1nxt2, nIe_2
-#define DO_2D_11_21   DO jj = nJs_1nxt2, nJe_1nxt2   ;   DO ji = nIs_2    , nIe_1nxt2
-#define DO_2D_11_22   DO jj = nJs_1nxt2, nJe_1nxt2   ;   DO ji = nIs_2    , nIe_2
-
-#define DO_2D_12_11   DO jj = nJs_1nxt2, nJe_2       ;   DO ji = nIs_1nxt2, nIe_1nxt2
-#define DO_2D_12_12   DO jj = nJs_1nxt2, nJe_2       ;   DO ji = nIs_1nxt2, nIe_2
-#define DO_2D_12_21   DO jj = nJs_1nxt2, nJe_2       ;   DO ji = nIs_2    , nIe_1nxt2
-#define DO_2D_12_22   DO jj = nJs_1nxt2, nJe_2       ;   DO ji = nIs_2    , nIe_2
- 
-#define DO_2D_21_11   DO jj = nJs_2    , nJe_1nxt2   ;   DO ji = nIs_1nxt2, nIe_1nxt2
-#define DO_2D_21_12   DO jj = nJs_2    , nJe_1nxt2   ;   DO ji = nIs_1nxt2, nIe_2        ! not used ?
-#define DO_2D_21_21   DO jj = nJs_2    , nJe_1nxt2   ;   DO ji = nIs_2    , nIe_1nxt2
-#define DO_2D_21_22   DO jj = nJs_2    , nJe_1nxt2   ;   DO ji = nIs_2    , nIe_2
+#define DO_2D_11_12   DO jj = Njs1nxt2, Nje1nxt2   ;   DO ji = Nis1nxt2, Nie2
+#define DO_2D_11_21   DO jj = Njs1nxt2, Nje1nxt2   ;   DO ji = Nis2    , Nie1nxt2
+#define DO_2D_11_22   DO jj = Njs1nxt2, Nje1nxt2   ;   DO ji = Nis2    , Nie2
+
+#define DO_2D_12_11   DO jj = Njs1nxt2, Nje2       ;   DO ji = Nis1nxt2, Nie1nxt2
+#define DO_2D_12_12   DO jj = Njs1nxt2, Nje2       ;   DO ji = Nis1nxt2, Nie2
+#define DO_2D_12_21   DO jj = Njs1nxt2, Nje2       ;   DO ji = Nis2    , Nie1nxt2
+#define DO_2D_12_22   DO jj = Njs1nxt2, Nje2       ;   DO ji = Nis2    , Nie2
+ 
+#define DO_2D_21_11   DO jj = Njs2    , Nje1nxt2   ;   DO ji = Nis1nxt2, Nie1nxt2
+#define DO_2D_21_12   DO jj = Njs2    , Nje1nxt2   ;   DO ji = Nis1nxt2, Nie2        ! not used ?
+#define DO_2D_21_21   DO jj = Njs2    , Nje1nxt2   ;   DO ji = Nis2    , Nie1nxt2
+#define DO_2D_21_22   DO jj = Njs2    , Nje1nxt2   ;   DO ji = Nis2    , Nie2
                                      
-#define DO_2D_22_11   DO jj = nJs_2    , nJe_2       ;   DO ji = nIs_1nxt2, nIe_1nxt2
-#define DO_2D_22_12   DO jj = nJs_2    , nJe_2       ;   DO ji = nIs_1nxt2, nIe_2
-#define DO_2D_22_21   DO jj = nJs_2    , nJe_2       ;   DO ji = nIs_2    , nIe_1nxt2
-#define DO_2D_22_22   DO jj = nJs_2    , nJe_2       ;   DO ji = nIs_2    , nIe_2
+#define DO_2D_22_11   DO jj = Njs2    , Nje2       ;   DO ji = Nis1nxt2, Nie1nxt2
+#define DO_2D_22_12   DO jj = Njs2    , Nje2       ;   DO ji = Nis1nxt2, Nie2
+#define DO_2D_22_21   DO jj = Njs2    , Nje2       ;   DO ji = Nis2    , Nie1nxt2
+#define DO_2D_22_22   DO jj = Njs2    , Nje2       ;   DO ji = Nis2    , Nie2
 
 ! 3D loops with 1
