Index: /NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DOM/dom_oce.F90
===================================================================
--- /NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DOM/dom_oce.F90	(revision 10786)
+++ /NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DOM/dom_oce.F90	(revision 10787)
@@ -134,5 +134,5 @@
    LOGICAL, PUBLIC ::   ln_sco       !: s-coordinate or hybrid z-s coordinate
    LOGICAL, PUBLIC ::   ln_isfcav    !: presence of ISF 
-   !                                                        !  ref. scale factors
+   !                                                        !  reference scale factors
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::     e3t_0  !: t- vert. scale factor [m]
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::     e3u_0  !: u- vert. scale factor [m]
@@ -146,15 +146,19 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, TARGET, DIMENSION(:,:,:) ::     e3f                             !: F-point 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]
+   !                                                        !  reference depths of cells
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   gdept_0   !: t- depth              [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   gdepw_0   !: w- depth              [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   gde3w_0   !: w- depth (sum of e3w) [m]
+   !                                                        !  time-dependent depths of cells
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, TARGET, DIMENSION(:,:,:,:) ::  gdept, gdepw  
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, TARGET, DIMENSION(:,:,:)   ::  gde3w  
    
-   !                                                      !  ref. ! before  !   now   !  after  !
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ht_0            ,    ht_n             !: 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   !: v-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]
+   !                                                      !  reference depths of water column
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ht_0  !: t-depth              [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hu_0  !: u-depth              [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hv_0  !: v-depth              [m]
+   !                                                      !  time-dependent depths of water column
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, TARGET, DIMENSION(:,:,:) ::  hu, hv, r1_hu, r1_hv  
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, TARGET, DIMENSION(:,:)   ::  ht
 
    !! TEMPORARY POINTERS FOR DEVELOPMENT ONLY
@@ -166,4 +170,12 @@
    REAL(wp), PUBLIC, POINTER, SAVE, DIMENSION(:,:,:) ::    e3uw_b ,  e3uw_n            !: uw-vert. scale factor [m]
    REAL(wp), PUBLIC, POINTER, SAVE, DIMENSION(:,:,:) ::    e3vw_b ,  e3vw_n            !: vw-vert. scale factor [m]
+   REAL(wp), PUBLIC, POINTER, SAVE, DIMENSION(:,:,:) ::    gdept_b , gdept_n           !: t- depth              [m]    
+   REAL(wp), PUBLIC, POINTER, SAVE, DIMENSION(:,:,:) ::    gdepw_b , gdepw_n           !: w- depth              [m]
+   REAL(wp), PUBLIC, POINTER, SAVE, DIMENSION(:,:,:) ::    gde3w_n                     !: w- depth (sum of e3w) [m]
+   REAL(wp), PUBLIC, POINTER, SAVE, DIMENSION(:,:)   ::    ht_n                        !: t-depth              [m]
+   REAL(wp), PUBLIC, POINTER, SAVE, DIMENSION(:,:)   ::    hu_b ,    hu_n ,    hu_a    !: u-depth              [m]
+   REAL(wp), PUBLIC, POINTER, SAVE, DIMENSION(:,:)   ::    hv_b ,    hv_n ,    hv_a    !: v-depth              [m]
+   REAL(wp), PUBLIC, POINTER, SAVE, DIMENSION(:,:)   :: r1_hu_b , r1_hu_n , r1_hu_a    !: inverse of u-depth [1/m]
+   REAL(wp), PUBLIC, POINTER, SAVE, DIMENSION(:,:)   :: r1_hv_b , r1_hv_n , r1_hv_a    !: inverse of v-depth [1/m]
    !! TEMPORARY POINTERS FOR DEVELOPMENT ONLY
 
@@ -274,7 +286,6 @@
          &      ff_f (jpi,jpj) ,    ff_t (jpi,jpj)                                     , STAT=ierr(3) )
          !
-      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( gdept_0(jpi,jpj,jpk)       , gdepw_0(jpi,jpj,jpk)       , gde3w_0(jpi,jpj,jpk) ,              &
+         &      gdept  (jpi,jpj,jpk,jpt-1) , gdepw  (jpi,jpj,jpk,jpt-1) , gde3w  (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) ,    &
@@ -284,8 +295,7 @@
          &      e3f  (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) ,     &
-         &                      hu_a(jpi,jpj) , hv_a(jpi,jpj) , r1_hu_a(jpi,jpj) , r1_hv_a(jpi,jpj) , STAT=ierr(6)  )
+      ALLOCATE( ht_0(jpi,jpj) ,    hu_0(jpi,jpj)     ,    hv_0(jpi,jpj) ,                                           &
+         &      ht  (jpi,jpj) ,    hu  (jpi,jpj,jpt) ,    hv  (jpi,jpj,jpt) ,                                       &
+         &                      r1_hu  (jpi,jpj,jpt) , r1_hv  (jpi,jpj,jpt) , STAT=ierr(6) )
          !
          !
Index: /NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DOM/domvvl.F90
===================================================================
--- /NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DOM/domvvl.F90	(revision 10786)
+++ /NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DOM/domvvl.F90	(revision 10787)
@@ -616,8 +616,9 @@
          tilde_e3t_n(:,:,:) = tilde_e3t_a(:,:,:)
       ENDIF
-      gdept_b(:,:,:) = gdept_n(:,:,:)
-      gdepw_b(:,:,:) = gdepw_n(:,:,:)
 
 !! TO BE DELETED
+!!$      gdept_b(:,:,:) = gdept_n(:,:,:)
+!!$      gdepw_b(:,:,:) = gdepw_n(:,:,:)
+
 !!$      e3t_n(:,:,:) = e3t_a(:,:,:)
 !!$      e3u_n(:,:,:) = e3u_a(:,:,:)
@@ -643,7 +644,7 @@
 
       ! t- and w- points depth (set the isf depth as it is in the initial step)
-      gdept_n(:,:,1) = 0.5_wp * e3w(:,:,1,kNnn_2lev)
-      gdepw_n(:,:,1) = 0.0_wp
-      gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:)
+      gdept(:,:,1,kNnn_2lev) = 0.5_wp * e3w(:,:,1,kNnn_2lev)
+      gdepw(:,:,1,kNnn_2lev) = 0.0_wp
+      gde3w(:,:,1)           = gdept(:,:,1,kNnn_2lev) - sshn(:,:)
       DO jk = 2, jpk
          DO jj = 1,jpj
@@ -652,8 +653,8 @@
                                                                  ! 1 for jk = mikt
                zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk))
