Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5845)
@@ -1268,17 +1268,2 @@
    cn_dir_cdg  = './'  !  root directory for the location of drag coefficient files
 /
-!-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-   ! Suggested lengthscale values are those of Eby & Holloway (1994) for a coarse model
-   ln_neptsimp       = .false.  ! yes/no use simplified neptune
-
-   ln_smooth_neptvel = .false.  ! yes/no smooth zunep, zvnep
-   rn_tslse          =  1.2e4   ! value of lengthscale L at the equator
-   rn_tslsp          =  3.0e3   ! value of lengthscale L at the pole
-   ! Specify whether to ramp down the Neptune velocity in shallow
-   ! water, and if so the depth range controlling such ramping down
-   ln_neptramp       = .true.   ! ramp down Neptune velocity in shallow water
-   rn_htrmin         =  100.0   ! min. depth of transition range
-   rn_htrmax         =  200.0   ! max. depth of transition range
-/
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90	(revision 5845)
@@ -58,5 +58,4 @@
    !! * Substitutions
 #  include "vectopt_loop_substitute.h90"
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/LIM2 4.0 , UCL - NEMO Consortium (2011)
@@ -471,33 +470,33 @@
          sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0
          do jk = 1,jpkm1                     ! adjust initial vertical scale factors
-          fse3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )
-          fse3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )
+          e3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )
+          e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )
          end do
-         fse3t_a(:,:,:) = fse3t_b(:,:,:)
+         e3t_a(:,:,:) = e3t_b(:,:,:)
          ! Reconstruction of all vertical scale factors at now and before time steps
          ! =============================================================================
          ! Horizontal scale factor interpolations
          ! --------------------------------------
-         CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3u_b(:,:,:), 'U' )
-         CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3v_b(:,:,:), 'V' )
-         CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3u_n(:,:,:), 'U' )
-         CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3v_n(:,:,:), 'V' )
-         CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3f_n(:,:,:), 'F' )
+         CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' )
+         CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' )
+         CALL dom_vvl_interpol( e3t_n(:,:,:), e3u_n(:,:,:), 'U' )
+         CALL dom_vvl_interpol( e3t_n(:,:,:), e3v_n(:,:,:), 'V' )
+         CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' )
          ! Vertical scale factor interpolations
          ! ------------------------------------
-         CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3w_n (:,:,:), 'W'  )
-         CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3uw_n(:,:,:), 'UW' )
-         CALL dom_vvl_interpol( fse3v_n(:,:,:), fse3vw_n(:,:,:), 'VW' )
-         CALL dom_vvl_interpol( fse3u_b(:,:,:), fse3uw_b(:,:,:), 'UW' )
-         CALL dom_vvl_interpol( fse3v_b(:,:,:), fse3vw_b(:,:,:), 'VW' )
+         CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W'  )
+         CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' )
+         CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' )
+         CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' )
+         CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' )
          ! t- and w- points depth
          ! ----------------------
-         fsdept_n(:,:,1) = 0.5_wp * fse3w_n(:,:,1)
-         fsdepw_n(:,:,1) = 0.0_wp
-         fsde3w_n(:,:,1) = fsdept_n(:,:,1) - sshn(:,:)
+         gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1)
+         gdepw_n(:,:,1) = 0.0_wp
+         gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:)
          DO jk = 2, jpk
-            fsdept_n(:,:,jk) = fsdept_n(:,:,jk-1) + fse3w_n(:,:,jk)
-            fsdepw_n(:,:,jk) = fsdepw_n(:,:,jk-1) + fse3t_n(:,:,jk-1)
-            fsde3w_n(:,:,jk) = fsdept_n(:,:,jk  ) - sshn   (:,:)
+            gdept_n(:,:,jk) = gdept_n(:,:,jk-1) + e3w_n(:,:,jk)
+            gdepw_n(:,:,jk) = gdepw_n(:,:,jk-1) + e3t_n(:,:,jk-1)
+            gde3w_n(:,:,jk) = gdept_n(:,:,jk  ) - sshn   (:,:)
          END DO
       ENDIF
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90	(revision 5845)
@@ -47,5 +47,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!-------- -------------------------------------------------------------
@@ -233,5 +232,5 @@
             
             !  energy needed to bring ocean surface layer until its freezing
-            qcmif  (ji,jj) =  rau0 * rcp * fse3t_m(ji,jj) * ( tfu(ji,jj) - sst_m(ji,jj) - rt0 ) * ( 1 - zinda )
+            qcmif  (ji,jj) =  rau0 * rcp * e3t_m(ji,jj) * ( tfu(ji,jj) - sst_m(ji,jj) - rt0 ) * ( 1 - zinda )
             
             !  calculate oceanic heat flux.
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90	(revision 5845)
@@ -57,5 +57,4 @@
    !! * Substitutions
 #  include "vectopt_loop_substitute.h90"
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011)
@@ -335,11 +334,13 @@
             sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0
             sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0
+
 #if defined key_vvl            
-           ! key_vvl necessary? clem: yes for compilation purpose
+!!gm key_vvl necessary? clem: yes for compilation purpose
+!!gm I really don't like this staff here...  Find a way to put that elsewhere or differently
             DO jk = 1,jpkm1                     ! adjust initial vertical scale factors
-               fse3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )
-               fse3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )
-            ENDDO
-            fse3t_a(:,:,:) = fse3t_b(:,:,:)
+               e3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )
+               e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )
+            END DO
+            e3t_a(:,:,:) = e3t_b(:,:,:)
             ! Reconstruction of all vertical scale factors at now and before time
             ! steps
@@ -347,25 +348,26 @@
             ! Horizontal scale factor interpolations
             ! --------------------------------------
-            CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3u_b(:,:,:), 'U' )
-            CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3v_b(:,:,:), 'V' )
-            CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3u_n(:,:,:), 'U' )
-            CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3v_n(:,:,:), 'V' )
-            CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3f_n(:,:,:), 'F' )
+            CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' )
+            CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' )
+            CALL dom_vvl_interpol( e3t_n(:,:,:), e3u_n(:,:,:), 'U' )
+            CALL dom_vvl_interpol( e3t_n(:,:,:), e3v_n(:,:,:), 'V' )
+            CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' )
             ! Vertical scale factor interpolations
             ! ------------------------------------
-            CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3w_n (:,:,:), 'W'  )
-            CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3uw_n(:,:,:), 'UW' )
-            CALL dom_vvl_interpol( fse3v_n(:,:,:), fse3vw_n(:,:,:), 'VW' )
-            CALL dom_vvl_interpol( fse3u_b(:,:,:), fse3uw_b(:,:,:), 'UW' )
-            CALL dom_vvl_interpol( fse3v_b(:,:,:), fse3vw_b(:,:,:), 'VW' )
+            CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W'  )
+            CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' )
+            CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' )
+            CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' )
+            CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' )
             ! t- and w- points depth
             ! ----------------------
-            fsdept_n(:,:,1) = 0.5_wp * fse3w_n(:,:,1)
-            fsdepw_n(:,:,1) = 0.0_wp
-            fsde3w_n(:,:,1) = fsdept_n(:,:,1) - sshn(:,:)
+!!gm not sure of that....
+            gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1)
+            gdepw_n(:,:,1) = 0.0_wp
+            gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:)
             DO jk = 2, jpk
-               fsdept_n(:,:,jk) = fsdept_n(:,:,jk-1) + fse3w_n(:,:,jk)
-               fsdepw_n(:,:,jk) = fsdepw_n(:,:,jk-1) + fse3t_n(:,:,jk-1)
-               fsde3w_n(:,:,jk) = fsdept_n(:,:,jk  ) - sshn   (:,:)
+               gdept_n(:,:,jk) = gdept_n(:,:,jk-1) + e3w_n(:,:,jk)
+               gdepw_n(:,:,jk) = gdepw_n(:,:,jk-1) + e3t_n(:,:,jk-1)
+               gde3w_n(:,:,jk) = gdept_n(:,:,jk  ) - sshn   (:,:)
             END DO
 #endif
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90	(revision 5845)
@@ -52,5 +52,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -147,5 +146,5 @@
 
             ! --- Energy needed to bring ocean surface layer until its freezing (<0, J.m-2) --- !
-            zqfr = tmask(ji,jj,1) * rau0 * rcp * fse3t_m(ji,jj) * ( t_bo(ji,jj) - ( sst_m(ji,jj) + rt0 ) )
+            zqfr = tmask(ji,jj,1) * rau0 * rcp * e3t_m(ji,jj) * ( t_bo(ji,jj) - ( sst_m(ji,jj) + rt0 ) )
 
             ! --- Energy from the turbulent oceanic heat flux (W/m2) --- !
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90	(revision 5845)
@@ -46,5 +46,4 @@
 # endif
 
-#  include "domzgr_substitute.h90"  
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -76,7 +75,6 @@
       !!                  ***  ROUTINE Agrif_DYN  ***
       !!----------------------------------------------------------------------  
-      !! 
       INTEGER, INTENT(in) ::   kt
-      !!
+      !
       INTEGER :: ji,jj,jk, j1,j2, i1,i2
       REAL(wp) :: timeref
@@ -137,5 +135,5 @@
          DO jk=1,jpkm1
             DO jj=1,jpj
-               spgu(2,jj)=spgu(2,jj)+fse3u(2,jj,jk)*ua(2,jj,jk)
+               spgu(2,jj)=spgu(2,jj)+e3u_n(2,jj,jk)*ua(2,jj,jk)
             END DO
          END DO
@@ -143,5 +141,5 @@
          DO jj=1,jpj
             IF (umask(2,jj,1).NE.0.) THEN
-               spgu(2,jj)=spgu(2,jj)/hu(2,jj)
+               spgu(2,jj)=spgu(2,jj)*r1_hu_n(2,jj)
             ENDIF
          END DO
@@ -161,5 +159,5 @@
          DO jk=1,jpkm1
             DO jj=1,jpj
-               spgu1(2,jj)=spgu1(2,jj)+fse3u(2,jj,jk)*ua(2,jj,jk)
+               spgu1(2,jj)=spgu1(2,jj)+e3u_n(2,jj,jk)*ua(2,jj,jk)
             END DO
          END DO
@@ -167,5 +165,5 @@
          DO jj=1,jpj
             IF (umask(2,jj,1).NE.0.) THEN
-               spgu1(2,jj)=spgu1(2,jj)/hu(2,jj)
+               spgu1(2,jj)=spgu1(2,jj)*r1_hu_n(2,jj)
             ENDIF
          END DO
@@ -182,9 +180,9 @@
          DO jk=1,jpkm1
             DO jj=1,jpj
-               spgv1(2,jj)=spgv1(2,jj)+fse3v_a(2,jj,jk)*va(2,jj,jk)
+               spgv1(2,jj)=spgv1(2,jj)+e3v_a(2,jj,jk)*va(2,jj,jk)
             END DO
          END DO
          DO jj=1,jpj
-            spgv1(2,jj)=spgv1(2,jj)*hvr_a(2,jj)
+            spgv1(2,jj)=spgv1(2,jj)*r1_hv_a(2,jj)
          END DO
          DO jk=1,jpkm1
@@ -207,10 +205,10 @@
          DO jk=1,jpkm1
             DO jj=1,jpj
-               spgu(nlci-2,jj)=spgu(nlci-2,jj)+fse3u(nlci-2,jj,jk)*ua(nlci-2,jj,jk)
+               spgu(nlci-2,jj)=spgu(nlci-2,jj)+e3u_n(nlci-2,jj,jk)*ua(nlci-2,jj,jk)
             ENDDO
          ENDDO
          DO jj=1,jpj
             IF (umask(nlci-2,jj,1).NE.0.) THEN
-               spgu(nlci-2,jj)=spgu(nlci-2,jj)/hu(nlci-2,jj)
+               spgu(nlci-2,jj)=spgu(nlci-2,jj)*r1_hu_n(nlci-2,jj)
             ENDIF
          END DO
@@ -229,10 +227,10 @@
          DO jk=1,jpkm1
             DO jj=1,jpj
-               spgu1(nlci-2,jj)=spgu1(nlci-2,jj)+fse3u(nlci-2,jj,jk)*ua(nlci-2,jj,jk)*umask(nlci-2,jj,jk)
+               spgu1(nlci-2,jj)=spgu1(nlci-2,jj)+e3u_n(nlci-2,jj,jk)*ua(nlci-2,jj,jk)*umask(nlci-2,jj,jk)
             END DO
          END DO
          DO jj=1,jpj
             IF (umask(nlci-2,jj,1).NE.0.) THEN
-               spgu1(nlci-2,jj)=spgu1(nlci-2,jj)/hu(nlci-2,jj)
+               spgu1(nlci-2,jj)=spgu1(nlci-2,jj)*r1_hu_n(nlci-2,jj)
             ENDIF
          END DO
@@ -248,10 +246,10 @@
          DO jk=1,jpkm1
             DO jj=1,jpj
-               spgv1(nlci-1,jj)=spgv1(nlci-1,jj)+fse3v_a(nlci-1,jj,jk)*va(nlci-1,jj,jk)*vmask(nlci-1,jj,jk)
+               spgv1(nlci-1,jj)=spgv1(nlci-1,jj)+e3v_a(nlci-1,jj,jk)*va(nlci-1,jj,jk)*vmask(nlci-1,jj,jk)
             END DO
          END DO
 
          DO jj=1,jpj
-            spgv1(nlci-1,jj)=spgv1(nlci-1,jj)*hvr_a(nlci-1,jj)
+            spgv1(nlci-1,jj)=spgv1(nlci-1,jj)*r1_hv_a(nlci-1,jj)
          END DO
 
@@ -278,5 +276,5 @@
          DO jk=1,jpkm1
             DO ji=1,jpi
-               spgv(ji,2)=spgv(ji,2)+fse3v(ji,2,jk)*va(ji,2,jk)
+               spgv(ji,2)=spgv(ji,2)+e3v_n(ji,2,jk)*va(ji,2,jk)
             END DO
          END DO
@@ -284,5 +282,5 @@
          DO ji=1,jpi
             IF (vmask(ji,2,1).NE.0.) THEN
-               spgv(ji,2)=spgv(ji,2)/hv(ji,2)
+               spgv(ji,2)=spgv(ji,2)* r1_hv_n(ji,2)
             ENDIF
          END DO
@@ -302,5 +300,5 @@
          DO jk=1,jpkm1
             DO ji=1,jpi
-               spgv1(ji,2)=spgv1(ji,2)+fse3v(ji,2,jk)*va(ji,2,jk)*vmask(ji,2,jk)
+               spgv1(ji,2)=spgv1(ji,2)+e3v_n(ji,2,jk)*va(ji,2,jk)*vmask(ji,2,jk)
             END DO
          END DO
@@ -308,5 +306,5 @@
          DO ji=1,jpi
             IF (vmask(ji,2,1).NE.0.) THEN
-               spgv1(ji,2)=spgv1(ji,2)/hv(ji,2)
+               spgv1(ji,2)=spgv1(ji,2)*r1_hv_n(ji,2)
             ENDIF
          END DO
@@ -323,10 +321,10 @@
          DO jk=1,jpkm1
             DO ji=1,jpi
-               spgu1(ji,2)=spgu1(ji,2)+fse3u_a(ji,2,jk)*ua(ji,2,jk)*umask(ji,2,jk)
+               spgu1(ji,2)=spgu1(ji,2)+e3u_a(ji,2,jk)*ua(ji,2,jk)*umask(ji,2,jk)
             END DO
          END DO
 
          DO ji=1,jpi
-            spgu1(ji,2)=spgu1(ji,2)*hur_a(ji,2)
+            spgu1(ji,2)=spgu1(ji,2)*r1_hu_a(ji,2)
          END DO
 
@@ -353,5 +351,5 @@
          DO jk=1,jpkm1
             DO ji=1,jpi
-               spgv(ji,nlcj-2)=spgv(ji,nlcj-2)+fse3v(ji,nlcj-2,jk)*va(ji,nlcj-2,jk)
+               spgv(ji,nlcj-2)=spgv(ji,nlcj-2)+e3v_n(ji,nlcj-2,jk)*va(ji,nlcj-2,jk)
             END DO
          END DO
@@ -359,5 +357,5 @@
          DO ji=1,jpi
             IF (vmask(ji,nlcj-2,1).NE.0.) THEN
-               spgv(ji,nlcj-2)=spgv(ji,nlcj-2)/hv(ji,nlcj-2)
+               spgv(ji,nlcj-2)=spgv(ji,nlcj-2)*r1_hv_n(ji,nlcj-2)
             ENDIF
          END DO
@@ -378,5 +376,5 @@
          DO jk=1,jpkm1
             DO ji=1,jpi
-               spgv1(ji,nlcj-2)=spgv1(ji,nlcj-2)+fse3v(ji,nlcj-2,jk)*va(ji,nlcj-2,jk)
+               spgv1(ji,nlcj-2)=spgv1(ji,nlcj-2)+e3v_n(ji,nlcj-2,jk)*va(ji,nlcj-2,jk)
             END DO
          END DO
@@ -384,5 +382,5 @@
          DO ji=1,jpi
             IF (vmask(ji,nlcj-2,1).NE.0.) THEN
-               spgv1(ji,nlcj-2)=spgv1(ji,nlcj-2)/hv(ji,nlcj-2)
+               spgv1(ji,nlcj-2)=spgv1(ji,nlcj-2)*r1_hv_n(ji,nlcj-2)
             ENDIF
          END DO
@@ -399,10 +397,10 @@
          DO jk=1,jpkm1
             DO ji=1,jpi
-               spgu1(ji,nlcj-1)=spgu1(ji,nlcj-1)+fse3u_a(ji,nlcj-1,jk)*ua(ji,nlcj-1,jk)
+               spgu1(ji,nlcj-1)=spgu1(ji,nlcj-1)+e3u_a(ji,nlcj-1,jk)*ua(ji,nlcj-1,jk)
             END DO
          END DO
 
          DO ji=1,jpi
-            spgu1(ji,nlcj-1)=spgu1(ji,nlcj-1)*hur_a(ji,nlcj-1)
+            spgu1(ji,nlcj-1)=spgu1(ji,nlcj-1)*r1_hu_a(ji,nlcj-1)
          END DO
 
@@ -812,5 +810,5 @@
                DO ji=i1,i2
                   ptab(ji,jj,jk) = e2u(ji,jj) * un(ji,jj,jk)
-                  ptab(ji,jj,jk) = ptab(ji,jj,jk) * fse3u(ji,jj,jk)
+                  ptab(ji,jj,jk) = ptab(ji,jj,jk) * e3u_n(ji,jj,jk)
                END DO
             END DO
@@ -821,5 +819,5 @@
             DO jj=j1,j2
                ua(i1:i2,jj,jk) = (ptab(i1:i2,jj,jk)/(zrhoy*e2u(i1:i2,jj)))
-               ua(i1:i2,jj,jk) = ua(i1:i2,jj,jk) / fse3u(i1:i2,jj,jk)
+               ua(i1:i2,jj,jk) = ua(i1:i2,jj,jk) / e3u_n(i1:i2,jj,jk)
             END DO
          END DO
@@ -880,5 +878,5 @@
                DO ji=i1,i2
                   ptab(ji,jj,jk) = e1v(ji,jj) * vn(ji,jj,jk)
-                  ptab(ji,jj,jk) = ptab(ji,jj,jk) * fse3v(ji,jj,jk)
+                  ptab(ji,jj,jk) = ptab(ji,jj,jk) * e3v_n(ji,jj,jk)
                END DO
             END DO
@@ -889,5 +887,5 @@
             DO jj=j1,j2
                va(i1:i2,jj,jk) = (ptab(i1:i2,jj,jk)/(zrhox*e1v(i1:i2,jj)))
-               va(i1:i2,jj,jk) = va(i1:i2,jj,jk) / fse3v(i1:i2,jj,jk)
+               va(i1:i2,jj,jk) = va(i1:i2,jj,jk) / e3v_n(i1:i2,jj,jk)
             END DO
          END DO
@@ -944,5 +942,5 @@
          DO jj=j1,j2
             DO ji=i1,i2
-               ptab(ji,jj) = un_b(ji,jj) * e2u(ji,jj) * hu(ji,jj) 
+               ptab(ji,jj) = un_b(ji,jj) * e2u(ji,jj) * hu_n(ji,jj) 
             END DO
          END DO
@@ -1021,5 +1019,5 @@
          DO jj=j1,j2
             DO ji=i1,i2
-               ptab(ji,jj) = vn_b(ji,jj) * e1v(ji,jj) * hv(ji,jj) 
+               ptab(ji,jj) = vn_b(ji,jj) * e1v(ji,jj) * hv_n(ji,jj) 
             END DO
          END DO
@@ -1209,5 +1207,5 @@
                         WRITE(numout,*) 'ERROR bathymetry merge at the northen border ji,jj,jk', ji+nimpp-1,jj+njmpp-1,jk
                      ENDIF
-                     WRITE(numout,*) '      ptab(ji,jj,jk), fse3t(ji,jj,jk) ', ptab(ji,jj,jk), e3t_0(ji,jj,jk)
+                     WRITE(numout,*) '      ptab(ji,jj,jk), e3t(ji,jj,jk) ', ptab(ji,jj,jk), e3t_0(ji,jj,jk)
                      kindic_agr = kindic_agr + 1
                   ENDIF
@@ -1219,4 +1217,5 @@
       ! 
    END SUBROUTINE interpe3t
+
 
    SUBROUTINE interpumsk(ptab,i1,i2,j1,j2,k1,k2,before,nb,ndir)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_opa_sponge.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_opa_sponge.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_opa_sponge.F90	(revision 5845)
@@ -17,6 +17,4 @@
    PUBLIC interptsn_sponge, interpun_sponge, interpvn_sponge
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/NST 3.3 , NEMO Consortium (2010)
@@ -210,6 +208,6 @@
                DO jj = j1,j2-1
                   DO ji = i1,i2-1
-                     zabe1 = fsaht_spu(ji,jj) * umask(ji,jj,jk) * e2_e1u(ji,jj) * fse3u_n(ji,jj,jk)
-                     zabe2 = fsaht_spv(ji,jj) * vmask(ji,jj,jk) * e1_e2v(ji,jj) * fse3v_n(ji,jj,jk)
+                     zabe1 = fsaht_spu(ji,jj) * umask(ji,jj,jk) * e2_e1u(ji,jj) * e3u_n(ji,jj,jk)
+                     zabe2 = fsaht_spv(ji,jj) * vmask(ji,jj,jk) * e1_e2v(ji,jj) * e3v_n(ji,jj,jk)
                      ztu(ji,jj,jk) = zabe1 * ( tsbdiff(ji+1,jj  ,jk,jn) - tsbdiff(ji,jj,jk,jn) ) 
                      ztv(ji,jj,jk) = zabe2 * ( tsbdiff(ji  ,jj+1,jk,jn) - tsbdiff(ji,jj,jk,jn) )
@@ -239,5 +237,5 @@
 
                      IF (.NOT. tabspongedone_tsn(ji,jj)) THEN 
-                        zbtr = r1_e1e2t(ji,jj) / fse3t_n(ji,jj,jk)
+                        zbtr = r1_e1e2t(ji,jj) / e3t_n(ji,jj,jk)
                         ! horizontal diffusive trends
                         ztsa = zbtr * (  ztu(ji,jj,jk) - ztu(ji-1,jj,jk) + ztv(ji,jj,jk) - ztv(ji  ,jj-1,jk)  )
@@ -290,7 +288,7 @@
             DO jj = j1,j2
                DO ji = i1+1,i2   ! vector opt.
-                  zbtr = r1_e1e2t(ji,jj) / fse3t_n(ji,jj,jk) * fsahm_spt(ji,jj)
-                  hdivdiff(ji,jj,jk) = (  e2u(ji  ,jj)*fse3u_n(ji  ,jj,jk) * ubdiff(ji  ,jj,jk) &
-                                     &   -e2u(ji-1,jj)*fse3u_n(ji-1,jj,jk) * ubdiff(ji-1,jj,jk) ) * zbtr
+                  zbtr = r1_e1e2t(ji,jj) / e3t_n(ji,jj,jk) * fsahm_spt(ji,jj)
+                  hdivdiff(ji,jj,jk) = (  e2u(ji  ,jj)*e3u_n(ji  ,jj,jk) * ubdiff(ji  ,jj,jk) &
+                                     &   -e2u(ji-1,jj)*e3u_n(ji-1,jj,jk) * ubdiff(ji-1,jj,jk) ) * zbtr
                END DO
             END DO
@@ -298,5 +296,5 @@
             DO jj = j1,j2-1
                DO ji = i1,i2   ! vector opt.
-                  zbtr = r1_e1e2f(ji,jj) * fse3f_n(ji,jj,jk) * fsahm_spf(ji,jj)
+                  zbtr = r1_e1e2f(ji,jj) * e3f_n(ji,jj,jk) * fsahm_spf(ji,jj)
                   rotdiff(ji,jj,jk) = (-e1u(ji,jj+1) * ubdiff(ji,jj+1,jk) &
                                        +e1u(ji,jj  ) * ubdiff(ji,jj  ,jk) & 
@@ -318,5 +316,5 @@
                      ze1v = hdivdiff(ji,jj,jk)
                      ! horizontal diffusive trends
-                     zua = - ( ze2u - rotdiff (ji,jj-1,jk)) / ( e2u(ji,jj) * fse3u_n(ji,jj,jk) )   &
+                     zua = - ( ze2u - rotdiff (ji,jj-1,jk)) / ( e2u(ji,jj) * e3u_n(ji,jj,jk) )   &
                            + ( hdivdiff(ji+1,jj,jk) - ze1v  ) / e1u(ji,jj)
 
@@ -344,5 +342,5 @@
 
                      ! horizontal diffusive trends
-                     zva = + ( ze2u - rotdiff (ji-1,jj,jk)) / ( e1v(ji,jj) * fse3v_n(ji,jj,jk) )   &
+                     zva = + ( ze2u - rotdiff (ji-1,jj,jk)) / ( e1v(ji,jj) * e3v_n(ji,jj,jk) )   &
                            + ( hdivdiff(ji,jj+1,jk) - ze1v  ) / e2v(ji,jj)
 
@@ -396,12 +394,12 @@
             DO jj = j1+1,j2
                DO ji = i1,i2   ! vector opt.
-                  zbtr = r1_e1e2t(ji,jj) / fse3t_n(ji,jj,jk) * fsahm_spt(ji,jj)
-                  hdivdiff(ji,jj,jk) = ( e1v(ji,jj  ) * fse3v(ji,jj  ,jk) * vbdiff(ji,jj  ,jk)  &
-                                     &  -e1v(ji,jj-1) * fse3v(ji,jj-1,jk) * vbdiff(ji,jj-1,jk)  ) * zbtr
+                  zbtr = r1_e1e2t(ji,jj) / e3t_n(ji,jj,jk) * fsahm_spt(ji,jj)
+                  hdivdiff(ji,jj,jk) = ( e1v(ji,jj  ) * e3v_n(ji,jj  ,jk) * vbdiff(ji,jj  ,jk)  &
+                                     &  -e1v(ji,jj-1) * e3v_n(ji,jj-1,jk) * vbdiff(ji,jj-1,jk)  ) * zbtr
                END DO
             END DO
             DO jj = j1,j2
                DO ji = i1,i2-1   ! vector opt.
-                  zbtr = r1_e1e2f(ji,jj) * fse3f_n(ji,jj,jk) * fsahm_spf(ji,jj)
+                  zbtr = r1_e1e2f(ji,jj) * e3f_n(ji,jj,jk) * fsahm_spf(ji,jj)
                   rotdiff(ji,jj,jk) = ( e2v(ji+1,jj) * vbdiff(ji+1,jj,jk) & 
                                     &  -e2v(ji  ,jj) * vbdiff(ji  ,jj,jk) &
@@ -424,5 +422,5 @@
                      ze1v = hdivdiff(ji,jj,jk)
                      ! horizontal diffusive trends
-                     zua = - ( ze2u - rotdiff (ji,jj-1,jk)) / ( e2u(ji,jj) * fse3u_n(ji,jj,jk) ) + ( hdivdiff(ji+1,jj,jk) - ze1v) &
+                     zua = - ( ze2u - rotdiff (ji,jj-1,jk)) / ( e2u(ji,jj) * e3u_n(ji,jj,jk) ) + ( hdivdiff(ji+1,jj,jk) - ze1v) &
                            / e1u(ji,jj)
 
@@ -446,5 +444,5 @@
                      ! horizontal diffusive trends
 
-                     zva = + ( ze2u - rotdiff (ji-1,jj,jk)) / ( e1v(ji,jj) * fse3v_n(ji,jj,jk) ) + ( hdivdiff(ji,jj+1,jk) - ze1v) &
+                     zva = + ( ze2u - rotdiff (ji-1,jj,jk)) / ( e1v(ji,jj) * e3v_n(ji,jj,jk) ) + ( hdivdiff(ji,jj+1,jk) - ze1v) &
                            / e2v(ji,jj)
 
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90	(revision 5845)
@@ -26,5 +26,4 @@
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -67,4 +66,5 @@
       !
    END SUBROUTINE Agrif_Update_Tra
+
 
    RECURSIVE SUBROUTINE Agrif_Update_Dyn( )
@@ -153,4 +153,5 @@
 
 # if defined key_zdftke
+
    SUBROUTINE Agrif_Update_Tke( kt )
       !!---------------------------------------------
@@ -175,4 +176,5 @@
       
    END SUBROUTINE Agrif_Update_Tke
+   
 # endif /* key_zdftke */
 
@@ -181,5 +183,4 @@
       !!           *** ROUTINE updateT ***
       !!---------------------------------------------
-#  include "domzgr_substitute.h90"
       INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2,n1,n2
       REAL(wp),DIMENSION(i1:i2,j1:j2,k1:k2,n1:n2), INTENT(inout) :: tabres
@@ -231,10 +232,9 @@
    END SUBROUTINE updateTS
 
+
    SUBROUTINE updateu( tabres, i1, i2, j1, j2, k1, k2, before )
       !!---------------------------------------------
       !!           *** ROUTINE updateu ***
       !!---------------------------------------------
-#  include "domzgr_substitute.h90"
-      !!
       INTEGER, INTENT(in) :: i1, i2, j1, j2, k1, k2
       REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2), INTENT(inout) :: tabres
@@ -250,6 +250,5 @@
             DO jj=j1,j2
                DO ji=i1,i2
-                  tabres(ji,jj,jk) = e2u(ji,jj) * un(ji,jj,jk)
-                  tabres(ji,jj,jk) = tabres(ji,jj,jk) * fse3u_n(ji,jj,jk)
+                  tabres(ji,jj,jk) = e2u(ji,jj) * e3u_n(ji,jj,jk) * un(ji,jj,jk)
                END DO
             END DO
@@ -260,5 +259,5 @@
             DO jj=j1,j2
                DO ji=i1,i2
-                  tabres(ji,jj,jk) = tabres(ji,jj,jk) / e2u(ji,jj) / fse3u_n(ji,jj,jk)
+                  tabres(ji,jj,jk) = tabres(ji,jj,jk) / ( e2u(ji,jj) * e3u_n(ji,jj,jk) )
                   !
                   IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part
@@ -275,10 +274,9 @@
    END SUBROUTINE updateu
 
+
    SUBROUTINE updatev( tabres, i1, i2, j1, j2, k1, k2, before )
       !!---------------------------------------------
       !!           *** ROUTINE updatev ***
       !!---------------------------------------------
-#  include "domzgr_substitute.h90"
-      !!
       INTEGER :: i1,i2,j1,j2,k1,k2
       INTEGER :: ji,jj,jk
@@ -294,6 +292,5 @@
             DO jj=j1,j2
                DO ji=i1,i2
-                  tabres(ji,jj,jk) = e1v(ji,jj) * vn(ji,jj,jk)
-                  tabres(ji,jj,jk) = tabres(ji,jj,jk) * fse3v_n(ji,jj,jk)
+                  tabres(ji,jj,jk) = e1v(ji,jj) * e3v_n(ji,jj,jk) * vn(ji,jj,jk)
                END DO
             END DO
@@ -304,5 +301,5 @@
             DO jj=j1,j2
                DO ji=i1,i2
-                  tabres(ji,jj,jk) = tabres(ji,jj,jk) / e1v(ji,jj) / fse3v_n(ji,jj,jk)
+                  tabres(ji,jj,jk) = tabres(ji,jj,jk) / ( e1v(ji,jj) * e3v_n(ji,jj,jk) )
                   !
                   IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part
@@ -319,10 +316,9 @@
    END SUBROUTINE updatev
 
+
    SUBROUTINE updateu2d( tabres, i1, i2, j1, j2, before )
       !!---------------------------------------------
       !!          *** ROUTINE updateu2d ***
       !!---------------------------------------------
-#  include "domzgr_substitute.h90"
-      !!
       INTEGER, INTENT(in) :: i1, i2, j1, j2
       REAL(wp), DIMENSION(i1:i2,j1:j2), INTENT(inout) :: tabres
@@ -338,5 +334,5 @@
          DO jj=j1,j2
             DO ji=i1,i2
-               tabres(ji,jj) = un_b(ji,jj) * hu(ji,jj) * e2u(ji,jj)
+               tabres(ji,jj) = un_b(ji,jj) * hu_n(ji,jj) * e2u(ji,jj)
             END DO
          END DO
@@ -345,12 +341,12 @@
          DO jj=j1,j2
             DO ji=i1,i2
-               tabres(ji,jj) =  tabres(ji,jj) * hur(ji,jj) / e2u(ji,jj)  
+               tabres(ji,jj) =  tabres(ji,jj) * r1_hu_n(ji,jj) * r1_e2u(ji,jj)  
                !    
                ! Update "now" 3d velocities:
                spgu(ji,jj) = 0.e0
                DO jk=1,jpkm1
-                  spgu(ji,jj) = spgu(ji,jj) + fse3u_n(ji,jj,jk) * un(ji,jj,jk)
-               END DO
-               spgu(ji,jj) = spgu(ji,jj) * hur(ji,jj)
+                  spgu(ji,jj) = spgu(ji,jj) + e3u_n(ji,jj,jk) * un(ji,jj,jk)
+               END DO
+               spgu(ji,jj) = spgu(ji,jj) * r1_hu_n(ji,jj)
                !
                zcorr = tabres(ji,jj) - spgu(ji,jj)
@@ -371,7 +367,7 @@
                spgu(ji,jj) = 0.e0
                DO jk=1,jpkm1
-                  spgu(ji,jj) = spgu(ji,jj) + fse3u_b(ji,jj,jk) * ub(ji,jj,jk)
-               END DO
-               spgu(ji,jj) = spgu(ji,jj) * hur_b(ji,jj)
+                  spgu(ji,jj) = spgu(ji,jj) + e3u_b(ji,jj,jk) * ub(ji,jj,jk)
+               END DO
+               spgu(ji,jj) = spgu(ji,jj) * r1_hu_b(ji,jj)
                !
                zcorr = ub_b(ji,jj) - spgu(ji,jj)
@@ -385,4 +381,5 @@
       !
    END SUBROUTINE updateu2d
+
 
    SUBROUTINE updatev2d( tabres, i1, i2, j1, j2, before )
@@ -403,5 +400,5 @@
          DO jj=j1,j2
             DO ji=i1,i2
-               tabres(ji,jj) = vn_b(ji,jj) * hv(ji,jj) * e1v(ji,jj) 
+               tabres(ji,jj) = vn_b(ji,jj) * hv_n(ji,jj) * e1v(ji,jj) 
             END DO
          END DO
@@ -410,12 +407,12 @@
          DO jj=j1,j2
             DO ji=i1,i2
-               tabres(ji,jj) =  tabres(ji,jj) * hvr(ji,jj) / e1v(ji,jj)  
+               tabres(ji,jj) =  tabres(ji,jj) * r1_hv_n(ji,jj) * r1_e1v(ji,jj)  
                !    
                ! Update "now" 3d velocities:
                spgv(ji,jj) = 0.e0
                DO jk=1,jpkm1
-                  spgv(ji,jj) = spgv(ji,jj) + fse3v_n(ji,jj,jk) * vn(ji,jj,jk)
-               END DO
-               spgv(ji,jj) = spgv(ji,jj) * hvr(ji,jj)
+                  spgv(ji,jj) = spgv(ji,jj) + e3v_n(ji,jj,jk) * vn(ji,jj,jk)
+               END DO
+               spgv(ji,jj) = spgv(ji,jj) * r1_hv_n(ji,jj)
                !
                zcorr = tabres(ji,jj) - spgv(ji,jj)
@@ -436,7 +433,7 @@
                spgv(ji,jj) = 0.e0
                DO jk=1,jpkm1
-                  spgv(ji,jj) = spgv(ji,jj) + fse3v_b(ji,jj,jk) * vb(ji,jj,jk)
-               END DO
-               spgv(ji,jj) = spgv(ji,jj) * hvr_b(ji,jj)
+                  spgv(ji,jj) = spgv(ji,jj) + e3v_b(ji,jj,jk) * vb(ji,jj,jk)
+               END DO
+               spgv(ji,jj) = spgv(ji,jj) * r1_hv_b(ji,jj)
                !
                zcorr = vb_b(ji,jj) - spgv(ji,jj)
@@ -489,4 +486,5 @@
    END SUBROUTINE updateSSH
 
+
    SUBROUTINE updateub2b( tabres, i1, i2, j1, j2, before )
       !!---------------------------------------------
@@ -519,4 +517,5 @@
    END SUBROUTINE updateub2b
 
+
    SUBROUTINE updatevb2b( tabres, i1, i2, j1, j2, before )
       !!---------------------------------------------
@@ -555,12 +554,11 @@
       !!           *** ROUTINE updateT ***
       !!---------------------------------------------
-#  include "domzgr_substitute.h90"
-
       INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2,n1,n2
       REAL(wp),DIMENSION(i1:i2,j1:j2,k1:k2,n1:n2), INTENT(inout) :: tabres
       LOGICAL, iNTENT(in) :: before
-
+      !
       INTEGER :: ji,jj,jk
       REAL(wp) :: ztemp
+      !!---------------------------------------------
 
       IF (before) THEN
@@ -600,4 +598,5 @@
 
 # if defined key_zdftke
+
    SUBROUTINE updateEN( ptab, i1, i2, j1, j2, k1, k2, before )
       !!---------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_top_interp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_top_interp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_top_interp.F90	(revision 5845)
@@ -17,5 +17,4 @@
    PUBLIC Agrif_trc, interptrn
 
-#  include "domzgr_substitute.h90"  
 #  include "vectopt_loop_substitute.h90"
   !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_top_sponge.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_top_sponge.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_top_sponge.F90	(revision 5845)
@@ -19,6 +19,4 @@
    PUBLIC Agrif_Sponge_trc, interptrn_sponge
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/NST 3.6 , NEMO Consortium (2010)
@@ -74,6 +72,6 @@
                DO jj = j1,j2-1
                   DO ji = i1,i2-1
-                     zabe1 = fsaht_spu(ji,jj) * umask(ji,jj,jk) * e2_e1u(ji,jj) * fse3u_n(ji,jj,jk)
-                     zabe2 = fsaht_spv(ji,jj) * vmask(ji,jj,jk) * e1_e2v(ji,jj) * fse3v_n(ji,jj,jk)
+                     zabe1 = fsaht_spu(ji,jj) * umask(ji,jj,jk) * e2_e1u(ji,jj) * e3u_n(ji,jj,jk)
+                     zabe2 = fsaht_spv(ji,jj) * vmask(ji,jj,jk) * e1_e2v(ji,jj) * e3v_n(ji,jj,jk)
                      ztu(ji,jj) = zabe1 * ( trbdiff(ji+1,jj  ,jk,jn) - trbdiff(ji,jj,jk,jn) )
                      ztv(ji,jj) = zabe2 * ( trbdiff(ji  ,jj+1,jk,jn) - trbdiff(ji,jj,jk,jn) )
@@ -85,5 +83,5 @@
 
                      IF (.NOT. tabspongedone_trn(ji,jj)) THEN 
-                        zbtr = r1_e1e2t(ji,jj) / fse3t(ji,jj,jk)
+                        zbtr = r1_e1e2t(ji,jj) / e3t(ji,jj,jk)
                         ! horizontal diffusive trends
                         ztra = zbtr * (  ztu(ji,jj) - ztu(ji-1,jj  ) + ztv(ji,jj) - ztv(ji  ,jj-1)  )
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_top_update.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_top_update.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/NST_SRC/agrif_top_update.F90	(revision 5845)
@@ -64,5 +64,4 @@
       !!           *** ROUTINE updateT ***
       !!---------------------------------------------
-#  include "domzgr_substitute.h90"
       INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2,n1,n2
       REAL(wp),DIMENSION(i1:i2,j1:j2,k1:k2,n1:n2), INTENT(inout) :: ptab
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OFF_SRC/domrea.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OFF_SRC/domrea.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OFF_SRC/domrea.F90	(revision 5845)
@@ -34,5 +34,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -76,4 +75,5 @@
       r1_e1f(:,:) = 1._wp / e1f(:,:)   ;   r1_e2f (:,:) = 1._wp / e2f(:,:)
       !
+!!gm BUG if scale factor reduction !!!!
       e1e2t (:,:) = e1t(:,:) * e2t(:,:)   ;   r1_e1e2t(:,:) = 1._wp / e1e2t(:,:)
       e1e2u (:,:) = e1u(:,:) * e2u(:,:)   ;   r1_e1e2u(:,:) = 1._wp / e1e2u(:,:)
@@ -84,13 +84,13 @@
       e1_e2v(:,:) = e1v(:,:) / e2v(:,:)
       !
-      hu(:,:) = 0._wp                        ! Ocean depth at U- and V-points
-      hv(:,:) = 0._wp
-      DO jk = 1, jpk
-         hu(:,:) = hu(:,:) + fse3u_n(:,:,jk) * umask(:,:,jk)
-         hv(:,:) = hv(:,:) + fse3v_n(:,:,jk) * vmask(:,:,jk)
+      hu_n(:,:) = e3u_n(:,:,1) * umask(:,:,1)     ! Ocean depth at U- and V-points
+      hv_n(:,:) = e3v_n(:,:,1) * vmask(:,:,1)
+      DO jk = 2, jpk
+         hu_n(:,:) = hu_n(:,:) + e3u_n(:,:,jk) * umask(:,:,jk)
+         hv_n(:,:) = hv_n(:,:) + e3v_n(:,:,jk) * vmask(:,:,jk)
       END DO
       !                                        ! Inverse of the local depth
-      hur(:,:) = 1._wp / ( hu(:,:) + 1._wp - umask(:,:,1) ) * umask(:,:,1)
-      hvr(:,:) = 1._wp / ( hv(:,:) + 1._wp - vmask(:,:,1) ) * vmask(:,:,1)
+      r1_hu_n(:,:) = 1._wp / ( hu_n(:,:) + 1._wp - umask(:,:,1) ) * umask(:,:,1)
+      r1_hv_n(:,:) = 1._wp / ( hv_n(:,:) + 1._wp - vmask(:,:,1) ) * vmask(:,:,1)
       !
       CALL dom_stp      ! Time step
@@ -554,8 +554,8 @@
             CALL iom_get( inum4, jpdom_unknown, 'esigw', esigw )
 
-            CALL iom_get( inum4, jpdom_data, 'e3t_0', fse3t_n(:,:,:) ) ! scale factors
-            CALL iom_get( inum4, jpdom_data, 'e3u_0', fse3u_n(:,:,:) )
-            CALL iom_get( inum4, jpdom_data, 'e3v_0', fse3v_n(:,:,:) )
-            CALL iom_get( inum4, jpdom_data, 'e3w_0', fse3w_n(:,:,:) )
+            CALL iom_get( inum4, jpdom_data, 'e3t_0', e3t_n(:,:,:) ) ! scale factors
+            CALL iom_get( inum4, jpdom_data, 'e3u_0', e3u_n(:,:,:) )
+            CALL iom_get( inum4, jpdom_data, 'e3v_0', e3v_n(:,:,:) )
+            CALL iom_get( inum4, jpdom_data, 'e3w_0', e3w_n(:,:,:) )
 
             CALL iom_get( inum4, jpdom_unknown, 'gdept_1d', gdept_1d ) ! depth
@@ -571,8 +571,8 @@
             !
             IF( nmsh <= 6 ) THEN                                        ! 3D vertical scale factors
-               CALL iom_get( inum4, jpdom_data, 'e3t_0', fse3t_n(:,:,:) )
-               CALL iom_get( inum4, jpdom_data, 'e3u_0', fse3u_n(:,:,:) )
-               CALL iom_get( inum4, jpdom_data, 'e3v_0', fse3v_n(:,:,:) )
-               CALL iom_get( inum4, jpdom_data, 'e3w_0', fse3w_n(:,:,:) )
+               CALL iom_get( inum4, jpdom_data, 'e3t_0', e3t_n(:,:,:) )
+               CALL iom_get( inum4, jpdom_data, 'e3u_0', e3u_n(:,:,:) )
+               CALL iom_get( inum4, jpdom_data, 'e3v_0', e3v_n(:,:,:) )
+               CALL iom_get( inum4, jpdom_data, 'e3w_0', e3w_n(:,:,:) )
             ELSE                                                        ! 2D bottom scale factors
                CALL iom_get( inum4, jpdom_data, 'e3t_ps', e3tp )
@@ -580,14 +580,14 @@
                !                                                        ! deduces the 3D scale factors
                DO jk = 1, jpk
-                  fse3t_n(:,:,jk) = e3t_1d(jk)                                    ! set to the ref. factors
-                  fse3u_n(:,:,jk) = e3t_1d(jk)
-                  fse3v_n(:,:,jk) = e3t_1d(jk)
-                  fse3w_n(:,:,jk) = e3w_1d(jk)
+                  e3t_n(:,:,jk) = e3t_1d(jk)                                    ! set to the ref. factors
+                  e3u_n(:,:,jk) = e3t_1d(jk)
+                  e3v_n(:,:,jk) = e3t_1d(jk)
+                  e3w_n(:,:,jk) = e3w_1d(jk)
                END DO
                DO jj = 1,jpj                                                  ! adjust the deepest values
                   DO ji = 1,jpi
                      ik = mbkt(ji,jj)
-                     fse3t_n(ji,jj,ik) = e3tp(ji,jj) * tmask(ji,jj,1) + e3t_1d(1) * ( 1._wp - tmask(ji,jj,1) )
-                     fse3w_n(ji,jj,ik) = e3wp(ji,jj) * tmask(ji,jj,1) + e3w_1d(1) * ( 1._wp - tmask(ji,jj,1) )
+                     e3t_n(ji,jj,ik) = e3tp(ji,jj) * tmask(ji,jj,1) + e3t_1d(1) * ( 1._wp - tmask(ji,jj,1) )
+                     e3w_n(ji,jj,ik) = e3wp(ji,jj) * tmask(ji,jj,1) + e3w_1d(1) * ( 1._wp - tmask(ji,jj,1) )
                   END DO
                END DO
@@ -595,21 +595,21 @@
                   DO jj = 1, jpjm1
                      DO ji = 1, jpim1
-                        fse3u_n(ji,jj,jk) = MIN( fse3t_n(ji,jj,jk), fse3t_n(ji+1,jj,jk) )
-                        fse3v_n(ji,jj,jk) = MIN( fse3t_n(ji,jj,jk), fse3t_n(ji,jj+1,jk) )
+                        e3u_n(ji,jj,jk) = MIN( e3t_n(ji,jj,jk), e3t_n(ji+1,jj,jk) )
+                        e3v_n(ji,jj,jk) = MIN( e3t_n(ji,jj,jk), e3t_n(ji,jj+1,jk) )
                      END DO
                   END DO
                END DO
-               CALL lbc_lnk( fse3u_n(:,:,:) , 'U', 1._wp )   ;   CALL lbc_lnk( fse3uw_n(:,:,:), 'U', 1._wp )   ! lateral boundary conditions
-               CALL lbc_lnk( fse3v_n(:,:,:) , 'V', 1._wp )   ;   CALL lbc_lnk( fse3vw_n(:,:,:), 'V', 1._wp )
+               CALL lbc_lnk( e3u_n(:,:,:) , 'U', 1._wp )   ;   CALL lbc_lnk( e3uw_n(:,:,:), 'U', 1._wp )   ! lateral boundary conditions
+               CALL lbc_lnk( e3v_n(:,:,:) , 'V', 1._wp )   ;   CALL lbc_lnk( e3vw_n(:,:,:), 'V', 1._wp )
                !
                DO jk = 1, jpk                        ! set to z-scale factor if zero (i.e. along closed boundaries)
-                  WHERE( fse3u_n(:,:,jk) == 0._wp )   fse3u_n(:,:,jk) = e3t_1d(jk)
-                  WHERE( fse3v_n(:,:,jk) == 0._wp )   fse3v_n(:,:,jk) = e3t_1d(jk)
+                  WHERE( e3u_n(:,:,jk) == 0._wp )   e3u_n(:,:,jk) = e3t_1d(jk)
+                  WHERE( e3v_n(:,:,jk) == 0._wp )   e3v_n(:,:,jk) = e3t_1d(jk)
                END DO
             END IF
 
             IF( iom_varid( inum4, 'gdept_0', ldstop = .FALSE. ) > 0 ) THEN   ! 3D depth of t- and w-level
-               CALL iom_get( inum4, jpdom_data, 'gdept_0', fsdept_n(:,:,:) )
-               CALL iom_get( inum4, jpdom_data, 'gdepw_0', fsdepw_n(:,:,:) )
+               CALL iom_get( inum4, jpdom_data, 'gdept_0', gdept_n(:,:,:) )
+               CALL iom_get( inum4, jpdom_data, 'gdepw_0', gdepw_n(:,:,:) )
             ELSE                                                           ! 2D bottom depth
                CALL iom_get( inum4, jpdom_data, 'hdept', zprt )
@@ -617,6 +617,6 @@
                !
                DO jk = 1, jpk                                              ! deduces the 3D depth
-                  fsdept_n(:,:,jk) = gdept_1d(jk)
-                  fsdepw_n(:,:,jk) = gdepw_1d(jk)
+                  gdept_n(:,:,jk) = gdept_1d(jk)
+                  gdepw_n(:,:,jk) = gdepw_1d(jk)
                END DO
                DO jj = 1, jpj
@@ -624,7 +624,7 @@
                      ik = mbkt(ji,jj)
                      IF( ik > 0 ) THEN
-                        fsdepw_n(ji,jj,ik+1) = zprw(ji,jj)
-                        fsdept_n(ji,jj,ik  ) = zprt(ji,jj)
-                        fsdept_n(ji,jj,ik+1) = fsdept_n(ji,jj,ik) + fse3t_n(ji,jj,ik)
+                        gdepw_n(ji,jj,ik+1) = zprw(ji,jj)
+                        gdept_n(ji,jj,ik  ) = zprt(ji,jj)
+                        gdept_n(ji,jj,ik+1) = gdept_n(ji,jj,ik) + e3t_n(ji,jj,ik)
                      ENDIF
                   END DO
@@ -640,10 +640,10 @@
             CALL iom_get( inum4, jpdom_unknown, 'e3w_1d'  , e3w_1d   )
             DO jk = 1, jpk
-               fse3t_n(:,:,jk) = e3t_1d(jk)                              ! set to the ref. factors
-               fse3u_n(:,:,jk) = e3t_1d(jk)
-               fse3v_n(:,:,jk) = e3t_1d(jk)
-               fse3w_n(:,:,jk) = e3w_1d(jk)
-               fsdept_n(:,:,jk) = gdept_1d(jk)
-               fsdepw_n(:,:,jk) = gdepw_1d(jk)
+               e3t_n(:,:,jk) = e3t_1d(jk)                              ! set to the ref. factors
+               e3u_n(:,:,jk) = e3t_1d(jk)
+               e3v_n(:,:,jk) = e3t_1d(jk)
+               e3w_n(:,:,jk) = e3w_1d(jk)
+               gdept_n(:,:,jk) = gdept_1d(jk)
+               gdepw_n(:,:,jk) = gdepw_1d(jk)
             END DO
          ENDIF
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 5845)
@@ -85,5 +85,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -421,4 +420,5 @@
    END SUBROUTINE dta_dyn_init
 
+
    SUBROUTINE dta_dyn_wzv( pu, pv, pw )
       !!----------------------------------------------------------------------
@@ -449,15 +449,14 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zu  = pu(ji  ,jj  ,jk) * umask(ji  ,jj  ,jk) * e2u(ji  ,jj  ) * fse3u(ji  ,jj  ,jk)
-               zu1 = pu(ji-1,jj  ,jk) * umask(ji-1,jj  ,jk) * e2u(ji-1,jj  ) * fse3u(ji-1,jj  ,jk)
-               zv  = pv(ji  ,jj  ,jk) * vmask(ji  ,jj  ,jk) * e1v(ji  ,jj  ) * fse3v(ji  ,jj  ,jk)
-               zv1 = pv(ji  ,jj-1,jk) * vmask(ji  ,jj-1,jk) * e1v(ji  ,jj-1) * fse3v(ji  ,jj-1,jk)
-               zet = 1. / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
-               zhdiv(ji,jj,jk) = ( zu - zu1 + zv - zv1 ) * zet 
+               zu  = pu(ji  ,jj  ,jk) * umask(ji  ,jj  ,jk) * e2u(ji  ,jj  ) * e3u_n(ji  ,jj  ,jk)
+               zu1 = pu(ji-1,jj  ,jk) * umask(ji-1,jj  ,jk) * e2u(ji-1,jj  ) * e3u_n(ji-1,jj  ,jk)
+               zv  = pv(ji  ,jj  ,jk) * vmask(ji  ,jj  ,jk) * e1v(ji  ,jj  ) * e3v_n(ji  ,jj  ,jk)
+               zv1 = pv(ji  ,jj-1,jk) * vmask(ji  ,jj-1,jk) * e1v(ji  ,jj-1) * e3v_n(ji  ,jj-1,jk)
+               zhdiv(ji,jj,jk) = ( zu - zu1 + zv - zv1 ) * r1_e1e2t(ji,jj) / e3t_n(ji,jj,jk) 
             END DO
          END DO
       END DO
       !                              !  update the horizontal divergence with the runoff inflow
-      IF( ln_dynrnf )  zhdiv(:,:,1) = zhdiv(:,:,1) - rnf(:,:) * r1_rau0 / fse3t(:,:,1)
+      IF( ln_dynrnf )  zhdiv(:,:,1) = zhdiv(:,:,1) - rnf(:,:) * r1_rau0 / e3t_n(:,:,1)
       !
       CALL lbc_lnk( zhdiv, 'T', 1. )      ! Lateral boundary conditions on zhdiv
@@ -465,5 +464,5 @@
       pw(:,:,jpk) = 0._wp
       DO jk = jpkm1, 1, -1
-         pw(:,:,jk) = pw(:,:,jk+1) - fse3t(:,:,jk) * zhdiv(:,:,jk)
+         pw(:,:,jk) = pw(:,:,jk+1) - e3t_n(:,:,jk) * zhdiv(:,:,jk)
       END DO
       !
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 5845)
@@ -87,8 +87,7 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2015)
    !! $Id$
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -430,14 +429,12 @@
          DO jt = 1, nn_divdmp
             !
-            DO jk = 1, jpkm1
+            DO jk = 1, jpkm1           ! hdiv = e1e1 * div
                hdiv(:,:) = 0._wp
                DO jj = 2, jpjm1
                   DO ji = fs_2, fs_jpim1   ! vector opt.
-                     hdiv(ji,jj) =   &
-                        (  e2u(ji  ,jj  ) * fse3u(ji  ,jj  ,jk) * u_bkginc(ji  ,jj  ,jk)     &
-                         - e2u(ji-1,jj  ) * fse3u(ji-1,jj  ,jk) * u_bkginc(ji-1,jj  ,jk)     &
-                         + e1v(ji  ,jj  ) * fse3v(ji  ,jj  ,jk) * v_bkginc(ji  ,jj  ,jk)     &
-                         - e1v(ji  ,jj-1) * fse3v(ji  ,jj-1,jk) * v_bkginc(ji  ,jj-1,jk)  )  &
-                         / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
+                     hdiv(ji,jj) = (  e2u(ji  ,jj) * e3u_n(ji  ,jj,jk) * u_bkginc(ji  ,jj,jk)    &
+                        &           - e2u(ji-1,jj) * e3u_n(ji-1,jj,jk) * u_bkginc(ji-1,jj,jk)    &
+                        &           + e1v(ji,jj  ) * e3v_n(ji,jj  ,jk) * v_bkginc(ji,jj  ,jk)    &
+                        &           - e1v(ji,jj-1) * e3v_n(ji,jj-1,jk) * v_bkginc(ji,jj-1,jk)  ) / e3t_n(ji,jj,jk)
                   END DO
                END DO
@@ -446,10 +443,8 @@
                DO jj = 2, jpjm1
                   DO ji = fs_2, fs_jpim1   ! vector opt.
-                     u_bkginc(ji,jj,jk) = u_bkginc(ji,jj,jk) + 0.2_wp * ( e1e2t(ji+1,jj) * hdiv(ji+1,jj)   &
-                        &                                               - e1e2t(ji  ,jj) * hdiv(ji  ,jj) ) &
-                        &                                             * r1_e1u(ji,jj) * umask(ji,jj,jk) 
-                     v_bkginc(ji,jj,jk) = v_bkginc(ji,jj,jk) + 0.2_wp * ( e1e2t(ji,jj+1) * hdiv(ji,jj+1)   &
-                        &                                               - e1e2t(ji,jj  ) * hdiv(ji,jj  ) ) &
-                        &                                             * r1_e2v(ji,jj) * vmask(ji,jj,jk) 
+                     u_bkginc(ji,jj,jk) = u_bkginc(ji,jj,jk)                         &
+                        &               + 0.2_wp * ( hdiv(ji+1,jj) - hdiv(ji  ,jj) ) * r1_e1u(ji,jj) * umask(ji,jj,jk)
+                     v_bkginc(ji,jj,jk) = v_bkginc(ji,jj,jk)                         &
+                        &               + 0.2_wp * ( hdiv(ji,jj+1) - hdiv(ji,jj  ) ) * r1_e2v(ji,jj) * vmask(ji,jj,jk) 
                   END DO
                END DO
@@ -645,5 +640,5 @@
       ! used to prevent the applied increments taking the temperature below the local freezing point 
       DO jk = 1, jpkm1
-        CALL eos_fzp( tsn(:,:,jk,jp_sal), fzptnz(:,:,jk), fsdept(:,:,jk) )
+        CALL eos_fzp( tsn(:,:,jk,jp_sal), fzptnz(:,:,jk), gdept_n(:,:,jk) )
       END DO
          !
@@ -877,5 +872,5 @@
             IF( lk_vvl ) THEN
                DO jk = 1, jpk
-                  fse3t_b(:,:,jk) = fse3t_n(:,:,jk)
+                  e3t_b(:,:,jk) = e3t_n(:,:,jk)
                END DO
             ENDIF
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 5845)
@@ -59,5 +59,4 @@
 #endif
 
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -289,7 +288,7 @@
                               DO ik = 1, jpkm1
                                  dta%u2d(ib) = dta%u2d(ib) &
-                       &                          + fse3u(ii,ij,ik) * umask(ii,ij,ik) * dta%u3d(ib,ik)
+                       &                          + e3u_n(ii,ij,ik) * umask(ii,ij,ik) * dta%u3d(ib,ik)
                               END DO
-                              dta%u2d(ib) =  dta%u2d(ib) * hur(ii,ij)
+                              dta%u2d(ib) =  dta%u2d(ib) * r1_hu_n(ii,ij)
                            END DO
                            igrd = 3                      ! meridional velocity
@@ -300,7 +299,7 @@
                               DO ik = 1, jpkm1
                                  dta%v2d(ib) = dta%v2d(ib) &
-                       &                       + fse3v(ii,ij,ik) * vmask(ii,ij,ik) * dta%v3d(ib,ik)
+                       &                       + e3v_n(ii,ij,ik) * vmask(ii,ij,ik) * dta%v3d(ib,ik)
                               END DO
-                              dta%v2d(ib) =  dta%v2d(ib) * hvr(ii,ij)
+                              dta%v2d(ib) =  dta%v2d(ib) * r1_hv_n(ii,ij)
                            END DO
                         ENDIF                    
@@ -353,7 +352,7 @@
                         DO ik = 1, jpkm1
                            dta%u2d(ib) = dta%u2d(ib) &
-                 &                       + fse3u(ii,ij,ik) * umask(ii,ij,ik) * dta%u3d(ib,ik)
+                 &                       + e3u_n(ii,ij,ik) * umask(ii,ij,ik) * dta%u3d(ib,ik)
                         END DO
-                        dta%u2d(ib) =  dta%u2d(ib) * hur(ii,ij)
+                        dta%u2d(ib) =  dta%u2d(ib) * r1_hu_n(ii,ij)
                         DO ik = 1, jpkm1
                            dta%u3d(ib,ik) = dta%u3d(ib,ik) - dta%u2d(ib)
@@ -367,7 +366,7 @@
                         DO ik = 1, jpkm1
                            dta%v2d(ib) = dta%v2d(ib) &
-                 &                       + fse3v(ii,ij,ik) * vmask(ii,ij,ik) * dta%v3d(ib,ik)
+                 &                       + e3v_n(ii,ij,ik) * vmask(ii,ij,ik) * dta%v3d(ib,ik)
                         END DO
-                        dta%v2d(ib) =  dta%v2d(ib) * hvr(ii,ij)
+                        dta%v2d(ib) =  dta%v2d(ib) * r1_hv_n(ii,ij)
                         DO ik = 1, jpkm1
                            dta%v3d(ib,ik) = dta%v3d(ib,ik) - dta%v2d(ib)
@@ -882,10 +881,10 @@
          ENDIF
 #endif
-
-      ENDDO ! ib_bdy 
-
+         !
+      END DO ! ib_bdy 
+      !
       IF( nn_timing == 1 ) CALL timing_stop('bdy_dta_init')
-
-      END SUBROUTINE bdy_dta_init
+      !
+   END SUBROUTINE bdy_dta_init
 
 #else
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90	(revision 5845)
@@ -38,5 +38,4 @@
                         ! dyn_nxt (if lk_dynspg_ts or lk_dynspg_exp)
 
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -53,20 +52,19 @@
       !!
       !!----------------------------------------------------------------------
-      !!
       INTEGER, INTENT( in )           :: kt               ! Main time step counter
       LOGICAL, INTENT( in ), OPTIONAL :: dyn3d_only       ! T => only update baroclinic velocities
-      !!
-      INTEGER               :: jk,ii,ij,ib_bdy,ib,igrd     ! Loop counter
-      LOGICAL               :: ll_dyn2d, ll_dyn3d, ll_orlanski
-      !!
+      !
+      INTEGER :: jk,ii,ij,ib_bdy,ib,igrd     ! Loop counter
+      LOGICAL :: ll_dyn2d, ll_dyn3d, ll_orlanski
       REAL(wp), POINTER, DIMENSION(:,:) :: pua2d, pva2d     ! after barotropic velocities
-
-      IF( nn_timing == 1 ) CALL timing_start('bdy_dyn')
-
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )   CALL timing_start('bdy_dyn')
+      !
       ll_dyn2d = .true.
       ll_dyn3d = .true.
-
+      !
       IF( PRESENT(dyn3d_only) ) THEN
-         IF( dyn3d_only ) ll_dyn2d = .false.
+         IF( dyn3d_only )   ll_dyn2d = .false.
       ENDIF
 
@@ -74,6 +72,6 @@
       DO ib_bdy = 1, nb_bdy
          IF ( cn_dyn2d(ib_bdy) == 'orlanski' .or. cn_dyn2d(ib_bdy) == 'orlanski_npo' &
-     &   .or. cn_dyn3d(ib_bdy) == 'orlanski' .or. cn_dyn3d(ib_bdy) == 'orlanski_npo') ll_orlanski = .true.
-      ENDDO
+     &   .or. cn_dyn3d(ib_bdy) == 'orlanski' .or. cn_dyn3d(ib_bdy) == 'orlanski_npo')   ll_orlanski = .true.
+      END DO
 
       !-------------------------------------------------------
@@ -81,5 +79,5 @@
       !-------------------------------------------------------
 
-      CALL wrk_alloc(jpi,jpj,pua2d,pva2d) 
+      CALL wrk_alloc( jpi,jpj,   pua2d, pva2d ) 
 
       !-------------------------------------------------------
@@ -87,29 +85,26 @@
       !-------------------------------------------------------
 
-      ! "After" velocities: 
+      !                          ! "After" velocities: 
+      pua2d(:,:) = 0._wp
+      pva2d(:,:) = 0._wp     
+      DO jk = 1, jpkm1
+         pua2d(:,:) = pua2d(:,:) + e3u_a(:,:,jk) * ua(:,:,jk) * umask(:,:,jk)
+         pva2d(:,:) = pva2d(:,:) + e3v_a(:,:,jk) * va(:,:,jk) * vmask(:,:,jk)
+      END DO
+      pua2d(:,:) = pua2d(:,:) * r1_hu_a(:,:)
+      pva2d(:,:) = pva2d(:,:) * r1_hv_a(:,:)
 
-      pua2d(:,:) = 0.e0
-      pva2d(:,:) = 0.e0      
-      DO jk = 1, jpkm1
-         pua2d(:,:) = pua2d(:,:) + fse3u_a(:,:,jk) * umask(:,:,jk) * ua(:,:,jk)
-         pva2d(:,:) = pva2d(:,:) + fse3v_a(:,:,jk) * vmask(:,:,jk) * va(:,:,jk)
+      DO jk = 1 , jpkm1
+         ua(:,:,jk) = ( ua(:,:,jk) - pua2d(:,:) ) * umask(:,:,jk)
+         va(:,:,jk) = ( va(:,:,jk) - pva2d(:,:) ) * vmask(:,:,jk)
       END DO
 
-      pua2d(:,:) = pua2d(:,:) * hur_a(:,:)
-      pva2d(:,:) = pva2d(:,:) * hvr_a(:,:)
 
-      DO jk = 1 , jpkm1
-         ua(:,:,jk) = (ua(:,:,jk) - pua2d(:,:)) * umask(:,:,jk)
-         va(:,:,jk) = (va(:,:,jk) - pva2d(:,:)) * vmask(:,:,jk)
-      END DO
-
-      ! "Before" velocities (required for Orlanski condition): 
-
-      IF ( ll_orlanski ) THEN          
+      IF( ll_orlanski ) THEN     ! "Before" velocities (Orlanski condition only) 
          DO jk = 1 , jpkm1
-            ub(:,:,jk) = (ub(:,:,jk) - ub_b(:,:)) * umask(:,:,jk)
-            vb(:,:,jk) = (vb(:,:,jk) - vb_b(:,:)) * vmask(:,:,jk)
+            ub(:,:,jk) = ( ub(:,:,jk) - ub_b(:,:) ) * umask(:,:,jk)
+            vb(:,:,jk) = ( vb(:,:,jk) - vb_b(:,:) ) * vmask(:,:,jk)
          END DO
-      END IF
+      ENDIF
 
       !-------------------------------------------------------
@@ -118,17 +113,17 @@
       !-------------------------------------------------------
 
-      IF( ll_dyn2d ) CALL bdy_dyn2d( kt, pua2d, pva2d, ub_b, vb_b, hur_a(:,:), hvr_a(:,:), ssha )
+      IF( ll_dyn2d )   CALL bdy_dyn2d( kt, pua2d, pva2d, ub_b, vb_b, r1_hu_a(:,:), r1_hv_a(:,:), ssha )
 
-      IF( ll_dyn3d ) CALL bdy_dyn3d( kt )
+      IF( ll_dyn3d )   CALL bdy_dyn3d( kt )
 
       !-------------------------------------------------------
       ! Recombine velocities
       !-------------------------------------------------------
-
+      !
       DO jk = 1 , jpkm1
          ua(:,:,jk) = ( ua(:,:,jk) + pua2d(:,:) ) * umask(:,:,jk)
          va(:,:,jk) = ( va(:,:,jk) + pva2d(:,:) ) * vmask(:,:,jk)
       END DO
-
+      !
       IF ( ll_orlanski ) THEN
          DO jk = 1 , jpkm1
@@ -137,9 +132,9 @@
          END DO
       END IF
-
-      CALL wrk_dealloc(jpi,jpj,pua2d,pva2d) 
-
+      !
+      CALL wrk_dealloc( jpi,jpj,  pua2d, pva2d ) 
+      !
       IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn')
-
+      !
    END SUBROUTINE bdy_dyn
 
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn3d.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn3d.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn3d.F90	(revision 5845)
@@ -29,6 +29,4 @@
    PUBLIC   bdy_dyn3d_dmp ! routine called by step
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -46,29 +44,23 @@
       !!----------------------------------------------------------------------
       INTEGER, INTENT( in ) :: kt     ! Main time step counter
-      !!
+      !
       INTEGER               :: ib_bdy ! loop index
-      !!
-
+      !!----------------------------------------------------------------------
+      !
       DO ib_bdy=1, nb_bdy
-
+         !
          SELECT CASE( cn_dyn3d(ib_bdy) )
-         CASE('none')
-            CYCLE
-         CASE('frs')
-            CALL bdy_dyn3d_frs( idx_bdy(ib_bdy), dta_bdy(ib_bdy), kt, ib_bdy )
-         CASE('specified')
-            CALL bdy_dyn3d_spe( idx_bdy(ib_bdy), dta_bdy(ib_bdy), kt, ib_bdy )
-         CASE('zero')
-            CALL bdy_dyn3d_zro( idx_bdy(ib_bdy), dta_bdy(ib_bdy), kt, ib_bdy )
-         CASE('orlanski')
-            CALL bdy_dyn3d_orlanski( idx_bdy(ib_bdy), dta_bdy(ib_bdy), ib_bdy, ll_npo=.false. )
-         CASE('orlanski_npo')
-            CALL bdy_dyn3d_orlanski( idx_bdy(ib_bdy), dta_bdy(ib_bdy), ib_bdy, ll_npo=.true. )
-         CASE DEFAULT
-            CALL ctl_stop( 'bdy_dyn3d : unrecognised option for open boundaries for baroclinic velocities' )
+         CASE('none')        ;   CYCLE
+         CASE('frs' )        ;   CALL bdy_dyn3d_frs( idx_bdy(ib_bdy), dta_bdy(ib_bdy), kt, ib_bdy )
+         CASE('specified')   ;   CALL bdy_dyn3d_spe( idx_bdy(ib_bdy), dta_bdy(ib_bdy), kt, ib_bdy )
+         CASE('zero')        ;   CALL bdy_dyn3d_zro( idx_bdy(ib_bdy), dta_bdy(ib_bdy), kt, ib_bdy )
+         CASE('orlanski' )   ;   CALL bdy_dyn3d_orlanski( idx_bdy(ib_bdy), dta_bdy(ib_bdy), ib_bdy, ll_npo=.false. )
+         CASE('orlanski_npo');   CALL bdy_dyn3d_orlanski( idx_bdy(ib_bdy), dta_bdy(ib_bdy), ib_bdy, ll_npo=.true. )
+         CASE DEFAULT        ;   CALL ctl_stop( 'bdy_dyn3d : unrecognised option for open boundaries for baroclinic velocities' )
          END SELECT
-      ENDDO
-
+      END DO
+      !
    END SUBROUTINE bdy_dyn3d
+
 
    SUBROUTINE bdy_dyn3d_spe( idx, dta, kt , ib_bdy )
@@ -80,9 +72,9 @@
       !!
       !!----------------------------------------------------------------------
-      INTEGER                     ::   kt
-      TYPE(OBC_INDEX), INTENT(in) ::   idx  ! OBC indices
-      TYPE(OBC_DATA),  INTENT(in) ::   dta  ! OBC external data
-      INTEGER,         INTENT(in) ::   ib_bdy  ! BDY set index
-      !!
+      INTEGER        , INTENT(in) ::   kt
+      TYPE(OBC_INDEX), INTENT(in) ::   idx     ! OBC indices
+      TYPE(OBC_DATA) , INTENT(in) ::   dta     ! OBC external data
+      INTEGER        , INTENT(in) ::   ib_bdy  ! BDY set index
+      !
       INTEGER  ::   jb, jk         ! dummy loop indices
       INTEGER  ::   ii, ij, igrd   ! local integers
@@ -112,10 +104,11 @@
       CALL lbc_bdy_lnk( va, 'V', -1., ib_bdy )   
       !
-      IF( kt .eq. nit000 ) CLOSE( unit = 102 )
-
+      IF( kt == nit000 )   CLOSE( unit = 102 )
+      !
       IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn3d_spe')
-
+      !
    END SUBROUTINE bdy_dyn3d_spe
 
+
    SUBROUTINE bdy_dyn3d_zro( idx, dta, kt, ib_bdy )
       !!----------------------------------------------------------------------
@@ -125,7 +118,7 @@
       !!
       !!----------------------------------------------------------------------
-      INTEGER                     ::   kt
+      INTEGER        , INTENT(in) ::   kt
       TYPE(OBC_INDEX), INTENT(in) ::   idx  ! OBC indices
-      TYPE(OBC_DATA),  INTENT(in) ::   dta  ! OBC external data
+      TYPE(OBC_DATA) , INTENT(in) ::   dta  ! OBC external data
       INTEGER,         INTENT(in) ::   ib_bdy  ! BDY set index
       !!
@@ -157,9 +150,10 @@
       CALL lbc_bdy_lnk( ua, 'U', -1., ib_bdy )   ;   CALL lbc_bdy_lnk( va, 'V', -1.,ib_bdy )   ! Boundary points should be updated
       !
-      IF( kt .eq. nit000 ) CLOSE( unit = 102 )
-
-      IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn3d_zro')
-
+      IF( kt == nit000 ) CLOSE( unit = 102 )
+      !
+      IF( nn_timing == 1 )   CALL timing_stop('bdy_dyn3d_zro')
+      !
    END SUBROUTINE bdy_dyn3d_zro
+
 
    SUBROUTINE bdy_dyn3d_frs( idx, dta, kt, ib_bdy )
@@ -174,9 +168,9 @@
       !!               topography. Tellus, 365-382.
       !!----------------------------------------------------------------------
-      INTEGER                     ::   kt
+      INTEGER        , INTENT(in) ::   kt
       TYPE(OBC_INDEX), INTENT(in) ::   idx  ! OBC indices
-      TYPE(OBC_DATA),  INTENT(in) ::   dta  ! OBC external data
+      TYPE(OBC_DATA) , INTENT(in) ::   dta  ! OBC external data
       INTEGER,         INTENT(in) ::   ib_bdy  ! BDY set index
-      !!
+      !
       INTEGER  ::   jb, jk         ! dummy loop indices
       INTEGER  ::   ii, ij, igrd   ! local integers
@@ -208,9 +202,10 @@
       CALL lbc_bdy_lnk( va, 'V', -1., ib_bdy )   
       !
-      IF( kt .eq. nit000 ) CLOSE( unit = 102 )
-
+      IF( kt == nit000 )   CLOSE( unit = 102 )
+      !
       IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn3d_frs')
-
+      !
    END SUBROUTINE bdy_dyn3d_frs
+
 
    SUBROUTINE bdy_dyn3d_orlanski( idx, dta, ib_bdy, ll_npo )
@@ -259,16 +254,14 @@
       !!
       !!----------------------------------------------------------------------
-      INTEGER                     ::   kt
-      !!
+      INTEGER, INTENT(in) ::   kt
+      !
       INTEGER  ::   jb, jk         ! dummy loop indices
       INTEGER  ::   ii, ij, igrd   ! local integers
       REAL(wp) ::   zwgt           ! boundary weight
-      INTEGER  ::  ib_bdy          ! loop index
+      INTEGER  ::   ib_bdy         ! loop index
       !!----------------------------------------------------------------------
       !
       IF( nn_timing == 1 ) CALL timing_start('bdy_dyn3d_dmp')
       !
-      !-------------------------------------------------------
-
       DO ib_bdy=1, nb_bdy
          IF ( ln_dyn3d_dmp(ib_bdy) .and. cn_dyn3d(ib_bdy) /= 'none' ) THEN
@@ -300,5 +293,5 @@
       !
       IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn3d_dmp')
-
+      !
    END SUBROUTINE bdy_dyn3d_dmp
 
@@ -311,9 +304,7 @@
       WRITE(*,*) 'bdy_dyn3d: You should not have seen this print! error?', kt
    END SUBROUTINE bdy_dyn3d
-
    SUBROUTINE bdy_dyn3d_dmp( kt )      ! Empty routine
       WRITE(*,*) 'bdy_dyn3d_dmp: You should not have seen this print! error?', kt
    END SUBROUTINE bdy_dyn3d_dmp
-
 #endif
 
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90	(revision 5845)
@@ -1319,5 +1319,5 @@
                nbj => idx_bdy(ib_bdy)%nbj(ib,igrd)
                flagu => idx_bdy(ib_bdy)%flagu(ib,igrd)
-               bdysurftot = bdysurftot + hu     (nbi  , nbj)                           &
+               bdysurftot = bdysurftot + hu_n   (nbi  , nbj)                           &
                   &                    * e2u    (nbi  , nbj) * ABS( flagu ) &
                   &                    * tmask_i(nbi  , nbj)                           &
@@ -1332,5 +1332,5 @@
                nbj => idx_bdy(ib_bdy)%nbj(ib,igrd)
                flagv => idx_bdy(ib_bdy)%flagv(ib,igrd)
-               bdysurftot = bdysurftot + hv     (nbi, nbj  )                           &
+               bdysurftot = bdysurftot + hv_n   (nbi, nbj  )                           &
                   &                    * e1v    (nbi, nbj  ) * ABS( flagv ) &
                   &                    * tmask_i(nbi, nbj  )                           &
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 5845)
@@ -288,4 +288,5 @@
    END SUBROUTINE bdytide_init
 
+
    SUBROUTINE bdytide_update ( kt, idx, dta, td, jit, time_offset )
       !!----------------------------------------------------------------------
@@ -295,19 +296,19 @@
       !!                
       !!----------------------------------------------------------------------
-      INTEGER, INTENT( in )            ::   kt          ! Main timestep counter
-      TYPE(OBC_INDEX), INTENT( in )    ::   idx         ! OBC indices
-      TYPE(OBC_DATA),  INTENT(inout)   ::   dta         ! OBC external data
-      TYPE(TIDES_DATA),INTENT( inout ) ::   td          ! tidal harmonics data
-      INTEGER,INTENT(in),OPTIONAL      ::   jit         ! Barotropic timestep counter (for timesplitting option)
-      INTEGER,INTENT( in ), OPTIONAL   ::   time_offset ! time offset in units of timesteps. NB. if jit
-                                                        ! is present then units = subcycle timesteps.
-                                                        ! time_offset = 0  => get data at "now"    time level
-                                                        ! time_offset = -1 => get data at "before" time level
-                                                        ! time_offset = +1 => get data at "after"  time level
-                                                        ! etc.
-      !!
-      INTEGER, DIMENSION(3)            ::   ilen0       !: length of boundary data (from OBC arrays)
+      INTEGER          , INTENT(in   ) ::   kt          ! Main timestep counter
+      TYPE(OBC_INDEX)  , INTENT(in   ) ::   idx         ! OBC indices
+      TYPE(OBC_DATA)   , INTENT(inout) ::   dta         ! OBC external data
+      TYPE(TIDES_DATA) , INTENT(inout) ::   td          ! tidal harmonics data
+      INTEGER, OPTIONAL, INTENT(in   ) ::   jit         ! Barotropic timestep counter (for timesplitting option)
+      INTEGER, OPTIONAL, INTENT(in   ) ::   time_offset ! time offset in units of timesteps. NB. if jit
+      !                                                 ! is present then units = subcycle timesteps.
+      !                                                 ! time_offset = 0  => get data at "now"    time level
+      !                                                 ! time_offset = -1 => get data at "before" time level
+      !                                                 ! time_offset = +1 => get data at "after"  time level
+      !                                                 ! etc.
+      !
       INTEGER                          :: itide, igrd, ib   ! dummy loop indices
       INTEGER                          :: time_add          ! time offset in units of timesteps
+      INTEGER, DIMENSION(3)            ::   ilen0       !: length of boundary data (from OBC arrays)
       REAL(wp)                         :: z_arg, z_sarg, zflag, zramp      
       REAL(wp), DIMENSION(jpmax_harmo) :: z_sist, z_cost
@@ -380,4 +381,5 @@
    END SUBROUTINE bdytide_update
 
+
    SUBROUTINE bdy_dta_tides( kt, kit, time_offset )
       !!----------------------------------------------------------------------
@@ -387,18 +389,18 @@
       !!                
       !!----------------------------------------------------------------------
-      INTEGER, INTENT( in )            ::   kt          ! Main timestep counter
-      INTEGER, INTENT( in ),OPTIONAL   ::   kit         ! Barotropic timestep counter (for timesplitting option)
-      INTEGER, INTENT( in ),OPTIONAL   ::   time_offset ! time offset in units of timesteps. NB. if kit
-                                                        ! is present then units = subcycle timesteps.
-                                                        ! time_offset = 0  => get data at "now"    time level
-                                                        ! time_offset = -1 => get data at "before" time level
-                                                        ! time_offset = +1 => get data at "after"  time level
-                                                        ! etc.
-      !!
-      LOGICAL  :: lk_first_btstp  ! =.TRUE. if time splitting and first barotropic step
-      INTEGER,          DIMENSION(jpbgrd) :: ilen0 
+      INTEGER,           INTENT(in) ::   kt          ! Main timestep counter
+      INTEGER, OPTIONAL, INTENT(in) ::   kit         ! Barotropic timestep counter (for timesplitting option)
+      INTEGER, OPTIONAL, INTENT(in) ::   time_offset ! time offset in units of timesteps. NB. if kit
+      !                                              ! is present then units = subcycle timesteps.
+      !                                              ! time_offset = 0  => get data at "now"    time level
+      !                                              ! time_offset = -1 => get data at "before" time level
+      !                                              ! time_offset = +1 => get data at "after"  time level
+      !                                              ! etc.
+      !
+      LOGICAL  :: lk_first_btstp            ! =.TRUE. if time splitting and first barotropic step
+      INTEGER  :: itide, ib_bdy, ib, igrd   ! loop indices
+      INTEGER  :: time_add                  ! time offset in units of timesteps
+      INTEGER, DIMENSION(jpbgrd) :: ilen0 
       INTEGER, DIMENSION(1:jpbgrd) :: nblen, nblenrim  ! short cuts
-      INTEGER  :: itide, ib_bdy, ib, igrd                     ! loop indices
-      INTEGER  :: time_add                                    ! time offset in units of timesteps
       REAL(wp) :: z_arg, z_sarg, zramp, zoff, z_cost, z_sist      
       !!----------------------------------------------------------------------
@@ -511,14 +513,16 @@
    END SUBROUTINE bdy_dta_tides
 
+
    SUBROUTINE tide_init_elevation( idx, td )
       !!----------------------------------------------------------------------
       !!                 ***  ROUTINE tide_init_elevation  ***
       !!----------------------------------------------------------------------
-      TYPE(OBC_INDEX), INTENT( in )      ::   idx     ! OBC indices
-      TYPE(TIDES_DATA),INTENT( inout )   ::   td      ! tidal harmonics data
-      !! * Local declarations
-      INTEGER, DIMENSION(1)            ::   ilen0       !: length of boundary data (from OBC arrays)
+      TYPE(OBC_INDEX) , INTENT(in   ) ::   idx   ! OBC indices
+      TYPE(TIDES_DATA), INTENT(inout) ::   td    ! tidal harmonics data
+      !
+      INTEGER ::   itide, igrd, ib       ! dummy loop indices
+      INTEGER, DIMENSION(1) ::   ilen0   ! length of boundary data (from OBC arrays)
       REAL(wp),ALLOCATABLE, DIMENSION(:) ::   mod_tide, phi_tide
-      INTEGER                            ::   itide, igrd, ib      ! dummy loop indices
+      !!----------------------------------------------------------------------
 
       igrd=1   
@@ -544,18 +548,20 @@
       END DO
 
-      DEALLOCATE(mod_tide,phi_tide)
-
+      DEALLOCATE( mod_tide, phi_tide )
+      !
    END SUBROUTINE tide_init_elevation
 
+
    SUBROUTINE tide_init_velocities( idx, td )
       !!----------------------------------------------------------------------
       !!                 ***  ROUTINE tide_init_elevation  ***
       !!----------------------------------------------------------------------
-      TYPE(OBC_INDEX), INTENT( in )      ::   idx     ! OBC indices
-      TYPE(TIDES_DATA),INTENT( inout )      ::   td      ! tidal harmonics data
-      !! * Local declarations
-      INTEGER, DIMENSION(3)            ::   ilen0       !: length of boundary data (from OBC arrays)
+      TYPE(OBC_INDEX) , INTENT(in   ) ::   idx   ! OBC indices
+      TYPE(TIDES_DATA), INTENT(inout) ::   td    ! tidal harmonics data
+      !
+      INTEGER ::   itide, igrd, ib       ! dummy loop indices
+      INTEGER, DIMENSION(3) ::   ilen0   ! length of boundary data (from OBC arrays)
       REAL(wp),ALLOCATABLE, DIMENSION(:) ::   mod_tide, phi_tide
-      INTEGER                            ::   itide, igrd, ib      ! dummy loop indices
+      !!----------------------------------------------------------------------
 
       ilen0(2) =  SIZE(td%u0(:,1,1))
@@ -564,5 +570,5 @@
       igrd=2                                 ! U grid.
 
-      ALLOCATE(mod_tide(ilen0(igrd)),phi_tide(ilen0(igrd)))
+      ALLOCATE( mod_tide(ilen0(igrd)) , phi_tide(ilen0(igrd)) )
 
       DO itide = 1, nb_harmo
@@ -581,9 +587,9 @@
       END DO
 
-      DEALLOCATE(mod_tide,phi_tide)
+      DEALLOCATE( mod_tide , phi_tide )
 
       igrd=3                                 ! V grid.
 
-      ALLOCATE(mod_tide(ilen0(igrd)),phi_tide(ilen0(igrd)))
+      ALLOCATE( mod_tide(ilen0(igrd)) , phi_tide(ilen0(igrd)) )
 
       DO itide = 1, nb_harmo
@@ -601,8 +607,9 @@
          ENDDO
       END DO
-
+      !
       DEALLOCATE(mod_tide,phi_tide)
-
+      !
   END SUBROUTINE tide_init_velocities
+
 #else
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90	(revision 5845)
@@ -32,6 +32,4 @@
    PUBLIC bdy_vol        ! routine called by dynspg_flt.h90
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.6 , NEMO Consortium (2014)
@@ -111,5 +109,5 @@
                ii = idx%nbi(jb,jgrd)
                ij = idx%nbj(jb,jgrd)
-               zubtpecor = zubtpecor + idx%flagu(jb,jgrd) * ua(ii,ij, jk) * e2u(ii,ij) * fse3u(ii,ij,jk)
+               zubtpecor = zubtpecor + idx%flagu(jb,jgrd) * ua(ii,ij, jk) * e2u(ii,ij) * e3u_n(ii,ij,jk)
             END DO
          END DO
@@ -119,5 +117,5 @@
                ii = idx%nbi(jb,jgrd)
                ij = idx%nbj(jb,jgrd)
-               zubtpecor = zubtpecor + idx%flagv(jb,jgrd) * va(ii,ij, jk) * e1v(ii,ij) * fse3v(ii,ij,jk) 
+               zubtpecor = zubtpecor + idx%flagv(jb,jgrd) * va(ii,ij, jk) * e1v(ii,ij) * e3v_n(ii,ij,jk) 
             END DO
          END DO
@@ -144,5 +142,5 @@
                ij = idx%nbj(jb,jgrd)
                ua(ii,ij,jk) = ua(ii,ij,jk) - idx%flagu(jb,jgrd) * zubtpecor * umask(ii,ij,jk)
-               ztranst = ztranst + idx%flagu(jb,jgrd) * ua(ii,ij,jk) * e2u(ii,ij) * fse3u(ii,ij,jk)
+               ztranst = ztranst + idx%flagu(jb,jgrd) * ua(ii,ij,jk) * e2u(ii,ij) * e3u_n(ii,ij,jk)
             END DO
          END DO
@@ -153,5 +151,5 @@
                ij = idx%nbj(jb,jgrd)
                va(ii,ij,jk) = va(ii,ij,jk) -idx%flagv(jb,jgrd) * zubtpecor * vmask(ii,ij,jk)
-               ztranst = ztranst + idx%flagv(jb,jgrd) * va(ii,ij,jk) * e1v(ii,ij) * fse3v(ii,ij,jk)
+               ztranst = ztranst + idx%flagv(jb,jgrd) * va(ii,ij,jk) * e1v(ii,ij) * e3v_n(ii,ij,jk)
             END DO
          END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/C1D/dtauvd.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/C1D/dtauvd.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/C1D/dtauvd.F90	(revision 5845)
@@ -31,6 +31,4 @@
    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_uvd   ! structure for input U & V current (file information and data)
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -174,5 +172,5 @@
             DO ji = 1, jpi                ! determines the interpolated U & V current profiles at each (i,j) point
                DO jk = 1, jpk
-                  zl = fsdept(ji,jj,jk)
+                  zl = gdept_n(ji,jj,jk)
                   IF    ( zl < gdept_1d(1  ) ) THEN          ! extrapolate above the first level of data
                      zup(jk) =  puvd(ji,jj,1    ,1)
@@ -222,25 +220,4 @@
       ENDIF
       !
-      IF( lwp .AND. kt == nit000 ) THEN   ! control print
-         WRITE(numout,*) ' U current '
-         WRITE(numout,*)
-         WRITE(numout,*)'  level = 1'
-         CALL prihre( puvd(:,:,1    ,1), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-         WRITE(numout,*)'  level = ', jpk/2
-         CALL prihre( puvd(:,:,jpk/2,1), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-         WRITE(numout,*)'  level = ', jpkm1
-         CALL prihre( puvd(:,:,jpkm1,1), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-         WRITE(numout,*)
-         WRITE(numout,*) ' V current '
-         WRITE(numout,*)
-         WRITE(numout,*)'  level = 1'
-         CALL prihre( puvd(:,:,1    ,2), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-         WRITE(numout,*)'  level = ', jpk/2
-         CALL prihre( puvd(:,:,jpk/2,2), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-         WRITE(numout,*)'  level = ', jpkm1
-         CALL prihre( puvd(:,:,jpkm1,2), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-         WRITE(numout,*)
-      ENDIF
-      !
       IF( .NOT. ln_uvd_dyndmp    ) THEN   !==   deallocate U & V current structure   ==! 
          !                                !==   (data used only for initialization)  ==!
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90	(revision 5845)
@@ -43,5 +43,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -204,5 +203,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  IF( fsdept(ji,jj,jk) >= hmlp (ji,jj) ) THEN
+                  IF( gdept_n(ji,jj,jk) >= hmlp (ji,jj) ) THEN
                      zua = resto_uv(ji,jj,jk) * ( zuv_dta(ji,jj,jk,1) - ub(ji,jj,jk) )
                      zva = resto_uv(ji,jj,jk) * ( zuv_dta(ji,jj,jk,2) - vb(ji,jj,jk) )
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90	(revision 5845)
@@ -28,5 +28,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "zdfddm_substitute.h90"
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crs.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crs.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crs.F90	(revision 5845)
@@ -11,9 +11,7 @@
    USE in_out_manager
 
-
    IMPLICIT NONE
    PUBLIC
 
-   
    PUBLIC crs_dom_alloc  ! Called from crsini.F90
    PUBLIC crs_dom_alloc2  ! Called from crsini.F90
@@ -161,8 +159,9 @@
       INTEGER,  PUBLIC, ALLOCATABLE, DIMENSION(:,:)    ::  nmln_crs, hmld_crs, hmlp_crs, hmlpt_crs                       
 
-      ! Direction of lateral diffusion
-
-
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
    !! $Id$
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
    
@@ -258,5 +257,6 @@
 
    END FUNCTION crs_dom_alloc
-   
+
+
    INTEGER FUNCTION crs_dom_alloc2()
       !!-------------------------------------------------------------------
@@ -272,5 +272,6 @@
       crs_dom_alloc2 = MAXVAL(ierr)
 
-      END FUNCTION crs_dom_alloc2
+   END FUNCTION crs_dom_alloc2
+
 
    SUBROUTINE dom_grid_glo
@@ -312,4 +313,5 @@
    END SUBROUTINE dom_grid_glo
 
+
    SUBROUTINE dom_grid_crs
       !!--------------------------------------------------------------------
@@ -318,5 +320,4 @@
       !! ** Purpose :  Save the parent grid information & Switch to coarse grid domain
       !!---------------------------------------------------------------------
-
       !
       !                        Switch to coarse grid domain
@@ -349,10 +350,7 @@
       nlejt(:)  = nlejt_crs(:)
       njmppt(:) = njmppt_crs(:)
-
-
       !
    END SUBROUTINE dom_grid_crs
    
-      
    !!======================================================================
 
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90	(revision 5845)
@@ -30,13 +30,12 @@
    !!       Original.   May 2012.  (J. Simeon, C. Calone, G. Madec, C. Ethe)
    !!===================================================================
-
    USE dom_oce        ! ocean space and time domain and to get jperio
-   USE wrk_nemo       ! work arrays
    USE crs            ! domain for coarse grid
+   !
    USE in_out_manager 
    USE par_kind
    USE crslbclnk
+   USE wrk_nemo       ! work arrays
    USE lib_mpp
-   
 
    IMPLICIT NONE
@@ -54,10 +53,10 @@
    REAL(wp) :: r_inf = 1e+36
 
-   !! Substitutions
-#  include "domzgr_substitute.h90"
-   
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
    !! $Id$
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
-
 
    SUBROUTINE crs_dom_msk
@@ -133,4 +132,5 @@
    END SUBROUTINE crs_dom_msk
 
+
    SUBROUTINE crs_dom_coordinates( p_gphi, p_glam, cd_type, p_gphi_crs, p_glam_crs )
       !!----------------------------------------------------------------
@@ -334,5 +334,5 @@
       !!              cd_type     = grid type (T,U,V,F) for scale factors; for velocities (U or V)
       !!              cd_op       = applied operation (SUM, VOL, WGT)
-      !!              p_fse3      = (Optional) parent grid vertical level thickness (fse3u or fse3v)
+      !!              p_e3      = (Optional) parent grid vertical level thickness (e3u or e3v)
       !! ** Outputs : p_cfield2d_1 = (Optional) 2D field on coarse grid
       !!              p_cfield2d_2 = (Optional) 2D field on coarse grid
@@ -348,5 +348,5 @@
       REAL(wp), DIMENSION(jpi,jpj)            , INTENT(in)  :: p_e1     ! Parent grid U,V scale factors (e1)
       REAL(wp), DIMENSION(jpi,jpj)            , INTENT(in)  :: p_e2     ! Parent grid U,V scale factors (e2)
-      REAL(wp), DIMENSION(jpi,jpj,jpk)        , INTENT(in)  :: p_e3     ! Parent grid vertical level thickness (fse3u, fse3v)
+      REAL(wp), DIMENSION(jpi,jpj,jpk)        , INTENT(in)  :: p_e3     ! Parent grid vertical level thickness (e3u, e3v)
 
       REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(out) :: p_fld1_crs ! Coarse grid box 3D quantity 
@@ -469,5 +469,5 @@
       !!              p_pmask     = parent grid mask (T,U,V,F) for scale factors; 
       !!                                       for velocities (U or V)
-      !!              p_fse3      = parent grid vertical level thickness (fse3u or fse3v)
+      !!              p_e3      = parent grid vertical level thickness (e3u or e3v)
       !!              p_pfield    = U or V on the parent grid
       !!              p_surf_crs  = (Optional) Coarse grid weight for averaging
@@ -478,6 +478,4 @@
       !!            5 Jun.  Streamline for area-weighted average only ; separate scale factor and weights.
       !!----------------------------------------------------------------
-      !! 
-      !!  Arguments
       REAL(wp), DIMENSION(jpi,jpj,jpk),         INTENT(in)           :: p_fld   ! T, U, V or W on parent grid
       CHARACTER(len=3),                         INTENT(in)           :: cd_op    ! Operation SUM, MAX or MIN
@@ -485,13 +483,10 @@
       REAL(wp), DIMENSION(jpi,jpj,jpk),         INTENT(in)           :: p_mask    ! Parent grid T,U,V mask
       REAL(wp), DIMENSION(jpi,jpj),             INTENT(in), OPTIONAL :: p_e12    ! Parent grid T,U,V scale factors (e1 or e2)
-      REAL(wp), DIMENSION(jpi,jpj,jpk),         INTENT(in), OPTIONAL :: p_e3     ! Parent grid vertical level thickness (fse3u, fse3v)
+      REAL(wp), DIMENSION(jpi,jpj,jpk),         INTENT(in), OPTIONAL :: p_e3     ! Parent grid vertical level thickness (e3u, e3v)
       REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(in), OPTIONAL :: p_surf_crs ! Coarse grid area-weighting denominator    
       REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(in), OPTIONAL :: p_mask_crs    ! Coarse grid T,U,V maska
       REAL(wp),                                 INTENT(in)           :: psgn    ! sign 
-
-
-      REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(out)          :: p_fld_crs ! Coarse grid box 3D quantity 
-
-      !! Local variables
+      REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(  out)        :: p_fld_crs ! Coarse grid box 3D quantity 
+      !
       INTEGER  :: ji, jj, jk 
       INTEGER  :: ii, ij, ijie, ijje, je_2
@@ -499,7 +494,7 @@
       REAL(wp), DIMENSION(:,:,:), POINTER :: zsurf, zsurfmsk, zmask  
       !!----------------------------------------------------------------  
-   
-      p_fld_crs(:,:,:) = 0.0
-
+      !
+      p_fld_crs(:,:,:) = 0._wp
+      !
       SELECT CASE ( cd_op )
       
@@ -1136,5 +1131,5 @@
       !!              p_pmask     = parent grid mask (T,U,V,F) for scale factors; 
       !!                                       for velocities (U or V)
-      !!              p_fse3      = parent grid vertical level thickness (fse3u or fse3v)
+      !!              p_e3      = parent grid vertical level thickness (e3u or e3v)
       !!              p_pfield    = U or V on the parent grid
       !!              p_surf_crs  = (Optional) Coarse grid weight for averaging
@@ -1152,5 +1147,5 @@
       REAL(wp), DIMENSION(jpi,jpj,jpk),         INTENT(in)           :: p_mask    ! Parent grid T,U,V mask
       REAL(wp), DIMENSION(jpi,jpj),             INTENT(in), OPTIONAL :: p_e12    ! Parent grid T,U,V scale factors (e1 or e2)
-      REAL(wp), DIMENSION(jpi,jpj,jpk),         INTENT(in), OPTIONAL :: p_e3     ! Parent grid vertical level thickness (fse3u, fse3v)
+      REAL(wp), DIMENSION(jpi,jpj,jpk),         INTENT(in), OPTIONAL :: p_e3     ! Parent grid vertical level thickness (e3u, e3v)
       REAL(wp), DIMENSION(jpi_crs,jpj_crs)    , INTENT(in), OPTIONAL :: p_surf_crs ! Coarse grid area-weighting denominator    
       REAL(wp), DIMENSION(jpi_crs,jpj_crs,jpk), INTENT(in), OPTIONAL :: p_mask_crs    ! Coarse grid T,U,V mask
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crsdomwri.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crsdomwri.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crsdomwri.F90	(revision 5845)
@@ -33,5 +33,9 @@
    PUBLIC crs_dom_wri        ! routine called by crsini.F90
 
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
    !! $Id$
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
 
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crsfld.F90	(revision 5845)
@@ -33,6 +33,4 @@
 
    !! * Substitutions
-#  include "zdfddm_substitute.h90"
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -61,5 +59,5 @@
       REAL(wp) ::   z2dcrsu, z2dcrsv  ! local scalars
       !
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zfse3t, zfse3u, zfse3v, zfse3w   ! 3D workspace for e3
+      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ze3t, ze3u, ze3v, ze3w   ! 3D workspace for e3
       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zt, zt_crs
       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zs, zs_crs  
@@ -69,15 +67,15 @@
 
       !  Initialize arrays
-      CALL wrk_alloc( jpi,jpj,jpk,   zfse3t, zfse3w )
-      CALL wrk_alloc( jpi,jpj,jpk,   zfse3u, zfse3v )
-      CALL wrk_alloc( jpi,jpj,jpk,   zt    , zs     )
-      !
-      CALL wrk_alloc( jpi_crs, jpj_crs, jpk, zt_crs, zs_crs )
+      CALL wrk_alloc( jpi,jpj,jpk,   ze3t, ze3w )
+      CALL wrk_alloc( jpi,jpj,jpk,   ze3u, ze3v )
+      CALL wrk_alloc( jpi,jpj,jpk,   zt  , zs   )
+      !
+      CALL wrk_alloc( jpi_crs,jpj_crs,jpk,   zt_crs, zs_crs )
 
       ! Depth work arrrays
-      zfse3t(:,:,:) = fse3t(:,:,:)
-      zfse3u(:,:,:) = fse3u(:,:,:)
-      zfse3v(:,:,:) = fse3v(:,:,:)
-      zfse3w(:,:,:) = fse3w(:,:,:)
+      ze3t(:,:,:) = e3t_n(:,:,:)
+      ze3u(:,:,:) = e3u_n(:,:,:)
+      ze3v(:,:,:) = e3v_n(:,:,:)
+      ze3w(:,:,:) = e3w_n(:,:,:)
 
       IF( kt == nit000  ) THEN
@@ -107,5 +105,5 @@
       !  Temperature
       zt(:,:,:) = tsn(:,:,:,jp_tem)  ;      zt_crs(:,:,:) = 0._wp
-      CALL crs_dom_ope( zt, 'VOL', 'T', tmask, zt_crs, p_e12=e1e2t, p_e3=zfse3t, psgn=1.0 )
+      CALL crs_dom_ope( zt, 'VOL', 'T', tmask, zt_crs, p_e12=e1e2t, p_e3=ze3t, psgn=1.0 )
       tsn_crs(:,:,:,jp_tem) = zt_crs(:,:,:)
 
@@ -116,5 +114,5 @@
       !  Salinity
       zs(:,:,:) = tsn(:,:,:,jp_sal)  ;      zs_crs(:,:,:) = 0._wp
-      CALL crs_dom_ope( zs, 'VOL', 'T', tmask, zs_crs, p_e12=e1e2t, p_e3=zfse3t, psgn=1.0 )
+      CALL crs_dom_ope( zs, 'VOL', 'T', tmask, zs_crs, p_e12=e1e2t, p_e3=ze3t, psgn=1.0 )
       tsn_crs(:,:,:,jp_sal) = zt_crs(:,:,:)
 
@@ -123,5 +121,5 @@
 
       !  U-velocity
-      CALL crs_dom_ope( un, 'SUM', 'U', umask, un_crs, p_e12=e2u, p_e3=zfse3u, p_surf_crs=e2e3u_msk, psgn=-1.0 )
+      CALL crs_dom_ope( un, 'SUM', 'U', umask, un_crs, p_e12=e2u, p_e3=ze3u, p_surf_crs=e2e3u_msk, psgn=-1.0 )
       !
       zt(:,:,:) = 0._wp     ;    zs(:,:,:) = 0._wp  ;   zt_crs(:,:,:) = 0._wp   ;    zs_crs(:,:,:) = 0._wp
@@ -134,6 +132,6 @@
          END DO
       END DO
-      CALL crs_dom_ope( zt, 'SUM', 'U', umask, zt_crs, p_e12=e2u, p_e3=zfse3u, p_surf_crs=e2e3u_msk, psgn=-1.0 )
-      CALL crs_dom_ope( zs, 'SUM', 'U', umask, zs_crs, p_e12=e2u, p_e3=zfse3u, p_surf_crs=e2e3u_msk, psgn=-1.0 )
+      CALL crs_dom_ope( zt, 'SUM', 'U', umask, zt_crs, p_e12=e2u, p_e3=ze3u, p_surf_crs=e2e3u_msk, psgn=-1.0 )
+      CALL crs_dom_ope( zs, 'SUM', 'U', umask, zs_crs, p_e12=e2u, p_e3=ze3u, p_surf_crs=e2e3u_msk, psgn=-1.0 )
 
       CALL iom_put( "uoce"  , un_crs )   ! i-current 
@@ -142,5 +140,5 @@
 
       !  V-velocity
-      CALL crs_dom_ope( vn, 'SUM', 'V', vmask, vn_crs, p_e12=e1v, p_e3=zfse3v, p_surf_crs=e1e3v_msk, psgn=-1.0 )
+      CALL crs_dom_ope( vn, 'SUM', 'V', vmask, vn_crs, p_e12=e1v, p_e3=ze3v, p_surf_crs=e1e3v_msk, psgn=-1.0 )
       !                                                                                 
       zt(:,:,:) = 0._wp     ;    zs(:,:,:) = 0._wp  ;   zt_crs(:,:,:) = 0._wp   ;    zs_crs(:,:,:) = 0._wp
@@ -153,6 +151,6 @@
          END DO
       END DO
-      CALL crs_dom_ope( zt, 'SUM', 'V', vmask, zt_crs, p_e12=e1v, p_e3=zfse3v, p_surf_crs=e1e3v_msk, psgn=-1.0 )
-      CALL crs_dom_ope( zs, 'SUM', 'V', vmask, zs_crs, p_e12=e1v, p_e3=zfse3v, p_surf_crs=e1e3v_msk, psgn=-1.0 )
+      CALL crs_dom_ope( zt, 'SUM', 'V', vmask, zt_crs, p_e12=e1v, p_e3=ze3v, p_surf_crs=e1e3v_msk, psgn=-1.0 )
+      CALL crs_dom_ope( zs, 'SUM', 'V', vmask, zs_crs, p_e12=e1v, p_e3=ze3v, p_surf_crs=e1e3v_msk, psgn=-1.0 )
  
       CALL iom_put( "voce"  , vn_crs )   ! i-current 
@@ -162,5 +160,5 @@
      
       !  Kinetic energy
-      CALL crs_dom_ope( rke, 'VOL', 'T', tmask, rke_crs, p_e12=e1e2t, p_e3=zfse3t, psgn=1.0 )
+      CALL crs_dom_ope( rke, 'VOL', 'T', tmask, rke_crs, p_e12=e1e2t, p_e3=ze3t, psgn=1.0 )
       CALL iom_put( "eken", rke_crs )
 
@@ -188,5 +186,5 @@
       IF( ln_crs_wn ) THEN
          CALL crs_dom_ope( wn, 'SUM', 'W', tmask, wn_crs, p_e12=e1e2t, p_surf_crs=e1e2w_msk, psgn=1.0 )
-       !  CALL crs_dom_ope( wn, 'VOL', 'W', tmask, wn_crs, p_e12=e1e2t, p_e3=zfse3w )
+       !  CALL crs_dom_ope( wn, 'VOL', 'W', tmask, wn_crs, p_e12=e1e2t, p_e3=ze3w )
       ELSE
         wn_crs(:,:,jpk) = 0._wp
@@ -199,11 +197,12 @@
 
       !  avt, avs
+!!gm BUG   TOP always uses avs !!!
       SELECT CASE ( nn_crs_kz )
          CASE ( 0 )
-            CALL crs_dom_ope( avt, 'VOL', 'W', tmask, avt_crs, p_e12=e1e2t, p_e3=zfse3w, psgn=1.0 )
+            CALL crs_dom_ope( avt, 'VOL', 'W', tmask, avt_crs, p_e12=e1e2t, p_e3=ze3w, psgn=1.0 )
          CASE ( 1 )
-            CALL crs_dom_ope( avt, 'MAX', 'W', tmask, avt_crs, p_e12=e1e2t, p_e3=zfse3w, psgn=1.0 )
+            CALL crs_dom_ope( avt, 'MAX', 'W', tmask, avt_crs, p_e12=e1e2t, p_e3=ze3w, psgn=1.0 )
          CASE ( 2 )
-            CALL crs_dom_ope( avt, 'MIN', 'W', tmask, avt_crs, p_e12=e1e2t, p_e3=zfse3w, psgn=1.0 )
+            CALL crs_dom_ope( avt, 'MIN', 'W', tmask, avt_crs, p_e12=e1e2t, p_e3=ze3w, psgn=1.0 )
       END SELECT
       !
@@ -211,5 +210,5 @@
       
       !  sbc fields  
-      CALL crs_dom_ope( sshn , 'VOL', 'T', tmask, sshn_crs , p_e12=e1e2t, p_e3=zfse3t         , psgn=1.0 )  
+      CALL crs_dom_ope( sshn , 'VOL', 'T', tmask, sshn_crs , p_e12=e1e2t, p_e3=ze3t           , psgn=1.0 )  
       CALL crs_dom_ope( utau , 'SUM', 'U', umask, utau_crs , p_e12=e2u  , p_surf_crs=e2u_crs  , psgn=1.0 )
       CALL crs_dom_ope( vtau , 'SUM', 'V', vmask, vtau_crs , p_e12=e1v  , p_surf_crs=e1v_crs  , psgn=1.0 )
@@ -233,8 +232,8 @@
 
       !  free memory
-      CALL wrk_dealloc( jpi, jpj, jpk, zfse3t, zfse3w )
-      CALL wrk_dealloc( jpi, jpj, jpk, zfse3u, zfse3v )
-      CALL wrk_dealloc( jpi, jpj, jpk, zt, zs       )
-      CALL wrk_dealloc( jpi_crs, jpj_crs, jpk, zt_crs, zs_crs )
+      CALL wrk_dealloc( jpi,jpj,jpk,   ze3t, ze3w )
+      CALL wrk_dealloc( jpi,jpj,jpk,   ze3u, ze3v )
+      CALL wrk_dealloc( jpi,jpj,jpk,   zt  , zs   )
+      CALL wrk_dealloc( jpi_crs,jpj_crs,jpk,   zt_crs, zs_crs )
       !
       CALL iom_swap( "nemo" )     ! return back on high-resolution grid
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crsini.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crsini.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crsini.F90	(revision 5845)
@@ -30,8 +30,8 @@
    PUBLIC   crs_init   ! called by nemogcm.F90 module
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
-   !!----------------------------------------------------------------------
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
    !! $Id$
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 CONTAINS
@@ -64,5 +64,5 @@
       !! output C*dA or C*dV as summation not mran, then do mean (division) at moment of output.
       !! As is, crsfun takes into account vvl.   
-      !!      Talked about pre-setting the surface array to avoid IF/ENDIFS and division.
+      !!      Talked about pre-setting the surface array to avoid IF/ENDIF and division.
       !!      But have then to make that preset array here and elsewhere.
       !!      that is called every timestep...
@@ -73,5 +73,5 @@
       INTEGER  :: ierr                                ! allocation error status
       INTEGER  ::   ios                 ! Local integer output status for namelist read
-      REAL(wp), DIMENSION(:,:,:), POINTER :: zfse3t, zfse3u, zfse3v, zfse3w
+      REAL(wp), DIMENSION(:,:,:), POINTER :: ze3t, ze3u, ze3v, ze3w
 
       NAMELIST/namcrs/ nn_factx, nn_facty, nn_binref, nn_msh_crs, nn_crs_kz, ln_crs_wn
@@ -187,15 +187,15 @@
      
      !
-     CALL wrk_alloc( jpi,jpj,jpk,   zfse3t, zfse3u, zfse3v, zfse3w )
-     !
-     zfse3t(:,:,:) = fse3t(:,:,:)
-     zfse3u(:,:,:) = fse3u(:,:,:)
-     zfse3v(:,:,:) = fse3v(:,:,:)
-     zfse3w(:,:,:) = fse3w(:,:,:)
+     CALL wrk_alloc( jpi,jpj,jpk,   ze3t, ze3u, ze3v, ze3w )
+     !
+     ze3t(:,:,:) = e3t_n(:,:,:)
+     ze3u(:,:,:) = e3u_n(:,:,:)
+     ze3v(:,:,:) = e3v_n(:,:,:)
+     ze3w(:,:,:) = e3w_n(:,:,:)
 
      !    3.d.2   Surfaces 
-     CALL crs_dom_sfc( tmask, 'W', e1e2w_crs, e1e2w_msk, p_e1=e1t, p_e2=e2t    )
-     CALL crs_dom_sfc( umask, 'U', e2e3u_crs, e2e3u_msk, p_e2=e2u, p_e3=zfse3u )
-     CALL crs_dom_sfc( vmask, 'V', e1e3v_crs, e1e3v_msk, p_e1=e1v, p_e3=zfse3v )
+     CALL crs_dom_sfc( tmask, 'W', e1e2w_crs, e1e2w_msk, p_e1=e1t, p_e2=e2t  )
+     CALL crs_dom_sfc( umask, 'U', e2e3u_crs, e2e3u_msk, p_e2=e2u, p_e3=ze3u )
+     CALL crs_dom_sfc( vmask, 'V', e1e3v_crs, e1e3v_msk, p_e1=e1v, p_e3=ze3v )
    
      facsurfu(:,:,:) = umask_crs(:,:,:) * e2e3u_msk(:,:,:) / e2e3u_crs(:,:,:)
@@ -204,8 +204,8 @@
      !    3.d.3   Vertical scale factors
      !
-     CALL crs_dom_e3( e1t, e2t, zfse3t, e1e2w_crs, 'T', tmask, e3t_crs, e3t_max_crs)
-     CALL crs_dom_e3( e1u, e2u, zfse3u, e2e3u_crs, 'U', umask, e3u_crs, e3u_max_crs)
-     CALL crs_dom_e3( e1v, e2v, zfse3v, e1e3v_crs, 'V', vmask, e3v_crs, e3v_max_crs)
-     CALL crs_dom_e3( e1t, e2t, zfse3w, e1e2w_crs, 'W', tmask, e3w_crs, e3w_max_crs)
+     CALL crs_dom_e3( e1t, e2t, ze3t, e1e2w_crs, 'T', tmask, e3t_crs, e3t_max_crs)
+     CALL crs_dom_e3( e1u, e2u, ze3u, e2e3u_crs, 'U', umask, e3u_crs, e3u_max_crs)
+     CALL crs_dom_e3( e1v, e2v, ze3v, e1e3v_crs, 'V', vmask, e3v_crs, e3v_max_crs)
+     CALL crs_dom_e3( e1t, e2t, ze3w, e1e2w_crs, 'W', tmask, e3w_crs, e3w_max_crs)
 
      ! Replace 0 by e3t_0 or e3w_0
@@ -222,6 +222,6 @@
 
      !    3.d.3   Vertical depth (meters)
-     CALL crs_dom_ope( gdept_0, 'MAX', 'T', tmask, gdept_crs, p_e3=zfse3t, psgn=1.0 ) 
-     CALL crs_dom_ope( gdepw_0, 'MAX', 'W', tmask, gdepw_crs, p_e3=zfse3w, psgn=1.0 )
+     CALL crs_dom_ope( gdept_0, 'MAX', 'T', tmask, gdept_crs, p_e3=ze3t, psgn=1.0 ) 
+     CALL crs_dom_ope( gdepw_0, 'MAX', 'W', tmask, gdepw_crs, p_e3=ze3w, psgn=1.0 )
 
 
@@ -230,5 +230,5 @@
      !---------------------------------------------------------
      ! 4.a. Ocean volume or area unmasked and masked
-     CALL crs_dom_facvol( tmask, 'T', e1t, e2t, zfse3t, ocean_volume_crs_t, facvol_t )
+     CALL crs_dom_facvol( tmask, 'T', e1t, e2t, ze3t, ocean_volume_crs_t, facvol_t )
      !
      bt_crs(:,:,:) = ocean_volume_crs_t(:,:,:) * facvol_t(:,:,:)
@@ -237,5 +237,5 @@
      WHERE( bt_crs /= 0._wp ) r1_bt_crs(:,:,:) = 1._wp / bt_crs(:,:,:)
 
-     CALL crs_dom_facvol( tmask, 'W', e1t, e2t, zfse3w, ocean_volume_crs_w, facvol_w )
+     CALL crs_dom_facvol( tmask, 'W', e1t, e2t, ze3w, ocean_volume_crs_w, facvol_w )
      !
      !---------------------------------------------------------
@@ -252,5 +252,5 @@
       ! 7. Finish and clean-up
       !---------------------------------------------------------
-      CALL wrk_dealloc( jpi,jpj,jpk,   zfse3t, zfse3u, zfse3v, zfse3w )
+      CALL wrk_dealloc( jpi,jpj,jpk,   ze3t, ze3u, ze3v, ze3w )
       !
    END SUBROUTINE crs_init
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crslbclnk.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crslbclnk.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/CRS/crslbclnk.F90	(revision 5845)
@@ -7,5 +7,5 @@
    !!=====================================================================
    !! History :   ! 2012-06  (J. Simeon, G. Madec, C. Ethe, C. Calone)     Original code
-
+   !!----------------------------------------------------------------------
    USE dom_oce
    USE crs
@@ -13,6 +13,4 @@
    USE par_kind, ONLY: wp
    USE in_out_manager
-
-   
    
    INTERFACE crs_lbc_lnk
@@ -22,5 +20,9 @@
    PUBLIC crs_lbc_lnk
    
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
    !! $Id$
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
 
@@ -35,5 +37,4 @@
       !!                Upon exiting, switch back to full domain indices.
       !!----------------------------------------------------------------------
-      !! Arguments
       CHARACTER(len=1)                , INTENT(in   )           ::   cd_type1 ! grid type
       REAL(wp)                        , INTENT(in   )           ::   psgn     ! control of the sign
@@ -42,9 +43,7 @@
       REAL(wp)                        , INTENT(in   ), OPTIONAL ::   pval     ! valeur sur les halo
       CHARACTER(len=3)                , INTENT(in   ), OPTIONAL ::   cd_mpp    ! MPP only (here do nothing)
-      
-      !! local vairables
+      !
       LOGICAL                                                   ::   ll_grid_crs
       REAL(wp)                                                  ::   zval     ! valeur sur les halo
-
       !!----------------------------------------------------------------------
       
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 5845)
@@ -40,6 +40,4 @@
    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   sn0          ! initial salinity
       
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -99,9 +97,9 @@
       ztsn(:,:,:,jp_tem) = tsn(:,:,:,jp_tem)                    ! thermosteric ssh
       ztsn(:,:,:,jp_sal) = sn0(:,:,:)
-      CALL eos( ztsn, zrhd, fsdept_n(:,:,:) )                       ! now in situ density using initial salinity
+      CALL eos( ztsn, zrhd, gdept_n(:,:,:) )                       ! now in situ density using initial salinity
       !
       zbotpres(:,:) = 0._wp                        ! no atmospheric surface pressure, levitating sea-ice
       DO jk = 1, jpkm1
-         zbotpres(:,:) = zbotpres(:,:) + fse3t(:,:,jk) * zrhd(:,:,jk)
+         zbotpres(:,:) = zbotpres(:,:) + e3t_n(:,:,jk) * zrhd(:,:,jk)
       END DO
       IF( .NOT.lk_vvl ) THEN
@@ -123,5 +121,5 @@
       
       !                                         ! steric sea surface height
-      CALL eos( tsn, zrhd, zrhop, fsdept_n(:,:,:) )                 ! now in situ and potential density
+      CALL eos( tsn, zrhd, zrhop, gdept_n(:,:,:) )                 ! now in situ and potential density
       zrhop(:,:,jpk) = 0._wp
       CALL iom_put( 'rhop', zrhop )
@@ -129,5 +127,5 @@
       zbotpres(:,:) = 0._wp                        ! no atmospheric surface pressure, levitating sea-ice
       DO jk = 1, jpkm1
-         zbotpres(:,:) = zbotpres(:,:) + fse3t(:,:,jk) * zrhd(:,:,jk)
+         zbotpres(:,:) = zbotpres(:,:) + e3t_n(:,:,jk) * zrhd(:,:,jk)
       END DO
       IF( .NOT.lk_vvl ) THEN
@@ -159,5 +157,5 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               zztmp = area(ji,jj) * fse3t(ji,jj,jk)
+               zztmp = area(ji,jj) * e3t_n(ji,jj,jk)
                ztemp = ztemp + zztmp * tsn(ji,jj,jk,jp_tem)
                zsal  = zsal  + zztmp * tsn(ji,jj,jk,jp_sal)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90	(revision 5845)
@@ -30,5 +30,4 @@
   !!   
   !!----------------------------------------------------------------------
-  !! * Modules used
   USE oce             ! ocean dynamics and tracers
   USE dom_oce         ! ocean space and time domain
@@ -51,5 +50,4 @@
   PRIVATE
 
-  !! * Routine accessibility
   PUBLIC   dia_dct      ! routine called by step.F90
   PUBLIC   dia_dct_init ! routine called by opa.F90
@@ -60,10 +58,6 @@
   PRIVATE  dia_dct_wri
 
-#include "domzgr_substitute.h90"
-
-  !! * Shared module variables
   LOGICAL, PUBLIC, PARAMETER ::   lk_diadct = .TRUE.   !: model-data diagnostics flag
 
-  !! * Module variables
   INTEGER :: nn_dct        ! Frequency of computation
   INTEGER :: nn_dctwri     ! Frequency of output
@@ -112,7 +106,10 @@
   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:)   ::  transports_2d  
 
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
    !! $Id$
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
-
  
   INTEGER FUNCTION diadct_alloc() 
@@ -130,4 +127,5 @@
  
   END FUNCTION diadct_alloc 
+
 
   SUBROUTINE dia_dct_init
@@ -208,8 +206,6 @@
      !!               Reinitialise all relevant arrays to zero 
      !!---------------------------------------------------------------------
-     !! * Arguments
-     INTEGER,INTENT(IN)        ::kt
-
-     !! * Local variables
+     INTEGER,INTENT(in)        ::kt
+     !
      INTEGER             :: jsec,            &! loop on sections
                             itotal            ! nb_sec_max*nb_type_class*nb_class_max
@@ -220,6 +216,6 @@
      REAL(wp), POINTER, DIMENSION(:)    :: zwork !   "  
      REAL(wp), POINTER, DIMENSION(:,:,:):: zsum  !   "
-
      !!---------------------------------------------------------------------    
+     !
      IF( nn_timing == 1 )   CALL timing_start('dia_dct')
 
@@ -619,5 +615,5 @@
                             zumid_ice, zvmid_ice,                &!U/V ice velocity 
                             zTnorm                                !transport of velocity through one cell's sides 
-     REAL(wp)            :: ztn, zsn, zrhoi, zrhop, zsshn, zfsdep !temperature/salinity/potential density/ssh/depth at u/v point
+     REAL(wp)            :: ztn, zsn, zrhoi, zrhop, zsshn, zdep !temperature/salinity/potential density/ssh/depth at u/v point
 
      TYPE(POINT_SECTION) :: k
@@ -723,5 +719,5 @@
               END SELECT 
  
-              zfsdep= fsdept(k%I,k%J,jk) 
+              zdep= gdept_n(k%I,k%J,jk) 
   
               !compute velocity with the correct direction 
@@ -737,6 +733,6 @@
               !zTnorm=transport through one cell; 
               !velocity* cell's length * cell's thickness 
-              zTnorm=zumid*e2u(k%I,k%J)*  fse3u(k%I,k%J,jk)+     & 
-                     zvmid*e1v(k%I,k%J)*  fse3v(k%I,k%J,jk) 
+              zTnorm=zumid*e2u(k%I,k%J)*  e3u_n(k%I,k%J,jk)+     & 
+                     zvmid*e1v(k%I,k%J)*  e3v_n(k%I,k%J,jk) 
 
 #if ! defined key_vvl
@@ -828,5 +824,4 @@
      !! 
      !!------------------------------------------------------------- 
-     !! * arguments 
      TYPE(SECTION),INTENT(INOUT) :: sec 
      INTEGER      ,INTENT(IN)    :: jsec        ! numeric identifier of section 
@@ -834,5 +829,5 @@
      TYPE(POINT_SECTION) :: k 
      INTEGER  :: jk,jseg,jclass                        ! dummy variables for looping on level/segment/classes  
-     REAL(wp) :: ztn, zsn, zrhoi, zrhop, zsshn, zfsdep ! temperature/salinity/ssh/potential density /depth at u/v point 
+     REAL(wp) :: ztn, zsn, zrhoi, zrhop, zsshn, zdep ! temperature/salinity/ssh/potential density /depth at u/v point 
      !!------------------------------------------------------------- 
  
@@ -903,5 +898,5 @@
               END SELECT 
  
-              zfsdep= fsdept(k%I,k%J,jk) 
+              zdep= gdept_n(k%I,k%J,jk) 
   
               !------------------------------- 
@@ -932,6 +927,6 @@
                     ( sec%ztem(jclass) .EQ.99.)) .AND.                     & 
  
-                    ((( zfsdep .GE. sec%zlay(jclass)) .AND.                & 
-                    (   zfsdep .LE. sec%zlay(jclass+1))) .OR.              & 
+                    ((( zdep .GE. sec%zlay(jclass)) .AND.                & 
+                    (   zdep .LE. sec%zlay(jclass+1))) .OR.              & 
                     ( sec%zlay(jclass) .EQ. 99. ))                         & 
                                                                    ))   THEN 
@@ -1144,5 +1139,7 @@
 
      CALL wrk_dealloc(nb_type_class , zsumclasses )  
+     !
   END SUBROUTINE dia_dct_wri
+
 
   FUNCTION interp(ki, kj, kk, cd_point, ptab)
@@ -1214,5 +1211,5 @@
   !*local declations
   INTEGER :: ii1, ij1, ii2, ij2                                ! local integer
-  REAL(wp):: ze3t, zfse3, zwgt1, zwgt2, zbis, zdepu            ! local real
+  REAL(wp):: ze3t, ze3, zwgt1, zwgt2, zbis, zdepu            ! local real
   REAL(wp):: zet1, zet2                                        ! weight for interpolation 
   REAL(wp):: zdep1,zdep2                                       ! differences of depth
@@ -1241,7 +1238,7 @@
   IF( ln_sco )THEN   ! s-coordinate case
 
-     zdepu = ( fsdept(ii1,ij1,kk) +  fsdept(ii2,ij2,kk) ) /2 
-     zdep1 = fsdept(ii1,ij1,kk) - zdepu
-     zdep2 = fsdept(ii2,ij2,kk) - zdepu
+     zdepu = ( gdept_n(ii1,ij1,kk) +  gdept_n(ii2,ij2,kk) ) * 0.5_wp 
+     zdep1 = gdept_n(ii1,ij1,kk) - zdepu
+     zdep2 = gdept_n(ii2,ij2,kk) - zdepu
 
      ! weights
@@ -1255,17 +1252,7 @@
   ELSE       ! full step or partial step case 
 
-#if defined key_vvl
-
-     ze3t  = fse3t_n(ii2,ij2,kk) - fse3t_n(ii1,ij1,kk) 
-     zwgt1 = ( fse3w_n(ii2,ij2,kk) - fse3w_n(ii1,ij1,kk) ) / fse3w_n(ii2,ij2,kk)
-     zwgt2 = ( fse3w_n(ii1,ij1,kk) - fse3w_n(ii2,ij2,kk) ) / fse3w_n(ii1,ij1,kk)
-
-#else
-
-     ze3t  = fse3t(ii2,ij2,kk)   - fse3t(ii1,ij1,kk) 
-     zwgt1 = ( fse3w(ii2,ij2,kk) - fse3w(ii1,ij1,kk) ) / fse3w(ii2,ij2,kk)
-     zwgt2 = ( fse3w(ii1,ij1,kk) - fse3w(ii2,ij2,kk) ) / fse3w(ii1,ij1,kk)
-
-#endif
+     ze3t  = e3t_n(ii2,ij2,kk) - e3t_n(ii1,ij1,kk) 
+     zwgt1 = ( e3w_n(ii2,ij2,kk) - e3w_n(ii1,ij1,kk) ) / e3w_n(ii2,ij2,kk)
+     zwgt2 = ( e3w_n(ii1,ij1,kk) - e3w_n(ii2,ij2,kk) ) / e3w_n(ii1,ij1,kk)
 
      IF(kk .NE. 1)THEN
@@ -1288,7 +1275,6 @@
 
   ENDIF
-
-
-  END FUNCTION interp
+      !
+   END FUNCTION interp
 
 #else
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diadimg.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diadimg.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diadimg.F90	(revision 5845)
@@ -24,6 +24,4 @@
    REAL(sp), ALLOCATABLE, SAVE, DIMENSION(:)   :: z4dep   ! vertical level (sp)
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90	(revision 5845)
@@ -33,5 +33,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -40,5 +39,4 @@
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -80,5 +78,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zwei  = e1e2t(ji,jj) * fse3t(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
+                  zwei  = e1e2t(ji,jj) * e3t_n(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
                   a_salb = a_salb + ( tsb(ji,jj,jk,jp_sal) - zsm0 ) * zwei
                END DO
@@ -106,5 +104,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zwei  = e1e2t(ji,jj) * fse3t(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
+                  zwei  = e1e2t(ji,jj) * e3t_n(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
                   a_saln = a_saln + ( tsn(ji,jj,jk,jp_sal) - zsm0 ) * zwei
                   zvol  = zvol  + zwei
@@ -186,5 +184,5 @@
                   zt = 0.5 * ( tsn(ji,jj,jk,jp_tem) + tsn(ji+1,jj,jk,jp_tem) )
                   zs = 0.5 * ( tsn(ji,jj,jk,jp_sal) + tsn(ji+1,jj,jk,jp_sal) )
-                  zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) * tmask_i(ji,jj)
+                  zu = un(ji,jj,jk) * e3t_n(ji,jj,jk) * e2u(ji,jj) * tmask_i(ji,jj)
 
                   IF( un(ji,jj,jk) > 0.e0 ) THEN 
@@ -238,5 +236,5 @@
                   zt = 0.5 * ( tsn(ji,jj,jk,jp_tem) + tsn(ji+1,jj,jk,jp_tem) )
                   zs = 0.5 * ( tsn(ji,jj,jk,jp_sal) + tsn(ji+1,jj,jk,jp_sal) )
-                  zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) * tmask_i(ji,jj)
+                  zu = un(ji,jj,jk) * e3t_n(ji,jj,jk) * e2u(ji,jj) * tmask_i(ji,jj)
                   
                   IF( un(ji,jj,jk) > 0.e0 ) THEN 
@@ -290,5 +288,5 @@
                   zt = 0.5 * ( tsn(ji,jj,jk,jp_tem) + tsn(ji+1,jj,jk,jp_tem) )
                   zs = 0.5 * ( tsn(ji,jj,jk,jp_sal) + tsn(ji+1,jj,jk,jp_sal) )
-                  zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) * tmask_i(ji,jj)
+                  zu = un(ji,jj,jk) * e3t_n(ji,jj,jk) * e2u(ji,jj) * tmask_i(ji,jj)
                   
                   IF( un(ji,jj,jk) > 0.e0 ) THEN 
@@ -342,5 +340,5 @@
                   zt = 0.5 * ( tsn(ji,jj,jk,jp_tem) + tsn(ji+1,jj,jk,jp_tem) )
                   zs = 0.5 * ( tsn(ji,jj,jk,jp_sal) + tsn(ji+1,jj,jk,jp_sal) )
-                  zu = un(ji,jj,jk) * fse3t(ji,jj,jk) * e2u(ji,jj) * tmask_i(ji,jj)
+                  zu = un(ji,jj,jk) * e3t_n(ji,jj,jk) * e2u(ji,jj) * tmask_i(ji,jj)
                   
                   IF( un(ji,jj,jk) > 0.e0 ) THEN 
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 5845)
@@ -51,5 +51,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -165,11 +164,11 @@
          ! volume variation (calculated with scale factors)
          zdiff_v2 = zdiff_v2 + glob_sum( surf(:,:) * tmask(:,:,jk) &
-            &                           * ( fse3t_n(:,:,jk) - e3t_ini(:,:,jk) ) )
+            &                           * ( e3t_n(:,:,jk) - e3t_ini(:,:,jk) ) )
          ! heat content variation
          zdiff_hc = zdiff_hc + glob_sum(  surf(:,:) * tmask(:,:,jk) & 
-            &                           * ( fse3t_n(:,:,jk) * tsn(:,:,jk,jp_tem) - hc_loc_ini(:,:,jk) ) )
+            &                           * ( e3t_n(:,:,jk) * tsn(:,:,jk,jp_tem) - hc_loc_ini(:,:,jk) ) )
          ! salt content variation
          zdiff_sc = zdiff_sc + glob_sum(  surf(:,:) * tmask(:,:,jk)   &
-            &                           * ( fse3t_n(:,:,jk) * tsn(:,:,jk,jp_sal) - sc_loc_ini(:,:,jk) ) )
+            &                           * ( e3t_n(:,:,jk) * tsn(:,:,jk,jp_sal) - sc_loc_ini(:,:,jk) ) )
       ENDDO
 
@@ -191,5 +190,5 @@
       zvol_tot = 0._wp                    ! total ocean volume (calculated with scale factors)
       DO jk = 1, jpkm1
-         zvol_tot  = zvol_tot + glob_sum( surf(:,:) * tmask(:,:,jk) * fse3t_n(:,:,jk) )
+         zvol_tot  = zvol_tot + glob_sum( surf(:,:) * tmask(:,:,jk) * e3t_n(:,:,jk) )
       END DO
 
@@ -275,7 +274,7 @@
           ssh_ini(:,:) = sshn(:,:)                                       ! initial ssh
           DO jk = 1, jpk
-             e3t_ini   (:,:,jk) = fse3t_n(:,:,jk)                        ! initial vertical scale factors
-             hc_loc_ini(:,:,jk) = tsn(:,:,jk,jp_tem) * fse3t_n(:,:,jk)   ! initial heat content
-             sc_loc_ini(:,:,jk) = tsn(:,:,jk,jp_sal) * fse3t_n(:,:,jk)   ! initial salt content
+             e3t_ini   (:,:,jk) = e3t_n(:,:,jk)                        ! initial vertical scale factors
+             hc_loc_ini(:,:,jk) = tsn(:,:,jk,jp_tem) * e3t_n(:,:,jk)   ! initial heat content
+             sc_loc_ini(:,:,jk) = tsn(:,:,jk,jp_sal) * e3t_n(:,:,jk)   ! initial salt content
           END DO
           frc_v = 0._wp                                           ! volume       trend due to forcing
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90	(revision 5845)
@@ -20,4 +20,5 @@
    USE dom_oce         ! ocean space and time domain
    USE phycst          ! physical constants
+   !
    USE in_out_manager  ! I/O manager
    USE lib_mpp         ! MPP library
@@ -31,5 +32,6 @@
    PUBLIC   dia_hth_alloc ! routine called by nemogcm.F90
 
-   LOGICAL , PUBLIC, PARAMETER          ::   lk_diahth = .TRUE.    !: thermocline-20d depths flag
+   LOGICAL , PUBLIC, PARAMETER ::   lk_diahth = .TRUE.    !: thermocline-20d depths flag
+   
    ! note: following variables should move to local variables once iom_put is always used 
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hth    !: depth of the max vertical temperature gradient [m]
@@ -38,6 +40,4 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   htc3   !: heat content of first 300 m                    [W]
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 4.0 , NEMO Consortium (2011)
@@ -187,5 +187,5 @@
             DO ji = 1, jpi
                !
-               zzdep = fsdepw(ji,jj,jk)
+               zzdep = gdepw_n(ji,jj,jk)
                zztmp = ( tsn(ji,jj,jk-1,jp_tem) - tsn(ji,jj,jk,jp_tem) ) / zzdep * tmask(ji,jj,jk)   ! vertical gradient of temperature (dT/dz)
                zzdep = zzdep * tmask(ji,jj,1)
@@ -223,5 +223,5 @@
             DO ji = 1, jpi
                !
-               zzdep = fsdepw(ji,jj,jk) * tmask(ji,jj,1)
+               zzdep = gdepw_n(ji,jj,jk) * tmask(ji,jj,1)
                !
                zztmp = tsn(ji,jj,nla10,jp_tem) - tsn(ji,jj,jk,jp_tem)  ! - delta T(10m)
@@ -270,10 +270,10 @@
          DO ji = 1, jpi
             !
-            zzdep = fsdepw(ji,jj,mbkt(ji,jj)+1)       ! depth of the oean bottom
+            zzdep = gdepw_n(ji,jj,mbkt(ji,jj)+1)       ! depth of the oean bottom
             !
             iid = ik20(ji,jj)
             IF( iid /= 1 ) THEN 
-               zztmp =      fsdept(ji,jj,iid  )   &                     ! linear interpolation
-                  &  + (    fsdept(ji,jj,iid+1) - fsdept(ji,jj,iid)                       )   &
+               zztmp =      gdept_n(ji,jj,iid  )   &                     ! linear interpolation
+                  &  + (    gdept_n(ji,jj,iid+1) - gdept_n(ji,jj,iid)                       )   &
                   &  * ( 20.*tmask(ji,jj,iid+1) - tsn(ji,jj,iid,jp_tem)                       )   &
                   &  / ( tsn(ji,jj,iid+1,jp_tem) - tsn(ji,jj,iid,jp_tem) + (1.-tmask(ji,jj,1)) )
@@ -285,6 +285,6 @@
             iid = ik28(ji,jj)
             IF( iid /= 1 ) THEN 
-               zztmp =      fsdept(ji,jj,iid  )   &                     ! linear interpolation
-                  &  + (    fsdept(ji,jj,iid+1) - fsdept(ji,jj,iid)                       )   &
+               zztmp =      gdept_n(ji,jj,iid  )   &                     ! linear interpolation
+                  &  + (    gdept_n(ji,jj,iid+1) - gdept_n(ji,jj,iid)                       )   &
                   &  * ( 28.*tmask(ji,jj,iid+1) -    tsn(ji,jj,iid,jp_tem)                       )   &
                   &  / (  tsn(ji,jj,iid+1,jp_tem) -    tsn(ji,jj,iid,jp_tem) + (1.-tmask(ji,jj,1)) )
@@ -316,6 +316,6 @@
       ! integration down to ilevel
       DO jk = 1, ilevel
-         zthick(:,:) = zthick(:,:) + fse3t(:,:,jk)
-         htc3  (:,:) = htc3  (:,:) + fse3t(:,:,jk) * tsn(:,:,jk,jp_tem) * tmask(:,:,jk)
+         zthick(:,:) = zthick(:,:) + e3t_n(:,:,jk)
+         htc3  (:,:) = htc3  (:,:) + e3t_n(:,:,jk) * tsn(:,:,jk,jp_tem) * tmask(:,:,jk)
       END DO
       ! deepest layer
@@ -323,5 +323,5 @@
       DO jj = 1, jpj
          DO ji = 1, jpi
-            htc3(ji,jj) = htc3(ji,jj) + tsn(ji,jj,ilevel+1,jp_tem) * MIN( fse3t(ji,jj,ilevel+1), zthick(ji,jj) )  &
+            htc3(ji,jj) = htc3(ji,jj) + tsn(ji,jj,ilevel+1,jp_tem) * MIN( e3t_n(ji,jj,ilevel+1), zthick(ji,jj) )  &
                                                                    * tmask(ji,jj,ilevel+1)
          END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 5845)
@@ -59,7 +59,5 @@
    REAL(wp), TARGET, ALLOCATABLE, SAVE, DIMENSION(:,:)   :: p_fval2d
 
-
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -118,5 +116,5 @@
                DO jj = 1, jpj
                   DO ji = 1, jpi
-                     zsfc = e1t(ji,jj) * fse3t(ji,jj,jk)
+                     zsfc = e1t(ji,jj) * e3t_n(ji,jj,jk)
                      zmask(ji,jj,jk)      = tmask(ji,jj,jk)      * zsfc
                      zts(ji,jj,jk,jp_tem) = tsn(ji,jj,jk,jp_tem) * zsfc
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 5845)
@@ -30,4 +30,5 @@
    USE zdf_oce         ! ocean vertical physics
    USE ldftra          ! lateral physics: eddy diffusivity coef.
+   USE ldfdyn          ! lateral physics: eddy viscosity   coef.
    USE sol_oce         ! solver variables
    USE sbc_oce         ! Surface boundary condition: ocean fields
@@ -41,4 +42,5 @@
    USE zdfddm          ! vertical  physics: double diffusion
    USE diahth          ! thermocline diagnostics
+   !
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE in_out_manager  ! I/O manager
@@ -76,5 +78,4 @@
    !! * Substitutions
 #  include "zdfddm_substitute.h90"
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -146,8 +147,8 @@
 
       IF( .NOT.lk_vvl ) THEN
-         CALL iom_put( "e3t" , fse3t_n(:,:,:) )
-         CALL iom_put( "e3u" , fse3u_n(:,:,:) )
-         CALL iom_put( "e3v" , fse3v_n(:,:,:) )
-         CALL iom_put( "e3w" , fse3w_n(:,:,:) )
+         CALL iom_put( "e3t" , e3t_n(:,:,:) )
+         CALL iom_put( "e3u" , e3u_n(:,:,:) )
+         CALL iom_put( "e3v" , e3v_n(:,:,:) )
+         CALL iom_put( "e3w" , e3w_n(:,:,:) )
       ENDIF
 
@@ -266,5 +267,5 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  z2d(ji,jj) = z2d(ji,jj) + fse3t(ji,jj,jk) * tsn(ji,jj,jk,jp_tem) * tmask(ji,jj,jk)
+                  z2d(ji,jj) = z2d(ji,jj) + e3t_n(ji,jj,jk) * tsn(ji,jj,jk,jp_tem) * tmask(ji,jj,jk)
                END DO
             END DO
@@ -278,5 +279,5 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  z2d(ji,jj) = z2d(ji,jj) + fse3t(ji,jj,jk) * tsn(ji,jj,jk,jp_sal) * tmask(ji,jj,jk)
+                  z2d(ji,jj) = z2d(ji,jj) + e3t_n(ji,jj,jk) * tsn(ji,jj,jk,jp_sal) * tmask(ji,jj,jk)
                END DO
             END DO
@@ -290,11 +291,11 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zztmp   = 1._wp / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
-                  zztmpx  = 0.5 * (  un(ji-1,jj,jk) * un(ji-1,jj,jk) * e2u(ji-1,jj) * fse3u(ji-1,jj,jk)    &
-                     &             + un(ji  ,jj,jk) * un(ji  ,jj,jk) * e2u(ji  ,jj) * fse3u(ji  ,jj,jk) )  &
+                  zztmp   = 1._wp / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
+                  zztmpx  = 0.5 * (  un(ji-1,jj,jk) * un(ji-1,jj,jk) * e2u(ji-1,jj) * e3u_n(ji-1,jj,jk)    &
+                     &             + un(ji  ,jj,jk) * un(ji  ,jj,jk) * e2u(ji  ,jj) * e3u_n(ji  ,jj,jk) )  &
                      &          *  zztmp 
                   !
-                  zztmpy  = 0.5 * (  vn(ji,jj-1,jk) * vn(ji,jj-1,jk) * e1v(ji,jj-1) * fse3v(ji,jj-1,jk)    &
-                     &             + vn(ji,jj  ,jk) * vn(ji,jj  ,jk) * e1v(ji,jj  ) * fse3v(ji,jj  ,jk) )  &
+                  zztmpy  = 0.5 * (  vn(ji,jj-1,jk) * vn(ji,jj-1,jk) * e1v(ji,jj-1) * e3v_n(ji,jj-1,jk)    &
+                     &             + vn(ji,jj  ,jk) * vn(ji,jj  ,jk) * e1v(ji,jj  ) * e3v_n(ji,jj  ,jk) )  &
                      &          *  zztmp 
                   !
@@ -311,5 +312,5 @@
          z3d(:,:,jpk) = 0.e0
          DO jk = 1, jpkm1
-            z3d(:,:,jk) = rau0 * un(:,:,jk) * e2u(:,:) * fse3u(:,:,jk) * umask(:,:,jk)
+            z3d(:,:,jk) = rau0 * un(:,:,jk) * e2u(:,:) * e3u_n(:,:,jk) * umask(:,:,jk)
          END DO
          CALL iom_put( "u_masstr", z3d )                  ! mass transport in i-direction
@@ -346,5 +347,5 @@
          z3d(:,:,jpk) = 0.e0
          DO jk = 1, jpkm1
-            z3d(:,:,jk) = rau0 * vn(:,:,jk) * e1v(:,:) * fse3v(:,:,jk) * vmask(:,:,jk)
+            z3d(:,:,jk) = rau0 * vn(:,:,jk) * e1v(:,:) * e3v_n(:,:,jk) * vmask(:,:,jk)
          END DO
          CALL iom_put( "v_masstr", z3d )                  ! mass transport in j-direction
@@ -730,8 +731,8 @@
 
       IF( lk_vvl ) THEN
-         CALL histwrite( nid_T, "votemper", it, tsn(:,:,:,jp_tem) * fse3t_n(:,:,:) , ndim_T , ndex_T  )   ! heat content
-         CALL histwrite( nid_T, "vosaline", it, tsn(:,:,:,jp_sal) * fse3t_n(:,:,:) , ndim_T , ndex_T  )   ! salt content
-         CALL histwrite( nid_T, "sosstsst", it, tsn(:,:,1,jp_tem) * fse3t_n(:,:,1) , ndim_hT, ndex_hT )   ! sea surface heat content
-         CALL histwrite( nid_T, "sosaline", it, tsn(:,:,1,jp_sal) * fse3t_n(:,:,1) , ndim_hT, ndex_hT )   ! sea surface salinity content
+         CALL histwrite( nid_T, "votemper", it, tsn(:,:,:,jp_tem) * e3t_n(:,:,:) , ndim_T , ndex_T  )   ! heat content
+         CALL histwrite( nid_T, "vosaline", it, tsn(:,:,:,jp_sal) * e3t_n(:,:,:) , ndim_T , ndex_T  )   ! salt content
+         CALL histwrite( nid_T, "sosstsst", it, tsn(:,:,1,jp_tem) * e3t_n(:,:,1) , ndim_hT, ndex_hT )   ! sea surface heat content
+         CALL histwrite( nid_T, "sosaline", it, tsn(:,:,1,jp_sal) * e3t_n(:,:,1) , ndim_hT, ndex_hT )   ! sea surface salinity content
       ELSE
          CALL histwrite( nid_T, "votemper", it, tsn(:,:,:,jp_tem) , ndim_T , ndex_T  )   ! temperature
@@ -741,7 +742,7 @@
       ENDIF
       IF( lk_vvl ) THEN
-         zw3d(:,:,:) = ( ( fse3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2
-         CALL histwrite( nid_T, "vovvle3t", it, fse3t_n (:,:,:) , ndim_T , ndex_T  )   ! level thickness
-         CALL histwrite( nid_T, "vovvldep", it, fsdept_n(:,:,:) , ndim_T , ndex_T  )   ! t-point depth
+         zw3d(:,:,:) = ( ( e3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2
+         CALL histwrite( nid_T, "vovvle3t", it, e3t_n (:,:,:) , ndim_T , ndex_T  )   ! level thickness
+         CALL histwrite( nid_T, "vovvldep", it, gdept_n(:,:,:) , ndim_T , ndex_T  )   ! t-point depth
          CALL histwrite( nid_T, "vovvldef", it, zw3d             , ndim_T , ndex_T  )   ! level thickness deformation
       ENDIF
@@ -913,4 +914,14 @@
       CALL histdef( id_i, "vovecrtz", "Vertical Velocity"     , "m/s"    ,   &   ! vertical current
          &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) 
+         !
+      CALL histdef( id_i, "ahtu"    , "u-eddy diffusivity"    , "m2/s"    ,   &   ! zonal current
+         &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout )
+      CALL histdef( id_i, "ahtv"    , "v-eddy diffusivity"    , "m2/s"    ,   &   ! meridonal current
+         &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) 
+      CALL histdef( id_i, "ahmt"    , "t-eddy viscosity"      , "m2/s"    ,   &   ! zonal current
+         &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout )
+      CALL histdef( id_i, "ahmf"    , "f-eddy viscosity"      , "m2/s"    ,   &   ! meridonal current
+         &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) 
+         !
       CALL histdef( id_i, "sowaflup", "Net Upward Water Flux" , "Kg/m2/S",   &   ! net freshwater 
          &          jpi, jpj, nh_i, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
@@ -952,4 +963,10 @@
       CALL histwrite( id_i, "vomecrty", kt, vn               , jpi*jpj*jpk, idex )    ! now j-velocity
       CALL histwrite( id_i, "vovecrtz", kt, wn               , jpi*jpj*jpk, idex )    ! now k-velocity
+      !
+      CALL histwrite( id_i, "ahtu"    , kt, ahtu             , jpi*jpj*jpk, idex )    ! aht at u-point
+      CALL histwrite( id_i, "ahtv"    , kt, ahtv             , jpi*jpj*jpk, idex )    !  -  at v-point
+      CALL histwrite( id_i, "ahmt"    , kt, ahmt             , jpi*jpj*jpk, idex )    ! ahm at t-point
+      CALL histwrite( id_i, "ahmf"    , kt, ahmf             , jpi*jpj*jpk, idex )    !  -  at f-point
+      !
       CALL histwrite( id_i, "sowaflup", kt, emp-rnf          , jpi*jpj    , idex )    ! freshwater budget
       CALL histwrite( id_i, "sohefldo", kt, qsr + qns        , jpi*jpj    , idex )    ! total heat flux
@@ -972,4 +989,5 @@
       ! 
    END SUBROUTINE dia_wri_state
+
    !!======================================================================
 END MODULE diawri
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 5845)
@@ -11,4 +11,5 @@
    !!                             to the optimization of BDY communications
    !!            3.7  ! 2015-11  (G. Madec) introduce surface and scale factor ratio
+   !!             -   ! 2015-11  (G. Madec, A. Coward)  time varying zgr by default
    !!----------------------------------------------------------------------
 
@@ -178,47 +179,38 @@
    LOGICAL, PUBLIC ::   ln_isfcav     !: presence of ISF 
 
-   !! All coordinates
-   !! ---------------
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   gdep3w_0           !: depth of t-points (sum of e3w) (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   gdept_0, gdepw_0   !: analytical (time invariant) depth at t-w  points (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e3v_0  , e3f_0     !: analytical (time invariant) vertical scale factors at  v-f
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e3t_0  , e3u_0     !:                                      t-u  points (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e3vw_0             !: analytical (time invariant) vertical scale factors at  vw
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e3w_0  , e3uw_0    !:                                      w-uw points (m)
+!!gm
 #if defined key_vvl
    LOGICAL, PUBLIC, PARAMETER ::   lk_vvl = .TRUE.    !: variable grid flag
-
-   !! All coordinates
-   !! ---------------
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   gdep3w_n           !: now depth of T-points (sum of e3w) (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   gdept_n, gdepw_n   !: now depth at T-W  points (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   gdept_b, gdepw_b   !: before depth at T-W  points (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e3t_n              !: now    vertical scale factors at  t       point  (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e3u_n  , e3v_n     !:            -      -      -    -   u --v   points (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e3w_n  , e3f_n     !:            -      -      -    -   w --f   points (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e3uw_n , e3vw_n    !:            -      -      -    -   uw--vw  points (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e3t_b              !: before     -      -      -    -   t       points (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e3w_b              !: before     -      -      -    -   t       points (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e3u_b  , e3v_b     !:   -        -      -      -    -   u --v   points (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e3uw_b , e3vw_b    !:   -        -      -      -    -   uw--vw  points (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e3t_a              !: after      -      -      -    -   t       point  (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   e3u_a  , e3v_a     !:   -        -      -      -    -   u --v   points (m)
 #else
-   LOGICAL, PUBLIC, PARAMETER ::   lk_vvl = .FALSE.   !: fixed grid flag
+   LOGICAL, PUBLIC, PARAMETER ::   lk_vvl = .FALSE.   !: variable grid flag
 #endif
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hur  , hvr     !: Now    inverse of u and v-points ocean depth (1/m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hu   , hv      !:        depth at u- and v-points (meters)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ht             !:        depth at t-points (meters)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ehur_a, ehvr_a !: After  inverse of u and v-points ocean depth (1/m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ehu_a , ehv_a  !:        depth at u- and v-points (meters)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ehur_b, ehvr_b !: Before inverse of u and v-points ocean depth (1/m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ehu_b , ehv_b  !:        depth at u- and v-points (meters)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ht_0           !: reference depth at t-       points (meters)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hu_0 , hv_0    !: reference depth at u- and v-points (meters)
+!!gm
+
+   !                                                        !  ref.   ! before  !   now   ! after  !
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::     e3t_0 ,   e3t_b ,   e3t_n ,  e3t_a   !: t- vert. scale factor [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::     e3u_0 ,   e3u_b ,   e3u_n ,  e3u_a   !: u- vert. scale factor [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::     e3v_0 ,   e3v_b ,   e3v_n ,  e3v_a   !: v- vert. scale factor [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::     e3f_0           ,   e3f_n            !: f- vert. scale factor [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::     e3w_0 ,   e3w_b ,   e3w_n            !: w- vert. scale factor [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::    e3uw_0 ,  e3uw_b ,  e3uw_n            !: uw-vert. scale factor [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::    e3vw_0 ,  e3vw_b ,  e3vw_n            !: vw-vert. scale factor [m]
+
+   !                                                        !  ref.   ! before  !   now   !
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   gdept_0 , gdept_b , gdept_n   !: t- depth              [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   gdepw_0 , gdepw_b , gdepw_n   !: w- depth              [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   gde3w_0           , gde3w_n   !: w- depth (sum of e3w) [m]
+   
+   !                                                      !  ref. ! before  !   now   !  after  !
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ht_0            ,    ht_n ,    ht_a   !: t-depth              [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hu_0  ,    hu_b ,    hu_n ,    hu_a   !: u-depth              [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hv_0  ,    hv_b ,    hv_n ,    hv_a   !: u-depth              [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::           r1_hu_b , r1_hu_n , r1_hu_a   !: inverse of u-depth [1/m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::           r1_hv_b , r1_hv_n , r1_hv_a   !: inverse of v-depth [1/m]
+
 
    INTEGER, PUBLIC ::   nla10              !: deepest    W level Above  ~10m (nlb10 - 1)
    INTEGER, PUBLIC ::   nlb10              !: shallowest W level Bellow ~10m (nla10 + 1) 
 
-   !! z-coordinate with full steps (also used in the other cases as reference z-coordinate)
+   !! 1D reference  vertical coordinate
    !! =-----------------====------
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)   ::   gdept_1d, gdepw_1d !: reference depth of t- and w-points (m)
@@ -347,24 +339,22 @@
          &        ff (jpi,jpj)                                                         , STAT=ierr(3) )
          !
-      ALLOCATE( gdep3w_0(jpi,jpj,jpk) , e3v_0(jpi,jpj,jpk) , e3f_0 (jpi,jpj,jpk) ,                         &
-         &      gdept_0 (jpi,jpj,jpk) , e3t_0(jpi,jpj,jpk) , e3u_0 (jpi,jpj,jpk) ,                         &
-         &      gdepw_0 (jpi,jpj,jpk) , e3w_0(jpi,jpj,jpk) , e3vw_0(jpi,jpj,jpk) , e3uw_0(jpi,jpj,jpk) , STAT=ierr(4) )
-         !
-#if defined key_vvl
-      ALLOCATE( gdep3w_n(jpi,jpj,jpk) , e3t_n (jpi,jpj,jpk) , e3u_n (jpi,jpj,jpk) ,                           &
-         &      gdept_n (jpi,jpj,jpk) , e3v_n (jpi,jpj,jpk) , e3w_n (jpi,jpj,jpk) ,                           &
-         &      gdepw_n (jpi,jpj,jpk) , e3f_n (jpi,jpj,jpk) , e3vw_n(jpi,jpj,jpk) , e3uw_n(jpi,jpj,jpk) ,     &
-         &      e3t_b   (jpi,jpj,jpk) , e3u_b (jpi,jpj,jpk) , e3v_b (jpi,jpj,jpk) ,                           &
-         &      e3uw_b  (jpi,jpj,jpk) , e3vw_b(jpi,jpj,jpk) ,                                                 &
-         &      gdept_b (jpi,jpj,jpk) ,gdepw_b(jpi,jpj,jpk) , e3w_b (jpi,jpj,jpk) ,                           &
-         &      e3t_a   (jpi,jpj,jpk) , e3u_a (jpi,jpj,jpk) , e3v_a (jpi,jpj,jpk) ,                           &
-         &      ehu_a   (jpi,jpj)     , ehv_a (jpi,jpj),                                                     &
-         &      ehur_a  (jpi,jpj)     , ehvr_a(jpi,jpj),                                                     &
-         &      ehu_b   (jpi,jpj)     , ehv_b (jpi,jpj),                                                     &
-         &      ehur_b  (jpi,jpj)     , ehvr_b(jpi,jpj),                                  STAT=ierr(5) )                          
-#endif
-         !
-      ALLOCATE( hu(jpi,jpj) , hur(jpi,jpj) , hu_0(jpi,jpj) , ht_0(jpi,jpj) ,     &
-         &      hv(jpi,jpj) , hvr(jpi,jpj) , hv_0(jpi,jpj) , ht  (jpi,jpj) , STAT=ierr(6)  )
+      ALLOCATE( gdept_0(jpi,jpj,jpk) , gdepw_0(jpi,jpj,jpk) , gde3w_0(jpi,jpj,jpk) ,     &
+         &      gdept_b(jpi,jpj,jpk) , gdepw_b(jpi,jpj,jpk) ,                             &
+         &      gdept_n(jpi,jpj,jpk) , gdepw_n(jpi,jpj,jpk) , gde3w_n(jpi,jpj,jpk) , STAT=ierr(4) )
+         !
+      ALLOCATE( e3t_0(jpi,jpj,jpk) , e3u_0(jpi,jpj,jpk) , e3v_0(jpi,jpj,jpk) , e3f_0(jpi,jpj,jpk) , e3w_0(jpi,jpj,jpk) ,   &
+         &      e3t_b(jpi,jpj,jpk) , e3u_b(jpi,jpj,jpk) , e3v_b(jpi,jpj,jpk) ,                      e3w_b(jpi,jpj,jpk) ,   &                         &
+         &      e3t_n(jpi,jpj,jpk) , e3u_n(jpi,jpj,jpk) , e3v_n(jpi,jpj,jpk) , e3f_n(jpi,jpj,jpk) , e3w_n(jpi,jpj,jpk) ,   &                         &
+         &      e3t_a(jpi,jpj,jpk) , e3u_a(jpi,jpj,jpk) , e3v_a(jpi,jpj,jpk) ,                                             &
+         !                                                          !
+         &      e3uw_0(jpi,jpj,jpk) , e3vw_0(jpi,jpj,jpk) ,         &
+         &      e3uw_b(jpi,jpj,jpk) , e3vw_b(jpi,jpj,jpk) ,         &               
+         &      e3uw_n(jpi,jpj,jpk) , e3vw_n(jpi,jpj,jpk) ,     STAT=ierr(5) )                       
+         !
+      ALLOCATE( ht_0(jpi,jpj) , hu_0(jpi,jpj) , hv_0(jpi,jpj) ,                                           &
+         &                      hu_b(jpi,jpj) , hv_b(jpi,jpj) , r1_hu_b(jpi,jpj) , r1_hv_b(jpi,jpj) ,     &
+         &      ht_n(jpi,jpj) , hu_n(jpi,jpj) , hv_n(jpi,jpj) , r1_hu_n(jpi,jpj) , r1_hv_n(jpi,jpj) ,     &
+         &      ht_a(jpi,jpj) , hu_a(jpi,jpj) , hv_a(jpi,jpj) , r1_hu_a(jpi,jpj) , r1_hv_a(jpi,jpj) , STAT=ierr(6)  )
+         !
          !
       ALLOCATE( gdept_1d(jpk) , gdepw_1d(jpk) ,                                     &
@@ -400,3 +390,2 @@
    !!======================================================================
 END MODULE dom_oce
-
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 5845)
@@ -13,4 +13,5 @@
    !!            3.3  !  2010-11  (G. Madec)  initialisation in C1D configuration
    !!            3.6  !  2013     ( J. Simeon, C. Calone, G. Madec, C. Ethe ) Online coarsening of outputs
+   !!             -   ! 2015-11  (G. Madec, A. Coward)  time varying zgr by default
    !!----------------------------------------------------------------------
    
@@ -36,4 +37,5 @@
    !
    USE in_out_manager  ! I/O manager
+   USE wrk_nemo        ! Memory Allocation
    USE lib_mpp         ! distributed memory computing library
    USE lbclnk          ! ocean lateral boundary condition (or mpp link)
@@ -45,6 +47,4 @@
    PUBLIC   dom_init   ! called by opa.F90
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!-------------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -72,4 +72,5 @@
       INTEGER ::   jk          ! dummy loop argument
       INTEGER ::   iconf = 0   ! local integers
+      REAL(wp), POINTER, DIMENSION(:,:)   ::  z1_hu_0, z1_hv_0
       !!----------------------------------------------------------------------
       !
@@ -82,15 +83,17 @@
       ENDIF
       !
-                             CALL dom_nam      ! read namelist ( namrun, namdom )
-                             CALL dom_clo      ! Closed seas and lake
-                             CALL dom_hgr      ! Horizontal mesh
-                             CALL dom_zgr      ! Vertical mesh and bathymetry
-                             CALL dom_msk      ! Masks
-      IF( ln_sco )           CALL dom_stiff    ! Maximum stiffness ratio/hydrostatic consistency
-      !
-      ht_0(:,:) = 0._wp                        ! Reference ocean depth at T-points
-      hu_0(:,:) = 0._wp                        ! Reference ocean depth at U-points
-      hv_0(:,:) = 0._wp                        ! Reference ocean depth at V-points
-      DO jk = 1, jpk
+      !              !==  Reference coordinate system  ==!
+      !
+                     CALL dom_nam               ! read namelist ( namrun, namdom )
+                     CALL dom_clo               ! Closed seas and lake
+                     CALL dom_hgr               ! Horizontal mesh
+                     CALL dom_zgr               ! Vertical mesh and bathymetry
+                     CALL dom_msk               ! Masks
+      IF( ln_sco )   CALL dom_stiff             ! Maximum stiffness ratio/hydrostatic consistency
+      !
+      ht_0(:,:) = e3t_0(:,:,1) * tmask(:,:,1)   ! Reference ocean thickness
+      hu_0(:,:) = e3u_0(:,:,1) * tmask(:,:,1)
+      hv_0(:,:) = e3v_0(:,:,1) * vmask(:,:,1)
+      DO jk = 2, jpk
          ht_0(:,:) = ht_0(:,:) + e3t_0(:,:,jk) * tmask(:,:,jk)
          hu_0(:,:) = hu_0(:,:) + e3u_0(:,:,jk) * umask(:,:,jk)
@@ -98,24 +101,44 @@
       END DO
       !
-      IF( lk_vvl         )   CALL dom_vvl_init ! Vertical variable mesh
-      !
-      IF( lk_c1d         )   CALL cor_c1d      ! 1D configuration: Coriolis set at T-point
-      !
-      !
-      hu(:,:) = 0._wp                          ! Ocean depth at U-points
-      hv(:,:) = 0._wp                          ! Ocean depth at V-points
-      ht(:,:) = 0._wp                          ! Ocean depth at T-points
-      DO jk = 1, jpkm1
-         hu(:,:) = hu(:,:) + fse3u_n(:,:,jk) * umask(:,:,jk)
-         hv(:,:) = hv(:,:) + fse3v_n(:,:,jk) * vmask(:,:,jk)
-         ht(:,:) = ht(:,:) + fse3t_n(:,:,jk) * tmask(:,:,jk)
-      END DO
-      !                                        ! Inverse of the local depth
-      hur(:,:) = 1._wp / ( hu(:,:) + 1._wp - umask_i(:,:) ) * umask_i(:,:)
-      hvr(:,:) = 1._wp / ( hv(:,:) + 1._wp - vmask_i(:,:) ) * vmask_i(:,:)
-
-                             CALL dom_stp      ! time step
-      IF( nmsh /= 0      )   CALL dom_wri      ! Create a domain file
-      IF( .NOT.ln_rstart )   CALL dom_ctl      ! Domain control
+      !              !==  time varying part of coordinate system  ==!
+      !
+      IF( lk_vvl ) THEN                         ! time varying : initialize before/now/after variables
+         CALL dom_vvl_init 
+         !
+      ELSE                                      ! Fix in time : set to the reference one for all
+         !    before         !          now          !       after         !
+         gdept_b = gdept_0   ;   gdept_n = gdept_0   !        ---          ! depth of grid-points
+         gdepw_b = gdepw_0   ;   gdepw_n = gdepw_0   !        ---          !
+                                 gde3w_n = gde3w_0   !        ---          !
+         !                                                                  
+           e3t_b =   e3t_0   ;     e3t_n =   e3t_0   ;   e3t_a =  e3t_0    ! scale factors
+           e3u_b =   e3u_0   ;     e3u_n =   e3u_0   ;   e3u_a =  e3u_0    !
+           e3v_b =   e3v_0   ;     e3v_n =   e3u_0   ;   e3v_a =  e3v_0    !
+                             ;     e3f_n =   e3f_0   !        ---          !
+           e3w_b =   e3w_0   ;     e3w_n =   e3w_0   !        ---          !
+          e3uw_b =  e3uw_0   ;    e3uw_n =  e3uw_0   !        ---          !
+          e3vw_b =  e3vw_0   ;    e3vw_n =  e3vw_0   !        ---          !
+         !
+         !                                            ! 
+         CALL wrk_alloc( jpi,jpj,   z1_hu_0, z1_hv_0 )
+         !
+         z1_hu_0(:,:) = 1._wp / ( hu_0(:,:) + 1._wp - umask_i(:,:) ) * umask_i(:,:)    ! _i mask due to ISF
+         z1_hv_0(:,:) = 1._wp / ( hv_0(:,:) + 1._wp - vmask_i(:,:) ) * vmask_i(:,:)
+         !
+         !        before       !         now         !       after         !
+         ;                     ;     ht_n =    hu_0  ;    ht_a =    hu_0   ! water column thickness
+         ;     hu_b =    hu_0  ;     hu_n =    hu_0  ;    hu_a =    hu_0   ! 
+         ;     hv_b =    hv_0  ;     hv_n =    hv_0  ;    hv_a =    hv_0   !
+         ;  r1_hu_b = z1_hu_0  ;  r1_hu_n = z1_hu_0  ; r1_hu_a = z1_hu_0   ! inverse of water column thickness
+         ;  r1_hv_b = z1_hv_0  ;  r1_hv_n = z1_hv_0  ; r1_hv_a = z1_hv_0   !
+         !
+         CALL wrk_dealloc( jpi,jpj,   z1_hu_0, z1_hv_0 )
+      ENDIF
+      !
+      IF( lk_c1d         )   CALL cor_c1d       ! 1D configuration: Coriolis set at T-point
+      !
+                             CALL dom_stp       ! time step
+      IF( nmsh /= 0      )   CALL dom_wri       ! Create a domain file
+      IF( .NOT.ln_rstart )   CALL dom_ctl       ! Domain control
       !
       IF( nn_timing == 1 )   CALL timing_stop('dom_init')
@@ -412,22 +435,22 @@
          DO jj = 2, jpjm1
             DO jk = 1, jpkm1
-               zr1(1) = umask(ji-1,jj  ,jk) *abs( (gdepw_0(ji  ,jj  ,jk  )-gdepw_0(ji-1,jj  ,jk  )  & 
-                    &                         +gdepw_0(ji  ,jj  ,jk+1)-gdepw_0(ji-1,jj  ,jk+1)) &
-                    &                        /(gdepw_0(ji  ,jj  ,jk  )+gdepw_0(ji-1,jj  ,jk  )  &
-                    &                         -gdepw_0(ji  ,jj  ,jk+1)-gdepw_0(ji-1,jj  ,jk+1) + rsmall) )
-               zr1(2) = umask(ji  ,jj  ,jk) *abs( (gdepw_0(ji+1,jj  ,jk  )-gdepw_0(ji  ,jj  ,jk  )  &
-                    &                         +gdepw_0(ji+1,jj  ,jk+1)-gdepw_0(ji  ,jj  ,jk+1)) &
-                    &                        /(gdepw_0(ji+1,jj  ,jk  )+gdepw_0(ji  ,jj  ,jk  )  &
-                    &                         -gdepw_0(ji+1,jj  ,jk+1)-gdepw_0(ji  ,jj  ,jk+1) + rsmall) )
-               zr1(3) = vmask(ji  ,jj  ,jk) *abs( (gdepw_0(ji  ,jj+1,jk  )-gdepw_0(ji  ,jj  ,jk  )  &
-                    &                         +gdepw_0(ji  ,jj+1,jk+1)-gdepw_0(ji  ,jj  ,jk+1)) &
-                    &                        /(gdepw_0(ji  ,jj+1,jk  )+gdepw_0(ji  ,jj  ,jk  )  &
-                    &                         -gdepw_0(ji  ,jj+1,jk+1)-gdepw_0(ji  ,jj  ,jk+1) + rsmall) )
-               zr1(4) = vmask(ji  ,jj-1,jk) *abs( (gdepw_0(ji  ,jj  ,jk  )-gdepw_0(ji  ,jj-1,jk  )  &
-                    &                         +gdepw_0(ji  ,jj  ,jk+1)-gdepw_0(ji  ,jj-1,jk+1)) &
-                    &                        /(gdepw_0(ji  ,jj  ,jk  )+gdepw_0(ji  ,jj-1,jk  )  &
-                    &                         -gdepw_0(ji,  jj  ,jk+1)-gdepw_0(ji  ,jj-1,jk+1) + rsmall) )
-               zrxmax = MAXVAL(zr1(1:4))
-               rx1(ji,jj) = MAX(rx1(ji,jj), zrxmax)
+               zr1(1) = ABS(  ( gdepw_0(ji  ,jj,jk  )-gdepw_0(ji-1,jj,jk  )               & 
+                    &          +gdepw_0(ji  ,jj,jk+1)-gdepw_0(ji-1,jj,jk+1) )             &
+                    &       / ( gdepw_0(ji  ,jj,jk  )+gdepw_0(ji-1,jj,jk  )               &
+                    &          -gdepw_0(ji  ,jj,jk+1)-gdepw_0(ji-1,jj,jk+1) + rsmall )  ) * umask(ji-1,jj,jk)
+               zr1(2) = ABS(  ( gdepw_0(ji+1,jj,jk  )-gdepw_0(ji  ,jj,jk  )               &
+                    &          +gdepw_0(ji+1,jj,jk+1)-gdepw_0(ji  ,jj,jk+1) )             &
+                    &       / ( gdepw_0(ji+1,jj,jk  )+gdepw_0(ji  ,jj,jk  )               &
+                    &          -gdepw_0(ji+1,jj,jk+1)-gdepw_0(ji  ,jj,jk+1) + rsmall )  ) * umask(ji  ,jj,jk)
+               zr1(3) =ABS(  (  gdepw_0(ji,jj+1,jk  )-gdepw_0(ji,jj  ,jk  )               &
+                    &          +gdepw_0(ji,jj+1,jk+1)-gdepw_0(ji,jj  ,jk+1) )             &
+                    &       / ( gdepw_0(ji,jj+1,jk  )+gdepw_0(ji,jj  ,jk  )               &
+                    &          -gdepw_0(ji,jj+1,jk+1)-gdepw_0(ji,jj  ,jk+1) + rsmall )  ) * vmask(ji,jj  ,jk)
+               zr1(4) = ABS(  ( gdepw_0(ji,jj  ,jk  )-gdepw_0(ji,jj-1,jk  )               &
+                    &          +gdepw_0(ji,jj  ,jk+1)-gdepw_0(ji,jj-1,jk+1) )             &
+                    &       / ( gdepw_0(ji,jj  ,jk  )+gdepw_0(ji,jj-1,jk  )               &
+                    &          -gdepw_0(ji,jj  ,jk+1)-gdepw_0(ji,jj-1,jk+1) + rsmall )  ) * vmask(ji,jj-1,jk)
+               zrxmax = MAXVAL( zr1(1:4) )
+               rx1(ji,jj) = MAX( rx1(ji,jj) , zrxmax )
             END DO
          END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domcfg.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domcfg.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domcfg.F90	(revision 5845)
@@ -118,22 +118,24 @@
          WRITE(numout,*) '          south-west indices    jpizoom = ', jpizoom,   &
             &                                           ' jpjzoom = ', jpjzoom
-         WRITE(numout,*)
-         WRITE(numout,*) '          conversion local  ==> data i-index domain'
-         WRITE(numout,25)              (mig(ji),ji = 1,jpi)
-         WRITE(numout,*)
-         WRITE(numout,*) '          conversion data   ==> local  i-index domain'
-         WRITE(numout,*) '             starting index'
-         WRITE(numout,25)              (mi0(ji),ji = 1,jpidta)
-         WRITE(numout,*) '             ending index'
-         WRITE(numout,25)              (mi1(ji),ji = 1,jpidta)
-         WRITE(numout,*)
-         WRITE(numout,*) '          conversion local  ==> data j-index domain'
-         WRITE(numout,25)              (mjg(jj),jj = 1,jpj)
-         WRITE(numout,*)
-         WRITE(numout,*) '          conversion data  ==> local j-index domain'
-         WRITE(numout,*) '             starting index'
-         WRITE(numout,25)              (mj0(jj),jj = 1,jpjdta)
-         WRITE(numout,*) '             ending index'
-         WRITE(numout,25)              (mj1(jj),jj = 1,jpjdta)
+         IF( nn_print >= 1 ) THEN
+            WRITE(numout,*)
+            WRITE(numout,*) '          conversion local  ==> data i-index domain'
+            WRITE(numout,25)              (mig(ji),ji = 1,jpi)
+            WRITE(numout,*)
+            WRITE(numout,*) '          conversion data   ==> local  i-index domain'
+            WRITE(numout,*) '             starting index'
+            WRITE(numout,25)              (mi0(ji),ji = 1,jpidta)
+            WRITE(numout,*) '             ending index'
+            WRITE(numout,25)              (mi1(ji),ji = 1,jpidta)
+            WRITE(numout,*)
+            WRITE(numout,*) '          conversion local  ==> data j-index domain'
+            WRITE(numout,25)              (mjg(jj),jj = 1,jpj)
+            WRITE(numout,*)
+            WRITE(numout,*) '          conversion data  ==> local j-index domain'
+            WRITE(numout,*) '             starting index'
+            WRITE(numout,25)              (mj0(jj),jj = 1,jpjdta)
+            WRITE(numout,*) '             ending index'
+            WRITE(numout,25)              (mj1(jj),jj = 1,jpjdta)
+         ENDIF
       ENDIF
  25   FORMAT( 100(10x,19i4,/) )
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90	(revision 5845)
@@ -348,5 +348,5 @@
       e1_e2v(:,:) = e1v(:,:) / e2v(:,:)
 
-      IF( lwp .AND. .NOT.ln_rstart ) THEN      ! Control print : Grid informations (if not restart)
+      IF( lwp .AND. nn_print >=1 .AND. .NOT.ln_rstart ) THEN      ! Control print : Grid informations (if not restart)
          WRITE(numout,*)
          WRITE(numout,*) '          longitude and e1 scale factors'
@@ -393,5 +393,6 @@
          IF ( cp_cfg == 'eel' .AND. jp_cfg == 6 ) THEN    ! for EEL6 configuration only
             IF( .NOT. Agrif_Root() ) THEN
-              zphi0 = ppgphi0 - REAL( Agrif_Parent(jpjglo)/2)*Agrif_Parent(ppe2_m) / (ra * rad)
+              zphi0 = ppgphi0 - REAL( Agrif_Parent(jpjglo)/2 )*Agrif_Parent(ppe2_m)   &
+               &              / (ra * rad)         ! CAUTIOn : split in 2 lignes for AGRIF
             ENDIF
          ENDIF
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 5845)
@@ -400,51 +400,6 @@
       !
       CALL lbc_lnk( fmask, 'F', 1._wp )      ! Lateral boundary conditions on fmask
-
+      !
       ! CAUTION : The fmask may be further modified in dyn_vor_init ( dynvor.F90 )
-            
-      IF( nprint == 1 .AND. lwp ) THEN      ! Control print
-         imsk(:,:) = INT( tmask_i(:,:) )
-         WRITE(numout,*) ' tmask_i : '
-         CALL prihin( imsk(:,:), jpi, jpj, 1, jpi, 1,   &
-               &                           1, jpj, 1, 1, numout)
-         WRITE (numout,*)
-         WRITE (numout,*) ' dommsk: tmask for each level'
-         WRITE (numout,*) ' ----------------------------'
-         DO jk = 1, jpk
-            imsk(:,:) = INT( tmask(:,:,jk) )
-
-            WRITE(numout,*)
-            WRITE(numout,*) ' level = ',jk
-            CALL prihin( imsk(:,:), jpi, jpj, 1, jpi, 1,   &
-               &                              1, jpj, 1, 1, numout)
-         END DO
-         WRITE(numout,*)
-         WRITE(numout,*) ' dom_msk: vmask for each level'
-         WRITE(numout,*) ' -----------------------------'
-         DO jk = 1, jpk
-            imsk(:,:) = INT( vmask(:,:,jk) )
-            WRITE(numout,*)
-            WRITE(numout,*) ' level = ',jk
-            CALL prihin( imsk(:,:), jpi, jpj, 1, jpi, 1,   &
-               &                              1, jpj, 1, 1, numout)
-         END DO
-         WRITE(numout,*)
-         WRITE(numout,*) ' dom_msk: fmask for each level'
-         WRITE(numout,*) ' -----------------------------'
-         DO jk = 1, jpk
-            imsk(:,:) = INT( fmask(:,:,jk) )
-            WRITE(numout,*)
-            WRITE(numout,*) ' level = ',jk
-            CALL prihin( imsk(:,:), jpi, jpj, 1, jpi, 1,   &
-               &                              1, jpj, 1, 1, numout )
-         END DO
-         WRITE(numout,*)
-         WRITE(numout,*) ' dom_msk: bmask '
-         WRITE(numout,*) ' ---------------'
-         WRITE(numout,*)
-         imsk(:,:) = INT( bmask(:,:) )
-         CALL prihin( imsk(:,:), jpi, jpj, 1, jpi, 1,   &
-            &                              1, jpj, 1, 1, numout )
-      ENDIF
       !
       CALL wrk_dealloc( jpi, jpj, imsk )
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domstp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domstp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domstp.F90	(revision 5845)
@@ -22,6 +22,4 @@
    PUBLIC   dom_stp   ! routine called by inidom.F90
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 5845)
@@ -20,9 +20,11 @@
    !!----------------------------------------------------------------------
    USE oce             ! ocean dynamics and tracers
+   USE phycst          ! physical constant
    USE dom_oce         ! ocean space and time domain
    USE sbc_oce         ! ocean surface boundary condition
+   USE restart         ! ocean restart
+   !
    USE in_out_manager  ! I/O manager
    USE iom             ! I/O manager library
-   USE restart         ! ocean restart
    USE lib_mpp         ! distributed memory computing library
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
@@ -60,5 +62,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -67,5 +68,4 @@
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -81,6 +81,6 @@
          IF( lk_mpp             )   CALL mpp_sum ( dom_vvl_alloc )
          IF( dom_vvl_alloc /= 0 )   CALL ctl_warn('dom_vvl_alloc: failed to allocate arrays')
-         un_td = 0.0_wp
-         vn_td = 0.0_wp
+         un_td = 0._wp
+         vn_td = 0._wp
       ENDIF
       IF( ln_vvl_ztilde ) THEN
@@ -89,5 +89,5 @@
          IF( dom_vvl_alloc /= 0 )   CALL ctl_warn('dom_vvl_alloc: failed to allocate arrays')
       ENDIF
-
+      !
    END FUNCTION dom_vvl_alloc
 
@@ -103,11 +103,11 @@
       !!               - interpolate scale factors
       !!
-      !! ** Action  : - fse3t_(n/b) and tilde_e3t_(n/b)
-      !!              - Regrid: fse3(u/v)_n
-      !!                        fse3(u/v)_b       
-      !!                        fse3w_n           
-      !!                        fse3(u/v)w_b      
-      !!                        fse3(u/v)w_n      
-      !!                        fsdept_n, fsdepw_n and fsde3w_n
+      !! ** Action  : - e3t_(n/b) and tilde_e3t_(n/b)
+      !!              - Regrid: e3(u/v)_n
+      !!                        e3(u/v)_b       
+      !!                        e3w_n           
+      !!                        e3(u/v)w_b      
+      !!                        e3(u/v)w_n      
+      !!                        gdept_n, gdepw_n and gde3w_n
       !!              - h(t/u/v)_0
       !!              - frq_rst_e3t and frq_rst_hdv
@@ -115,108 +115,110 @@
       !! Reference  : Leclair, M., and G. Madec, 2011, Ocean Modelling.
       !!----------------------------------------------------------------------
-      USE phycst,  ONLY : rpi, rsmall, rad
-      !! * Local declarations
-      INTEGER ::   ji,jj,jk
+      INTEGER ::   ji, jj, jk
       INTEGER ::   ii0, ii1, ij0, ij1
       REAL(wp)::   zcoef
       !!----------------------------------------------------------------------
+      !
       IF( nn_timing == 1 )  CALL timing_start('dom_vvl_init')
-
+      !
       IF(lwp) WRITE(numout,*)
       IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated'
       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'
-
-      ! choose vertical coordinate (z_star, z_tilde or layer)
-      ! ==========================
-      CALL dom_vvl_ctl
-
-      ! Allocate module arrays
-      ! ======================
+      !
+      CALL dom_vvl_ctl     ! choose vertical coordinate (z_star, z_tilde or layer)
+      !
+      !                    ! Allocate module arrays
       IF( dom_vvl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' )
-
-      ! Read or initialize fse3t_(b/n), tilde_e3t_(b/n) and hdiv_lf (and e3t_a(jpk))
-      ! ============================================================================
+      !
+      !                    ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf
       CALL dom_vvl_rst( nit000, 'READ' )
-      fse3t_a(:,:,jpk) = e3t_0(:,:,jpk)
-
-      ! Reconstruction of all vertical scale factors at now and before time steps
-      ! =============================================================================
-      ! Horizontal scale factor interpolations
-      ! --------------------------------------
-      CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3u_b(:,:,:), 'U' )
-      CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3v_b(:,:,:), 'V' )
-      CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3u_n(:,:,:), 'U' )
-      CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3v_n(:,:,:), 'V' )
-      CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3f_n(:,:,:), 'F' )
-      ! Vertical scale factor interpolations
-      ! ------------------------------------
-      CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3w_n (:,:,:), 'W'  )
-      CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3uw_n(:,:,:), 'UW' )
-      CALL dom_vvl_interpol( fse3v_n(:,:,:), fse3vw_n(:,:,:), 'VW' )
-      CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3w_b (:,:,:), 'W'  )
-      CALL dom_vvl_interpol( fse3u_b(:,:,:), fse3uw_b(:,:,:), 'UW' )
-      CALL dom_vvl_interpol( fse3v_b(:,:,:), fse3vw_b(:,:,:), 'VW' )
-      ! t- and w- points depth
-      ! ----------------------
-      ! set the isf depth as it is in the initial step
-      fsdept_n(:,:,1) = 0.5_wp * fse3w_n(:,:,1)
-      fsdepw_n(:,:,1) = 0.0_wp
-      fsde3w_n(:,:,1) = fsdept_n(:,:,1) - sshn(:,:)
-      fsdept_b(:,:,1) = 0.5_wp * fse3w_b(:,:,1)
-      fsdepw_b(:,:,1) = 0.0_wp
-
-      DO jk = 2, jpk
+      e3t_a(:,:,jpk) = e3t_0(:,:,jpk)  ! last level always inside the sea floor set one for all
+      !
+      !                    !== Set of all other vertical scale factors  ==!  (now and before)
+      !                                ! Horizontal interpolation of e3t
+      CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' )    ! from T to U
+      CALL dom_vvl_interpol( e3t_n(:,:,:), e3u_n(:,:,:), 'U' )
+      CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' )    ! from T to V 
+      CALL dom_vvl_interpol( e3t_n(:,:,:), e3v_n(:,:,:), 'V' )
+      CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' )    ! from U to F
+      !                                ! Vertical interpolation of e3t,u,v 
+      CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W'  )  ! from T to W
+      CALL dom_vvl_interpol( e3t_b(:,:,:), e3w_b (:,:,:), 'W'  )
+      CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' )  ! from U to UW
+      CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' )
+      CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' )  ! from V to UW
+      CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' )
+      !
+      !                    !==  depth of t and w-point  ==!   (set the isf depth as it is in the initial timestep)
+      gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1)       ! reference to the ocean surface (used for MLD and light penetration)
+      gdepw_n(:,:,1) = 0.0_wp
+      gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:)  ! reference to a common level z=0 for hpg
+      gdept_b(:,:,1) = 0.5_wp * e3w_b(:,:,1)
+      gdepw_b(:,:,1) = 0.0_wp
+      DO jk = 2, jpk                               ! vertical sum
          DO jj = 1,jpj
             DO ji = 1,jpi
-              !    zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk))   ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt
-                                                     ! 1 everywhere from mbkt to mikt + 1 or 1 (if no isf)
-                                                     ! 0.5 where jk = mikt  
-               zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk))
-               fsdepw_n(ji,jj,jk) = fsdepw_n(ji,jj,jk-1) + fse3t_n(ji,jj,jk-1)
-               fsdept_n(ji,jj,jk) =      zcoef  * ( fsdepw_n(ji,jj,jk  ) + 0.5 * fse3w_n(ji,jj,jk))  &
-                   &                + (1-zcoef) * ( fsdept_n(ji,jj,jk-1) +       fse3w_n(ji,jj,jk)) 
-               fsde3w_n(ji,jj,jk) = fsdept_n(ji,jj,jk) - sshn(ji,jj)
-               fsdepw_b(ji,jj,jk) = fsdepw_b(ji,jj,jk-1) + fse3t_b(ji,jj,jk-1)
-               fsdept_b(ji,jj,jk) =      zcoef  * ( fsdepw_b(ji,jj,jk  ) + 0.5 * fse3w_b(ji,jj,jk))  &
-                   &                + (1-zcoef) * ( fsdept_b(ji,jj,jk-1) +       fse3w_b(ji,jj,jk)) 
+               !    zcoef = tmask - wmask    ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt
+               !                             ! 1 everywhere from mbkt to mikt + 1 or 1 (if no isf)
+               !                             ! 0.5 where jk = mikt     
+!!gm ???????   BUG ?  gdept_n as well as gde3w_n  does not include the thickness of ISF ??
+               zcoef = ( tmask(ji,jj,jk) - wmask(ji,jj,jk) )
+               gdepw_n(ji,jj,jk) = gdepw_n(ji,jj,jk-1) + e3t_n(ji,jj,jk-1)
+               gdept_n(ji,jj,jk) =      zcoef  * ( gdepw_n(ji,jj,jk  ) + 0.5 * e3w_n(ji,jj,jk))  &
+                  &                + (1-zcoef) * ( gdept_n(ji,jj,jk-1) +       e3w_n(ji,jj,jk)) 
+               gde3w_n(ji,jj,jk) = gdept_n(ji,jj,jk) - sshn(ji,jj)
+               gdepw_b(ji,jj,jk) = gdepw_b(ji,jj,jk-1) + e3t_b(ji,jj,jk-1)
+               gdept_b(ji,jj,jk) =      zcoef  * ( gdepw_b(ji,jj,jk  ) + 0.5 * e3w_b(ji,jj,jk))  &
+                  &                + (1-zcoef) * ( gdept_b(ji,jj,jk-1) +       e3w_b(ji,jj,jk)) 
             END DO
          END DO
       END DO
-
-      ! Before depth and Inverse of the local depth of the water column at u- and v- points
-      ! -----------------------------------------------------------------------------------
-      hu_b(:,:) = 0.
-      hv_b(:,:) = 0.
-      DO jk = 1, jpkm1
-         hu_b(:,:) = hu_b(:,:) + fse3u_b(:,:,jk) * umask(:,:,jk)
-         hv_b(:,:) = hv_b(:,:) + fse3v_b(:,:,jk) * vmask(:,:,jk)
+      !
+      !                    !==  thickness of the water column  !!   (ocean portion only)
+      ht_n(:,:) = e3t_n(:,:,1) * tmask(:,:,1)   !!gm  BUG  :  this should be 1/2 * e3w(k=1) ....
+      hu_b(:,:) = e3u_b(:,:,1) * umask(:,:,1)
+      hv_b(:,:) = e3u_b(:,:,1) * vmask(:,:,1)
+      hu_n(:,:) = e3u_n(:,:,1) * umask(:,:,1)
+      hv_n(:,:) = e3v_n(:,:,1) * vmask(:,:,1)
+      DO jk = 2, jpkm1
+         ht_n(:,:) = ht_n(:,:) + e3t_n(:,:,jk) * tmask(:,:,jk)
+         hu_b(:,:) = hu_b(:,:) + e3u_b(:,:,jk) * umask(:,:,jk)
+         hu_n(:,:) = hu_n(:,:) + e3u_n(:,:,jk) * umask(:,:,jk)
+         hv_b(:,:) = hv_b(:,:) + e3v_b(:,:,jk) * vmask(:,:,jk)
+         hv_n(:,:) = hv_n(:,:) + e3v_n(:,:,jk) * vmask(:,:,jk)
       END DO
-      hur_b(:,:) = umask_i(:,:) / ( hu_b(:,:) + 1. - umask_i(:,:) )
-      hvr_b(:,:) = vmask_i(:,:) / ( hv_b(:,:) + 1. - vmask_i(:,:) )
-
-      ! Restoring frequencies for z_tilde coordinate
-      ! ============================================
+      !
+      !                    !==  inverse of water column thickness   ==!   (u- and v- points)
+      r1_hu_b(:,:) = umask_i(:,:) / ( hu_b(:,:) + 1._wp - umask_i(:,:) )    ! _i mask due to ISF
+      r1_hu_n(:,:) = umask_i(:,:) / ( hu_n(:,:) + 1._wp - umask_i(:,:) )
+      r1_hv_b(:,:) = vmask_i(:,:) / ( hv_b(:,:) + 1._wp - vmask_i(:,:) )
+      r1_hv_n(:,:) = vmask_i(:,:) / ( hv_n(:,:) + 1._wp - vmask_i(:,:) )
+
+      !                    !==   z_tilde coordinate case  ==!   (Restoring frequencies)
       IF( ln_vvl_ztilde ) THEN
-         ! Values in days provided via the namelist; use rsmall to avoid possible division by zero errors with faulty settings
-         frq_rst_e3t(:,:) = 2.0_wp * rpi / ( MAX( rn_rst_e3t  , rsmall ) * 86400.0_wp )
-         frq_rst_hdv(:,:) = 2.0_wp * rpi / ( MAX( rn_lf_cutoff, rsmall ) * 86400.0_wp )
-         IF( ln_vvl_ztilde_as_zstar ) THEN
-            ! Ignore namelist settings and use these next two to emulate z-star using z-tilde
-            frq_rst_e3t(:,:) = 0.0_wp 
-            frq_rst_hdv(:,:) = 1.0_wp / rdt
-         ENDIF
-         IF ( ln_vvl_zstar_at_eqtor ) THEN
+!!gm : idea: add here a READ in a file of custumized restoring frequency
+         !                                   ! Values in days provided via the namelist
+         !                                   ! use rsmall to avoid possible division by zero errors with faulty settings
+         frq_rst_e3t(:,:) = 2._wp * rpi / ( MAX( rn_rst_e3t  , rsmall ) * 86400.0_wp )
+         frq_rst_hdv(:,:) = 2._wp * rpi / ( MAX( rn_lf_cutoff, rsmall ) * 86400.0_wp )
+         !
+         IF( ln_vvl_ztilde_as_zstar ) THEN   ! z-star emulation using z-tile
+            frq_rst_e3t(:,:) = 0._wp               !Ignore namelist settings
+            frq_rst_hdv(:,:) = 1._wp / rdt
+         ENDIF
+         IF ( ln_vvl_zstar_at_eqtor ) THEN   ! use z-star in vicinity of the Equator
             DO jj = 1, jpj
                DO ji = 1, jpi
+!!gm  case |gphi| >= 6 degrees is useless   initialized just above by default
                   IF( ABS(gphit(ji,jj)) >= 6.) THEN
                      ! values outside the equatorial band and transition zone (ztilde)
                      frq_rst_e3t(ji,jj) =  2.0_wp * rpi / ( MAX( rn_rst_e3t  , rsmall ) * 86400.e0_wp )
                      frq_rst_hdv(ji,jj) =  2.0_wp * rpi / ( MAX( rn_lf_cutoff, rsmall ) * 86400.e0_wp )
-                  ELSEIF( ABS(gphit(ji,jj)) <= 2.5) THEN
+                  ELSEIF( ABS(gphit(ji,jj)) <= 2.5) THEN    ! Equator strip ==> z-star
                      ! values inside the equatorial band (ztilde as zstar)
                      frq_rst_e3t(ji,jj) =  0.0_wp
                      frq_rst_hdv(ji,jj) =  1.0_wp / rdt
-                  ELSE
-                     ! values in the transition band (linearly vary from ztilde to ztilde as zstar values)
+                  ELSE                                      ! transition band (2.5 to 6 degrees N/S)
+                     !                                      ! (linearly transition from z-tilde to z-star)
                      frq_rst_e3t(ji,jj) = 0.0_wp + (frq_rst_e3t(ji,jj)-0.0_wp)*0.5_wp   &
                         &            * (  1.0_wp - COS( rad*(ABS(gphit(ji,jj))-2.5_wp)  &
@@ -229,6 +231,6 @@
                END DO
             END DO
-            IF( cp_cfg == "orca" .AND. jp_cfg == 3 ) THEN
-               ii0 = 103   ;   ii1 = 111        ! Suppress ztilde in the Foxe Basin for ORCA2
+            IF( cp_cfg == "orca" .AND. jp_cfg == 3 ) THEN   ! ORCA2: Suppress ztilde in the Foxe Basin for ORCA2
+               ii0 = 103   ;   ii1 = 111       
                ij0 = 128   ;   ij1 = 135   ;   
                frq_rst_e3t( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  0.0_wp
@@ -237,7 +239,7 @@
          ENDIF
       ENDIF
-
+      !
       IF( nn_timing == 1 )  CALL timing_stop('dom_vvl_init')
-
+      !
    END SUBROUTINE dom_vvl_init
 
@@ -261,5 +263,5 @@
       !!               - tilde_e3t_a: after increment of vertical scale factor 
       !!                              in z_tilde case
-      !!               - fse3(t/u/v)_a
+      !!               - e3(t/u/v)_a
       !!
       !! Reference  : Leclair, M., and Madec, G. 2011, Ocean Modelling.
@@ -277,7 +279,9 @@
       LOGICAL                                :: ll_do_bclinic         ! temporary logical
       !!----------------------------------------------------------------------
+      !
       IF( nn_timing == 1 )  CALL timing_start('dom_vvl_sf_nxt')
-      CALL wrk_alloc( jpi, jpj, zht, z_scale, zwu, zwv, zhdiv )
-      CALL wrk_alloc( jpi, jpj, jpk, ze3t                     )
+      !
+      CALL wrk_alloc( jpi,jpj,zht,   z_scale, zwu, zwv, zhdiv )
+      CALL wrk_alloc( jpi,jpj,jpk,   ze3t )
 
       IF(kt == nit000)   THEN
@@ -289,5 +293,5 @@
       ll_do_bclinic = .TRUE.
       IF( PRESENT(kcall) ) THEN
-         IF ( kcall == 2 .AND. ln_vvl_ztilde ) ll_do_bclinic = .FALSE.
+         IF( kcall == 2 .AND. ln_vvl_ztilde )   ll_do_bclinic = .FALSE.
       ENDIF
 
@@ -295,15 +299,14 @@
       ! After acale factors at t-points !
       ! ******************************* !
-
       !                                                ! --------------------------------------------- !
-                                                       ! z_star coordinate and barotropic z-tilde part !
+      !                                                ! z_star coordinate and barotropic z-tilde part !
       !                                                ! --------------------------------------------- !
-
+      !
       z_scale(:,:) = ( ssha(:,:) - sshb(:,:) ) * ssmask(:,:) / ( ht_0(:,:) + sshn(:,:) + 1. - ssmask(:,:) )
       DO jk = 1, jpkm1
-         ! formally this is the same as fse3t_a = e3t_0*(1+ssha/ht_0)
-         fse3t_a(:,:,jk) = fse3t_b(:,:,jk) + fse3t_n(:,:,jk) * z_scale(:,:) * tmask(:,:,jk)
+         ! formally this is the same as e3t_a = e3t_0*(1+ssha/ht_0)
+         e3t_a(:,:,jk) = e3t_b(:,:,jk) + e3t_n(:,:,jk) * z_scale(:,:) * tmask(:,:,jk)
       END DO
-
+      !
       IF( ln_vvl_ztilde .OR. ln_vvl_layer .AND. ll_do_bclinic ) THEN   ! z_tilde or layer coordinate !
          !                                                            ! ------baroclinic part------ !
@@ -314,9 +317,9 @@
          ! 1 - barotropic divergence
          ! -------------------------
-         zhdiv(:,:) = 0.
-         zht(:,:)   = 0.
+         zhdiv(:,:) = 0._wp
+         zht(:,:)   = 0._wp
          DO jk = 1, jpkm1
-            zhdiv(:,:) = zhdiv(:,:) + fse3t_n(:,:,jk) * hdivn(:,:,jk)
-            zht  (:,:) = zht  (:,:) + fse3t_n(:,:,jk) * tmask(:,:,jk)
+            zhdiv(:,:) = zhdiv(:,:) + e3t_n(:,:,jk) * hdivn(:,:,jk)
+            zht  (:,:) = zht  (:,:) + e3t_n(:,:,jk) * tmask(:,:,jk)
          END DO
          zhdiv(:,:) = zhdiv(:,:) / ( zht(:,:) + 1. - tmask_i(:,:) )
@@ -325,15 +328,15 @@
          ! --------------------------------------------------
          IF( ln_vvl_ztilde ) THEN
-            IF( kt .GT. nit000 ) THEN
+            IF( kt > nit000 ) THEN
                DO jk = 1, jpkm1
                   hdiv_lf(:,:,jk) = hdiv_lf(:,:,jk) - rdt * frq_rst_hdv(:,:)   &
-                     &          * ( hdiv_lf(:,:,jk) - fse3t_n(:,:,jk) * ( hdivn(:,:,jk) - zhdiv(:,:) ) )
+                     &          * ( hdiv_lf(:,:,jk) - e3t_n(:,:,jk) * ( hdivn(:,:,jk) - zhdiv(:,:) ) )
                END DO
             ENDIF
-         END IF
+         ENDIF
 
          ! II - after z_tilde increments of vertical scale factors
          ! =======================================================
-         tilde_e3t_a(:,:,:) = 0.0_wp  ! tilde_e3t_a used to store tendency terms
+         tilde_e3t_a(:,:,:) = 0._wp  ! tilde_e3t_a used to store tendency terms
 
          ! 1 - High frequency divergence term
@@ -341,11 +344,11 @@
          IF( ln_vvl_ztilde ) THEN     ! z_tilde case
             DO jk = 1, jpkm1
-               tilde_e3t_a(:,:,jk) = tilde_e3t_a(:,:,jk) - ( fse3t_n(:,:,jk) * ( hdivn(:,:,jk) - zhdiv(:,:) ) - hdiv_lf(:,:,jk) )
+               tilde_e3t_a(:,:,jk) = tilde_e3t_a(:,:,jk) - ( e3t_n(:,:,jk) * ( hdivn(:,:,jk) - zhdiv(:,:) ) - hdiv_lf(:,:,jk) )
             END DO
          ELSE                         ! layer case
             DO jk = 1, jpkm1
-               tilde_e3t_a(:,:,jk) = tilde_e3t_a(:,:,jk) -   fse3t_n(:,:,jk) * ( hdivn(:,:,jk) - zhdiv(:,:) ) * tmask(:,:,jk)
-            END DO
-         END IF
+               tilde_e3t_a(:,:,jk) = tilde_e3t_a(:,:,jk) -   e3t_n(:,:,jk) * ( hdivn(:,:,jk) - zhdiv(:,:) ) * tmask(:,:,jk)
+            END DO
+         ENDIF
 
          ! 2 - Restoring term (z-tilde case only)
@@ -355,12 +358,11 @@
                tilde_e3t_a(:,:,jk) = tilde_e3t_a(:,:,jk) - frq_rst_e3t(:,:) * tilde_e3t_b(:,:,jk)
             END DO
-         END IF
+         ENDIF
 
          ! 3 - Thickness diffusion term
          ! ----------------------------
-         zwu(:,:) = 0.0_wp
-         zwv(:,:) = 0.0_wp
-         ! a - first derivative: diffusive fluxes
-         DO jk = 1, jpkm1
+         zwu(:,:) = 0._wp
+         zwv(:,:) = 0._wp
+         DO jk = 1, jpkm1        ! a - first derivative: diffusive fluxes
             DO jj = 1, jpjm1
                DO ji = 1, fs_jpim1   ! vector opt.
@@ -374,6 +376,5 @@
             END DO
          END DO
-         ! b - correction for last oceanic u-v points
-         DO jj = 1, jpj
+         DO jj = 1, jpj          ! b - correction for last oceanic u-v points
             DO ji = 1, jpi
                un_td(ji,jj,mbku(ji,jj)) = un_td(ji,jj,mbku(ji,jj)) - zwu(ji,jj)
@@ -381,6 +382,5 @@
             END DO
          END DO
-         ! c - second derivative: divergence of diffusive fluxes
-         DO jk = 1, jpkm1
+         DO jk = 1, jpkm1        ! c - second derivative: divergence of diffusive fluxes
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -391,6 +391,6 @@
             END DO
          END DO
-         ! d - thickness diffusion transport: boundary conditions
-         !     (stored for tracer advction and continuity equation)
+         !                       ! d - thickness diffusion transport: boundary conditions
+         !                             (stored for tracer advction and continuity equation)
          CALL lbc_lnk( un_td , 'U' , -1._wp)
          CALL lbc_lnk( vn_td , 'V' , -1._wp)
@@ -410,5 +410,5 @@
          ! Maximum deformation control
          ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-         ze3t(:,:,jpk) = 0.0_wp
+         ze3t(:,:,jpk) = 0._wp
          DO jk = 1, jpkm1
             ze3t(:,:,jk) = tilde_e3t_a(:,:,jk) / e3t_0(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:)
@@ -462,5 +462,5 @@
          z_scale(:,:) =  - zht(:,:) / ( ht_0(:,:) + sshn(:,:) + 1. - ssmask(:,:) )
          DO jk = 1, jpkm1
-            dtilde_e3t_a(:,:,jk) = dtilde_e3t_a(:,:,jk) + fse3t_n(:,:,jk) * z_scale(:,:) * tmask(:,:,jk)
+            dtilde_e3t_a(:,:,jk) = dtilde_e3t_a(:,:,jk) + e3t_n(:,:,jk) * z_scale(:,:) * tmask(:,:,jk)
          END DO
 
@@ -470,5 +470,5 @@
       !                                           ! ---baroclinic part--------- !
          DO jk = 1, jpkm1
-            fse3t_a(:,:,jk) = fse3t_a(:,:,jk) + dtilde_e3t_a(:,:,jk) * tmask(:,:,jk)
+            e3t_a(:,:,jk) = e3t_a(:,:,jk) + dtilde_e3t_a(:,:,jk) * tmask(:,:,jk)
          END DO
       ENDIF
@@ -485,25 +485,25 @@
          zht(:,:) = 0.0_wp
          DO jk = 1, jpkm1
-            zht(:,:) = zht(:,:) + fse3t_n(:,:,jk) * tmask(:,:,jk)
+            zht(:,:) = zht(:,:) + e3t_n(:,:,jk) * tmask(:,:,jk)
          END DO
          z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + sshn(:,:) - zht(:,:) ) )
          IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
-         IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+sshn-SUM(fse3t_n))) =', z_tmax
+         IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+sshn-SUM(e3t_n))) =', z_tmax
          !
          zht(:,:) = 0.0_wp
          DO jk = 1, jpkm1
-            zht(:,:) = zht(:,:) + fse3t_a(:,:,jk) * tmask(:,:,jk)
+            zht(:,:) = zht(:,:) + e3t_a(:,:,jk) * tmask(:,:,jk)
          END DO
          z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + ssha(:,:) - zht(:,:) ) )
          IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
-         IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+ssha-SUM(fse3t_a))) =', z_tmax
+         IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+ssha-SUM(e3t_a))) =', z_tmax
          !
          zht(:,:) = 0.0_wp
          DO jk = 1, jpkm1
-            zht(:,:) = zht(:,:) + fse3t_b(:,:,jk) * tmask(:,:,jk)
+            zht(:,:) = zht(:,:) + e3t_b(:,:,jk) * tmask(:,:,jk)
          END DO
          z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + sshb(:,:) - zht(:,:) ) )
          IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
-         IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+sshb-SUM(fse3t_b))) =', z_tmax
+         IF( lwp    ) WRITE(numout, *) kt,' MAXVAL(abs(ht_0+sshb-SUM(e3t_b))) =', z_tmax
          !
          z_tmax = MAXVAL( tmask(:,:,1) *  ABS( sshb(:,:) ) )
@@ -524,6 +524,6 @@
       ! *********************************** !
 
-      CALL dom_vvl_interpol( fse3t_a(:,:,:), fse3u_a(:,:,:), 'U' )
-      CALL dom_vvl_interpol( fse3t_a(:,:,:), fse3v_a(:,:,:), 'V' )
+      CALL dom_vvl_interpol( e3t_a(:,:,:), e3u_a(:,:,:), 'U' )
+      CALL dom_vvl_interpol( e3t_a(:,:,:), e3v_a(:,:,:), 'V' )
 
       ! *********************************** !
@@ -531,19 +531,20 @@
       ! *********************************** !
 
-      hu_a(:,:) = 0._wp                        ! Ocean depth at U-points
-      hv_a(:,:) = 0._wp                        ! Ocean depth at V-points
-      DO jk = 1, jpkm1
-         hu_a(:,:) = hu_a(:,:) + fse3u_a(:,:,jk) * umask(:,:,jk)
-         hv_a(:,:) = hv_a(:,:) + fse3v_a(:,:,jk) * vmask(:,:,jk)
+      hu_a(:,:) = e3u_a(:,:,1) * umask(:,:,1)
+      hv_a(:,:) = e3v_a(:,:,1) * vmask(:,:,1)
+      DO jk = 2, jpkm1
+         hu_a(:,:) = hu_a(:,:) + e3u_a(:,:,jk) * umask(:,:,jk)
+         hv_a(:,:) = hv_a(:,:) + e3v_a(:,:,jk) * vmask(:,:,jk)
       END DO
       !                                        ! Inverse of the local depth
-      hur_a(:,:) = 1._wp / ( hu_a(:,:) + 1._wp - umask_i(:,:) ) * umask_i(:,:)
-      hvr_a(:,:) = 1._wp / ( hv_a(:,:) + 1._wp - vmask_i(:,:) ) * vmask_i(:,:)
-
-      CALL wrk_dealloc( jpi, jpj, zht, z_scale, zwu, zwv, zhdiv )
-      CALL wrk_dealloc( jpi, jpj, jpk, ze3t                     )
-
+!!gm BUG ?  don't understand the use of umask_i here .....
+      r1_hu_a(:,:) = 1._wp / ( hu_a(:,:) + 1._wp - umask_i(:,:) ) * umask_i(:,:)
+      r1_hv_a(:,:) = 1._wp / ( hv_a(:,:) + 1._wp - vmask_i(:,:) ) * vmask_i(:,:)
+      !
+      CALL wrk_dealloc( jpi,jpj,       zht, z_scale, zwu, zwv, zhdiv )
+      CALL wrk_dealloc( jpi,jpj,jpk,   ze3t )
+      !
       IF( nn_timing == 1 )  CALL timing_stop('dom_vvl_sf_nxt')
-
+      !
    END SUBROUTINE dom_vvl_sf_nxt
 
@@ -561,11 +562,11 @@
       !!               - recompute depths and water height fields
       !!
-      !! ** Action  :  - fse3t_(b/n), tilde_e3t_(b/n) and fse3(u/v)_n ready for next time step
+      !! ** Action  :  - e3t_(b/n), tilde_e3t_(b/n) and e3(u/v)_n ready for next time step
       !!               - Recompute:
-      !!                    fse3(u/v)_b       
-      !!                    fse3w_n           
-      !!                    fse3(u/v)w_b      
-      !!                    fse3(u/v)w_n      
-      !!                    fsdept_n, fsdepw_n  and fsde3w_n
+      !!                    e3(u/v)_b       
+      !!                    e3w_n           
+      !!                    e3(u/v)w_b      
+      !!                    e3(u/v)w_n      
+      !!                    gdept_n, gdepw_n  and gde3w_n
       !!                    h(u/v) and h(u/v)r
       !!
@@ -573,9 +574,8 @@
       !!              Leclair, M., and G. Madec, 2011, Ocean Modelling.
       !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER, INTENT( in )               :: kt       ! time step
-      !! * Local declarations
-      INTEGER                             :: ji,jj,jk       ! dummy loop indices
-      REAL(wp)                            :: zcoef
+      INTEGER, INTENT( in ) ::   kt   ! time step
+      !
+      INTEGER  ::   ji, jj, jk   ! dummy loop indices
+      REAL(wp) ::   zcoef        ! local scalar
       !!----------------------------------------------------------------------
 
@@ -590,5 +590,5 @@
       ! Time filter and swap of scale factors
       ! =====================================
-      ! - ML - fse3(t/u/v)_b are allready computed in dynnxt.
+      ! - ML - e3(t/u/v)_b are allready computed in dynnxt.
       IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN
          IF( neuler == 0 .AND. kt == nit000 ) THEN
@@ -600,10 +600,10 @@
          tilde_e3t_n(:,:,:) = tilde_e3t_a(:,:,:)
       ENDIF
-      fsdept_b(:,:,:) = fsdept_n(:,:,:)
-      fsdepw_b(:,:,:) = fsdepw_n(:,:,:)
-
-      fse3t_n(:,:,:) = fse3t_a(:,:,:)
-      fse3u_n(:,:,:) = fse3u_a(:,:,:)
-      fse3v_n(:,:,:) = fse3v_a(:,:,:)
+      gdept_b(:,:,:) = gdept_n(:,:,:)
+      gdepw_b(:,:,:) = gdepw_n(:,:,:)
+
+      e3t_n(:,:,:) = e3t_a(:,:,:)
+      e3u_n(:,:,:) = e3u_a(:,:,:)
+      e3v_n(:,:,:) = e3v_a(:,:,:)
 
       ! Compute all missing vertical scale factor and depths
@@ -611,21 +611,23 @@
       ! Horizontal scale factor interpolations
       ! --------------------------------------
-      ! - ML - fse3u_b and fse3v_b are allready computed in dynnxt
+      ! - ML - e3u_b and e3v_b are allready computed in dynnxt
       ! - JC - hu_b, hv_b, hur_b, hvr_b also
-      CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3f_n (:,:,:), 'F'  )
+      
+      CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F'  )
+      
       ! Vertical scale factor interpolations
       ! ------------------------------------
-      CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3w_n (:,:,:), 'W'  )
-      CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3uw_n(:,:,:), 'UW' )
-      CALL dom_vvl_interpol( fse3v_n(:,:,:), fse3vw_n(:,:,:), 'VW' )
-      CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3w_b (:,:,:), 'W'  )
-      CALL dom_vvl_interpol( fse3u_b(:,:,:), fse3uw_b(:,:,:), 'UW' )
-      CALL dom_vvl_interpol( fse3v_b(:,:,:), fse3vw_b(:,:,:), 'VW' )
+      CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W'  )
+      CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' )
+      CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' )
+      CALL dom_vvl_interpol( e3t_b(:,:,:), e3w_b (:,:,:), 'W'  )
+      CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' )
+      CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' )
       ! t- and w- points depth
       ! ----------------------
       ! set the isf depth as it is in the initial step
-      fsdept_n(:,:,1) = 0.5_wp * fse3w_n(:,:,1)
-      fsdepw_n(:,:,1) = 0.0_wp
-      fsde3w_n(:,:,1) = fsdept_n(:,:,1) - sshn(:,:)
+      gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1)
+      gdepw_n(:,:,1) = 0.0_wp
+      gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:)
 
       DO jk = 2, jpk
@@ -635,37 +637,30 @@
                                                                  ! 1 for jk = mikt
                zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk))
-               fsdepw_n(ji,jj,jk) = fsdepw_n(ji,jj,jk-1) + fse3t_n(ji,jj,jk-1)
-               fsdept_n(ji,jj,jk) =      zcoef  * ( fsdepw_n(ji,jj,jk  ) + 0.5 * fse3w_n(ji,jj,jk))  &
-                   &                + (1-zcoef) * ( fsdept_n(ji,jj,jk-1) +       fse3w_n(ji,jj,jk)) 
-               fsde3w_n(ji,jj,jk) = fsdept_n(ji,jj,jk) - sshn(ji,jj)
+               gdepw_n(ji,jj,jk) = gdepw_n(ji,jj,jk-1) + e3t_n(ji,jj,jk-1)
+               gdept_n(ji,jj,jk) =      zcoef  * ( gdepw_n(ji,jj,jk  ) + 0.5 * e3w_n(ji,jj,jk))  &
+                   &               + (1-zcoef) * ( gdept_n(ji,jj,jk-1) +       e3w_n(ji,jj,jk)) 
+               gde3w_n(ji,jj,jk) = gdept_n(ji,jj,jk) - sshn(ji,jj)
             END DO
          END DO
       END DO
 
-      ! Local depth and Inverse of the local depth of the water column at u- and v- points
       ! ----------------------------------------------------------------------------------
-      hu (:,:) = hu_a (:,:)
-      hv (:,:) = hv_a (:,:)
-
-      ! Inverse of the local depth
-      hur(:,:) = hur_a(:,:)
-      hvr(:,:) = hvr_a(:,:)
-
-      ! Local depth of the water column at t- points
-      ! --------------------------------------------
-      ht(:,:) = 0.
-      DO jk = 1, jpkm1
-         ht(:,:) = ht(:,:) + fse3t_n(:,:,jk) * tmask(:,:,jk)
+      hu_n(:,:) = hu_a(:,:)   ;   r1_hu_n(:,:) = r1_hu_a(:,:)
+      hv_n(:,:) = hv_a(:,:)   ;   r1_hv_n(:,:) = r1_hv_a(:,:)
+      !
+      ht_n(:,:) = e3t_n(:,:,1) * tmask(:,:,1)
+      DO jk = 2, jpkm1
+         ht_n(:,:) = ht_n(:,:) + e3t_n(:,:,jk) * tmask(:,:,jk)
       END DO
 
       ! Write outputs
       ! =============
-      CALL iom_put(     "e3t" , fse3t_n  (:,:,:) )
-      CALL iom_put(     "e3u" , fse3u_n  (:,:,:) )
-      CALL iom_put(     "e3v" , fse3v_n  (:,:,:) )
-      CALL iom_put(     "e3w" , fse3w_n  (:,:,:) )
-      CALL iom_put( "tpt_dep" , fsde3w_n (:,:,:) )
+      CALL iom_put(     "e3t" , e3t_n  (:,:,:) )
+      CALL iom_put(     "e3u" , e3u_n  (:,:,:) )
+      CALL iom_put(     "e3v" , e3v_n  (:,:,:) )
+      CALL iom_put(     "e3w" , e3w_n  (:,:,:) )
+      CALL iom_put( "tpt_dep" , gde3w_n(:,:,:) )
       IF( iom_use("e3tdef") )   &
-         CALL iom_put( "e3tdef"  , ( ( fse3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 )
+         CALL iom_put( "e3tdef"  , ( ( e3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 )
 
       ! write restart file
@@ -674,5 +669,5 @@
       !
       IF( nn_timing == 1 )  CALL timing_stop('dom_vvl_sf_swp')
-
+      !
    END SUBROUTINE dom_vvl_sf_swp
 
@@ -801,6 +796,6 @@
             CALL iom_get( numror, jpdom_autoglo, 'sshn'   , sshn    )
             !
-            id1 = iom_varid( numror, 'fse3t_b', ldstop = .FALSE. )
-            id2 = iom_varid( numror, 'fse3t_n', ldstop = .FALSE. )
+            id1 = iom_varid( numror, 'e3t_b', ldstop = .FALSE. )
+            id2 = iom_varid( numror, 'e3t_n', ldstop = .FALSE. )
             id3 = iom_varid( numror, 'tilde_e3t_b', ldstop = .FALSE. )
             id4 = iom_varid( numror, 'tilde_e3t_n', ldstop = .FALSE. )
@@ -810,39 +805,39 @@
             !                             ! --------- !
             IF( MIN( id1, id2 ) > 0 ) THEN       ! all required arrays exist
-               CALL iom_get( numror, jpdom_autoglo, 'fse3t_b', fse3t_b(:,:,:) )
-               CALL iom_get( numror, jpdom_autoglo, 'fse3t_n', fse3t_n(:,:,:) )
+               CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:) )
+               CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t_n(:,:,:) )
                ! needed to restart if land processor not computed 
-               IF(lwp) write(numout,*) 'dom_vvl_rst : fse3t_b and fse3t_n found in restart files'
+               IF(lwp) write(numout,*) 'dom_vvl_rst : e3t_b and e3t_n found in restart files'
                WHERE ( tmask(:,:,:) == 0.0_wp ) 
-                  fse3t_n(:,:,:) = e3t_0(:,:,:)
-                  fse3t_b(:,:,:) = e3t_0(:,:,:)
+                  e3t_n(:,:,:) = e3t_0(:,:,:)
+                  e3t_b(:,:,:) = e3t_0(:,:,:)
                END WHERE
                IF( neuler == 0 ) THEN
-                  fse3t_b(:,:,:) = fse3t_n(:,:,:)
+                  e3t_b(:,:,:) = e3t_n(:,:,:)
                ENDIF
             ELSE IF( id1 > 0 ) THEN
-               IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : fse3t_n not found in restart files'
-               IF(lwp) write(numout,*) 'fse3t_n set equal to fse3t_b.'
+               IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : e3t_n not found in restart files'
+               IF(lwp) write(numout,*) 'e3t_n set equal to e3t_b.'
                IF(lwp) write(numout,*) 'neuler is forced to 0'
-               CALL iom_get( numror, jpdom_autoglo, 'fse3t_b', fse3t_b(:,:,:) )
-               fse3t_n(:,:,:) = fse3t_b(:,:,:)
+               CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:) )
+               e3t_n(:,:,:) = e3t_b(:,:,:)
                neuler = 0
             ELSE IF( id2 > 0 ) THEN
-               IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : fse3t_b not found in restart files'
-               IF(lwp) write(numout,*) 'fse3t_b set equal to fse3t_n.'
+               IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : e3t_b not found in restart files'
+               IF(lwp) write(numout,*) 'e3t_b set equal to e3t_n.'
                IF(lwp) write(numout,*) 'neuler is forced to 0'
-               CALL iom_get( numror, jpdom_autoglo, 'fse3t_n', fse3t_n(:,:,:) )
-               fse3t_b(:,:,:) = fse3t_n(:,:,:)
+               CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t_n(:,:,:) )
+               e3t_b(:,:,:) = e3t_n(:,:,:)
                neuler = 0
             ELSE
-               IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : fse3t_n not found in restart file'
+               IF(lwp) write(numout,*) 'dom_vvl_rst WARNING : e3t_n not found in restart file'
                IF(lwp) write(numout,*) 'Compute scale factor from sshn'
                IF(lwp) write(numout,*) 'neuler is forced to 0'
-               DO jk=1,jpk
-                  fse3t_n(:,:,jk) =  e3t_0(:,:,jk) * ( ht_0(:,:) + sshn(:,:) ) &
-                      &                            / ( ht_0(:,:) + 1._wp - ssmask(:,:) ) * tmask(:,:,jk) &
-                      &            + e3t_0(:,:,jk) * (1._wp -tmask(:,:,jk))
+               DO jk = 1, jpk
+                  e3t_n(:,:,jk) =  e3t_0(:,:,jk) * ( ht_0(:,:) + sshn(:,:) ) &
+                      &                          / ( ht_0(:,:) + 1._wp - ssmask(:,:) ) * tmask(:,:,jk)   &
+                      &          + e3t_0(:,:,jk)                               * (1._wp -tmask(:,:,jk))
                END DO
-               fse3t_b(:,:,:) = fse3t_n(:,:,:)
+               e3t_b(:,:,:) = e3t_n(:,:,:)
                neuler = 0
             ENDIF
@@ -875,6 +870,6 @@
             !
          ELSE                                   !* Initialize at "rest"
-            fse3t_b(:,:,:) = e3t_0(:,:,:)
-            fse3t_n(:,:,:) = e3t_0(:,:,:)
+            e3t_b(:,:,:) = e3t_0(:,:,:)
+            e3t_n(:,:,:) = e3t_0(:,:,:)
             sshn(:,:) = 0.0_wp
             IF( ln_vvl_ztilde .OR. ln_vvl_layer) THEN
@@ -891,6 +886,6 @@
          !                                           ! all cases !
          !                                           ! --------- !
-         CALL iom_rstput( kt, nitrst, numrow, 'fse3t_b', fse3t_b(:,:,:) )
-         CALL iom_rstput( kt, nitrst, numrow, 'fse3t_n', fse3t_n(:,:,:) )
+         CALL iom_rstput( kt, nitrst, numrow, 'e3t_b', e3t_b(:,:,:) )
+         CALL iom_rstput( kt, nitrst, numrow, 'e3t_n', e3t_n(:,:,:) )
          !                                           ! ----------------------- !
          IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN  ! z_tilde and layer cases !
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 5845)
@@ -2,5 +2,5 @@
    !!==============================================================================
    !!                       ***  MODULE domzgr   ***
-   !! Ocean initialization : domain initialization
+   !! Ocean domain : definition of the vertical coordinate system
    !!==============================================================================
    !! History :  OPA  ! 1995-12  (G. Madec)  Original code : s vertical coordinate
@@ -38,4 +38,5 @@
    USE closea            ! closed seas
    USE c1d               ! 1D vertical configuration
+   !
    USE in_out_manager    ! I/O manager
    USE iom               ! I/O library
@@ -73,5 +74,4 @@
 
   !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -157,5 +157,5 @@
          WRITE(numout,*) ' MIN val mbathy ', MINVAL( mbathy(:,:) ), ' MAX ', MAXVAL( mbathy(:,:) )
          WRITE(numout,*) ' MIN val depth t ', MINVAL( gdept_0(:,:,:) ),   &
-            &                   ' w ',   MINVAL( gdepw_0(:,:,:) ), '3w ', MINVAL( gdep3w_0(:,:,:) )
+            &                   ' w ',   MINVAL( gdepw_0(:,:,:) ), '3w ', MINVAL( gde3w_0(:,:,:) )
          WRITE(numout,*) ' MIN val e3    t ', MINVAL( e3t_0(:,:,:) ), ' f ', MINVAL( e3f_0(:,:,:) ),  &
             &                   ' u ',   MINVAL( e3u_0(:,:,:) ), ' u ', MINVAL( e3v_0(:,:,:) ),  &
@@ -164,5 +164,5 @@
 
          WRITE(numout,*) ' MAX val depth t ', MAXVAL( gdept_0(:,:,:) ),   &
-            &                   ' w ',   MAXVAL( gdepw_0(:,:,:) ), '3w ', MAXVAL( gdep3w_0(:,:,:) )
+            &                   ' w ',   MAXVAL( gdepw_0(:,:,:) ), '3w ', MAXVAL( gde3w_0(:,:,:) )
          WRITE(numout,*) ' MAX val e3    t ', MAXVAL( e3t_0(:,:,:) ), ' f ', MAXVAL( e3f_0(:,:,:) ),  &
             &                   ' u ',   MAXVAL( e3u_0(:,:,:) ), ' u ', MAXVAL( e3v_0(:,:,:) ),  &
@@ -674,9 +674,7 @@
       !!              - update bathy : meter bathymetry (in meters)
       !!----------------------------------------------------------------------
-      !!
       INTEGER ::   ji, jj, jl                    ! dummy loop indices
       INTEGER ::   icompt, ibtest, ikmax         ! temporary integers
       REAL(wp), POINTER, DIMENSION(:,:) ::  zbathy
-
       !!----------------------------------------------------------------------
       !
@@ -775,12 +773,4 @@
          IF(lwp) WRITE(numout,*) ' you can decrease jpk to ', ikmax+1
       ENDIF
-
-      IF( lwp .AND. nprint == 1 ) THEN      ! control print
-         WRITE(numout,*)
-         WRITE(numout,*) ' bathymetric field :   number of non-zero T-levels '
-         WRITE(numout,*) ' ------------------'
-         CALL prihin( mbathy, jpi, jpj, 1, jpi, 1, 1, jpj, 1, 3, numout )
-         WRITE(numout,*)
-      ENDIF
       !
       CALL wrk_dealloc( jpi, jpj, zbathy )
@@ -803,5 +793,4 @@
       !!                                     (min value = 1 over land)
       !!----------------------------------------------------------------------
-      !!
       INTEGER ::   ji, jj   ! dummy loop indices
       REAL(wp), POINTER, DIMENSION(:,:) ::  zmbk
@@ -835,5 +824,6 @@
    END SUBROUTINE zgr_bot_level
 
-      SUBROUTINE zgr_top_level
+
+   SUBROUTINE zgr_top_level
       !!----------------------------------------------------------------------
       !!                    ***  ROUTINE zgr_bot_level  ***
@@ -847,5 +837,4 @@
       !!                                     (min value = 1)
       !!----------------------------------------------------------------------
-      !!
       INTEGER ::   ji, jj   ! dummy loop indices
       REAL(wp), POINTER, DIMENSION(:,:) ::  zmik
@@ -881,4 +870,5 @@
    END SUBROUTINE zgr_top_level
 
+
    SUBROUTINE zgr_zco
       !!----------------------------------------------------------------------
@@ -895,14 +885,14 @@
       !
       DO jk = 1, jpk
-         gdept_0 (:,:,jk) = gdept_1d(jk)
-         gdepw_0 (:,:,jk) = gdepw_1d(jk)
-         gdep3w_0(:,:,jk) = gdepw_1d(jk)
-         e3t_0   (:,:,jk) = e3t_1d  (jk)
-         e3u_0   (:,:,jk) = e3t_1d  (jk)
-         e3v_0   (:,:,jk) = e3t_1d  (jk)
-         e3f_0   (:,:,jk) = e3t_1d  (jk)
-         e3w_0   (:,:,jk) = e3w_1d  (jk)
-         e3uw_0  (:,:,jk) = e3w_1d  (jk)
-         e3vw_0  (:,:,jk) = e3w_1d  (jk)
+         gdept_0(:,:,jk) = gdept_1d(jk)
+         gdepw_0(:,:,jk) = gdepw_1d(jk)
+         gde3w_0(:,:,jk) = gdepw_1d(jk)
+         e3t_0  (:,:,jk) = e3t_1d  (jk)
+         e3u_0  (:,:,jk) = e3t_1d  (jk)
+         e3v_0  (:,:,jk) = e3t_1d  (jk)
+         e3f_0  (:,:,jk) = e3t_1d  (jk)
+         e3w_0  (:,:,jk) = e3w_1d  (jk)
+         e3uw_0 (:,:,jk) = e3w_1d  (jk)
+         e3vw_0 (:,:,jk) = e3w_1d  (jk)
       END DO
       !
@@ -957,8 +947,6 @@
       !!  Reference :   Pacanowsky & Gnanadesikan 1997, Mon. Wea. Rev., 126, 3248-3270.
       !!----------------------------------------------------------------------
-      !!
       INTEGER  ::   ji, jj, jk       ! dummy loop indices
       INTEGER  ::   ik, it, ikb, ikt ! temporary integers
-      LOGICAL  ::   ll_print         ! Allow  control print for debugging
       REAL(wp) ::   ze3tp , ze3wp    ! Last ocean level thickness at T- and W-points
       REAL(wp) ::   zdepwp, zdepth   ! Ajusted ocean depth to avoid too small e3t
@@ -977,13 +965,4 @@
       IF(lwp) WRITE(numout,*) '    ~~~~~~~ '
       IF(lwp) WRITE(numout,*) '              mbathy is recomputed : bathy_level file is NOT used'
-
-      ll_print = .FALSE.                   ! Local variable for debugging
-      
-      IF(lwp .AND. ll_print) THEN          ! control print of the ocean depth
-         WRITE(numout,*)
-         WRITE(numout,*) 'dom_zgr_zps:  bathy (in hundred of meters)'
-         CALL prihre( bathy, jpi, jpj, 1,jpi, 1, 1, jpj, 1, 1.e-2, numout )
-      ENDIF
-
 
       ! bathymetry in level (from bathy_meter)
@@ -1196,52 +1175,25 @@
       IF( MINVAL( gdepw_0(:,:,:) ) <  0._wp )   CALL ctl_stop( '    zgr_zps :   e r r o r   gdepw_0 <  0' )
      
-      ! Compute gdep3w_0 (vertical sum of e3w)
+      ! Compute gde3w_0 (vertical sum of e3w)
       IF ( ln_isfcav ) THEN ! if cavity
          WHERE (misfdep == 0) misfdep = 1
          DO jj = 1,jpj
             DO ji = 1,jpi
-               gdep3w_0(ji,jj,1) = 0.5_wp * e3w_0(ji,jj,1)
+               gde3w_0(ji,jj,1) = 0.5_wp * e3w_0(ji,jj,1)
                DO jk = 2, misfdep(ji,jj)
-                  gdep3w_0(ji,jj,jk) = gdep3w_0(ji,jj,jk-1) + e3w_0(ji,jj,jk) 
+                  gde3w_0(ji,jj,jk) = gde3w_0(ji,jj,jk-1) + e3w_0(ji,jj,jk) 
                END DO
-               IF (misfdep(ji,jj) .GE. 2) gdep3w_0(ji,jj,misfdep(ji,jj)) = risfdep(ji,jj) + 0.5_wp * e3w_0(ji,jj,misfdep(ji,jj))
+               IF (misfdep(ji,jj) .GE. 2) gde3w_0(ji,jj,misfdep(ji,jj)) = risfdep(ji,jj) + 0.5_wp * e3w_0(ji,jj,misfdep(ji,jj))
                DO jk = misfdep(ji,jj) + 1, jpk
-                  gdep3w_0(ji,jj,jk) = gdep3w_0(ji,jj,jk-1) + e3w_0(ji,jj,jk) 
+                  gde3w_0(ji,jj,jk) = gde3w_0(ji,jj,jk-1) + e3w_0(ji,jj,jk) 
                END DO
             END DO
          END DO
       ELSE ! no cavity
-         gdep3w_0(:,:,1) = 0.5_wp * e3w_0(:,:,1)
+         gde3w_0(:,:,1) = 0.5_wp * e3w_0(:,:,1)
          DO jk = 2, jpk
-            gdep3w_0(:,:,jk) = gdep3w_0(:,:,jk-1) + e3w_0(:,:,jk)
+            gde3w_0(:,:,jk) = gde3w_0(:,:,jk-1) + e3w_0(:,:,jk)
          END DO
       END IF
-      !                                               ! ================= !
-      IF(lwp .AND. ll_print) THEN                     !   Control print   !
-         !                                            ! ================= !
-         DO jj = 1,jpj
-            DO ji = 1, jpi
-               ik = MAX( mbathy(ji,jj), 1 )
-               zprt(ji,jj,1) = e3t_0   (ji,jj,ik)
-               zprt(ji,jj,2) = e3w_0   (ji,jj,ik)
-               zprt(ji,jj,3) = e3u_0   (ji,jj,ik)
-               zprt(ji,jj,4) = e3v_0   (ji,jj,ik)
-               zprt(ji,jj,5) = e3f_0   (ji,jj,ik)
-               zprt(ji,jj,6) = gdep3w_0(ji,jj,ik)
-            END DO
-         END DO
-         WRITE(numout,*)
-         WRITE(numout,*) 'domzgr e3t(mbathy)'      ;   CALL prihre(zprt(:,:,1),jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
-         WRITE(numout,*)
-         WRITE(numout,*) 'domzgr e3w(mbathy)'      ;   CALL prihre(zprt(:,:,2),jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
-         WRITE(numout,*)
-         WRITE(numout,*) 'domzgr e3u(mbathy)'      ;   CALL prihre(zprt(:,:,3),jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
-         WRITE(numout,*)
-         WRITE(numout,*) 'domzgr e3v(mbathy)'      ;   CALL prihre(zprt(:,:,4),jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
-         WRITE(numout,*)
-         WRITE(numout,*) 'domzgr e3f(mbathy)'      ;   CALL prihre(zprt(:,:,5),jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
-         WRITE(numout,*)
-         WRITE(numout,*) 'domzgr gdep3w(mbathy)'   ;   CALL prihre(zprt(:,:,6),jpi,jpj,1,jpi,1,1,jpj,1,1.e-3,numout)
-      ENDIF  
       !
       CALL wrk_dealloc( jpi, jpj, jpk, zprt )
@@ -1250,4 +1202,5 @@
       !
    END SUBROUTINE zgr_zps
+
 
    SUBROUTINE zgr_isf
@@ -1265,10 +1218,8 @@
       !!              - bathy and isfdraft are modified
       !!----------------------------------------------------------------------
-      !!   
       INTEGER  ::   ji, jj, jk, jl   ! dummy loop indices
       INTEGER  ::   ik, it           ! temporary integers
       INTEGER  ::   id, jd, nprocd
       INTEGER  ::   icompt, ibtest, ibtestim1, ibtestip1, ibtestjm1, ibtestjp1   ! (ISF)
-      LOGICAL  ::   ll_print         ! Allow  control print for debugging
       REAL(wp) ::   ze3tp , ze3wp    ! Last ocean level thickness at T- and W-points
       REAL(wp) ::   zdepwp, zdepth   ! Ajusted ocean depth to avoid too small e3t
@@ -1752,8 +1703,9 @@
       CALL wrk_dealloc( jpi, jpj, zmask, zbathy, zrisfdep )
       CALL wrk_dealloc( jpi, jpj, zmisfdep, zmbathy )
-
+      !
       IF( nn_timing == 1 )  CALL timing_stop('zgr_isf')
-      
+      !      
    END SUBROUTINE
+
 
    SUBROUTINE zgr_sco
@@ -1801,5 +1753,4 @@
       !!
       !!----------------------------------------------------------------------
-      !
       INTEGER  ::   ji, jj, jk, jl           ! dummy loop argument
       INTEGER  ::   iip1, ijp1, iim1, ijm1   ! temporary integers
@@ -1810,7 +1761,7 @@
       REAL(wp), POINTER, DIMENSION(:,:  ) :: ztmpi1, ztmpi2, ztmpj1, ztmpj2
       REAL(wp), POINTER, DIMENSION(:,:  ) :: zenv, ztmp, zmsk, zri, zrj, zhbat
-
+      !!
       NAMELIST/namzgr_sco/ln_s_sh94, ln_s_sf12, ln_sigcrit, rn_sbot_min, rn_sbot_max, rn_hc, rn_rmax,rn_theta, &
-                           rn_thetb, rn_bb, rn_alpha, rn_efold, rn_zs, rn_zb_a, rn_zb_b
+         &                rn_thetb, rn_bb, rn_alpha, rn_efold, rn_zs, rn_zb_a, rn_zb_b
      !!----------------------------------------------------------------------
       !
@@ -1876,13 +1827,19 @@
       DO jj = 1, jpj
          DO ji = 1, jpi
-           IF( bathy(ji,jj) == 0._wp ) THEN
-             iip1 = MIN( ji+1, jpi )
-             ijp1 = MIN( jj+1, jpj )
-             iim1 = MAX( ji-1, 1 )
-             ijm1 = MAX( jj-1, 1 )
-             IF( (bathy(iip1,jj) + bathy(iim1,jj) + bathy(ji,ijp1) + bathy(ji,ijm1) +              &
-        &         bathy(iip1,ijp1) + bathy(iim1,ijm1) + bathy(iip1,ijp1) + bathy(iim1,ijm1)) > 0._wp ) THEN
-               zenv(ji,jj) = rn_sbot_min
-             ENDIF
+            IF( bathy(ji,jj) == 0._wp ) THEN
+               iip1 = MIN( ji+1, jpi )
+               ijp1 = MIN( jj+1, jpj )
+               iim1 = MAX( ji-1, 1 )
+               ijm1 = MAX( jj-1, 1 )
+!!gm BUG fix see ticket #1617
+               IF( ( + bathy(iim1,ijm1) + bathy(ji,ijp1) + bathy(iip1,ijp1)            &
+                  &  + bathy(iim1,jj  )                  + bathy(iip1,jj  )            &
+                  &  + bathy(iim1,ijm1) + bathy(ji,ijm1) + bathy(iip1,ijp1)  ) > 0._wp )   zenv(ji,jj) = rn_sbot_min
+!!gm
+!!gm               IF( ( bathy(iip1,jj  ) + bathy(iim1,jj  ) + bathy(ji,ijp1  ) + bathy(ji,ijm1) +         &
+!!gm                  &  bathy(iip1,ijp1) + bathy(iim1,ijm1) + bathy(iip1,ijp1) + bathy(iim1,ijm1)) > 0._wp ) THEN
+!!gm               zenv(ji,jj) = rn_sbot_min
+!!gm             ENDIF
+!!gm end
            ENDIF
          END DO
@@ -1975,15 +1932,4 @@
       ENDIF
       !
-      IF(lwp) THEN                             ! Control print
-         WRITE(numout,*)
-         WRITE(numout,*) ' domzgr: hbatt field; ocean depth in meters'
-         WRITE(numout,*)
-         CALL prihre( hbatt(1,1), jpi, jpj, 1, jpi, 1, 1, jpj, 1, 0._wp, numout )
-         IF( nprint == 1 )   THEN        
-            WRITE(numout,*) ' bathy  MAX ', MAXVAL( bathy(:,:) ), ' MIN ', MINVAL( bathy(:,:) )
-            WRITE(numout,*) ' hbatt  MAX ', MAXVAL( hbatt(:,:) ), ' MIN ', MINVAL( hbatt(:,:) )
-         ENDIF
-      ENDIF
-
       !                                        ! ==============================
       !                                        !   hbatu, hbatv, hbatf fields
@@ -2081,48 +2027,33 @@
       CALL lbc_lnk( e3vw_0, 'V', 1._wp )
 
-      fsdepw(:,:,:) = gdepw_0 (:,:,:)
-      fsde3w(:,:,:) = gdep3w_0(:,:,:)
-      !
-      where (e3t_0   (:,:,:).eq.0.0)  e3t_0(:,:,:) = 1.0
-      where (e3u_0   (:,:,:).eq.0.0)  e3u_0(:,:,:) = 1.0
-      where (e3v_0   (:,:,:).eq.0.0)  e3v_0(:,:,:) = 1.0
-      where (e3f_0   (:,:,:).eq.0.0)  e3f_0(:,:,:) = 1.0
-      where (e3w_0   (:,:,:).eq.0.0)  e3w_0(:,:,:) = 1.0
-      where (e3uw_0  (:,:,:).eq.0.0)  e3uw_0(:,:,:) = 1.0
-      where (e3vw_0  (:,:,:).eq.0.0)  e3vw_0(:,:,:) = 1.0
+      gdepw_n(:,:,:) = gdepw_0(:,:,:)
+      !
+      WHERE( e3t_0 (:,:,:) == 0._wp )   e3t_0 (:,:,:) = 1._wp
+      WHERE( e3u_0 (:,:,:) == 0._wp )   e3u_0 (:,:,:) = 1._wp
+      WHERE( e3v_0 (:,:,:) == 0._wp )   e3v_0 (:,:,:) = 1._wp
+      WHERE( e3f_0 (:,:,:) == 0._wp )   e3f_0 (:,:,:) = 1._wp
+      WHERE( e3w_0 (:,:,:) == 0._wp )   e3w_0 (:,:,:) = 1._wp
+      WHERE( e3uw_0(:,:,:) == 0._wp )   e3uw_0(:,:,:) = 1._wp
+      WHERE( e3vw_0(:,:,:) == 0._wp )   e3vw_0(:,:,:) = 1._wp
 
 #if defined key_agrif
-      ! Ensure meaningful vertical scale factors in ghost lines/columns
-      IF( .NOT. Agrif_Root() ) THEN
-         !  
-         IF((nbondi == -1).OR.(nbondi == 2)) THEN
-            e3u_0(1,:,:) = e3u_0(2,:,:)
-         ENDIF
-         !
-         IF((nbondi ==  1).OR.(nbondi == 2)) THEN
-            e3u_0(nlci-1,:,:) = e3u_0(nlci-2,:,:)
-         ENDIF
-         !
-         IF((nbondj == -1).OR.(nbondj == 2)) THEN
-            e3v_0(:,1,:) = e3v_0(:,2,:)
-         ENDIF
-         !
-         IF((nbondj ==  1).OR.(nbondj == 2)) THEN
-            e3v_0(:,nlcj-1,:) = e3v_0(:,nlcj-2,:)
-         ENDIF
-         !
-      ENDIF
+      IF( .NOT. Agrif_Root() ) THEN    ! Ensure meaningful vertical scale factors in ghost lines/columns
+         IF( nbondi == -1 .OR. nbondi == 2 )   e3u_0(  1   ,  :   ,:) = e3u_0(  2   ,  :   ,:)
+         IF( nbondi ==  1 .OR. nbondi == 2 )   e3u_0(nlci-1,  :   ,:) = e3u_0(nlci-2,  :   ,:)
+         IF( nbondj == -1 .OR. nbondj == 2 )   e3v_0(  :   ,  1   ,:) = e3v_0(  :   ,  2   ,:)
+         IF( nbondj ==  1 .OR. nbondj == 2 )   e3v_0(  :   ,nlcj-1,:) = e3v_0(  :   ,nlcj-2,:)
+       ENDIF
 #endif
 
-      fsdept(:,:,:) = gdept_0 (:,:,:)
-      fsdepw(:,:,:) = gdepw_0 (:,:,:)
-      fsde3w(:,:,:) = gdep3w_0(:,:,:)
-      fse3t (:,:,:) = e3t_0   (:,:,:)
-      fse3u (:,:,:) = e3u_0   (:,:,:)
-      fse3v (:,:,:) = e3v_0   (:,:,:)
-      fse3f (:,:,:) = e3f_0   (:,:,:)
-      fse3w (:,:,:) = e3w_0   (:,:,:)
-      fse3uw(:,:,:) = e3uw_0  (:,:,:)
-      fse3vw(:,:,:) = e3vw_0  (:,:,:)
+      gdept_n(:,:,:) = gdept_0(:,:,:)
+      gdepw_n(:,:,:) = gdepw_0(:,:,:)
+      gde3w_n(:,:,:) = gde3w_0(:,:,:)
+      e3t_n  (:,:,:) = e3t_0  (:,:,:)
+      e3u_n  (:,:,:) = e3u_0  (:,:,:)
+      e3v_n  (:,:,:) = e3v_0  (:,:,:)
+      e3f_n  (:,:,:) = e3f_0  (:,:,:)
+      e3w_n  (:,:,:) = e3w_0  (:,:,:)
+      e3uw_n (:,:,:) = e3uw_0 (:,:,:)
+      e3vw_n (:,:,:) = e3vw_0 (:,:,:)
 !!
       ! HYBRID : 
@@ -2130,5 +2061,5 @@
          DO ji = 1, jpi
             DO jk = 1, jpkm1
-               IF( scobot(ji,jj) >= fsdept(ji,jj,jk) )   mbathy(ji,jj) = MAX( 2, jk )
+               IF( scobot(ji,jj) >= gdept_n(ji,jj,jk) )   mbathy(ji,jj) = MAX( 2, jk )
             END DO
             IF( scobot(ji,jj) == 0._wp               )   mbathy(ji,jj) = 0
@@ -2141,15 +2072,15 @@
          WRITE(numout,*) ' MIN val mbathy  ', MINVAL( mbathy(:,:)    ), ' MAX ', MAXVAL( mbathy(:,:) )
          WRITE(numout,*) ' MIN val depth t ', MINVAL( gdept_0(:,:,:) ),   &
-            &                          ' w ', MINVAL( gdepw_0(:,:,:) ), '3w '  , MINVAL( gdep3w_0(:,:,:) )
-         WRITE(numout,*) ' MIN val e3    t ', MINVAL( e3t_0  (:,:,:) ), ' f '  , MINVAL( e3f_0   (:,:,:) ),   &
-            &                          ' u ', MINVAL( e3u_0  (:,:,:) ), ' u '  , MINVAL( e3v_0   (:,:,:) ),   &
-            &                          ' uw', MINVAL( e3uw_0 (:,:,:) ), ' vw'  , MINVAL( e3vw_0  (:,:,:) ),   &
+            &                          ' w ', MINVAL( gdepw_0(:,:,:) ), '3w '  , MINVAL( gde3w_0(:,:,:) )
+         WRITE(numout,*) ' MIN val e3    t ', MINVAL( e3t_0  (:,:,:) ), ' f '  , MINVAL( e3f_0  (:,:,:) ),   &
+            &                          ' u ', MINVAL( e3u_0  (:,:,:) ), ' u '  , MINVAL( e3v_0  (:,:,:) ),   &
+            &                          ' uw', MINVAL( e3uw_0 (:,:,:) ), ' vw'  , MINVAL( e3vw_0 (:,:,:) ),   &
             &                          ' w ', MINVAL( e3w_0  (:,:,:) )
 
          WRITE(numout,*) ' MAX val depth t ', MAXVAL( gdept_0(:,:,:) ),   &
-            &                          ' w ', MAXVAL( gdepw_0(:,:,:) ), '3w '  , MAXVAL( gdep3w_0(:,:,:) )
-         WRITE(numout,*) ' MAX val e3    t ', MAXVAL( e3t_0  (:,:,:) ), ' f '  , MAXVAL( e3f_0   (:,:,:) ),   &
-            &                          ' u ', MAXVAL( e3u_0  (:,:,:) ), ' u '  , MAXVAL( e3v_0   (:,:,:) ),   &
-            &                          ' uw', MAXVAL( e3uw_0 (:,:,:) ), ' vw'  , MAXVAL( e3vw_0  (:,:,:) ),   &
+            &                          ' w ', MAXVAL( gdepw_0(:,:,:) ), '3w '  , MAXVAL( gde3w_0(:,:,:) )
+         WRITE(numout,*) ' MAX val e3    t ', MAXVAL( e3t_0  (:,:,:) ), ' f '  , MAXVAL( e3f_0  (:,:,:) ),   &
+            &                          ' u ', MAXVAL( e3u_0  (:,:,:) ), ' u '  , MAXVAL( e3v_0  (:,:,:) ),   &
+            &                          ' uw', MAXVAL( e3uw_0 (:,:,:) ), ' vw'  , MAXVAL( e3vw_0 (:,:,:) ),   &
             &                          ' w ', MAXVAL( e3w_0  (:,:,:) )
       ENDIF
@@ -2193,24 +2124,24 @@
                DO jk = 1, mbathy(ji,jj)
                  ! check coordinate is monotonically increasing
-                 IF (fse3w(ji,jj,jk) <= 0._wp .OR. fse3t(ji,jj,jk) <= 0._wp ) THEN
+                 IF (e3w_n(ji,jj,jk) <= 0._wp .OR. e3t_n(ji,jj,jk) <= 0._wp ) THEN
                     WRITE(ctmp1,*) 'ERROR zgr_sco :   e3w   or e3t   =< 0  at point (i,j,k)= ', ji, jj, jk
                     WRITE(numout,*) 'ERROR zgr_sco :   e3w   or e3t   =< 0  at point (i,j,k)= ', ji, jj, jk
-                    WRITE(numout,*) 'e3w',fse3w(ji,jj,:)
-                    WRITE(numout,*) 'e3t',fse3t(ji,jj,:)
+                    WRITE(numout,*) 'e3w',e3w_n(ji,jj,:)
+                    WRITE(numout,*) 'e3t',e3t_n(ji,jj,:)
                     CALL ctl_stop( ctmp1 )
                  ENDIF
                  ! and check it has never gone negative
-                 IF( fsdepw(ji,jj,jk) < 0._wp .OR. fsdept(ji,jj,jk) < 0._wp ) THEN
+                 IF( gdepw_n(ji,jj,jk) < 0._wp .OR. gdept_n(ji,jj,jk) < 0._wp ) THEN
                     WRITE(ctmp1,*) 'ERROR zgr_sco :   gdepw or gdept =< 0  at point (i,j,k)= ', ji, jj, jk
                     WRITE(numout,*) 'ERROR zgr_sco :   gdepw   or gdept   =< 0  at point (i,j,k)= ', ji, jj, jk
-                    WRITE(numout,*) 'gdepw',fsdepw(ji,jj,:)
-                    WRITE(numout,*) 'gdept',fsdept(ji,jj,:)
+                    WRITE(numout,*) 'gdepw',gdepw_n(ji,jj,:)
+                    WRITE(numout,*) 'gdept',gdept_n(ji,jj,:)
                     CALL ctl_stop( ctmp1 )
                  ENDIF
                  ! and check it never exceeds the total depth
-                 IF( fsdepw(ji,jj,jk) > hbatt(ji,jj) ) THEN
+                 IF( gdepw_n(ji,jj,jk) > hbatt(ji,jj) ) THEN
                     WRITE(ctmp1,*) 'ERROR zgr_sco :   gdepw > hbatt  at point (i,j,k)= ', ji, jj, jk
                     WRITE(numout,*) 'ERROR zgr_sco :   gdepw > hbatt  at point (i,j,k)= ', ji, jj, jk
-                    WRITE(numout,*) 'gdepw',fsdepw(ji,jj,:)
+                    WRITE(numout,*) 'gdepw',gdepw_n(ji,jj,:)
                     CALL ctl_stop( ctmp1 )
                  ENDIF
@@ -2219,8 +2150,8 @@
                DO jk = 1, mbathy(ji,jj)-1
                  ! and check it never exceeds the total depth
-                IF( fsdept(ji,jj,jk) > hbatt(ji,jj) ) THEN
+                IF( gdept_n(ji,jj,jk) > hbatt(ji,jj) ) THEN
                     WRITE(ctmp1,*) 'ERROR zgr_sco :   gdept > hbatt  at point (i,j,k)= ', ji, jj, jk
                     WRITE(numout,*) 'ERROR zgr_sco :   gdept > hbatt  at point (i,j,k)= ', ji, jj, jk
-                    WRITE(numout,*) 'gdept',fsdept(ji,jj,:)
+                    WRITE(numout,*) 'gdept',gdept_n(ji,jj,:)
                     CALL ctl_stop( ctmp1 )
                  ENDIF
@@ -2297,7 +2228,7 @@
                zcoeft = ( REAL(jk,wp) - 0.5_wp ) / REAL(jpkm1,wp)
                zcoefw = ( REAL(jk,wp) - 1.0_wp ) / REAL(jpkm1,wp)
-               gdept_0 (ji,jj,jk) = ( scosrf(ji,jj) + (hbatt(ji,jj)-rn_hc)*z_gsigt3(ji,jj,jk)+rn_hc*zcoeft )
-               gdepw_0 (ji,jj,jk) = ( scosrf(ji,jj) + (hbatt(ji,jj)-rn_hc)*z_gsigw3(ji,jj,jk)+rn_hc*zcoefw )
-               gdep3w_0(ji,jj,jk) = ( scosrf(ji,jj) + (hbatt(ji,jj)-rn_hc)*z_gsi3w3(ji,jj,jk)+rn_hc*zcoeft )
+               gdept_0(ji,jj,jk) = ( scosrf(ji,jj) + (hbatt(ji,jj)-rn_hc)*z_gsigt3(ji,jj,jk)+rn_hc*zcoeft )
+               gdepw_0(ji,jj,jk) = ( scosrf(ji,jj) + (hbatt(ji,jj)-rn_hc)*z_gsigw3(ji,jj,jk)+rn_hc*zcoefw )
+               gde3w_0(ji,jj,jk) = ( scosrf(ji,jj) + (hbatt(ji,jj)-rn_hc)*z_gsi3w3(ji,jj,jk)+rn_hc*zcoeft )
             END DO
            !
@@ -2425,7 +2356,7 @@
 
           DO jk = 1, jpk
-             gdept_0 (ji,jj,jk) = (scosrf(ji,jj)+hbatt(ji,jj))*z_gsigt3(ji,jj,jk)
-             gdepw_0 (ji,jj,jk) = (scosrf(ji,jj)+hbatt(ji,jj))*z_gsigw3(ji,jj,jk)
-             gdep3w_0(ji,jj,jk) = (scosrf(ji,jj)+hbatt(ji,jj))*z_gsi3w3(ji,jj,jk)
+             gdept_0(ji,jj,jk) = (scosrf(ji,jj)+hbatt(ji,jj))*z_gsigt3(ji,jj,jk)
+             gdepw_0(ji,jj,jk) = (scosrf(ji,jj)+hbatt(ji,jj))*z_gsigw3(ji,jj,jk)
+             gde3w_0(ji,jj,jk) = (scosrf(ji,jj)+hbatt(ji,jj))*z_gsi3w3(ji,jj,jk)
           END DO
 
@@ -2485,13 +2416,12 @@
       !! Reference : Madec, Lott, Delecluse and Crepon, 1996. JPO, 26, 1393-1408.
       !!----------------------------------------------------------------------
-
-      INTEGER  ::   ji, jj, jk           ! dummy loop argument
+      INTEGER  ::   ji, jj, jk       ! dummy loop argument
       REAL(wp) ::   zcoeft, zcoefw   ! temporary scalars
-
       REAL(wp), POINTER, DIMENSION(:) :: z_gsigw, z_gsigt, z_gsi3w
       REAL(wp), POINTER, DIMENSION(:) :: z_esigt, z_esigw
-
-      CALL wrk_alloc( jpk, z_gsigw, z_gsigt, z_gsi3w                                      )
-      CALL wrk_alloc( jpk, z_esigt, z_esigw                                               )
+      !!----------------------------------------------------------------------
+
+      CALL wrk_alloc( jpk,   z_gsigw, z_gsigt, z_gsi3w )
+      CALL wrk_alloc( jpk,   z_esigt, z_esigw )
 
       z_gsigw  = 0._wp   ;   z_gsigt  = 0._wp   ;   z_gsi3w  = 0._wp
@@ -2523,7 +2453,7 @@
          zcoeft = ( REAL(jk,wp) - 0.5_wp ) / REAL(jpkm1,wp)
          zcoefw = ( REAL(jk,wp) - 1.0_wp ) / REAL(jpkm1,wp)
-         gdept_0 (:,:,jk) = ( scosrf(:,:) + (hbatt(:,:)-hift(:,:))*z_gsigt(jk) + hift(:,:)*zcoeft )
-         gdepw_0 (:,:,jk) = ( scosrf(:,:) + (hbatt(:,:)-hift(:,:))*z_gsigw(jk) + hift(:,:)*zcoefw )
-         gdep3w_0(:,:,jk) = ( scosrf(:,:) + (hbatt(:,:)-hift(:,:))*z_gsi3w(jk) + hift(:,:)*zcoeft )
+         gdept_0(:,:,jk) = ( scosrf(:,:) + (hbatt(:,:)-hift(:,:))*z_gsigt(jk) + hift(:,:)*zcoeft )
+         gdepw_0(:,:,jk) = ( scosrf(:,:) + (hbatt(:,:)-hift(:,:))*z_gsigw(jk) + hift(:,:)*zcoefw )
+         gde3w_0(:,:,jk) = ( scosrf(:,:) + (hbatt(:,:)-hift(:,:))*z_gsi3w(jk) + hift(:,:)*zcoeft )
       END DO
 !!gm: e3uw, e3vw can be suppressed  (modif in dynzdf, dynzdf_iso, zdfbfr) (save 2 3D arrays)
@@ -2542,9 +2472,10 @@
          END DO
       END DO
-
-      CALL wrk_dealloc( jpk, z_gsigw, z_gsigt, z_gsi3w                                      )
-      CALL wrk_dealloc( jpk, z_esigt, z_esigw                                               )
-
+      !
+      CALL wrk_dealloc( jpk,   z_gsigw, z_gsigt, z_gsi3w )
+      CALL wrk_dealloc( jpk,   z_esigt, z_esigw          )
+      !
    END SUBROUTINE s_tanh
+
 
    FUNCTION fssig( pk ) RESULT( pf )
@@ -2618,33 +2549,32 @@
       REAL(wp), INTENT(in   ) ::   pk1(jpk)       ! continuous "k" coordinate
       REAL(wp)                ::   p_gamma(jpk)   ! stretched coordinate
-      REAL(wp), INTENT(in   ) ::   pzb           ! Bottom box depth
-      REAL(wp), INTENT(in   ) ::   pzs           ! surface box depth
-      REAL(wp), INTENT(in   ) ::   psmth       ! Smoothing parameter
-      REAL(wp)                ::   za1,za2,za3    ! local variables
-      REAL(wp)                ::   zn1,zn2        ! local variables
-      REAL(wp)                ::   za,zb,zx       ! local variables
-      integer                 ::   jk
-      !!----------------------------------------------------------------------
-      !
-
-      zn1  =  1./(jpk-1.)
+      REAL(wp), INTENT(in   ) ::   pzb            ! Bottom box depth
+      REAL(wp), INTENT(in   ) ::   pzs            ! surface box depth
+      REAL(wp), INTENT(in   ) ::   psmth          ! Smoothing parameter
+      !
+      INTEGER  ::   jk             ! dummy loop index
+      REAL(wp) ::   za1,za2,za3    ! local scalar
+      REAL(wp) ::   zn1,zn2        !   -      - 
+      REAL(wp) ::   za,zb,zx       !   -      - 
+      !!----------------------------------------------------------------------
+      !
+      zn1  =  1._wp / REAL( jpkm1, wp )
       zn2  =  1. -  zn1
-
+      !
       za1 = (rn_alpha+2.0_wp)*zn1**(rn_alpha+1.0_wp)-(rn_alpha+1.0_wp)*zn1**(rn_alpha+2.0_wp) 
       za2 = (rn_alpha+2.0_wp)*zn2**(rn_alpha+1.0_wp)-(rn_alpha+1.0_wp)*zn2**(rn_alpha+2.0_wp)
       za3 = (zn2**3.0_wp - za2)/( zn1**3.0_wp - za1)
-     
+      !
       za = pzb - za3*(pzs-za1)-za2
       za = za/( zn2-0.5_wp*(za2+zn2**2.0_wp) - za3*(zn1-0.5_wp*(za1+zn1**2.0_wp) ) )
       zb = (pzs - za1 - za*( zn1-0.5_wp*(za1+zn1**2.0_wp ) ) ) / (zn1**3.0_wp - za1)
       zx = 1.0_wp-za/2.0_wp-zb
- 
+      !
       DO jk = 1, jpk
-        p_gamma(jk) = za*(pk1(jk)*(1.0_wp-pk1(jk)/2.0_wp))+zb*pk1(jk)**3.0_wp +  &
-                    & zx*( (rn_alpha+2.0_wp)*pk1(jk)**(rn_alpha+1.0_wp)- &
-                    &      (rn_alpha+1.0_wp)*pk1(jk)**(rn_alpha+2.0_wp) )
+         p_gamma(jk) = za*(pk1(jk)*(1.0_wp-pk1(jk)/2.0_wp))+zb*pk1(jk)**3.0_wp +  &
+            &          zx*( (rn_alpha+2.0_wp)*pk1(jk)**(rn_alpha+1.0_wp)- &
+            &               (rn_alpha+1.0_wp)*pk1(jk)**(rn_alpha+2.0_wp) )
         p_gamma(jk) = p_gamma(jk)*psmth+pk1(jk)*(1.0_wp-psmth)
-      ENDDO 
-
+      END DO
       !
    END FUNCTION fgamma
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr_substitute.h90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr_substitute.h90	(revision 5844)
+++ 	(revision )
@@ -1,122 +1,0 @@
-   !!----------------------------------------------------------------------
-   !!                    ***  domzgr_substitute.h90   ***
-   !!----------------------------------------------------------------------
-   !! ** purpose :   substitute fsdep. and fse.., the vert. depth and scale
-   !!      factors depending on the vertical coord. used, using CPP macro.
-   !!----------------------------------------------------------------------
-   !! History :  1.0  !  2005-10  (A. Beckmann, G. Madec) generalisation to all coord.
-   !!            3.1  !  2009-02  (G. Madec, M. Leclair)  pure z* coordinate
-   !!----------------------------------------------------------------------
-
-#if defined key_vvl
-! s* or z*-coordinate (3D + time dependency) + use of additional now arrays (..._n)
-
-#   define  fse3t_b(i,j,k)   e3t_b(i,j,k)
-#   define  fse3u_b(i,j,k)   e3u_b(i,j,k)
-#   define  fse3v_b(i,j,k)   e3v_b(i,j,k)
-#   define  fse3uw_b(i,j,k)  e3uw_b(i,j,k)
-#   define  fse3vw_b(i,j,k)  e3vw_b(i,j,k)
-
-#   define  fsdept_n(i,j,k)  gdept_n(i,j,k)
-#   define  fsdepw_n(i,j,k)  gdepw_n(i,j,k)
-#   define  fsde3w_n(i,j,k)  gdep3w_n(i,j,k)
-#   define  fse3t_n(i,j,k)   e3t_n(i,j,k)
-#   define  fse3u_n(i,j,k)   e3u_n(i,j,k)
-#   define  fse3v_n(i,j,k)   e3v_n(i,j,k)
-#   define  fse3f_n(i,j,k)   e3f_n(i,j,k)
-#   define  fse3w_n(i,j,k)   e3w_n(i,j,k)
-#   define  fse3uw_n(i,j,k)  e3uw_n(i,j,k)
-#   define  fse3vw_n(i,j,k)  e3vw_n(i,j,k)
-
-#   define  fsdept_b(i,j,k)  gdept_b(i,j,k)
-#   define  fsdepw_b(i,j,k)  gdepw_b(i,j,k)
-#   define  fse3w_b(i,j,k)   e3w_b(i,j,k)
-
-#   define  fse3t_a(i,j,k)   e3t_a(i,j,k)
-#   define  fse3u_a(i,j,k)   e3u_a(i,j,k)
-#   define  fse3v_a(i,j,k)   e3v_a(i,j,k)
-
-#   define  fse3t_m(i,j)     e3t_m(i,j)
-
-#   define  hu_a(i,j)        ehu_a(i,j)
-#   define  hur_a(i,j)       ehur_a(i,j)
-#   define  hv_a(i,j)        ehv_a(i,j)
-#   define  hvr_a(i,j)       ehvr_a(i,j)
-#   define  hu_b(i,j)        ehu_b(i,j)
-#   define  hur_b(i,j)       ehur_b(i,j)
-#   define  hv_b(i,j)        ehv_b(i,j)
-#   define  hvr_b(i,j)       ehvr_b(i,j)
-
-! This part should be removed one day ...
-! ... In that case all occurence of the above statement functions
-!     have to be replaced in the code by xxx_n
-#   define  fsdept(i,j,k)    gdept_n(i,j,k)
-#   define  fsdepw(i,j,k)    gdepw_n(i,j,k)
-#   define  fsde3w(i,j,k)    gdep3w_n(i,j,k)
-#   define  fse3t(i,j,k)     e3t_n(i,j,k) 
-#   define  fse3u(i,j,k)     e3u_n(i,j,k) 
-#   define  fse3v(i,j,k)     e3v_n(i,j,k) 
-#   define  fse3f(i,j,k)     e3f_n(i,j,k) 
-#   define  fse3w(i,j,k)     e3w_n(i,j,k) 
-#   define  fse3uw(i,j,k)    e3uw_n(i,j,k)
-#   define  fse3vw(i,j,k)    e3vw_n(i,j,k)
-
-#else
-! z- or s-coordinate (1D or 3D + no time dependency) use reference in all cases
-
-#   define  fse3t_b(i,j,k)   e3t_0(i,j,k)
-#   define  fse3u_b(i,j,k)   e3u_0(i,j,k)
-#   define  fse3v_b(i,j,k)   e3v_0(i,j,k)
-#   define  fse3uw_b(i,j,k)  e3uw_0(i,j,k)
-#   define  fse3vw_b(i,j,k)  e3vw_0(i,j,k)
-
-#   define  fsdept_n(i,j,k)  gdept_0(i,j,k)
-#   define  fsdepw_n(i,j,k)  gdepw_0(i,j,k)
-#   define  fsde3w_n(i,j,k)  gdep3w_0(i,j,k)
-#   define  fse3t_n(i,j,k)   e3t_0(i,j,k)
-#   define  fse3u_n(i,j,k)   e3u_0(i,j,k)
-#   define  fse3v_n(i,j,k)   e3v_0(i,j,k)
-#   define  fse3f_n(i,j,k)   e3f_0(i,j,k)
-#   define  fse3w_n(i,j,k)   e3w_0(i,j,k)
-#   define  fse3uw_n(i,j,k)  e3uw_0(i,j,k)
-#   define  fse3vw_n(i,j,k)  e3vw_0(i,j,k)
-
-#   define  fsdept_b(i,j,k)  gdept_0(i,j,k)
-#   define  fsdepw_b(i,j,k)  gdepw_0(i,j,k)
-#   define  fse3w_b(i,j,k)   e3w_0(i,j,k)
-
-#   define  fse3t_a(i,j,k)   e3t_0(i,j,k)
-#   define  fse3u_a(i,j,k)   e3u_0(i,j,k)
-#   define  fse3v_a(i,j,k)   e3v_0(i,j,k)
-
-#   define  fse3t_m(i,j)     e3t_0(i,j,1)
-
-#   define  hu_a(i,j)        hu(i,j)
-#   define  hur_a(i,j)       hur(i,j)
-#   define  hv_a(i,j)        hv(i,j)
-#   define  hvr_a(i,j)       hvr(i,j)
-#   define  hu_b(i,j)        hu(i,j)
-#   define  hur_b(i,j)       hur(i,j)
-#   define  hv_b(i,j)        hv(i,j)
-#   define  hvr_b(i,j)       hvr(i,j)
-
-! This part should be removed one day ...
-! ... In that case all occurence of the above statement functions
-!     have to be replaced in the code by xxx_n
-#   define  fsdept(i,j,k)    gdept_0(i,j,k)
-#   define  fsdepw(i,j,k)    gdepw_0(i,j,k)
-#   define  fsde3w(i,j,k)    gdep3w_0(i,j,k)
-#   define  fse3t(i,j,k)     e3t_0(i,j,k)
-#   define  fse3u(i,j,k)     e3u_0(i,j,k)
-#   define  fse3v(i,j,k)     e3v_0(i,j,k)
-#   define  fse3f(i,j,k)     e3f_0(i,j,k)
-#   define  fse3w(i,j,k)     e3w_0(i,j,k)
-#   define  fse3uw(i,j,k)    e3uw_0(i,j,k)
-#   define  fse3vw(i,j,k)    e3vw_0(i,j,k)
-
-#endif
-   !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
-   !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90	(revision 5845)
@@ -35,6 +35,4 @@
    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_tsd   ! structure of input SST (file informations, fields read)
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -250,25 +248,4 @@
       ENDIF
       !
-      IF( lwp .AND. kt == nit000 ) THEN
-         WRITE(numout,*) ' temperature Levitus '
-         WRITE(numout,*)
-         WRITE(numout,*)'  level = 1'
-         CALL prihre( ptsd(:,:,1    ,jp_tem), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-         WRITE(numout,*)'  level = ', jpk/2
-         CALL prihre( ptsd(:,:,jpk/2,jp_tem), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-         WRITE(numout,*)'  level = ', jpkm1
-         CALL prihre( ptsd(:,:,jpkm1,jp_tem), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-         WRITE(numout,*)
-         WRITE(numout,*) ' salinity Levitus '
-         WRITE(numout,*)
-         WRITE(numout,*)'  level = 1'
-         CALL prihre( ptsd(:,:,1    ,jp_sal), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-         WRITE(numout,*)'  level = ', jpk/2
-         CALL prihre( ptsd(:,:,jpk/2,jp_sal), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-         WRITE(numout,*)'  level = ', jpkm1
-         CALL prihre( ptsd(:,:,jpkm1,jp_sal), jpi, jpj, 1, jpi, 20, 1, jpj, 20, 1., numout )
-         WRITE(numout,*)
-      ENDIF
-      !
       IF( .NOT.ln_tsd_tradmp ) THEN                   !==   deallocate T & S structure   ==! 
          !                                              (data used only for initialisation)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 5845)
@@ -52,5 +52,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -124,8 +123,8 @@
          ENDIF
          !   
-         ! - ML - sshn could be modified by istate_eel, so that initialization of fse3t_b is done here
+         ! - ML - sshn could be modified by istate_eel, so that initialization of e3t_b is done here
          IF( lk_vvl ) THEN
             DO jk = 1, jpk
-               fse3t_b(:,:,jk) = fse3t_n(:,:,jk)
+               e3t_b(:,:,jk) = e3t_n(:,:,jk)
             END DO
          ENDIF
@@ -155,18 +154,18 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               un_b(ji,jj) = un_b(ji,jj) + fse3u_n(ji,jj,jk) * un(ji,jj,jk) * umask(ji,jj,jk)
-               vn_b(ji,jj) = vn_b(ji,jj) + fse3v_n(ji,jj,jk) * vn(ji,jj,jk) * vmask(ji,jj,jk)
+               un_b(ji,jj) = un_b(ji,jj) + e3u_n(ji,jj,jk) * un(ji,jj,jk) * umask(ji,jj,jk)
+               vn_b(ji,jj) = vn_b(ji,jj) + e3v_n(ji,jj,jk) * vn(ji,jj,jk) * vmask(ji,jj,jk)
                !
-               ub_b(ji,jj) = ub_b(ji,jj) + fse3u_b(ji,jj,jk) * ub(ji,jj,jk) * umask(ji,jj,jk)
-               vb_b(ji,jj) = vb_b(ji,jj) + fse3v_b(ji,jj,jk) * vb(ji,jj,jk) * vmask(ji,jj,jk)
+               ub_b(ji,jj) = ub_b(ji,jj) + e3u_b(ji,jj,jk) * ub(ji,jj,jk) * umask(ji,jj,jk)
+               vb_b(ji,jj) = vb_b(ji,jj) + e3v_b(ji,jj,jk) * vb(ji,jj,jk) * vmask(ji,jj,jk)
             END DO
          END DO
       END DO
       !
-      un_b(:,:) = un_b(:,:) * hur  (:,:)
-      vn_b(:,:) = vn_b(:,:) * hvr  (:,:)
-      !
-      ub_b(:,:) = ub_b(:,:) * hur_b(:,:)
-      vb_b(:,:) = vb_b(:,:) * hvr_b(:,:)
+      un_b(:,:) = un_b(:,:) * r1_hu_n  (:,:)
+      vn_b(:,:) = vn_b(:,:) * r1_hv_n  (:,:)
+      !
+      ub_b(:,:) = ub_b(:,:) * r1_hu_b(:,:)
+      vb_b(:,:) = vb_b(:,:) * r1_hv_b(:,:)
       !
       !
@@ -197,6 +196,6 @@
       !
       DO jk = 1, jpk
-         tsn(:,:,jk,jp_tem) = (  ( ( 7.5 - 0. * ABS( gphit(:,:) )/30. ) * ( 1.-TANH((fsdept(:,:,jk)-80.)/30.) )   &
-            &                + 10. * ( 5000. - fsdept(:,:,jk) ) /5000.)  ) * tmask(:,:,jk)
+         tsn(:,:,jk,jp_tem) = (  ( ( 7.5 - 0. * ABS( gphit(:,:) )/30. ) * ( 1.-TANH((gdept_n(:,:,jk)-80.)/30.) )   &
+            &                + 10. * ( 5000. - gdept_n(:,:,jk) ) /5000.)  ) * tmask(:,:,jk)
          tsb(:,:,jk,jp_tem) = tsn(:,:,jk,jp_tem)
       END DO
@@ -251,11 +250,7 @@
             !
             DO jk = 1, jpk
-               tsn(:,:,jk,jp_tem) = ( zt2 + zt1 * exp( - fsdept(:,:,jk) / 1000 ) ) * tmask(:,:,jk)
+               tsn(:,:,jk,jp_tem) = ( zt2 + zt1 * exp( - gdept_n(:,:,jk) / 1000 ) ) * tmask(:,:,jk)
                tsb(:,:,jk,jp_tem) = tsn(:,:,jk,jp_tem)
             END DO
-            !
-            IF(lwp) CALL prizre( tsn(:,:,:,jp_tem), jpi   , jpj   , jpk   , jpj/2 ,   &
-               &                             1     , jpi   , 5     , 1     , jpk   ,   &
-               &                             1     , 1.    , numout                  )
             !
             ! set salinity field to a constant value
@@ -327,8 +322,4 @@
             tsn(:,:,:,jp_tem) = tsb(:,:,:,jp_tem)                            ! set nox temperature to tb
             !
-            IF(lwp) CALL prizre( tsn(:,:,:,jp_tem), jpi   , jpj   , jpk   , jpj/2 ,   &
-               &                            1     , jpi   , 5     , 1     , jpk   ,   &
-               &                            1     , 1.    , numout                  )
-            !
             ! set salinity field to a constant value
             ! --------------------------------------
@@ -376,20 +367,20 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  tsn(ji,jj,jk,jp_tem) = (  16. - 12. * TANH( (fsdept(ji,jj,jk) - 400) / 700 )         )   &
-                       &           * (-TANH( (500-fsdept(ji,jj,jk)) / 150 ) + 1) / 2               &
-                       &       + (      15. * ( 1. - TANH( (fsdept(ji,jj,jk)-50.) / 1500.) )       &
-                       &                - 1.4 * TANH((fsdept(ji,jj,jk)-100.) / 100.)               &    
-                       &                + 7.  * (1500. - fsdept(ji,jj,jk)) / 1500.             )   & 
-                       &           * (-TANH( (fsdept(ji,jj,jk) - 500) / 150) + 1) / 2
+                  tsn(ji,jj,jk,jp_tem) = (  16. - 12. * TANH( (gdept_n(ji,jj,jk) - 400) / 700 )         )   &
+                       &           * (-TANH( (500-gdept_n(ji,jj,jk)) / 150 ) + 1) / 2               &
+                       &       + (      15. * ( 1. - TANH( (gdept_n(ji,jj,jk)-50.) / 1500.) )       &
+                       &                - 1.4 * TANH((gdept_n(ji,jj,jk)-100.) / 100.)               &    
+                       &                + 7.  * (1500. - gdept_n(ji,jj,jk)) / 1500.             )   & 
+                       &           * (-TANH( (gdept_n(ji,jj,jk) - 500) / 150) + 1) / 2
                   tsn(ji,jj,jk,jp_tem) = tsn(ji,jj,jk,jp_tem) * tmask(ji,jj,jk)
                   tsb(ji,jj,jk,jp_tem) = tsn(ji,jj,jk,jp_tem)
 
-                  tsn(ji,jj,jk,jp_sal) =  (  36.25 - 1.13 * TANH( (fsdept(ji,jj,jk) - 305) / 460 )  )  &
-                     &              * (-TANH((500 - fsdept(ji,jj,jk)) / 150) + 1) / 2          &
-                     &          + (  35.55 + 1.25 * (5000. - fsdept(ji,jj,jk)) / 5000.         &
-                     &                - 1.62 * TANH( (fsdept(ji,jj,jk) - 60.  ) / 650. )       &
-                     &                + 0.2  * TANH( (fsdept(ji,jj,jk) - 35.  ) / 100. )       &
-                     &                + 0.2  * TANH( (fsdept(ji,jj,jk) - 1000.) / 5000.)    )  &
-                     &              * (-TANH((fsdept(ji,jj,jk) - 500) / 150) + 1) / 2 
+                  tsn(ji,jj,jk,jp_sal) =  (  36.25 - 1.13 * TANH( (gdept_n(ji,jj,jk) - 305) / 460 )  )  &
+                     &              * (-TANH((500 - gdept_n(ji,jj,jk)) / 150) + 1) / 2          &
+                     &          + (  35.55 + 1.25 * (5000. - gdept_n(ji,jj,jk)) / 5000.         &
+                     &                - 1.62 * TANH( (gdept_n(ji,jj,jk) - 60.  ) / 650. )       &
+                     &                + 0.2  * TANH( (gdept_n(ji,jj,jk) - 35.  ) / 100. )       &
+                     &                + 0.2  * TANH( (gdept_n(ji,jj,jk) - 1000.) / 5000.)    )  &
+                     &              * (-TANH((gdept_n(ji,jj,jk) - 500) / 150) + 1) / 2 
                   tsn(ji,jj,jk,jp_sal) = tsn(ji,jj,jk,jp_sal) * tmask(ji,jj,jk)
                   tsb(ji,jj,jk,jp_sal) = tsn(ji,jj,jk,jp_sal)
@@ -466,9 +457,9 @@
       zalfg = 0.5 * grav * rau0
       
-      zprn(:,:,1) = zalfg * fse3w(:,:,1) * ( 1 + rhd(:,:,1) )       ! Surface value
+      zprn(:,:,1) = zalfg * e3w_n(:,:,1) * ( 1 + rhd(:,:,1) )       ! Surface value
 
       DO jk = 2, jpkm1                                              ! Vertical integration from the surface
          zprn(:,:,jk) = zprn(:,:,jk-1)   &
-            &         + zalfg * fse3w(:,:,jk) * ( 2. + rhd(:,:,jk) + rhd(:,:,jk-1) )
+            &         + zalfg * e3w_n(:,:,jk) * ( 2. + rhd(:,:,jk) + rhd(:,:,jk-1) )
       END DO  
 
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/divhor.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/divhor.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/divhor.F90	(revision 5845)
@@ -36,5 +36,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -74,9 +73,9 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               hdivn(ji,jj,jk) = (  e2u(ji  ,jj) * fse3u_n(ji  ,jj,jk) * un(ji  ,jj,jk)        &
-                  &               - e2u(ji-1,jj) * fse3u_n(ji-1,jj,jk) * un(ji-1,jj,jk)        &
-                  &               + e1v(ji,jj  ) * fse3v_n(ji,jj  ,jk) * vn(ji,jj  ,jk)        &
-                  &               - e1v(ji,jj-1) * fse3v_n(ji,jj-1,jk) * vn(ji,jj-1,jk)   )    &
-                  &            / ( e1e2t(ji,jj) * fse3t_n(ji,jj,jk) )
+               hdivn(ji,jj,jk) = (  e2u(ji  ,jj) * e3u_n(ji  ,jj,jk) * un(ji  ,jj,jk)        &
+                  &               - e2u(ji-1,jj) * e3u_n(ji-1,jj,jk) * un(ji-1,jj,jk)        &
+                  &               + e1v(ji,jj  ) * e3v_n(ji,jj  ,jk) * vn(ji,jj  ,jk)        &
+                  &               - e1v(ji,jj-1) * e3v_n(ji,jj-1,jk) * vn(ji,jj-1,jk)   )    &
+                  &            / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
             END DO  
          END DO  
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv.F90	(revision 5845)
@@ -39,5 +39,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_cen2.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_cen2.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_cen2.F90	(revision 5845)
@@ -30,5 +30,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -77,6 +76,6 @@
       DO jk = 1, jpkm1                       ! ====================== !
          !                                         ! horizontal volume fluxes
-         zfu(:,:,jk) = 0.25 * e2u(:,:) * fse3u(:,:,jk) * un(:,:,jk)
-         zfv(:,:,jk) = 0.25 * e1v(:,:) * fse3v(:,:,jk) * vn(:,:,jk)
+         zfu(:,:,jk) = 0.25 * e2u(:,:) * e3u_n(:,:,jk) * un(:,:,jk)
+         zfv(:,:,jk) = 0.25 * e1v(:,:) * e3v_n(:,:,jk) * vn(:,:,jk)
          !
          DO jj = 1, jpjm1                          ! horizontal momentum fluxes at T- and F-point
@@ -90,6 +89,6 @@
          DO jj = 2, jpjm1                          ! divergence of horizontal momentum fluxes
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zbu = e1e2u(ji,jj) * fse3u(ji,jj,jk)
-               zbv = e1e2v(ji,jj) * fse3v(ji,jj,jk)
+               zbu = e1e2u(ji,jj) * e3u_n(ji,jj,jk)
+               zbv = e1e2v(ji,jj) * e3v_n(ji,jj,jk)
                !
                ua(ji,jj,jk) = ua(ji,jj,jk) - (  zfu_t(ji+1,jj  ,jk) - zfu_t(ji  ,jj  ,jk)    &
@@ -144,7 +143,7 @@
             DO ji = fs_2, fs_jpim1   ! vector opt.
                ua(ji,jj,jk) =  ua(ji,jj,jk) - ( zfu_uw(ji,jj,jk) - zfu_uw(ji,jj,jk+1) )    &
-                  &  / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
+                  &  / ( e1e2u(ji,jj) * e3u_n(ji,jj,jk) )
                va(ji,jj,jk) =  va(ji,jj,jk) - ( zfv_vw(ji,jj,jk) - zfv_vw(ji,jj,jk+1) )    &
-                  &  / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
+                  &  / ( e1e2v(ji,jj) * e3v_n(ji,jj,jk) )
             END DO
          END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_ubs.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_ubs.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_ubs.F90	(revision 5845)
@@ -35,5 +35,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -111,6 +110,6 @@
          !                                   ! =========================== !
          !                                         ! horizontal volume fluxes
-         zfu(:,:,jk) = e2u(:,:) * fse3u(:,:,jk) * un(:,:,jk)
-         zfv(:,:,jk) = e1v(:,:) * fse3v(:,:,jk) * vn(:,:,jk)
+         zfu(:,:,jk) = e2u(:,:) * e3u_n(:,:,jk) * un(:,:,jk)
+         zfv(:,:,jk) = e1v(:,:) * e3v_n(:,:,jk) * vn(:,:,jk)
          !            
          DO jj = 2, jpjm1                          ! laplacian
@@ -142,6 +141,6 @@
       DO jk = 1, jpkm1                       ! ====================== !
          !                                         ! horizontal volume fluxes
-         zfu(:,:,jk) = 0.25 * e2u(:,:) * fse3u(:,:,jk) * un(:,:,jk)
-         zfv(:,:,jk) = 0.25 * e1v(:,:) * fse3v(:,:,jk) * vn(:,:,jk)
+         zfu(:,:,jk) = 0.25 * e2u(:,:) * e3u_n(:,:,jk) * un(:,:,jk)
+         zfv(:,:,jk) = 0.25 * e1v(:,:) * e3v_n(:,:,jk) * vn(:,:,jk)
          !
          DO jj = 1, jpjm1                          ! horizontal momentum fluxes at T- and F-point
@@ -181,6 +180,6 @@
          DO jj = 2, jpjm1                          ! divergence of horizontal momentum fluxes
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zbu = e1e2u(ji,jj) * fse3u(ji,jj,jk)
-               zbv = e1e2v(ji,jj) * fse3v(ji,jj,jk)
+               zbu = e1e2u(ji,jj) * e3u_n(ji,jj,jk)
+               zbv = e1e2v(ji,jj) * e3v_n(ji,jj,jk)
                !
                ua(ji,jj,jk) = ua(ji,jj,jk) - (  zfu_t(ji+1,jj  ,jk) - zfu_t(ji  ,jj  ,jk)    &
@@ -233,7 +232,7 @@
             DO ji = fs_2, fs_jpim1   ! vector opt.
                ua(ji,jj,jk) =  ua(ji,jj,jk) - ( zfu_uw(ji,jj,jk) - zfu_uw(ji,jj,jk+1) )    &
-                  &  / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
+                  &  / ( e1e2u(ji,jj) * e3u_n(ji,jj,jk) )
                va(ji,jj,jk) =  va(ji,jj,jk) - ( zfv_vw(ji,jj,jk) - zfv_vw(ji,jj,jk+1) )    &
-                  &  / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
+                  &  / ( e1e2v(ji,jj) * e3v_n(ji,jj,jk) )
             END DO
          END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynbfr.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynbfr.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynbfr.F90	(revision 5845)
@@ -29,6 +29,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
-#  include "zdfddm_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -78,6 +76,6 @@
               !
               ! Apply stability criteria on absolute value  : abs(bfr/e3) < 1/(2dt) => bfr/e3 > -1/(2dt)
-              ua(ji,jj,ikbu) = ua(ji,jj,ikbu) + MAX(  bfrua(ji,jj) / fse3u(ji,jj,ikbu) , zm1_2dt  ) * ub(ji,jj,ikbu)
-              va(ji,jj,ikbv) = va(ji,jj,ikbv) + MAX(  bfrva(ji,jj) / fse3v(ji,jj,ikbv) , zm1_2dt  ) * vb(ji,jj,ikbv)
+              ua(ji,jj,ikbu) = ua(ji,jj,ikbu) + MAX(  bfrua(ji,jj) / e3u_n(ji,jj,ikbu) , zm1_2dt  ) * ub(ji,jj,ikbu)
+              va(ji,jj,ikbv) = va(ji,jj,ikbv) + MAX(  bfrva(ji,jj) / e3v_n(ji,jj,ikbv) , zm1_2dt  ) * vb(ji,jj,ikbv)
            END DO
         END DO
@@ -91,7 +89,7 @@
                  !
                  ! Apply stability criteria on absolute value  : abs(bfr/e3) < 1/(2dt) => bfr/e3 > -1/(2dt)
-                 ua(ji,jj,ikbu) = ua(ji,jj,ikbu) + MAX(  tfrua(ji,jj) / fse3u(ji,jj,ikbu) , zm1_2dt  ) * ub(ji,jj,ikbu) &
+                 ua(ji,jj,ikbu) = ua(ji,jj,ikbu) + MAX(  tfrua(ji,jj) / e3u_n(ji,jj,ikbu) , zm1_2dt  ) * ub(ji,jj,ikbu) &
                     &             * (1.-umask(ji,jj,1))
-                 va(ji,jj,ikbv) = va(ji,jj,ikbv) + MAX(  tfrva(ji,jj) / fse3v(ji,jj,ikbv) , zm1_2dt  ) * vb(ji,jj,ikbv) &
+                 va(ji,jj,ikbv) = va(ji,jj,ikbv) + MAX(  tfrva(ji,jj) / e3v_n(ji,jj,ikbv) , zm1_2dt  ) * vb(ji,jj,ikbv) &
                     &             * (1.-vmask(ji,jj,1))
                  ! (ISF)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 5845)
@@ -63,5 +63,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -214,5 +213,5 @@
       !!----------------------------------------------------------------------
       INTEGER, INTENT(in) ::   kt    ! ocean time-step index
-      !!
+      !
       INTEGER  ::   ji, jj, jk       ! dummy loop indices
       REAL(wp) ::   zcoef0, zcoef1   ! temporary scalars
@@ -233,8 +232,10 @@
       DO jj = 2, jpjm1
          DO ji = fs_2, fs_jpim1   ! vector opt.
-            zcoef1 = zcoef0 * fse3w(ji,jj,1)
+            zcoef1 = zcoef0 * e3w_n(ji,jj,1)
             ! hydrostatic pressure gradient
             zhpi(ji,jj,1) = zcoef1 * ( rhd(ji+1,jj,1) - rhd(ji,jj,1) ) / e1u(ji,jj)
             zhpj(ji,jj,1) = zcoef1 * ( rhd(ji,jj+1,1) - rhd(ji,jj,1) ) / e2v(ji,jj)
+!!gm            zhpi(ji,jj,1) = zcoef1 * ( rhd(ji+1,jj,1) - rhd(ji,jj,1) ) * r1_e1u(ji,jj)
+!!gm            zhpj(ji,jj,1) = zcoef1 * ( rhd(ji,jj+1,1) - rhd(ji,jj,1) ) * r1_e2v(ji,jj)
             ! add to the general momentum trend
             ua(ji,jj,1) = ua(ji,jj,1) + zhpi(ji,jj,1)
@@ -248,13 +249,15 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zcoef1 = zcoef0 * fse3w(ji,jj,jk)
+               zcoef1 = zcoef0 * e3w_n(ji,jj,jk)
                ! hydrostatic pressure gradient
                zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1)   &
                   &           + zcoef1 * (  ( rhd(ji+1,jj,jk)+rhd(ji+1,jj,jk-1) )   &
                   &                       - ( rhd(ji  ,jj,jk)+rhd(ji  ,jj,jk-1) )  ) / e1u(ji,jj)
+!!gm                  &                       - ( rhd(ji  ,jj,jk)+rhd(ji  ,jj,jk-1) )  ) * r1_e1u(ji,jj)
 
                zhpj(ji,jj,jk) = zhpj(ji,jj,jk-1)   &
                   &           + zcoef1 * (  ( rhd(ji,jj+1,jk)+rhd(ji,jj+1,jk-1) )   &
                   &                       - ( rhd(ji,jj,  jk)+rhd(ji,jj  ,jk-1) )  ) / e2v(ji,jj)
+!!gm                  &                       - ( rhd(ji,jj,  jk)+rhd(ji,jj  ,jk-1) )  ) * r1_e2v(ji,jj)
                ! add to the general momentum trend
                ua(ji,jj,jk) = ua(ji,jj,jk) + zhpi(ji,jj,jk)
@@ -300,8 +303,10 @@
       DO jj = 2, jpjm1
          DO ji = fs_2, fs_jpim1   ! vector opt.
-            zcoef1 = zcoef0 * fse3w(ji,jj,1)
+            zcoef1 = zcoef0 * e3w_n(ji,jj,1)
             ! hydrostatic pressure gradient
             zhpi(ji,jj,1) = zcoef1 * ( rhd(ji+1,jj  ,1) - rhd(ji,jj,1) ) / e1u(ji,jj)
             zhpj(ji,jj,1) = zcoef1 * ( rhd(ji  ,jj+1,1) - rhd(ji,jj,1) ) / e2v(ji,jj)
+!!gm            zhpi(ji,jj,1) = zcoef1 * ( rhd(ji+1,jj  ,1) - rhd(ji,jj,1) ) * r1_e1u(ji,jj)
+!!gm            zhpj(ji,jj,1) = zcoef1 * ( rhd(ji  ,jj+1,1) - rhd(ji,jj,1) ) * r1_e2v(ji,jj)
             ! add to the general momentum trend
             ua(ji,jj,1) = ua(ji,jj,1) + zhpi(ji,jj,1)
@@ -315,13 +320,15 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zcoef1 = zcoef0 * fse3w(ji,jj,jk)
+               zcoef1 = zcoef0 * e3w_n(ji,jj,jk)
                ! hydrostatic pressure gradient
                zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1)   &
                   &           + zcoef1 * (  ( rhd(ji+1,jj,jk) + rhd(ji+1,jj,jk-1) )   &
                   &                       - ( rhd(ji  ,jj,jk) + rhd(ji  ,jj,jk-1) )  ) / e1u(ji,jj)
+!!gm                  &                       - ( rhd(ji  ,jj,jk) + rhd(ji  ,jj,jk-1) )  ) * r1_e1u(ji,jj)
 
                zhpj(ji,jj,jk) = zhpj(ji,jj,jk-1)   &
                   &           + zcoef1 * (  ( rhd(ji,jj+1,jk) + rhd(ji,jj+1,jk-1) )   &
                   &                       - ( rhd(ji,jj,  jk) + rhd(ji,jj  ,jk-1) )  ) / e2v(ji,jj)
+!!gm                  &                       - ( rhd(ji,jj,  jk) + rhd(ji,jj  ,jk-1) )  ) * r1_e2v(ji,jj)
                ! add to the general momentum trend
                ua(ji,jj,jk) = ua(ji,jj,jk) + zhpi(ji,jj,jk)
@@ -337,10 +344,11 @@
             iku = mbku(ji,jj)
             ikv = mbkv(ji,jj)
-            zcoef2 = zcoef0 * MIN( fse3w(ji,jj,iku), fse3w(ji+1,jj  ,iku) )
-            zcoef3 = zcoef0 * MIN( fse3w(ji,jj,ikv), fse3w(ji  ,jj+1,ikv) )
+            zcoef2 = zcoef0 * MIN( e3w_n(ji,jj,iku), e3w_n(ji+1,jj  ,iku) )
+            zcoef3 = zcoef0 * MIN( e3w_n(ji,jj,ikv), e3w_n(ji  ,jj+1,ikv) )
             IF( iku > 1 ) THEN            ! on i-direction (level 2 or more)
                ua  (ji,jj,iku) = ua(ji,jj,iku) - zhpi(ji,jj,iku)         ! subtract old value
                zhpi(ji,jj,iku) = zhpi(ji,jj,iku-1)                   &   ! compute the new one
                   &            + zcoef2 * ( rhd(ji+1,jj,iku-1) - rhd(ji,jj,iku-1) + gru(ji,jj) ) / e1u(ji,jj)
+!!gm                  &            + zcoef2 * ( rhd(ji+1,jj,iku-1) - rhd(ji,jj,iku-1) + gru(ji,jj) ) * r1_e1u(ji,jj)
                ua  (ji,jj,iku) = ua(ji,jj,iku) + zhpi(ji,jj,iku)         ! add the new one to the general momentum trend
             ENDIF
@@ -349,4 +357,5 @@
                zhpj(ji,jj,ikv) = zhpj(ji,jj,ikv-1)                   &   ! compute the new one
                   &            + zcoef3 * ( rhd(ji,jj+1,ikv-1) - rhd(ji,jj,ikv-1) + grv(ji,jj) ) / e2v(ji,jj)
+!!gm                  &            + zcoef3 * ( rhd(ji,jj+1,ikv-1) - rhd(ji,jj,ikv-1) + grv(ji,jj) ) * r1_e2v(ji,jj)
                va  (ji,jj,ikv) = va(ji,jj,ikv) + zhpj(ji,jj,ikv)         ! add the new one to the general momentum trend
             ENDIF
@@ -402,13 +411,17 @@
          DO ji = fs_2, fs_jpim1   ! vector opt.
             ! hydrostatic pressure gradient along s-surfaces
-            zhpi(ji,jj,1) = zcoef0 / e1u(ji,jj) * ( fse3w(ji+1,jj  ,1) * ( znad + rhd(ji+1,jj  ,1) )   &
-               &                                  - fse3w(ji  ,jj  ,1) * ( znad + rhd(ji  ,jj  ,1) ) )
-            zhpj(ji,jj,1) = zcoef0 / e2v(ji,jj) * ( fse3w(ji  ,jj+1,1) * ( znad + rhd(ji  ,jj+1,1) )   &
-               &                                  - fse3w(ji  ,jj  ,1) * ( znad + rhd(ji  ,jj  ,1) ) )
+!!gm            zhpi(ji,jj,1) = zcoef0 * r1_e1u(ji,jj) * ( e3w_n(ji+1,jj  ,1) * ( znad + rhd(ji+1,jj  ,1) )   &
+            zhpi(ji,jj,1) = zcoef0 / e1u(ji,jj) * ( e3w_n(ji+1,jj  ,1) * ( znad + rhd(ji+1,jj  ,1) )   &
+               &                                     - e3w_n(ji  ,jj  ,1) * ( znad + rhd(ji  ,jj  ,1) ) )
+!!gm            zhpj(ji,jj,1) = zcoef0 * r1_e2v(ji,jj) * ( e3w_n(ji  ,jj+1,1) * ( znad + rhd(ji  ,jj+1,1) )   &
+            zhpj(ji,jj,1) = zcoef0 / e2v(ji,jj) * ( e3w_n(ji  ,jj+1,1) * ( znad + rhd(ji  ,jj+1,1) )   &
+               &                                     - e3w_n(ji  ,jj  ,1) * ( znad + rhd(ji  ,jj  ,1) ) )
             ! s-coordinate pressure gradient correction
-            zuap = -zcoef0 * ( rhd   (ji+1,jj,1) + rhd   (ji,jj,1) + 2._wp * znad )   &
-               &           * ( fsde3w(ji+1,jj,1) - fsde3w(ji,jj,1) ) / e1u(ji,jj)
-            zvap = -zcoef0 * ( rhd   (ji,jj+1,1) + rhd   (ji,jj,1) + 2._wp * znad )   &
-               &           * ( fsde3w(ji,jj+1,1) - fsde3w(ji,jj,1) ) / e2v(ji,jj)
+            zuap = -zcoef0 * ( rhd    (ji+1,jj,1) + rhd    (ji,jj,1) + 2._wp * znad )   &
+               &           * ( gde3w_n(ji+1,jj,1) - gde3w_n(ji,jj,1) ) / e1u(ji,jj)
+!!gm               &           * ( gde3w_n(ji+1,jj,1) - gde3w_n(ji,jj,1) ) * r1_e1u(ji,jj)
+            zvap = -zcoef0 * ( rhd    (ji,jj+1,1) + rhd    (ji,jj,1) + 2._wp * znad )   &
+               &           * ( gde3w_n(ji,jj+1,1) - gde3w_n(ji,jj,1) ) / e2v(ji,jj)
+!!gm               &           * ( gde3w_n(ji,jj+1,1) - gde3w_n(ji,jj,1) ) * r1_e2v(ji,jj)
             ! add to the general momentum trend
             ua(ji,jj,1) = ua(ji,jj,1) + zhpi(ji,jj,1) + zuap
@@ -422,15 +435,19 @@
             DO ji = fs_2, fs_jpim1   ! vector opt.
                ! hydrostatic pressure gradient along s-surfaces
+!!gm               zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1) + zcoef0 * r1_e1u(ji,jj)   &
                zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1) + zcoef0 / e1u(ji,jj)   &
-                  &           * (  fse3w(ji+1,jj,jk) * ( rhd(ji+1,jj,jk) + rhd(ji+1,jj,jk-1) + 2*znad )   &
-                  &              - fse3w(ji  ,jj,jk) * ( rhd(ji  ,jj,jk) + rhd(ji  ,jj,jk-1) + 2*znad )  )
-               zhpj(ji,jj,jk) = zhpj(ji,jj,jk-1) + zcoef0 / e2v(ji,jj)   &
-                  &           * (  fse3w(ji,jj+1,jk) * ( rhd(ji,jj+1,jk) + rhd(ji,jj+1,jk-1) + 2*znad )   &
-                  &              - fse3w(ji,jj  ,jk) * ( rhd(ji,jj,  jk) + rhd(ji,jj  ,jk-1) + 2*znad )  )
+                  &           * (  e3w_n(ji+1,jj,jk) * ( rhd(ji+1,jj,jk) + rhd(ji+1,jj,jk-1) + 2*znad )   &
+                  &              - e3w_n(ji  ,jj,jk) * ( rhd(ji  ,jj,jk) + rhd(ji  ,jj,jk-1) + 2*znad )  )
+!!gm               zhpj(ji,jj,jk) = zhpj(ji,jj,jk-1) + zcoef0 / e2v(ji,jj)   &
+               zhpj(ji,jj,jk) = zhpj(ji,jj,jk-1) + zcoef0 * r1_e2v(ji,jj)   &
+                  &           * (  e3w_n(ji,jj+1,jk) * ( rhd(ji,jj+1,jk) + rhd(ji,jj+1,jk-1) + 2*znad )   &
+                  &              - e3w_n(ji,jj  ,jk) * ( rhd(ji,jj,  jk) + rhd(ji,jj  ,jk-1) + 2*znad )  )
                ! s-coordinate pressure gradient correction
-               zuap = -zcoef0 * ( rhd   (ji+1,jj  ,jk) + rhd   (ji,jj,jk) + 2._wp * znad )   &
-                  &           * ( fsde3w(ji+1,jj  ,jk) - fsde3w(ji,jj,jk) ) / e1u(ji,jj)
-               zvap = -zcoef0 * ( rhd   (ji  ,jj+1,jk) + rhd   (ji,jj,jk) + 2._wp * znad )   &
-                  &           * ( fsde3w(ji  ,jj+1,jk) - fsde3w(ji,jj,jk) ) / e2v(ji,jj)
+               zuap = -zcoef0 * ( rhd    (ji+1,jj  ,jk) + rhd    (ji,jj,jk) + 2._wp * znad )   &
+                  &           * ( gde3w_n(ji+1,jj  ,jk) - gde3w_n(ji,jj,jk) ) / e1u(ji,jj)
+!!gm                  &           * ( gde3w_n(ji+1,jj  ,jk) - gde3w_n(ji,jj,jk) ) * r1_e1u(ji,jj)
+               zvap = -zcoef0 * ( rhd    (ji  ,jj+1,jk) + rhd    (ji,jj,jk) + 2._wp * znad )   &
+                  &           * ( gde3w_n(ji  ,jj+1,jk) - gde3w_n(ji,jj,jk) ) / e2v(ji,jj)
+!!gm                  &           * ( gde3w_n(ji  ,jj+1,jk) - gde3w_n(ji,jj,jk) ) * r1_e2v(ji,jj)
                ! add to the general momentum trend
                ua(ji,jj,jk) = ua(ji,jj,jk) + zhpi(ji,jj,jk) + zuap
@@ -528,7 +545,7 @@
          DO ji = 1, jpi   ! vector opt.
             ikt=mikt(ji,jj)
-            ziceload(ji,jj) = ziceload(ji,jj) + (znad + rhd(ji,jj,1) ) * fse3w(ji,jj,1) * (1._wp - tmask(ji,jj,1))
+            ziceload(ji,jj) = ziceload(ji,jj) + (znad + rhd(ji,jj,1) ) * e3w_n(ji,jj,1) * (1._wp - tmask(ji,jj,1))
             DO jk=2,ikt-1
-               ziceload(ji,jj) = ziceload(ji,jj) + (2._wp * znad + rhd(ji,jj,jk-1) + rhd(ji,jj,jk)) * fse3w(ji,jj,jk) &
+               ziceload(ji,jj) = ziceload(ji,jj) + (2._wp * znad + rhd(ji,jj,jk-1) + rhd(ji,jj,jk)) * e3w_n(ji,jj,jk) &
                   &                              * (1._wp - tmask(ji,jj,jk))
             END DO
@@ -544,19 +561,23 @@
             ! hydrostatic pressure gradient along s-surfaces and ice shelf pressure
             ! we assume ISF is in isostatic equilibrium
-            zhpi(ji,jj,1) = zcoef0 / e1u(ji,jj) * ( 0.5_wp * fse3w(ji+1,jj  ,iktp1i)                                    &
+!!gm            zhpi(ji,jj,1) = zcoef0 * r1_e1u(ji,jj) * ( 0.5_wp * e3w_n(ji+1,jj  ,iktp1i)                                    &
+            zhpi(ji,jj,1) = zcoef0 / e1u(ji,jj) * ( 0.5_wp * e3w_n(ji+1,jj  ,iktp1i)                                    &
                &                                  * ( 2._wp * znad + rhd(ji+1,jj  ,iktp1i) + zrhdtop_oce(ji+1,jj  ) )   &
-               &                                  - 0.5_wp * fse3w(ji  ,jj  ,ikt   )                                    &
+               &                                  - 0.5_wp * e3w_n(ji  ,jj  ,ikt   )                                    &
                &                                  * ( 2._wp * znad + rhd(ji  ,jj  ,ikt   ) + zrhdtop_oce(ji  ,jj  ) )   &
                &                                  + ( ziceload(ji+1,jj) - ziceload(ji,jj))                              ) 
-            zhpj(ji,jj,1) = zcoef0 / e2v(ji,jj) * ( 0.5_wp * fse3w(ji  ,jj+1,iktp1j)                                    &
+!!gm            zhpj(ji,jj,1) = zcoef0 * r1_e2v(ji,jj) * ( 0.5_wp * e3w_n(ji  ,jj+1,iktp1j)                                    &
+            zhpj(ji,jj,1) = zcoef0 / e2v(ji,jj) * ( 0.5_wp * e3w_n(ji  ,jj+1,iktp1j)                                    &
                &                                  * ( 2._wp * znad + rhd(ji  ,jj+1,iktp1j) + zrhdtop_oce(ji  ,jj+1) )   &
-               &                                  - 0.5_wp * fse3w(ji  ,jj  ,ikt   )                                    & 
+               &                                  - 0.5_wp * e3w_n(ji  ,jj  ,ikt   )                                    & 
                &                                  * ( 2._wp * znad + rhd(ji  ,jj  ,ikt   ) + zrhdtop_oce(ji  ,jj  ) )   &
                &                                  + ( ziceload(ji,jj+1) - ziceload(ji,jj) )                             ) 
             ! s-coordinate pressure gradient correction (=0 if z coordinate)
-            zuap = -zcoef0 * ( rhd   (ji+1,jj,1) + rhd   (ji,jj,1) + 2._wp * znad )   &
-               &           * ( fsde3w(ji+1,jj,1) - fsde3w(ji,jj,1) ) / e1u(ji,jj)
-            zvap = -zcoef0 * ( rhd   (ji,jj+1,1) + rhd   (ji,jj,1) + 2._wp * znad )   &
-               &           * ( fsde3w(ji,jj+1,1) - fsde3w(ji,jj,1) ) / e2v(ji,jj)
+            zuap = -zcoef0 * ( rhd    (ji+1,jj,1) + rhd    (ji,jj,1) + 2._wp * znad )   &
+               &           * ( gde3w_n(ji+1,jj,1) - gde3w_n(ji,jj,1) ) / e1u(ji,jj)
+!!gm               &           * ( gde3w_n(ji+1,jj,1) - gde3w_n(ji,jj,1) ) * r1_e1u(ji,jj)
+            zvap = -zcoef0 * ( rhd    (ji,jj+1,1) + rhd    (ji,jj,1) + 2._wp * znad )   &
+               &           * ( gde3w_n(ji,jj+1,1) - gde3w_n(ji,jj,1) ) / e2v(ji,jj)
+!!gm               &           * ( gde3w_n(ji,jj+1,1) - gde3w_n(ji,jj,1) ) * r1_e2v(ji,jj)
             ! add to the general momentum trend
             ua(ji,jj,1) = ua(ji,jj,1) + (zhpi(ji,jj,1) + zuap) * umask(ji,jj,1)
@@ -569,14 +590,16 @@
       DO jj = 2, jpjm1
          DO ji = fs_2, fs_jpim1   ! vector opt.
-            iku = miku(ji,jj) ; 
-            zpshpi(ji,jj)=0.0_wp ; zpshpj(ji,jj)=0.0_wp
+            iku = miku(ji,jj)
+            zpshpi(ji,jj) = 0._wp   ;   zpshpj(ji,jj) = 0._wp
             ze3wu  = (gdepw_0(ji+1,jj,iku+1) - gdept_0(ji+1,jj,iku)) - (gdepw_0(ji,jj,iku+1) - gdept_0(ji,jj,iku))
             ! u direction
             IF ( iku .GT. 1 ) THEN
                ! case iku
+!!gm               zhpi(ji,jj,iku)   =  zcoef0 * r1_e1u(ji,jj) * ze3wu                                            &
                zhpi(ji,jj,iku)   =  zcoef0 / e1u(ji,jj) * ze3wu                                            &
                       &                                 * ( rhd    (ji+1,jj,iku) + rhd   (ji,jj,iku)       &
                       &                                   + SIGN(1._wp,ze3wu) * grui(ji,jj) + 2._wp * znad )
                ! corrective term ( = 0 if z coordinate )
+!!gm               zuap              = -zcoef0 * ( arui(ji,jj) + 2._wp * znad ) * gzui(ji,jj) * r1_e1u(ji,jj)
                zuap              = -zcoef0 * ( arui(ji,jj) + 2._wp * znad ) * gzui(ji,jj) / e1u(ji,jj)
                ! zhpi will be added in interior loop
@@ -586,9 +609,11 @@
 
                ! case iku + 1 (remove the zphi term added in the interior loop and compute the one corrected for zps)
+!!gm               zhpiint        =  zcoef0 * r1_e1u(ji,jj)                                                               &    
                zhpiint        =  zcoef0 / e1u(ji,jj)                                                               &    
-                  &           * (  fse3w(ji+1,jj  ,iku+1) * ( (rhd(ji+1,jj,iku+1) + znad)                          &
+                  &           * (  e3w_n(ji+1,jj  ,iku+1) * ( (rhd(ji+1,jj,iku+1) + znad)                          &
                   &                                         + (rhd(ji+1,jj,iku  ) + znad) ) * tmask(ji+1,jj,iku)   &
-                  &              - fse3w(ji  ,jj  ,iku+1) * ( (rhd(ji  ,jj,iku+1) + znad)                          &
+                  &              - e3w_n(ji  ,jj  ,iku+1) * ( (rhd(ji  ,jj,iku+1) + znad)                          &
                   &                                         + (rhd(ji  ,jj,iku  ) + znad) ) * tmask(ji  ,jj,iku)   )
+!!gm               zhpi(ji,jj,iku+1) =  zcoef0 * r1_e1u(ji,jj) * ge3rui(ji,jj) - zhpiint 
                zhpi(ji,jj,iku+1) =  zcoef0 / e1u(ji,jj) * ge3rui(ji,jj) - zhpiint 
             END IF
@@ -599,8 +624,10 @@
             IF ( ikv .GT. 1 ) THEN
                ! case ikv
+!!gm               zhpj(ji,jj,ikv)   =  zcoef0 * r1_e2v(ji,jj) * ze3wv                                            &
                zhpj(ji,jj,ikv)   =  zcoef0 / e2v(ji,jj) * ze3wv                                            &
                      &                                  * ( rhd(ji,jj+1,ikv) + rhd   (ji,jj,ikv)           &
                      &                                    + SIGN(1._wp,ze3wv) * grvi(ji,jj) + 2._wp * znad )
                ! corrective term ( = 0 if z coordinate )
+!!gm               zvap              = -zcoef0 * ( arvi(ji,jj) + 2._wp * znad ) * gzvi(ji,jj) * r1_e2v(ji,jj)
                zvap              = -zcoef0 * ( arvi(ji,jj) + 2._wp * znad ) * gzvi(ji,jj) / e2v(ji,jj)
                ! zhpi will be added in interior loop
@@ -610,9 +637,11 @@
                
                ! case ikv + 1 (remove the zphj term added in the interior loop and compute the one corrected for zps)
+!!gm               zhpjint        =  zcoef0 * r1_e2v(ji,jj)                                                              &
                zhpjint        =  zcoef0 / e2v(ji,jj)                                                              &
-                  &           * (  fse3w(ji  ,jj+1,ikv+1) * ( (rhd(ji,jj+1,ikv+1) + znad)                         &
+                  &           * (  e3w_n(ji  ,jj+1,ikv+1) * ( (rhd(ji,jj+1,ikv+1) + znad)                         &
                   &                                       + (rhd(ji,jj+1,ikv  ) + znad) ) * tmask(ji,jj+1,ikv)    &
-                  &              - fse3w(ji  ,jj  ,ikv+1) * ( (rhd(ji,jj  ,ikv+1) + znad)                         &
+                  &              - e3w_n(ji  ,jj  ,ikv+1) * ( (rhd(ji,jj  ,ikv+1) + znad)                         &
                   &                                       + (rhd(ji,jj  ,ikv  ) + znad) ) * tmask(ji,jj  ,ikv)  )
+!!gm               zhpj(ji,jj,ikv+1) =  zcoef0 * r1_e2v(ji,jj) * ge3rvi(ji,jj) - zhpjint
                zhpj(ji,jj,ikv+1) =  zcoef0 / e2v(ji,jj) * ge3rvi(ji,jj) - zhpjint
             END IF
@@ -626,32 +655,38 @@
       DO jj = 2, jpjm1
          DO ji = fs_2, fs_jpim1   ! vector opt.
+!!gm useles !
             iku=miku(ji,jj); ikv=mikv(ji,jj)
+!!gm
             DO jk = 2, jpkm1
                ! hydrostatic pressure gradient along s-surfaces
                ! zhpi is masked for the first wet cell  (contribution already done in the upper bloc)
-               zhpi(ji,jj,jk) = zhpi(ji,jj,jk) + zhpi(ji,jj,jk-1)                                                              &
-                  &                            + zcoef0 / e1u(ji,jj)                                                           &
-                  &                                     * ( fse3w(ji+1,jj  ,jk) * ( (rhd(ji+1,jj,jk  ) + znad)                 &
-                  &                                                     + (rhd(ji+1,jj,jk-1) + znad) ) * tmask(ji+1,jj,jk-1)   &
-                  &                                       - fse3w(ji  ,jj  ,jk) * ( (rhd(ji  ,jj,jk  ) + znad)                 &
-                  &                                                     + (rhd(ji  ,jj,jk-1) + znad) ) * tmask(ji  ,jj,jk-1)   ) 
+               zhpi(ji,jj,jk) = zhpi(ji,jj,jk) + zhpi(ji,jj,jk-1)                                                     &
+!!gm                  &           + zcoef0 * r1_e1u(ji,jj)                                                                &
+                  &           + zcoef0 / e1u(ji,jj)                                                                &
+                  &                    * ( e3w_n(ji+1,jj,jk) * ( (rhd(ji+1,jj,jk  ) + znad)                           &
+                  &                                            + (rhd(ji+1,jj,jk-1) + znad) ) * tmask(ji+1,jj,jk-1)   &
+                  &                      - e3w_n(ji  ,jj,jk) * ( (rhd(ji  ,jj,jk  ) + znad)                           &
+                  &                                            + (rhd(ji  ,jj,jk-1) + znad) ) * tmask(ji  ,jj,jk-1)   ) 
                ! s-coordinate pressure gradient correction
                ! corrective term, we mask this term for the first wet level beneath the ice shelf (contribution done in the upper bloc) 
-               zuap = - zcoef0 * ( rhd   (ji+1,jj  ,jk) + rhd   (ji,jj,jk) + 2._wp * znad )                    &
-                  &            * ( fsde3w(ji+1,jj  ,jk) - fsde3w(ji,jj,jk) ) / e1u(ji,jj) * umask(ji,jj,jk-1)
+               zuap = - zcoef0 * ( rhd    (ji+1,jj  ,jk) + rhd    (ji,jj,jk) + 2._wp * znad )                    &
+                  &            * ( gde3w_n(ji+1,jj  ,jk) - gde3w_n(ji,jj,jk) ) / e1u(ji,jj) * umask(ji,jj,jk-1)
+!!gm                  &            * ( gde3w_n(ji+1,jj  ,jk) - gde3w_n(ji,jj,jk) ) * r1_e1u(ji,jj) * umask(ji,jj,jk-1)
                ua(ji,jj,jk) = ua(ji,jj,jk) + ( zhpi(ji,jj,jk) + zuap) * umask(ji,jj,jk)
 
                ! hydrostatic pressure gradient along s-surfaces
                ! zhpi is masked for the first wet cell  (contribution already done in the upper bloc)
-               zhpj(ji,jj,jk) = zhpj(ji,jj,jk) + zhpj(ji,jj,jk-1)                                                              &
-                  &                            + zcoef0 / e2v(ji,jj)                                                           &
-                  &                                     * ( fse3w(ji  ,jj+1,jk) * ( (rhd(ji,jj+1,jk  ) + znad)                 &
-                  &                                                     + (rhd(ji,jj+1,jk-1) + znad) ) * tmask(ji,jj+1,jk-1)   &
-                  &                                       - fse3w(ji  ,jj  ,jk) * ( (rhd(ji,jj  ,jk  ) + znad)                 &
-                  &                                                     + (rhd(ji,jj  ,jk-1) + znad) ) * tmask(ji,jj  ,jk-1)   )
+               zhpj(ji,jj,jk) = zhpj(ji,jj,jk) + zhpj(ji,jj,jk-1)                                                     &
+!!gm                  &           + zcoef0 * r1_e2v(ji,jj)                                                                &
+                  &           + zcoef0 / e2v(ji,jj)                                                                &
+                  &                    * ( e3w_n(ji  ,jj+1,jk) * ( (rhd(ji,jj+1,jk  ) + znad)                           &
+                  &                                              + (rhd(ji,jj+1,jk-1) + znad) ) * tmask(ji,jj+1,jk-1)   &
+                  &                      - e3w_n(ji  ,jj  ,jk) * ( (rhd(ji,jj  ,jk  ) + znad)                           &
+                  &                                              + (rhd(ji,jj  ,jk-1) + znad) ) * tmask(ji,jj  ,jk-1)   )
                ! s-coordinate pressure gradient correction
                ! corrective term, we mask this term for the first wet level beneath the ice shelf (contribution done in the upper bloc)
-               zvap = - zcoef0 * ( rhd   (ji  ,jj+1,jk) + rhd   (ji,jj,jk) + 2._wp * znad )                     &
-                  &            * ( fsde3w(ji  ,jj+1,jk) - fsde3w(ji,jj,jk) ) / e2v(ji,jj) * vmask(ji,jj,jk-1)
+               zvap = - zcoef0 * ( rhd    (ji  ,jj+1,jk) + rhd    (ji,jj,jk) + 2._wp * znad )                    &
+                  &            * ( gde3w_n(ji  ,jj+1,jk) - gde3w_n(ji,jj,jk) ) / e2v(ji,jj) * vmask(ji,jj,jk-1)
+!!gm                  &            * ( gde3w_n(ji  ,jj+1,jk) - gde3w_n(ji,jj,jk) ) * r1_e2v(ji,jj) * vmask(ji,jj,jk-1)
                ! add to the general momentum trend
                va(ji,jj,jk) = va(ji,jj,jk) + ( zhpj(ji,jj,jk) + zvap ) * vmask(ji,jj,jk)
@@ -671,11 +706,14 @@
             IF (iku .GT. 1) THEN
                ! remove old value (interior case)
-               zuap            = -zcoef0 * ( rhd   (ji+1,jj  ,iku) + rhd   (ji,jj,iku) + 2._wp * znad )   &
-                     &                   * ( fsde3w(ji+1,jj  ,iku) - fsde3w(ji,jj,iku) ) / e1u(ji,jj)
+               zuap            = -zcoef0 * ( rhd    (ji+1,jj  ,iku) + rhd    (ji,jj,iku) + 2._wp * znad )   &
+                     &                   * ( gde3w_n(ji+1,jj  ,iku) - gde3w_n(ji,jj,iku) ) / e1u(ji,jj)
+!!gm                     &                   * ( gde3w_n(ji+1,jj  ,iku) - gde3w_n(ji,jj,iku) ) * r1_e1u(ji,jj)
                ua(ji,jj,iku)   = ua(ji,jj,iku) - zhpi(ji,jj,iku) - zuap
                ! put new value
                ! -zpshpi to avoid double contribution of the partial step in the top layer 
+!!gm               zuap            = -zcoef0 * ( aru(ji,jj) + 2._wp * znad ) * gzu(ji,jj)  * r1_e1u(ji,jj)
                zuap            = -zcoef0 * ( aru(ji,jj) + 2._wp * znad ) * gzu(ji,jj)  / e1u(ji,jj)
                zhpi(ji,jj,iku) =  zhpi(ji,jj,iku-1) + zcoef0 / e1u(ji,jj) * ge3ru(ji,jj) - zpshpi(ji,jj) 
+!!gm               zhpi(ji,jj,iku) =  zhpi(ji,jj,iku-1) + zcoef0 * r1_e1u(ji,jj) * ge3ru(ji,jj) - zpshpi(ji,jj) 
                ua(ji,jj,iku)   =  ua(ji,jj,iku) + zhpi(ji,jj,iku) + zuap
             END IF
@@ -683,11 +721,14 @@
             IF (ikv .GT. 1) THEN
                ! remove old value (interior case)
-               zvap            = -zcoef0 * ( rhd   (ji  ,jj+1,ikv) + rhd   (ji,jj,ikv) + 2._wp * znad )   &
-                     &                   * ( fsde3w(ji  ,jj+1,ikv) - fsde3w(ji,jj,ikv) )   / e2v(ji,jj)
+               zvap            = -zcoef0 * ( rhd    (ji  ,jj+1,ikv) + rhd    (ji,jj,ikv) + 2._wp * znad )   &
+                     &                   * ( gde3w_n(ji  ,jj+1,ikv) - gde3w_n(ji,jj,ikv) )   / e2v(ji,jj)
+!!gm                     &                   * ( gde3w_n(ji  ,jj+1,ikv) - gde3w_n(ji,jj,ikv) )   * r1_e2v(ji,jj)
                va(ji,jj,ikv)   = va(ji,jj,ikv) - zhpj(ji,jj,ikv) - zvap
                ! put new value
                ! -zpshpj to avoid double contribution of the partial step in the top layer 
+!!gm               zvap            = -zcoef0 * ( arv(ji,jj) + 2._wp * znad ) * gzv(ji,jj)     * r1_e2v(ji,jj)
                zvap            = -zcoef0 * ( arv(ji,jj) + 2._wp * znad ) * gzv(ji,jj)     / e2v(ji,jj)
                zhpj(ji,jj,ikv) =  zhpj(ji,jj,ikv-1) + zcoef0 / e2v(ji,jj) * ge3rv(ji,jj) - zpshpj(ji,jj)   
+!!gm               zhpj(ji,jj,ikv) =  zhpj(ji,jj,ikv-1) + zcoef0 * r1_e2v(ji,jj) * ge3rv(ji,jj) - zpshpj(ji,jj)   
                va(ji,jj,ikv)   =  va(ji,jj,ikv) + zhpj(ji,jj,ikv) + zvap
             END IF
@@ -750,10 +791,10 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               drhoz(ji,jj,jk) = rhd   (ji  ,jj  ,jk) - rhd   (ji,jj,jk-1)
-               dzz  (ji,jj,jk) = fsde3w(ji  ,jj  ,jk) - fsde3w(ji,jj,jk-1)
-               drhox(ji,jj,jk) = rhd   (ji+1,jj  ,jk) - rhd   (ji,jj,jk  )
-               dzx  (ji,jj,jk) = fsde3w(ji+1,jj  ,jk) - fsde3w(ji,jj,jk  )
-               drhoy(ji,jj,jk) = rhd   (ji  ,jj+1,jk) - rhd   (ji,jj,jk  )
-               dzy  (ji,jj,jk) = fsde3w(ji  ,jj+1,jk) - fsde3w(ji,jj,jk  )
+               drhoz(ji,jj,jk) = rhd    (ji  ,jj  ,jk) - rhd    (ji,jj,jk-1)
+               dzz  (ji,jj,jk) = gde3w_n(ji  ,jj  ,jk) - gde3w_n(ji,jj,jk-1)
+               drhox(ji,jj,jk) = rhd    (ji+1,jj  ,jk) - rhd    (ji,jj,jk  )
+               dzx  (ji,jj,jk) = gde3w_n(ji+1,jj  ,jk) - gde3w_n(ji,jj,jk  )
+               drhoy(ji,jj,jk) = rhd    (ji  ,jj+1,jk) - rhd    (ji,jj,jk  )
+               dzy  (ji,jj,jk) = gde3w_n(ji  ,jj+1,jk) - gde3w_n(ji,jj,jk  )
             END DO
          END DO
@@ -837,14 +878,14 @@
       !-------------------------------------------------------------
 
-!!bug gm   :  e3w-de3w = 0.5*e3w  ....  and de3w(2)-de3w(1)=e3w(2) ....   to be verified
-!          true if de3w is really defined as the sum of the e3w scale factors as, it seems to me, it should be
+!!bug gm   :  e3w-gde3w = 0.5*e3w  ....  and gde3w(2)-gde3w(1)=e3w(2) ....   to be verified
+!          true if gde3w is really defined as the sum of the e3w scale factors as, it seems to me, it should be
 
       DO jj = 2, jpjm1
          DO ji = fs_2, fs_jpim1   ! vector opt.
-            rho_k(ji,jj,1) = -grav * ( fse3w(ji,jj,1) - fsde3w(ji,jj,1) )               &
-               &                   * (  rhd(ji,jj,1)                                    &
-               &                     + 0.5_wp * ( rhd(ji,jj,2) - rhd(ji,jj,1) )         &
-               &                              * ( fse3w (ji,jj,1) - fsde3w(ji,jj,1) )   &
-               &                              / ( fsde3w(ji,jj,2) - fsde3w(ji,jj,1) )  )
+            rho_k(ji,jj,1) = -grav * ( e3w_n(ji,jj,1) - gde3w_n(ji,jj,1) )               &
+               &                   * (  rhd(ji,jj,1)                                     &
+               &                     + 0.5_wp * ( rhd    (ji,jj,2) - rhd    (ji,jj,1) )  &
+               &                              * ( e3w_n  (ji,jj,1) - gde3w_n(ji,jj,1) )  &
+               &                              / ( gde3w_n(ji,jj,2) - gde3w_n(ji,jj,1) )  )
          END DO
       END DO
@@ -857,29 +898,29 @@
             DO ji = fs_2, fs_jpim1   ! vector opt.
 
-               rho_k(ji,jj,jk) = zcoef0 * ( rhd   (ji,jj,jk) + rhd   (ji,jj,jk-1) )                                   &
-                  &                     * ( fsde3w(ji,jj,jk) - fsde3w(ji,jj,jk-1) )                                   &
-                  &            - grav * z1_10 * (                                                                     &
-                  &     ( drhow (ji,jj,jk) - drhow (ji,jj,jk-1) )                                                     &
-                  &   * ( fsde3w(ji,jj,jk) - fsde3w(ji,jj,jk-1) - z1_12 * ( dzw  (ji,jj,jk) + dzw  (ji,jj,jk-1) ) )   &
-                  &   - ( dzw   (ji,jj,jk) - dzw   (ji,jj,jk-1) )                                                     &
-                  &   * ( rhd   (ji,jj,jk) - rhd   (ji,jj,jk-1) - z1_12 * ( drhow(ji,jj,jk) + drhow(ji,jj,jk-1) ) )   &
+               rho_k(ji,jj,jk) = zcoef0 * ( rhd    (ji,jj,jk) + rhd    (ji,jj,jk-1) )                                   &
+                  &                     * ( gde3w_n(ji,jj,jk) - gde3w_n(ji,jj,jk-1) )                                   &
+                  &            - grav * z1_10 * (                                                                   &
+                  &     ( drhow  (ji,jj,jk) - drhow  (ji,jj,jk-1) )                                                     &
+                  &   * ( gde3w_n(ji,jj,jk) - gde3w_n(ji,jj,jk-1) - z1_12 * ( dzw  (ji,jj,jk) + dzw  (ji,jj,jk-1) ) )   &
+                  &   - ( dzw    (ji,jj,jk) - dzw    (ji,jj,jk-1) )                                                     &
+                  &   * ( rhd    (ji,jj,jk) - rhd    (ji,jj,jk-1) - z1_12 * ( drhow(ji,jj,jk) + drhow(ji,jj,jk-1) ) )   &
                   &                             )
 
-               rho_i(ji,jj,jk) = zcoef0 * ( rhd   (ji+1,jj,jk) + rhd   (ji,jj,jk) )                                   &
-                  &                     * ( fsde3w(ji+1,jj,jk) - fsde3w(ji,jj,jk) )                                   &
-                  &            - grav* z1_10 * (                                                                      &
-                  &     ( drhou (ji+1,jj,jk) - drhou (ji,jj,jk) )                                                     &
-                  &   * ( fsde3w(ji+1,jj,jk) - fsde3w(ji,jj,jk) - z1_12 * ( dzu  (ji+1,jj,jk) + dzu  (ji,jj,jk) ) )   &
-                  &   - ( dzu   (ji+1,jj,jk) - dzu   (ji,jj,jk) )                                                     &
-                  &   * ( rhd   (ji+1,jj,jk) - rhd   (ji,jj,jk) - z1_12 * ( drhou(ji+1,jj,jk) + drhou(ji,jj,jk) ) )   &
+               rho_i(ji,jj,jk) = zcoef0 * ( rhd    (ji+1,jj,jk) + rhd    (ji,jj,jk) )                                   &
+                  &                     * ( gde3w_n(ji+1,jj,jk) - gde3w_n(ji,jj,jk) )                                   &
+                  &            - grav* z1_10 * (                                                                    &
+                  &     ( drhou  (ji+1,jj,jk) - drhou  (ji,jj,jk) )                                                     &
+                  &   * ( gde3w_n(ji+1,jj,jk) - gde3w_n(ji,jj,jk) - z1_12 * ( dzu  (ji+1,jj,jk) + dzu  (ji,jj,jk) ) )   &
+                  &   - ( dzu    (ji+1,jj,jk) - dzu    (ji,jj,jk) )                                                     &
+                  &   * ( rhd    (ji+1,jj,jk) - rhd    (ji,jj,jk) - z1_12 * ( drhou(ji+1,jj,jk) + drhou(ji,jj,jk) ) )   &
                   &                            )
 
-               rho_j(ji,jj,jk) = zcoef0 * ( rhd   (ji,jj+1,jk) + rhd   (ji,jj,jk) )                                   &
-                  &                     * ( fsde3w(ji,jj+1,jk) - fsde3w(ji,jj,jk) )                                   &
-                  &            - grav* z1_10 * (                                                                      &
-                  &     ( drhov (ji,jj+1,jk) - drhov (ji,jj,jk) )                                                     &
-                  &   * ( fsde3w(ji,jj+1,jk) - fsde3w(ji,jj,jk) - z1_12 * ( dzv  (ji,jj+1,jk) + dzv  (ji,jj,jk) ) )   &
-                  &   - ( dzv   (ji,jj+1,jk) - dzv   (ji,jj,jk) )                                                     &
-                  &   * ( rhd   (ji,jj+1,jk) - rhd   (ji,jj,jk) - z1_12 * ( drhov(ji,jj+1,jk) + drhov(ji,jj,jk) ) )   &
+               rho_j(ji,jj,jk) = zcoef0 * ( rhd    (ji,jj+1,jk) + rhd    (ji,jj,jk) )                                 &
+                  &                     * ( gde3w_n(ji,jj+1,jk) - gde3w_n(ji,jj,jk) )                                   &
+                  &            - grav* z1_10 * (                                                                    &
+                  &     ( drhov  (ji,jj+1,jk) - drhov  (ji,jj,jk) )                                                     &
+                  &   * ( gde3w_n(ji,jj+1,jk) - gde3w_n(ji,jj,jk) - z1_12 * ( dzv  (ji,jj+1,jk) + dzv  (ji,jj,jk) ) )   &
+                  &   - ( dzv    (ji,jj+1,jk) - dzv    (ji,jj,jk) )                                                     &
+                  &   * ( rhd    (ji,jj+1,jk) - rhd    (ji,jj,jk) - z1_12 * ( drhov(ji,jj+1,jk) + drhov(ji,jj,jk) ) )   &
                   &                            )
 
@@ -897,6 +938,8 @@
       DO jj = 2, jpjm1
          DO ji = fs_2, fs_jpim1   ! vector opt.
+!!gm            zhpi(ji,jj,1) = ( rho_k(ji+1,jj  ,1) - rho_k(ji,jj,1) - rho_i(ji,jj,1) ) * r1_e1u(ji,jj)
             zhpi(ji,jj,1) = ( rho_k(ji+1,jj  ,1) - rho_k(ji,jj,1) - rho_i(ji,jj,1) ) / e1u(ji,jj)
             zhpj(ji,jj,1) = ( rho_k(ji  ,jj+1,1) - rho_k(ji,jj,1) - rho_j(ji,jj,1) ) / e2v(ji,jj)
+!!gm            zhpj(ji,jj,1) = ( rho_k(ji  ,jj+1,1) - rho_k(ji,jj,1) - rho_j(ji,jj,1) ) * r1_e2v(ji,jj)
             ! add to the general momentum trend
             ua(ji,jj,1) = ua(ji,jj,1) + zhpi(ji,jj,1)
@@ -915,7 +958,9 @@
                   &           + (  ( rho_k(ji+1,jj,jk) - rho_k(ji,jj,jk  ) )    &
                   &              - ( rho_i(ji  ,jj,jk) - rho_i(ji,jj,jk-1) )  ) / e1u(ji,jj)
+!!gm                  &              - ( rho_i(ji  ,jj,jk) - rho_i(ji,jj,jk-1) )  ) * r1_e1u(ji,jj)
                zhpj(ji,jj,jk) = zhpj(ji,jj,jk-1)                                &
                   &           + (  ( rho_k(ji,jj+1,jk) - rho_k(ji,jj,jk  ) )    &
                   &               -( rho_j(ji,jj  ,jk) - rho_j(ji,jj,jk-1) )  ) / e2v(ji,jj)
+!!gm                  &               -( rho_j(ji,jj  ,jk) - rho_j(ji,jj,jk-1) )  ) * r1_e2v(ji,jj)
                ! add to the general momentum trend
                ua(ji,jj,jk) = ua(ji,jj,jk) + zhpi(ji,jj,jk)
@@ -983,10 +1028,10 @@
         DO ji = 1, jpi
           jk = mbathy(ji,jj)
-          IF( jk <= 0 ) THEN; zrhh(ji,jj,:) = 0._wp
-          ELSE IF(jk == 1) THEN; zrhh(ji,jj, jk+1:jpk) = rhd(ji,jj,jk)
-          ELSE IF(jk < jpkm1) THEN
+          IF(     jk <=  0   ) THEN   ;   zrhh(ji,jj,    :   ) = 0._wp
+          ELSEIF( jk ==  1   ) THEN   ;   zrhh(ji,jj,jk+1:jpk) = rhd(ji,jj,jk)
+          ELSEIF( jk < jpkm1 ) THEN
              DO jkk = jk+1, jpk
-                zrhh(ji,jj,jkk) = interp1(fsde3w(ji,jj,jkk),   fsde3w(ji,jj,jkk-1), &
-                                         fsde3w(ji,jj,jkk-2), rhd(ji,jj,jkk-1), rhd(ji,jj,jkk-2))
+                zrhh(ji,jj,jkk) = interp1(gde3w_n(ji,jj,jkk  ), gde3w_n(ji,jj,jkk-1),   &
+                   &                      gde3w_n(ji,jj,jkk-2), rhd    (ji,jj,jkk-1), rhd(ji,jj,jkk-2))
              END DO
           ENDIF
@@ -997,5 +1042,5 @@
       DO jj = 1, jpj
          DO ji = 1, jpi
-            zdept(ji,jj,1) = 0.5_wp * fse3w(ji,jj,1) - sshn(ji,jj) * znad
+            zdept(ji,jj,1) = 0.5_wp * e3w_n(ji,jj,1) - sshn(ji,jj) * znad
          END DO
       END DO
@@ -1004,5 +1049,5 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               zdept(ji,jj,jk) = zdept(ji,jj,jk-1) + fse3w(ji,jj,jk)
+               zdept(ji,jj,jk) = zdept(ji,jj,jk-1) + e3w_n(ji,jj,jk)
             END DO
          END DO
@@ -1022,8 +1067,8 @@
           zrhdt1 = zrhh(ji,jj,1) - interp3(zdept(ji,jj,1),asp(ji,jj,1), &
                                          bsp(ji,jj,1),   csp(ji,jj,1), &
-                                         dsp(ji,jj,1) ) * 0.25_wp * fse3w(ji,jj,1)
+                                         dsp(ji,jj,1) ) * 0.25_wp * e3w_n(ji,jj,1)
 
           ! assuming linear profile across the top half surface layer
-          zhpi(ji,jj,1) =  0.5_wp * fse3w(ji,jj,1) * zrhdt1
+          zhpi(ji,jj,1) =  0.5_wp * e3w_n(ji,jj,1) * zrhdt1
         END DO
       END DO
@@ -1055,6 +1100,6 @@
       DO jj = 2, jpjm1
         DO ji = 2, jpim1
-          zu(ji,jj,1) = - ( fse3u(ji,jj,1) - zsshu_n(ji,jj) * znad) 
-          zv(ji,jj,1) = - ( fse3v(ji,jj,1) - zsshv_n(ji,jj) * znad)
+          zu(ji,jj,1) = - ( e3u_n(ji,jj,1) - zsshu_n(ji,jj) * znad) 
+          zv(ji,jj,1) = - ( e3v_n(ji,jj,1) - zsshv_n(ji,jj) * znad)
         END DO
       END DO
@@ -1063,6 +1108,6 @@
         DO jj = 2, jpjm1
           DO ji = 2, jpim1
-            zu(ji,jj,jk) = zu(ji,jj,jk-1)- fse3u(ji,jj,jk)
-            zv(ji,jj,jk) = zv(ji,jj,jk-1)- fse3v(ji,jj,jk)
+            zu(ji,jj,jk) = zu(ji,jj,jk-1)- e3u_n(ji,jj,jk)
+            zv(ji,jj,jk) = zv(ji,jj,jk-1)- e3v_n(ji,jj,jk)
           END DO
         END DO
@@ -1072,6 +1117,6 @@
         DO jj = 2, jpjm1
           DO ji = 2, jpim1
-            zu(ji,jj,jk) = zu(ji,jj,jk) + 0.5_wp * fse3u(ji,jj,jk)
-            zv(ji,jj,jk) = zv(ji,jj,jk) + 0.5_wp * fse3v(ji,jj,jk)
+            zu(ji,jj,jk) = zu(ji,jj,jk) + 0.5_wp * e3u_n(ji,jj,jk)
+            zv(ji,jj,jk) = zv(ji,jj,jk) + 0.5_wp * e3v_n(ji,jj,jk)
           END DO
         END DO
@@ -1142,9 +1187,12 @@
                ! update the momentum trends in u direction
 
+!!gm               zdpdx1 = zcoef0 * r1_e1u(ji,jj) * (zhpi(ji+1,jj,jk) - zhpi(ji,jj,jk))
                zdpdx1 = zcoef0 / e1u(ji,jj) * (zhpi(ji+1,jj,jk) - zhpi(ji,jj,jk))
                IF( lk_vvl ) THEN
+!!gm                 zdpdx2 = zcoef0 * r1_e1u(ji,jj) * &
                  zdpdx2 = zcoef0 / e1u(ji,jj) * &
                          ( REAL(jis-jid, wp) * (zpwes + zpwed) + (sshn(ji+1,jj)-sshn(ji,jj)) )
                 ELSE
+!!gm                 zdpdx2 = zcoef0 * r1_e1u(ji,jj) * REAL(jis-jid, wp) * (zpwes + zpwed)
                  zdpdx2 = zcoef0 / e1u(ji,jj) * REAL(jis-jid, wp) * (zpwes + zpwed)
                ENDIF
@@ -1199,9 +1247,12 @@
                ! update the momentum trends in v direction
 
+!!gm               zdpdy1 = zcoef0 * r1_e2v(ji,jj) * (zhpi(ji,jj+1,jk) - zhpi(ji,jj,jk))
                zdpdy1 = zcoef0 / e2v(ji,jj) * (zhpi(ji,jj+1,jk) - zhpi(ji,jj,jk))
                IF( lk_vvl ) THEN
+!!gm                   zdpdy2 = zcoef0 * r1_e2v(ji,jj) * &
                    zdpdy2 = zcoef0 / e2v(ji,jj) * &
                            ( REAL(jjs-jjd, wp) * (zpnss + zpnsd) + (sshn(ji,jj+1)-sshn(ji,jj)) )
                ELSE
+!!gm                   zdpdy2 = zcoef0 * r1_e2v(ji,jj) * REAL(jjs-jjd, wp) * (zpnss + zpnsd )
                    zdpdy2 = zcoef0 / e2v(ji,jj) * REAL(jjs-jjd, wp) * (zpnss + zpnsd )
                ENDIF
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf.F90	(revision 5845)
@@ -46,5 +46,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_iso.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_iso.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_iso.F90	(revision 5845)
@@ -41,5 +41,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -135,8 +134,8 @@
             DO jj = 2, jpjm1
                DO ji = 2, jpim1
-                  uslp (ji,jj,jk) = - ( fsdept_b(ji+1,jj,jk) - fsdept_b(ji ,jj ,jk) ) * r1_e1u(ji,jj) * umask(ji,jj,jk)
-                  vslp (ji,jj,jk) = - ( fsdept_b(ji,jj+1,jk) - fsdept_b(ji ,jj ,jk) ) * r1_e2v(ji,jj) * vmask(ji,jj,jk)
-                  wslpi(ji,jj,jk) = - ( fsdepw_b(ji+1,jj,jk) - fsdepw_b(ji-1,jj,jk) ) * r1_e1t(ji,jj) * tmask(ji,jj,jk) * 0.5
-                  wslpj(ji,jj,jk) = - ( fsdepw_b(ji,jj+1,jk) - fsdepw_b(ji,jj-1,jk) ) * r1_e2t(ji,jj) * tmask(ji,jj,jk) * 0.5
+                  uslp (ji,jj,jk) = - ( gdept_b(ji+1,jj,jk) - gdept_b(ji ,jj ,jk) ) * r1_e1u(ji,jj) * umask(ji,jj,jk)
+                  vslp (ji,jj,jk) = - ( gdept_b(ji,jj+1,jk) - gdept_b(ji ,jj ,jk) ) * r1_e2v(ji,jj) * vmask(ji,jj,jk)
+                  wslpi(ji,jj,jk) = - ( gdepw_b(ji+1,jj,jk) - gdepw_b(ji-1,jj,jk) ) * r1_e1t(ji,jj) * tmask(ji,jj,jk) * 0.5
+                  wslpj(ji,jj,jk) = - ( gdepw_b(ji,jj+1,jk) - gdepw_b(ji,jj-1,jk) ) * r1_e2t(ji,jj) * tmask(ji,jj,jk) * 0.5
                END DO
             END DO
@@ -183,5 +182,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, jpi   ! vector opt.
-                  zabe1 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e2t(ji,jj) * MIN( fse3u(ji,jj,jk), fse3u(ji-1,jj,jk) ) * r1_e1t(ji,jj)
+                  zabe1 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e2t(ji,jj) * MIN( e3u_n(ji,jj,jk), e3u_n(ji-1,jj,jk) ) * r1_e1t(ji,jj)
 
                   zmskt = 1._wp / MAX(   umask(ji-1,jj,jk  )+umask(ji,jj,jk+1)     &
@@ -198,5 +197,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, jpi   ! vector opt.
-                  zabe1 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e2t(ji,jj) * fse3t(ji,jj,jk) * r1_e1t(ji,jj)
+                  zabe1 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e2t(ji,jj) * e3t_n(ji,jj,jk) * r1_e1t(ji,jj)
 
                   zmskt = 1._wp / MAX(   umask(ji-1,jj,jk  ) + umask(ji,jj,jk+1)     &
@@ -215,5 +214,5 @@
          DO jj = 1, jpjm1
             DO ji = 1, fs_jpim1   ! vector opt.
-               zabe2 = ( ahmf(ji,jj,jk) + rn_ahm_b ) * e1f(ji,jj) * fse3f(ji,jj,jk) * r1_e2f(ji,jj)
+               zabe2 = ( ahmf(ji,jj,jk) + rn_ahm_b ) * e1f(ji,jj) * e3f_n(ji,jj,jk) * r1_e2f(ji,jj)
 
                zmskf = 1._wp / MAX(   umask(ji,jj+1,jk  )+umask(ji,jj,jk+1)     &
@@ -236,5 +235,5 @@
          DO jj = 2, jpjm1
             DO ji = 1, fs_jpim1   ! vector opt.
-               zabe1 = ( ahmf(ji,jj,jk) + rn_ahm_b ) * e2f(ji,jj) * fse3f(ji,jj,jk) * r1_e1f(ji,jj)
+               zabe1 = ( ahmf(ji,jj,jk) + rn_ahm_b ) * e2f(ji,jj) * e3f_n(ji,jj,jk) * r1_e1f(ji,jj)
 
                zmskf = 1._wp / MAX(  vmask(ji+1,jj,jk  )+vmask(ji,jj,jk+1)     &
@@ -253,5 +252,5 @@
             DO jj = 2, jpj
                DO ji = 1, fs_jpim1   ! vector opt.
-                  zabe2 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e1t(ji,jj) * MIN( fse3v(ji,jj,jk), fse3v(ji,jj-1,jk) ) * r1_e2t(ji,jj)
+                  zabe2 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e1t(ji,jj) * MIN( e3v_n(ji,jj,jk), e3v_n(ji,jj-1,jk) ) * r1_e2t(ji,jj)
 
                   zmskt = 1._wp / MAX(  vmask(ji,jj-1,jk  )+vmask(ji,jj,jk+1)     &
@@ -268,5 +267,5 @@
             DO jj = 2, jpj
                DO ji = 1, fs_jpim1   ! vector opt.
-                  zabe2 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e1t(ji,jj) * fse3t(ji,jj,jk) * r1_e2t(ji,jj)
+                  zabe2 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e1t(ji,jj) * e3t_n(ji,jj,jk) * r1_e2t(ji,jj)
 
                   zmskt = 1./MAX(  vmask(ji,jj-1,jk  )+vmask(ji,jj,jk+1)   &
@@ -288,7 +287,7 @@
             DO ji = 2, jpim1          !!gm Question vectop possible??? !!bug
                ua(ji,jj,jk) = ua(ji,jj,jk) + ( ziut(ji+1,jj) - ziut(ji,jj  )    &
-                  &                          + zjuf(ji  ,jj) - zjuf(ji,jj-1)  ) / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
+                  &                          + zjuf(ji  ,jj) - zjuf(ji,jj-1)  ) / ( e1e2u(ji,jj) * e3u_n(ji,jj,jk) )
                va(ji,jj,jk) = va(ji,jj,jk) + ( zivf(ji,jj  ) - zivf(ji-1,jj)    &
-                  &                          + zjvt(ji,jj+1) - zjvt(ji,jj  )  ) / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
+                  &                          + zjvt(ji,jj+1) - zjvt(ji,jj  )  ) / ( e1e2v(ji,jj) * e3v_n(ji,jj,jk) )
             END DO
          END DO
@@ -403,6 +402,6 @@
          DO jk = 1, jpkm1
             DO ji = 2, jpim1
-               ua(ji,jj,jk) = ua(ji,jj,jk) + ( zfuw(ji,jk) - zfuw(ji,jk+1) ) / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
-               va(ji,jj,jk) = va(ji,jj,jk) + ( zfvw(ji,jk) - zfvw(ji,jk+1) ) / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
+               ua(ji,jj,jk) = ua(ji,jj,jk) + ( zfuw(ji,jk) - zfuw(ji,jk+1) ) / ( e1e2u(ji,jj) * e3u_n(ji,jj,jk) )
+               va(ji,jj,jk) = va(ji,jj,jk) + ( zfvw(ji,jk) - zfvw(ji,jk+1) ) / ( e1e2v(ji,jj) * e3v_n(ji,jj,jk) )
             END DO
          END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_lap_blp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_lap_blp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_lap_blp.F90	(revision 5845)
@@ -35,5 +35,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -87,11 +86,11 @@
             DO ji = fs_2, jpi   ! vector opt.
                !                                      ! ahm * e3 * curl  (computed from 1 to jpim1/jpjm1)
-               zcur(ji-1,jj-1) = ahmf(ji-1,jj-1,jk) * fse3f(ji-1,jj-1,jk) * r1_e1e2f(ji-1,jj-1)      &
+               zcur(ji-1,jj-1) = ahmf(ji-1,jj-1,jk) * e3f_n(ji-1,jj-1,jk) * r1_e1e2f(ji-1,jj-1)      &
                   &     * (  e2v(ji  ,jj-1) * pvb(ji  ,jj-1,jk) - e2v(ji-1,jj-1) * pvb(ji-1,jj-1,jk)                &
                   &        - e1u(ji-1,jj  ) * pub(ji-1,jj  ,jk) + e1u(ji-1,jj-1) * pub(ji-1,jj-1,jk)  ) * fmask(ji-1,jj-1,jk)
                !                                      ! ahm * div        (computed from 2 to jpi/jpj)
-               zdiv(ji,jj)     = ahmt(ji,jj,jk) / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )                     * tmask(ji,jj,jk)    &
-                  &     * (  e2u(ji,jj)*fse3u(ji,jj,jk) * pub(ji,jj,jk) - e2u(ji-1,jj)*fse3u(ji-1,jj,jk) * pub(ji-1,jj,jk)    &
-                  &        + e1v(ji,jj)*fse3v(ji,jj,jk) * pvb(ji,jj,jk) - e1v(ji,jj-1)*fse3v(ji,jj-1,jk) * pvb(ji,jj-1,jk)  )
+               zdiv(ji,jj)     = ahmt(ji,jj,jk) / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )                     * tmask(ji,jj,jk)    &
+                  &     * (  e2u(ji,jj)*e3u_n(ji,jj,jk) * pub(ji,jj,jk) - e2u(ji-1,jj)*e3u_n(ji-1,jj,jk) * pub(ji-1,jj,jk)    &
+                  &        + e1v(ji,jj)*e3v_n(ji,jj,jk) * pvb(ji,jj,jk) - e1v(ji,jj-1)*e3v_n(ji,jj-1,jk) * pvb(ji,jj-1,jk)  )
             END DO  
          END DO  
@@ -100,9 +99,9 @@
             DO ji = fs_2, fs_jpim1   ! vector opt.
                pua(ji,jj,jk) = pua(ji,jj,jk) + zsign * (                                                   &
-                  &              - ( zcur(ji  ,jj) - zcur(ji,jj-1) ) /  ( e2u(ji,jj) * fse3u(ji,jj,jk) )   &
+                  &              - ( zcur(ji  ,jj) - zcur(ji,jj-1) ) /  ( e2u(ji,jj) * e3u_n(ji,jj,jk) )   &
                   &              + ( zdiv(ji+1,jj) - zdiv(ji,jj  ) ) * r1_e1u(ji,jj)                     )
                   !
                pva(ji,jj,jk) = pva(ji,jj,jk) + zsign * (                                                   &
-                  &                ( zcur(ji,jj  ) - zcur(ji-1,jj) ) /  ( e1v(ji,jj) * fse3v(ji,jj,jk) )   &
+                  &                ( zcur(ji,jj  ) - zcur(ji-1,jj) ) /  ( e1v(ji,jj) * e3v_n(ji,jj,jk) )   &
                   &              + ( zdiv(ji,jj+1) - zdiv(ji  ,jj) ) * r1_e2v(ji,jj)                     )
             END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 5845)
@@ -55,6 +55,4 @@
    PUBLIC    dyn_nxt   ! routine called by step.F90
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -146,10 +144,8 @@
       ELSE                                            ! applied on thickness weighted velocity
          DO jk = 1, jpkm1
-            ua(:,:,jk) = (          ub(:,:,jk) * fse3u_b(:,:,jk)      &
-               &           + z2dt * ua(:,:,jk) * fse3u_n(:,:,jk)  )   &
-               &         / fse3u_a(:,:,jk) * umask(:,:,jk)
-            va(:,:,jk) = (          vb(:,:,jk) * fse3v_b(:,:,jk)      &
-               &           + z2dt * va(:,:,jk) * fse3v_n(:,:,jk)  )   &
-               &         / fse3v_a(:,:,jk) * vmask(:,:,jk)
+            ua(:,:,jk) = (          ub(:,:,jk) * e3u_b(:,:,jk)    &
+               &           + z2dt * ua(:,:,jk) * e3u_n(:,:,jk)  ) / e3u_a(:,:,jk) * umask(:,:,jk)
+            va(:,:,jk) = (          vb(:,:,jk) * e3v_b(:,:,jk)    &
+               &           + z2dt * va(:,:,jk) * e3v_n(:,:,jk)  ) / e3v_a(:,:,jk) * vmask(:,:,jk)
          END DO
       ENDIF
@@ -160,13 +156,13 @@
       ! Ensure below that barotropic velocities match time splitting estimate
       ! Compute actual transport and replace it with ts estimate at "after" time step
-      zue(:,:) = fse3u_a(:,:,1) * ua(:,:,1) * umask(:,:,1)
-      zve(:,:) = fse3v_a(:,:,1) * va(:,:,1) * vmask(:,:,1)
+      zue(:,:) = e3u_a(:,:,1) * ua(:,:,1) * umask(:,:,1)
+      zve(:,:) = e3v_a(:,:,1) * va(:,:,1) * vmask(:,:,1)
       DO jk = 2, jpkm1
-         zue(:,:) = zue(:,:) + fse3u_a(:,:,jk) * ua(:,:,jk) * umask(:,:,jk)
-         zve(:,:) = zve(:,:) + fse3v_a(:,:,jk) * va(:,:,jk) * vmask(:,:,jk)
+         zue(:,:) = zue(:,:) + e3u_a(:,:,jk) * ua(:,:,jk) * umask(:,:,jk)
+         zve(:,:) = zve(:,:) + e3v_a(:,:,jk) * va(:,:,jk) * vmask(:,:,jk)
       END DO
       DO jk = 1, jpkm1
-         ua(:,:,jk) = ( ua(:,:,jk) - zue(:,:) * hur_a(:,:) + ua_b(:,:) ) * umask(:,:,jk)
-         va(:,:,jk) = ( va(:,:,jk) - zve(:,:) * hvr_a(:,:) + va_b(:,:) ) * vmask(:,:,jk)
+         ua(:,:,jk) = ( ua(:,:,jk) - zue(:,:) * r1_hu_a(:,:) + ua_b(:,:) ) * umask(:,:,jk)
+         va(:,:,jk) = ( va(:,:,jk) - zve(:,:) * r1_hv_a(:,:) + va_b(:,:) ) * vmask(:,:,jk)
       END DO
 
@@ -231,7 +227,7 @@
          IF (lk_vvl) THEN
             DO jk = 1, jpkm1
-               fse3t_b(:,:,jk) = fse3t_n(:,:,jk)
-               fse3u_b(:,:,jk) = fse3u_n(:,:,jk)
-               fse3v_b(:,:,jk) = fse3v_n(:,:,jk)
+               e3t_b(:,:,jk) = e3t_n(:,:,jk)
+               e3u_b(:,:,jk) = e3u_n(:,:,jk)
+               e3v_b(:,:,jk) = e3v_n(:,:,jk)
             ENDDO
          ENDIF
@@ -261,11 +257,11 @@
             IF (lk_dynspg_ts.AND.ln_bt_fw) THEN
                ! No asselin filtering on thicknesses if forward time splitting
-                  fse3t_b(:,:,:) = fse3t_n(:,:,:)
+                  e3t_b(:,:,:) = e3t_n(:,:,:)
             ELSE
-               fse3t_b(:,:,:) = fse3t_n(:,:,:) + atfp * ( fse3t_b(:,:,:) - 2._wp * fse3t_n(:,:,:) + fse3t_a(:,:,:) )
+               e3t_b(:,:,:) = e3t_n(:,:,:) + atfp * ( e3t_b(:,:,:) - 2._wp * e3t_n(:,:,:) + e3t_a(:,:,:) )
                ! Add volume filter correction: compatibility with tracer advection scheme
                ! => time filter + conservation correction (only at the first level)
                IF ( nn_isf == 0) THEN   ! if no ice shelf melting
-                  fse3t_b(:,:,1) = fse3t_b(:,:,1) - atfp * rdt * r1_rau0 * ( emp_b(:,:) - emp(:,:) &
+                  e3t_b(:,:,1) = e3t_b(:,:,1) - atfp * rdt * r1_rau0 * ( emp_b(:,:) - emp(:,:) &
                                  &                                          -rnf_b(:,:) + rnf(:,:) ) * tmask(:,:,1)
                ELSE                     ! if ice shelf melting
@@ -273,8 +269,8 @@
                      DO ji = 1,jpi
                         jk = mikt(ji,jj)
-                        fse3t_b(ji,jj,jk) = fse3t_b(ji,jj,jk) - atfp * rdt * r1_rau0                       &
-                                          &                          * ( (emp_b(ji,jj)    - emp(ji,jj)   ) &
-                                          &                            - (rnf_b(ji,jj)    - rnf(ji,jj)   ) &
-                                          &                            + (fwfisf_b(ji,jj) - fwfisf(ji,jj)) ) * tmask(ji,jj,jk)
+                        e3t_b(ji,jj,jk) = e3t_b(ji,jj,jk) - atfp * rdt * r1_rau0                       &
+                                          &                      * ( (emp_b(ji,jj)    - emp(ji,jj)   ) &
+                                          &                        - (rnf_b(ji,jj)    - rnf(ji,jj)   ) &
+                                          &                        + (fwfisf_b(ji,jj) - fwfisf(ji,jj)) ) * tmask(ji,jj,jk)
                      END DO
                   END DO
@@ -285,6 +281,6 @@
                ! Before scale factor at (u/v)-points
                ! -----------------------------------
-               CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3u_b(:,:,:), 'U' )
-               CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3v_b(:,:,:), 'V' )
+               CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' )
+               CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' )
                ! Leap-Frog - Asselin filter and swap: applied on velocity
                ! -----------------------------------
@@ -306,6 +302,6 @@
                ! Temporary filtered scale factor at (u/v)-points (will become before scale factor)
                !------------------------------------------------
-               CALL dom_vvl_interpol( fse3t_b(:,:,:), ze3u_f, 'U' )
-               CALL dom_vvl_interpol( fse3t_b(:,:,:), ze3v_f, 'V' )
+               CALL dom_vvl_interpol( e3t_b(:,:,:), ze3u_f, 'U' )
+               CALL dom_vvl_interpol( e3t_b(:,:,:), ze3v_f, 'V' )
                ! Leap-Frog - Asselin filter and swap: applied on thickness weighted velocity
                ! -----------------------------------             ===========================
@@ -313,10 +309,10 @@
                   DO jj = 1, jpj
                      DO ji = 1, jpi                  
-                        zue3a = ua(ji,jj,jk) * fse3u_a(ji,jj,jk)
-                        zve3a = va(ji,jj,jk) * fse3v_a(ji,jj,jk)
-                        zue3n = un(ji,jj,jk) * fse3u_n(ji,jj,jk)
-                        zve3n = vn(ji,jj,jk) * fse3v_n(ji,jj,jk)
-                        zue3b = ub(ji,jj,jk) * fse3u_b(ji,jj,jk)
-                        zve3b = vb(ji,jj,jk) * fse3v_b(ji,jj,jk)
+                        zue3a = ua(ji,jj,jk) * e3u_a(ji,jj,jk)
+                        zve3a = va(ji,jj,jk) * e3v_a(ji,jj,jk)
+                        zue3n = un(ji,jj,jk) * e3u_n(ji,jj,jk)
+                        zve3n = vn(ji,jj,jk) * e3v_n(ji,jj,jk)
+                        zue3b = ub(ji,jj,jk) * e3u_b(ji,jj,jk)
+                        zve3b = vb(ji,jj,jk) * e3v_b(ji,jj,jk)
                         !
                         zuf = ( zue3n + atfp * ( zue3b - 2._wp * zue3n  + zue3a ) ) / ze3u_f(ji,jj,jk)
@@ -330,6 +326,6 @@
                   END DO
                END DO
-               fse3u_b(:,:,1:jpkm1) = ze3u_f(:,:,1:jpkm1)      ! e3u_b <-- filtered scale factor
-               fse3v_b(:,:,1:jpkm1) = ze3v_f(:,:,1:jpkm1)
+               e3u_b(:,:,1:jpkm1) = ze3u_f(:,:,1:jpkm1)      ! e3u_b <-- filtered scale factor
+               e3v_b(:,:,1:jpkm1) = ze3v_f(:,:,1:jpkm1)
             ENDIF
             !
@@ -339,13 +335,13 @@
             ! Revert "before" velocities to time split estimate
             ! Doing it here also means that asselin filter contribution is removed  
-            zue(:,:) = fse3u_b(:,:,1) * ub(:,:,1) * umask(:,:,1)
-            zve(:,:) = fse3v_b(:,:,1) * vb(:,:,1) * vmask(:,:,1)    
+            zue(:,:) = e3u_b(:,:,1) * ub(:,:,1) * umask(:,:,1)
+            zve(:,:) = e3v_b(:,:,1) * vb(:,:,1) * vmask(:,:,1)    
             DO jk = 2, jpkm1
-               zue(:,:) = zue(:,:) + fse3u_b(:,:,jk) * ub(:,:,jk) * umask(:,:,jk)
-               zve(:,:) = zve(:,:) + fse3v_b(:,:,jk) * vb(:,:,jk) * vmask(:,:,jk)    
+               zue(:,:) = zue(:,:) + e3u_b(:,:,jk) * ub(:,:,jk) * umask(:,:,jk)
+               zve(:,:) = zve(:,:) + e3v_b(:,:,jk) * vb(:,:,jk) * vmask(:,:,jk)    
             END DO
             DO jk = 1, jpkm1
-               ub(:,:,jk) = ub(:,:,jk) - (zue(:,:) * hur(:,:) - un_b(:,:)) * umask(:,:,jk)
-               vb(:,:,jk) = vb(:,:,jk) - (zve(:,:) * hvr(:,:) - vn_b(:,:)) * vmask(:,:,jk)
+               ub(:,:,jk) = ub(:,:,jk) - (zue(:,:) * r1_hu_n(:,:) - un_b(:,:)) * umask(:,:,jk)
+               vb(:,:,jk) = vb(:,:,jk) - (zve(:,:) * r1_hv_n(:,:) - vn_b(:,:)) * vmask(:,:,jk)
             END DO
          ENDIF
@@ -359,37 +355,33 @@
       !
       IF (lk_vvl) THEN
-         hu_b(:,:) = 0.
-         hv_b(:,:) = 0.
-         DO jk = 1, jpkm1
-            hu_b(:,:) = hu_b(:,:) + fse3u_b(:,:,jk) * umask(:,:,jk)
-            hv_b(:,:) = hv_b(:,:) + fse3v_b(:,:,jk) * vmask(:,:,jk)
+         hu_b(:,:) = e3u_b(:,:,1) * umask(:,:,1)
+         hv_b(:,:) = e3v_b(:,:,1) * vmask(:,:,1)
+         DO jk = 2, jpkm1
+            hu_b(:,:) = hu_b(:,:) + e3u_b(:,:,jk) * umask(:,:,jk)
+            hv_b(:,:) = hv_b(:,:) + e3v_b(:,:,jk) * vmask(:,:,jk)
          END DO
-         hur_b(:,:) = umask_i(:,:) / ( hu_b(:,:) + 1._wp - umask_i(:,:) )
-         hvr_b(:,:) = vmask_i(:,:) / ( hv_b(:,:) + 1._wp - vmask_i(:,:) )
-      ENDIF
-      !
-      un_b(:,:) = 0._wp ; vn_b(:,:) = 0._wp
-      ub_b(:,:) = 0._wp ; vb_b(:,:) = 0._wp
-      !
+!!gm don't understand the use of umask_i ....
+         r1_hu_b(:,:) = umask_i(:,:) / ( hu_b(:,:) + 1._wp - umask_i(:,:) )
+         r1_hv_b(:,:) = vmask_i(:,:) / ( hv_b(:,:) + 1._wp - vmask_i(:,:) )
+      ENDIF
+      !
+      un_b(:,:) = 0._wp   ;   vn_b(:,:) = 0._wp
+      ub_b(:,:) = 0._wp   ;   vb_b(:,:) = 0._wp
       DO jk = 1, jpkm1
          DO jj = 1, jpj
             DO ji = 1, jpi
-               un_b(ji,jj) = un_b(ji,jj) + fse3u_a(ji,jj,jk) * un(ji,jj,jk) * umask(ji,jj,jk)
-               vn_b(ji,jj) = vn_b(ji,jj) + fse3v_a(ji,jj,jk) * vn(ji,jj,jk) * vmask(ji,jj,jk)
+               un_b(ji,jj) = un_b(ji,jj) + e3u_a(ji,jj,jk) * un(ji,jj,jk) * umask(ji,jj,jk)
+               vn_b(ji,jj) = vn_b(ji,jj) + e3v_a(ji,jj,jk) * vn(ji,jj,jk) * vmask(ji,jj,jk)
                !
-               ub_b(ji,jj) = ub_b(ji,jj) + fse3u_b(ji,jj,jk) * ub(ji,jj,jk) * umask(ji,jj,jk)
-               vb_b(ji,jj) = vb_b(ji,jj) + fse3v_b(ji,jj,jk) * vb(ji,jj,jk) * vmask(ji,jj,jk)
+               ub_b(ji,jj) = ub_b(ji,jj) + e3u_b(ji,jj,jk) * ub(ji,jj,jk) * umask(ji,jj,jk)
+               vb_b(ji,jj) = vb_b(ji,jj) + e3v_b(ji,jj,jk) * vb(ji,jj,jk) * vmask(ji,jj,jk)
             END DO
          END DO
       END DO
-      !
-      !
-      un_b(:,:) = un_b(:,:) * hur_a(:,:)
-      vn_b(:,:) = vn_b(:,:) * hvr_a(:,:)
-      ub_b(:,:) = ub_b(:,:) * hur_b(:,:)
-      vb_b(:,:) = vb_b(:,:) * hvr_b(:,:)
-      !
-      !
-
+      un_b(:,:) = un_b(:,:) * r1_hu_a(:,:)
+      vn_b(:,:) = vn_b(:,:) * r1_hv_a(:,:)
+      ub_b(:,:) = ub_b(:,:) * r1_hu_b(:,:)
+      vb_b(:,:) = vb_b(:,:) * r1_hv_b(:,:)
+      !
       IF( l_trddyn ) THEN                ! 3D output: asselin filter trends on momentum
          zua(:,:,:) = ( ub(:,:,:) - zua(:,:,:) ) * z1_2dt
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 5845)
@@ -46,5 +46,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -78,5 +77,4 @@
       !!             period is used to prevent the divergence of odd and even time step.
       !!----------------------------------------------------------------------
-      !
       INTEGER, INTENT(in   ) ::   kt       ! ocean time-step index
       INTEGER, INTENT(  out) ::   kindic   ! solver flag
@@ -97,5 +95,5 @@
 
       IF( l_trddyn )   THEN                      ! temporary save of ta and sa trends
-         CALL wrk_alloc( jpi, jpj, jpk, ztrdu, ztrdv ) 
+         CALL wrk_alloc( jpi,jpj,jpk,   ztrdu, ztrdv ) 
          ztrdu(:,:,:) = ua(:,:,:)
          ztrdv(:,:,:) = va(:,:,:)
@@ -139,5 +137,5 @@
          !
          IF( nn_ice_embd == 2 ) THEN          !== embedded sea ice: Pressure gradient due to snow-ice mass ==!
-            CALL wrk_alloc( jpi, jpj, zpice )
+            CALL wrk_alloc( jpi,jpj,   zpice )
             !                                            
             zintp = REAL( MOD( kt-1, nn_fsbc ) ) / REAL( nn_fsbc )
@@ -151,5 +149,5 @@
             END DO
             !
-            CALL wrk_dealloc( jpi, jpj, zpice )         
+            CALL wrk_dealloc( jpi,jpj,   zpice )         
          ENDIF
          !
@@ -188,5 +186,5 @@
          CALL trd_dyn( ztrdu, ztrdv, jpdyn_spg, kt )
          !
-         CALL wrk_dealloc( jpi, jpj, jpk, ztrdu, ztrdv ) 
+         CALL wrk_dealloc( jpi,jpj,jpk,   ztrdu, ztrdv ) 
       ENDIF
       !                                          ! print mean trends (used for debugging)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 5845)
@@ -34,5 +34,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -81,6 +80,6 @@
          DO jj = 2, jpjm1                    ! now surface pressure gradient
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) / e1u(ji,jj)
-               spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) / e2v(ji,jj)
+               spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) * r1_e1u(ji,jj)
+               spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) * r1_e2v(ji,jj)
             END DO 
          END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 5845)
@@ -59,5 +59,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -155,10 +154,8 @@
                DO jj = 2, jpjm1
                   DO ji = fs_2, fs_jpim1   ! vector opt.
-                     ua(ji,jj,jk) = (        ub(ji,jj,jk) * fse3u_b(ji,jj,jk)      &
-                        &           + z2dt * ua(ji,jj,jk) * fse3u_n(ji,jj,jk)  )   &
-                        &         / fse3u_a(ji,jj,jk) * umask(ji,jj,jk)
-                     va(ji,jj,jk) = (        vb(ji,jj,jk) * fse3v_b(ji,jj,jk)      &
-                        &           + z2dt * va(ji,jj,jk) * fse3v_n(ji,jj,jk)  )   &
-                        &         / fse3v_a(ji,jj,jk) * vmask(ji,jj,jk)
+                     ua(ji,jj,jk) = (        ub(ji,jj,jk) * e3u_b(ji,jj,jk)    &
+                        &           + z2dt * ua(ji,jj,jk) * e3u_n(ji,jj,jk)  ) / e3u_a(ji,jj,jk) * umask(ji,jj,jk)
+                     va(ji,jj,jk) = (        vb(ji,jj,jk) * e3v_b(ji,jj,jk)    &
+                        &           + z2dt * va(ji,jj,jk) * e3v_n(ji,jj,jk)  ) / e3v_a(ji,jj,jk) * vmask(ji,jj,jk)
                  END DO
                END DO
@@ -171,6 +168,6 @@
          DO jj = 2, jpjm1              ! Surface pressure gradient (now)
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) / e1u(ji,jj)
-               spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) / e2v(ji,jj)
+               spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) * r1_e1u(ji,jj)
+               spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) * r1_e2v(ji,jj)
             END DO 
          END DO 
@@ -211,6 +208,6 @@
       DO jj = 2, jpjm1
          DO ji = fs_2, fs_jpim1   ! vector opt.
-            spgu(ji,jj) = fse3u_a(ji,jj,1) * ua(ji,jj,1)
-            spgv(ji,jj) = fse3v_a(ji,jj,1) * va(ji,jj,1)
+            spgu(ji,jj) = e3u_a(ji,jj,1) * ua(ji,jj,1)
+            spgv(ji,jj) = e3v_a(ji,jj,1) * va(ji,jj,1)
          END DO
       END DO
@@ -218,6 +215,6 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               spgu(ji,jj) = spgu(ji,jj) + fse3u_a(ji,jj,jk) * ua(ji,jj,jk)
-               spgv(ji,jj) = spgv(ji,jj) + fse3v_a(ji,jj,jk) * va(ji,jj,jk)
+               spgu(ji,jj) = spgu(ji,jj) + e3u_a(ji,jj,jk) * ua(ji,jj,jk)
+               spgv(ji,jj) = spgv(ji,jj) + e3v_a(ji,jj,jk) * va(ji,jj,jk)
             END DO
          END DO
@@ -256,11 +253,11 @@
          ! add contribution of gradient of after barotropic transport divergence 
          IF( nbondi == -1 .OR. nbondi == 2 )   gcb(3     ,:) =   &
-            &    gcb(3     ,:) - z2dtg * z2dt * laplacu(2     ,:) * gcdprc(3     ,:) * hu(2     ,:) * e2u(2     ,:)
+            &    gcb(3     ,:) - z2dtg * z2dt * laplacu(2     ,:) * gcdprc(3     ,:) * hu_n(2     ,:) * e2u(2     ,:)
          IF( nbondi ==  1 .OR. nbondi == 2 )   gcb(nlci-2,:) =   &
-            &    gcb(nlci-2,:) + z2dtg * z2dt * laplacu(nlci-2,:) * gcdprc(nlci-2,:) * hu(nlci-2,:) * e2u(nlci-2,:)
+            &    gcb(nlci-2,:) + z2dtg * z2dt * laplacu(nlci-2,:) * gcdprc(nlci-2,:) * hu_n(nlci-2,:) * e2u(nlci-2,:)
          IF( nbondj == -1 .OR. nbondj == 2 )   gcb(:     ,3) =   &
-            &    gcb(:,3     ) - z2dtg * z2dt * laplacv(:,2     ) * gcdprc(:,3     ) * hv(:,2     ) * e1v(:,2     )
+            &    gcb(:,3     ) - z2dtg * z2dt * laplacv(:,2     ) * gcdprc(:,3     ) * hv_n(:,2     ) * e1v(:,2     )
          IF( nbondj ==  1 .OR. nbondj == 2 )   gcb(:,nlcj-2) =   &
-            &    gcb(:,nlcj-2) + z2dtg * z2dt * laplacv(:,nlcj-2) * gcdprc(:,nlcj-2) * hv(:,nlcj-2) * e1v(:,nlcj-2)
+            &    gcb(:,nlcj-2) + z2dtg * z2dt * laplacv(:,nlcj-2) * gcdprc(:,nlcj-2) * hv_n(:,nlcj-2) * e1v(:,nlcj-2)
       ENDIF
 #endif
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 5845)
@@ -75,5 +75,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -91,16 +90,15 @@
       !!----------------------------------------------------------------------
       ierr(:) = 0
-
+      !
       ALLOCATE( sshb_e(jpi,jpj), sshbb_e(jpi,jpj), &
          &      ub_e(jpi,jpj)  , vb_e(jpi,jpj)   , &
          &      ubb_e(jpi,jpj) , vbb_e(jpi,jpj)  , STAT= ierr(1) )
-
+         !
       ALLOCATE( wgtbtp1(3*nn_baro), wgtbtp2(3*nn_baro), zwz(jpi,jpj), STAT= ierr(2) )
-
+      !
       IF( ln_dynvor_een ) ALLOCATE( ftnw(jpi,jpj) , ftne(jpi,jpj) , & 
          &                          ftsw(jpi,jpj) , ftse(jpi,jpj) , STAT=ierr(3) )
-
-      dyn_spg_ts_alloc = MAXVAL(ierr(:))
-
+      !
+      dyn_spg_ts_alloc = MAXVAL( ierr(:) )
       IF( lk_mpp                )   CALL mpp_sum( dyn_spg_ts_alloc )
       IF( dyn_spg_ts_alloc /= 0 )   CALL ctl_warn('dynspg_oce_alloc: failed to allocate arrays')
@@ -138,55 +136,51 @@
       !!              Ocean Modelling, 9, 347-404. 
       !!---------------------------------------------------------------------
-      !
       INTEGER, INTENT(in)  ::   kt   ! ocean time-step index
       !
-      LOGICAL  ::   ll_fw_start			! if true, forward integration 
-      LOGICAL  ::   ll_init			    ! if true, special startup of 2d equations
-      INTEGER  ::   ji, jj, jk, jn   		! dummy loop indices
-      INTEGER  ::   ikbu, ikbv, noffset    	! local integers
-      REAL(wp) ::   zraur, z1_2dt_b, z2dt_bf  	! local scalars
+      LOGICAL  ::   ll_fw_start      ! if true, forward integration 
+      LOGICAL  ::   ll_init          ! if true, special startup of 2d equations
+      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
+      INTEGER  ::   ikbu, ikbv, noffset    	  ! local integers
+      REAL(wp) ::   zraur, z1_2dt_b, z2dt_bf   ! local scalars
       REAL(wp) ::   zx1, zy1, zx2, zy2         !   -      -
       REAL(wp) ::   z1_12, z1_8, z1_4, z1_2 	  !   -      -
       REAL(wp) ::   zu_spg, zv_spg             !   -      -
       REAL(wp) ::   zhura, zhvra         	     !   -      -
-      REAL(wp) ::   za0, za1, za2, za3		       !   -      -
-      !
-      REAL(wp), POINTER, DIMENSION(:,:) :: zun_e, zvn_e, zsshp2_e
-      REAL(wp), POINTER, DIMENSION(:,:) :: zu_trd, zv_trd, zu_frc, zv_frc, zssh_frc
-      REAL(wp), POINTER, DIMENSION(:,:) :: zu_sum, zv_sum, zwx, zwy, zhdiv
-      REAL(wp), POINTER, DIMENSION(:,:) :: zhup2_e, zhvp2_e, zhust_e, zhvst_e
-      REAL(wp), POINTER, DIMENSION(:,:) :: zsshu_a, zsshv_a
-      REAL(wp), POINTER, DIMENSION(:,:) :: zhf
+      REAL(wp) ::   za0, za1, za2, za3		     !   -      -
+      !
+      REAL(wp), POINTER, DIMENSION(:,:) ::   zun_e, zvn_e, zsshp2_e
+      REAL(wp), POINTER, DIMENSION(:,:) ::   zu_trd, zv_trd, zu_frc, zv_frc, zssh_frc
+      REAL(wp), POINTER, DIMENSION(:,:) ::   zu_sum, zv_sum, zwx, zwy, zhdiv
+      REAL(wp), POINTER, DIMENSION(:,:) ::   zhup2_e, zhvp2_e, zhust_e, zhvst_e
+      REAL(wp), POINTER, DIMENSION(:,:) ::   zsshu_a, zsshv_a
+      REAL(wp), POINTER, DIMENSION(:,:) ::   zhf
       !!----------------------------------------------------------------------
       !
       IF( nn_timing == 1 )  CALL timing_start('dyn_spg_ts')
       !
-      !                                         !* Allocate temporary arrays
-      CALL wrk_alloc( jpi, jpj, zsshp2_e, zhdiv )
-      CALL wrk_alloc( jpi, jpj, zu_trd, zv_trd, zun_e, zvn_e  )
-      CALL wrk_alloc( jpi, jpj, zwx, zwy, zu_sum, zv_sum, zssh_frc, zu_frc, zv_frc)
-      CALL wrk_alloc( jpi, jpj, zhup2_e, zhvp2_e, zhust_e, zhvst_e)
-      CALL wrk_alloc( jpi, jpj, zsshu_a, zsshv_a                                   )
-      CALL wrk_alloc( jpi, jpj, zhf )
-      !
-      !                                         !* Local constant initialization
-      z1_12 = 1._wp / 12._wp 
+      CALL wrk_alloc( jpi,jpj,   zsshp2_e, zhdiv )
+      CALL wrk_alloc( jpi,jpj,   zu_trd, zv_trd, zun_e, zvn_e  )
+      CALL wrk_alloc( jpi,jpj,   zwx, zwy, zu_sum, zv_sum, zssh_frc, zu_frc, zv_frc)
+      CALL wrk_alloc( jpi,jpj,   zhup2_e, zhvp2_e, zhust_e, zhvst_e)
+      CALL wrk_alloc( jpi,jpj,   zsshu_a, zsshv_a )
+      CALL wrk_alloc( jpi,jpj,   zhf )
+      !
+      z1_12 = 1._wp / 12._wp                 !* Local constant initialization
       z1_8  = 0.125_wp                                   
       z1_4  = 0.25_wp
       z1_2  = 0.5_wp     
       zraur = 1._wp / rau0
-      !
-      IF( kt == nit000 .AND. neuler == 0 ) THEN  	! reciprocal of baroclinic time step 
-        z2dt_bf = rdt
-      ELSE
-        z2dt_bf = 2.0_wp * rdt
+      !  	                                       ! reciprocal of baroclinic time step 
+      IF( kt == nit000 .AND. neuler == 0 ) THEN   ;   z2dt_bf =          rdt
+      ELSE                                        ;   z2dt_bf = 2.0_wp * rdt
       ENDIF
       z1_2dt_b = 1.0_wp / z2dt_bf 
       !
-      ll_init = ln_bt_av                       		! if no time averaging, then no specific restart 
+      ll_init     = ln_bt_av                       ! if no time averaging, then no specific restart 
       ll_fw_start = .FALSE.
-      !
-                                     	                ! time offset in steps for bdy data update
-      IF (.NOT.ln_bt_fw) THEN ; noffset=-2*nn_baro ; ELSE ;  noffset = 0 ; ENDIF
+      !                              	            ! time offset in steps for bdy data update
+      IF( .NOT.ln_bt_fw ) THEN   ;   noffset =-2*nn_baro
+      ELSE                       ;   noffset = 0 
+      ENDIF
       !
       IF( kt == nit000 ) THEN             	!* initialisation
@@ -197,16 +191,15 @@
          IF(lwp) WRITE(numout,*)
          !
-         IF (neuler==0) ll_init=.TRUE.
-         !
-         IF (ln_bt_fw.OR.(neuler==0)) THEN
-           ll_fw_start=.TRUE.
-           noffset = 0
+         IF( neuler == 0 )   ll_init=.TRUE.
+         !
+         IF( ln_bt_fw .OR. neuler == 0 ) THEN
+            ll_fw_start=.TRUE.
+            noffset = 0
          ELSE
-           ll_fw_start=.FALSE.
+            ll_fw_start=.FALSE.
          ENDIF
          !
          ! Set averaging weights and cycle length:
-         CALL ts_wgt(ln_bt_av, ll_fw_start, icycle, wgtbtp1, wgtbtp2)
-         !
+         CALL ts_wgt( ln_bt_av, ll_fw_start, icycle, wgtbtp1, wgtbtp2 )
          !
       ENDIF
@@ -225,6 +218,6 @@
                DO jj = 1, jpjm1
                   DO ji = 1, jpim1
-                     zwz(ji,jj) =   ( ht(ji  ,jj+1) + ht(ji+1,jj+1) +                    &
-                        &             ht(ji  ,jj  ) + ht(ji+1,jj  )   ) / 4._wp  
+                     zwz(ji,jj) =   ( ht_n(ji  ,jj+1) + ht_n(ji+1,jj+1) +                    &
+                        &             ht_n(ji  ,jj  ) + ht_n(ji+1,jj  )   ) / 4._wp  
                      IF( zwz(ji,jj) /= 0._wp )   zwz(ji,jj) = ff(ji,jj) / zwz(ji,jj)
                   END DO
@@ -233,6 +226,6 @@
                DO jj = 1, jpjm1
                   DO ji = 1, jpim1
-                     zwz(ji,jj) =   ( ht(ji  ,jj+1) + ht(ji+1,jj+1) +                     &
-                        &             ht(ji  ,jj  ) + ht(ji+1,jj  )   )                   &
+                     zwz(ji,jj) =   ( ht_n(ji  ,jj+1) + ht_n(ji+1,jj+1) +                     &
+                        &             ht_n(ji  ,jj  ) + ht_n(ji+1,jj  )   )                   &
                         &       / ( MAX( 1._wp, tmask(ji  ,jj+1, 1) + tmask(ji+1,jj+1, 1) +    &
                         &                       tmask(ji  ,jj  , 1) + tmask(ji+1,jj  , 1) ) )
@@ -276,5 +269,5 @@
             DO jk = 1, jpkm1
                DO jj = 1, jpjm1
-                  zhf(:,jj) = zhf(:,jj) + fse3f_n(:,jj,jk) * umask(:,jj,jk) * umask(:,jj+1,jk)
+                  zhf(:,jj) = zhf(:,jj) + e3f_n(:,jj,jk) * umask(:,jj,jk) * umask(:,jj+1,jk)
                END DO
             END DO
@@ -308,10 +301,10 @@
       !
       DO jk = 1, jpkm1
-         zu_frc(:,:) = zu_frc(:,:) + fse3u_n(:,:,jk) * ua(:,:,jk) * umask(:,:,jk)
-         zv_frc(:,:) = zv_frc(:,:) + fse3v_n(:,:,jk) * va(:,:,jk) * vmask(:,:,jk)         
+         zu_frc(:,:) = zu_frc(:,:) + e3u_n(:,:,jk) * ua(:,:,jk) * umask(:,:,jk)
+         zv_frc(:,:) = zv_frc(:,:) + e3v_n(:,:,jk) * va(:,:,jk) * vmask(:,:,jk)         
       END DO
       !
-      zu_frc(:,:) = zu_frc(:,:) * hur(:,:)
-      zv_frc(:,:) = zv_frc(:,:) * hvr(:,:)
+      zu_frc(:,:) = zu_frc(:,:) * r1_hu_n(:,:)
+      zv_frc(:,:) = zv_frc(:,:) * r1_hv_n(:,:)
       !
       !
@@ -327,6 +320,6 @@
       !                                   !* barotropic Coriolis trends (vorticity scheme dependent)
       !                                   ! --------------------------------------------------------
-      zwx(:,:) = un_b(:,:) * hu(:,:) * e2u(:,:)        ! now fluxes 
-      zwy(:,:) = vn_b(:,:) * hv(:,:) * e1v(:,:)
+      zwx(:,:) = un_b(:,:) * hu_n(:,:) * e2u(:,:)        ! now fluxes 
+      zwy(:,:) = vn_b(:,:) * hv_n(:,:) * e1v(:,:)
       !
       IF( ln_dynvor_ene .OR. ln_dynvor_mix ) THEN      ! energy conserving or mixed scheme
@@ -411,13 +404,13 @@
       !
       ! Note that the "unclipped" bottom friction parameter is used even with explicit drag
-      zu_frc(:,:) = zu_frc(:,:) + hur(:,:) * bfrua(:,:) * zwx(:,:)
-      zv_frc(:,:) = zv_frc(:,:) + hvr(:,:) * bfrva(:,:) * zwy(:,:)
+      zu_frc(:,:) = zu_frc(:,:) + r1_hu_n(:,:) * bfrua(:,:) * zwx(:,:)
+      zv_frc(:,:) = zv_frc(:,:) + r1_hv_n(:,:) * bfrva(:,:) * zwy(:,:)
       !       
       IF (ln_bt_fw) THEN                        ! Add wind forcing
-         zu_frc(:,:) =  zu_frc(:,:) + zraur * utau(:,:) * hur(:,:)
-         zv_frc(:,:) =  zv_frc(:,:) + zraur * vtau(:,:) * hvr(:,:)
+         zu_frc(:,:) =  zu_frc(:,:) + zraur * utau(:,:) * r1_hu_n(:,:)
+         zv_frc(:,:) =  zv_frc(:,:) + zraur * vtau(:,:) * r1_hv_n(:,:)
       ELSE
-         zu_frc(:,:) =  zu_frc(:,:) + zraur * z1_2 * ( utau_b(:,:) + utau(:,:) ) * hur(:,:)
-         zv_frc(:,:) =  zv_frc(:,:) + zraur * z1_2 * ( vtau_b(:,:) + vtau(:,:) ) * hvr(:,:)
+         zu_frc(:,:) =  zu_frc(:,:) + zraur * z1_2 * ( utau_b(:,:) + utau(:,:) ) * r1_hu_n(:,:)
+         zv_frc(:,:) =  zv_frc(:,:) + zraur * z1_2 * ( vtau_b(:,:) + vtau(:,:) ) * r1_hv_n(:,:)
       ENDIF  
       !
@@ -484,21 +477,21 @@
       !
       IF (ln_bt_fw) THEN                  ! FORWARD integration: start from NOW fields                    
-         sshn_e(:,:) = sshn (:,:)            
-         zun_e (:,:) = un_b (:,:)            
-         zvn_e (:,:) = vn_b (:,:)
-         !
-         hu_e  (:,:) = hu   (:,:)       
-         hv_e  (:,:) = hv   (:,:) 
-         hur_e (:,:) = hur  (:,:)    
-         hvr_e (:,:) = hvr  (:,:)
+         sshn_e(:,:) = sshn(:,:)            
+         zun_e (:,:) = un_b(:,:)            
+         zvn_e (:,:) = vn_b(:,:)
+         !
+         hu_e  (:,:) =    hu_n(:,:)       
+         hv_e  (:,:) =    hv_n(:,:) 
+         hur_e (:,:) = r1_hu_n(:,:)    
+         hvr_e (:,:) = r1_hv_n(:,:)
       ELSE                                ! CENTRED integration: start from BEFORE fields
-         sshn_e(:,:) = sshb (:,:)
-         zun_e (:,:) = ub_b (:,:)         
-         zvn_e (:,:) = vb_b (:,:)
-         !
-         hu_e  (:,:) = hu_b (:,:)       
-         hv_e  (:,:) = hv_b (:,:) 
-         hur_e (:,:) = hur_b(:,:)    
-         hvr_e (:,:) = hvr_b(:,:)
+         sshn_e(:,:) = sshb(:,:)
+         zun_e (:,:) = ub_b(:,:)         
+         zvn_e (:,:) = vb_b(:,:)
+         !
+         hu_e  (:,:) =    hu_b(:,:)       
+         hv_e  (:,:) =    hv_b(:,:) 
+         hur_e (:,:) = r1_hu_b(:,:)    
+         hvr_e (:,:) = r1_hv_b(:,:)
       ENDIF
       !
@@ -519,5 +512,5 @@
 #if defined key_tide
          IF ( lk_bdy .AND. lk_tide )      CALL bdy_dta_tides( kt, kit=jn, time_offset=(noffset+1) )
-         IF ( ln_tide_pot .AND. lk_tide ) CALL upd_tide( kt, kit=jn, koffset=noffset )
+         IF ( ln_tide_pot .AND. lk_tide ) CALL upd_tide     ( kt, kit=jn, koffset=noffset )
 #endif
          !
@@ -557,6 +550,6 @@
             zhvp2_e (:,:) = hv_0(:,:) + zwy(:,:)
          ELSE
-            zhup2_e (:,:) = hu(:,:)
-            zhvp2_e (:,:) = hv(:,:)
+            zhup2_e (:,:) = hu_n(:,:)
+            zhvp2_e (:,:) = hv_n(:,:)
          ENDIF
          !                                                !* after ssh
@@ -775,5 +768,5 @@
                             &     + rdtbt * ( zhust_e(ji,jj)  *    zwx(ji,jj)   & 
                             &               + zhup2_e(ji,jj)  * zu_trd(ji,jj)   &
-                            &               +      hu(ji,jj)  * zu_frc(ji,jj) ) &
+                            &               +    hu_n(ji,jj)  * zu_frc(ji,jj) ) &
                             &   ) * zhura
 
@@ -781,5 +774,5 @@
                             &     + rdtbt * ( zhvst_e(ji,jj)  *    zwy(ji,jj)   &
                             &               + zhvp2_e(ji,jj)  * zv_trd(ji,jj)   &
-                            &               +      hv(ji,jj)  * zv_frc(ji,jj) ) &
+                            &               +    hv_n(ji,jj)  * zv_frc(ji,jj) ) &
                             &   ) * zhvra
                END DO
@@ -857,13 +850,13 @@
       !
       ! Set advection velocity correction:
-      IF (((kt==nit000).AND.(neuler==0)).OR.(.NOT.ln_bt_fw)) THEN     
-         un_adv(:,:) = zu_sum(:,:)*hur(:,:)
-         vn_adv(:,:) = zv_sum(:,:)*hvr(:,:)
+      IF( ( kt == nit000 .AND. neuler==0 ) .OR. .NOT.ln_bt_fw ) THEN     
+         un_adv(:,:) = zu_sum(:,:) * r1_hu_n(:,:)
+         vn_adv(:,:) = zv_sum(:,:) * r1_hv_n(:,:)
       ELSE
-         un_adv(:,:) = z1_2 * ( ub2_b(:,:) + zu_sum(:,:)) * hur(:,:)
-         vn_adv(:,:) = z1_2 * ( vb2_b(:,:) + zv_sum(:,:)) * hvr(:,:)
+         un_adv(:,:) = z1_2 * ( ub2_b(:,:) + zu_sum(:,:) ) * r1_hu_n(:,:)
+         vn_adv(:,:) = z1_2 * ( vb2_b(:,:) + zv_sum(:,:) ) * r1_hv_n(:,:)
       END IF
 
-      IF (ln_bt_fw) THEN ! Save integrated transport for next computation
+      IF( ln_bt_fw ) THEN ! Save integrated transport for next computation
          ub2_b(:,:) = zu_sum(:,:)
          vb2_b(:,:) = zv_sum(:,:)
@@ -871,5 +864,5 @@
       !
       ! Update barotropic trend:
-      IF (( ln_dynadv_vec ).OR. (.NOT. lk_vvl)) THEN
+      IF( ln_dynadv_vec .OR. .NOT.lk_vvl ) THEN
          DO jk=1,jpkm1
             ua(:,:,jk) = ua(:,:,jk) + ( ua_b(:,:) - ub_b(:,:) ) * z1_2dt_b
@@ -878,16 +871,16 @@
       ELSE
          DO jk=1,jpkm1
-            ua(:,:,jk) = ua(:,:,jk) + hur(:,:) * ( ua_b(:,:) - ub_b(:,:) * hu_b(:,:) ) * z1_2dt_b
-            va(:,:,jk) = va(:,:,jk) + hvr(:,:) * ( va_b(:,:) - vb_b(:,:) * hv_b(:,:) ) * z1_2dt_b
+            ua(:,:,jk) = ua(:,:,jk) + r1_hu_n(:,:) * ( ua_b(:,:) - ub_b(:,:) * hu_b(:,:) ) * z1_2dt_b
+            va(:,:,jk) = va(:,:,jk) + r1_hv_n(:,:) * ( va_b(:,:) - vb_b(:,:) * hv_b(:,:) ) * z1_2dt_b
          END DO
          ! Save barotropic velocities not transport:
-         ua_b  (:,:) =  ua_b(:,:) / ( hu_0(:,:) + zsshu_a(:,:) + 1._wp - umask(:,:,1) )
-         va_b  (:,:) =  va_b(:,:) / ( hv_0(:,:) + zsshv_a(:,:) + 1._wp - vmask(:,:,1) )
+         ua_b(:,:) =  ua_b(:,:) / ( hu_0(:,:) + zsshu_a(:,:) + 1._wp - umask(:,:,1) )
+         va_b(:,:) =  va_b(:,:) / ( hv_0(:,:) + zsshv_a(:,:) + 1._wp - vmask(:,:,1) )
       ENDIF
       !
       DO jk = 1, jpkm1
          ! Correct velocities:
-         un(:,:,jk) = ( un(:,:,jk) + un_adv(:,:) - un_b(:,:) )*umask(:,:,jk)
-         vn(:,:,jk) = ( vn(:,:,jk) + vn_adv(:,:) - vn_b(:,:) )*vmask(:,:,jk)
+         un(:,:,jk) = ( un(:,:,jk) + un_adv(:,:) - un_b(:,:) ) * umask(:,:,jk)
+         vn(:,:,jk) = ( vn(:,:,jk) + vn_adv(:,:) - vn_b(:,:) ) * vmask(:,:,jk)
          !
       END DO
@@ -897,8 +890,8 @@
       ! (used to update coarse grid transports at next time step)
       !
-      IF ( (.NOT.Agrif_Root()).AND.(ln_bt_fw) ) THEN
-         IF ( Agrif_NbStepint().EQ.0 ) THEN
-            ub2_i_b(:,:) = 0.e0
-            vb2_i_b(:,:) = 0.e0
+      IF( .NOT.Agrif_Root() .AND. ln_bt_fw ) THEN
+         IF( Agrif_NbStepint() == 0 ) THEN
+            ub2_i_b(:,:) = 0._wp
+            vb2_i_b(:,:) = 0._wp
          END IF
          !
@@ -912,16 +905,17 @@
       !
       !                                   !* write time-spliting arrays in the restart
-      IF(lrst_oce .AND.ln_bt_fw)   CALL ts_rst( kt, 'WRITE' )
-      !
-      CALL wrk_dealloc( jpi, jpj, zsshp2_e, zhdiv )
-      CALL wrk_dealloc( jpi, jpj, zu_trd, zv_trd, zun_e, zvn_e )
-      CALL wrk_dealloc( jpi, jpj, zwx, zwy, zu_sum, zv_sum, zssh_frc, zu_frc, zv_frc )
-      CALL wrk_dealloc( jpi, jpj, zhup2_e, zhvp2_e, zhust_e, zhvst_e )
-      CALL wrk_dealloc( jpi, jpj, zsshu_a, zsshv_a                                   )
-      CALL wrk_dealloc( jpi, jpj, zhf )
+      IF( lrst_oce .AND.ln_bt_fw )   CALL ts_rst( kt, 'WRITE' )
+      !
+      CALL wrk_dealloc( jpi,jpj,   zsshp2_e, zhdiv )
+      CALL wrk_dealloc( jpi,jpj,   zu_trd, zv_trd, zun_e, zvn_e )
+      CALL wrk_dealloc( jpi,jpj,   zwx, zwy, zu_sum, zv_sum, zssh_frc, zu_frc, zv_frc )
+      CALL wrk_dealloc( jpi,jpj,   zhup2_e, zhvp2_e, zhust_e, zhvst_e )
+      CALL wrk_dealloc( jpi,jpj,   zsshu_a, zsshv_a )
+      CALL wrk_dealloc( jpi,jpj,   zhf )
       !
       IF( nn_timing == 1 )  CALL timing_stop('dyn_spg_ts')
       !
    END SUBROUTINE dyn_spg_ts
+
 
    SUBROUTINE ts_wgt( ll_av, ll_fw, jpit, zwgt1, zwgt2)
@@ -1094,9 +1088,11 @@
          END DO
       ELSE
+!!gm  BUG ??  restartability issue if ssh changes are large....
+!!gm          We should just test this with ht_0 only, no?
          DO jj = 1, jpj
             DO ji =1, jpi
                zxr2 = r1_e1t(ji,jj) * r1_e1t(ji,jj)
                zyr2 = r1_e1t(ji,jj) * r1_e1t(ji,jj)
-               zcu(ji,jj) = SQRT( grav * ht(ji,jj) * (zxr2 + zyr2) )
+               zcu(ji,jj) = SQRT( grav * ht_n(ji,jj) * (zxr2 + zyr2) )
             END DO
          END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 5845)
@@ -75,5 +75,4 @@
    
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -284,7 +283,7 @@
 
          IF( ln_sco ) THEN
-            zwz(:,:) = zwz(:,:) / fse3f(:,:,jk)
-            zwx(:,:) = e2u(:,:) * fse3u(:,:,jk) * un(:,:,jk)
-            zwy(:,:) = e1v(:,:) * fse3v(:,:,jk) * vn(:,:,jk)
+            zwz(:,:) = zwz(:,:) / e3f_n(:,:,jk)
+            zwx(:,:) = e2u(:,:) * e3u_n(:,:,jk) * un(:,:,jk)
+            zwy(:,:) = e1v(:,:) * e3v_n(:,:,jk) * vn(:,:,jk)
          ELSE
             zwx(:,:) = e2u(:,:) * un(:,:,jk)
@@ -404,7 +403,7 @@
          !
          IF( ln_sco ) THEN                   !==  horizontal fluxes  ==!
-            zwz(:,:) = zwz(:,:) / fse3f(:,:,jk)
-            zwx(:,:) = e2u(:,:) * fse3u(:,:,jk) * un(:,:,jk)
-            zwy(:,:) = e1v(:,:) * fse3v(:,:,jk) * vn(:,:,jk)
+            zwz(:,:) = zwz(:,:) / e3f_n(:,:,jk)
+            zwx(:,:) = e2u(:,:) * e3u_n(:,:,jk) * un(:,:,jk)
+            zwy(:,:) = e1v(:,:) * e3v_n(:,:,jk) * vn(:,:,jk)
          ELSE
             zwx(:,:) = e2u(:,:) * un(:,:,jk)
@@ -415,7 +414,7 @@
             DO ji = fs_2, fs_jpim1   ! vector opt.
                zuav = r1_8 * r1_e1u(ji,jj) * ( zwy(ji  ,jj-1) + zwy(ji+1,jj-1)   &
-                  &                       + zwy(ji  ,jj  ) + zwy(ji+1,jj  ) )
+                  &                          + zwy(ji  ,jj  ) + zwy(ji+1,jj  ) )
                zvau =-r1_8 * r1_e2v(ji,jj) * ( zwx(ji-1,jj  ) + zwx(ji-1,jj+1)   &
-                  &                       + zwx(ji  ,jj  ) + zwx(ji  ,jj+1) )
+                  &                          + zwx(ji  ,jj  ) + zwx(ji  ,jj+1) )
                pua(ji,jj,jk) = pua(ji,jj,jk) + zuav * ( zwz(ji  ,jj-1) + zwz(ji,jj) )
                pva(ji,jj,jk) = pva(ji,jj,jk) + zvau * ( zwz(ji-1,jj  ) + zwz(ji,jj) )
@@ -482,6 +481,6 @@
             DO jj = 1, jpjm1
                DO ji = 1, fs_jpim1   ! vector opt.
-                  ze3  = ( fse3t(ji,jj+1,jk)*tmask(ji,jj+1,jk) + fse3t(ji+1,jj+1,jk)*tmask(ji+1,jj+1,jk)   &
-                     &   + fse3t(ji,jj  ,jk)*tmask(ji,jj  ,jk) + fse3t(ji+1,jj  ,jk)*tmask(ji+1,jj  ,jk) )
+                  ze3  = ( e3t_n(ji,jj+1,jk)*tmask(ji,jj+1,jk) + e3t_n(ji+1,jj+1,jk)*tmask(ji+1,jj+1,jk)   &
+                     &   + e3t_n(ji,jj  ,jk)*tmask(ji,jj  ,jk) + e3t_n(ji+1,jj  ,jk)*tmask(ji+1,jj  ,jk) )
                   IF( ze3 /= 0._wp ) THEN   ;   z1_e3f(ji,jj) = 4.0_wp / ze3
                   ELSE                      ;   z1_e3f(ji,jj) = 0.0_wp
@@ -492,6 +491,6 @@
             DO jj = 1, jpjm1
                DO ji = 1, fs_jpim1   ! vector opt.
-                  ze3  = ( fse3t(ji,jj+1,jk)*tmask(ji,jj+1,jk) + fse3t(ji+1,jj+1,jk)*tmask(ji+1,jj+1,jk)   &
-                     &   + fse3t(ji,jj  ,jk)*tmask(ji,jj  ,jk) + fse3t(ji+1,jj  ,jk)*tmask(ji+1,jj  ,jk) )
+                  ze3  = ( e3t_n(ji,jj+1,jk)*tmask(ji,jj+1,jk) + e3t_n(ji+1,jj+1,jk)*tmask(ji+1,jj+1,jk)   &
+                     &   + e3t_n(ji,jj  ,jk)*tmask(ji,jj  ,jk) + e3t_n(ji+1,jj  ,jk)*tmask(ji+1,jj  ,jk) )
                   zmsk = (                   tmask(ji,jj+1,jk) +                     tmask(ji+1,jj+1,jk)   &
                      &                     + tmask(ji,jj  ,jk) +                     tmask(ji+1,jj  ,jk) )
@@ -558,6 +557,6 @@
          !
          !                                   !==  horizontal fluxes  ==!
-         zwx(:,:) = e2u(:,:) * fse3u(:,:,jk) * un(:,:,jk)
-         zwy(:,:) = e1v(:,:) * fse3v(:,:,jk) * vn(:,:,jk)
+         zwx(:,:) = e2u(:,:) * e3u_n(:,:,jk) * un(:,:,jk)
+         zwy(:,:) = e1v(:,:) * e3v_n(:,:,jk) * vn(:,:,jk)
 
          !                                   !==  compute and add the vorticity term trend  =!
@@ -633,5 +632,5 @@
          WRITE(numout,*) '           enstrophy and energy conserving scheme         ln_dynvor_een = ', ln_dynvor_een
          WRITE(numout,*) '              e3f = averaging /4 (=0) or /sum(tmask) (=1)    nn_een_e3f = ', nn_een_e3f
-         WRITE(numout,*) '           masked (=1) or unmasked(=0) vorticity          ln_dynvor_msk = ', ln_dynvor_msk
+         WRITE(numout,*) '           masked (=T) or unmasked(=F) vorticity          ln_dynvor_msk = ', ln_dynvor_msk
       ENDIF
 
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90	(revision 5845)
@@ -32,5 +32,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -121,6 +120,6 @@
             DO ji = fs_2, fs_jpim1       ! vector opt.
                !                         ! vertical momentum advective trends
-               zua = - ( zwuw(ji,jj,jk) + zwuw(ji,jj,jk+1) ) / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
-               zva = - ( zwvw(ji,jj,jk) + zwvw(ji,jj,jk+1) ) / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
+               zua = - ( zwuw(ji,jj,jk) + zwuw(ji,jj,jk+1) ) / ( e1e2u(ji,jj) * e3u_n(ji,jj,jk) )
+               zva = - ( zwvw(ji,jj,jk) + zwvw(ji,jj,jk+1) ) / ( e1e2v(ji,jj) * e3v_n(ji,jj,jk) )
                !                         ! add the trends to the general momentum trends
                ua(ji,jj,jk) = ua(ji,jj,jk) + zua
@@ -252,6 +251,6 @@
                DO ji = fs_2, fs_jpim1       ! vector opt.
                   !                         ! vertical momentum advective trends
-                  zua = - ( zwuw(ji,jj,jk) + zwuw(ji,jj,jk+1) ) / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
-                  zva = - ( zwvw(ji,jj,jk) + zwvw(ji,jj,jk+1) ) / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
+                  zua = - ( zwuw(ji,jj,jk) + zwuw(ji,jj,jk+1) ) / ( e1e2u(ji,jj) * e3u_n(ji,jj,jk) )
+                  zva = - ( zwvw(ji,jj,jk) + zwvw(ji,jj,jk+1) ) / ( e1e2v(ji,jj) * e3v_n(ji,jj,jk) )
                   zus(ji,jj,jk,jta) = zus(ji,jj,jk,jtb) + zua * zts
                   zvs(ji,jj,jk,jta) = zvs(ji,jj,jk,jtb) + zva * zts
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90	(revision 5845)
@@ -37,6 +37,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
-#  include "zdfddm_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90	(revision 5845)
@@ -32,5 +32,4 @@
    
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -98,6 +97,6 @@
             DO jj = 2, jpjm1 
                DO ji = 2, jpim1
-                  zwy(ji,jj,jk) = avmu(ji,jj,jk) * ( zwx(ji,jj,jk-1) - zwx(ji,jj,jk) ) / fse3uw(ji,jj,jk) 
-                  zww(ji,jj,jk) = avmv(ji,jj,jk) * ( zwz(ji,jj,jk-1) - zwz(ji,jj,jk) ) / fse3vw(ji,jj,jk)
+                  zwy(ji,jj,jk) = avmu(ji,jj,jk) * ( zwx(ji,jj,jk-1) - zwx(ji,jj,jk) ) / e3uw_n(ji,jj,jk) 
+                  zww(ji,jj,jk) = avmv(ji,jj,jk) * ( zwz(ji,jj,jk-1) - zwz(ji,jj,jk) ) / e3vw_n(ji,jj,jk)
                END DO  
             END DO  
@@ -106,6 +105,6 @@
             DO jj = 2, jpjm1 
                DO ji = 2, jpim1
-                  zua = zlavmr * ( zwy(ji,jj,jk) - zwy(ji,jj,jk+1) ) / fse3u(ji,jj,jk)
-                  zva = zlavmr * ( zww(ji,jj,jk) - zww(ji,jj,jk+1) ) / fse3v(ji,jj,jk)
+                  zua = zlavmr * ( zwy(ji,jj,jk) - zwy(ji,jj,jk+1) ) / e3u_n(ji,jj,jk)
+                  zva = zlavmr * ( zww(ji,jj,jk) - zww(ji,jj,jk+1) ) / e3v_n(ji,jj,jk)
                   ua(ji,jj,jk) = ua(ji,jj,jk) + zua
                   va(ji,jj,jk) = va(ji,jj,jk) + zva
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 5845)
@@ -36,5 +36,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -103,6 +102,6 @@
                ikbu = mbku(ji,jj)       ! ocean bottom level at u- and v-points 
                ikbv = mbkv(ji,jj)       ! (deepest ocean u- and v-points)
-               avmu(ji,jj,ikbu+1) = -bfrua(ji,jj) * fse3uw(ji,jj,ikbu+1)
-               avmv(ji,jj,ikbv+1) = -bfrva(ji,jj) * fse3vw(ji,jj,ikbv+1)
+               avmu(ji,jj,ikbu+1) = -bfrua(ji,jj) * e3uw_n(ji,jj,ikbu+1)
+               avmv(ji,jj,ikbv+1) = -bfrva(ji,jj) * e3vw_n(ji,jj,ikbv+1)
             END DO
          END DO
@@ -112,6 +111,6 @@
                   ikbu = miku(ji,jj)       ! ocean top level at u- and v-points 
                   ikbv = mikv(ji,jj)       ! (first wet ocean u- and v-points)
-                  IF (ikbu .GE. 2) avmu(ji,jj,ikbu) = -tfrua(ji,jj) * fse3uw(ji,jj,ikbu)
-                  IF (ikbv .GE. 2) avmv(ji,jj,ikbv) = -tfrva(ji,jj) * fse3vw(ji,jj,ikbv)
+                  IF (ikbu .GE. 2) avmu(ji,jj,ikbu) = -tfrua(ji,jj) * e3uw_n(ji,jj,ikbu)
+                  IF (ikbv .GE. 2) avmv(ji,jj,ikbv) = -tfrva(ji,jj) * e3vw_n(ji,jj,ikbv)
                END DO
             END DO
@@ -127,10 +126,10 @@
       ELSE                                            ! applied on thickness weighted velocity
          DO jk = 1, jpkm1
-            ua(:,:,jk) = (          ub(:,:,jk) * fse3u_b(:,:,jk)      &
-               &           + p2dt * ua(:,:,jk) * fse3u_n(:,:,jk)  )   &
-               &                               / fse3u_a(:,:,jk) * umask(:,:,jk)
-            va(:,:,jk) = (          vb(:,:,jk) * fse3v_b(:,:,jk)      &
-               &           + p2dt * va(:,:,jk) * fse3v_n(:,:,jk)  )   &
-               &                               / fse3v_a(:,:,jk) * vmask(:,:,jk)
+            ua(:,:,jk) = (          ub(:,:,jk) * e3u_b(:,:,jk)      &
+               &           + p2dt * ua(:,:,jk) * e3u_n(:,:,jk)  )   &
+               &                               / e3u_a(:,:,jk) * umask(:,:,jk)
+            va(:,:,jk) = (          vb(:,:,jk) * e3v_b(:,:,jk)      &
+               &           + p2dt * va(:,:,jk) * e3v_n(:,:,jk)  )   &
+               &                               / e3v_a(:,:,jk) * vmask(:,:,jk)
          END DO
       ENDIF
@@ -147,6 +146,6 @@
                ikbu = mbku(ji,jj)         ! ocean bottom level at u- and v-points 
                ikbv = mbkv(ji,jj)         ! (deepest ocean u- and v-points)
-               ze3ua =  ( 1._wp - r_vvl ) * fse3u_n(ji,jj,ikbu) + r_vvl   * fse3u_a(ji,jj,ikbu)
-               ze3va =  ( 1._wp - r_vvl ) * fse3v_n(ji,jj,ikbv) + r_vvl   * fse3v_a(ji,jj,ikbv)
+               ze3ua =  ( 1._wp - r_vvl ) * e3u_n(ji,jj,ikbu) + r_vvl   * e3u_a(ji,jj,ikbu)
+               ze3va =  ( 1._wp - r_vvl ) * e3v_n(ji,jj,ikbv) + r_vvl   * e3v_a(ji,jj,ikbv)
                ua(ji,jj,ikbu) = ua(ji,jj,ikbu) + p2dt * bfrua(ji,jj) * ua_b(ji,jj) / ze3ua
                va(ji,jj,ikbv) = va(ji,jj,ikbv) + p2dt * bfrva(ji,jj) * va_b(ji,jj) / ze3va
@@ -158,6 +157,6 @@
                   ikbu = miku(ji,jj)         ! top ocean level at u- and v-points 
                   ikbv = mikv(ji,jj)         ! (first wet ocean u- and v-points)
-                  ze3ua =  ( 1._wp - r_vvl ) * fse3u_n(ji,jj,ikbu) + r_vvl   * fse3u_a(ji,jj,ikbu)
-                  ze3va =  ( 1._wp - r_vvl ) * fse3v_n(ji,jj,ikbv) + r_vvl   * fse3v_a(ji,jj,ikbv)
+                  ze3ua =  ( 1._wp - r_vvl ) * e3u_n(ji,jj,ikbu) + r_vvl   * e3u_a(ji,jj,ikbu)
+                  ze3va =  ( 1._wp - r_vvl ) * e3v_n(ji,jj,ikbv) + r_vvl   * e3v_a(ji,jj,ikbv)
                   ua(ji,jj,ikbu) = ua(ji,jj,ikbu) + p2dt * tfrua(ji,jj) * ua_b(ji,jj) / ze3ua
                   va(ji,jj,ikbv) = va(ji,jj,ikbv) + p2dt * tfrva(ji,jj) * va_b(ji,jj) / ze3va
@@ -177,9 +176,9 @@
          DO jj = 2, jpjm1 
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               ze3ua =  ( 1._wp - r_vvl ) * fse3u_n(ji,jj,jk) + r_vvl   * fse3u_a(ji,jj,jk)   ! after scale factor at T-point
+               ze3ua =  ( 1._wp - r_vvl ) * e3u_n(ji,jj,jk) + r_vvl   * e3u_a(ji,jj,jk)   ! after scale factor at T-point
                zcoef = - p2dt / ze3ua      
-               zzwi          = zcoef * avmu  (ji,jj,jk  ) / fse3uw(ji,jj,jk  )
+               zzwi          = zcoef * avmu  (ji,jj,jk  ) / e3uw_n(ji,jj,jk  )
                zwi(ji,jj,jk) = zzwi  * wumask(ji,jj,jk  )
-               zzws          = zcoef * avmu  (ji,jj,jk+1) / fse3uw(ji,jj,jk+1) 
+               zzws          = zcoef * avmu  (ji,jj,jk+1) / e3uw_n(ji,jj,jk+1) 
                zws(ji,jj,jk) = zzws  * wumask(ji,jj,jk+1)
                zwd(ji,jj,jk) = 1._wp - zzwi - zzws
@@ -220,5 +219,5 @@
          DO ji = fs_2, fs_jpim1   ! vector opt.
 #if defined key_dynspg_ts
-            ze3ua =  ( 1._wp - r_vvl ) * fse3u_n(ji,jj,1) + r_vvl   * fse3u_a(ji,jj,1) 
+            ze3ua =  ( 1._wp - r_vvl ) * e3u_n(ji,jj,1) + r_vvl   * e3u_a(ji,jj,1) 
             ua(ji,jj,1) = ua(ji,jj,1) + p2dt * 0.5_wp * ( utau_b(ji,jj) + utau(ji,jj) )   &
                &                                      / ( ze3ua * rau0 ) * umask(ji,jj,1) 
@@ -226,5 +225,5 @@
             ua(ji,jj,1) = ub(ji,jj,1) &
                &                   + p2dt *(ua(ji,jj,1) +  0.5_wp * ( utau_b(ji,jj) + utau(ji,jj) )   &
-               &                                      / ( fse3u(ji,jj,1) * rau0     ) * umask(ji,jj,1) ) 
+               &                                      / ( e3u_n(ji,jj,1) * rau0     ) * umask(ji,jj,1) ) 
 #endif
          END DO
@@ -276,9 +275,9 @@
          DO jj = 2, jpjm1   
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               ze3va =  ( 1._wp - r_vvl ) * fse3v_n(ji,jj,jk)  + r_vvl * fse3v_a(ji,jj,jk)   ! after scale factor at T-point
+               ze3va =  ( 1._wp - r_vvl ) * e3v_n(ji,jj,jk)  + r_vvl * e3v_a(ji,jj,jk)   ! after scale factor at T-point
                zcoef = - p2dt / ze3va
-               zzwi          = zcoef * avmv (ji,jj,jk  ) / fse3vw(ji,jj,jk  )
+               zzwi          = zcoef * avmv (ji,jj,jk  ) / e3vw_n(ji,jj,jk  )
                zwi(ji,jj,jk) =  zzwi * wvmask(ji,jj,jk)
-               zzws          = zcoef * avmv (ji,jj,jk+1) / fse3vw(ji,jj,jk+1)
+               zzws          = zcoef * avmv (ji,jj,jk+1) / e3vw_n(ji,jj,jk+1)
                zws(ji,jj,jk) =  zzws * wvmask(ji,jj,jk+1)
                zwd(ji,jj,jk) = 1._wp - zzwi - zzws
@@ -319,5 +318,5 @@
          DO ji = fs_2, fs_jpim1   ! vector opt.
 #if defined key_dynspg_ts            
-            ze3va =  ( 1._wp - r_vvl ) * fse3v_n(ji,jj,1) + r_vvl   * fse3v_a(ji,jj,1) 
+            ze3va =  ( 1._wp - r_vvl ) * e3v_n(ji,jj,1) + r_vvl   * e3v_a(ji,jj,1) 
             va(ji,jj,1) = va(ji,jj,1) + p2dt * 0.5_wp * ( vtau_b(ji,jj) + vtau(ji,jj) )   &
                &                                      / ( ze3va * rau0 ) 
@@ -325,5 +324,5 @@
             va(ji,jj,1) = vb(ji,jj,1) &
                &                   + p2dt *(va(ji,jj,1) +  0.5_wp * ( vtau_b(ji,jj) + vtau(ji,jj) )   &
-               &                                                       / ( fse3v(ji,jj,1) * rau0     )  )
+               &                                                       / ( e3v_n(ji,jj,1) * rau0     )  )
 #endif
          END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 5845)
@@ -47,5 +47,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -97,5 +96,5 @@
       zhdiv(:,:) = 0._wp
       DO jk = 1, jpkm1                                 ! Horizontal divergence of barotropic transports
-        zhdiv(:,:) = zhdiv(:,:) + fse3t_n(:,:,jk) * hdivn(:,:,jk)
+        zhdiv(:,:) = zhdiv(:,:) + e3t_n(:,:,jk) * hdivn(:,:,jk)
       END DO
       !                                                ! Sea surface elevation time stepping
@@ -194,6 +193,6 @@
          DO jk = jpkm1, 1, -1                       ! integrate from the bottom the hor. divergence
             ! computation of w
-            wn(:,:,jk) = wn(:,:,jk+1) - (   fse3t_n(:,:,jk) * hdivn(:,:,jk) + zhdiv(:,:,jk)                    &
-               &                          + z1_2dt * ( fse3t_a(:,:,jk) - fse3t_b(:,:,jk) ) ) * tmask(:,:,jk)
+            wn(:,:,jk) = wn(:,:,jk+1) - (   e3t_n(:,:,jk) * hdivn(:,:,jk) + zhdiv(:,:,jk)                    &
+               &                          + z1_2dt * ( e3t_a(:,:,jk) - e3t_b(:,:,jk) ) ) * tmask(:,:,jk)
          END DO
          !          IF( ln_vvl_layer ) wn(:,:,:) = 0.e0
@@ -202,6 +201,6 @@
          DO jk = jpkm1, 1, -1                       ! integrate from the bottom the hor. divergence
             ! computation of w
-            wn(:,:,jk) = wn(:,:,jk+1) - (   fse3t_n(:,:,jk) * hdivn(:,:,jk)                                   &
-               &                          + z1_2dt * ( fse3t_a(:,:,jk) - fse3t_b(:,:,jk) ) ) * tmask(:,:,jk)
+            wn(:,:,jk) = wn(:,:,jk+1) - (   e3t_n(:,:,jk) * hdivn(:,:,jk)                                   &
+               &                          + z1_2dt * ( e3t_a(:,:,jk) - e3t_b(:,:,jk) ) ) * tmask(:,:,jk)
          END DO
       ENDIF
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/FLO/flo4rk.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/FLO/flo4rk.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/FLO/flo4rk.F90	(revision 5845)
@@ -29,6 +29,4 @@
    REAL(wp), DIMENSION (3) ::   scoef1 = (/  0.5  ,  0.5  ,  1.0  /)           !
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -436,5 +434,5 @@
                      &   ( tcoef1(ki) * wb(iidw(jfl,jind1),ijdw(jfl,jind2),ikdw(jfl,jind3))+   &
                      &     tcoef2(ki) * wn(iidw(jfl,jind1),ijdw(jfl,jind2),ikdw(jfl,jind3)) )  &
-                     &   / fse3w(iidw(jfl,jind1),ijdw(jfl,jind2),ikdw(jfl,jind3))
+                     &   / e3w_n(iidw(jfl,jind1),ijdw(jfl,jind2),ikdw(jfl,jind3))
                END DO
             END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/FLO/floblk.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/FLO/floblk.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/FLO/floblk.F90	(revision 5845)
@@ -23,6 +23,4 @@
    PUBLIC   flo_blk    ! routine called by floats.F90
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -118,13 +116,13 @@
             
             ! compute the transport across the mesh where the float is.            
-!!bug (gm) change e3t into fse3. but never checked 
-            zsurfx(1) = e2u(iiloc(jfl)-1,ijloc(jfl)  ) * fse3u(iiloc(jfl)-1,ijloc(jfl)  ,-ikl(jfl))
-            zsurfx(2) = e2u(iiloc(jfl)  ,ijloc(jfl)  ) * fse3u(iiloc(jfl)  ,ijloc(jfl)  ,-ikl(jfl))
-            zsurfy(1) = e1v(iiloc(jfl)  ,ijloc(jfl)-1) * fse3v(iiloc(jfl)  ,ijloc(jfl)-1,-ikl(jfl))
-            zsurfy(2) = e1v(iiloc(jfl)  ,ijloc(jfl)  ) * fse3v(iiloc(jfl)  ,ijloc(jfl)  ,-ikl(jfl))
+!!bug (gm) change e3t into e3. but never checked 
+            zsurfx(1) = e2u(iiloc(jfl)-1,ijloc(jfl)  ) * e3u_n(iiloc(jfl)-1,ijloc(jfl)  ,-ikl(jfl))
+            zsurfx(2) = e2u(iiloc(jfl)  ,ijloc(jfl)  ) * e3u_n(iiloc(jfl)  ,ijloc(jfl)  ,-ikl(jfl))
+            zsurfy(1) = e1v(iiloc(jfl)  ,ijloc(jfl)-1) * e3v_n(iiloc(jfl)  ,ijloc(jfl)-1,-ikl(jfl))
+            zsurfy(2) = e1v(iiloc(jfl)  ,ijloc(jfl)  ) * e3v_n(iiloc(jfl)  ,ijloc(jfl)  ,-ikl(jfl))
 
             ! for a isobar float zsurfz is put to zero. The vertical velocity will be zero too.
             zsurfz =          e1e2t(iiloc(jfl),ijloc(jfl))
-            zvol   = zsurfz * fse3t(iiloc(jfl),ijloc(jfl),-ikl(jfl))
+            zvol   = zsurfz * e3t_n(iiloc(jfl),ijloc(jfl),-ikl(jfl))
 
             !
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/FLO/flodom.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/FLO/flodom.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/FLO/flodom.F90	(revision 5845)
@@ -37,6 +37,4 @@
    REAL(wp), ALLOCATABLE, DIMENSION(:) ::   zgifl, zgjfl,  zgkfl      ! distances in indexes
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -176,5 +174,5 @@
                   ihtest(jfl) = ihtest(jfl)+1
                   DO jk = 1, jpk-1
-                     IF( (fsdepw(ji,jj,jk) <= flzz(jfl)) .AND. (fsdepw(ji,jj,jk+1) > flzz(jfl)) ) THEN
+                     IF( (gdepw_n(ji,jj,jk) <= flzz(jfl)) .AND. (gdepw_n(ji,jj,jk+1) > flzz(jfl)) ) THEN
                         ikmfl(jfl) = jk
                         ivtest(jfl) = ivtest(jfl) + 1
@@ -238,10 +236,10 @@
             zgifl(jfl)= (iimfl(jfl)-0.5) + zdxab/e1u(iimfl(jfl)-1,ijmfl(jfl)) + (mig(1)-jpizoom)
             zgjfl(jfl)= (ijmfl(jfl)-0.5) + zdyad/e2v(iimfl(jfl),ijmfl(jfl)-1) + (mjg(1)-jpjzoom)
-            zgkfl(jfl) = (( fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1) - flzz(jfl) )* ikmfl(jfl))   &
-               &                 / (  fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1)                              &
-               &                    - fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl) ) )                             &
-               &                 + (( flzz(jfl)-fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)) ) *(ikmfl(jfl)+1))   &
-               &                 / (  fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1)                              &
-               &                    - fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)) )
+            zgkfl(jfl) = (( gdepw_n(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1) - flzz(jfl) )* ikmfl(jfl))   &
+               &                 / (  gdepw_n(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1)                              &
+               &                    - gdepw_n(iimfl(jfl),ijmfl(jfl),ikmfl(jfl) ) )                             &
+               &                 + (( flzz(jfl)-gdepw_n(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)) ) *(ikmfl(jfl)+1))   &
+               &                 / (  gdepw_n(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1)                              &
+               &                    - gdepw_n(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)) )
          ELSE
             zgifl(jfl) = 0.e0
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/FLO/florst.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/FLO/florst.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/FLO/florst.F90	(revision 5845)
@@ -26,6 +26,4 @@
    INTEGER, ALLOCATABLE, DIMENSION(:) :: iperproc   ! 1D workspace
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.2 , LODYC-IPSL  (2009)
@@ -52,13 +50,10 @@
       !! ** Purpose :  
       !!             
-      !!    
       !!      
       !! ** Method  :   The frequency of  ??? is nwritefl
       !!      
       !!----------------------------------------------------------------------
-      !! * Arguments
       INTEGER  :: kt                            ! time step
-
-      !! * Local declarations
+      !
       CHARACTER (len=80)       :: clname             ! restart filename
       INTEGER                  :: ic , jc , jpn ,jfl ! temporary integer
@@ -125,9 +120,8 @@
             ENDIF
          ENDIF
-
+         !
       ENDIF
-
+      !
    END SUBROUTINE flo_rst
-
 
 #  else
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/FLO/flowri.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/FLO/flowri.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/FLO/flowri.F90	(revision 5845)
@@ -40,6 +40,4 @@
    REAL(wp), ALLOCATABLE, DIMENSION(:) ::   ztem , zsal, zrho   ! 2D workspace
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.2 , LODYC-IPSL  (2009)
@@ -125,5 +123,5 @@
                zlon(jfl) = (1.-zafl)*(1.-zbfl)*glamt(iafloc ,ibfloc ) + (1.-zafl) * zbfl * glamt(iafloc ,ib1floc)   &
                      +     zafl *(1.-zbfl)*glamt(ia1floc,ibfloc ) +     zafl  * zbfl * glamt(ia1floc,ib1floc)
-               zdep(jfl) = (1.-zcfl)*fsdepw(iafloc,ibfloc,icfl ) + zcfl * fsdepw(iafloc,ibfloc,ic1fl)     
+               zdep(jfl) = (1.-zcfl)*gdepw_n(iafloc,ibfloc,icfl ) + zcfl * gdepw_n(iafloc,ibfloc,ic1fl)     
 
                !save temperature, salinity and density at this position
@@ -146,5 +144,5 @@
             zlon(jfl) = (1.-zafl)*(1.-zbfl)*glamt(iafloc ,ibfloc ) + (1.-zafl) * zbfl * glamt(iafloc ,ib1floc)   &
                       +     zafl *(1.-zbfl)*glamt(ia1floc,ibfloc ) +     zafl  * zbfl * glamt(ia1floc,ib1floc)
-            zdep(jfl) = (1.-zcfl)*fsdepw(iafloc,ibfloc,icfl ) + zcfl * fsdepw(iafloc,ibfloc,ic1fl)
+            zdep(jfl) = (1.-zcfl)*gdepw_n(iafloc,ibfloc,icfl ) + zcfl * gdepw_n(iafloc,ibfloc,ic1fl)
 
             ztem(jfl) = tsn(iafloc,ibfloc,icfl,jp_tem)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 5845)
@@ -37,5 +37,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -237,5 +236,5 @@
          CALL iom_get( numror, jpdom_autoglo, 'rhop'   , rhop    )   ! now    potential density
       ELSE
-         CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) )   
+         CALL eos    ( tsn, rhd, rhop, gdept_n(:,:,:) )   
       ENDIF
       !
@@ -248,5 +247,5 @@
          IF( lk_vvl ) THEN
             DO jk = 1, jpk
-               fse3t_b(:,:,jk) = fse3t_n(:,:,jk)
+               e3t_b(:,:,jk) = e3t_n(:,:,jk)
             END DO
          ENDIF
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/LBC/mppini.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/LBC/mppini.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/LBC/mppini.F90	(revision 5845)
@@ -11,5 +11,4 @@
    !!   mpp_init_ioispl: IOIPSL initialization in mpp
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE dom_oce         ! ocean space and time domain 
    USE in_out_manager  ! I/O Manager
@@ -23,6 +22,4 @@
    PUBLIC mpp_init2      ! called by opa.F90
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/LDF/ldfc1d_c2d.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/LDF/ldfc1d_c2d.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/LDF/ldfc1d_c2d.F90	(revision 5845)
@@ -28,5 +28,4 @@
  
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -72,11 +71,11 @@
       CASE( 'DYN' )                     ! T- and F-points
          DO jk = 1, jpk                      ! pah1 at T-point
-            pah1(:,:,jk) = pahs1(:,:) * (  prat + zc * ( 1._wp + TANH( - ( fsdept(:,:,jk) - zh ) * zw) )  ) * tmask(:,:,jk)
+            pah1(:,:,jk) = pahs1(:,:) * (  prat + zc * ( 1._wp + TANH( - ( gdept_n(:,:,jk) - zh ) * zw) )  ) * tmask(:,:,jk)
          END DO
          DO jk = 1, jpk                      ! pah2 at F-point (zdep2 is an approximation in zps-coord.)
             DO jj = 1, jpjm1
                DO ji = 1, fs_jpim1
-                  zdep2 = (  fsdept(ji,jj+1,jk) + fsdept(ji+1,jj+1,jk)   &
-                     &     + fsdept(ji,jj  ,jk) + fsdept(ji+1,jj  ,jk)  ) * 0.25_wp
+                  zdep2 = (  gdept_n(ji,jj+1,jk) + gdept_n(ji+1,jj+1,jk)   &
+                     &     + gdept_n(ji,jj  ,jk) + gdept_n(ji+1,jj  ,jk)  ) * 0.25_wp
                   pah2(ji,jj,jk) = pahs2(ji,jj) * (  prat + zc * ( 1._wp + TANH( - ( zdep2 - zh ) * zw) )  ) * fmask(ji,jj,jk)
                END DO
@@ -89,6 +88,6 @@
             DO jj = 1, jpjm1
                DO ji = 1, fs_jpim1
-                  zdep1 = (  fsdept(ji,jj,jk) + fsdept(ji+1,jj,jk)  ) * 0.5_wp
-                  zdep2 = (  fsdept(ji,jj,jk) + fsdept(ji,jj+1,jk)  ) * 0.5_wp
+                  zdep1 = (  gdept_n(ji,jj,jk) + gdept_n(ji+1,jj,jk)  ) * 0.5_wp
+                  zdep2 = (  gdept_n(ji,jj,jk) + gdept_n(ji,jj+1,jk)  ) * 0.5_wp
                   pah1(ji,jj,jk) = pahs1(ji,jj) * (  prat + zc * ( 1._wp + TANH( - ( zdep1 - zh ) * zw) )  ) * umask(ji,jj,jk)
                   pah2(ji,jj,jk) = pahs2(ji,jj) * (  prat + zc * ( 1._wp + TANH( - ( zdep2 - zh ) * zw) )  ) * vmask(ji,jj,jk)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn.F90	(revision 5845)
@@ -52,5 +52,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90	(revision 5845)
@@ -73,5 +73,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -181,6 +180,6 @@
                !                                      ! bound the slopes: abs(zw.)<= 1/100 and zb..<0
                !                                      ! + kxz max= ah slope max =< e1 e3 /(pi**2 2 dt)
-               zbu = MIN(  zbu, - z1_slpmax * ABS( zau ) , -7.e+3_wp/fse3u(ji,jj,jk)* ABS( zau )  )
-               zbv = MIN(  zbv, - z1_slpmax * ABS( zav ) , -7.e+3_wp/fse3v(ji,jj,jk)* ABS( zav )  )
+               zbu = MIN(  zbu, - z1_slpmax * ABS( zau ) , -7.e+3_wp/e3u_n(ji,jj,jk)* ABS( zau )  )
+               zbv = MIN(  zbv, - z1_slpmax * ABS( zav ) , -7.e+3_wp/e3v_n(ji,jj,jk)* ABS( zav )  )
                !                                      ! uslp and vslp output in zwz and zww, resp.
                zfi = MAX( omlmask(ji,jj,jk), omlmask(ji+1,jj,jk) )
@@ -188,9 +187,9 @@
                zwz(ji,jj,jk) = ( ( 1. - zfi) * zau / ( zbu - zeps )                                              &
                   &                   + zfi  * uslpml(ji,jj)                                                     &
-                  &                          * 0.5_wp * ( fsdept(ji+1,jj,jk)+fsdept(ji,jj,jk)-fse3u(ji,jj,1) )   &
+                  &                          * 0.5_wp * ( gdept_n(ji+1,jj,jk)+gdept_n(ji,jj,jk)-e3u_n(ji,jj,1) )   &
                   &                          / MAX( hmlpt(ji,jj), hmlpt(ji+1,jj), 5._wp ) ) * umask(ji,jj,jk)
                zww(ji,jj,jk) = ( ( 1. - zfj) * zav / ( zbv - zeps )                                              &
                   &                   + zfj  * vslpml(ji,jj)                                                     &
-                  &                          * 0.5_wp * ( fsdept(ji,jj+1,jk)+fsdept(ji,jj,jk)-fse3v(ji,jj,1) )   &
+                  &                          * 0.5_wp * ( gdept_n(ji,jj+1,jk)+gdept_n(ji,jj,jk)-e3v_n(ji,jj,1) )   &
                   &                          / MAX( hmlpt(ji,jj), hmlpt(ji,jj+1), 5. ) ) * vmask(ji,jj,jk)
 !!gm  modif to suppress omlmask.... (as in Griffies case)
@@ -198,6 +197,6 @@
 !               zfi = REAL( 1 - 1/(1 + jk / MAX( nmln(ji+1,jj), nmln(ji,jj) ) ), wp )
 !               zfj = REAL( 1 - 1/(1 + jk / MAX( nmln(ji,jj+1), nmln(ji,jj) ) ), wp )
-!               zci = 0.5 * ( fsdept(ji+1,jj,jk)+fsdept(ji,jj,jk) ) / MAX( hmlpt(ji,jj), hmlpt(ji+1,jj), 10. ) )
-!               zcj = 0.5 * ( fsdept(ji,jj+1,jk)+fsdept(ji,jj,jk) ) / MAX( hmlpt(ji,jj), hmlpt(ji,jj+1), 10. ) )
+!               zci = 0.5 * ( gdept_n(ji+1,jj,jk)+gdept_n(ji,jj,jk) ) / MAX( hmlpt(ji,jj), hmlpt(ji+1,jj), 10. ) )
+!               zcj = 0.5 * ( gdept_n(ji,jj+1,jk)+gdept_n(ji,jj,jk) ) / MAX( hmlpt(ji,jj), hmlpt(ji,jj+1), 10. ) )
 !               zwz(ji,jj,jk) = ( zfi * zai / ( zbi - zeps ) + ( 1._wp - zfi ) * wslpiml(ji,jj) * zci ) * tmask(ji,jj,jk)
 !               zww(ji,jj,jk) = ( zfj * zaj / ( zbj - zeps ) + ( 1._wp - zfj ) * wslpjml(ji,jj) * zcj ) * tmask(ji,jj,jk)
@@ -270,9 +269,9 @@
                !                                        ! bound the slopes: abs(zw.)<= 1/100 and zb..<0.
                !                                        ! + kxz max= ah slope max =< e1 e3 /(pi**2 2 dt)
-               zbi = MIN( zbw ,- 100._wp* ABS( zai ) , -7.e+3_wp/fse3w(ji,jj,jk)* ABS( zai )  )
-               zbj = MIN( zbw , -100._wp* ABS( zaj ) , -7.e+3_wp/fse3w(ji,jj,jk)* ABS( zaj )  )
+               zbi = MIN( zbw ,- 100._wp* ABS( zai ) , -7.e+3_wp/e3w_n(ji,jj,jk)* ABS( zai )  )
+               zbj = MIN( zbw , -100._wp* ABS( zaj ) , -7.e+3_wp/e3w_n(ji,jj,jk)* ABS( zaj )  )
                !                                        ! wslpi and wslpj with ML flattening (output in zwz and zww, resp.)
                zfk = MAX( omlmask(ji,jj,jk), omlmask(ji,jj,jk-1) )   ! zfk=1 in the ML otherwise zfk=0
-               zck = fsdepw(ji,jj,jk) / MAX( hmlp(ji,jj), 10._wp )
+               zck = gdepw_n(ji,jj,jk) / MAX( hmlp(ji,jj), 10._wp )
                zwz(ji,jj,jk) = (  zai / ( zbi - zeps ) * ( 1._wp - zfk ) + zck * wslpiml(ji,jj) * zfk  ) * tmask(ji,jj,jk)
                zww(ji,jj,jk) = (  zaj / ( zbj - zeps ) * ( 1._wp - zfk ) + zck * wslpjml(ji,jj) * zfk  ) * tmask(ji,jj,jk)
@@ -281,5 +280,5 @@
 !               !                                         ! jk must be >= ML level for zfk=1. otherwise  zfk=0.
 !               zfk = REAL( 1 - 1/(1 + jk / nmln(ji+1,jj)), wp )
-!               zck = fsdepw(ji,jj,jk)    / MAX( hmlp(ji,jj), 10. )
+!               zck = gdepw(ji,jj,jk)    / MAX( hmlp(ji,jj), 10. )
 !               zwz(ji,jj,jk) = ( zfk * zai / ( zbi - zeps ) + ( 1._wp - zfk ) * wslpiml(ji,jj) * zck ) * tmask(ji,jj,jk)
 !               zww(ji,jj,jk) = ( zfk * zaj / ( zbj - zeps ) + ( 1._wp - zfk ) * wslpjml(ji,jj) * zck ) * tmask(ji,jj,jk)
@@ -441,5 +440,5 @@
                      zdks = 0._wp
                   ENDIF
-                  zdzrho_raw = ( - zalbet(ji,jj,jk) * zdkt + zbeta0*zdks ) / fse3w(ji,jj,jk+kp)
+                  zdzrho_raw = ( - zalbet(ji,jj,jk) * zdkt + zbeta0*zdks ) / e3w_n(ji,jj,jk+kp)
                   zdzrho(ji,jj,jk,kp) = - MIN( - repsln , zdzrho_raw )    ! force zdzrho >= repsln
                  END DO
@@ -451,5 +450,5 @@
          DO ji = 1, jpi
             jk = MIN( nmln(ji,jj), mbkt(ji,jj) ) + 1     ! MIN in case ML depth is the ocean depth
-            z1_mlbw(ji,jj) = 1._wp / fsdepw(ji,jj,jk)
+            z1_mlbw(ji,jj) = 1._wp / gdepw_n(ji,jj,jk)
          END DO
       END DO
@@ -480,6 +479,6 @@
                      ! Add s-coordinate slope at t-points (do this by *subtracting* gradient of depth)
                      zti_g_raw = (  zdxrho(ji+ip,jj,jk-kp,1-ip) / zdzrho(ji+ip,jj,jk-kp,kp)      &
-                        &          - ( fsdept(ji+1,jj,jk-kp) - fsdept(ji,jj,jk-kp) ) * r1_e1u(ji,jj)  ) * umask(ji,jj,jk)
-                     ze3_e1    =  fse3w(ji+ip,jj,jk-kp) * r1_e1u(ji,jj) 
+                        &          - ( gdept_n(ji+1,jj,jk-kp) - gdept_n(ji,jj,jk-kp) ) * r1_e1u(ji,jj)  ) * umask(ji,jj,jk)
+                     ze3_e1    =  e3w_n(ji+ip,jj,jk-kp) * r1_e1u(ji,jj) 
                      zti_mlb(ji+ip,jj   ,1-ip,kp) = SIGN( MIN( rn_slpmax, 5.0_wp * ze3_e1  , ABS( zti_g_raw ) ), zti_g_raw )
                   ENDIF
@@ -490,6 +489,6 @@
                   ELSE
                      ztj_g_raw = (  zdyrho(ji,jj+jp,jk-kp,1-jp) / zdzrho(ji,jj+jp,jk-kp,kp)      &
-                        &      - ( fsdept(ji,jj+1,jk-kp) - fsdept(ji,jj,jk-kp) ) / e2v(ji,jj)  ) * vmask(ji,jj,jk)
-                     ze3_e2    =  fse3w(ji,jj+jp,jk-kp) / e2v(ji,jj)
+                        &      - ( gdept_n(ji,jj+1,jk-kp) - gdept_n(ji,jj,jk-kp) ) / e2v(ji,jj)  ) * vmask(ji,jj,jk)
+                     ze3_e2    =  e3w_n(ji,jj+jp,jk-kp) / e2v(ji,jj)
                      ztj_mlb(ji   ,jj+jp,1-jp,kp) = SIGN( MIN( rn_slpmax, 5.0_wp * ze3_e2  , ABS( ztj_g_raw ) ), ztj_g_raw )
                   ENDIF
@@ -523,11 +522,11 @@
                      !
                      ! Must mask contribution to slope for triad jk=1,kp=0 that poke up though ocean surface
-                     zti_coord = znot_thru_surface * ( fsdept(ji+1,jj  ,jk) - fsdept(ji,jj,jk) ) * r1_e1u(ji,jj)
-                     ztj_coord = znot_thru_surface * ( fsdept(ji  ,jj+1,jk) - fsdept(ji,jj,jk) ) * r1_e2v(ji,jj)     ! unmasked
+                     zti_coord = znot_thru_surface * ( gdept_n(ji+1,jj  ,jk) - gdept_n(ji,jj,jk) ) * r1_e1u(ji,jj)
+                     ztj_coord = znot_thru_surface * ( gdept_n(ji  ,jj+1,jk) - gdept_n(ji,jj,jk) ) * r1_e2v(ji,jj)     ! unmasked
                      zti_g_raw = zti_raw - zti_coord      ! ref to geopot surfaces
                      ztj_g_raw = ztj_raw - ztj_coord
                      ! additional limit required in bilaplacian case
-                     ze3_e1    = fse3w(ji+ip,jj   ,jk+kp) * r1_e1u(ji,jj)
-                     ze3_e2    = fse3w(ji   ,jj+jp,jk+kp) * r1_e2v(ji,jj)
+                     ze3_e1    = e3w_n(ji+ip,jj   ,jk+kp) * r1_e1u(ji,jj)
+                     ze3_e2    = e3w_n(ji   ,jj+jp,jk+kp) * r1_e2v(ji,jj)
                      ! NB: hard coded factor 5 (can be a namelist parameter...)
                      zti_g_lim = SIGN( MIN( rn_slpmax, 5.0_wp * ze3_e1, ABS( zti_g_raw ) ), zti_g_raw )
@@ -542,8 +541,8 @@
                      zti_g_lim =          ( zfacti   * zti_g_lim                       &
                         &      + ( 1._wp - zfacti ) * zti_mlb(ji+ip,jj,1-ip,kp)   &
-                        &                           * fsdepw(ji+ip,jj,jk+kp) * z1_mlbw(ji+ip,jj) ) * umask(ji,jj,jk+kp)
+                        &                           * gdepw_n(ji+ip,jj,jk+kp) * z1_mlbw(ji+ip,jj) ) * umask(ji,jj,jk+kp)
                      ztj_g_lim =          ( zfactj   * ztj_g_lim                       &
                         &      + ( 1._wp - zfactj ) * ztj_mlb(ji,jj+jp,1-jp,kp)   &
-                        &                           * fsdepw(ji,jj+jp,jk+kp) * z1_mlbw(ji,jj+jp) ) * vmask(ji,jj,jk+kp)
+                        &                           * gdepw_n(ji,jj+jp,jk+kp) * z1_mlbw(ji,jj+jp) ) * vmask(ji,jj,jk+kp)
                      !
                      triadi_g(ji+ip,jj   ,jk,1-ip,kp) = zti_g_lim
@@ -577,8 +576,8 @@
                      triadj(ji   ,jj+jp,jk,1-jp,kp) = ztj_lim * zjsw
                      !
-                     zbu  = e1e2u(ji   ,jj   ) * fse3u(ji   ,jj   ,jk   )
-                     zbv  = e1e2v(ji   ,jj   ) * fse3v(ji   ,jj   ,jk   )
-                     zbti = e1e2t(ji+ip,jj   ) * fse3w(ji+ip,jj   ,jk+kp)
-                     zbtj = e1e2t(ji   ,jj+jp) * fse3w(ji   ,jj+jp,jk+kp)
+                     zbu  = e1e2u(ji   ,jj   ) * e3u_n(ji   ,jj   ,jk   )
+                     zbv  = e1e2v(ji   ,jj   ) * e3v_n(ji   ,jj   ,jk   )
+                     zbti = e1e2t(ji+ip,jj   ) * e3w_n(ji+ip,jj   ,jk+kp)
+                     zbtj = e1e2t(ji   ,jj+jp) * e3w_n(ji   ,jj+jp,jk+kp)
                      !
                      wslp2(ji+ip,jj,jk+kp) = wslp2(ji+ip,jj,jk+kp) + 0.25_wp * zbu / zbti * zti_g_lim*zti_g_lim      ! masked
@@ -682,6 +681,6 @@
             !                        !- bound the slopes: abs(zw.)<= 1/100 and zb..<0
             !                           kxz max= ah slope max =< e1 e3 /(pi**2 2 dt)
-            zbu = MIN(  zbu , - z1_slpmax * ABS( zau ) , -7.e+3_wp/fse3u(ji,jj,iku)* ABS( zau )  )
-            zbv = MIN(  zbv , - z1_slpmax * ABS( zav ) , -7.e+3_wp/fse3v(ji,jj,ikv)* ABS( zav )  )
+            zbu = MIN(  zbu , - z1_slpmax * ABS( zau ) , -7.e+3_wp/e3u_n(ji,jj,iku)* ABS( zau )  )
+            zbv = MIN(  zbv , - z1_slpmax * ABS( zav ) , -7.e+3_wp/e3v_n(ji,jj,ikv)* ABS( zav )  )
             !                        !- Slope at u- & v-points (uslpml, vslpml)
             uslpml(ji,jj) = zau / ( zbu - zeps ) * umask(ji,jj,iku)
@@ -705,6 +704,6 @@
             !                        !- bound the slopes: abs(zw.)<= 1/100 and zb..<0.
             !                           kxz max= ah slope max =< e1 e3 /(pi**2 2 dt)
-            zbi = MIN(  zbw , -100._wp* ABS( zai ) , -7.e+3_wp/fse3w(ji,jj,ik)* ABS( zai )  )
-            zbj = MIN(  zbw , -100._wp* ABS( zaj ) , -7.e+3_wp/fse3w(ji,jj,ik)* ABS( zaj )  )
+            zbi = MIN(  zbw , -100._wp* ABS( zai ) , -7.e+3_wp/e3w_n(ji,jj,ik)* ABS( zai )  )
+            zbj = MIN(  zbw , -100._wp* ABS( zaj ) , -7.e+3_wp/e3w_n(ji,jj,ik)* ABS( zaj )  )
             !                        !- i- & j-slope at w-points (wslpiml, wslpjml)
             wslpiml(ji,jj) = zai / ( zbi - zeps ) * tmask (ji,jj,ik)
@@ -775,12 +774,12 @@
 !
 !            ! set the slope of diffusion to the slope of s-surfaces
-!            !      ( c a u t i o n : minus sign as fsdep has positive value )
+!            !      ( c a u t i o n : minus sign as dep has positive value )
 !            DO jk = 1, jpk
 !               DO jj = 2, jpjm1
 !                  DO ji = fs_2, fs_jpim1   ! vector opt.
-!                     uslp (ji,jj,jk) = - ( fsdept(ji+1,jj,jk) - fsdept(ji ,jj ,jk) ) * r1_e1u(ji,jj) * umask(ji,jj,jk)
-!                     vslp (ji,jj,jk) = - ( fsdept(ji,jj+1,jk) - fsdept(ji ,jj ,jk) ) * r1_e2v(ji,jj) * vmask(ji,jj,jk)
-!                     wslpi(ji,jj,jk) = - ( fsdepw(ji+1,jj,jk) - fsdepw(ji-1,jj,jk) ) * r1_e1t(ji,jj) * wmask(ji,jj,jk) * 0.5
-!                     wslpj(ji,jj,jk) = - ( fsdepw(ji,jj+1,jk) - fsdepw(ji,jj-1,jk) ) * r1_e2t(ji,jj) * wmask(ji,jj,jk) * 0.5
+!                     uslp (ji,jj,jk) = - ( gdept_n(ji+1,jj,jk) - gdept_n(ji ,jj ,jk) ) * r1_e1u(ji,jj) * umask(ji,jj,jk)
+!                     vslp (ji,jj,jk) = - ( gdept_n(ji,jj+1,jk) - gdept_n(ji ,jj ,jk) ) * r1_e2v(ji,jj) * vmask(ji,jj,jk)
+!                     wslpi(ji,jj,jk) = - ( gdepw_n(ji+1,jj,jk) - gdepw_n(ji-1,jj,jk) ) * r1_e1t(ji,jj) * wmask(ji,jj,jk) * 0.5
+!                     wslpj(ji,jj,jk) = - ( gdepw_n(ji,jj+1,jk) - gdepw_n(ji,jj-1,jk) ) * r1_e2t(ji,jj) * wmask(ji,jj,jk) * 0.5
 !                  END DO
 !               END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra.F90	(revision 5845)
@@ -81,5 +81,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -515,9 +514,9 @@
                   ! internal Rossby radius Ro = .5 * sum_jpk(N) / f 
                   zn2 = MAX( rn2b(ji,jj,jk), 0._wp )
-                  zn(ji,jj) = zn(ji,jj) + SQRT( zn2 ) * fse3w(ji,jj,jk)
+                  zn(ji,jj) = zn(ji,jj) + SQRT( zn2 ) * e3w_n(ji,jj,jk)
                   ! Compute elements required for the inverse time scale of baroclinic
                   ! eddies using the isopycnal slopes calculated in ldfslp.F : 
                   ! T^-1 = sqrt(m_jpk(N^2*(r1^2+r2^2)*e3w))
-                  ze3w = fse3w(ji,jj,jk) * tmask(ji,jj,jk)
+                  ze3w = e3w_n(ji,jj,jk) * tmask(ji,jj,jk)
                   zah(ji,jj) = zah(ji,jj) + zn2 * wslp2(ji,jj,jk) * ze3w
                   zhw(ji,jj) = zhw(ji,jj) + ze3w
@@ -533,9 +532,9 @@
                   ! internal Rossby radius Ro = .5 * sum_jpk(N) / f 
                   zn2 = MAX( rn2b(ji,jj,jk), 0._wp )
-                  zn(ji,jj) = zn(ji,jj) + SQRT( zn2 ) * fse3w(ji,jj,jk)
+                  zn(ji,jj) = zn(ji,jj) + SQRT( zn2 ) * e3w_n(ji,jj,jk)
                   ! Compute elements required for the inverse time scale of baroclinic
                   ! eddies using the isopycnal slopes calculated in ldfslp.F : 
                   ! T^-1 = sqrt(m_jpk(N^2*(r1^2+r2^2)*e3w))
-                  ze3w = fse3w(ji,jj,jk) * tmask(ji,jj,jk)
+                  ze3w = e3w_n(ji,jj,jk) * tmask(ji,jj,jk)
                   zah(ji,jj) = zah(ji,jj) + zn2 * ( wslpi(ji,jj,jk) * wslpi(ji,jj,jk)   &
                      &                            + wslpj(ji,jj,jk) * wslpj(ji,jj,jk) ) * ze3w
@@ -711,10 +710,10 @@
       !
       DO jk = 1, jpkm1                                         ! e2u e3u u_eiv = -dk[psi_uw]
-         zw3d(:,:,jk) = ( psi_uw(:,:,jk+1) - psi_uw(:,:,jk) ) / ( e2u(:,:) * fse3u(:,:,jk) )
+         zw3d(:,:,jk) = ( psi_uw(:,:,jk+1) - psi_uw(:,:,jk) ) / ( e2u(:,:) * e3u_n(:,:,jk) )
       END DO
       CALL iom_put( "uoce_eiv", zw3d )
       !
       DO jk = 1, jpkm1                                         ! e1v e3v v_eiv = -dk[psi_vw]
-         zw3d(:,:,jk) = ( psi_vw(:,:,jk+1) - psi_vw(:,:,jk) ) / ( e1v(:,:) * fse3v(:,:,jk) )
+         zw3d(:,:,jk) = ( psi_vw(:,:,jk+1) - psi_vw(:,:,jk) ) / ( e1v(:,:) * e3v_n(:,:,jk) )
       END DO
       CALL iom_put( "voce_eiv", zw3d )
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90	(revision 5845)
@@ -172,7 +172,5 @@
          &      ssv_m  (jpi,jpj) , sss_m(jpi,jpj) , ssh_m(jpi,jpj) , STAT=ierr(4) )
          !
-#if defined key_vvl
       ALLOCATE( e3t_m(jpi,jpj) , STAT=ierr(5) )
-#endif
          !
       sbc_oce_alloc = MAXVAL( ierr )
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcana.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcana.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcana.F90	(revision 5845)
@@ -37,5 +37,4 @@
    
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 5845)
@@ -39,6 +39,4 @@
    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_apr   ! structure of input fields (file informations, fields read)
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 4.0 , NEMO Consortium (2011) 
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 5845)
@@ -93,5 +93,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90	(revision 5845)
@@ -42,5 +42,4 @@
          
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 5845)
@@ -165,5 +165,4 @@
 
    !! Substitution
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -2002,5 +2001,5 @@
       !                                                        ! first T level thickness 
       IF( ssnd(jps_e3t1st )%laction )  THEN
-         CALL cpl_snd( jps_e3t1st, isec, RESHAPE ( fse3t_n(:,:,1)   , (/jpi,jpj,1/) ), info )
+         CALL cpl_snd( jps_e3t1st, isec, RESHAPE ( e3t_n(:,:,1)   , (/jpi,jpj,1/) ), info )
       ENDIF
       !                                                        ! Qsr fraction
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 5845)
@@ -17,4 +17,5 @@
    USE sbcdcy          ! surface boundary condition: diurnal cycle on qsr
    USE phycst          ! physical constants
+   !
    USE fldread         ! read input fields
    USE iom             ! IOM library
@@ -37,5 +38,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -165,7 +165,5 @@
                WRITE(numout,*) 
                WRITE(numout,*) ' day: ', ndastp , TRIM(sf(jf)%clvar), ' * ', zfact
-               CALL prihre( sf(jf)%fnow, jpi, jpj, 1, jpi, 20, 1, jpj, 10, zfact, numout )
             END DO
-            CALL FLUSH(numout)
          ENDIF
          !
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90	(revision 5845)
@@ -40,5 +40,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 5845)
@@ -9,6 +9,4 @@
    !!----------------------------------------------------------------------
    !!   sbc_ice_cice  : sea-ice model time-stepping and update ocean sbc over ice-covered area
-   !!   
-   !!   
    !!----------------------------------------------------------------------
    USE oce             ! ocean dynamics and tracers
@@ -92,6 +90,4 @@
    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:), PRIVATE ::   png     ! local array used in sbc_cice_ice
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.7 , NEMO-consortium (2015) 
@@ -249,10 +245,11 @@
             sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0
 #if defined key_vvl            
-           ! key_vvl necessary? clem: yes for compilation purpose
+!!gm key_vvl necessary? clem: yes for compilation purpose
+!!gm same remark as in limsbc
             DO jk = 1,jpkm1                     ! adjust initial vertical scale factors
-               fse3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )
-               fse3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )
+               e3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )
+               e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) )
             ENDDO
-            fse3t_a(:,:,:) = fse3t_b(:,:,:)
+            e3t_a(:,:,:) = e3t_b(:,:,:)
             ! Reconstruction of all vertical scale factors at now and before time
             ! steps
@@ -260,25 +257,25 @@
             ! Horizontal scale factor interpolations
             ! --------------------------------------
-            CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3u_b(:,:,:), 'U' )
-            CALL dom_vvl_interpol( fse3t_b(:,:,:), fse3v_b(:,:,:), 'V' )
-            CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3u_n(:,:,:), 'U' )
-            CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3v_n(:,:,:), 'V' )
-            CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3f_n(:,:,:), 'F' )
+            CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' )
+            CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' )
+            CALL dom_vvl_interpol( e3t_n(:,:,:), e3u_n(:,:,:), 'U' )
+            CALL dom_vvl_interpol( e3t_n(:,:,:), e3v_n(:,:,:), 'V' )
+            CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' )
             ! Vertical scale factor interpolations
             ! ------------------------------------
-            CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3w_n (:,:,:), 'W'  )
-            CALL dom_vvl_interpol( fse3u_n(:,:,:), fse3uw_n(:,:,:), 'UW' )
-            CALL dom_vvl_interpol( fse3v_n(:,:,:), fse3vw_n(:,:,:), 'VW' )
-            CALL dom_vvl_interpol( fse3u_b(:,:,:), fse3uw_b(:,:,:), 'UW' )
-            CALL dom_vvl_interpol( fse3v_b(:,:,:), fse3vw_b(:,:,:), 'VW' )
+            CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W'  )
+            CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' )
+            CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' )
+            CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' )
+            CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' )
             ! t- and w- points depth
             ! ----------------------
-            fsdept_n(:,:,1) = 0.5_wp * fse3w_n(:,:,1)
-            fsdepw_n(:,:,1) = 0.0_wp
-            fsde3w_n(:,:,1) = fsdept_n(:,:,1) - sshn(:,:)
+            gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1)
+            gdepw_n(:,:,1) = 0.0_wp
+            gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:)
             DO jk = 2, jpk
-               fsdept_n(:,:,jk) = fsdept_n(:,:,jk-1) + fse3w_n(:,:,jk)
-               fsdepw_n(:,:,jk) = fsdepw_n(:,:,jk-1) + fse3t_n(:,:,jk-1)
-               fsde3w_n(:,:,jk) = fsdept_n(:,:,jk  ) - sshn   (:,:)
+               gdept_n(:,:,jk) = gdept_n(:,:,jk-1) + e3w_n(:,:,jk)
+               gdepw_n(:,:,jk) = gdepw_n(:,:,jk-1) + e3t_n(:,:,jk-1)
+               gde3w_n(:,:,jk) = gdept_n(:,:,jk  ) - sshn   (:,:)
             END DO
 #endif
@@ -448,5 +445,5 @@
 ! Freezing/melting potential
 ! Calculated over NEMO leapfrog timestep (hence 2*dt)
-      nfrzmlt(:,:)=rau0*rcp*fse3t_m(:,:)*(Tocnfrz-sst_m(:,:))/(2.0*dt)
+      nfrzmlt(:,:) = rau0 * rcp * e3t_m(:,:) * ( Tocnfrz-sst_m(:,:) ) / ( 2.0*dt )
 
       ztmp(:,:) = nfrzmlt(:,:)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_if.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_if.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_if.F90	(revision 5845)
@@ -34,6 +34,4 @@
    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_ice   ! structure of input ice-cover (file informations, fields read)
    
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90	(revision 5845)
@@ -74,5 +74,4 @@
    
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90	(revision 5845)
@@ -64,5 +64,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90	(revision 5845)
@@ -68,6 +68,4 @@
    TYPE(FLD_N)       , PUBLIC ::   sn_depmax_isf, sn_depmin_isf, sn_Leff_isf     !: information about the runoff file to be read
    
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.7 , LOCEAN-IPSL (2015)
@@ -170,5 +168,5 @@
               DO jj = 1, jpj
                   jk = 2
-                  DO WHILE ( jk .LE. mbkt(ji,jj) .AND. fsdepw(ji,jj,jk) < rzisf_tbl(ji,jj) ) ;  jk = jk + 1 ;  END DO
+                  DO WHILE ( jk .LE. mbkt(ji,jj) .AND. gdepw_n(ji,jj,jk) < rzisf_tbl(ji,jj) ) ;  jk = jk + 1 ;  END DO
                   misfkt(ji,jj) = jk-1
                END DO
@@ -195,17 +193,17 @@
                ikb = misfkt(ji,jj)
                ! thickness of boundary layer at least the top level thickness
-               rhisf_tbl(ji,jj) = MAX(rhisf_tbl_0(ji,jj), fse3t_n(ji,jj,ikt))
+               rhisf_tbl(ji,jj) = MAX(rhisf_tbl_0(ji,jj), e3t_n(ji,jj,ikt))
 
                ! determine the deepest level influenced by the boundary layer
                ! test on tmask useless ?????
                DO jk = ikt, mbkt(ji,jj)
-                  IF ( (SUM(fse3t_n(ji,jj,ikt:jk-1)) .LT. rhisf_tbl(ji,jj)) .AND. (tmask(ji,jj,jk) == 1) ) ikb = jk
+                  IF ( (SUM(e3t_n(ji,jj,ikt:jk-1)) .LT. rhisf_tbl(ji,jj)) .AND. (tmask(ji,jj,jk) == 1) ) ikb = jk
                END DO
-               rhisf_tbl(ji,jj) = MIN(rhisf_tbl(ji,jj), SUM(fse3t_n(ji,jj,ikt:ikb)))  ! limit the tbl to water thickness.
+               rhisf_tbl(ji,jj) = MIN(rhisf_tbl(ji,jj), SUM(e3t_n(ji,jj,ikt:ikb)))  ! limit the tbl to water thickness.
                misfkb(ji,jj) = ikb                                                  ! last wet level of the tbl
                r1_hisf_tbl(ji,jj) = 1._wp / rhisf_tbl(ji,jj)
 
-               zhk           = SUM( fse3t(ji, jj, ikt:ikb - 1)) * r1_hisf_tbl(ji,jj)  ! proportion of tbl cover by cell from ikt to ikb - 1
-               ralpha(ji,jj) = rhisf_tbl(ji,jj) * (1._wp - zhk ) / fse3t(ji,jj,ikb)  ! proportion of bottom cell influenced by boundary layer
+               zhk           = SUM( e3t_n(ji, jj, ikt:ikb - 1)) * r1_hisf_tbl(ji,jj)  ! proportion of tbl cover by cell from ikt to ikb - 1
+               ralpha(ji,jj) = rhisf_tbl(ji,jj) * (1._wp - zhk ) / e3t_n(ji,jj,ikb)  ! proportion of bottom cell influenced by boundary layer
             END DO
          END DO
@@ -369,7 +367,7 @@
              ! after verif with UNESCO, wrong sign in BG eq. 2
              ! Calculate freezing temperature
-                zpress = grav*rau0*fsdept(ji,jj,ik)*1.e-04 
+                zpress = grav*rau0*gdept_n(ji,jj,ik)*1.e-04 
                 CALL eos_fzp(tsb(ji,jj,ik,jp_sal), zt_frz, zpress) 
-                zt_sum = zt_sum + (tsn(ji,jj,ik,jp_tem)-zt_frz) * fse3t(ji,jj,ik) * tmask(ji,jj,ik)  ! sum temp
+                zt_sum = zt_sum + (tsn(ji,jj,ik,jp_tem)-zt_frz) * e3t_n(ji,jj,ik) * tmask(ji,jj,ik)  ! sum temp
              ENDDO
              zt_ave = zt_sum/rhisf_tbl(ji,jj) ! calcul mean value
@@ -445,5 +443,5 @@
             ! Crude approximation for pressure (but commonly used)
             ! 1e-04 to convert from Pa to dBar
-            zpress(ji,jj)=grav*rau0*fsdepw(ji,jj,mikt(ji,jj))*1.e-04
+            zpress(ji,jj)=grav*rau0*gdepw_n(ji,jj,mikt(ji,jj))*1.e-04
             !
          END DO
@@ -643,5 +641,5 @@
                ELSE
       !! compute Rc number (as done in zdfric.F90)
-               zcoef = 0.5 / fse3w(ji,jj,ikt)
+               zcoef = 0.5 / e3w_n(ji,jj,ikt)
                !                                            ! shear of horizontal velocity
                zdku = zcoef * (  un(ji-1,jj  ,ikt  ) + un(ji,jj,ikt  )   &
@@ -663,5 +661,5 @@
                zts(jp_tem) = ttbl(ji,jj)
                zts(jp_sal) = stbl(ji,jj)
-               zdep        = fsdepw(ji,jj,ikt)
+               zdep        = gdepw_n(ji,jj,ikt)
                !
                CALL eos_rab( zts, zdep, zab )
@@ -672,5 +670,5 @@
       !! compute Monin Obukov Length
                ! Maximum boundary layer depth
-               zhmax = fsdept(ji,jj,mbkt(ji,jj)) - fsdepw(ji,jj,mikt(ji,jj)) -0.001
+               zhmax = gdept_n(ji,jj,mbkt(ji,jj)) - gdepw_n(ji,jj,mikt(ji,jj)) -0.001
                ! Compute Monin obukhov length scale at the surface and Ekman depth:
                zmob   = zustar ** 3 / (vkarmn * (zbuofdep + epsln))
@@ -730,5 +728,5 @@
                ! level fully include in the ice shelf boundary layer
                DO jk = ikt, ikb - 1
-                  ze3 = fse3t_n(ji,jj,jk)
+                  ze3 = e3t_n(ji,jj,jk)
                   IF (cptin == 'T' ) varout(ji,jj) = varout(ji,jj) + varin(ji,jj,jk) * r1_hisf_tbl(ji,jj) * ze3
                   IF (cptin == 'U' ) varout(ji,jj) = varout(ji,jj) + 0.5_wp * (varin(ji,jj,jk) + varin(ji-1,jj,jk)) &
@@ -739,5 +737,5 @@
 
                ! level partially include in ice shelf boundary layer 
-               zhk = SUM( fse3t_n(ji, jj, ikt:ikb - 1)) * r1_hisf_tbl(ji,jj)
+               zhk = SUM( e3t_n(ji, jj, ikt:ikb - 1)) * r1_hisf_tbl(ji,jj)
                IF (cptin == 'T') &
                    &  varout(ji,jj) = varout(ji,jj) + varin(ji,jj,ikb) * (1._wp - zhk)
@@ -788,17 +786,17 @@
                ikb = misfkt(ji,jj)
                ! thickness of boundary layer at least the top level thickness
-               rhisf_tbl(ji,jj) = MAX(rhisf_tbl_0(ji,jj), fse3t(ji,jj,ikt))
+               rhisf_tbl(ji,jj) = MAX(rhisf_tbl_0(ji,jj), e3t_n(ji,jj,ikt))
 
                ! determine the deepest level influenced by the boundary layer
                ! test on tmask useless ?????
                DO jk = ikt, mbkt(ji,jj)
-                  IF ( (SUM(fse3t(ji,jj,ikt:jk-1)) .LT. rhisf_tbl(ji,jj)) .AND. (tmask(ji,jj,jk) == 1) ) ikb = jk
+                  IF ( (SUM(e3t_n(ji,jj,ikt:jk-1)) .LT. rhisf_tbl(ji,jj)) .AND. (tmask(ji,jj,jk) == 1) ) ikb = jk
                END DO
-               rhisf_tbl(ji,jj) = MIN(rhisf_tbl(ji,jj), SUM(fse3t(ji,jj,ikt:ikb)))  ! limit the tbl to water thickness.
+               rhisf_tbl(ji,jj) = MIN(rhisf_tbl(ji,jj), SUM(e3t_n(ji,jj,ikt:ikb)))  ! limit the tbl to water thickness.
                misfkb(ji,jj) = ikb                                                  ! last wet level of the tbl
                r1_hisf_tbl(ji,jj) = 1._wp / rhisf_tbl(ji,jj)
 
-               zhk           = SUM( fse3t(ji, jj, ikt:ikb - 1)) * r1_hisf_tbl(ji,jj)  ! proportion of tbl cover by cell from ikt to ikb - 1
-               ralpha(ji,jj) = rhisf_tbl(ji,jj) * (1._wp - zhk ) / fse3t(ji,jj,ikb)  ! proportion of bottom cell influenced by boundary layer
+               zhk           = SUM( e3t_n(ji, jj, ikt:ikb - 1)) * r1_hisf_tbl(ji,jj)  ! proportion of tbl cover by cell from ikt to ikb - 1
+               ralpha(ji,jj) = rhisf_tbl(ji,jj) * (1._wp - zhk ) / e3t_n(ji,jj,ikb)  ! proportion of bottom cell influenced by boundary layer
             END DO
          END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 5845)
@@ -62,6 +62,4 @@
    INTEGER ::   nsbc   ! type of surface boundary condition (deduced from namsbc informations)
       
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 4.0 , NEMO-consortium (2011) 
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 5845)
@@ -68,6 +68,4 @@
    TYPE(FLD),        ALLOCATABLE, DIMENSION(:) ::   sf_t_rnf     ! structure: river runoff temperature (file information, fields read)  
  
-   !! * Substitutions  
-#  include "domzgr_substitute.h90"  
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -216,5 +214,5 @@
                   h_rnf(ji,jj) = 0._wp
                   DO jk = 1, nk_rnf(ji,jj)                           ! recalculates h_rnf to be the depth in metres
-                     h_rnf(ji,jj) = h_rnf(ji,jj) + fse3t(ji,jj,jk)   ! to the bottom of the relevant grid box
+                     h_rnf(ji,jj) = h_rnf(ji,jj) + e3t_n(ji,jj,jk)   ! to the bottom of the relevant grid box
                   END DO
                   !                          ! apply the runoff input flow
@@ -235,7 +233,7 @@
       ELSE                       !==   runoff put only at the surface   ==!
          IF( lk_vvl ) THEN              ! variable volume case
-            h_rnf(:,:) = fse3t(:,:,1)   ! recalculate h_rnf to be depth of top box
-         ENDIF
-         phdivn(:,:,1) = phdivn(:,:,1) - ( rnf(:,:) + rnf_b(:,:) ) * zfact * r1_rau0 / fse3t(:,:,1)
+            h_rnf(:,:) = e3t_n(:,:,1)   ! recalculate h_rnf to be depth of top box
+         ENDIF
+         phdivn(:,:,1) = phdivn(:,:,1) - ( rnf(:,:) + rnf_b(:,:) ) * zfact * r1_rau0 / e3t_n(:,:,1)
       ENDIF
       !
@@ -377,5 +375,5 @@
                h_rnf(ji,jj) = 0._wp
                DO jk = 1, nk_rnf(ji,jj)
-                  h_rnf(ji,jj) = h_rnf(ji,jj) + fse3t(ji,jj,jk)
+                  h_rnf(ji,jj) = h_rnf(ji,jj) + e3t_n(ji,jj,jk)
                END DO
             END DO
@@ -435,5 +433,5 @@
                h_rnf(ji,jj) = 0._wp
                DO jk = 1, nk_rnf(ji,jj)
-                  h_rnf(ji,jj) = h_rnf(ji,jj) + fse3t(ji,jj,jk)
+                  h_rnf(ji,jj) = h_rnf(ji,jj) + e3t_n(ji,jj,jk)
                END DO
             END DO
@@ -448,5 +446,5 @@
       ELSE                                       ! runoffs applied at the surface
          nk_rnf(:,:) = 1
-         h_rnf (:,:) = fse3t(:,:,1)
+         h_rnf (:,:) = e3t_n(:,:,1)
       ENDIF
       !
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90	(revision 5845)
@@ -28,9 +28,6 @@
    PUBLIC   sbc_ssm_init    ! routine called by sbcmod.F90
 
-   LOGICAL, SAVE  ::   l_ssm_mean = .FALSE.       ! keep track of whether means have been read
-                                                  ! from restart file
+   LOGICAL, SAVE  ::   l_ssm_mean = .FALSE.       ! keep track of whether means have been read from restart file
    
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -81,5 +78,5 @@
          ENDIF
          !
-         IF( lk_vvl )   e3t_m(:,:) = fse3t_n(:,:,1)
+         IF( lk_vvl )   e3t_m(:,:) = e3t_n(:,:,1)
          !
          frq_m(:,:) = fraqsr_1lev(:,:)
@@ -103,5 +100,5 @@
             ENDIF
             !
-            IF( lk_vvl )   e3t_m(:,:) = zcoef * fse3t_n(:,:,1)
+            IF( lk_vvl )   e3t_m(:,:) = zcoef * e3t_n(:,:,1)
             !
             frq_m(:,:) = zcoef * fraqsr_1lev(:,:)
@@ -131,5 +128,5 @@
          ENDIF
          !
-         IF( lk_vvl )   e3t_m(:,:) = fse3t_m(:,:) + fse3t_n(:,:,1)
+         IF( lk_vvl )   e3t_m(:,:) = e3t_m(:,:) + e3t_n(:,:,1)
          !
          frq_m(:,:) =   frq_m(:,:) + fraqsr_1lev(:,:)
@@ -144,5 +141,5 @@
             ssv_m(:,:) = ssv_m(:,:) * zcoef           !
             ssh_m(:,:) = ssh_m(:,:) * zcoef           ! mean SSH             [m]
-            IF( lk_vvl )   e3t_m(:,:) = fse3t_m(:,:) * zcoef   ! mean vertical scale factor [m]
+            IF( lk_vvl )   e3t_m(:,:) = e3t_m(:,:) * zcoef   ! mean vertical scale factor [m]
             frq_m(:,:) = frq_m(:,:) * zcoef   ! mean fraction of solar net radiation absorbed in the 1st T level [-]
             !
@@ -229,5 +226,5 @@
                sss_m(:,:) = zcoef * sss_m(:,:)
                ssh_m(:,:) = zcoef * ssh_m(:,:)
-               IF( lk_vvl )   e3t_m(:,:) = zcoef * fse3t_m(:,:)
+               IF( lk_vvl )   e3t_m(:,:) = zcoef * e3t_m(:,:)
                frq_m(:,:) = zcoef * frq_m(:,:)
             ELSE
@@ -247,5 +244,5 @@
          sss_m(:,:) = tsn(:,:,1,jp_sal)
          ssh_m(:,:) = sshn(:,:)
-         IF( lk_vvl )   e3t_m(:,:) = fse3t_n(:,:,1)
+         IF( lk_vvl )   e3t_m(:,:) = e3t_n(:,:,1)
          frq_m(:,:) = 1._wp
          !
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 5845)
@@ -47,6 +47,4 @@
    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_sss   ! structure of input SSS (file informations, fields read)
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 4.0 , NEMO Consortium (2011)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90	(revision 5845)
@@ -40,5 +40,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -128,6 +127,6 @@
          !                                      !* distribute it on the vertical
          DO jk = 1, jpkm1
-            zusd_t(:,:,jk) = sf_sd(jp_usd)%fnow(:,:,1) * EXP( -2._wp * sf_sd(jp_wn)%fnow(:,:,1) * fsdept_n(:,:,jk) )
-            zvsd_t(:,:,jk) = sf_sd(jp_vsd)%fnow(:,:,1) * EXP( -2._wp * sf_sd(jp_wn)%fnow(:,:,1) * fsdept_n(:,:,jk) )
+            zusd_t(:,:,jk) = sf_sd(jp_usd)%fnow(:,:,1) * EXP( -2._wp * sf_sd(jp_wn)%fnow(:,:,1) * gdept_n(:,:,jk) )
+            zvsd_t(:,:,jk) = sf_sd(jp_vsd)%fnow(:,:,1) * EXP( -2._wp * sf_sd(jp_wn)%fnow(:,:,1) * gdept_n(:,:,jk) )
          END DO
          !                                      !* interpolate the stokes drift from t-point to u- and v-points
@@ -136,5 +135,5 @@
                DO ji = 1, jpim1
                    usd3d(ji,jj,jk) = 0.5_wp * ( zusd_t(ji  ,jj,jk) + zusd_t(ji+1,jj,jk) ) * umask(ji,jj,jk)
-                   vsd3d(ji,jj,jk) = 0.5_wp * ( zvsd_t(ji  ,jj,jk) + zvsd_t(ji+1,jj,jk) ) * vmask(ji,jj,jk)
+                   vsd3d(ji,jj,jk) = 0.5_wp * ( zvsd_t(ji  ,jj,jk) + zvsd_t(ji,jj+1,jk) ) * vmask(ji,jj,jk)
                END DO
             END DO
@@ -146,8 +145,8 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  ze3hdiv(ji,jj,jk) = (  e2u(ji  ,jj) * fse3u_n(ji  ,jj,jk) * usd3d(ji  ,jj,jk)     &
-                     &                 - e2u(ji-1,jj) * fse3u_n(ji-1,jj,jk) * usd3d(ji-1,jj,jk)     &
-                     &                 + e1v(ji,jj  ) * fse3v_n(ji,jj  ,jk) * vsd3d(ji,jj  ,jk)     &
-                     &                 - e1v(ji,jj-1) * fse3v_n(ji,jj-1,jk) * vsd3d(ji,jj-1,jk)   ) * r1_e1e2t(ji,jj)
+                  ze3hdiv(ji,jj,jk) = (  e2u(ji  ,jj) * e3u_n(ji  ,jj,jk) * usd3d(ji  ,jj,jk)     &
+                     &                 - e2u(ji-1,jj) * e3u_n(ji-1,jj,jk) * usd3d(ji-1,jj,jk)     &
+                     &                 + e1v(ji,jj  ) * e3v_n(ji,jj  ,jk) * vsd3d(ji,jj  ,jk)     &
+                     &                 - e1v(ji,jj-1) * e3v_n(ji,jj-1,jk) * vsd3d(ji,jj-1,jk)   ) * r1_e1e2t(ji,jj)
                END DO  
             END DO  
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SOL/solmat.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SOL/solmat.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SOL/solmat.F90	(revision 5845)
@@ -89,8 +89,8 @@
          DO ji = 2, jpim1
             zcoef = z2dt * z2dt * grav * bmask(ji,jj)
-            zcoefs = -zcoef * hv(ji  ,jj-1) * e1_e2v(ji  ,jj-1)    ! south coefficient
-            zcoefw = -zcoef * hu(ji-1,jj  ) * e2_e1u(ji-1,jj  )    ! west coefficient
-            zcoefe = -zcoef * hu(ji  ,jj  ) * e2_e1u(ji  ,jj  )    ! east coefficient
-            zcoefn = -zcoef * hv(ji  ,jj  ) * e1_e2v(ji  ,jj  )    ! north coefficient
+            zcoefs = -zcoef * hv_n(ji  ,jj-1) * e1_e2v(ji  ,jj-1)    ! south coefficient
+            zcoefw = -zcoef * hu_n(ji-1,jj  ) * e2_e1u(ji-1,jj  )    ! west coefficient
+            zcoefe = -zcoef * hu_n(ji  ,jj  ) * e2_e1u(ji  ,jj  )    ! east coefficient
+            zcoefn = -zcoef * hv_n(ji  ,jj  ) * e1_e2v(ji  ,jj  )    ! north coefficient
             gcp(ji,jj,1) = zcoefs
             gcp(ji,jj,2) = zcoefw
@@ -110,20 +110,20 @@
 
             !  south coefficient
-            zcoefs = -zcoef * hv(ji,jj-1) * e1_e2v(ji,jj-1)
+            zcoefs = -zcoef * hv_n(ji,jj-1) * e1_e2v(ji,jj-1)
             zcoefs = zcoefs * bdyvmask(ji,jj-1)
             gcp(ji,jj,1) = zcoefs
 
             !  west coefficient
-            zcoefw = -zcoef * hu(ji-1,jj) * e2_e1u(ji-1,jj)
+            zcoefw = -zcoef * hu_n(ji-1,jj) * e2_e1u(ji-1,jj)
             zcoefw = zcoefw * bdyumask(ji-1,jj)
             gcp(ji,jj,2) = zcoefw
 
             !  east coefficient
-            zcoefe = -zcoef * hu(ji,jj) * e2_e1u(ji,jj)
+            zcoefe = -zcoef * hu_n(ji,jj) * e2_e1u(ji,jj)
             zcoefe = zcoefe * bdyumask(ji,jj)
             gcp(ji,jj,3) = zcoefe
 
             !  north coefficient
-            zcoefn = -zcoef * hv(ji,jj) * e1_e2v(ji,jj)
+            zcoefn = -zcoef * hv_n(ji,jj) * e1_e2v(ji,jj)
             zcoefn = zcoefn * bdyvmask(ji,jj)
             gcp(ji,jj,4) = zcoefn
@@ -148,7 +148,7 @@
                !  south coefficient
                IF( ( nbondj == -1 .OR. nbondj == 2 ) .AND. ( jj == 3 ) ) THEN
-                  zcoefs = -zcoef * hv(ji,jj-1) * e1_e2v(ji,jj-1)*(1.-vmask(ji,jj-1,1))
+                  zcoefs = -zcoef * hv_n(ji,jj-1) * e1_e2v(ji,jj-1)*(1.-vmask(ji,jj-1,1))
                ELSE
-                  zcoefs = -zcoef * hv(ji,jj-1) * e1_e2v(ji,jj-1)
+                  zcoefs = -zcoef * hv_n(ji,jj-1) * e1_e2v(ji,jj-1)
                END IF
                gcp(ji,jj,1) = zcoefs
@@ -156,7 +156,7 @@
                !  west coefficient
                IF( ( nbondi == -1 .OR. nbondi == 2 ) .AND. ( ji == 3 )  ) THEN
-                  zcoefw = -zcoef * hu(ji-1,jj) * e2_e1u(ji-1,jj)*(1.-umask(ji-1,jj,1))
+                  zcoefw = -zcoef * hu_n(ji-1,jj) * e2_e1u(ji-1,jj)*(1.-umask(ji-1,jj,1))
                ELSE
-                  zcoefw = -zcoef * hu(ji-1,jj) * e2_e1u(ji-1,jj)
+                  zcoefw = -zcoef * hu_n(ji-1,jj) * e2_e1u(ji-1,jj)
                END IF
                gcp(ji,jj,2) = zcoefw
@@ -164,7 +164,7 @@
                !   east coefficient
                IF( ( nbondi == 1 .OR. nbondi == 2 ) .AND. ( ji == nlci-2 ) ) THEN
-                  zcoefe = -zcoef * hu(ji,jj) * e2_e1u(ji,jj)*(1.-umask(ji,jj,1))
+                  zcoefe = -zcoef * hu_n(ji,jj) * e2_e1u(ji,jj)*(1.-umask(ji,jj,1))
                ELSE
-                  zcoefe = -zcoef * hu(ji,jj) * e2_e1u(ji,jj)
+                  zcoefe = -zcoef * hu_n(ji,jj) * e2_e1u(ji,jj)
                END IF
                gcp(ji,jj,3) = zcoefe
@@ -172,7 +172,7 @@
                !   north coefficient
                IF( ( nbondj == 1 .OR. nbondj == 2 ) .AND. ( jj == nlcj-2 ) ) THEN
-                  zcoefn = -zcoef * hv(ji,jj) * e1_e2v(ji,jj)*(1.-vmask(ji,jj,1))
+                  zcoefn = -zcoef * hv_n(ji,jj) * e1_e2v(ji,jj)*(1.-vmask(ji,jj,1))
                ELSE
-                  zcoefn = -zcoef * hv(ji,jj) * e1_e2v(ji,jj)
+                  zcoefn = -zcoef * hv_n(ji,jj) * e1_e2v(ji,jj)
                END IF
                gcp(ji,jj,4) = zcoefn
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90	(revision 5845)
@@ -172,5 +172,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -587,5 +586,5 @@
                DO ji = 1, jpi
                   !
-                  zh  = fsdept(ji,jj,jk) * r1_Z0                                ! depth
+                  zh  = gdept_n(ji,jj,jk) * r1_Z0                                ! depth
                   zt  = pts (ji,jj,jk,jp_tem) * r1_T0                           ! temperature
                   zs  = SQRT( ABS( pts(ji,jj,jk,jp_sal) + rdeltaS ) * r1_S0 )   ! square root salinity
@@ -645,5 +644,5 @@
                   zt  = pts (ji,jj,jk,jp_tem) - 10._wp   ! pot. temperature anomaly (t-T0)
                   zs  = pts (ji,jj,jk,jp_sal) - 35._wp   ! abs. salinity anomaly (s-S0)
-                  zh  = fsdept(ji,jj,jk)                 ! depth in meters at t-point
+                  zh  = gdept_n(ji,jj,jk)                ! depth in meters at t-point
                   ztm = tmask(ji,jj,jk)                  ! land/sea bottom mask = surf. mask
                   !
@@ -913,6 +912,6 @@
          DO jj = 1, jpj          ! surface and bottom value set to zero one for all in istate.F90
             DO ji = 1, jpi
-               zrw =   ( fsdepw(ji,jj,jk  ) - fsdept(ji,jj,jk) )   &
-                  &  / ( fsdept(ji,jj,jk-1) - fsdept(ji,jj,jk) ) 
+               zrw =   ( gdepw_n(ji,jj,jk  ) - gdept_n(ji,jj,jk) )   &
+                  &  / ( gdept_n(ji,jj,jk-1) - gdept_n(ji,jj,jk) ) 
                   !
                zaw = pab(ji,jj,jk,jp_tem) * (1. - zrw) + pab(ji,jj,jk-1,jp_tem) * zrw 
@@ -921,5 +920,5 @@
                pn2(ji,jj,jk) = grav * (  zaw * ( pts(ji,jj,jk-1,jp_tem) - pts(ji,jj,jk,jp_tem) )     &
                   &                    - zbw * ( pts(ji,jj,jk-1,jp_sal) - pts(ji,jj,jk,jp_sal) )  )  &
-                  &            / fse3w(ji,jj,jk) * tmask(ji,jj,jk)
+                  &            / e3w_n(ji,jj,jk) * tmask(ji,jj,jk)
             END DO
          END DO
@@ -1129,5 +1128,5 @@
                DO ji = 1, jpi
                   !
-                  zh  = fsdept(ji,jj,jk) * r1_Z0                                ! depth
+                  zh  = gdept_n(ji,jj,jk) * r1_Z0                                ! depth
                   zt  = pts (ji,jj,jk,jp_tem) * r1_T0                           ! temperature
                   zs  = SQRT( ABS( pts(ji,jj,jk,jp_sal) + rdeltaS ) * r1_S0 )   ! square root salinity
@@ -1193,5 +1192,5 @@
                   zt  = pts(ji,jj,jk,jp_tem) - 10._wp  ! temperature anomaly (t-T0)
                   zs = pts (ji,jj,jk,jp_sal) - 35._wp  ! abs. salinity anomaly (s-S0)
-                  zh  = fsdept(ji,jj,jk)               ! depth in meters  at t-point
+                  zh  = gdept_n(ji,jj,jk)              ! depth in meters  at t-point
                   ztm = tmask(ji,jj,jk)                ! tmask
                   zn  = 0.5_wp * zh * r1_rau0 * ztm
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 5845)
@@ -66,5 +66,4 @@
    
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -102,6 +101,6 @@
       !                                         !==  effective transport  ==!
       DO jk = 1, jpkm1
-         zun(:,:,jk) = e2u  (:,:) * fse3u(:,:,jk) * un(:,:,jk)                  ! eulerian transport only
-         zvn(:,:,jk) = e1v  (:,:) * fse3v(:,:,jk) * vn(:,:,jk)
+         zun(:,:,jk) = e2u  (:,:) * e3u_n(:,:,jk) * un(:,:,jk)                  ! eulerian transport only
+         zvn(:,:,jk) = e1v  (:,:) * e3v_n(:,:,jk) * vn(:,:,jk)
          zwn(:,:,jk) = e1e2t(:,:)                 * wn(:,:,jk)
       END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen.F90	(revision 5845)
@@ -34,5 +34,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -183,5 +182,5 @@
                      &             - (  zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )    &
                      &                + zwy(ji,jj,jk) - zwy(ji  ,jj-1,jk  )    &
-                     &                + zwz(ji,jj,jk) - zwz(ji  ,jj  ,jk+1)  ) / ( e1e2t(ji,jj) *  fse3t_n(ji,jj,jk) )
+                     &                + zwz(ji,jj,jk) - zwz(ji  ,jj  ,jk+1)  ) / ( e1e2t(ji,jj) *  e3t_n(ji,jj,jk) )
                END DO
             END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90	(revision 5845)
@@ -40,5 +40,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -156,5 +155,5 @@
                   ztra = - (  zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )   &
                      &      + zwy(ji,jj,jk) - zwy(ji  ,jj-1,jk  )   &
-                     &      + zwz(ji,jj,jk) - zwz(ji  ,jj  ,jk+1) ) / ( e1e2t(ji,jj) * fse3t_n(ji,jj,jk) )
+                     &      + zwz(ji,jj,jk) - zwz(ji  ,jj  ,jk+1) ) / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                   ! update and guess with monotonic sheme
 !!gm why tmask added in the two following lines ???    the mask is done in tranxt !
@@ -296,5 +295,5 @@
                      &                                   + zwy(ji,jj,jk) - zwy(ji  ,jj-1,jk  )   &
                      &                                   + zwz(ji,jj,jk) - zwz(ji  ,jj  ,jk+1) ) &
-                     &                                / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
+                     &                                / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                END DO
             END DO
@@ -450,5 +449,5 @@
                   ztra = - (  zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )   &
                      &      + zwy(ji,jj,jk) - zwy(ji  ,jj-1,jk  )   &
-                     &      + zwz(ji,jj,jk) - zwz(ji  ,jj  ,jk+1) ) / ( e1e2t(ji,jj) * fse3t_n(ji,jj,jk) )
+                     &      + zwz(ji,jj,jk) - zwz(ji  ,jj  ,jk+1) ) / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                   ! update and guess with monotonic sheme
                   pta(ji,jj,jk,jn) =   pta(ji,jj,jk,jn)         + ztra
@@ -548,5 +547,5 @@
                      ztrs(ji,jj,jk,jta) = ztrs(ji,jj,jk,jtb)                                                 &
                         &               - zts(jk) * (  zhdiv(ji,jj,jk) + zwz(ji,jj,jk) - zwz(ji,jj,jk+1) )   &
-                        &                         / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
+                        &                         / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                   END DO
                END DO
@@ -577,5 +576,5 @@
                   pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + (   zwy(ji,jj,jk) - zwy(ji  ,jj-1,jk  )       &
                      &                                    + zwz(ji,jj,jk) - zwz(ji  ,jj  ,jk+1)   )   &
-                     &                                / ( e1e2t(ji,jj) * fse3t_n(ji,jj,jk) )
+                     &                                / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                END DO
             END DO
@@ -680,5 +679,5 @@
 
                ! up & down beta terms
-               zbt = e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) / z2dtt
+               zbt = e1t(ji,jj) * e2t(ji,jj) * e3t_n(ji,jj,jk) / z2dtt
                zbetup(ji,jj,jk) = ( zup            - paft(ji,jj,jk) ) / ( zpos + zrtrn ) * zbt
                zbetdo(ji,jj,jk) = ( paft(ji,jj,jk) - zdo            ) / ( zneg + zrtrn ) * zbt
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90	(revision 5845)
@@ -49,5 +49,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -125,5 +124,5 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               zc = fse3t(ji,jj,jk) * REAL( MIN( MAX( 0, inml_mle(ji,jj)-jk ) , 1  )  )    ! zc being 0 outside the ML t-points
+               zc = e3t_n(ji,jj,jk) * REAL( MIN( MAX( 0, inml_mle(ji,jj)-jk ) , 1  )  )    ! zc being 0 outside the ML t-points
                zmld(ji,jj) = zmld(ji,jj) + zc
                zbm (ji,jj) = zbm (ji,jj) + zc * (rau0 - rhop(ji,jj,jk) ) * r1_rau0
@@ -157,5 +156,5 @@
       END SELECT
       !                                                ! convert density into buoyancy
-      zbm(:,:) = + grav * zbm(:,:) / MAX( fse3t(:,:,1), zmld(:,:) )
+      zbm(:,:) = + grav * zbm(:,:) / MAX( e3t_n(:,:,1), zmld(:,:) )
       !
       !
@@ -215,6 +214,6 @@
          DO jj = 1, jpjm1
             DO ji = 1, fs_jpim1   ! vector opt.
-               zcuw = 1._wp - ( fsdepw(ji+1,jj,jk) + fsdepw(ji,jj,jk) ) * zhu(ji,jj)
-               zcvw = 1._wp - ( fsdepw(ji,jj+1,jk) + fsdepw(ji,jj,jk) ) * zhv(ji,jj)
+               zcuw = 1._wp - ( gdepw_n(ji+1,jj,jk) + gdepw_n(ji,jj,jk) ) * zhu(ji,jj)
+               zcvw = 1._wp - ( gdepw_n(ji,jj+1,jk) + gdepw_n(ji,jj,jk) ) * zhv(ji,jj)
                zcuw = zcuw * zcuw
                zcvw = zcvw * zcvw
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90	(revision 5845)
@@ -42,5 +42,4 @@
    
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -170,5 +169,5 @@
                   z0u = SIGN( 0.5, pun(ji,jj,jk) )
                   zalpha = 0.5 - z0u
-                  zu  = z0u - 0.5 * pun(ji,jj,jk) * zdt / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
+                  zu  = z0u - 0.5 * pun(ji,jj,jk) * zdt / ( e1e2u(ji,jj) * e3u_n(ji,jj,jk) )
                   zzwx = ptb(ji+1,jj,jk,jn) + xind(ji,jj,jk) * zu * zslpx(ji+1,jj,jk)
                   zzwy = ptb(ji  ,jj,jk,jn) + xind(ji,jj,jk) * zu * zslpx(ji  ,jj,jk)
@@ -177,5 +176,5 @@
                   z0v = SIGN( 0.5, pvn(ji,jj,jk) )
                   zalpha = 0.5 - z0v
-                  zv  = z0v - 0.5 * pvn(ji,jj,jk) * zdt / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
+                  zv  = z0v - 0.5 * pvn(ji,jj,jk) * zdt / ( e1e2v(ji,jj) * e3v_n(ji,jj,jk) )
                   zzwx = ptb(ji,jj+1,jk,jn) + xind(ji,jj,jk) * zv * zslpy(ji,jj+1,jk)
                   zzwy = ptb(ji,jj  ,jk,jn) + xind(ji,jj,jk) * zv * zslpy(ji,jj  ,jk)
@@ -191,5 +190,5 @@
                   pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) - ( zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )       &
                   &                                     + zwy(ji,jj,jk) - zwy(ji  ,jj-1,jk  ) )     &
-                  &                                   / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  &                                   / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                END DO
            END DO
@@ -243,5 +242,5 @@
                   z0w = SIGN( 0.5, pwn(ji,jj,jk+1) )
                   zalpha = 0.5 + z0w
-                  zw  = z0w - 0.5 * pwn(ji,jj,jk+1) * zdt  / ( e1e2t(ji,jj) * fse3w(ji,jj,jk+1) )
+                  zw  = z0w - 0.5 * pwn(ji,jj,jk+1) * zdt  / ( e1e2t(ji,jj) * e3w_n(ji,jj,jk+1) )
                   zzwx = ptb(ji,jj,jk+1,jn) + xind(ji,jj,jk) * zw * zslpx(ji,jj,jk+1)
                   zzwy = ptb(ji,jj,jk  ,jn) + xind(ji,jj,jk) * zw * zslpx(ji,jj,jk  )
@@ -268,5 +267,5 @@
             DO jj = 2, jpjm1      
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  pta(ji,jj,jk,jn) =  pta(ji,jj,jk,jn) - ( zwx(ji,jj,jk) - zwx(ji,jj,jk+1) ) / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  pta(ji,jj,jk,jn) =  pta(ji,jj,jk,jn) - ( zwx(ji,jj,jk) - zwx(ji,jj,jk+1) ) / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                END DO
             END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 5845)
@@ -39,5 +39,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -171,5 +170,5 @@
                DO ji = fs_2, fs_jpim1   ! vector opt.   
                   zdir = 0.5 + SIGN( 0.5, pun(ji,jj,jk) )   ! if pun > 0 : zdir = 1 otherwise zdir = 0 
-                  zdx = ( zdir * e1t(ji,jj) + ( 1. - zdir ) * e1t(ji+1,jj) ) * e2u(ji,jj) * fse3u(ji,jj,jk)
+                  zdx = ( zdir * e1t(ji,jj) + ( 1. - zdir ) * e1t(ji+1,jj) ) * e2u(ji,jj) * e3u_n(ji,jj,jk)
                   zwx(ji,jj,jk)  = ABS( pun(ji,jj,jk) ) * zdt / zdx    ! (0<zc_cfl<1 : Courant number on x-direction)
                   zfc(ji,jj,jk)  = zdir * ptb(ji  ,jj,jk,jn) + ( 1. - zdir ) * ptb(ji+1,jj,jk,jn)  ! FC in the x-direction for T
@@ -217,5 +216,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.  
-                  zbtr = 1. / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                   ! horizontal advective trends
                   ztra = - zbtr * ( zwx(ji,jj,jk) - zwx(ji-1,jj,jk) )
@@ -294,5 +293,5 @@
                DO ji = fs_2, fs_jpim1   ! vector opt.   
                   zdir = 0.5 + SIGN( 0.5, pvn(ji,jj,jk) )   ! if pun > 0 : zdir = 1 otherwise zdir = 0 
-                  zdx = ( zdir * e2t(ji,jj) + ( 1. - zdir ) * e2t(ji,jj+1) ) * e1v(ji,jj) * fse3v(ji,jj,jk)
+                  zdx = ( zdir * e2t(ji,jj) + ( 1. - zdir ) * e2t(ji,jj+1) ) * e1v(ji,jj) * e3v_n(ji,jj,jk)
                   zwy(ji,jj,jk)  = ABS( pvn(ji,jj,jk) ) * zdt / zdx    ! (0<zc_cfl<1 : Courant number on x-direction)
                   zfc(ji,jj,jk)  = zdir * ptb(ji,jj  ,jk,jn) + ( 1. - zdir ) * ptb(ji,jj+1,jk,jn)  ! FC in the x-direction for T
@@ -341,5 +340,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.  
-                  zbtr = 1. / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                   ! horizontal advective trends
                   ztra = - zbtr * ( zwy(ji,jj,jk) - zwy(ji,jj-1,jk) )
@@ -413,5 +412,5 @@
                DO ji = fs_2, fs_jpim1   ! vector opt.
                   pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) - ( zwz(ji,jj,jk) - zwz(ji,jj,jk+1) )   &
-                     &                                / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
+                     &                                / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                END DO
             END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 5845)
@@ -36,5 +36,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -122,6 +121,6 @@
             DO jj = 1, jpjm1              ! First derivative (masked gradient)
                DO ji = 1, fs_jpim1   ! vector opt.
-                  zeeu = e2_e1u(ji,jj) * fse3u(ji,jj,jk) * umask(ji,jj,jk)
-                  zeev = e1_e2v(ji,jj) * fse3v(ji,jj,jk) * vmask(ji,jj,jk)
+                  zeeu = e2_e1u(ji,jj) * e3u_n(ji,jj,jk) * umask(ji,jj,jk)
+                  zeev = e1_e2v(ji,jj) * e3v_n(ji,jj,jk) * vmask(ji,jj,jk)
                   ztu(ji,jj,jk) = zeeu * ( ptb(ji+1,jj  ,jk,jn) - ptb(ji,jj,jk,jn) )
                   ztv(ji,jj,jk) = zeev * ( ptb(ji  ,jj+1,jk,jn) - ptb(ji,jj,jk,jn) )
@@ -130,5 +129,5 @@
             DO jj = 2, jpjm1              ! Second derivative (divergence)
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zcoef = 1._wp / ( 6._wp * fse3t(ji,jj,jk) )
+                  zcoef = 1._wp / ( 6._wp * e3t_n(ji,jj,jk) )
                   zltu(ji,jj,jk) = (  ztu(ji,jj,jk) - ztu(ji-1,jj,jk)  ) * zcoef
                   zltv(ji,jj,jk) = (  ztv(ji,jj,jk) - ztv(ji,jj-1,jk)  ) * zcoef
@@ -163,5 +162,5 @@
                   pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn)                        &
                      &             - (  ztu(ji,jj,jk) - ztu(ji-1,jj  ,jk)    &
-                     &                + ztv(ji,jj,jk) - ztv(ji  ,jj-1,jk)  ) / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
+                     &                + ztv(ji,jj,jk) - ztv(ji  ,jj-1,jk)  ) / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                END DO
             END DO
@@ -216,5 +215,5 @@
                DO jj = 2, jpjm1
                   DO ji = fs_2, fs_jpim1   ! vector opt.
-                     ztak = - ( ztw(ji,jj,jk) - ztw(ji,jj,jk+1) ) / ( e1e2t(ji,jj) * fse3t_n(ji,jj,jk) )
+                     ztak = - ( ztw(ji,jj,jk) - ztw(ji,jj,jk+1) ) / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                      pta(ji,jj,jk,jn) =   pta(ji,jj,jk,jn) +  ztak 
                      zti(ji,jj,jk)    = ( ptb(ji,jj,jk,jn) + z2dtt * ( ztak + zltu(ji,jj,jk) ) ) * tmask(ji,jj,jk)
@@ -254,5 +253,5 @@
             DO jj = 2, jpjm1 
                DO ji = fs_2, fs_jpim1   ! vector opt.   
-                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) - ( ztw(ji,jj,jk) - ztw(ji,jj,jk+1) ) / ( e1e2t(ji,jj) * fse3t_n(ji,jj,jk) )
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) - ( ztw(ji,jj,jk) - ztw(ji,jj,jk+1) ) / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                END DO
             END DO
@@ -265,5 +264,5 @@
                      zltv(ji,jj,jk) = pta(ji,jj,jk,jn) - zltv(ji,jj,jk)                          &
                         &           + ptn(ji,jj,jk,jn) * (  pwn(ji,jj,jk) - pwn(ji,jj,jk+1)  )   &
-                        &                              / ( e1e2t(ji,jj) * fse3t_n(ji,jj,jk) )
+                        &                              / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                   END DO
                END DO
@@ -357,5 +356,5 @@
                zneg = MAX( 0., pcc(ji  ,jj  ,jk  ) ) - MIN( 0., pcc(ji  ,jj  ,jk+1) )
                ! up & down beta terms
-               zbt = e1e2t(ji,jj) * fse3t(ji,jj,jk) / z2dtt
+               zbt = e1e2t(ji,jj) * e3t_n(ji,jj,jk) / z2dtt
                zbetup(ji,jj,jk) = ( zbetup(ji,jj,jk) - paft(ji,jj,jk) ) / (zpos+zrtrn) * zbt
                zbetdo(ji,jj,jk) = ( paft(ji,jj,jk) - zbetdo(ji,jj,jk) ) / (zneg+zrtrn) * zbt
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trabbc.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trabbc.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trabbc.F90	(revision 5845)
@@ -40,9 +40,8 @@
    REAL(wp)        ::   rn_geoflx_cst !  Constant value of geothermal heat flux
 
-   REAL(wp), PUBLIC, DIMENSION(:,:), ALLOCATABLE ::   qgh_trd0   ! geothermal heating trend
+   REAL(wp), PUBLIC , ALLOCATABLE, DIMENSION(:,:) ::   qgh_trd0   ! geothermal heating trend
+
    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_qgh              ! structure of input qgh (file informations, fields read)
  
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -92,5 +91,5 @@
          DO ji = 2, jpim1
             ik = mbkt(ji,jj)
-            zqgh_trd = qgh_trd0(ji,jj) / fse3t(ji,jj,ik)
+            zqgh_trd = qgh_trd0(ji,jj) / e3t_n(ji,jj,ik)
             tsa(ji,jj,ik,jp_tem) = tsa(ji,jj,ik,jp_tem) + zqgh_trd
          END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 5845)
@@ -70,5 +70,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -211,5 +210,5 @@
                   &                + ahv_bbl(ji  ,jj  ) * ( zptb(ji  ,jj+1) - zptb(ji  ,jj  ) )     &
                   &                - ahv_bbl(ji  ,jj-1) * ( zptb(ji  ,jj  ) - zptb(ji  ,jj-1) )  )  &
-                  &             / ( e1e2t(ji,jj) * fse3t(ji,jj,ik) )
+                  &             / ( e1e2t(ji,jj) * e3t_n(ji,jj,ik) )
             END DO
          END DO
@@ -263,15 +262,15 @@
                   !
                   !                                               ! up  -slope T-point (shelf bottom point)
-                  zbtr = r1_e1e2t(iis,jj) / fse3t(iis,jj,ikus)
+                  zbtr = r1_e1e2t(iis,jj) / e3t_n(iis,jj,ikus)
                   ztra = zu_bbl * ( ptb(iid,jj,ikus,jn) - ptb(iis,jj,ikus,jn) ) * zbtr
                   pta(iis,jj,ikus,jn) = pta(iis,jj,ikus,jn) + ztra
                   !
                   DO jk = ikus, ikud-1                            ! down-slope upper to down T-point (deep column)
-                     zbtr = r1_e1e2t(iid,jj) / fse3t(iid,jj,jk)
+                     zbtr = r1_e1e2t(iid,jj) / e3t_n(iid,jj,jk)
                      ztra = zu_bbl * ( ptb(iid,jj,jk+1,jn) - ptb(iid,jj,jk,jn) ) * zbtr
                      pta(iid,jj,jk,jn) = pta(iid,jj,jk,jn) + ztra
                   END DO
                   !
-                  zbtr = r1_e1e2t(iid,jj) / fse3t(iid,jj,ikud)
+                  zbtr = r1_e1e2t(iid,jj) / e3t_n(iid,jj,ikud)
                   ztra = zu_bbl * ( ptb(iis,jj,ikus,jn) - ptb(iid,jj,ikud,jn) ) * zbtr
                   pta(iid,jj,ikud,jn) = pta(iid,jj,ikud,jn) + ztra
@@ -285,15 +284,15 @@
                   !
                   ! up  -slope T-point (shelf bottom point)
-                  zbtr = r1_e1e2t(ji,ijs) / fse3t(ji,ijs,ikvs)
+                  zbtr = r1_e1e2t(ji,ijs) / e3t_n(ji,ijs,ikvs)
                   ztra = zv_bbl * ( ptb(ji,ijd,ikvs,jn) - ptb(ji,ijs,ikvs,jn) ) * zbtr
                   pta(ji,ijs,ikvs,jn) = pta(ji,ijs,ikvs,jn) + ztra
                   !
                   DO jk = ikvs, ikvd-1                            ! down-slope upper to down T-point (deep column)
-                     zbtr = r1_e1e2t(ji,ijd) / fse3t(ji,ijd,jk)
+                     zbtr = r1_e1e2t(ji,ijd) / e3t_n(ji,ijd,jk)
                      ztra = zv_bbl * ( ptb(ji,ijd,jk+1,jn) - ptb(ji,ijd,jk,jn) ) * zbtr
                      pta(ji,ijd,jk,jn) = pta(ji,ijd,jk,jn)  + ztra
                   END DO
                   !                                               ! down-slope T-point (deep bottom point)
-                  zbtr = r1_e1e2t(ji,ijd) / fse3t(ji,ijd,ikvd)
+                  zbtr = r1_e1e2t(ji,ijd) / e3t_n(ji,ijd,ikvd)
                   ztra = zv_bbl * ( ptb(ji,ijs,ikvs,jn) - ptb(ji,ijd,ikvd,jn) ) * zbtr
                   pta(ji,ijd,ikvd,jn) = pta(ji,ijd,ikvd,jn) + ztra
@@ -365,5 +364,5 @@
             zts (ji,jj,jp_sal) = tsb(ji,jj,ik,jp_sal)
             !
-            zdep(ji,jj) = fsdept(ji,jj,ik)               ! bottom T-level reference depth
+            zdep(ji,jj) = gdept_n(ji,jj,ik)              ! bottom T-level reference depth
             zub (ji,jj) = un(ji,jj,mbku(ji,jj))          ! bottom velocity
             zvb (ji,jj) = vn(ji,jj,mbkv(ji,jj))
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90	(revision 5845)
@@ -52,5 +52,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -139,5 +138,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  IF( fsdept(ji,jj,jk) >= hmlp (ji,jj) ) THEN
+                  IF( gdept_n(ji,jj,jk) >= hmlp (ji,jj) ) THEN
                      tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem)   &
                         &                 + resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jp_tem) - tsb(ji,jj,jk,jp_tem) )
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90	(revision 5845)
@@ -43,5 +43,4 @@
    
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_blp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_blp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_blp.F90	(revision 5845)
@@ -46,5 +46,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 5845)
@@ -38,5 +38,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -183,5 +182,5 @@
                      DO ji = 1, fs_jpim1
                         akz(ji,jj,jk) = 16._wp * ah_wslp2(ji,jj,jk)   &
-                           &          * (  akz(ji,jj,jk) + ah_wslp2(ji,jj,jk) / ( fse3w(ji,jj,jk) * fse3w(ji,jj,jk) )  )
+                           &          * (  akz(ji,jj,jk) + ah_wslp2(ji,jj,jk) / ( e3w_n(ji,jj,jk) * e3w_n(ji,jj,jk) )  )
                      END DO
                   END DO
@@ -191,5 +190,5 @@
                   DO jj = 1, jpjm1
                      DO ji = 1, fs_jpim1
-                        ze3w_2 = fse3w(ji,jj,jk) * fse3w(ji,jj,jk)
+                        ze3w_2 = e3w_n(ji,jj,jk) * e3w_n(ji,jj,jk)
                         zcoef0 = z2dt * (  akz(ji,jj,jk) + ah_wslp2(ji,jj,jk) / ze3w_2  )
                         akz(ji,jj,jk) = MAX( zcoef0 - 0.5_wp , 0._wp ) * ze3w_2 * z1_2dt
@@ -269,6 +268,6 @@
             DO jj = 1 , jpjm1            !==  Horizontal fluxes
                DO ji = 1, fs_jpim1   ! vector opt.
-                  zabe1 = pahu(ji,jj,jk) * e2_e1u(ji,jj) * fse3u_n(ji,jj,jk)
-                  zabe2 = pahv(ji,jj,jk) * e1_e2v(ji,jj) * fse3v_n(ji,jj,jk)
+                  zabe1 = pahu(ji,jj,jk) * e2_e1u(ji,jj) * e3u_n(ji,jj,jk)
+                  zabe2 = pahv(ji,jj,jk) * e1_e2v(ji,jj) * e3v_n(ji,jj,jk)
                   !
                   zmsku = 1. / MAX(  tmask(ji+1,jj,jk  ) + tmask(ji,jj,jk+1)   &
@@ -294,5 +293,5 @@
                   pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + zsign * (  zftu(ji,jj,jk) - zftu(ji-1,jj,jk)      &
                      &                                           + zftv(ji,jj,jk) - zftv(ji,jj-1,jk)  )   &
-                     &                                        / (  e1e2t(ji,jj) * fse3t(ji,jj,jk)  )
+                     &                                        / (  e1e2t(ji,jj) * e3t_n(ji,jj,jk)  )
                END DO
             END DO
@@ -343,5 +342,5 @@
                DO jj = 1, jpjm1
                   DO ji = fs_2, fs_jpim1
-                     ztfw(ji,jj,jk) = ztfw(ji,jj,jk) + e1e2t(ji,jj) / fse3w(ji,jj,jk) * tmask(ji,jj,jk)   &
+                     ztfw(ji,jj,jk) = ztfw(ji,jj,jk) + e1e2t(ji,jj) / e3w_n(ji,jj,jk) * tmask(ji,jj,jk)   &
                         &                            * ( ah_wslp2(ji,jj,jk) - akz(ji,jj,jk) )             &
                         &                            * ( ptb(ji,jj,jk-1,jn) - ptb(ji,jj,jk,jn) )
@@ -358,5 +357,5 @@
                         ztfw(ji,jj,jk) = ztfw(ji,jj,jk)    &
                            &           + ah_wslp2(ji,jj,jk) * e1e2t(ji,jj)   &
-                           &           * ( ptb(ji,jj,jk-1,jn) - ptb(ji,jj,jk,jn) ) * tmask(ji,jj,jk) / fse3w(ji,jj,jk)
+                           &           * ( ptb(ji,jj,jk-1,jn) - ptb(ji,jj,jk,jn) ) * tmask(ji,jj,jk) / e3w_n(ji,jj,jk)
                      END DO
                   END DO
@@ -366,5 +365,5 @@
                   DO jj = 1, jpjm1
                      DO ji = fs_2, fs_jpim1
-                        ztfw(ji,jj,jk) = ztfw(ji,jj,jk) + e1e2t(ji,jj) / fse3w(ji,jj,jk) * tmask(ji,jj,jk)                      &
+                        ztfw(ji,jj,jk) = ztfw(ji,jj,jk) + e1e2t(ji,jj) / e3w_n(ji,jj,jk) * tmask(ji,jj,jk)                      &
                            &                            * (  ah_wslp2(ji,jj,jk) * ( ptb (ji,jj,jk-1,jn) - ptb (ji,jj,jk,jn) )   &
                            &                               + akz     (ji,jj,jk) * ( ptbb(ji,jj,jk-1,jn) - ptbb(ji,jj,jk,jn) )   )
@@ -379,5 +378,5 @@
                DO ji = fs_2, fs_jpim1   ! vector opt.
                   pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + zsign * (  ztfw (ji,jj,jk) - ztfw(ji,jj,jk+1)  )   &
-                     &                                        / (  e1e2t(ji,jj) * fse3t_n(ji,jj,jk)  )
+                     &                                        / (  e1e2t(ji,jj) * e3t_n(ji,jj,jk)  )
                END DO
             END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap.F90	(revision 5845)
@@ -38,5 +38,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -100,6 +99,6 @@
          DO jj = 1, jpjm1
             DO ji = 1, fs_jpim1   ! vector opt.
-               zaheeu(ji,jj,jk) = zsign * pahu(ji,jj,jk) * e2_e1u(ji,jj) * fse3u_n(ji,jj,jk)   !!gm   * umask(ji,jj,jk) pah masked!
-               zaheev(ji,jj,jk) = zsign * pahv(ji,jj,jk) * e1_e2v(ji,jj) * fse3v_n(ji,jj,jk)   !!gm   * vmask(ji,jj,jk)
+               zaheeu(ji,jj,jk) = zsign * pahu(ji,jj,jk) * e2_e1u(ji,jj) * e3u_n(ji,jj,jk)   !!gm   * umask(ji,jj,jk) pah masked!
+               zaheev(ji,jj,jk) = zsign * pahv(ji,jj,jk) * e1_e2v(ji,jj) * e3v_n(ji,jj,jk)   !!gm   * vmask(ji,jj,jk)
             END DO
          END DO
@@ -140,5 +139,5 @@
                   pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + (  ztu(ji,jj,jk) - ztu(ji-1,jj,jk)     &
                      &                                   + ztv(ji,jj,jk) - ztv(ji,jj-1,jk) )   &
-                     &                                / ( e1e2t(ji,jj) * fse3t_n(ji,jj,jk) )
+                     &                                / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                END DO
             END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_triad.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_triad.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_triad.F90	(revision 5845)
@@ -37,5 +37,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -142,10 +141,10 @@
                   DO jj = 1, jpjm1
                      DO ji = 1, fs_jpim1
-                        ze3wr = 1._wp / fse3w(ji+ip,jj,jk+kp)
-                        zbu   = e1e2u(ji,jj) * fse3u(ji,jj,jk)
+                        ze3wr = 1._wp / e3w_n(ji+ip,jj,jk+kp)
+                        zbu   = e1e2u(ji,jj) * e3u_n(ji,jj,jk)
                         zah   = 0.25_wp * pahu(ji,jj,jk)
                         zslope_skew = triadi_g(ji+ip,jj,jk,1-ip,kp)
                         ! Subtract s-coordinate slope at t-points to give slope rel to s-surfaces (do this by *adding* gradient of depth)
-                        zslope2 = zslope_skew + ( fsdept(ji+1,jj,jk) - fsdept(ji,jj,jk) ) * r1_e1u(ji,jj) * umask(ji,jj,jk+kp)
+                        zslope2 = zslope_skew + ( gdept_n(ji+1,jj,jk) - gdept_n(ji,jj,jk) ) * r1_e1u(ji,jj) * umask(ji,jj,jk+kp)
                         zslope2 = zslope2 *zslope2
                         ah_wslp2(ji+ip,jj,jk+kp) = ah_wslp2(ji+ip,jj,jk+kp) + zah * zbu * ze3wr * r1_e1e2t(ji+ip,jj) * zslope2
@@ -166,11 +165,11 @@
                   DO jj = 1, jpjm1
                      DO ji = 1, fs_jpim1
-                        ze3wr = 1.0_wp / fse3w(ji,jj+jp,jk+kp)
-                        zbv   = e1e2v(ji,jj) * fse3v(ji,jj,jk)
+                        ze3wr = 1.0_wp / e3w_n(ji,jj+jp,jk+kp)
+                        zbv   = e1e2v(ji,jj) * e3v_n(ji,jj,jk)
                         zah   = 0.25_wp * pahv(ji,jj,jk)
                         zslope_skew = triadj_g(ji,jj+jp,jk,1-jp,kp)
                         ! Subtract s-coordinate slope at t-points to give slope rel to s surfaces
                         !    (do this by *adding* gradient of depth)
-                        zslope2 = zslope_skew + ( fsdept(ji,jj+1,jk) - fsdept(ji,jj,jk) ) * r1_e2v(ji,jj) * vmask(ji,jj,jk+kp)
+                        zslope2 = zslope_skew + ( gdept_n(ji,jj+1,jk) - gdept_n(ji,jj,jk) ) * r1_e2v(ji,jj) * vmask(ji,jj,jk+kp)
                         zslope2 = zslope2 * zslope2
                         ah_wslp2(ji,jj+jp,jk+kp) = ah_wslp2(ji,jj+jp,jk+kp) + zah * zbv * ze3wr * r1_e1e2t(ji,jj+jp) * zslope2
@@ -193,5 +192,5 @@
                      DO ji = 1, fs_jpim1
                         akz(ji,jj,jk) = 16._wp * ah_wslp2(ji,jj,jk)   &
-                           &          * (  akz(ji,jj,jk) + ah_wslp2(ji,jj,jk) / ( fse3w(ji,jj,jk) * fse3w(ji,jj,jk) )  )
+                           &          * (  akz(ji,jj,jk) + ah_wslp2(ji,jj,jk) / ( e3w_n(ji,jj,jk) * e3w_n(ji,jj,jk) )  )
                      END DO
                   END DO
@@ -201,5 +200,5 @@
                   DO jj = 1, jpjm1
                      DO ji = 1, fs_jpim1
-                        ze3w_2 = fse3w(ji,jj,jk) * fse3w(ji,jj,jk)
+                        ze3w_2 = e3w_n(ji,jj,jk) * e3w_n(ji,jj,jk)
                         zcoef0 = z2dt * (  akz(ji,jj,jk) + ah_wslp2(ji,jj,jk) / ze3w_2  )
                         akz(ji,jj,jk) = MAX( zcoef0 - 0.5_wp , 0._wp ) * ze3w_2 * z1_2dt
@@ -274,10 +273,10 @@
                            ze1ur = r1_e1u(ji,jj)
                            zdxt  = zdit(ji,jj,jk) * ze1ur
-                           ze3wr = 1._wp / fse3w(ji+ip,jj,jk+kp)
+                           ze3wr = 1._wp / e3w_n(ji+ip,jj,jk+kp)
                            zdzt  = zdkt3d(ji+ip,jj,kp) * ze3wr
                            zslope_skew = triadi_g(ji+ip,jj,jk,1-ip,kp)
                            zslope_iso  = triadi  (ji+ip,jj,jk,1-ip,kp)
 
-                           zbu = 0.25_wp * e1e2u(ji,jj) * fse3u(ji,jj,jk)
+                           zbu = 0.25_wp * e1e2u(ji,jj) * e3u_n(ji,jj,jk)
                            ! ln_botmix_triad is .T. don't mask zah for bottom half cells    !!gm ?????   ahu is masked....
                            zah = pahu(ji,jj,jk)
@@ -297,9 +296,9 @@
                            ze2vr = r1_e2v(ji,jj)
                            zdyt  = zdjt(ji,jj,jk) * ze2vr
-                           ze3wr = 1._wp / fse3w(ji,jj+jp,jk+kp)
+                           ze3wr = 1._wp / e3w_n(ji,jj+jp,jk+kp)
                            zdzt  = zdkt3d(ji,jj+jp,kp) * ze3wr
                            zslope_skew = triadj_g(ji,jj+jp,jk,1-jp,kp)
                            zslope_iso  = triadj(ji,jj+jp,jk,1-jp,kp)
-                           zbv = 0.25_wp * e1e2v(ji,jj) * fse3v(ji,jj,jk)
+                           zbv = 0.25_wp * e1e2v(ji,jj) * e3v_n(ji,jj,jk)
                            ! ln_botmix_triad is .T. don't mask zah for bottom half cells    !!gm ?????  ahv is masked...
                            zah = pahv(ji,jj,jk)
@@ -321,14 +320,14 @@
                            ze1ur = r1_e1u(ji,jj)
                            zdxt  = zdit(ji,jj,jk) * ze1ur
-                           ze3wr = 1._wp / fse3w(ji+ip,jj,jk+kp)
+                           ze3wr = 1._wp / e3w_n(ji+ip,jj,jk+kp)
                            zdzt  = zdkt3d(ji+ip,jj,kp) * ze3wr
                            zslope_skew = triadi_g(ji+ip,jj,jk,1-ip,kp)
                            zslope_iso  = triadi(ji+ip,jj,jk,1-ip,kp)
 
-                           zbu = 0.25_wp * e1e2u(ji,jj) * fse3u(ji,jj,jk)
+                           zbu = 0.25_wp * e1e2u(ji,jj) * e3u_n(ji,jj,jk)
                            ! ln_botmix_triad is .F. mask zah for bottom half cells
                            zah = pahu(ji,jj,jk) * umask(ji,jj,jk+kp)         ! pahu(ji+ip,jj,jk)   ===>>  ????
                            zah_slp  = zah * zslope_iso
-                           IF( ln_ldfeiv )   zaei_slp = aeiu(ji,jj,jk) * zslope_skew        ! fsaeit(ji+ip,jj,jk)*zslope_skew
+                           IF( ln_ldfeiv )   zaei_slp = aeiu(ji,jj,jk) * zslope_skew        ! aeit(ji+ip,jj,jk)*zslope_skew
                            zftu(ji   ,jj,jk   ) = zftu(ji   ,jj,jk   ) - ( zah * zdxt + (zah_slp - zaei_slp) * zdzt ) * zbu * ze1ur
                            ztfw(ji+ip,jj,jk+kp) = ztfw(ji+ip,jj,jk+kp) - (zah_slp + zaei_slp) * zdxt * zbu * ze3wr
@@ -344,13 +343,13 @@
                            ze2vr = r1_e2v(ji,jj)
                            zdyt  = zdjt(ji,jj,jk) * ze2vr
-                           ze3wr = 1._wp / fse3w(ji,jj+jp,jk+kp)
+                           ze3wr = 1._wp / e3w_n(ji,jj+jp,jk+kp)
                            zdzt  = zdkt3d(ji,jj+jp,kp) * ze3wr
                            zslope_skew = triadj_g(ji,jj+jp,jk,1-jp,kp)
                            zslope_iso  = triadj(ji,jj+jp,jk,1-jp,kp)
-                           zbv = 0.25_wp * e1e2v(ji,jj) * fse3v(ji,jj,jk)
+                           zbv = 0.25_wp * e1e2v(ji,jj) * e3v_n(ji,jj,jk)
                            ! ln_botmix_triad is .F. mask zah for bottom half cells
                            zah = pahv(ji,jj,jk) * vmask(ji,jj,jk+kp)         ! pahv(ji,jj+jp,jk)  ????
                            zah_slp = zah * zslope_iso
-                           IF( ln_ldfeiv )   zaei_slp = aeiv(ji,jj,jk) * zslope_skew        ! fsaeit(ji,jj+jp,jk)*zslope_skew
+                           IF( ln_ldfeiv )   zaei_slp = aeiv(ji,jj,jk) * zslope_skew        ! aeit(ji,jj+jp,jk)*zslope_skew
                            zftv(ji,jj,jk) = zftv(ji,jj,jk) - ( zah * zdyt + (zah_slp - zaei_slp) * zdzt ) * zbv * ze2vr
                            ztfw(ji,jj+jp,jk+kp) = ztfw(ji,jj+jp,jk+kp) - (zah_slp + zaei_slp) * zdyt * zbv * ze3wr
@@ -365,5 +364,5 @@
                   pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + zsign * (  zftu(ji-1,jj,jk) - zftu(ji,jj,jk)       &
                      &                                           + zftv(ji,jj-1,jk) - zftv(ji,jj,jk)   )   &
-                     &                                        / (  e1e2t(ji,jj) * fse3t(ji,jj,jk)  )
+                     &                                        / (  e1e2t(ji,jj) * e3t_n(ji,jj,jk)  )
                END DO
             END DO
@@ -376,5 +375,5 @@
                DO jj = 1, jpjm1
                   DO ji = fs_2, fs_jpim1
-                     ztfw(ji,jj,jk) = ztfw(ji,jj,jk) - e1e2t(ji,jj) / fse3w(ji,jj,jk) * tmask(ji,jj,jk)   &
+                     ztfw(ji,jj,jk) = ztfw(ji,jj,jk) - e1e2t(ji,jj) / e3w_n(ji,jj,jk) * tmask(ji,jj,jk)   &
                         &                            * ( ah_wslp2(ji,jj,jk) - akz(ji,jj,jk) )             &
                         &                            * ( ptb(ji,jj,jk-1,jn) - ptb(ji,jj,jk,jn) )
@@ -388,5 +387,5 @@
                   DO jj = 1, jpjm1
                      DO ji = fs_2, fs_jpim1
-                        ztfw(ji,jj,jk) = ztfw(ji,jj,jk) - e1e2t(ji,jj) / fse3w(ji,jj,jk) * tmask(ji,jj,jk)             &
+                        ztfw(ji,jj,jk) = ztfw(ji,jj,jk) - e1e2t(ji,jj) / e3w_n(ji,jj,jk) * tmask(ji,jj,jk)             &
                            &                            * ah_wslp2(ji,jj,jk) * ( ptb(ji,jj,jk-1,jn) - ptb(ji,jj,jk,jn) )
                      END DO
@@ -397,5 +396,5 @@
                   DO jj = 1, jpjm1
                      DO ji = fs_2, fs_jpim1
-                        ztfw(ji,jj,jk) = ztfw(ji,jj,jk) - e1e2t(ji,jj) / fse3w(ji,jj,jk) * tmask(ji,jj,jk)                      &
+                        ztfw(ji,jj,jk) = ztfw(ji,jj,jk) - e1e2t(ji,jj) / e3w_n(ji,jj,jk) * tmask(ji,jj,jk)                      &
                            &                            * (  ah_wslp2(ji,jj,jk) * ( ptb (ji,jj,jk-1,jn) - ptb (ji,jj,jk,jn) )   &
                            &                               + akz     (ji,jj,jk) * ( ptbb(ji,jj,jk-1,jn) - ptbb(ji,jj,jk,jn) )   )
@@ -410,5 +409,5 @@
                DO ji = fs_2, fs_jpim1  ! vector opt.
                   pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + zsign * (  ztfw(ji,jj,jk+1) - ztfw(ji,jj,jk)  )   &
-                     &                                        / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
+                     &                                        / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) )
                END DO
             END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/tranpc.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/tranpc.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/tranpc.F90	(revision 5845)
@@ -35,5 +35,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -195,5 +194,5 @@
                            DO jk = ikup, ikbot      ! Inside the instable (and overlying neutral) portion of the column
                               !
-                              zdz       = fse3t(ji,jj,jk)
+                              zdz       = e3t_n(ji,jj,jk)
                               zsum_temp = zsum_temp + zvts(jk,jp_tem)*zdz
                               zsum_sali = zsum_sali + zvts(jk,jp_sal)*zdz
@@ -244,6 +243,6 @@
 
                               !! Interpolating alfa and beta at W point:
-                              zrw =  (fsdepw(ji,jj,jk  ) - fsdept(ji,jj,jk)) &
-                                 & / (fsdept(ji,jj,jk-1) - fsdept(ji,jj,jk))
+                              zrw =  (gdepw_n(ji,jj,jk  ) - gdept_n(ji,jj,jk)) &
+                                 & / (gdept_n(ji,jj,jk-1) - gdept_n(ji,jj,jk))
                               zaw = zvab(jk,jp_tem) * (1._wp - zrw) + zvab(jk-1,jp_tem) * zrw
                               zbw = zvab(jk,jp_sal) * (1._wp - zrw) + zvab(jk-1,jp_sal) * zrw
@@ -252,5 +251,5 @@
                               zvn2(jk) = grav*( zaw * ( zvts(jk-1,jp_tem) - zvts(jk,jp_tem) )     &
                                  &            - zbw * ( zvts(jk-1,jp_sal) - zvts(jk,jp_sal) )  )  &
-                                 &       / fse3w(ji,jj,jk) * tmask(ji,jj,jk)
+                                 &       / e3w_n(ji,jj,jk) * tmask(ji,jj,jk)
 
                               !! OR, faster  => just considering the vertical gradient of density
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 5845)
@@ -60,6 +60,4 @@
    REAL(wp) ::   rbcp   ! Brown & Campana parameters for semi-implicit hpg
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO-Consortium (2010) 
@@ -310,7 +308,7 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  ze3t_b = fse3t_b(ji,jj,jk)
-                  ze3t_n = fse3t_n(ji,jj,jk)
-                  ze3t_a = fse3t_a(ji,jj,jk)
+                  ze3t_b = e3t_b(ji,jj,jk)
+                  ze3t_n = e3t_n(ji,jj,jk)
+                  ze3t_a = e3t_a(ji,jj,jk)
                   !                                         ! tracer content at Before, now and after
                   ztc_b  = ptb(ji,jj,jk,jn) * ze3t_b
@@ -338,5 +336,5 @@
                   IF( ll_rnf .AND. jk <= nk_rnf(ji,jj) )                                          &
                      &     ztc_f  = ztc_f  - zfact1 * ( rnf_tsc(ji,jj,jn) - rnf_tsc_b(ji,jj,jn) ) & 
-                     &                              * fse3t_n(ji,jj,jk) / h_rnf(ji,jj)
+                     &                              * e3t_n(ji,jj,jk) / h_rnf(ji,jj)
 
                   ! ice shelf
@@ -345,9 +343,9 @@
                      IF ( jk >= misfkt(ji,jj) .AND. jk < misfkb(ji,jj) )                          &
                         ztc_f  = ztc_f  - zfact1 * ( risf_tsc(ji,jj,jn) - risf_tsc_b(ji,jj,jn) )  &
-                               &                 * fse3t_n(ji,jj,jk) * r1_hisf_tbl (ji,jj)
+                               &                 * e3t_n(ji,jj,jk) * r1_hisf_tbl (ji,jj)
                      ! level partially include in Losch_2008 ice shelf boundary layer 
                      IF ( jk == misfkb(ji,jj) )                                                   &
                         ztc_f  = ztc_f  - zfact1 * ( risf_tsc(ji,jj,jn) - risf_tsc_b(ji,jj,jn) )  &
-                               &                 * fse3t_n(ji,jj,jk) * r1_hisf_tbl (ji,jj) * ralpha(ji,jj)
+                               &                 * e3t_n(ji,jj,jk) * r1_hisf_tbl (ji,jj) * ralpha(ji,jj)
                   END IF
 
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 5845)
@@ -58,5 +58,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -157,5 +156,5 @@
             DO jj = 2, jpjm1 
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  z1_e3t = zfact / fse3t(ji,jj,jk)
+                  z1_e3t = zfact / e3t_n(ji,jj,jk)
                   tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) + ( qsr_hc_b(ji,jj,jk) + qsr_hc(ji,jj,jk) ) * z1_e3t
                END DO
@@ -216,8 +215,8 @@
                   DO jj = 1, jpj
                      DO ji = 1, jpi
-                        zc0 = ze0(ji,jj,jk-1) * EXP( - fse3t(ji,jj,jk-1) * xsi0r     )
-                        zc1 = ze1(ji,jj,jk-1) * EXP( - fse3t(ji,jj,jk-1) * zekb(ji,jj) )
-                        zc2 = ze2(ji,jj,jk-1) * EXP( - fse3t(ji,jj,jk-1) * zekg(ji,jj) )
-                        zc3 = ze3(ji,jj,jk-1) * EXP( - fse3t(ji,jj,jk-1) * zekr(ji,jj) )
+                        zc0 = ze0(ji,jj,jk-1) * EXP( - e3t_n(ji,jj,jk-1) * xsi0r     )
+                        zc1 = ze1(ji,jj,jk-1) * EXP( - e3t_n(ji,jj,jk-1) * zekb(ji,jj) )
+                        zc2 = ze2(ji,jj,jk-1) * EXP( - e3t_n(ji,jj,jk-1) * zekg(ji,jj) )
+                        zc3 = ze3(ji,jj,jk-1) * EXP( - e3t_n(ji,jj,jk-1) * zekr(ji,jj) )
                         ze0(ji,jj,jk) = zc0
                         ze1(ji,jj,jk) = zc1
@@ -232,8 +231,8 @@
                   DO jj = 1, jpj
                      DO ji = 1, jpi
-                        zzc0 = rn_abs * EXP( - fse3t(ji,jj,1) * xsi0r     )
-                        zzc1 = zcoef  * EXP( - fse3t(ji,jj,1) * zekb(ji,jj) )
-                        zzc2 = zcoef  * EXP( - fse3t(ji,jj,1) * zekg(ji,jj) )
-                        zzc3 = zcoef  * EXP( - fse3t(ji,jj,1) * zekr(ji,jj) )
+                        zzc0 = rn_abs * EXP( - e3t_n(ji,jj,1) * xsi0r     )
+                        zzc1 = zcoef  * EXP( - e3t_n(ji,jj,1) * zekb(ji,jj) )
+                        zzc2 = zcoef  * EXP( - e3t_n(ji,jj,1) * zekg(ji,jj) )
+                        zzc3 = zcoef  * EXP( - e3t_n(ji,jj,1) * zekr(ji,jj) )
                         fraqsr_1lev(ji,jj) = 1.0 - ( zzc0 + zzc1 + zzc2  + zzc3  ) * tmask(ji,jj,2) 
                      END DO
@@ -268,6 +267,6 @@
                   DO jj = 1, jpj
                      DO ji = 1, jpi
-                        zc0 = zz0 * EXP( -fsdepw(ji,jj,jk  )*xsi0r ) + zz1 * EXP( -fsdepw(ji,jj,jk  )*xsi1r )
-                        zc1 = zz0 * EXP( -fsdepw(ji,jj,jk+1)*xsi0r ) + zz1 * EXP( -fsdepw(ji,jj,jk+1)*xsi1r )
+                        zc0 = zz0 * EXP( -gdepw_n(ji,jj,jk  )*xsi0r ) + zz1 * EXP( -gdepw_n(ji,jj,jk  )*xsi1r )
+                        zc1 = zz0 * EXP( -gdepw_n(ji,jj,jk+1)*xsi0r ) + zz1 * EXP( -gdepw_n(ji,jj,jk+1)*xsi1r )
                         qsr_hc(ji,jj,jk) = qsr(ji,jj) * ( zc0*tmask(ji,jj,jk) - zc1*tmask(ji,jj,jk+1) ) 
                      END DO
@@ -278,6 +277,6 @@
                   DO jj = 1, jpj
                      DO ji = 1, jpi
-                        zc0 = zz0 * EXP( -fsdepw(ji,jj,1)*xsi0r ) + zz1 * EXP( -fsdepw(ji,jj,1)*xsi1r )
-                        zc1 = zz0 * EXP( -fsdepw(ji,jj,2)*xsi0r ) + zz1 * EXP( -fsdepw(ji,jj,2)*xsi1r )
+                        zc0 = zz0 * EXP( -gdepw_n(ji,jj,1)*xsi0r ) + zz1 * EXP( -gdepw_n(ji,jj,1)*xsi1r )
+                        zc1 = zz0 * EXP( -gdepw_n(ji,jj,2)*xsi0r ) + zz1 * EXP( -gdepw_n(ji,jj,2)*xsi1r )
                         fraqsr_1lev(ji,jj) = ( zc0*tmask(ji,jj,1) - zc1*tmask(ji,jj,2) ) / r1_rau0_rcp
                      END DO
@@ -306,5 +305,5 @@
             DO jj = 2, jpjm1 
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  z1_e3t = zfact / fse3t(ji,jj,jk)
+                  z1_e3t = zfact / e3t_n(ji,jj,jk)
                   tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) + ( qsr_hc_b(ji,jj,jk) + qsr_hc(ji,jj,jk) ) * z1_e3t
                END DO
@@ -533,6 +532,6 @@
                   DO jj = 1, jpj                              ! top 400 meters
                      DO ji = 1, jpi
-                        zc0 = zz0 * EXP( -fsdepw(ji,jj,jk  )*xsi0r ) + zz1 * EXP( -fsdepw(ji,jj,jk  )*xsi1r )
-                        zc1 = zz0 * EXP( -fsdepw(ji,jj,jk+1)*xsi0r ) + zz1 * EXP( -fsdepw(ji,jj,jk+1)*xsi1r )
+                        zc0 = zz0 * EXP( -gdepw_n(ji,jj,jk  )*xsi0r ) + zz1 * EXP( -gdepw_n(ji,jj,jk  )*xsi1r )
+                        zc1 = zz0 * EXP( -gdepw_n(ji,jj,jk+1)*xsi0r ) + zz1 * EXP( -gdepw_n(ji,jj,jk+1)*xsi1r )
                         etot3(ji,jj,jk) = (  zc0 * tmask(ji,jj,jk) - zc1 * tmask(ji,jj,jk+1)  ) * tmask(ji,jj,1) 
                      END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 5845)
@@ -40,5 +40,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -196,5 +195,5 @@
          DO jj = 2, jpj
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               z1_e3t = zfact / fse3t(ji,jj,1)
+               z1_e3t = zfact / e3t_n(ji,jj,1)
                tsa(ji,jj,1,jn) = tsa(ji,jj,1,jn) + ( sbc_tsc_b(ji,jj,jn) + sbc_tsc(ji,jj,jn) ) * z1_e3t
             END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90	(revision 5845)
@@ -44,5 +44,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "zdfddm_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90	(revision 5845)
@@ -40,5 +40,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "zdfddm_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
@@ -122,5 +121,5 @@
                DO jj = 2, jpjm1 
                   DO ji = fs_2, fs_jpim1   ! vector opt.
-                     zave3r = 1.e0 / fse3w_n(ji,jj,jk) 
+                     zave3r = 1.e0 / e3w_n(ji,jj,jk) 
                      IF( cdtype == 'TRA' .AND. jn == jp_tem ) THEN  ! temperature : use of avt
                         zwy(ji,jj,jk) =   avt(ji,jj,jk) * ( zwx(ji,jj,jk-1) - zwx(ji,jj,jk) ) * zave3r
@@ -135,5 +134,5 @@
                DO jj = 2, jpjm1 
                   DO ji = fs_2, fs_jpim1   ! vector opt.
-                     ze3tr = zlavmr / fse3t_n(ji,jj,jk)
+                     ze3tr = zlavmr / e3t_n(ji,jj,jk)
                      zwx(ji,jj,jk) = zwx(ji,jj,jk) + p2dt(jk) * ( zwy(ji,jj,jk) - zwy(ji,jj,jk+1) ) * ze3tr
                   END DO
@@ -149,5 +148,5 @@
                DO jj = 2, jpjm1 
                   DO ji = fs_2, fs_jpim1   ! vector opt.
-                     ze3tb = fse3t_b(ji,jj,jk) / fse3t(ji,jj,jk)                          ! before e3t
+                     ze3tb = e3t_b(ji,jj,jk) / e3t_n(ji,jj,jk)                          ! before e3t
                      ztra  = zwx(ji,jj,jk) - ptb(ji,jj,jk,jn) + p2dt(jk) * pta(ji,jj,jk,jn)       ! total trends * 2*rdt 
                      pta(ji,jj,jk,jn) = ( ze3tb * ptb(ji,jj,jk,jn) + ztra ) * tmask(ji,jj,jk)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90	(revision 5845)
@@ -45,5 +45,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "zdfddm_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
@@ -142,8 +141,8 @@
                DO jj = 2, jpjm1
                   DO ji = fs_2, fs_jpim1   ! vector opt.
-                     ze3ta =  ( 1. - r_vvl ) +        r_vvl   * fse3t_a(ji,jj,jk)   ! after scale factor at T-point
-                     ze3tn =         r_vvl   + ( 1. - r_vvl ) * fse3t_n(ji,jj,jk)   ! now   scale factor at T-point
-                     zwi(ji,jj,jk) = - p2dt(jk) * zwt(ji,jj,jk  ) / ( ze3tn * fse3w(ji,jj,jk  ) )
-                     zws(ji,jj,jk) = - p2dt(jk) * zwt(ji,jj,jk+1) / ( ze3tn * fse3w(ji,jj,jk+1) )
+                     ze3ta =  ( 1. - r_vvl ) +        r_vvl   * e3t_a(ji,jj,jk)   ! after scale factor at T-point
+                     ze3tn =         r_vvl   + ( 1. - r_vvl ) * e3t_n(ji,jj,jk)   ! now   scale factor at T-point
+                     zwi(ji,jj,jk) = - p2dt(jk) * zwt(ji,jj,jk  ) / ( ze3tn * e3w_n(ji,jj,jk  ) )
+                     zws(ji,jj,jk) = - p2dt(jk) * zwt(ji,jj,jk+1) / ( ze3tn * e3w_n(ji,jj,jk+1) )
                      zwd(ji,jj,jk) = ze3ta - zwi(ji,jj,jk) - zws(ji,jj,jk)
                  END DO
@@ -190,6 +189,6 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1
-               ze3tb = ( 1. - r_vvl ) + r_vvl * fse3t_b(ji,jj,1)
-               ze3tn = ( 1. - r_vvl ) + r_vvl * fse3t(ji,jj,1)
+               ze3tb = ( 1. - r_vvl ) + r_vvl * e3t_b(ji,jj,1)
+               ze3tn = ( 1. - r_vvl ) + r_vvl * e3t_n(ji,jj,1)
                pta(ji,jj,1,jn) = ze3tb * ptb(ji,jj,1,jn) + p2dt(1) * ze3tn * pta(ji,jj,1,jn)
             END DO
@@ -198,6 +197,6 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1
-                  ze3tb = ( 1. - r_vvl ) + r_vvl * fse3t_b(ji,jj,jk)
-                  ze3tn = ( 1. - r_vvl ) + r_vvl * fse3t  (ji,jj,jk)
+                  ze3tb = ( 1. - r_vvl ) + r_vvl * e3t_b(ji,jj,jk)
+                  ze3tn = ( 1. - r_vvl ) + r_vvl * e3t_n(ji,jj,jk)
                   zrhs = ze3tb * ptb(ji,jj,jk,jn) + p2dt(jk) * ze3tn * pta(ji,jj,jk,jn)   ! zrhs=right hand side 
                   pta(ji,jj,jk,jn) = zrhs - zwi(ji,jj,jk) / zwt(ji,jj,jk-1) * pta(ji,jj,jk-1,jn)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/zpshde.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/zpshde.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRA/zpshde.F90	(revision 5845)
@@ -32,5 +32,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -111,10 +110,10 @@
                iku = mbku(ji,jj)   ;   ikum1 = MAX( iku - 1 , 1 )    ! last and before last ocean level at u- & v-points
                ikv = mbkv(ji,jj)   ;   ikvm1 = MAX( ikv - 1 , 1 )    ! if level first is a p-step, ik.m1=1
-               ze3wu = fse3w(ji+1,jj  ,iku) - fse3w(ji,jj,iku)
-               ze3wv = fse3w(ji  ,jj+1,ikv) - fse3w(ji,jj,ikv)
+               ze3wu = e3w_n(ji+1,jj  ,iku) - e3w_n(ji,jj,iku)
+               ze3wv = e3w_n(ji  ,jj+1,ikv) - e3w_n(ji,jj,ikv)
                !
                ! i- direction
                IF( ze3wu >= 0._wp ) THEN      ! case 1
-                  zmaxu =  ze3wu / fse3w(ji+1,jj,iku)
+                  zmaxu =  ze3wu / e3w_n(ji+1,jj,iku)
                   ! interpolated values of tracers
                   zti (ji,jj,jn) = pta(ji+1,jj,iku,jn) + zmaxu * ( pta(ji+1,jj,ikum1,jn) - pta(ji+1,jj,iku,jn) )
@@ -122,5 +121,5 @@
                   pgtu(ji,jj,jn) = umask(ji,jj,1) * ( zti(ji,jj,jn) - pta(ji,jj,iku,jn) )
                ELSE                           ! case 2
-                  zmaxu = -ze3wu / fse3w(ji,jj,iku)
+                  zmaxu = -ze3wu / e3w_n(ji,jj,iku)
                   ! interpolated values of tracers
                   zti (ji,jj,jn) = pta(ji,jj,iku,jn) + zmaxu * ( pta(ji,jj,ikum1,jn) - pta(ji,jj,iku,jn) )
@@ -131,5 +130,5 @@
                ! j- direction
                IF( ze3wv >= 0._wp ) THEN      ! case 1
-                  zmaxv =  ze3wv / fse3w(ji,jj+1,ikv)
+                  zmaxv =  ze3wv / e3w_n(ji,jj+1,ikv)
                   ! interpolated values of tracers
                   ztj (ji,jj,jn) = pta(ji,jj+1,ikv,jn) + zmaxv * ( pta(ji,jj+1,ikvm1,jn) - pta(ji,jj+1,ikv,jn) )
@@ -137,5 +136,5 @@
                   pgtv(ji,jj,jn) = vmask(ji,jj,1) * ( ztj(ji,jj,jn) - pta(ji,jj,ikv,jn) )
                ELSE                           ! case 2
-                  zmaxv =  -ze3wv / fse3w(ji,jj,ikv)
+                  zmaxv =  -ze3wv / e3w_n(ji,jj,ikv)
                   ! interpolated values of tracers
                   ztj (ji,jj,jn) = pta(ji,jj,ikv,jn) + zmaxv * ( pta(ji,jj,ikvm1,jn) - pta(ji,jj,ikv,jn) )
@@ -156,11 +155,11 @@
                iku = mbku(ji,jj)
                ikv = mbkv(ji,jj)
-               ze3wu  = fse3w(ji+1,jj  ,iku) - fse3w(ji,jj,iku)
-               ze3wv  = fse3w(ji  ,jj+1,ikv) - fse3w(ji,jj,ikv)
-               IF( ze3wu >= 0._wp ) THEN   ;   zhi(ji,jj) = fsdept(ji  ,jj,iku)     ! i-direction: case 1
-               ELSE                        ;   zhi(ji,jj) = fsdept(ji+1,jj,iku)     ! -     -      case 2
-               ENDIF
-               IF( ze3wv >= 0._wp ) THEN   ;   zhj(ji,jj) = fsdept(ji,jj  ,ikv)     ! j-direction: case 1
-               ELSE                        ;   zhj(ji,jj) = fsdept(ji,jj+1,ikv)     ! -     -      case 2
+               ze3wu  = e3w_n(ji+1,jj  ,iku) - e3w_n(ji,jj,iku)
+               ze3wv  = e3w_n(ji  ,jj+1,ikv) - e3w_n(ji,jj,ikv)
+               IF( ze3wu >= 0._wp ) THEN   ;   zhi(ji,jj) = gdept_n(ji  ,jj,iku)     ! i-direction: case 1
+               ELSE                        ;   zhi(ji,jj) = gdept_n(ji+1,jj,iku)     ! -     -      case 2
+               ENDIF
+               IF( ze3wv >= 0._wp ) THEN   ;   zhj(ji,jj) = gdept_n(ji,jj  ,ikv)     ! j-direction: case 1
+               ELSE                        ;   zhj(ji,jj) = gdept_n(ji,jj+1,ikv)     ! -     -      case 2
                ENDIF
             END DO
@@ -174,6 +173,6 @@
                iku = mbku(ji,jj)
                ikv = mbkv(ji,jj)
-               ze3wu  = fse3w(ji+1,jj  ,iku) - fse3w(ji,jj,iku)
-               ze3wv  = fse3w(ji  ,jj+1,ikv) - fse3w(ji,jj,ikv)
+               ze3wu  = e3w_n(ji+1,jj  ,iku) - e3w_n(ji,jj,iku)
+               ze3wv  = e3w_n(ji  ,jj+1,ikv) - e3w_n(ji,jj,ikv)
                IF( ze3wu >= 0._wp ) THEN   ;   pgru(ji,jj) = umask(ji,jj,1) * ( zri(ji  ,jj    ) - prd(ji,jj,iku) )   ! i: 1
                ELSE                        ;   pgru(ji,jj) = umask(ji,jj,1) * ( prd(ji+1,jj,iku) - zri(ji,jj    ) )   ! i: 2
@@ -288,5 +287,5 @@
                ! i- direction
                IF( ze3wu >= 0._wp ) THEN      ! case 1
-                  zmaxu =  ze3wu / fse3w(ji+1,jj,iku)
+                  zmaxu =  ze3wu / e3w_n(ji+1,jj,iku)
                   ! interpolated values of tracers
                   zti (ji,jj,jn) = pta(ji+1,jj,iku,jn) + zmaxu * ( pta(ji+1,jj,ikum1,jn) - pta(ji+1,jj,iku,jn) )
@@ -294,5 +293,5 @@
                   pgtu(ji,jj,jn) = umask(ji,jj,iku) * ( zti(ji,jj,jn) - pta(ji,jj,iku,jn) )
                ELSE                           ! case 2
-                  zmaxu = -ze3wu / fse3w(ji,jj,iku)
+                  zmaxu = -ze3wu / e3w_n(ji,jj,iku)
                   ! interpolated values of tracers
                   zti (ji,jj,jn) = pta(ji,jj,iku,jn) + zmaxu * ( pta(ji,jj,ikum1,jn) - pta(ji,jj,iku,jn) )
@@ -303,5 +302,5 @@
                ! j- direction
                IF( ze3wv >= 0._wp ) THEN      ! case 1
-                  zmaxv =  ze3wv / fse3w(ji,jj+1,ikv)
+                  zmaxv =  ze3wv / e3w_n(ji,jj+1,ikv)
                   ! interpolated values of tracers
                   ztj (ji,jj,jn) = pta(ji,jj+1,ikv,jn) + zmaxv * ( pta(ji,jj+1,ikvm1,jn) - pta(ji,jj+1,ikv,jn) )
@@ -309,5 +308,5 @@
                   pgtv(ji,jj,jn) = vmask(ji,jj,ikv) * ( ztj(ji,jj,jn) - pta(ji,jj,ikv,jn) )
                ELSE                           ! case 2
-                  zmaxv =  -ze3wv / fse3w(ji,jj,ikv)
+                  zmaxv =  -ze3wv / e3w_n(ji,jj,ikv)
                   ! interpolated values of tracers
                   ztj (ji,jj,jn) = pta(ji,jj,ikv,jn) + zmaxv * ( pta(ji,jj,ikvm1,jn) - pta(ji,jj,ikv,jn) )
@@ -335,9 +334,9 @@
                ze3wv  = (gdept_0(ji,jj+1,ikv) - gdepw_0(ji,jj+1,ikv)) - (gdept_0(ji,jj,ikv) - gdepw_0(ji,jj,ikv))
                !
-               IF( ze3wu >= 0._wp ) THEN   ;   zhi(ji,jj) = fsdept(ji+1,jj,iku) - ze3wu     ! i-direction: case 1
-               ELSE                        ;   zhi(ji,jj) = fsdept(ji  ,jj,iku) + ze3wu    ! -     -      case 2
-               ENDIF
-               IF( ze3wv >= 0._wp ) THEN   ;   zhj(ji,jj) = fsdept(ji,jj+1,ikv) - ze3wv    ! j-direction: case 1
-               ELSE                        ;   zhj(ji,jj) = fsdept(ji,jj  ,ikv) + ze3wv    ! -     -      case 2
+               IF( ze3wu >= 0._wp ) THEN   ;   zhi(ji,jj) = gdept_n(ji+1,jj,iku) - ze3wu     ! i-direction: case 1
+               ELSE                        ;   zhi(ji,jj) = gdept_n(ji  ,jj,iku) + ze3wu    ! -     -      case 2
+               ENDIF
+               IF( ze3wv >= 0._wp ) THEN   ;   zhj(ji,jj) = gdept_n(ji,jj+1,ikv) - ze3wv    ! j-direction: case 1
+               ELSE                        ;   zhj(ji,jj) = gdept_n(ji,jj  ,ikv) + ze3wv    ! -     -      case 2
                ENDIF
             END DO
@@ -354,32 +353,32 @@
                ze3wv  = (gdept_0(ji,jj+1,ikv) - gdepw_0(ji,jj+1,ikv)) - (gdept_0(ji,jj,ikv) - gdepw_0(ji,jj,ikv))
                IF( ze3wu >= 0._wp ) THEN 
-                  pgzu(ji,jj) = (fsde3w(ji+1,jj,iku) - ze3wu) - fsde3w(ji,jj,iku)
+                  pgzu(ji,jj) = (gde3w_n(ji+1,jj,iku) - ze3wu) - gde3w_n(ji,jj,iku)
                   pgru(ji,jj) = umask(ji,jj,iku) * ( zri(ji  ,jj) - prd(ji,jj,iku) )   ! i: 1
                   pmru(ji,jj) = umask(ji,jj,iku) * ( zri(ji  ,jj) + prd(ji,jj,iku) )   ! i: 1 
                   pge3ru(ji,jj) = umask(ji,jj,iku)                                                                  &
-                                * ( (fse3w(ji+1,jj,iku) - ze3wu )* ( zri(ji  ,jj    ) + prd(ji+1,jj,ikum1) + 2._wp) &
-                                   - fse3w(ji  ,jj,iku)          * ( prd(ji  ,jj,iku) + prd(ji  ,jj,ikum1) + 2._wp) )  ! j: 2
+                                * ( (e3w_n(ji+1,jj,iku) - ze3wu )* ( zri(ji  ,jj    ) + prd(ji+1,jj,ikum1) + 2._wp) &
+                                   - e3w_n(ji  ,jj,iku)          * ( prd(ji  ,jj,iku) + prd(ji  ,jj,ikum1) + 2._wp) )  ! j: 2
                ELSE  
-                  pgzu(ji,jj) = fsde3w(ji+1,jj,iku) - (fsde3w(ji,jj,iku) + ze3wu)
+                  pgzu(ji,jj) = gde3w_n(ji+1,jj,iku) - (gde3w_n(ji,jj,iku) + ze3wu)
                   pgru(ji,jj) = umask(ji,jj,iku) * ( prd(ji+1,jj,iku) - zri(ji,jj) )   ! i: 2
                   pmru(ji,jj) = umask(ji,jj,iku) * ( prd(ji+1,jj,iku) + zri(ji,jj) )   ! i: 2
                   pge3ru(ji,jj) = umask(ji,jj,iku)                                                                  &
-                                * (  fse3w(ji+1,jj,iku)          * ( prd(ji+1,jj,iku) + prd(ji+1,jj,ikum1) + 2._wp) &
-                                   -(fse3w(ji  ,jj,iku) + ze3wu) * ( zri(ji  ,jj    ) + prd(ji  ,jj,ikum1) + 2._wp) )  ! j: 2
+                                * (  e3w_n(ji+1,jj,iku)          * ( prd(ji+1,jj,iku) + prd(ji+1,jj,ikum1) + 2._wp) &
+                                   -(e3w_n(ji  ,jj,iku) + ze3wu) * ( zri(ji  ,jj    ) + prd(ji  ,jj,ikum1) + 2._wp) )  ! j: 2
                ENDIF
                IF( ze3wv >= 0._wp ) THEN
-                  pgzv(ji,jj) = (fsde3w(ji,jj+1,ikv) - ze3wv) - fsde3w(ji,jj,ikv) 
+                  pgzv(ji,jj) = (gde3w_n(ji,jj+1,ikv) - ze3wv) - gde3w_n(ji,jj,ikv) 
                   pgrv(ji,jj) = vmask(ji,jj,ikv) * ( zrj(ji,jj  ) - prd(ji,jj,ikv) )   ! j: 1
                   pmrv(ji,jj) = vmask(ji,jj,ikv) * ( zrj(ji,jj  ) + prd(ji,jj,ikv) )   ! j: 1
                   pge3rv(ji,jj) = vmask(ji,jj,ikv)                                                                  &
-                                * ( (fse3w(ji,jj+1,ikv) - ze3wv )* ( zrj(ji,jj      ) + prd(ji,jj+1,ikvm1) + 2._wp) &
-                                   - fse3w(ji,jj  ,ikv)          * ( prd(ji,jj  ,ikv) + prd(ji,jj  ,ikvm1) + 2._wp) )  ! j: 2
+                                * ( (e3w_n(ji,jj+1,ikv) - ze3wv )* ( zrj(ji,jj      ) + prd(ji,jj+1,ikvm1) + 2._wp) &
+                                   - e3w_n(ji,jj  ,ikv)          * ( prd(ji,jj  ,ikv) + prd(ji,jj  ,ikvm1) + 2._wp) )  ! j: 2
                ELSE 
-                  pgzv(ji,jj) = fsde3w(ji,jj+1,ikv) - (fsde3w(ji,jj,ikv) + ze3wv)
+                  pgzv(ji,jj) = gde3w_n(ji,jj+1,ikv) - (gde3w_n(ji,jj,ikv) + ze3wv)
                   pgrv(ji,jj) = vmask(ji,jj,ikv) * ( prd(ji,jj+1,ikv) - zrj(ji,jj) )   ! j: 2
                   pmrv(ji,jj) = vmask(ji,jj,ikv) * ( prd(ji,jj+1,ikv) + zrj(ji,jj) )   ! j: 2
                   pge3rv(ji,jj) = vmask(ji,jj,ikv)                                                                  &
-                                * (  fse3w(ji,jj+1,ikv)          * ( prd(ji,jj+1,ikv) + prd(ji,jj+1,ikvm1) + 2._wp) &
-                                   -(fse3w(ji,jj  ,ikv) + ze3wv) * ( zrj(ji,jj      ) + prd(ji,jj  ,ikvm1) + 2._wp) )  ! j: 2
+                                * (  e3w_n(ji,jj+1,ikv)          * ( prd(ji,jj+1,ikv) + prd(ji,jj+1,ikvm1) + 2._wp) &
+                                   -(e3w_n(ji,jj  ,ikv) + ze3wv) * ( zrj(ji,jj      ) + prd(ji,jj  ,ikvm1) + 2._wp) )  ! j: 2
                ENDIF
             END DO
@@ -408,5 +407,5 @@
                ! i- direction
                IF( ze3wu >= 0._wp ) THEN      ! case 1
-                  zmaxu = ze3wu / fse3w(ji+1,jj,iku+1)
+                  zmaxu = ze3wu / e3w_n(ji+1,jj,iku+1)
                   ! interpolated values of tracers
                   zti(ji,jj,jn) = pta(ji+1,jj,iku,jn) + zmaxu * ( pta(ji+1,jj,iku+1,jn) - pta(ji+1,jj,iku,jn) )
@@ -414,5 +413,5 @@
                   pgtui(ji,jj,jn) = umask(ji,jj,iku) * ( zti(ji,jj,jn) - pta(ji,jj,iku,jn) )
                ELSE                           ! case 2
-                  zmaxu = - ze3wu / fse3w(ji,jj,iku+1)
+                  zmaxu = - ze3wu / e3w_n(ji,jj,iku+1)
                   ! interpolated values of tracers
                   zti(ji,jj,jn) = pta(ji,jj,iku,jn) + zmaxu * ( pta(ji,jj,iku+1,jn) - pta(ji,jj,iku,jn) )
@@ -423,5 +422,5 @@
                ! j- direction
                IF( ze3wv >= 0._wp ) THEN      ! case 1
-                  zmaxv =  ze3wv / fse3w(ji,jj+1,ikv+1)
+                  zmaxv =  ze3wv / e3w_n(ji,jj+1,ikv+1)
                   ! interpolated values of tracers
                   ztj(ji,jj,jn) = pta(ji,jj+1,ikv,jn) + zmaxv * ( pta(ji,jj+1,ikv+1,jn) - pta(ji,jj+1,ikv,jn) )
@@ -429,5 +428,5 @@
                   pgtvi(ji,jj,jn) = vmask(ji,jj,ikv) * ( ztj(ji,jj,jn) - pta(ji,jj,ikv,jn) )
                ELSE                           ! case 2
-                  zmaxv =  - ze3wv / fse3w(ji,jj,ikv+1)
+                  zmaxv =  - ze3wv / e3w_n(ji,jj,ikv+1)
                   ! interpolated values of tracers
                   ztj(ji,jj,jn) = pta(ji,jj,ikv,jn) + zmaxv * ( pta(ji,jj,ikv+1,jn) - pta(ji,jj,ikv,jn) )
@@ -452,12 +451,12 @@
                iku = miku(ji,jj)
                ikv = mikv(ji,jj)
-               ze3wu  = (gdepw_0(ji+1,jj,iku+1) - gdept_0(ji+1,jj,iku)) - (gdepw_0(ji,jj,iku+1) - gdept_0(ji,jj,iku))
-               ze3wv  = (gdepw_0(ji,jj+1,ikv+1) - gdept_0(ji,jj+1,ikv)) - (gdepw_0(ji,jj,ikv+1) - gdept_0(ji,jj,ikv))
-               !
-               IF( ze3wu >= 0._wp ) THEN   ;   zhi(ji,jj) = fsdept(ji+1,jj,iku) + ze3wu    ! i-direction: case 1
-               ELSE                        ;   zhi(ji,jj) = fsdept(ji  ,jj,iku) - ze3wu    ! -     -      case 2
-               ENDIF
-               IF( ze3wv >= 0._wp ) THEN   ;   zhj(ji,jj) = fsdept(ji,jj+1,ikv) + ze3wv    ! j-direction: case 1
-               ELSE                        ;   zhj(ji,jj) = fsdept(ji,jj  ,ikv) - ze3wv    ! -     -      case 2
+               ze3wu = (gdepw_0(ji+1,jj,iku+1) - gdept_0(ji+1,jj,iku)) - (gdepw_0(ji,jj,iku+1) - gdept_0(ji,jj,iku))
+               ze3wv = (gdepw_0(ji,jj+1,ikv+1) - gdept_0(ji,jj+1,ikv)) - (gdepw_0(ji,jj,ikv+1) - gdept_0(ji,jj,ikv))
+               !
+               IF( ze3wu >= 0._wp ) THEN   ;   zhi(ji,jj) = gdept_n(ji+1,jj,iku) + ze3wu    ! i-direction: case 1
+               ELSE                        ;   zhi(ji,jj) = gdept_n(ji  ,jj,iku) - ze3wu    ! -     -      case 2
+               ENDIF
+               IF( ze3wv >= 0._wp ) THEN   ;   zhj(ji,jj) = gdept_n(ji,jj+1,ikv) + ze3wv    ! j-direction: case 1
+               ELSE                        ;   zhj(ji,jj) = gdept_n(ji,jj  ,ikv) - ze3wv    ! -     -      case 2
                ENDIF
             END DO
@@ -474,33 +473,33 @@
                ze3wv  = (gdepw_0(ji,jj+1,ikv+1) - gdept_0(ji,jj+1,ikv)) - (gdepw_0(ji,jj,ikv+1) - gdept_0(ji,jj,ikv))
                IF( ze3wu >= 0._wp ) THEN
-                 pgzui  (ji,jj) = (fsde3w(ji+1,jj,iku) + ze3wu) - fsde3w(ji,jj,iku)
+                 pgzui  (ji,jj) = (gde3w_n(ji+1,jj,iku) + ze3wu) - gde3w_n(ji,jj,iku)
                  pgrui  (ji,jj) = umask(ji,jj,iku)   * ( zri(ji,jj) - prd(ji,jj,iku) )          ! i: 1
                  pmrui  (ji,jj) = umask(ji,jj,iku)   * ( zri(ji,jj) + prd(ji,jj,iku) )          ! i: 1 
                  pge3rui(ji,jj) = umask(ji,jj,iku+1)                                                                  &
-                    &           * ( (fse3w(ji+1,jj,iku+1) - ze3wu) * (zri(ji,jj    ) + prd(ji+1,jj,iku+1) + 2._wp)   &
-                    &              - fse3w(ji  ,jj,iku+1)          * (prd(ji,jj,iku) + prd(ji  ,jj,iku+1) + 2._wp)   ) ! i: 1
+                    &           * ( (e3w_n(ji+1,jj,iku+1) - ze3wu) * (zri(ji,jj    ) + prd(ji+1,jj,iku+1) + 2._wp)   &
+                    &              - e3w_n(ji  ,jj,iku+1)          * (prd(ji,jj,iku) + prd(ji  ,jj,iku+1) + 2._wp)   ) ! i: 1
                ELSE
-                 pgzui  (ji,jj) = fsde3w(ji+1,jj,iku) - (fsde3w(ji,jj,iku) - ze3wu)
+                 pgzui  (ji,jj) = gde3w_n(ji+1,jj,iku) - (gde3w_n(ji,jj,iku) - ze3wu)
                  pgrui  (ji,jj) = umask(ji,jj,iku)   * ( prd(ji+1,jj,iku) - zri(ji,jj) )      ! i: 2
                  pmrui  (ji,jj) = umask(ji,jj,iku)   * ( prd(ji+1,jj,iku) + zri(ji,jj) )      ! i: 2
                  pge3rui(ji,jj) = umask(ji,jj,iku+1)                                                                   &
-                    &           * (  fse3w(ji+1,jj,iku+1)          * (prd(ji+1,jj,iku) + prd(ji+1,jj,iku+1) + 2._wp)  &
-                    &              -(fse3w(ji  ,jj,iku+1) + ze3wu) * (zri(ji,jj      ) + prd(ji  ,jj,iku+1) + 2._wp)  )     ! i: 2
+                    &           * (  e3w_n(ji+1,jj,iku+1)          * (prd(ji+1,jj,iku) + prd(ji+1,jj,iku+1) + 2._wp)  &
+                    &              -(e3w_n(ji  ,jj,iku+1) + ze3wu) * (zri(ji,jj      ) + prd(ji  ,jj,iku+1) + 2._wp)  )     ! i: 2
                ENDIF
                IF( ze3wv >= 0._wp ) THEN
-                 pgzvi  (ji,jj) = (fsde3w(ji,jj+1,ikv) + ze3wv) - fsde3w(ji,jj,ikv) 
+                 pgzvi  (ji,jj) = (gde3w_n(ji,jj+1,ikv) + ze3wv) - gde3w_n(ji,jj,ikv) 
                  pgrvi  (ji,jj) = vmask(ji,jj,ikv)   * ( zrj(ji,jj  ) - prd(ji,jj,ikv) )        ! j: 1
                  pmrvi  (ji,jj) = vmask(ji,jj,ikv)   * ( zrj(ji,jj  ) + prd(ji,jj,ikv) )        ! j: 1
                  pge3rvi(ji,jj) = vmask(ji,jj,ikv+1)                                                                  & 
-                     &           * ( (fse3w(ji,jj+1,ikv+1) - ze3wv) * ( zrj(ji,jj    ) + prd(ji,jj+1,ikv+1) + 2._wp)  &
-                     &                - fse3w(ji,jj  ,ikv+1)          * ( prd(ji,jj,ikv) + prd(ji,jj  ,ikv+1) + 2._wp)  ) ! j: 1
+                     &           * ( (e3w_n(ji,jj+1,ikv+1) - ze3wv) * ( zrj(ji,jj    ) + prd(ji,jj+1,ikv+1) + 2._wp)  &
+                     &              - e3w_n(ji,jj  ,ikv+1)          * ( prd(ji,jj,ikv) + prd(ji,jj  ,ikv+1) + 2._wp)  ) ! j: 1
                                   ! + 2 due to the formulation in density and not in anomalie in hpg sco
                ELSE
-                 pgzvi  (ji,jj) = fsde3w(ji,jj+1,ikv) - (fsde3w(ji,jj,ikv) - ze3wv)
+                 pgzvi  (ji,jj) = gde3w_n(ji,jj+1,ikv) - (gde3w_n(ji,jj,ikv) - ze3wv)
                  pgrvi  (ji,jj) = vmask(ji,jj,ikv)   * ( prd(ji,jj+1,ikv) - zrj(ji,jj) )     ! j: 2
                  pmrvi  (ji,jj) = vmask(ji,jj,ikv)   * ( prd(ji,jj+1,ikv) + zrj(ji,jj) )     ! j: 2
                  pge3rvi(ji,jj) = vmask(ji,jj,ikv+1)                                                                   &
-                    &           * (  fse3w(ji,jj+1,ikv+1)          * ( prd(ji,jj+1,ikv) + prd(ji,jj+1,ikv+1) + 2._wp) &
-                    &              -(fse3w(ji,jj  ,ikv+1) + ze3wv) * ( zrj(ji,jj      ) + prd(ji,jj  ,ikv+1) + 2._wp) )  ! j: 2
+                    &           * (  e3w_n(ji,jj+1,ikv+1)          * ( prd(ji,jj+1,ikv) + prd(ji,jj+1,ikv+1) + 2._wp) &
+                    &              -(e3w_n(ji,jj  ,ikv+1) + ze3wv) * ( zrj(ji,jj      ) + prd(ji,jj  ,ikv+1) + 2._wp) )  ! j: 2
                ENDIF
             END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trddyn.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trddyn.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trddyn.F90	(revision 5845)
@@ -36,5 +36,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -147,6 +146,6 @@
                               !                                    ! wind stress trends
                               CALL wrk_alloc( jpi, jpj, z2dx, z2dy )
-                              z2dx(:,:) = ( utau_b(:,:) + utau(:,:) ) / ( fse3u(:,:,1) * rau0 )
-                              z2dy(:,:) = ( vtau_b(:,:) + vtau(:,:) ) / ( fse3v(:,:,1) * rau0 )
+                              z2dx(:,:) = ( utau_b(:,:) + utau(:,:) ) / ( e3u_n(:,:,1) * rau0 )
+                              z2dy(:,:) = ( vtau_b(:,:) + vtau(:,:) ) / ( e3v_n(:,:,1) * rau0 )
                               CALL iom_put( "utrd_tau", z2dx )
                               CALL iom_put( "vtrd_tau", z2dy )
@@ -165,6 +164,6 @@
                               	         ikbu = mbku(ji,jj)          ! deepest ocean u- & v-levels
                                           ikbv = mbkv(ji,jj)
-                                          z3dx(ji,jj,jk) = bfrua(ji,jj) * un(ji,jj,ikbu) / fse3u(ji,jj,ikbu)
-                                          z3dy(ji,jj,jk) = bfrva(ji,jj) * vn(ji,jj,ikbv) / fse3v(ji,jj,ikbv)
+                                          z3dx(ji,jj,jk) = bfrua(ji,jj) * un(ji,jj,ikbu) / e3u_n(ji,jj,ikbu)
+                                          z3dy(ji,jj,jk) = bfrva(ji,jj) * vn(ji,jj,ikbv) / e3v_n(ji,jj,ikbv)
                               	      END DO
                               	   END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdglo.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdglo.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdglo.F90	(revision 5845)
@@ -52,5 +52,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
 #  include "zdfddm_substitute.h90"
@@ -92,5 +91,5 @@
       	      DO jj = 1, jpj
       	         DO ji = 1, jpi        
-      	            zvm = e1e2t(ji,jj) * fse3t(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
+      	            zvm = e1e2t(ji,jj) * e3t_n(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
       	            zvt = ptrdx(ji,jj,jk) * zvm
       	            zvs = ptrdy(ji,jj,jk) * zvm
@@ -126,7 +125,7 @@
                   DO ji = 1, jpim1
                      zvt = ptrdx(ji,jj,jk) * tmask_i(ji+1,jj  ) * tmask_i(ji,jj) * umask(ji,jj,jk)   &
-                        &                  * e1u    (ji  ,jj  ) * e2u    (ji,jj) * fse3u(ji,jj,jk)
+                        &                  * e1u    (ji  ,jj  ) * e2u    (ji,jj) * e3u_n(ji,jj,jk)
                      zvs = ptrdy(ji,jj,jk) * tmask_i(ji  ,jj+1) * tmask_i(ji,jj) * vmask(ji,jj,jk)   &
-                        &                  * e1v    (ji  ,jj  ) * e2v    (ji,jj) * fse3u(ji,jj,jk)
+                        &                  * e1v    (ji  ,jj  ) * e2v    (ji,jj) * e3u_n(ji,jj,jk)
                      umo(ktrd) = umo(ktrd) + zvt
                      vmo(ktrd) = vmo(ktrd) + zvs
@@ -143,5 +142,5 @@
                         &                       * z1_2rau0 * e1u    (ji  ,jj  ) * e2u    (ji,jj)
                      zvs = ( vtau_b(ji,jj) + vtau(ji,jj) ) * tmask_i(ji  ,jj+1) * tmask_i(ji,jj) * vmask(ji,jj,jk)   &
-                        &                       * z1_2rau0 * e1v    (ji  ,jj  ) * e2v    (ji,jj) * fse3u(ji,jj,jk)
+                        &                       * z1_2rau0 * e1v    (ji  ,jj  ) * e2v    (ji,jj) * e3u_n(ji,jj,jk)
                      umo(jpdyn_tau) = umo(jpdyn_tau) + zvt
                      vmo(jpdyn_tau) = vmo(jpdyn_tau) + zvs
@@ -225,6 +224,6 @@
             DO jj = 1, jpjm1
                DO ji = 1, jpim1
-                  zkx(ji,jj,jk) = zcof * e2u(ji,jj) * fse3u(ji,jj,jk) * un(ji,jj,jk) * ( rhop(ji,jj,jk) + rhop(ji+1,jj,jk) )
-                  zky(ji,jj,jk) = zcof * e1v(ji,jj) * fse3v(ji,jj,jk) * vn(ji,jj,jk) * ( rhop(ji,jj,jk) + rhop(ji,jj+1,jk) )
+                  zkx(ji,jj,jk) = zcof * e2u(ji,jj) * e3u_n(ji,jj,jk) * un(ji,jj,jk) * ( rhop(ji,jj,jk) + rhop(ji+1,jj,jk) )
+                  zky(ji,jj,jk) = zcof * e1v(ji,jj) * e3v_n(ji,jj,jk) * vn(ji,jj,jk) * ( rhop(ji,jj,jk) + rhop(ji,jj+1,jk) )
                END DO
             END DO
@@ -237,5 +236,5 @@
                      &                 + zkx(ji,jj,jk) - zkx(ji-1,jj  ,jk  )               &
                      &                 + zky(ji,jj,jk) - zky(ji  ,jj-1,jk  )   )           &
-                     &              / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) ) * tmask(ji,jj,jk) * tmask_i(ji,jj)
+                     &              / ( e1e2t(ji,jj) * e3t_n(ji,jj,jk) ) * tmask(ji,jj,jk) * tmask_i(ji,jj)
                END DO
             END DO
@@ -246,5 +245,5 @@
          peke = 0._wp
          DO jk = 1, jpkm1
-            peke = peke + SUM( zkepe(:,:,jk) * fsdept(:,:,jk) * e1e2t(:,:) * fse3t(:,:,jk) )
+            peke = peke + SUM( zkepe(:,:,jk) * gdept_n(:,:,jk) * e1e2t(:,:) * e3t_n(:,:,jk) )
          END DO
          peke = grav * peke
@@ -530,5 +529,5 @@
       tvolt = 0._wp
       DO jk = 1, jpkm1
-         tvolt = tvolt + SUM( e1e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:) )
+         tvolt = tvolt + SUM( e1e2t(:,:) * e3t_n(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:) )
       END DO
       IF( lk_mpp )   CALL mpp_sum( tvolt )   ! sum over the global domain
@@ -547,6 +546,6 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               tvolu = tvolu + e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk) * tmask_i(ji+1,jj  ) * tmask_i(ji,jj) * umask(ji,jj,jk)
-               tvolv = tvolv + e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk) * tmask_i(ji  ,jj+1) * tmask_i(ji,jj) * vmask(ji,jj,jk)
+               tvolu = tvolu + e1u(ji,jj) * e2u(ji,jj) * e3u_n(ji,jj,jk) * tmask_i(ji+1,jj  ) * tmask_i(ji,jj) * umask(ji,jj,jk)
+               tvolv = tvolv + e1v(ji,jj) * e2v(ji,jj) * e3v_n(ji,jj,jk) * tmask_i(ji  ,jj+1) * tmask_i(ji,jj) * vmask(ji,jj,jk)
             END DO
          END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdini.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdini.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdini.F90	(revision 5845)
@@ -26,5 +26,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90	(revision 5845)
@@ -41,5 +41,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -97,7 +96,7 @@
          nkstp = kt
          DO jk = 1, jpkm1
-            bu   (:,:,jk) =           e1e2u(:,:) * fse3u_n(:,:,jk)
-            bv   (:,:,jk) =           e1e2v(:,:) * fse3v_n(:,:,jk)
-            r1_bt(:,:,jk) = 1._wp / ( e1e2t(:,:) * fse3t_n(:,:,jk) ) * tmask(:,:,jk)
+            bu   (:,:,jk) =           e1e2u(:,:) * e3u_n(:,:,jk)
+            bv   (:,:,jk) =           e1e2v(:,:) * e3v_n(:,:,jk)
+            r1_bt(:,:,jk) = 1._wp / ( e1e2t(:,:) * e3t_n(:,:,jk) ) * tmask(:,:,jk)
          END DO
       ENDIF
@@ -172,6 +171,6 @@
 !                  ikbu = mbku(ji,jj)          ! deepest ocean u- & v-levels
 !                  ikbv = mbkv(ji,jj)
-!                  z2dx(ji,jj) = un(ji,jj,ikbu) * bfrua(ji,jj) * un(ji,jj,ikbu) / fse3u(ji,jj,ikbu)
-!                  z2dy(ji,jj) = un(ji,jj,ikbu) * bfrva(ji,jj) * vn(ji,jj,ikbv) / fse3v(ji,jj,ikbv)
+!                  z2dx(ji,jj) = un(ji,jj,ikbu) * bfrua(ji,jj) * un(ji,jj,ikbu) / e3u_n(ji,jj,ikbu)
+!                  z2dy(ji,jj) = un(ji,jj,ikbu) * bfrva(ji,jj) * vn(ji,jj,ikbv) / e3v_n(ji,jj,ikbv)
 !               END DO
 !            END DO
@@ -227,9 +226,9 @@
       
       !  Surface value (also valid in partial step case)
-      zconv(:,:,1) = zcoef * ( 2._wp * rhd(:,:,1) ) * wn(:,:,1) * fse3w(:,:,1)
+      zconv(:,:,1) = zcoef * ( 2._wp * rhd(:,:,1) ) * wn(:,:,1) * e3w_n(:,:,1)
 
       ! interior value (2=<jk=<jpkm1)
       DO jk = 2, jpk
-         zconv(:,:,jk) = zcoef * ( rhd(:,:,jk) + rhd(:,:,jk-1) ) * wn(:,:,jk) * fse3w(:,:,jk)
+         zconv(:,:,jk) = zcoef * ( rhd(:,:,jk) + rhd(:,:,jk-1) ) * wn(:,:,jk) * e3w_n(:,:,jk)
       END DO
 
@@ -238,5 +237,5 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               zcoef = 0.5_wp / fse3t(ji,jj,jk)
+               zcoef = 0.5_wp / e3t_n(ji,jj,jk)
                pconv(ji,jj,jk) = zcoef * ( zconv(ji,jj,jk) + zconv(ji,jj,jk+1) ) * tmask(ji,jj,jk)
             END DO
@@ -271,7 +270,7 @@
       IF( .NOT.lk_vvl ) THEN      ! constant volume: bu, bv, 1/bt computed one for all
          DO jk = 1, jpkm1
-            bu   (:,:,jk) =           e1e2u(:,:) * fse3u_n(:,:,jk)
-            bv   (:,:,jk) =           e1e2v(:,:) * fse3v_n(:,:,jk)
-            r1_bt(:,:,jk) = 1._wp / ( e1e2t(:,:) * fse3t_n(:,:,jk) )
+            bu   (:,:,jk) =           e1e2u(:,:) * e3u_n(:,:,jk)
+            bv   (:,:,jk) =           e1e2v(:,:) * e3v_n(:,:,jk)
+            r1_bt(:,:,jk) = 1._wp / ( e1e2t(:,:) * e3t_n(:,:,jk) )
          END DO
       ENDIF
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90	(revision 5845)
@@ -50,6 +50,4 @@
    INTEGER ::   nkstp       ! current time step 
 
-
-
 !!gm  to be moved from trdmxl_oce
 !   REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   hml                ! ML depth (sum of e3t over nmln-1 levels) [m] 
@@ -73,5 +71,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "zdfddm_substitute.h90"
    !!----------------------------------------------------------------------
@@ -126,5 +123,5 @@
             DO jj = 1,jpj
                DO ji = 1,jpi
-                  IF( jk - kmxln(ji,jj) < 0 )   wkx(ji,jj,jk) = fse3t(ji,jj,jk) * tmask(ji,jj,jk)
+                  IF( jk - kmxln(ji,jj) < 0 )   wkx(ji,jj,jk) = e3t_n(ji,jj,jk) * tmask(ji,jj,jk)
                END DO
             END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdpen.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdpen.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdpen.F90	(revision 5845)
@@ -37,5 +37,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "zdfddm_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
@@ -102,5 +101,5 @@
                                      &   - ( rab_n(:,:,1,jp_tem) + rab_pe(:,:,1,jp_tem) ) * tsn(:,:,1,jp_tem)    &
                                      &   + ( rab_n(:,:,1,jp_sal) + rab_pe(:,:,1,jp_sal) ) * tsn(:,:,1,jp_sal)    &
-                                     & ) / fse3t(:,:,1)
+                                     & ) / e3t_n(:,:,1)
                                    CALL iom_put( "petrd_sad" , z2d )
                                    CALL wrk_dealloc( jpi, jpj, z2d )
@@ -120,5 +119,5 @@
                                 !   z2d(:,:) = ( ssha(:,:) - sshb(:,:) )                 &
                                 !      &     * (   dPE_dt(:,:,1) * tsn(:,:,1,jp_tem)    &
-                                !      &         + dPE_ds(:,:,1) * tsn(:,:,1,jp_sal)  ) / ( fse3t(:,:,1) * pdt )
+                                !      &         + dPE_ds(:,:,1) * tsn(:,:,1,jp_sal)  ) / ( e3t_n(:,:,1) * pdt )
                                 !   CALL iom_put( "petrd_sad" , z2d )
                                 !   CALL wrk_dealloc( jpi, jpj, z2d )
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90	(revision 5845)
@@ -43,5 +43,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "zdfddm_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
@@ -130,12 +129,12 @@
             zwt(:,:,jpk) = 0._wp   ;   zws(:,:,jpk) = 0._wp
             DO jk = 2, jpk
-               zwt(:,:,jk) =   avt(:,:,jk) * ( tsa(:,:,jk-1,jp_tem) - tsa(:,:,jk,jp_tem) ) / fse3w(:,:,jk) * tmask(:,:,jk)
-               zws(:,:,jk) = fsavs(:,:,jk) * ( tsa(:,:,jk-1,jp_sal) - tsa(:,:,jk,jp_sal) ) / fse3w(:,:,jk) * tmask(:,:,jk)
+               zwt(:,:,jk) =   avt(:,:,jk) * ( tsa(:,:,jk-1,jp_tem) - tsa(:,:,jk,jp_tem) ) / e3w_n(:,:,jk) * tmask(:,:,jk)
+               zws(:,:,jk) = fsavs(:,:,jk) * ( tsa(:,:,jk-1,jp_sal) - tsa(:,:,jk,jp_sal) ) / e3w_n(:,:,jk) * tmask(:,:,jk)
             END DO
             !
             ztrdt(:,:,jpk) = 0._wp   ;   ztrds(:,:,jpk) = 0._wp
             DO jk = 1, jpkm1
-               ztrdt(:,:,jk) = ( zwt(:,:,jk) - zwt(:,:,jk+1) ) / fse3t(:,:,jk)
-               ztrds(:,:,jk) = ( zws(:,:,jk) - zws(:,:,jk+1) ) / fse3t(:,:,jk) 
+               ztrdt(:,:,jk) = ( zwt(:,:,jk) - zwt(:,:,jk+1) ) / e3t_n(:,:,jk)
+               ztrds(:,:,jk) = ( zws(:,:,jk) - zws(:,:,jk+1) ) / e3t_n(:,:,jk) 
             END DO
             CALL trd_tra_mng( ztrdt, ztrds, jptra_zdfp, kt )  
@@ -207,5 +206,5 @@
                ptrd(ji,jj,jk) = - (     pf (ji,jj,jk) - pf (ji-ii,jj-ij,jk-ik)                        &
                  &                  - ( pun(ji,jj,jk) - pun(ji-ii,jj-ij,jk-ik) ) * ptn(ji,jj,jk)  )   &
-                 &              / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )  * tmask(ji,jj,jk)
+                 &              / ( e1t(ji,jj) * e2t(ji,jj) * e3t_n(ji,jj,jk) )  * tmask(ji,jj,jk)
             END DO
          END DO
@@ -308,6 +307,6 @@
                                IF( .NOT. lk_vvl ) THEN                   ! cst volume : adv flux through z=0 surface
                                	 CALL wrk_alloc( jpi, jpj, z2dx, z2dy )
-                                  z2dx(:,:) = wn(:,:,1) * tsn(:,:,1,jp_tem) / fse3t(:,:,1)
-                                  z2dy(:,:) = wn(:,:,1) * tsn(:,:,1,jp_sal) / fse3t(:,:,1)
+                                  z2dx(:,:) = wn(:,:,1) * tsn(:,:,1,jp_tem) / e3t_n(:,:,1)
+                                  z2dy(:,:) = wn(:,:,1) * tsn(:,:,1,jp_sal) / e3t_n(:,:,1)
                                   CALL iom_put( "ttrd_sad", z2dx )
                                   CALL iom_put( "strd_sad", z2dy )
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90	(revision 5845)
@@ -57,5 +57,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -109,6 +108,6 @@
          DO jj = 2, jpjm1                                                             ! wind stress trends
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               ztswu(ji,jj) = 0.5 * ( utau_b(ji,jj) + utau(ji,jj) ) / ( fse3u(ji,jj,1) * rau0 )
-               ztswv(ji,jj) = 0.5 * ( vtau_b(ji,jj) + vtau(ji,jj) ) / ( fse3v(ji,jj,1) * rau0 )
+               ztswu(ji,jj) = 0.5 * ( utau_b(ji,jj) + utau(ji,jj) ) / ( e3u_n(ji,jj,1) * rau0 )
+               ztswv(ji,jj) = 0.5 * ( vtau_b(ji,jj) + vtau(ji,jj) ) / ( e3v_n(ji,jj,1) * rau0 )
             END DO
          END DO
@@ -183,18 +182,18 @@
                ikbu = mbkv(ji,jj)
                ikbv = mbkv(ji,jj)            
-               zudpvor(ji,jj) = putrdvor(ji,jj) * fse3u(ji,jj,ikbu) * e1u(ji,jj) * umask(ji,jj,ikbu)
-               zvdpvor(ji,jj) = pvtrdvor(ji,jj) * fse3v(ji,jj,ikbv) * e2v(ji,jj) * vmask(ji,jj,ikbv)
+               zudpvor(ji,jj) = putrdvor(ji,jj) * e3u_n(ji,jj,ikbu) * e1u(ji,jj) * umask(ji,jj,ikbu)
+               zvdpvor(ji,jj) = pvtrdvor(ji,jj) * e3v_n(ji,jj,ikbv) * e2v(ji,jj) * vmask(ji,jj,ikbv)
             END DO
          END DO
          !
       CASE( jpvor_swf )        ! wind stress
-         zudpvor(:,:) = putrdvor(:,:) * fse3u(:,:,1) * e1u(:,:) * umask(:,:,1)
-         zvdpvor(:,:) = pvtrdvor(:,:) * fse3v(:,:,1) * e2v(:,:) * vmask(:,:,1)
+         zudpvor(:,:) = putrdvor(:,:) * e3u_n(:,:,1) * e1u(:,:) * umask(:,:,1)
+         zvdpvor(:,:) = pvtrdvor(:,:) * e3v_n(:,:,1) * e2v(:,:) * vmask(:,:,1)
          !
       END SELECT
 
       ! Average except for Beta.V
-      zudpvor(:,:) = zudpvor(:,:) * hur(:,:)
-      zvdpvor(:,:) = zvdpvor(:,:) * hvr(:,:)
+      zudpvor(:,:) = zudpvor(:,:) * r1_hu_n(:,:)
+      zvdpvor(:,:) = zvdpvor(:,:) * r1_hv_n(:,:)
    
       ! Curl
@@ -270,6 +269,6 @@
       ! putrdvor and pvtrdvor terms
       DO jk = 1,jpk
-        zudpvor(:,:) = zudpvor(:,:) + putrdvor(:,:,jk) * fse3u(:,:,jk) * e1u(:,:) * umask(:,:,jk)
-        zvdpvor(:,:) = zvdpvor(:,:) + pvtrdvor(:,:,jk) * fse3v(:,:,jk) * e2v(:,:) * vmask(:,:,jk)
+        zudpvor(:,:) = zudpvor(:,:) + putrdvor(:,:,jk) * e3u_n(:,:,jk) * e1u(:,:) * umask(:,:,jk)
+        zvdpvor(:,:) = zvdpvor(:,:) + pvtrdvor(:,:,jk) * e3v_n(:,:,jk) * e2v(:,:) * vmask(:,:,jk)
       END DO
 
@@ -286,10 +285,10 @@
          END DO
          ! Average of the Curl and Surface mask
-         vortrd(:,:,jpvor_bev) = vortrd(:,:,jpvor_bev) * hur(:,:) * fmask(:,:,1)
+         vortrd(:,:,jpvor_bev) = vortrd(:,:,jpvor_bev) * r1_hu_n(:,:) * fmask(:,:,1)
       ENDIF
       !
       ! Average 
-      zudpvor(:,:) = zudpvor(:,:) * hur(:,:)
-      zvdpvor(:,:) = zvdpvor(:,:) * hvr(:,:)
+      zudpvor(:,:) = zudpvor(:,:) * r1_hu_n(:,:)
+      zvdpvor(:,:) = zvdpvor(:,:) * r1_hv_n(:,:)
       !
       ! Curl
@@ -351,10 +350,10 @@
       ! Vertically averaged velocity
       DO jk = 1, jpk - 1
-         zun(:,:) = zun(:,:) + e1u(:,:) * un(:,:,jk) * fse3u(:,:,jk)
-         zvn(:,:) = zvn(:,:) + e2v(:,:) * vn(:,:,jk) * fse3v(:,:,jk)
+         zun(:,:) = zun(:,:) + e1u(:,:) * un(:,:,jk) * e3u_n(:,:,jk)
+         zvn(:,:) = zvn(:,:) + e2v(:,:) * vn(:,:,jk) * e3v_n(:,:,jk)
       END DO
  
-      zun(:,:) = zun(:,:) * hur(:,:)
-      zvn(:,:) = zvn(:,:) * hvr(:,:)
+      zun(:,:) = zun(:,:) * r1_hu_n(:,:)
+      zvn(:,:) = zvn(:,:) * r1_hv_n(:,:)
 
       ! Curl
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90	(revision 5845)
@@ -56,5 +56,4 @@
    !! * Substitutions
 #  include "vectopt_loop_substitute.h90"
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 4.0 , NEMO Consortium (2011)
@@ -117,5 +116,5 @@
                   ikbt = mbkt(ji,jj)
 !! JC: possible WAD implementation should modify line below if layers vanish
-                  ztmp = tmask(ji,jj,ikbt) * ( vkarmn / LOG( 0.5_wp * fse3t_n(ji,jj,ikbt) / rn_bfrz0 ))**2._wp
+                  ztmp = tmask(ji,jj,ikbt) * ( vkarmn / LOG( 0.5_wp * e3t_n(ji,jj,ikbt) / rn_bfrz0 ))**2._wp
                   zbfrt(ji,jj) = MAX(bfrcoef2d(ji,jj), ztmp)
                   zbfrt(ji,jj) = MIN(zbfrt(ji,jj), rn_bfri2_max)
@@ -128,5 +127,5 @@
                      ikbt = mikt(ji,jj)
 ! JC: possible WAD implementation should modify line below if layers vanish
-                     ztmp = (1-tmask(ji,jj,1)) * ( vkarmn / LOG( 0.5_wp * fse3t_n(ji,jj,ikbt) / rn_bfrz0 ))**2._wp
+                     ztmp = (1-tmask(ji,jj,1)) * ( vkarmn / LOG( 0.5_wp * e3t_n(ji,jj,ikbt) / rn_bfrz0 ))**2._wp
                      ztfrt(ji,jj) = MAX(tfrcoef2d(ji,jj), ztmp)
                      ztfrt(ji,jj) = MIN(ztfrt(ji,jj), rn_tfri2_max)
@@ -375,5 +374,5 @@
                DO ji = 1, jpi
                   ikbt = mbkt(ji,jj)
-                  ztmp = tmask(ji,jj,ikbt) * ( vkarmn / LOG( 0.5_wp * fse3t_n(ji,jj,ikbt) / rn_bfrz0 ))**2._wp
+                  ztmp = tmask(ji,jj,ikbt) * ( vkarmn / LOG( 0.5_wp * e3t_n(ji,jj,ikbt) / rn_bfrz0 ))**2._wp
                   bfrcoef2d(ji,jj) = MAX(bfrcoef2d(ji,jj), ztmp)
                   bfrcoef2d(ji,jj) = MIN(bfrcoef2d(ji,jj), rn_bfri2_max)
@@ -384,5 +383,5 @@
                   DO ji = 1, jpi
                      ikbt = mikt(ji,jj)
-                     ztmp = tmask(ji,jj,ikbt) * ( vkarmn / LOG( 0.5_wp * fse3t_n(ji,jj,ikbt) / rn_tfrz0 ))**2._wp
+                     ztmp = tmask(ji,jj,ikbt) * ( vkarmn / LOG( 0.5_wp * e3t_n(ji,jj,ikbt) / rn_tfrz0 ))**2._wp
                      tfrcoef2d(ji,jj) = MAX(tfrcoef2d(ji,jj), ztmp)
                      tfrcoef2d(ji,jj) = MIN(tfrcoef2d(ji,jj), rn_tfri2_max)
@@ -424,6 +423,6 @@
              ikbu = mbku(ji,jj)       ! deepest ocean level at u- and v-points
              ikbv = mbkv(ji,jj)
-             zfru = 0.5 * fse3u(ji,jj,ikbu) / rdt
-             zfrv = 0.5 * fse3v(ji,jj,ikbv) / rdt
+             zfru = 0.5 * e3u_n(ji,jj,ikbu) / rdt
+             zfrv = 0.5 * e3v_n(ji,jj,ikbv) / rdt
              IF( ABS( bfrcoef2d(ji,jj) ) > zfru ) THEN
                 IF( ln_ctl ) THEN
@@ -446,6 +445,6 @@
                 ikbu = miku(ji,jj)       ! 1st wet ocean level at u- and v-points
                 ikbv = mikv(ji,jj)
-                zfru = 0.5 * fse3u(ji,jj,ikbu) / rdt
-                zfrv = 0.5 * fse3v(ji,jj,ikbv) / rdt
+                zfru = 0.5 * e3u_n(ji,jj,ikbu) / rdt
+                zfrv = 0.5 * e3v_n(ji,jj,ikbv) / rdt
                 IF( ABS( tfrcoef2d(ji,jj) ) > zfru ) THEN
                    IF( ln_ctl ) THEN
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 5845)
@@ -44,5 +44,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -115,6 +114,6 @@
          DO jj = 1, jpj                                ! R=zrau = (alpha / beta) (dk[t] / dk[s])
             DO ji = 1, jpi
-               zrw =   ( fsdepw(ji,jj,jk  ) - fsdept(ji,jj,jk) )   &
-                  &  / ( fsdept(ji,jj,jk-1) - fsdept(ji,jj,jk) ) 
+               zrw =   ( gdepw_n(ji,jj,jk  ) - gdept_n(ji,jj,jk) )   &
+                  &  / ( gdept_n(ji,jj,jk-1) - gdept_n(ji,jj,jk) ) 
                !
                zaw = (  rab_n(ji,jj,jk,jp_tem) * (1. - zrw) + rab_n(ji,jj,jk-1,jp_tem) * zrw  )  &
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90	(revision 5845)
@@ -29,6 +29,4 @@
    PUBLIC   zdf_evd    ! called by step.F90
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 4.0 , NEMO Consortium (2011)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 5845)
@@ -102,5 +102,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -204,10 +203,8 @@
                avmu(ji,jj,jk) = avmu(ji,jj,jk) * ( un(ji,jj,jk-1) - un(ji,jj,jk) )   &
                   &                            * ( ub(ji,jj,jk-1) - ub(ji,jj,jk) )   &
-                  &                            / (  fse3uw_n(ji,jj,jk)               &
-                  &                            *    fse3uw_b(ji,jj,jk) )
+                  &                            / (  e3uw_n(ji,jj,jk) * e3uw_b(ji,jj,jk) )
                avmv(ji,jj,jk) = avmv(ji,jj,jk) * ( vn(ji,jj,jk-1) - vn(ji,jj,jk) )   &
                   &                            * ( vb(ji,jj,jk-1) - vb(ji,jj,jk) )   &
-                  &                            / (  fse3vw_n(ji,jj,jk)               &
-                  &                            *    fse3vw_b(ji,jj,jk) )
+                  &                            / (  e3vw_n(ji,jj,jk) * e3vw_b(ji,jj,jk) )
                eps(ji,jj,jk)  = rc03 * en(ji,jj,jk) * SQRT(en(ji,jj,jk)) / mxln(ji,jj,jk)
             END DO
@@ -226,6 +223,6 @@
             DO jj = 2, jpjm1 
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zup   = mxln(ji,jj,jk) * fsdepw(ji,jj,mbkt(ji,jj)+1)
-                  zdown = vkarmn * fsdepw(ji,jj,jk) * ( -fsdepw(ji,jj,jk) + fsdepw(ji,jj,mbkt(ji,jj)+1) )
+                  zup   = mxln(ji,jj,jk) * gdepw_n(ji,jj,mbkt(ji,jj)+1)
+                  zdown = vkarmn * gdepw_n(ji,jj,jk) * ( -gdepw_n(ji,jj,jk) + gdepw_n(ji,jj,mbkt(ji,jj)+1) )
                   zcoef = ( zup / MAX( zdown, rsmall ) )
                   zwall (ji,jj,jk) = ( 1._wp + re2 * zcoef*zcoef ) * tmask(ji,jj,jk)
@@ -284,9 +281,9 @@
                ! lower diagonal
                z_elem_a(ji,jj,jk) = zcof * ( avm  (ji,jj,jk  ) + avm  (ji,jj,jk-1) )   &
-                  &                      / ( fse3t(ji,jj,jk-1) * fse3w(ji,jj,jk  ) )
+                  &                      / ( e3t_n(ji,jj,jk-1) * e3w_n(ji,jj,jk  ) )
                !
                ! upper diagonal
                z_elem_c(ji,jj,jk) = zcof * ( avm  (ji,jj,jk+1) + avm  (ji,jj,jk  ) )   &
-                  &                      / ( fse3t(ji,jj,jk  ) * fse3w(ji,jj,jk) )
+                  &                      / ( e3t_n(ji,jj,jk  ) * e3w_n(ji,jj,jk) )
                !
                ! diagonal
@@ -320,5 +317,5 @@
       ! 
       ! One level below
-      en(:,:,2) = rc02r * ustars2(:,:) * (1._wp + rsbc_tke1 * ((zhsro(:,:)+fsdepw(:,:,2)) &
+      en(:,:,2) = rc02r * ustars2(:,:) * (1._wp + rsbc_tke1 * ((zhsro(:,:)+gdepw_n(:,:,2)) &
          &               / zhsro(:,:) )**(1.5_wp*ra_sf))**(2._wp/3._wp)
       en(:,:,2) = MAX(en(:,:,2), rn_emin )
@@ -341,9 +338,9 @@
       z_elem_b(:,:,2) = z_elem_b(:,:,2) +  z_elem_a(:,:,2) ! Remove z_elem_a from z_elem_b
       z_elem_a(:,:,2) = 0._wp
-      zkar(:,:)       = (rl_sf + (vkarmn-rl_sf)*(1.-exp(-rtrans*fsdept(:,:,1)/zhsro(:,:)) ))
+      zkar(:,:)       = (rl_sf + (vkarmn-rl_sf)*(1.-exp(-rtrans*gdept_n(:,:,1)/zhsro(:,:)) ))
       zflxs(:,:)      = rsbc_tke2 * ustars2(:,:)**1.5_wp * zkar(:,:) &
-          &                       * ((zhsro(:,:)+fsdept(:,:,1)) / zhsro(:,:) )**(1.5_wp*ra_sf)
-
-      en(:,:,2) = en(:,:,2) + zflxs(:,:)/fse3w(:,:,2)
+          &                       * ((zhsro(:,:)+gdept_n(:,:,1)) / zhsro(:,:) )**(1.5_wp*ra_sf)
+
+      en(:,:,2) = en(:,:,2) + zflxs(:,:)/e3w_n(:,:,2)
       !
       !
@@ -508,8 +505,8 @@
                ! lower diagonal
                z_elem_a(ji,jj,jk) = zcof * ( avm  (ji,jj,jk  ) + avm  (ji,jj,jk-1) )   &
-                  &                      / ( fse3t(ji,jj,jk-1) * fse3w(ji,jj,jk  ) )
+                  &                      / ( e3t_n(ji,jj,jk-1) * e3w_n(ji,jj,jk  ) )
                ! upper diagonal
                z_elem_c(ji,jj,jk) = zcof * ( avm  (ji,jj,jk+1) + avm  (ji,jj,jk  ) )   &
-                  &                      / ( fse3t(ji,jj,jk  ) * fse3w(ji,jj,jk) )
+                  &                      / ( e3t_n(ji,jj,jk  ) * e3w_n(ji,jj,jk) )
                ! diagonal
                z_elem_b(ji,jj,jk) = 1._wp - z_elem_a(ji,jj,jk) - z_elem_c(ji,jj,jk)  &
@@ -539,6 +536,6 @@
       !
       ! One level below
-      zkar(:,:)       = (rl_sf + (vkarmn-rl_sf)*(1._wp-exp(-rtrans*fsdepw(:,:,2)/zhsro(:,:) )))
-      zdep(:,:)       = (zhsro(:,:) + fsdepw(:,:,2)) * zkar(:,:)
+      zkar(:,:)       = (rl_sf + (vkarmn-rl_sf)*(1._wp-exp(-rtrans*gdepw_n(:,:,2)/zhsro(:,:) )))
+      zdep(:,:)       = (zhsro(:,:) + gdepw_n(:,:,2)) * zkar(:,:)
       psi (:,:,2)     = rc0**rpp * en(:,:,2)**rmm * zdep(:,:)**rnn * tmask(:,:,1)
       z_elem_a(:,:,2) = 0._wp
@@ -561,11 +558,11 @@
       !
       ! Set psi vertical flux at the surface:
-      zkar(:,:) = rl_sf + (vkarmn-rl_sf)*(1._wp-exp(-rtrans*fsdept(:,:,1)/zhsro(:,:) )) ! Lengh scale slope
-      zdep(:,:) = ((zhsro(:,:) + fsdept(:,:,1)) / zhsro(:,:))**(rmm*ra_sf)
+      zkar(:,:) = rl_sf + (vkarmn-rl_sf)*(1._wp-exp(-rtrans*gdept_n(:,:,1)/zhsro(:,:) )) ! Lengh scale slope
+      zdep(:,:) = ((zhsro(:,:) + gdept_n(:,:,1)) / zhsro(:,:))**(rmm*ra_sf)
       zflxs(:,:) = (rnn + rsbc_tke1 * (rnn + rmm*ra_sf) * zdep(:,:))*(1._wp + rsbc_tke1*zdep(:,:))**(2._wp*rmm/3._wp-1_wp)
       zdep(:,:) =  rsbc_psi1 * (zwall_psi(:,:,1)*avm(:,:,1)+zwall_psi(:,:,2)*avm(:,:,2)) * &
-             & ustars2(:,:)**rmm * zkar(:,:)**rnn * (zhsro(:,:) + fsdept(:,:,1))**(rnn-1.)
+             & ustars2(:,:)**rmm * zkar(:,:)**rnn * (zhsro(:,:) + gdept_n(:,:,1))**(rnn-1.)
       zflxs(:,:) = zdep(:,:) * zflxs(:,:)
-      psi(:,:,2) = psi(:,:,2) + zflxs(:,:) / fse3w(:,:,2)
+      psi(:,:,2) = psi(:,:,2) + zflxs(:,:) / e3w_n(:,:,2)
 
       !   
@@ -593,5 +590,5 @@
                !
                ! Just above last level, Dirichlet condition again (GOTM like)
-               zdep(ji,jj) = vkarmn * ( rn_bfrz0 + fse3t(ji,jj,ibotm1) )
+               zdep(ji,jj) = vkarmn * ( rn_bfrz0 + e3t_n(ji,jj,ibotm1) )
                psi (ji,jj,ibotm1) = rc0**rpp * en(ji,jj,ibot  )**rmm * zdep(ji,jj)**rnn
                z_elem_a(ji,jj,ibotm1) = 0._wp
@@ -621,8 +618,8 @@
                !
                ! Set psi vertical flux at the bottom:
-               zdep(ji,jj) = rn_bfrz0 + 0.5_wp*fse3t(ji,jj,ibotm1)
+               zdep(ji,jj) = rn_bfrz0 + 0.5_wp*e3t_n(ji,jj,ibotm1)
                zflxb = rsbc_psi2 * ( avm(ji,jj,ibot) + avm(ji,jj,ibotm1) )   &
                   &  * (0.5_wp*(en(ji,jj,ibot)+en(ji,jj,ibotm1)))**rmm * zdep(ji,jj)**(rnn-1._wp)
-               psi(ji,jj,ibotm1) = psi(ji,jj,ibotm1) + zflxb / fse3w(ji,jj,ibotm1)
+               psi(ji,jj,ibotm1) = psi(ji,jj,ibotm1) + zflxb / e3w_n(ji,jj,ibotm1)
             END DO
          END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90	(revision 5845)
@@ -36,6 +36,4 @@
    REAL(wp)         ::   avt_c = 5.e-4_wp   ! Kz criterion for the turbocline depth
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 4.0 , NEMO Consortium (2011)
@@ -105,5 +103,5 @@
             DO ji = 1, jpi
                ikt = mbkt(ji,jj)
-               hmlp(ji,jj) = hmlp(ji,jj) + MAX( rn2b(ji,jj,jk) , 0._wp ) * fse3w(ji,jj,jk)
+               hmlp(ji,jj) = hmlp(ji,jj) + MAX( rn2b(ji,jj,jk) , 0._wp ) * e3w_n(ji,jj,jk)
                IF( hmlp(ji,jj) < zN2_c )   nmln(ji,jj) = MIN( jk , ikt ) + 1   ! Mixed layer level
             END DO
@@ -127,7 +125,7 @@
             iikn = nmln(ji,jj)
             imkt = mikt(ji,jj)
-            hmld (ji,jj) = ( fsdepw(ji,jj,iiki  ) - fsdepw(ji,jj,imkt )            )   * ssmask(ji,jj)    ! Turbocline depth 
-            hmlp (ji,jj) = ( fsdepw(ji,jj,iikn  ) - fsdepw(ji,jj,MAX( imkt,nla10 ) ) ) * ssmask(ji,jj)    ! Mixed layer depth
-            hmlpt(ji,jj) = ( fsdept(ji,jj,iikn-1) - fsdepw(ji,jj,imkt )            )   * ssmask(ji,jj)    ! depth of the last T-point inside the mixed layer
+            hmld (ji,jj) = ( gdepw_n(ji,jj,iiki  ) - gdepw_n(ji,jj,imkt )            )   * ssmask(ji,jj)    ! Turbocline depth 
+            hmlp (ji,jj) = ( gdepw_n(ji,jj,iikn  ) - gdepw_n(ji,jj,MAX( imkt,nla10 ) ) ) * ssmask(ji,jj)    ! Mixed layer depth
+            hmlpt(ji,jj) = ( gdept_n(ji,jj,iikn-1) - gdepw_n(ji,jj,imkt )            )   * ssmask(ji,jj)    ! depth of the last T-point inside the mixed layer
          END DO
       END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 5845)
@@ -55,5 +55,5 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 4.0 , NEMO Consortium (2011)
@@ -133,6 +133,6 @@
          ! -----------------
          DO jj = 2, jpjm1
-            DO ji = 2, jpim1
-               zcoef = 0.5 / fse3w(ji,jj,jk)
+            DO ji = fs_2, fs_jpim1
+               zcoef = 0.5 / e3w_n(ji,jj,jk)
                !                                            ! shear of horizontal velocity
                zdku = zcoef * (  ub(ji-1,jj,jk-1) + ub(ji,jj,jk-1)   &
@@ -151,5 +151,5 @@
          z05alp = 0.5_wp * rn_alp
          DO jj = 1, jpjm1                                   ! Eddy viscosity coefficients (avm)
-            DO ji = 1, jpim1
+            DO ji = 1, fs_jpim1
                avmu(ji,jj,jk) = umask(ji,jj,jk) * rn_avmri / ( 1. + z05alp*( zwx(ji+1,jj)+zwx(ji,jj) ) )**nn_ric
                avmv(ji,jj,jk) = vmask(ji,jj,jk) * rn_avmri / ( 1. + z05alp*( zwx(ji,jj+1)+zwx(ji,jj) ) )**nn_ric
@@ -157,5 +157,5 @@
          END DO
          DO jj = 2, jpjm1                                   ! Eddy diffusivity coefficients (avt)
-            DO ji = 2, jpim1
+            DO ji = fs_2, fs_jpim1
                avt(ji,jj,jk) = tmric(ji,jj,jk) / ( 1._wp + rn_alp * zwx(ji,jj) )           &
                   &                            * (  avmu(ji,jj,jk) + avmu(ji-1,jj,jk)      &
@@ -176,6 +176,6 @@
       ! -------------------------------------------------------
       zflageos = ( 0.5 + SIGN( 0.5, nn_eos - 1. ) ) * rau0
-      DO jj = 1, jpj
-         DO ji = 1, jpi
+      DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1
             zrhos          = rhop(ji,jj,1) + zflageos * ( 1. - tmask(ji,jj,1) )
             zustar         = SQRT( taum(ji,jj) / ( zrhos +  rsmall ) )
@@ -189,6 +189,6 @@
       ! are always equal to the namelist values rn_wtmix/rn_wvmix
       ! -------------------------------------------------------
-      DO jj = 1, jpj
-         DO ji = 1, jpi
+      DO jj = 2, jpjm1
+         DO ji = fs_2, fs_jpim1
             avmv(ji,jj,1) = MAX( avmv(ji,jj,1), rn_wvmix )
             avmu(ji,jj,1) = MAX( avmu(ji,jj,1), rn_wvmix )
@@ -200,6 +200,6 @@
       ! -------------------------------------------------------
       DO jk = 2, jpkm1
-         DO jj = 1, jpj
-            DO ji = 1, jpi
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1
                IF( fsdept(ji,jj,jk) < ekm_dep(ji,jj) ) THEN
                   avmv(ji,jj,jk) = MAX( avmv(ji,jj,jk), rn_wvmix )
@@ -212,6 +212,6 @@
 
       DO jk = 1, jpkm1                
-         DO jj = 1, jpj
-            DO ji = 1, jpi
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1
                avmv(ji,jj,jk) = avmv(ji,jj,jk) * vmask(ji,jj,jk)
                avmu(ji,jj,jk) = avmu(ji,jj,jk) * umask(ji,jj,jk)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 5845)
@@ -99,5 +99,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -294,7 +293,7 @@
          !
          !                        !* total energy produce by LC : cumulative sum over jk
-         zpelc(:,:,1) =  MAX( rn2b(:,:,1), 0._wp ) * fsdepw(:,:,1) * fse3w(:,:,1)
+         zpelc(:,:,1) =  MAX( rn2b(:,:,1), 0._wp ) * gdepw_n(:,:,1) * e3w_n(:,:,1)
          DO jk = 2, jpk
-            zpelc(:,:,jk)  = zpelc(:,:,jk-1) + MAX( rn2b(:,:,jk), 0._wp ) * fsdepw(:,:,jk) * fse3w(:,:,jk)
+            zpelc(:,:,jk)  = zpelc(:,:,jk-1) + MAX( rn2b(:,:,jk), 0._wp ) * gdepw_n(:,:,jk) * e3w_n(:,:,jk)
          END DO
          !                        !* finite Langmuir Circulation depth
@@ -312,5 +311,5 @@
          DO jj = 1, jpj 
             DO ji = 1, jpi
-               zhlc(ji,jj) = fsdepw(ji,jj,imlc(ji,jj))
+               zhlc(ji,jj) = gdepw_n(ji,jj,imlc(ji,jj))
             END DO
          END DO
@@ -321,6 +320,6 @@
                   zus  = zcof * SQRT( taum(ji,jj) )           ! Stokes drift
                   !                                           ! vertical velocity due to LC
-                  zind = 0.5 - SIGN( 0.5, fsdepw(ji,jj,jk) - zhlc(ji,jj) )
-                  zwlc = zind * rn_lc * zus * SIN( rpi * fsdepw(ji,jj,jk) / zhlc(ji,jj) )
+                  zind = 0.5 - SIGN( 0.5, gdepw_n(ji,jj,jk) - zhlc(ji,jj) )
+                  zwlc = zind * rn_lc * zus * SIN( rpi * gdepw_n(ji,jj,jk) / zhlc(ji,jj) )
                   !                                           ! TKE Langmuir circulation source term
                   en(ji,jj,jk) = en(ji,jj,jk) + rdt * ( zwlc * zwlc * zwlc ) / zhlc(ji,jj) * wmask(ji,jj,jk) * tmask(ji,jj,1)
@@ -344,9 +343,9 @@
                   &                 * (  un(ji,jj,jk-1) -  un(ji  ,jj,jk) )   &
                   &                 * (  ub(ji,jj,jk-1) -  ub(ji  ,jj,jk) ) * wumask(ji,jj,jk) &
-                  &                 / (  fse3uw_n(ji,jj,jk) * fse3uw_b(ji,jj,jk) )
+                  &                 / (  e3uw_n(ji,jj,jk) * e3uw_b(ji,jj,jk) )
                z3dv(ji,jj,jk) = 0.5 * ( avm(ji,jj,jk  ) + avm(ji,jj+1,jk) )   &
                   &                 * (  vn(ji,jj,jk-1) -  vn(ji,jj  ,jk) )   &
                   &                 * (  vb(ji,jj,jk-1) -  vb(ji,jj  ,jk) ) * wvmask(ji,jj,jk) &
-                  &                 / (  fse3vw_n(ji,jj,jk) * fse3vw_b(ji,jj,jk) )
+                  &                 / (  e3vw_n(ji,jj,jk) * e3vw_b(ji,jj,jk) )
             END DO
          END DO
@@ -377,7 +376,7 @@
                zcof   = zfact1 * tmask(ji,jj,jk)
                zzd_up = zcof * ( avm  (ji,jj,jk+1) + avm  (ji,jj,jk  ) )   &  ! upper diagonal
-                  &          / ( fse3t(ji,jj,jk  ) * fse3w(ji,jj,jk  ) )
+                  &          / ( e3t_n(ji,jj,jk  ) * e3w_n(ji,jj,jk  ) )
                zzd_lw = zcof * ( avm  (ji,jj,jk  ) + avm  (ji,jj,jk-1) )   &  ! lower diagonal
-                  &          / ( fse3t(ji,jj,jk-1) * fse3w(ji,jj,jk  ) )
+                  &          / ( e3t_n(ji,jj,jk-1) * e3w_n(ji,jj,jk  ) )
                !                                   ! shear prod. at w-point weightened by mask
                zesh2  =  ( z3du(ji-1,jj,jk) + z3du(ji,jj,jk) ) / MAX( 1._wp , umask(ji-1,jj,jk) + umask(ji,jj,jk) )   &
@@ -438,9 +437,12 @@
       !                            !  TKE due to surface and internal wave breaking
       !                            !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+!!gm BUG : in the exp  remove the depth of ssh !!!
+      
+      
       IF( nn_etau == 1 ) THEN           !* penetration below the mixed layer (rn_efr fraction)
          DO jk = 2, jpkm1
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  en(ji,jj,jk) = en(ji,jj,jk) + rn_efr * en(ji,jj,1) * EXP( -fsdepw(ji,jj,jk) / htau(ji,jj) )   &
+                  en(ji,jj,jk) = en(ji,jj,jk) + rn_efr * en(ji,jj,1) * EXP( -gdepw_n(ji,jj,jk) / htau(ji,jj) )   &
                      &                                 * ( 1._wp - fr_i(ji,jj) )  * wmask(ji,jj,jk) * tmask(ji,jj,1)
                END DO
@@ -451,5 +453,5 @@
             DO ji = fs_2, fs_jpim1   ! vector opt.
                jk = nmln(ji,jj)
-               en(ji,jj,jk) = en(ji,jj,jk) + rn_efr * en(ji,jj,1) * EXP( -fsdepw(ji,jj,jk) / htau(ji,jj) )   &
+               en(ji,jj,jk) = en(ji,jj,jk) + rn_efr * en(ji,jj,1) * EXP( -gdepw_n(ji,jj,jk) / htau(ji,jj) )   &
                   &                                 * ( 1._wp - fr_i(ji,jj) )  * wmask(ji,jj,jk) * tmask(ji,jj,1)
             END DO
@@ -464,5 +466,5 @@
                   zdif = taum(ji,jj) - ztau                            ! mean of modulus - modulus of the mean 
                   zdif = rhftau_scl * MAX( 0._wp, zdif + rhftau_add )  ! apply some modifications...
-                  en(ji,jj,jk) = en(ji,jj,jk) + zbbrau * zdif * EXP( -fsdepw(ji,jj,jk) / htau(ji,jj) )   &
+                  en(ji,jj,jk) = en(ji,jj,jk) + zbbrau * zdif * EXP( -gdepw_n(ji,jj,jk) / htau(ji,jj) )   &
                      &                        * ( 1._wp - fr_i(ji,jj) ) * wmask(ji,jj,jk) * tmask(ji,jj,1)
                END DO
@@ -570,9 +572,9 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zemxl = MIN( fsdepw(ji,jj,jk) - fsdepw(ji,jj,mikt(ji,jj)), zmxlm(ji,jj,jk),   &
-                  &            fsdepw(ji,jj,mbkt(ji,jj)+1) - fsdepw(ji,jj,jk) )
+                  zemxl = MIN( gdepw_n(ji,jj,jk) - gdepw_n(ji,jj,mikt(ji,jj)), zmxlm(ji,jj,jk),   &
+                  &            gdepw_n(ji,jj,mbkt(ji,jj)+1) - gdepw_n(ji,jj,jk) )
                   ! wmask prevent zmxlm = 0 if jk = mikt(ji,jj)
-                  zmxlm(ji,jj,jk) = zemxl * wmask(ji,jj,jk) + MIN(zmxlm(ji,jj,jk),fse3w(ji,jj,jk)) * (1 - wmask(ji,jj,jk))
-                  zmxld(ji,jj,jk) = zemxl * wmask(ji,jj,jk) + MIN(zmxlm(ji,jj,jk),fse3w(ji,jj,jk)) * (1 - wmask(ji,jj,jk))
+                  zmxlm(ji,jj,jk) = zemxl * wmask(ji,jj,jk) + MIN(zmxlm(ji,jj,jk),e3w_n(ji,jj,jk)) * (1 - wmask(ji,jj,jk))
+                  zmxld(ji,jj,jk) = zemxl * wmask(ji,jj,jk) + MIN(zmxlm(ji,jj,jk),e3w_n(ji,jj,jk)) * (1 - wmask(ji,jj,jk))
                END DO
             END DO
@@ -583,5 +585,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zemxl = MIN( fse3w(ji,jj,jk), zmxlm(ji,jj,jk) )
+                  zemxl = MIN( e3w_n(ji,jj,jk), zmxlm(ji,jj,jk) )
                   zmxlm(ji,jj,jk) = zemxl
                   zmxld(ji,jj,jk) = zemxl
@@ -594,5 +596,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zmxlm(ji,jj,jk) = MIN( zmxlm(ji,jj,jk-1) + fse3t(ji,jj,jk-1), zmxlm(ji,jj,jk) )
+                  zmxlm(ji,jj,jk) = MIN( zmxlm(ji,jj,jk-1) + e3t_n(ji,jj,jk-1), zmxlm(ji,jj,jk) )
                END DO
             END DO
@@ -601,5 +603,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zemxl = MIN( zmxlm(ji,jj,jk+1) + fse3t(ji,jj,jk+1), zmxlm(ji,jj,jk) )
+                  zemxl = MIN( zmxlm(ji,jj,jk+1) + e3t_n(ji,jj,jk+1), zmxlm(ji,jj,jk) )
                   zmxlm(ji,jj,jk) = zemxl
                   zmxld(ji,jj,jk) = zemxl
@@ -612,5 +614,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zmxld(ji,jj,jk) = MIN( zmxld(ji,jj,jk-1) + fse3t(ji,jj,jk-1), zmxlm(ji,jj,jk) )
+                  zmxld(ji,jj,jk) = MIN( zmxld(ji,jj,jk-1) + e3t_n(ji,jj,jk-1), zmxlm(ji,jj,jk) )
                END DO
             END DO
@@ -619,5 +621,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zmxlm(ji,jj,jk) = MIN( zmxlm(ji,jj,jk+1) + fse3t(ji,jj,jk+1), zmxlm(ji,jj,jk) )
+                  zmxlm(ji,jj,jk) = MIN( zmxlm(ji,jj,jk+1) + e3t_n(ji,jj,jk+1), zmxlm(ji,jj,jk) )
                END DO
             END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90	(revision 5845)
@@ -51,5 +51,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -126,5 +125,5 @@
       zkz(:,:) = 0.e0               !* Associated potential energy consummed over the whole water column
       DO jk = 2, jpkm1
-         zkz(:,:) = zkz(:,:) + fse3w(:,:,jk) * MAX( 0.e0, rn2(:,:,jk) ) * rau0 * zav_tide(:,:,jk) * wmask(:,:,jk)
+         zkz(:,:) = zkz(:,:) + e3w_n(:,:,jk) * MAX( 0.e0, rn2(:,:,jk) ) * rau0 * zav_tide(:,:,jk) * wmask(:,:,jk)
       END DO
 
@@ -144,5 +143,5 @@
             DO jj= 1, jpj
                DO ji= 1, jpi
-                  ztpc = ztpc + fse3w(ji,jj,jk) * e1e2t(ji,jj)                  &
+                  ztpc = ztpc + e3w_n(ji,jj,jk) * e1e2t(ji,jj)                  &
                      &        * MAX( 0.e0, rn2(ji,jj,jk) ) * zav_tide(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
                END DO
@@ -238,6 +237,6 @@
       zsum2(:,:) = 0.e0
       DO jk= 2, jpk
-         zsum1(:,:) = zsum1(:,:) + zempba_3d_1(:,:,jk) * fse3w(:,:,jk) * wmask(:,:,jk)
-         zsum2(:,:) = zsum2(:,:) + zempba_3d_2(:,:,jk) * fse3w(:,:,jk) * wmask(:,:,jk)               
+         zsum1(:,:) = zsum1(:,:) + zempba_3d_1(:,:,jk) * e3w_n(:,:,jk) * wmask(:,:,jk)
+         zsum2(:,:) = zsum2(:,:) + zempba_3d_2(:,:,jk) * e3w_n(:,:,jk) * wmask(:,:,jk)               
       END DO
       DO jj = 1, jpj
@@ -256,5 +255,5 @@
                !
                zempba_3d(ji,jj,jk) =               ztpc 
-               zsum     (ji,jj)    = zsum(ji,jj) + ztpc * fse3w(ji,jj,jk)
+               zsum     (ji,jj)    = zsum(ji,jj) + ztpc * e3w_n(ji,jj,jk)
             END DO
          END DO
@@ -275,5 +274,5 @@
       zkz(:,:) = 0.e0               ! Associated potential energy consummed over the whole water column
       DO jk = 2, jpkm1
-         zkz(:,:) = zkz(:,:) + fse3w(:,:,jk) * MAX( 0.e0, rn2(:,:,jk) ) * rau0 * zavt_itf(:,:,jk) * wmask(:,:,jk)
+         zkz(:,:) = zkz(:,:) + e3w_n(:,:,jk) * MAX( 0.e0, rn2(:,:,jk) ) * rau0 * zavt_itf(:,:,jk) * wmask(:,:,jk)
       END DO
 
@@ -293,5 +292,5 @@
             DO jj= 1, jpj
                DO ji= 1, jpi
-                  ztpc = ztpc + e1e2t(ji,jj) * fse3w(ji,jj,jk) * MAX( 0.e0, rn2(ji,jj,jk) )   &
+                  ztpc = ztpc + e1e2t(ji,jj) * e3w_n(ji,jj,jk) * MAX( 0.e0, rn2(ji,jj,jk) )   &
                      &                       * zavt_itf(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
                END DO
@@ -447,5 +446,5 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  ztpc = ztpc + fse3w(ji,jj,jk) * e1e2t(ji,jj) * zpc(ji,jj,jk) * wmask(ji,jj,jk) * tmask_i(ji,jj)
+                  ztpc = ztpc + e3w_n(ji,jj,jk) * e1e2t(ji,jj) * zpc(ji,jj,jk) * wmask(ji,jj,jk) * tmask_i(ji,jj)
                END DO
             END DO
@@ -461,5 +460,5 @@
          zkz(:,:) = 0._wp
          DO jk = 2, jpkm1
-               zkz(:,:) = zkz(:,:) + fse3w(:,:,jk) * MAX(0.e0, rn2(:,:,jk)) * rau0 * zav_tide(:,:,jk) * wmask(:,:,jk)
+               zkz(:,:) = zkz(:,:) + e3w_n(:,:,jk) * MAX(0.e0, rn2(:,:,jk)) * rau0 * zav_tide(:,:,jk) * wmask(:,:,jk)
          END DO
          ! Here zkz should be equal to en_tmx ==> multiply by en_tmx/zkz
@@ -489,5 +488,5 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  ztpc = ztpc + fse3w(ji,jj,jk) * e1e2t(ji,jj) * zpc(ji,jj,jk) * wmask(ji,jj,jk) * tmask_i(ji,jj)
+                  ztpc = ztpc + e3w_n(ji,jj,jk) * e1e2t(ji,jj) * zpc(ji,jj,jk) * wmask(ji,jj,jk) * tmask_i(ji,jj)
                END DO
             END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/lib_print.f90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/lib_print.f90	(revision 5844)
+++ 	(revision )
@@ -1,262 +1,0 @@
-MODULE lib_print
-   !!======================================================================
-   !!                    ***  MODULE  lib_print  ***
-   !! print librairy :  formated real and integer array print
-   !!=====================================================================
-      
-   !!----------------------------------------------------------------------
-   !!   prihin       : print an integer 2D horizontal field
-   !!   prihre       : print an real 2D horizontal field
-   !!   prizre       : print an real 2D vertical field
-   !!----------------------------------------------------------------------
-   USE par_kind      ! kind parameters
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC   prihin, prihre, prizre
-
-   !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
-   !! $Id$ 
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-CONTAINS
-
-   SUBROUTINE prihin( ktab, ki   , kj   , kideb, kifin ,   &
-                      kind, kjdeb, kjfin, kjnd , kscale, kumout )
-      !!----------------------------------------------------------------------
-      !!                   ***  SUBROUTINE  prihre  ***
-      !!  
-      !! ** purpose :   Print an integer field
-      !!
-      !! ** method :   format of print is selected with the dummy argument kscale
-      !!
-      !! History :
-      !!        !  90-04 (0. Marti)  Original code
-      !!        !  92-02 (M. Imbard)
-      !!        !  03-07 (G. Madec)  F90, free form
-      !!----------------------------------------------------------------------
-      INTEGER, INTENT( in ) ::   &
-         ki, kj,                 &  ! array dimensions
-         kideb, kifin, kind,     &  ! first and last index, increment for i 
-         kjdeb, kjfin, kjnd,     &  ! first and last index, increment for j
-         kscale,                 &  ! kscale=0 or > 5  print ktab with format i8
-      !                             !         kscale=1 print ktab with format i1
-      !                             !         kscale=2 print ktab with format i2
-      !                             !         kscale=3 print ktab with format i3
-      !                             !         kscale=4 print ktab with format i4
-      !                             !         kscale=5 print ktab with format i5
-         kumout                     ! unit in which print
-      INTEGER, DIMENSION(ki,kj), INTENT( in ) ::   &
-         ktab                       ! integer 2D array to be print
-
-      !! * local declarations
-      INTEGER ::   ji, jj, jn       ! dummy loop indices
-      INTEGER ::   isca, il1, il2   ! temporary integers
-      INTEGER ::   iind, ijnd       ! temporary integers
-
-      isca = 10
-      IF( kscale == 0 )   isca = 10
-      IF( kscale == 1 )   isca = 100
-      IF( kscale == 2 )   isca = 60
-      IF( kscale == 3 )   isca = 40
-      IF( kscale == 4 )   isca = 30
-      IF( kscale == 5 )   isca = 20
-
-      iind = MAX( 1, kind )
-      ijnd = MAX( 1, kjnd )
-
-      il1 = kideb
-
-      DO jn = 1, (kifin-kideb+1)/(iind*isca) + 1
-
-        IF( il1 > kifin ) RETURN
-        WRITE(kumout,'(/)')
-        il2 = il1+iind*(isca-1)
-        IF( il2 > kifin )   il2 = kifin
-
-        IF( kscale == 1 ) THEN
-            WRITE(kumout,'(4x,i14," to ",1i4," each ",1i4,/)') il1, il2, iind
-            DO jj = kjfin, kjdeb, -ijnd
-              WRITE (kumout,'(1x,i3,100i1)') jj, ( ktab(ji,jj), ji = il1, il2, iind )
-            END DO  
-        ELSEIF( kscale == 2 ) THEN
-            WRITE(kumout,'(4x,i14," to ",1i4," each ",1i4,/)')il1, il2, iind
-            DO jj = kjfin, kjdeb, -ijnd
-              WRITE (kumout,'(1x,i3,60i2)') jj, ( ktab(ji,jj), ji = il1, il2, iind )
-            END DO  
-        ELSEIF( kscale == 3 ) THEN
-            WRITE(kumout,'(4x,i14," to ",1i4," each ",1i4,/)')il1, il2, iind
-            DO jj = kjfin, kjdeb, -ijnd
-              WRITE (kumout,'(1x,i3,40i3)') jj, ( ktab(ji,jj), ji = il1, il2, iind )
-            END DO  
-        ELSEIF( kscale == 4 ) THEN
-            WRITE(kumout,'(4x,30i4,/)') ( ji, ji = il1, il2, iind )
-            DO jj = kjfin, kjdeb, -ijnd
-              WRITE (kumout,'(1x,i3,30i4)') jj, ( ktab(ji,jj), ji = il1, il2, iind )
-            END DO  
-        ELSEIF( kscale == 5 ) THEN
-            WRITE(kumout,'(4x,20i5,/)') ( ji, ji = il1, il2, iind )
-            DO jj = kjfin, kjdeb, -ijnd
-              WRITE (kumout,'(1x,i3,20i5)') jj, ( ktab(ji,jj), ji = il1, il2, iind )
-            END DO  
-        ELSE
-            WRITE(kumout,'(4x,10i8,/)') ( ji, ji = il1, il2, iind )
-            DO jj = kjfin, kjdeb, -ijnd
-              WRITE (kumout,'(1x,i3,10i8)') jj, ( ktab(ji,jj), ji = il1, il2, iind )
-            END DO  
-        ENDIF
-
-        il1 = il1 + iind * isca
-      END DO  
-
-   END SUBROUTINE prihin
-
-
-   SUBROUTINE prihre( ptab, ki   , kj   , kideb, kifin ,   &
-                      kind, kjdeb, kjfin, kjnd , pscale, kumout )
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE prihre  ***
-      !!      
-      !! ** purpose :   Print a real field with the format 10e12.4 or 20f6.2
-      !!
-      !! ** method  :   the print format is selected with the pscale argument
-      !!
-      !! History :
-      !!   1.0  !  86-01  (P. Andrich)  Original code
-      !!        !  89-11  (C. Levy)
-      !!        !  92-02  (M. Imbard)
-      !!        !  92-06  (M. Imbard)
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   &
-         ki, kj,                 &  ! array dimensions
-         kideb, kifin, kind,     &  ! first and last index, increment for i
-         kjdeb, kjfin, kjnd,     &  ! first and last index, increment for j
-         kumout                     ! unit in which print
-      REAL(wp), INTENT( in ) ::   &
-         pscale                     ! = 0  print        ptab with e13.5 format
-         !                          ! else print pscale*ptab with f6.2 format
-      REAL(wp), DIMENSION(ki,kj), INTENT( in ) ::   &
-         ptab                       ! integer 2D array to be print
-
-      !! * Local variables
-      INTEGER ::   ji, jj, jn       ! dummy loop indices
-      INTEGER ::   isca, il1, il2   ! temporary integers
-
-      isca = 10
-      IF( pscale /= 0. )   isca=20
-
-      il1 = kideb
-
-      DO jn = 1, (kifin-kideb+1)/(kind*isca) + 1
-
-        IF( il1 > kifin )   RETURN
-
-        WRITE(kumout,9100)
-
-        il2 = il1+kind*(isca-1)
-        IF(il2 > kifin) il2 = kifin
-        IF( pscale == 0.) THEN
-            WRITE(kumout,9101) ( ji, ji = il1, il2, kind )
-            DO jj = kjfin, kjdeb, -kjnd
-              WRITE(kumout,9102) jj, ( ptab(ji,jj), ji = il1, il2, kind )
-            END DO  
-        ELSE
-            WRITE(kumout,9103) ( ji, ji = il1, il2, kind )
-            DO jj = kjfin, kjdeb, -kjnd
-              WRITE(kumout,9104) jj, ( pscale*ptab(ji,jj), ji = il1, il2, kind )
-            END DO  
-        ENDIF
-        il1 = il1+kind*isca
-
-      END DO  
-
-      ! formats
- 9100 FORMAT(/)
- 9101 FORMAT(10i12, /)
- 9102 FORMAT(1x, i3, 10(1pe12.4))
- 9103 FORMAT(3x, 20i6, /)
- 9104 FORMAT(1x, i3, 1x, 20f6.2)
-
-   END SUBROUTINE prihre
-
-
-   SUBROUTINE prizre( ptab , ki   , kj   , kk   , kjcut ,   &
-                      kideb, kifin, kid  , kkdeb, kkfin ,   &
-                      kkd  , pscale, kumout )
-      !!----------------------------------------------------------------------
-      !!                      ***  ROUTINE prizre  ***
-      !!
-      !! ** purpose :   Print a vertical slab from a tridimentional real field
-      !!
-      !!   METHOD :
-      !! ** method  :   the print format is selected with the argument pscale
-      !!
-      !! History :
-      !!      original : 86-01 (o. Marti)
-      !!      addition : 92-02 (M. Imbard)
-      !!      addition : 92-06 (M. Imbard)
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   &
-         ki, kj, kk,             &  ! array dimensions
-         kjcut,                  &  ! index j for the vertical slab
-         kideb, kifin, kid,      &  ! first and last index, increment for i
-         kkdeb, kkfin, kkd,      &  ! first and last index, increment for k
-         kumout                     ! unit in which print
-      REAL(wp), INTENT( in ) ::   &
-         pscale                     ! = 0  print        ptab with e12.4 format
-         !                          ! else print pscale*ptab with f6.2 format
-      REAL(wp), DIMENSION(ki,kj,kk), INTENT( in ) ::   &
-         ptab                       ! integer 3D array to be print
-
-      !! * Local variables
-      INTEGER ::   ji, jn, jk       ! dummy loop indices
-      INTEGER ::   isca, il1, il2   ! temporary integers
-      INTEGER ::   iind, iknd       !    "          "
-
-
-      iind = kid
-      iknd = kkd
-      isca = 10
-      IF( pscale /= 0.) isca = 20
-
-      IF (iind == 0) iind = 1
-      IF (iknd == 0) iknd = 1
-
-      il1 = kideb
-
-      DO jn = 1, (kifin-kideb+1)/(iind*isca) + 1
-
-        IF(il1 > kifin) RETURN
-        WRITE(kumout,9100)
-        il2 = il1+iind*(isca-1)
-        IF(il2 > kifin) il2 = kifin
-
-        IF( pscale == 0.) THEN
-            WRITE(kumout,9101) ( ji, ji = il1, il2, iind )
-            DO jk = kkdeb, kkfin, iknd
-              WRITE (kumout,9102) jk, ( ptab(ji,kjcut,jk), ji = il1, il2, iind )
-            END DO  
-        ELSE
-            WRITE (kumout,9103) ( ji, ji = il1, il2, iind )
-            DO jk = kkdeb, kkfin, iknd
-              WRITE(kumout,9104)jk, ( pscale*ptab(ji,kjcut,jk), ji = il1, il2, iind )
-            END DO  
-        ENDIF
-
-        il1 = il1+iind*isca
-      END DO      
-
- 9100 FORMAT(/)
- 9101 FORMAT(10i12, /)
- 9102 FORMAT(1x, i3, 10(1pe12.4))
- 9103 FORMAT(3x, 20i6, /)
- 9104 FORMAT(1x, i3, 1x, 20f6.1)
-
-      END SUBROUTINE prizre
-
-   !!======================================================================
-END MODULE lib_print
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 5845)
@@ -41,7 +41,4 @@
    PUBLIC   stp   ! called by nemogcm.F90
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
-!!gm   #  include "zdfddm_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.7 , NEMO Consortium (2015)
@@ -192,5 +189,5 @@
             IF(ln_sto_eos ) CALL sto_pts( tsn )                             ! Random T/S fluctuations
 !!gm
-                            CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) ) ! now in situ density for hpg computation
+                            CALL eos    ( tsn, rhd, rhop, gdept_n(:,:,:) )  ! now in situ density for hpg computation
                             
             IF( ln_zps .AND. .NOT. ln_isfcav)   &                           ! Partial steps: bottom before horizontal gradient
@@ -275,7 +272,7 @@
             IF( ln_sto_eos ) CALL sto_pts( tsn )                 ! Random T/S fluctuations
 !!gm
-                             CALL eos    ( tsa, rhd, rhop, fsdept_n(:,:,:) )  ! Time-filtered in situ density for hpg computation
+                             CALL eos    ( tsa, rhd, rhop, gdept_n(:,:,:) )   ! Time-filtered in situ density for hpg computation
             IF( ln_zps .AND. .NOT. ln_isfcav)                                &
-               &             CALL zps_hde    ( kstp, jpts, tsa, gtsu, gtsv,  &    ! Partial steps: before horizontal gradient
+               &             CALL zps_hde    ( kstp, jpts, tsa, gtsu, gtsv,  &  ! Partial steps: before horizontal gradient
                &                                           rhd, gru , grv    )  ! of t, s, rd at the last ocean level
             IF( ln_zps .AND.       ln_isfcav)                                &
@@ -288,5 +285,5 @@
             IF( ln_sto_eos ) CALL sto_pts( tsn )    ! Random T/S fluctuations
 !!gm
-                             CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) )  ! now in situ density for hpg computation
+                             CALL eos    ( tsn, rhd, rhop, gdept_n(:,:,:) )  ! now in situ density for hpg computation
          IF( ln_zps .AND. .NOT. ln_isfcav)                                   &
                &             CALL zps_hde    ( kstp, jpts, tsn, gtsu, gtsv,  &    ! Partial steps: bottom before horizontal gradient
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90	(revision 5845)
@@ -65,6 +65,4 @@
 #endif
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -104,5 +102,5 @@
       !!----------------------------------------------------------------------
       REAL(wp), DIMENSION(3,61), INTENT(out) ::   prgb   ! tabulated attenuation coefficient
-      !!
+      !
       INTEGER  ::   jc     ! dummy loop indice
       INTEGER  ::   irgb   ! temporary integer
@@ -188,5 +186,5 @@
          zchl = zrgb(1,jc)
          irgb = NINT( 41 + 20.* LOG10( zchl ) + 1.e-15 )
-         IF(lwp) WRITE(numout,*) '    jc =', jc, '  Chl = ', zchl, '  irgb = ', irgb
+         IF(lwp .AND. nn_print >= 1 ) WRITE(numout,*) '    jc =', jc, '  Chl = ', zchl, '  irgb = ', irgb
          IF( irgb /= jc ) THEN
             IF(lwp) WRITE(numout,*) '    jc =', jc, '  Chl = ', zchl, '  Chl class = ', irgb
@@ -210,5 +208,5 @@
       !!----------------------------------------------------------------------
       REAL(wp), DIMENSION(3,61), INTENT(out) ::   prgb   ! tabulated attenuation coefficient
-      !!
+      !
       INTEGER  ::   jc, jb ! dummy loop indice
       INTEGER  ::   irgb   ! temporary integer
@@ -262,5 +260,5 @@
       REAL(wp), INTENT(in) ::   prldex    ! longest depth of extinction
       REAL(wp), INTENT(in) ::   pqsr_frc  ! frac. solar radiation which penetrates 
-      !!
+      !
       INTEGER  ::   jk, pjl            ! levels
       REAL(wp) ::   zhext              ! deepest level till which light penetrates
@@ -276,5 +274,5 @@
       DO jk = jpkm1, 1, -1
          IF(SUM(tmask(:,:,jk)) > 0 ) THEN
-            zem = MAXVAL( fsdepw(:,:,jk+1) * tmask(:,:,jk) )
+            zem = MAXVAL( gdepw_0(:,:,jk+1) * tmask(:,:,jk) )
             IF( zem >= zhext )   pjl = jk                       ! last T-level reached by Qsr
          ELSE
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/SAS_SRC/diawri.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/SAS_SRC/diawri.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/SAS_SRC/diawri.F90	(revision 5845)
@@ -62,6 +62,4 @@
 
    !! * Substitutions
-#  include "zdfddm_substitute.h90"
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -107,5 +105,4 @@
       !! ** Method  :  use iom_put
       !!----------------------------------------------------------------------
-      !!
       INTEGER, INTENT( in ) ::   kt      ! ocean time-step index
       !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/SAS_SRC/step.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/SAS_SRC/step.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/SAS_SRC/step.F90	(revision 5845)
@@ -16,7 +16,20 @@
    USE oce              ! ocean dynamics and tracers variables
    USE dom_oce          ! ocean space and time domain variables 
-   USE in_out_manager   ! I/O manager
    USE sbc_oce
    USE sbccpl
+   USE daymod           ! calendar                         (day     routine)
+   USE sbcmod           ! surface boundary condition       (sbc     routine)
+   USE sbcrnf           ! surface boundary condition: runoff variables
+   USE eosbn2           ! equation of state                (eos_bn2 routine)
+   USE diawri           ! Standard run outputs             (dia_wri routine)
+   USE bdy_par          ! clem: mandatory for LIM3
+#if defined key_bdy
+   USE bdydta           ! clem: mandatory for LIM3
+#endif
+   USE stpctl           ! time stepping control            (stp_ctl routine)
+   USE prtctl           ! Print control                    (prt_ctl routine)
+   !
+   USE in_out_manager   ! I/O manager
+   USE timing           ! Timing            
    USE iom              !
    USE lbclnk
@@ -25,30 +38,9 @@
 #endif
 
-   USE daymod           ! calendar                         (day     routine)
-
-   USE sbcmod           ! surface boundary condition       (sbc     routine)
-   USE sbcrnf           ! surface boundary condition: runoff variables
-
-   USE eosbn2           ! equation of state                (eos_bn2 routine)
-
-   USE diawri           ! Standard run outputs             (dia_wri routine)
-   USE stpctl           ! time stepping control            (stp_ctl routine)
-   USE prtctl           ! Print control                    (prt_ctl routine)
-
-   USE timing           ! Timing            
-
-   USE bdy_par          ! clem: mandatory for LIM3
-#if defined key_bdy
-   USE bdydta           ! clem: mandatory for LIM3
-#endif
-
    IMPLICIT NONE
    PRIVATE
 
-   PUBLIC   stp   ! called by opa.F90
+   PUBLIC   stp   ! called by nemogcm.F90
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
-#  include "zdfddm_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90	(revision 5845)
@@ -49,6 +49,4 @@
    REAL(wp) ::   xconv3 = 1.e+3_wp             ! conversion from mol/l/atm to mol/m3/atm
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -257,5 +255,5 @@
                   &                      * tmask(ji,jj,1) * ( 1. - fr_i(ji,jj) ) / 2.
             ! Add the surface flux to the trend
-            tra(ji,jj,1,jpc14) = tra(ji,jj,1,jpc14) + qtr_c14(ji,jj) / fse3t(ji,jj,1) 
+            tra(ji,jj,1,jpc14) = tra(ji,jj,1,jpc14) + qtr_c14(ji,jj) / e3t_n(ji,jj,1) 
             
             ! cumulation of surface flux at each time step
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90	(revision 5845)
@@ -50,6 +50,4 @@
    REAL(wp) ::   xconv4 = 1.0e-12      ! conversion from mol/m3/atm to mol/m3/pptv 
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -167,5 +165,5 @@
                   &                         * tmask(ji,jj,1) * ( 1. - fr_i(ji,jj) )
                ! Add the surface flux to the trend
-               tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + qtr_cfc(ji,jj,jl) / fse3t(ji,jj,1) 
+               tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + qtr_cfc(ji,jj,jl) / e3t_n(ji,jj,1) 
 
                ! cumulation of surface flux at each time step
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90	(revision 5845)
@@ -60,5 +60,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -67,5 +66,4 @@
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -187,5 +185,5 @@
                !    closure : flux grazing is redistributed below level jpkbio
                zzoobod = tmminz * zzoo * zzoo
-               xksi(ji,jj) = xksi(ji,jj) + (1-fdbod) * zzoobod * fse3t(ji,jj,jk)
+               xksi(ji,jj) = xksi(ji,jj) + (1-fdbod) * zzoobod * e3t_n(ji,jj,jk)
                zboddet = fdbod * zzoobod
 
@@ -242,5 +240,5 @@
                 IF( ln_diatrc .OR. lk_iomput ) THEN
                   ! convert fluxes in per day
-                  ze3t = fse3t(ji,jj,jk) * 86400.
+                  ze3t = e3t_n(ji,jj,jk) * 86400.
                   zw2d(ji,jj,1)  = zw2d(ji,jj,1)  + zno3phy * ze3t
                   zw2d(ji,jj,2)  = zw2d(ji,jj,2)  + znh4phy * ze3t
@@ -363,5 +361,5 @@
                 IF( ln_diatrc .OR. lk_iomput ) THEN
                   ! convert fluxes in per day
-                  ze3t = fse3t(ji,jj,jk) * 86400.
+                  ze3t = e3t_n(ji,jj,jk) * 86400.
                   zw2d(ji,jj,1)  = zw2d(ji,jj,1)  + zno3phy * ze3t
                   zw2d(ji,jj,2)  = zw2d(ji,jj,2)  + znh4phy * ze3t
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90	(revision 5845)
@@ -42,5 +42,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -95,5 +94,5 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1
-               ze3t = 1. / fse3t(ji,jj,jk)
+               ze3t = 1. / e3t_n(ji,jj,jk)
                tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) + ze3t * dmin3(ji,jj,jk) * xksi(ji,jj)
             END DO
@@ -110,5 +109,5 @@
          DO ji = fs_2, fs_jpim1
             ikt = mbkt(ji,jj) 
-            tra(ji,jj,ikt,jpno3) = tra(ji,jj,ikt,jpno3) + sedlam * sedpocn(ji,jj) / fse3t(ji,jj,ikt) 
+            tra(ji,jj,ikt,jpno3) = tra(ji,jj,ikt,jpno3) + sedlam * sedpocn(ji,jj) / e3t_n(ji,jj,ikt) 
             ! Deposition of organic matter in the sediment
             zwork = vsed * trn(ji,jj,ikt,jpdet)
@@ -121,5 +120,5 @@
       DO jj = 2, jpjm1
          DO ji = fs_2, fs_jpim1
-            tra(ji,jj,1,jpno3) = tra(ji,jj,1,jpno3) + zgeolpoc * cmask(ji,jj) / areacot / fse3t(ji,jj,1)
+            tra(ji,jj,1,jpno3) = tra(ji,jj,1,jpno3) + zgeolpoc * cmask(ji,jj) / areacot / e3t_n(ji,jj,1)
          END DO
       END DO
@@ -212,6 +211,6 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               zfluo = ( fsdepw(ji,jj,jk  ) / fsdepw(ji,jj,jpkb) )**xhr
-               zfluu = ( fsdepw(ji,jj,jk+1) / fsdepw(ji,jj,jpkb) )**xhr
+               zfluo = ( gdepw_n(ji,jj,jk  ) / gdepw_n(ji,jj,jpkb) )**xhr
+               zfluu = ( gdepw_n(ji,jj,jk+1) / gdepw_n(ji,jj,jpkb) )**xhr
                IF( zfluo.GT.1. )   zfluo = 1._wp
                zdm0(ji,jj,jk) = zfluo - zfluu
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90	(revision 5845)
@@ -40,6 +40,4 @@
    REAL(wp), PUBLIC ::  reddom    ! redfield ratio (C:N) for DOM
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -47,5 +45,4 @@
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -105,6 +102,6 @@
                zkr  = xkr0 + xkrp * EXP( xlr * zpig )
                zkg  = xkg0 + xkgp * EXP( xlg * zpig )
-               zparr(ji,jj,jk) = zparr(ji,jj,jk-1) * EXP( -zkr * fse3t(ji,jj,jk-1) )
-               zparg(ji,jj,jk) = zparg(ji,jj,jk-1) * EXP( -zkg * fse3t(ji,jj,jk-1) )
+               zparr(ji,jj,jk) = zparr(ji,jj,jk-1) * EXP( -zkr * e3t_n(ji,jj,jk-1) )
+               zparg(ji,jj,jk) = zparg(ji,jj,jk-1) * EXP( -zkg * e3t_n(ji,jj,jk-1) )
             END DO
         END DO
@@ -116,6 +113,6 @@
                zkr  = xkr0 + xkrp * EXP( xlr * zpig )
                zkg  = xkg0 + xkgp * EXP( xlg * zpig )
-               zparr(ji,jj,jk) = zparr(ji,jj,jk) / ( zkr * fse3t(ji,jj,jk) ) * ( 1 - EXP( -zkr * fse3t(ji,jj,jk) ) )
-               zparg(ji,jj,jk) = zparg(ji,jj,jk) / ( zkg * fse3t(ji,jj,jk) ) * ( 1 - EXP( -zkg * fse3t(ji,jj,jk) ) )
+               zparr(ji,jj,jk) = zparr(ji,jj,jk) / ( zkr * e3t_n(ji,jj,jk) ) * ( 1 - EXP( -zkr * e3t_n(ji,jj,jk) ) )
+               zparg(ji,jj,jk) = zparg(ji,jj,jk) / ( zkg * e3t_n(ji,jj,jk) ) * ( 1 - EXP( -zkg * e3t_n(ji,jj,jk) ) )
                etot (ji,jj,jk) = MAX( zparr(ji,jj,jk) + zparg(ji,jj,jk), 1.e-15 )
             END DO
@@ -138,5 +135,5 @@
       DO jj = 1, jpj
          DO ji = 1, jpi
-            heup(ji,jj) = fsdepw(ji,jj,neln(ji,jj))
+            heup(ji,jj) = gdepw_n(ji,jj,neln(ji,jj))
          END DO
       END DO 
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90	(revision 5845)
@@ -34,6 +34,4 @@
    REAL(wp), PUBLIC ::   xhr         ! coeff for martin''s remineralisation profile
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -102,5 +100,5 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               ztra(ji,jj,jk)  = - ( zwork(ji,jj,jk) - zwork(ji,jj,jk+1) ) / fse3t(ji,jj,jk)
+               ztra(ji,jj,jk)  = - ( zwork(ji,jj,jk) - zwork(ji,jj,jk+1) ) / e3t_n(ji,jj,jk)
                tra(ji,jj,jk,jpdet) = tra(ji,jj,jk,jpdet) + ztra(ji,jj,jk) 
             END DO
@@ -111,7 +109,7 @@
          IF( iom_use( "TDETSED" ) ) THEN
             CALL wrk_alloc( jpi, jpj, zw2d )
-            zw2d(:,:) =  ztra(:,:,1) * fse3t(:,:,1) * 86400.
+            zw2d(:,:) =  ztra(:,:,1) * e3t_n(:,:,1) * 86400.
             DO jk = 2, jpkm1
-               zw2d(:,:) = zw2d(:,:) + ztra(:,:,jk) * fse3t(:,:,jk) * 86400.
+               zw2d(:,:) = zw2d(:,:) + ztra(:,:,jk) * e3t_n(:,:,jk) * 86400.
             END DO
             CALL iom_put( "TDETSED", zw2d )
@@ -121,7 +119,7 @@
          IF( ln_diatrc ) THEN 
             CALL wrk_alloc( jpi, jpj, zw2d )
-            zw2d(:,:) =  ztra(:,:,1) * fse3t(:,:,1) * 86400.
+            zw2d(:,:) =  ztra(:,:,1) * e3t_n(:,:,1) * 86400.
             DO jk = 2, jpkm1
-               zw2d(:,:) = zw2d(:,:) + ztra(:,:,jk) * fse3t(:,:,jk) * 86400.
+               zw2d(:,:) = zw2d(:,:) + ztra(:,:,jk) * e3t_n(:,:,jk) * 86400.
             END DO
             trc2d(:,:,jp_pcs0_2d + 7) = zw2d(:,:)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90	(revision 5845)
@@ -34,6 +34,4 @@
    PUBLIC  p4z_bio    
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -70,10 +68,10 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               IF( fsdepw(ji,jj,jk+1) > hmld(ji,jj) )   xdiss(ji,jj,jk) = 0.01
+!!gm  :  use nmln  and test on jk ...  less memory acces
+               IF( gdepw_n(ji,jj,jk+1) > hmld(ji,jj) )   xdiss(ji,jj,jk) = 0.01
             END DO 
          END DO
       END DO
 
-          
       CALL p4z_opt  ( kt, knt )     ! Optic: PAR in the water column
       CALL p4z_sink ( kt, knt )     ! vertical flux of particulate organic matter
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90	(revision 5845)
@@ -164,6 +164,4 @@
    REAL(wp) :: devk55  = 0.3692E-3      
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -244,5 +242,4 @@
 
 
-
       ! CHEMICAL CONSTANTS - DEEP OCEAN
       ! -------------------------------
@@ -252,5 +249,5 @@
 
                ! SET PRESSION
-               zpres   = 1.025e-1 * fsdept(ji,jj,jk)
+               zpres   = 1.025e-1 * gdept_n(ji,jj,jk)
 
                ! SET ABSOLUTE TEMPERATURE
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90	(revision 5845)
@@ -30,15 +30,13 @@
    PUBLIC   p4z_fechem_init ! called in trcsms_pisces.F90
 
-   !! * Shared module variables
-   LOGICAL          ::  ln_fechem    !: boolean for complex iron chemistry following Tagliabue and voelker
-   LOGICAL          ::  ln_ligvar    !: boolean for variable ligand concentration following Tagliabue and voelker
-   REAL(wp), PUBLIC ::  xlam1        !: scavenging rate of Iron 
-   REAL(wp), PUBLIC ::  xlamdust     !: scavenging rate of Iron by dust 
-   REAL(wp), PUBLIC ::  ligand       !: ligand concentration in the ocean 
-
+   LOGICAL          ::   ln_fechem    !: boolean for complex iron chemistry following Tagliabue and voelker
+   LOGICAL          ::   ln_ligvar    !: boolean for variable ligand concentration following Tagliabue and voelker
+   REAL(wp), PUBLIC ::   xlam1        !: scavenging rate of Iron 
+   REAL(wp), PUBLIC ::   xlamdust     !: scavenging rate of Iron by dust 
+   REAL(wp), PUBLIC ::   ligand       !: ligand concentration in the ocean 
+
+!!gm Not DOCTOR norm !!!
    REAL(wp) :: kl1, kl2, kb1, kb2, ks, kpr, spd, con, kth
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -61,8 +59,8 @@
       !!                    and one particulate form (ln_fechem)
       !!---------------------------------------------------------------------
-      !
-      INTEGER, INTENT(in) ::   kt, knt ! ocean time step
+      INTEGER, INTENT(in) ::   kt, knt   ! ocean time step
       !
       INTEGER  ::   ji, jj, jk, jic
+      CHARACTER (len=25) :: charout
       REAL(wp) ::   zdep, zlam1a, zlam1b, zlamfac
       REAL(wp) ::   zkeq, zfeequi, zfesatur, zfecoll
@@ -79,16 +77,14 @@
       REAL(wp) :: ztfe, zoxy
       REAL(wp) :: zstep
-      CHARACTER (len=25) :: charout
       !!---------------------------------------------------------------------
       !
       IF( nn_timing == 1 )  CALL timing_start('p4z_fechem')
       !
-      ! Allocate temporary workspace
-      CALL wrk_alloc( jpi, jpj, jpk, zFe3, zFeL1, zTL1, ztotlig )
+      CALL wrk_alloc( jpi,jpj,jpk,   zFe3, zFeL1, zTL1, ztotlig )
       zFe3 (:,:,:) = 0.
       zFeL1(:,:,:) = 0.
       zTL1 (:,:,:) = 0.
       IF( ln_fechem ) THEN
-         CALL wrk_alloc( jpi, jpj, jpk, zFe2, zFeL2, zTL2, zFeP )
+         CALL wrk_alloc( jpi,jpj,jpk,   zFe2, zFeL2, zTL2, zFeP )
          zFe2 (:,:,:) = 0.
          zFeL2(:,:,:) = 0.
@@ -253,5 +249,6 @@
                zlamfac = MAX( 0.e0, ( gphit(ji,jj) + 55.) / 30. )
                zlamfac = MIN( 1.  , zlamfac )
-               zdep    = MIN( 1., 1000. / fsdept(ji,jj,jk) )
+!!gm very small BUG :  it is unlikely but possible that gdept_n = 0  .....
+               zdep    = MIN( 1., 1000. / gdept_n(ji,jj,jk) )
                zlam1b  = xlam1 * MAX( 0.e0, ( trb(ji,jj,jk,jpfer) * 1.e9 - ztotlig(ji,jj,jk) ) )
                zcoag   = zfeequi * zlam1b * zstep + 1E-4 * ( 1. - zlamfac ) * zdep * zstep * trb(ji,jj,jk,jpfer)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90	(revision 5845)
@@ -59,6 +59,4 @@
    REAL(wp) ::  xconv  = 0.01_wp / 3600._wp !: coefficients for conversion 
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -182,5 +180,5 @@
             oce_co2(ji,jj) = ( zfld - zflu ) * rfact2 * e1e2t(ji,jj) * tmask(ji,jj,1) * 1000.
             ! compute the trend
-            tra(ji,jj,1,jpdic) = tra(ji,jj,1,jpdic) + ( zfld - zflu ) * rfact2 / fse3t(ji,jj,1)
+            tra(ji,jj,1,jpdic) = tra(ji,jj,1,jpdic) + ( zfld - zflu ) * rfact2 / e3t_n(ji,jj,1)
 
             ! Compute O2 flux 
@@ -188,5 +186,5 @@
             zflu16 = trb(ji,jj,1,jpoxy) * tmask(ji,jj,1) * zkgo2(ji,jj)
             zoflx(ji,jj) = zfld16 - zflu16
-            tra(ji,jj,1,jpoxy) = tra(ji,jj,1,jpoxy) + zoflx(ji,jj) * rfact2 / fse3t(ji,jj,1)
+            tra(ji,jj,1,jpoxy) = tra(ji,jj,1,jpoxy) + zoflx(ji,jj) * rfact2 / e3t_n(ji,jj,1)
          END DO
       END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 5845)
@@ -51,6 +51,4 @@
    REAL(wp), DIMENSION(3,61), PUBLIC ::   xkrgb   !: tabulated attenuation coefficients for RGB absorption
    
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -101,7 +99,7 @@
                irgb = NINT( 41 + 20.* LOG10( zchl ) + rtrn )
                !                                                         
-               ekb(ji,jj,jk) = xkrgb(1,irgb) * fse3t(ji,jj,jk)
-               ekg(ji,jj,jk) = xkrgb(2,irgb) * fse3t(ji,jj,jk)
-               ekr(ji,jj,jk) = xkrgb(3,irgb) * fse3t(ji,jj,jk)
+               ekb(ji,jj,jk) = xkrgb(1,irgb) * e3t_n(ji,jj,jk)
+               ekg(ji,jj,jk) = xkrgb(2,irgb) * e3t_n(ji,jj,jk)
+               ekr(ji,jj,jk) = xkrgb(3,irgb) * e3t_n(ji,jj,jk)
             END DO
          END DO
@@ -162,5 +160,5 @@
                  neln(ji,jj) = jk+1                    ! Euphotic level : 1rst T-level strictly below Euphotic layer
                  !                                     ! nb: ensure the compatibility with nmld_trc definition in trd_mld_trc_zint
-                 heup(ji,jj) = fsdepw(ji,jj,jk+1)      ! Euphotic layer depth
+                 heup(ji,jj) = gdepw_n(ji,jj,jk+1)     ! Euphotic layer depth
               ENDIF
            END DO
@@ -179,10 +177,10 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               IF( fsdepw(ji,jj,jk+1) <= hmld(ji,jj) ) THEN
-                  zetmp1 (ji,jj) = zetmp1 (ji,jj) + etot     (ji,jj,jk) * fse3t(ji,jj,jk) ! remineralisation
-                  zetmp2 (ji,jj) = zetmp2 (ji,jj) + etot_ndcy(ji,jj,jk) * fse3t(ji,jj,jk) ! production
-                  zetmp3 (ji,jj) = zetmp3 (ji,jj) + enano    (ji,jj,jk) * fse3t(ji,jj,jk) ! production
-                  zetmp4 (ji,jj) = zetmp4 (ji,jj) + ediat    (ji,jj,jk) * fse3t(ji,jj,jk) ! production
-                  zdepmoy(ji,jj) = zdepmoy(ji,jj) + fse3t(ji,jj,jk)
+               IF( gdepw_n(ji,jj,jk+1) <= hmld(ji,jj) ) THEN
+                  zetmp1 (ji,jj) = zetmp1 (ji,jj) + etot     (ji,jj,jk) * e3t_n(ji,jj,jk) ! remineralisation
+                  zetmp2 (ji,jj) = zetmp2 (ji,jj) + etot_ndcy(ji,jj,jk) * e3t_n(ji,jj,jk) ! production
+                  zetmp3 (ji,jj) = zetmp3 (ji,jj) + enano    (ji,jj,jk) * e3t_n(ji,jj,jk) ! production
+                  zetmp4 (ji,jj) = zetmp4 (ji,jj) + ediat    (ji,jj,jk) * e3t_n(ji,jj,jk) ! production
+                  zdepmoy(ji,jj) = zdepmoy(ji,jj) +                       e3t_n(ji,jj,jk)
                ENDIF
             END DO
@@ -196,5 +194,5 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               IF( fsdepw(ji,jj,jk+1) <= hmld(ji,jj) ) THEN
+               IF( gdepw_n(ji,jj,jk+1) <= hmld(ji,jj) ) THEN
                   z1_dep = 1. / ( zdepmoy(ji,jj) + rtrn )
                   emoy (ji,jj,jk) = zetmp1(ji,jj) * z1_dep
@@ -260,5 +258,5 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  pe0(ji,jj,jk) = pe0(ji,jj,jk-1) * EXP( -fse3t(ji,jj,jk-1) * xsi0r )
+                  pe0(ji,jj,jk) = pe0(ji,jj,jk-1) * EXP( -e3t_n(ji,jj,jk-1) * xsi0r )
                   pe1(ji,jj,jk) = pe1(ji,jj,jk-1) * EXP( -ekb(ji,jj,jk-1 ) )
                   pe2(ji,jj,jk) = pe2(ji,jj,jk-1) * EXP( -ekg(ji,jj,jk-1 ) )
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90	(revision 5845)
@@ -54,6 +54,4 @@
    REAL(wp) :: texcret2               !: 1 - excret2        
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -277,5 +275,5 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               IF( fsdepw(ji,jj,jk+1) <= hmld(ji,jj) ) THEN
+               IF( gdepw_n(ji,jj,jk+1) <= hmld(ji,jj) ) THEN
                   zprbio(ji,jj,jk) = zprbio(ji,jj,jk) * zmixnano(ji,jj)
                   zprdia(ji,jj,jk) = zprdia(ji,jj,jk) * zmixdiat(ji,jj)
@@ -321,5 +319,5 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  IF( fsdepw(ji,jj,jk+1) <= hmld(ji,jj) ) THEN
+                  IF( gdepw_n(ji,jj,jk+1) <= hmld(ji,jj) ) THEN
                      zprnch(ji,jj,jk) = zprnch(ji,jj,jk) * zmixnano(ji,jj)
                      zprdch(ji,jj,jk) = zprdch(ji,jj,jk) * zmixdiat(ji,jj)
@@ -462,5 +460,5 @@
              zw2d(:,:) = 0.
              DO jk = 1, jpkm1
-               zw2d(:,:) = zw2d(:,:) + zprorca (:,:,jk) * fse3t(:,:,jk) * zfact * tmask(:,:,jk)  ! vert. integrated  primary produc. by nano
+               zw2d(:,:) = zw2d(:,:) + zprorca (:,:,jk) * e3t_n(:,:,jk) * zfact * tmask(:,:,jk)  ! vert. integrated  primary produc. by nano
              ENDDO
              CALL iom_put( "INTPPPHY" , zw2d )
@@ -468,5 +466,5 @@
              zw2d(:,:) = 0.
              DO jk = 1, jpkm1
-                zw2d(:,:) = zw2d(:,:) + zprorcad(:,:,jk) * fse3t(:,:,jk) * zfact * tmask(:,:,jk) ! vert. integrated  primary produc. by diatom
+                zw2d(:,:) = zw2d(:,:) + zprorcad(:,:,jk) * e3t_n(:,:,jk) * zfact * tmask(:,:,jk) ! vert. integrated  primary produc. by diatom
              ENDDO
              CALL iom_put( "INTPPPHY2" , zw2d )
@@ -475,5 +473,5 @@
              zw2d(:,:) = 0.
              DO jk = 1, jpkm1
-                zw2d(:,:) = zw2d(:,:) + ( zprorca(:,:,jk) + zprorcad(:,:,jk) ) * fse3t(:,:,jk) * zfact * tmask(:,:,jk) ! vert. integrated pp
+                zw2d(:,:) = zw2d(:,:) + ( zprorca(:,:,jk) + zprorcad(:,:,jk) ) * e3t_n(:,:,jk) * zfact * tmask(:,:,jk) ! vert. integrated pp
              ENDDO
              CALL iom_put( "INTPP" , zw2d )
@@ -482,5 +480,5 @@
              zw2d(:,:) = 0.
              DO jk = 1, jpkm1
-                zw2d(:,:) = zw2d(:,:) + ( zpronew(:,:,jk) + zpronewd(:,:,jk) ) * fse3t(:,:,jk) * zfact * tmask(:,:,jk)  ! vert. integrated new prod
+                zw2d(:,:) = zw2d(:,:) + ( zpronew(:,:,jk) + zpronewd(:,:,jk) ) * e3t_n(:,:,jk) * zfact * tmask(:,:,jk)  ! vert. integrated new prod
              ENDDO
              CALL iom_put( "INTPNEW" , zw2d )
@@ -489,5 +487,5 @@
              zw2d(:,:) = 0.
              DO jk = 1, jpkm1
-                zw2d(:,:) = zw2d(:,:) + ( zprofen(:,:,jk) + zprofed(:,:,jk) ) * fse3t(:,:,jk) * zfact * tmask(:,:,jk) ! vert integr. bfe prod
+                zw2d(:,:) = zw2d(:,:) + ( zprofen(:,:,jk) + zprofed(:,:,jk) ) * e3t_n(:,:,jk) * zfact * tmask(:,:,jk) ! vert integr. bfe prod
              ENDDO
             CALL iom_put( "INTPBFE" , zw2d )
@@ -496,5 +494,5 @@
              zw2d(:,:) = 0.
              DO jk = 1, jpkm1
-                zw2d(:,:) = zw2d(:,:) + zprorcad(:,:,jk) * zysopt(:,:,jk) * fse3t(:,:,jk) * zfact * tmask(:,:,jk)  ! vert integr. bsi prod
+                zw2d(:,:) = zw2d(:,:) + zprorcad(:,:,jk) * zysopt(:,:,jk) * e3t_n(:,:,jk) * zfact * tmask(:,:,jk)  ! vert integr. bsi prod
              ENDDO
              CALL iom_put( "INTPBSI" , zw2d )
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90	(revision 5845)
@@ -50,6 +50,4 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   denitnh4   !: -    -    -    -   -
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -103,9 +101,9 @@
             DO ji = 1, jpi
                zdep = MAX( hmld(ji,jj), heup(ji,jj) )
-               IF( fsdept(ji,jj,jk) < zdep ) THEN
+               IF( gdept_n(ji,jj,jk) < zdep ) THEN
                   zdepbac(ji,jj,jk) = MIN( 0.7 * ( trb(ji,jj,jk,jpzoo) + 2.* trb(ji,jj,jk,jpmes) ), 4.e-6 )
                   ztempbac(ji,jj)   = zdepbac(ji,jj,jk)
                ELSE
-                  zdepmin = MIN( 1., zdep / fsdept(ji,jj,jk) )
+                  zdepmin = MIN( 1., zdep / gdept_n(ji,jj,jk) )
                   zdepbac (ji,jj,jk) = zdepmin**0.683 * ztempbac(ji,jj)
                   zdepprod(ji,jj,jk) = zdepmin**0.273
@@ -283,5 +281,5 @@
                ! ----------------------------------------------------------
                zdep     = MAX( hmld(ji,jj), heup(ji,jj) ) 
-               zdep     = MAX( 0., fsdept(ji,jj,jk) - zdep )
+               zdep     = MAX( 0., gdept_n(ji,jj,jk) - zdep )
                ztem     = MAX( tsn(ji,jj,1,jp_tem), 0. )
                zfactdep = xsilab * EXP(-( xsiremlab - xsirem ) * znusil2 * zdep / wsbio2 ) * ztem / ( ztem + 10. )
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90	(revision 5845)
@@ -25,5 +25,4 @@
    PUBLIC   p4z_sbc_init   
 
-   !! * Shared module variables
    LOGICAL , PUBLIC  :: ln_dust     !: boolean for dust input from the atmosphere
    LOGICAL , PUBLIC  :: ln_solub    !: boolean for variable solubility of atmospheric iron
@@ -45,5 +44,4 @@
    LOGICAL , PUBLIC  :: ll_sbc
 
-   !! * Module variables
    LOGICAL  ::  ll_solub
 
@@ -80,7 +78,5 @@
    REAL(wp), PUBLIC :: rivdininput, rivdipinput, rivdsiinput
 
-
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -89,5 +85,4 @@
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -163,5 +158,5 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  nitdep(ji,jj) = sf_ndepo(1)%fnow(ji,jj,1) / rno3 / ( 14E6 * ryyss * fse3t(ji,jj,1) + rtrn )
+                  nitdep(ji,jj) = sf_ndepo(1)%fnow(ji,jj,1) / rno3 / ( 14E6 * ryyss * e3t_n(ji,jj,1) + rtrn )
                END DO
             END DO
@@ -267,5 +262,5 @@
       IF( lk_offline ) THEN
         nk_rnf(:,:) = 1
-        h_rnf (:,:) = fsdept(:,:,1)
+        h_rnf (:,:) = gdept_n(:,:,1)
       ENDIF
 
@@ -456,5 +451,5 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  zexpide   = MIN( 8.,( fsdept(ji,jj,jk) / 500. )**(-1.5) )
+                  zexpide   = MIN( 8.,( gdept_n(ji,jj,jk) / 500. )**(-1.5) )
                   zdenitide = -0.9543 + 0.7662 * LOG( zexpide ) - 0.235 * LOG( zexpide )**2
                   zcmask(ji,jj,jk) = zcmask(ji,jj,jk) * MIN( 1., EXP( zdenitide ) / 0.5 )
@@ -466,5 +461,5 @@
          ironsed(:,:,jpk) = 0._wp
          DO jk = 1, jpkm1
-            ironsed(:,:,jk) = sedfeinput * zcmask(:,:,jk) / ( fse3t(:,:,jk) * rday )
+            ironsed(:,:,jk) = sedfeinput * zcmask(:,:,jk) / ( e3t_n(:,:,jk) * rday )
          END DO
          DEALLOCATE( zcmask)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 5845)
@@ -32,12 +32,8 @@
    PUBLIC   p4z_sed_alloc
  
-
-   !! * Module variables
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nitrpot    !: Nitrogen fixation 
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:  ) :: sdenit     !: Nitrate reduction in the sediments
    REAL(wp) :: r1_rday                  !: inverse of rday
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -100,5 +96,5 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               zdep    = rfact2 / fse3t(ji,jj,1)
+               zdep    = rfact2 / e3t_n(ji,jj,1)
                zwflux  = fmmflx(ji,jj) / 1000._wp
                zfminus = MIN( 0._wp, -zwflux ) * trb(ji,jj,1,jpfer) * zdep
@@ -111,5 +107,5 @@
          ! 
          IF( lk_iomput .AND. knt == nrdttrc .AND. iom_use( "Ironice" ) )   &
-            &   CALL iom_put( "Ironice", zironice(:,:) * 1.e+3 * rfact2r * fse3t(:,:,1) * tmask(:,:,1) ) ! iron flux from ice
+            &   CALL iom_put( "Ironice", zironice(:,:) * 1.e+3 * rfact2r * e3t_n(:,:,1) * tmask(:,:,1) ) ! iron flux from ice
          !
          CALL wrk_dealloc( jpi, jpj, zironice )
@@ -125,15 +121,15 @@
          !                                              ! Iron and Si deposition at the surface
          IF( ln_solub ) THEN
-            zirondep(:,:,1) = solub(:,:) * dust(:,:) * mfrac * rfact2 / fse3t(:,:,1) / 55.85 + 3.e-10 * r1_ryyss 
+            zirondep(:,:,1) = solub(:,:) * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 55.85 + 3.e-10 * r1_ryyss 
          ELSE
-            zirondep(:,:,1) = dustsolub  * dust(:,:) * mfrac * rfact2 / fse3t(:,:,1) / 55.85 + 3.e-10 * r1_ryyss 
+            zirondep(:,:,1) = dustsolub  * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 55.85 + 3.e-10 * r1_ryyss 
          ENDIF
-         zsidep(:,:) = 8.8 * 0.075 * dust(:,:) * mfrac * rfact2 / fse3t(:,:,1) / 28.1 
-         zpdep (:,:) = 0.1 * 0.021 * dust(:,:) * mfrac * rfact2 / fse3t(:,:,1) / 31. / po4r 
+         zsidep(:,:) = 8.8 * 0.075 * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 28.1 
+         zpdep (:,:) = 0.1 * 0.021 * dust(:,:) * mfrac * rfact2 / e3t_n(:,:,1) / 31. / po4r 
          !                                              ! Iron solubilization of particles in the water column
          !                                              ! dust in kg/m2/s ---> 1/55.85 to put in mol/Fe ;  wdust in m/j
          zwdust = 0.03 * rday / ( wdust * 55.85 ) / ( 270. * rday )
          DO jk = 2, jpkm1
-            zirondep(:,:,jk) = dust(:,:) * mfrac * zwdust * rfact2 * EXP( -fsdept(:,:,jk) / 540. )
+            zirondep(:,:,jk) = dust(:,:) * mfrac * zwdust * rfact2 * EXP( -gdept_n(:,:,jk) / 540. )
          END DO
          !                                              ! Iron solubilization of particles in the water column
@@ -145,5 +141,5 @@
             IF( knt == nrdttrc ) THEN
                 IF( iom_use( "Irondep" ) )   &
-                &  CALL iom_put( "Irondep", zirondep(:,:,1) * 1.e+3 * rfact2r * fse3t(:,:,1) * tmask(:,:,1) ) ! surface downward dust depo of iron
+                &  CALL iom_put( "Irondep", zirondep(:,:,1) * 1.e+3 * rfact2r * e3t_n(:,:,1) * tmask(:,:,1) ) ! surface downward dust depo of iron
                 IF( iom_use( "pdust" ) )   &
                 &  CALL iom_put( "pdust"  , dust(:,:) / ( wdust * rday )  * tmask(:,:,1) ) ! dust concentration at surface
@@ -151,5 +147,5 @@
          ELSE                                    
             IF( ln_diatrc )  &
-              &  trc2d(:,:,jp_pcs0_2d + 11) = zirondep(:,:,1) * 1.e+3 * rfact2r * fse3t(:,:,1) * tmask(:,:,1)
+              &  trc2d(:,:,jp_pcs0_2d + 11) = zirondep(:,:,1) * 1.e+3 * rfact2r * e3t_n(:,:,1) * tmask(:,:,1)
          ENDIF
          CALL wrk_dealloc( jpi, jpj,      zpdep, zsidep )
@@ -206,5 +202,5 @@
          DO ji = 1, jpi
             ikt  = mbkt(ji,jj)
-            zdep = fse3t(ji,jj,ikt) / xstep
+            zdep = e3t_n(ji,jj,ikt) / xstep
             zwsbio4(ji,jj) = MIN( 0.99 * zdep, wsbio4(ji,jj,ikt) )
             zwscal (ji,jj) = MIN( 0.99 * zdep, wscal (ji,jj,ikt) )
@@ -230,5 +226,5 @@
               zo2   = LOG10( MAX( 10. , trb(ji,jj,ikt,jpoxy) * 1E6 ) )
               zno3  = LOG10( MAX( 1.  , trb(ji,jj,ikt,jpno3) * 1E6 * rno3 ) )
-              zdep  = LOG10( fsdepw(ji,jj,ikt+1) )
+              zdep  = LOG10( gdepw_n(ji,jj,ikt+1) )
               zdenit2d(ji,jj) = -2.2567 - 1.185 * zflx - 0.221 * zflx**2 - 0.3995 * zno3 * zo2 + 1.25 * zno3    &
               &                + 0.4721 * zo2 - 0.0996 * zdep + 0.4256 * zflx * zo2
@@ -279,5 +275,5 @@
          DO ji = 1, jpi
             ikt  = mbkt(ji,jj)
-            zdep = xstep / fse3t(ji,jj,ikt) 
+            zdep = xstep / e3t_n(ji,jj,ikt) 
             zws4 = zwsbio4(ji,jj) * zdep
             zwsc = zwscal (ji,jj) * zdep
@@ -305,5 +301,5 @@
          DO ji = 1, jpi
             ikt  = mbkt(ji,jj)
-            zdep = xstep / fse3t(ji,jj,ikt) 
+            zdep = xstep / e3t_n(ji,jj,ikt) 
             zws4 = zwsbio4(ji,jj) * zdep
             zws3 = zwsbio3(ji,jj) * zdep
@@ -336,5 +332,5 @@
             tra(ji,jj,ikt,jptal) = tra(ji,jj,ikt,jptal) + rno3 * (zolimit + (1.+rdenit) * (zpdenit + zdenitt) )
             tra(ji,jj,ikt,jpdic) = tra(ji,jj,ikt,jpdic) + zpdenit + zolimit + zdenitt
-            sdenit(ji,jj) = rdenit * zpdenit * fse3t(ji,jj,ikt)
+            sdenit(ji,jj) = rdenit * zpdenit * e3t_n(ji,jj,ikt)
 #endif
          END DO
@@ -388,5 +384,5 @@
                zwork1(:,:) = 0.
                DO jk = 1, jpkm1
-                 zwork1(:,:) = zwork1(:,:) + nitrpot(:,:,jk) * nitrfix * zfact * fse3t(:,:,jk) * tmask(:,:,jk)
+                 zwork1(:,:) = zwork1(:,:) + nitrpot(:,:,jk) * nitrfix * zfact * e3t_n(:,:,jk) * tmask(:,:,jk)
                ENDDO
                CALL iom_put( "INTNFIX" , zwork1 ) 
@@ -395,5 +391,5 @@
       ELSE
          IF( ln_diatrc )  &
-            &  trc2d(:,:,jp_pcs0_2d + 12) = nitrpot(:,:,1) * nitrfix * rno3 * 1.e+3 * rfact2r * fse3t(:,:,1) * tmask(:,:,1)
+            &  trc2d(:,:,jp_pcs0_2d + 12) = nitrpot(:,:,1) * nitrfix * rno3 * 1.e+3 * rfact2r * e3t_n(:,:,1) * tmask(:,:,1)
       ENDIF
       !
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90	(revision 5845)
@@ -65,6 +65,4 @@
 #endif
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -108,5 +106,5 @@
             DO ji = 1,jpi
                zmax  = MAX( heup(ji,jj), hmld(ji,jj) )
-               zfact = MAX( 0., fsdepw(ji,jj,jk+1) - zmax ) / 5000._wp
+               zfact = MAX( 0., gdepw_n(ji,jj,jk+1) - zmax ) / 5000._wp
                wsbio4(ji,jj,jk) = wsbio2 + ( 200.- wsbio2 ) * zfact
             END DO
@@ -137,5 +135,5 @@
              DO ji = 1, jpi
                 IF( tmask(ji,jj,jk) == 1) THEN
-                   zwsmax =  0.5 * fse3t(ji,jj,jk) / xstep
+                   zwsmax =  0.5 * e3t_n(ji,jj,jk) / xstep
                    iiter1 =  MAX( iiter1, INT( wsbio3(ji,jj,jk) / zwsmax ) )
                    iiter2 =  MAX( iiter2, INT( wsbio4(ji,jj,jk) / zwsmax ) )
@@ -156,5 +154,5 @@
             DO ji = 1, jpi
                IF( tmask(ji,jj,jk) == 1 ) THEN
-                 zwsmax = 0.5 * fse3t(ji,jj,jk) / xstep
+                 zwsmax = 0.5 * e3t_n(ji,jj,jk) / xstep
                  wsbio3(ji,jj,jk) = MIN( wsbio3(ji,jj,jk), zwsmax * FLOAT( iiter1 ) )
                  wsbio4(ji,jj,jk) = MIN( wsbio4(ji,jj,jk), zwsmax * FLOAT( iiter2 ) )
@@ -700,5 +698,5 @@
          zl = zmin
          zr = zmax
-         wmax = 0.5 * fse3t(1,1,jk) * rday * float(niter1max) / rfact2
+         wmax = 0.5 * e3t_n(1,1,jk) * rday * float(niter1max) / rfact2
          zdiv = xkr_zeta + xkr_eta - xkr_eta * zl
          znum = zl - 1.
@@ -844,5 +842,5 @@
             DO jj = 1, jpj      
                DO ji = 1, jpi    
-                  zigma = zwsink2(ji,jj,jk+1) * zstep / fse3w(ji,jj,jk+1)
+                  zigma = zwsink2(ji,jj,jk+1) * zstep / e3w_n(ji,jj,jk+1)
                   zew   = zwsink2(ji,jj,jk+1)
                   psinkflx(ji,jj,jk+1) = -zew * ( trb(ji,jj,jk,jp_tra) - 0.5 * ( 1 + zigma ) * zakz(ji,jj,jk) ) * zstep
@@ -858,5 +856,5 @@
             DO jj = 1,jpj
                DO ji = 1, jpi
-                  zflx = ( psinkflx(ji,jj,jk) - psinkflx(ji,jj,jk+1) ) / fse3t(ji,jj,jk)
+                  zflx = ( psinkflx(ji,jj,jk) - psinkflx(ji,jj,jk+1) ) / e3t_n(ji,jj,jk)
                   trb(ji,jj,jk,jp_tra) = trb(ji,jj,jk,jp_tra) + zflx
                END DO
@@ -869,5 +867,5 @@
          DO jj = 1,jpj
             DO ji = 1, jpi
-               zflx = ( psinkflx(ji,jj,jk) - psinkflx(ji,jj,jk+1) ) / fse3t(ji,jj,jk)
+               zflx = ( psinkflx(ji,jj,jk) - psinkflx(ji,jj,jk+1) ) / e3t_n(ji,jj,jk)
                ztrb(ji,jj,jk) = ztrb(ji,jj,jk) + 2. * zflx
             END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/trcwri_pisces.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/trcwri_pisces.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/PISCES/trcwri_pisces.F90	(revision 5845)
@@ -21,7 +21,9 @@
    PUBLIC trc_wri_pisces 
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
-
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
+   !! $Id: trcnam.F90 5836 2015-10-26 14:49:40Z cetlod $
+   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
 
@@ -57,5 +59,5 @@
          zdic(:,:) = 0.
          DO jk = 1, jpkm1
-            zdic(:,:) = zdic(:,:) + trn(:,:,jk,jpdic) * fse3t(:,:,jk) * tmask(:,:,jk) * 12.
+            zdic(:,:) = zdic(:,:) + trn(:,:,jk,jpdic) * e3t_n(:,:,jk) * tmask(:,:,jk) * 12.
          ENDDO
          CALL iom_put( 'INTDIC', zdic )     
@@ -64,5 +66,5 @@
       IF( iom_use( "O2MIN" ) .OR. iom_use ( "ZO2MIN" ) ) THEN  ! Oxygen minimum concentration and depth 
          zo2min   (:,:) = trn(:,:,1,jpoxy) * tmask(:,:,1)
-         zdepo2min(:,:) = fsdepw(:,:,1)    * tmask(:,:,1)
+         zdepo2min(:,:) = gdepw_n(:,:,1)   * tmask(:,:,1)
          DO jk = 2, jpkm1
             DO jj = 1, jpj
@@ -71,5 +73,5 @@
                      IF( trn(ji,jj,jk,jpoxy) < zo2min(ji,jj) ) then
                         zo2min   (ji,jj) = trn(ji,jj,jk,jpoxy)
-                        zdepo2min(ji,jj) = fsdepw(ji,jj,jk)
+                        zdepo2min(ji,jj) = gdepw_n(ji,jj,jk)
                      ENDIF
                   ENDIF
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90	(revision 5845)
@@ -62,5 +62,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -109,6 +108,6 @@
       !                                               !==  effective transport  ==!
       DO jk = 1, jpkm1
-         zun(:,:,jk) = e2u  (:,:) * fse3u(:,:,jk) * un(:,:,jk)                   ! eulerian transport
-         zvn(:,:,jk) = e1v  (:,:) * fse3v(:,:,jk) * vn(:,:,jk)
+         zun(:,:,jk) = e2u  (:,:) * e3u_n(:,:,jk) * un(:,:,jk)                   ! eulerian transport
+         zvn(:,:,jk) = e1v  (:,:) * e3v_n(:,:,jk) * vn(:,:,jk)
          zwn(:,:,jk) = e1e2t(:,:)                 * wn(:,:,jk)
       END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90	(revision 5845)
@@ -43,5 +43,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -82,9 +81,7 @@
       !!              - save the trends ('key_trdmxl_trc')
       !!----------------------------------------------------------------------
-      !!
-      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index
-      !!
-      INTEGER  ::   ji, jj, jk, jn, jl       ! dummy loop indices
-      REAL(wp) ::   ztra                 ! temporary scalars
+      INTEGER, INTENT(in) ::   kt   ! ocean time-step index
+      !
+      INTEGER  ::   ji, jj, jk, jn, jl   ! dummy loop indices
       CHARACTER (len=22) :: charout
       REAL(wp), POINTER, DIMENSION(:,:,:) ::   ztrtrd
@@ -105,9 +102,9 @@
             !
             IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file
-               
+               !
                jl = n_trc_index(jn) 
                CALL trc_dta( kt, sf_trcdta(jl),rf_trfac(jl) )   ! read tracer data at nit000
                ztrcdta(:,:,:) = sf_trcdta(jl)%fnow(:,:,:)
-
+               !
                SELECT CASE ( nn_zdmp_tr )
                !
@@ -116,10 +113,9 @@
                      DO jj = 2, jpjm1
                         DO ji = fs_2, fs_jpim1   ! vector opt.
-                           ztra = restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) )
-                           tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + ztra
+                           tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) )
                         END DO
                      END DO
                   END DO
-               !
+                  !
                CASE ( 1 )                !==  no damping in the turbocline (avt > 5 cm2/s)  ==!
                   DO jk = 1, jpkm1
@@ -127,23 +123,21 @@
                         DO ji = fs_2, fs_jpim1   ! vector opt.
                            IF( avt(ji,jj,jk) <= 5.e-4_wp )  THEN 
-                              ztra = restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) )
-                              tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + ztra
+                              tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) )
                            ENDIF
                         END DO
                      END DO
                   END DO
-               !
+                  !
                CASE ( 2 )               !==  no damping in the mixed layer   ==! 
                   DO jk = 1, jpkm1
                      DO jj = 2, jpjm1
                         DO ji = fs_2, fs_jpim1   ! vector opt.
-                           IF( fsdept(ji,jj,jk) >= hmlp (ji,jj) ) THEN
-                              ztra = restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) )
-                              tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + ztra
+                           IF( gdept_n(ji,jj,jk) >= hmlp (ji,jj) ) THEN
+                              tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) )
                            END IF
                         END DO
                      END DO
                   END DO
-               !  
+                  !  
                END SELECT
                ! 
@@ -162,7 +156,8 @@
       IF( l_trdtrc )  CALL wrk_dealloc( jpi, jpj, jpk, ztrtrd )
       !                                          ! print mean trends (used for debugging)
-      IF( ln_ctl )   THEN
-         WRITE(charout, FMT="('dmp ')") ;  CALL prt_ctl_trc_info(charout)
-                                           CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' )
+      IF( ln_ctl ) THEN
+         WRITE(charout, FMT="('dmp ')")
+         CALL prt_ctl_trc_info(charout)
+         CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' )
       ENDIF
       !
@@ -170,4 +165,5 @@
       !
    END SUBROUTINE trc_dmp
+
 
    SUBROUTINE trc_dmp_ini
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90	(revision 5845)
@@ -47,5 +47,4 @@
    
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90	(revision 5845)
@@ -31,5 +31,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -153,5 +152,5 @@
             DO jj = 2, jpj
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zse3t = 1. / fse3t(ji,jj,1)
+                  zse3t = 1. / e3t_n(ji,jj,1)
                   ! tracer flux at the ice/ocean interface (tracer/m2/s)
                   zftra = - trc_i(ji,jj,jn) * fmmflx(ji,jj) ! uptake of tracer in the sea ice
@@ -174,5 +173,5 @@
          DO jj = 2, jpj
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zse3t = zfact / fse3t(ji,jj,1)
+               zse3t = zfact / e3t_n(ji,jj,1)
                tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + ( sbc_trc_b(ji,jj,jn) + sbc_trc(ji,jj,jn) ) * zse3t
             END DO
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90	(revision 5845)
@@ -40,5 +40,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "zdfddm_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90	(revision 5845)
@@ -66,5 +66,4 @@
 
    !! * Substitutions
-#  include "domzgr_substitute.h90"
 #  include "zdfddm_substitute.h90"
    !!----------------------------------------------------------------------
@@ -175,5 +174,5 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  IF( jk - nmld_trc(ji,jj) < 0 )   wkx_trc(ji,jj,jk) = fse3t(ji,jj,jk) * tmask(ji,jj,jk)
+                  IF( jk - nmld_trc(ji,jj) < 0 )   wkx_trc(ji,jj,jk) = e3t_n(ji,jj,jk) * tmask(ji,jj,jk)
                END DO
             END DO
@@ -293,5 +292,5 @@
             DO jj = 1,jpj
               DO ji = 1,jpi
-                  IF( jk - nmld_trc(ji,jj) < 0. )   wkx_trc(ji,jj,jk) = fse3t(ji,jj,jk) * tmask(ji,jj,jk)
+                  IF( jk - nmld_trc(ji,jj) < 0. )   wkx_trc(ji,jj,jk) = e3t_n(ji,jj,jk) * tmask(ji,jj,jk)
                END DO
             END DO
@@ -417,5 +416,5 @@
                DO jn = 1, jptra
                   IF( ln_trdtrc(jn) )    &
-                  tmltrd_trc(ji,jj,jpmxl_trc_zdf,jn) = - zavt / fse3w(ji,jj,ik) * tmask(ji,jj,ik)  &
+                  tmltrd_trc(ji,jj,jpmxl_trc_zdf,jn) = - zavt / e3w_n(ji,jj,ik) * tmask(ji,jj,ik)  &
                        &                    * ( trn(ji,jj,ik-1,jn) - trn(ji,jj,ik,jn) )            &
                        &                    / MAX( 1., rmld_trc(ji,jj) ) * tmask(ji,jj,1)
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc_rst.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc_rst.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc_rst.F90	(revision 5845)
@@ -21,4 +21,5 @@
   
    INTEGER ::   nummldw_trc               ! logical unit for mld restart
+   
    !!---------------------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -26,7 +27,5 @@
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!---------------------------------------------------------------------------------
-  
 CONTAINS
-  
 
     SUBROUTINE trd_mxl_trc_rst_write( kt )
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcbc.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcbc.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcbc.F90	(revision 5845)
@@ -1,5 +1,5 @@
 MODULE trcbc
    !!======================================================================
-   !!                     ***  MODULE  trcdta  ***
+   !!                     ***  MODULE  trcbc  ***
    !! TOP :  module for passive tracer boundary conditions
    !!=====================================================================
@@ -40,6 +40,4 @@
    TYPE(FLD), SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:)  :: sf_trccbc   ! structure of data input CBC (file informations, fields read)
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -58,5 +56,4 @@
       !!              - allocates passive tracer BC data structure 
       !!----------------------------------------------------------------------
-      !
       INTEGER,INTENT(IN) :: ntrc                           ! number of tracers
       INTEGER            :: jl, jn                         ! dummy loop indices
@@ -242,8 +239,8 @@
          !
       ENDIF
- 
+      !
       DEALLOCATE( slf_i )          ! deallocate local field structure
       IF( nn_timing == 1 )  CALL timing_stop('trc_bc_init')
-
+      !
    END SUBROUTINE trc_bc_init
 
@@ -258,11 +255,7 @@
       !!              
       !!----------------------------------------------------------------------
-   
-      ! NEMO
       USE fldread
-      
-      !! * Arguments
+      !
       INTEGER, INTENT( in ) ::   kt      ! ocean time-step index
-
       !!---------------------------------------------------------------------
       !
@@ -295,7 +288,7 @@
       !
       IF( nn_timing == 1 )  CALL timing_stop('trc_bc_read')
-      !       
-
+      !
    END SUBROUTINE trc_bc_read
+
 #else
    !!----------------------------------------------------------------------
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcdta.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcdta.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcdta.F90	(revision 5845)
@@ -36,6 +36,5 @@
    TYPE(FLD), SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:)  :: sf_trcdta   ! structure of input SST (file informations, fields read)
 !$AGRIF_END_DO_NOT_TREAT
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
+
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -189,5 +188,5 @@
                   DO ji = 1, jpi
                      DO jk = 1, jpk                        ! determines the intepolated T-S profiles at each (i,j) points
-                        zl = fsdept_n(ji,jj,jk)
+                        zl = gdept_n(ji,jj,jk)
                         IF(     zl < gdept_1d(1  ) ) THEN         ! above the first level of data
                            ztp(jk) =  sf_dta(1)%fnow(ji,jj,1)
@@ -220,5 +219,5 @@
                         ik = mbkt(ji,jj) 
                         IF( ik > 1 ) THEN
-                           zl = ( gdept_1d(ik) - fsdept_n(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) )
+                           zl = ( gdept_1d(ik) - gdept_n(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) )
                            sf_dta(1)%fnow(ji,jj,ik) = (1.-zl) * sf_dta(1)%fnow(ji,jj,ik) + zl * sf_dta(1)%fnow(ji,jj,ik-1)
                         ENDIF
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcini.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 5845)
@@ -32,6 +32,4 @@
    PUBLIC   trc_init   ! called by opa
 
-    !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 4.0 , NEMO Consortium (2011)
@@ -119,7 +117,7 @@
       !                                                              ! masked grid volume
       DO jk = 1, jpk
-         cvol(:,:,jk) = e1e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk)
+         cvol(:,:,jk) = e1e2t(:,:) * e3t_n(:,:,jk) * tmask(:,:,jk)
       END DO
-      IF( lk_degrad ) cvol(:,:,:) = cvol(:,:,:) * facvol(:,:,:)      ! degrad option: reduction by facvol
+      IF( lk_degrad )   cvol(:,:,:) = cvol(:,:,:) * facvol(:,:,:)    ! degrad option: reduction by facvol
       !                                                              ! total volume of the ocean 
       areatot = glob_sum( cvol(:,:,:) )
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 5845)
@@ -14,9 +14,5 @@
    !!----------------------------------------------------------------------
    !!----------------------------------------------------------------------
-   !!   trc_rst :   Restart for passive tracer
-   !!----------------------------------------------------------------------
-   !!----------------------------------------------------------------------
-   !!   'key_top'                                                TOP models
-   !!----------------------------------------------------------------------
+   !!   trc_rst        : Restart for passive tracer
    !!   trc_rst_opn    : open  restart file
    !!   trc_rst_read   : read  restart file
@@ -27,4 +23,5 @@
    USE iom
    USE daymod
+   
    IMPLICIT NONE
    PRIVATE
@@ -35,7 +32,9 @@
    PUBLIC   trc_rst_cal
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
-   
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 3.7 , NEMO Consortium (2010)
+   !! $Id$
+   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
    
@@ -288,5 +287,5 @@
       !
       DO jk = 1, jpk
-         zvol(:,:,jk) = e1e2t(:,:) * fse3t_a(:,:,jk) * tmask(:,:,jk)
+         zvol(:,:,jk) = e1e2t(:,:) * e3t_a(:,:,jk) * tmask(:,:,jk)
       END DO
       !
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcstp.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcstp.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcstp.F90	(revision 5845)
@@ -36,6 +36,4 @@
    LOGICAL  :: llnew
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -68,5 +66,5 @@
       IF( lk_vvl ) THEN                                                   ! update ocean volume due to ssh temporal evolution
          DO jk = 1, jpk
-            cvol(:,:,jk) = e1e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk)
+            cvol(:,:,jk) = e1e2t(:,:) * e3t_n(:,:,jk) * tmask(:,:,jk)
          END DO
          IF( lk_degrad )  cvol(:,:,:) = cvol(:,:,:) * facvol(:,:,:)       ! degrad option: reduction by facvol
Index: branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcsub.F90
===================================================================
--- branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcsub.F90	(revision 5844)
+++ branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/TOP_SRC/trcsub.F90	(revision 5845)
@@ -40,5 +40,4 @@
    PUBLIC   trc_sub_ssh      ! called by trc_stp to reset physics variables
 
-   !!* Module variables
    REAL(wp)  :: r1_ndttrc     !    1 /  nn_dttrc 
    REAL(wp)  :: r1_ndttrcp1   !    1 / (nn_dttrc+1) 
@@ -48,6 +47,4 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::  uslp_tm  , vslp_tm  , wslpi_tm  , wslpj_tm     !: time mean 
 
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -88,12 +85,12 @@
        IF( MOD( kt , nn_dttrc ) /= 0 ) THEN
           !
-          un_tm   (:,:,:)        = un_tm   (:,:,:)        + un   (:,:,:)        * fse3u(:,:,:) 
-          vn_tm   (:,:,:)        = vn_tm   (:,:,:)        + vn   (:,:,:)        * fse3v(:,:,:) 
-          tsn_tm  (:,:,:,jp_tem) = tsn_tm  (:,:,:,jp_tem) + tsn  (:,:,:,jp_tem) * fse3t(:,:,:)  
-          tsn_tm  (:,:,:,jp_sal) = tsn_tm  (:,:,:,jp_sal) + tsn  (:,:,:,jp_sal) * fse3t(:,:,:)  
-          rhop_tm (:,:,:)        = rhop_tm (:,:,:)        + rhop (:,:,:)        * fse3t(:,:,:)  
-          avt_tm  (:,:,:)        = avt_tm  (:,:,:)        + avt  (:,:,:)        * fse3w(:,:,:)  
-# if defined key_zdfddm
-          avs_tm  (:,:,:)        = avs_tm  (:,:,:)        + avs  (:,:,:)        * fse3w(:,:,:)  
+          un_tm   (:,:,:)        = un_tm   (:,:,:)        + un   (:,:,:)        * e3u_n(:,:,:) 
+          vn_tm   (:,:,:)        = vn_tm   (:,:,:)        + vn   (:,:,:)        * e3v_n(:,:,:) 
+          tsn_tm  (:,:,:,jp_tem) = tsn_tm  (:,:,:,jp_tem) + tsn  (:,:,:,jp_tem) * e3t_n(:,:,:)  
+          tsn_tm  (:,:,:,jp_sal) = tsn_tm  (:,:,:,jp_sal) + tsn  (:,:,:,jp_sal) * e3t_n(:,:,:)  
+          rhop_tm (:,:,:)        = rhop_tm (:,:,:)        + rhop (:,:,:)        * e3t_n(:,:,:)  
+          avt_tm  (:,:,:)        = avt_tm  (:,:,:)        + avt  (:,:,:)        * e3w_n(:,:,:)  
+# if defined key_zdfddm
+          avs_tm  (:,:,:)        = avs_tm  (:,:,:)        + avs  (:,:,:)        * e3w_n(:,:,:)  
 # endif
          IF( l_ldfslp ) THEN
@@ -165,12 +162,12 @@
          !
          ! 2. Create averages and reassign variables
-         un_tm    (:,:,:)        = un_tm   (:,:,:)        + un   (:,:,:)        * fse3u(:,:,:) 
-         vn_tm    (:,:,:)        = vn_tm   (:,:,:)        + vn   (:,:,:)        * fse3v(:,:,:) 
-         tsn_tm   (:,:,:,jp_tem) = tsn_tm  (:,:,:,jp_tem) + tsn  (:,:,:,jp_tem) * fse3t(:,:,:)  
-         tsn_tm   (:,:,:,jp_sal) = tsn_tm  (:,:,:,jp_sal) + tsn  (:,:,:,jp_sal) * fse3t(:,:,:)  
-         rhop_tm (:,:,:)         = rhop_tm (:,:,:)        + rhop (:,:,:)        * fse3t(:,:,:)  
-         avt_tm   (:,:,:)        = avt_tm  (:,:,:)        + avt  (:,:,:)        * fse3w(:,:,:)  
-# if defined key_zdfddm
-         avs_tm   (:,:,:)        = avs_tm  (:,:,:)        + avs  (:,:,:)        * fse3w(:,:,:)  
+         un_tm    (:,:,:)        = un_tm   (:,:,:)        + un   (:,:,:)        * e3u_n(:,:,:) 
+         vn_tm    (:,:,:)        = vn_tm   (:,:,:)        + vn   (:,:,:)        * e3v_n(:,:,:) 
+         tsn_tm   (:,:,:,jp_tem) = tsn_tm  (:,:,:,jp_tem) + tsn  (:,:,:,jp_tem) * e3t_n(:,:,:)  
+         tsn_tm   (:,:,:,jp_sal) = tsn_tm  (:,:,:,jp_sal) + tsn  (:,:,:,jp_sal) * e3t_n(:,:,:)  
+         rhop_tm (:,:,:)         = rhop_tm (:,:,:)        + rhop (:,:,:)        * e3t_n(:,:,:)  
+         avt_tm   (:,:,:)        = avt_tm  (:,:,:)        + avt  (:,:,:)        * e3w_n(:,:,:)  
+# if defined key_zdfddm
+         avs_tm   (:,:,:)        = avs_tm  (:,:,:)        + avs  (:,:,:)        * e3w_n(:,:,:)  
 # endif
          IF( l_ldfslp ) THEN
@@ -244,8 +241,8 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  z1_ne3t = r1_ndttrcp1  / fse3t(ji,jj,jk)
-                  z1_ne3u = r1_ndttrcp1  / fse3u(ji,jj,jk)
-                  z1_ne3v = r1_ndttrcp1  / fse3v(ji,jj,jk)
-                  z1_ne3w = r1_ndttrcp1  / fse3w(ji,jj,jk)
+                  z1_ne3t = r1_ndttrcp1  / e3t_n(ji,jj,jk)
+                  z1_ne3u = r1_ndttrcp1  / e3u_n(ji,jj,jk)
+                  z1_ne3v = r1_ndttrcp1  / e3v_n(ji,jj,jk)
+                  z1_ne3w = r1_ndttrcp1  / e3w_n(ji,jj,jk)
                   !
                   un   (ji,jj,jk)        = un_tm   (ji,jj,jk)        * z1_ne3u
@@ -300,13 +297,13 @@
       IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'top_sub_alloc : unable to allocate standard ocean arrays' )
 
-      un_tm   (:,:,:)        = un   (:,:,:)        * fse3u(:,:,:) 
-      vn_tm   (:,:,:)        = vn   (:,:,:)        * fse3v(:,:,:) 
-      tsn_tm  (:,:,:,jp_tem) = tsn  (:,:,:,jp_tem) * fse3t(:,:,:)  
-      tsn_tm  (:,:,:,jp_sal) = tsn  (:,:,:,jp_sal) * fse3t(:,:,:)  
-      rhop_tm (:,:,:)        = rhop (:,:,:)        * fse3t(:,:,:)  
+      un_tm   (:,:,:)        = un   (:,:,:)        * e3u_n(:,:,:) 
+      vn_tm   (:,:,:)        = vn   (:,:,:)        * e3v_n(:,:,:) 
+      tsn_tm  (:,:,:,jp_tem) = tsn  (:,:,:,jp_tem) * e3t_n(:,:,:)  
+      tsn_tm  (:,:,:,jp_sal) = tsn  (:,:,:,jp_sal) * e3t_n(:,:,:)  
+      rhop_tm (:,:,:)        = rhop (:,:,:)        * e3t_n(:,:,:)  
 !!gm : BUG? ==>> for avt & avs I don't understand the division by e3w
-      avt_tm  (:,:,:)        = avt  (:,:,:)        * fse3w(:,:,:)  
-# if defined key_zdfddm
-      avs_tm  (:,:,:)        = avs  (:,:,:)        * fse3w(:,:,:)  
+      avt_tm  (:,:,:)        = avt  (:,:,:)        * e3w_n(:,:,:)  
+# if defined key_zdfddm
+      avs_tm  (:,:,:)        = avs  (:,:,:)        * e3w_n(:,:,:)  
 # endif
       IF( l_ldfslp ) THEN
@@ -400,12 +397,12 @@
       !                                      
       ! Start new averages
-         un_tm   (:,:,:)        = un   (:,:,:)        * fse3u(:,:,:) 
-         vn_tm   (:,:,:)        = vn   (:,:,:)        * fse3v(:,:,:) 
-         tsn_tm  (:,:,:,jp_tem) = tsn  (:,:,:,jp_tem) * fse3t(:,:,:)  
-         tsn_tm  (:,:,:,jp_sal) = tsn  (:,:,:,jp_sal) * fse3t(:,:,:)  
-         rhop_tm (:,:,:)        = rhop (:,:,:)        * fse3t(:,:,:)  
-         avt_tm  (:,:,:)        = avt  (:,:,:)        * fse3w(:,:,:)  
-# if defined key_zdfddm
-         avs_tm  (:,:,:)        = avs  (:,:,:)        * fse3w(:,:,:)  
+         un_tm   (:,:,:)        = un   (:,:,:)        * e3u_n(:,:,:) 
+         vn_tm   (:,:,:)        = vn   (:,:,:)        * e3v_n(:,:,:) 
+         tsn_tm  (:,:,:,jp_tem) = tsn  (:,:,:,jp_tem) * e3t_n(:,:,:)  
+         tsn_tm  (:,:,:,jp_sal) = tsn  (:,:,:,jp_sal) * e3t_n(:,:,:)  
+         rhop_tm (:,:,:)        = rhop (:,:,:)        * e3t_n(:,:,:)  
+         avt_tm  (:,:,:)        = avt  (:,:,:)        * e3w_n(:,:,:)  
+# if defined key_zdfddm
+         avs_tm  (:,:,:)        = avs  (:,:,:)        * e3w_n(:,:,:)  
 # endif
       IF( l_ldfslp ) THEN
@@ -495,5 +492,5 @@
       zhdiv(:,:) = 0._wp
       DO jk = 1, jpkm1                                 ! Horizontal divergence of barotropic transports
-        zhdiv(:,:) = zhdiv(:,:) + fse3t(:,:,jk) * hdivn(:,:,jk)
+        zhdiv(:,:) = zhdiv(:,:) + e3t_n(:,:,jk) * hdivn(:,:,jk)
       END DO
       !                                                ! Sea surface elevation time stepping
@@ -520,7 +517,7 @@
       z1_2dt = 1.e0 / z2dt
       DO jk = jpkm1, 1, -1                             ! integrate from the bottom the hor. divergence
-         ! - ML - need 3 lines here because replacement of fse3t by its expression yields too long lines otherwise
-         wn(:,:,jk) = wn(:,:,jk+1) -   fse3t_n(:,:,jk) * hdivn(:,:,jk)        &
-            &                      - ( fse3t_a(:,:,jk) - fse3t_b(:,:,jk) )    &
+         ! - ML - need 3 lines here because replacement of e3t by its expression yields too long lines otherwise
+         wn(:,:,jk) = wn(:,:,jk+1) -   e3t_n(:,:,jk) * hdivn(:,:,jk)        &
+            &                      - ( e3t_a(:,:,jk) - e3t_b(:,:,jk) )    &
             &                         * tmask(:,:,jk) * z1_2dt
 #if defined key_bdy