-               gdepw_n(ji,jj,jk) = gdepw_n(ji,jj,jk-1) + e3t(ji,jj,jk-1,kNnn)
-               gdept_n(ji,jj,jk) =    zcoef  * ( gdepw_n(ji,jj,jk  ) + 0.5 * e3w(ji,jj,jk,kNnn_2lev) )  &
-                   &             + (1-zcoef) * ( gdept_n(ji,jj,jk-1) +       e3w(ji,jj,jk,kNnn_2lev) ) 
-               gde3w_n(ji,jj,jk) = gdept_n(ji,jj,jk) - sshn(ji,jj)
+               gdepw(ji,jj,jk,kNnn_2lev) = gdepw(ji,jj,jk-1,kNnn_2lev) + e3t(ji,jj,jk-1,kNnn)
+               gdept(ji,jj,jk,kNnn_2lev) =    zcoef  * ( gdepw(ji,jj,jk,kNnn_2lev  ) + 0.5 * e3w(ji,jj,jk,kNnn_2lev) )  &
+                   &             + (1-zcoef) * ( gdept(ji,jj,jk-1,kNnn_2lev) +       e3w(ji,jj,jk,kNnn_2lev) ) 
+               gde3w(ji,jj,jk) = gdept(ji,jj,jk,kNnn_2lev) - sshn(ji,jj)
             END DO
          END DO
@@ -662,10 +663,12 @@
       ! Local depth and Inverse of the local depth of the water
       ! -------------------------------------------------------
-      hu_n(:,:) = hu_a(:,:)   ;   r1_hu_n(:,:) = r1_hu_a(:,:)
-      hv_n(:,:) = hv_a(:,:)   ;   r1_hv_n(:,:) = r1_hv_a(:,:)
-      !
-      ht_n(:,:) = e3t(:,:,1,kNnn) * tmask(:,:,1)
+!! TO BE DELETED
+!!$      hu_n(:,:) = hu_a(:,:)   ;   r1_hu_n(:,:) = r1_hu_a(:,:)
+!!$      hv_n(:,:) = hv_a(:,:)   ;   r1_hv_n(:,:) = r1_hv_a(:,:)
+!! TO BE DELETED
+      !
+      ht(:,:) = e3t(:,:,1,kNnn) * tmask(:,:,1)
       DO jk = 2, jpkm1
-         ht_n(:,:) = ht_n(:,:) + e3t(:,:,jk,kNnn) * tmask(:,:,jk)
+         ht(:,:) = ht(:,:) + e3t(:,:,jk,kNnn) * tmask(:,:,jk)
       END DO
 
Index: /NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DYN/dynnxt.F90
===================================================================
--- /NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DYN/dynnxt.F90	(revision 10786)
+++ /NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DYN/dynnxt.F90	(revision 10787)
@@ -358,12 +358,12 @@
       !
       IF(.NOT.ln_linssh ) THEN
-         hu_b(:,:) = e3u(:,:,1,ikt ) * umask(:,:,1)
-         hv_b(:,:) = e3v(:,:,1,ikt ) * vmask(:,:,1)
+         hu(:,:,ikt) = e3u(:,:,1,ikt ) * umask(:,:,1)
+         hv(:,:,ikt) = e3v(:,:,1,ikt ) * vmask(:,:,1)
          DO jk = 2, jpkm1
-            hu_b(:,:) = hu_b(:,:) + e3u(:,:,jk,ikt ) * umask(:,:,jk)
-            hv_b(:,:) = hv_b(:,:) + e3v(:,:,jk,ikt ) * vmask(:,:,jk)
+            hu(:,:,ikt) = hu(:,:,ikt) + e3u(:,:,jk,ikt ) * umask(:,:,jk)
+            hv(:,:,ikt) = hv(:,:,ikt) + e3v(:,:,jk,ikt ) * vmask(:,:,jk)
          END DO
-         r1_hu_b(:,:) = ssumask(:,:) / ( hu_b(:,:) + 1._wp - ssumask(:,:) )
-         r1_hv_b(:,:) = ssvmask(:,:) / ( hv_b(:,:) + 1._wp - ssvmask(:,:) )
+         r1_hu(:,:,ikt) = ssumask(:,:) / ( hu(:,:,ikt) + 1._wp - ssumask(:,:) )
+         r1_hv(:,:,ikt) = ssvmask(:,:) / ( hv(:,:,ikt) + 1._wp - ssvmask(:,:) )
       ENDIF
       !
@@ -378,8 +378,8 @@
          vb_b(:,:) = vb_b(:,:) + e3v(:,:,jk,ikt ) * vv(:,:,jk,ikt ) * vmask(:,:,jk)
       END DO
-      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(:,:)
+      un_b(:,:) = un_b(:,:) * r1_hu(:,:,kNp1)
+      vn_b(:,:) = vn_b(:,:) * r1_hv(:,:,kNp1)
+      ub_b(:,:) = ub_b(:,:) * r1_hu(:,:,ikt)
+      vb_b(:,:) = vb_b(:,:) * r1_hv(:,:,ikt)
       !
       IF( .NOT.ln_dynspg_ts ) THEN        ! output the barotropic currents
Index: /NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/step.F90
===================================================================
--- /NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/step.F90	(revision 10786)
+++ /NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/step.F90	(revision 10787)
@@ -366,4 +366,14 @@
       e3vw_b => e3vw(:,:,:,Nm1_2lev); e3vw_n => e3vw(:,:,:,Nnn_2lev)
 
+      gdept_b => gdept(:,:,:,Nm1_2lev); gdept_n => gdept(:,:,:,Nnn_2lev) 
+      gdepw_b => gdepw(:,:,:,Nm1_2lev); gdepw_n => gdepw(:,:,:,Nnn_2lev) 
+      gde3w_n => gde3w(:,:,:)
+
+      ht_n => ht(:,:)
+      hu_b => hu(:,:,Nm1); hu_n => hu(:,:,Nnn); hu_a => hu(:,:,Np1)
+      hv_b => hv(:,:,Nm1); hv_n => hv(:,:,Nnn); hv_a => hv(:,:,Np1)
+      r1_hu_b => r1_hu(:,:,Nm1); r1_hu_n => r1_hu(:,:,Nnn); r1_hu_a => r1_hu(:,:,Np1)
+      r1_hv_b => r1_hv(:,:,Nm1); r1_hv_n => r1_hv(:,:,Nnn); r1_hv_a => r1_hv(:,:,Np1)
+
    END SUBROUTINE update_pointers
 
