Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_adv_umx.F90
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_adv_umx.F90	(revision 10314)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_adv_umx.F90	(revision 10345)
@@ -229,7 +229,13 @@
          !
          DO jl = 1, ipl
-            DO jj = 1, jpjm1
+            DO jj = 2, jpjm1
                DO ji = 1, fs_jpim1   ! vector opt.
                   zfu_ho(ji,jj,jl) = puc(ji,jj) * zt_u(ji,jj,jl)
+               END DO
+            END DO
+         END DO
+         DO jl = 1, ipl
+            DO jj = 1, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
                   zfv_ho(ji,jj,jl) = pvc(ji,jj) * zt_v(ji,jj,jl)
                END DO
@@ -242,7 +248,13 @@
       ! --------------------------------------------------
       DO jl = 1, ipl
-         DO jj = 1, jpjm1
+         DO jj = 2, jpjm1
             DO ji = 1, fs_jpim1   ! vector opt.
                zfu_ho(ji,jj,jl) = zfu_ho(ji,jj,jl) - zfu_ups(ji,jj,jl)
+            END DO
+         END DO
+      END DO
+      DO jl = 1, ipl
+         DO jj = 1, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
                zfv_ho(ji,jj,jl) = zfv_ho(ji,jj,jl) - zfv_ups(ji,jj,jl)
             END DO
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_rhg_evp.F90
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_rhg_evp.F90	(revision 10314)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icedyn_rhg_evp.F90	(revision 10345)
@@ -26,4 +26,5 @@
    USE sbc_ice , ONLY : utau_ice, vtau_ice, snwice_mass, snwice_mass_b
    USE ice            ! sea-ice: ice variables
+   USE icevar         ! ice_var_sshdyn
    USE icedyn_rdgrft  ! sea-ice: ice strength
    USE bdy_oce , ONLY : ln_bdy 
@@ -143,5 +144,5 @@
       REAL(wp), DIMENSION(jpi,jpj) ::   zs1, zs2, zs12                  ! stress tensor components
       REAL(wp), DIMENSION(jpi,jpj) ::   zu_ice, zv_ice, zresr           ! check convergence
-      REAL(wp), DIMENSION(jpi,jpj) ::   zpice                           ! array used for the calculation of ice surface slope:
+      REAL(wp), DIMENSION(jpi,jpj) ::   zssh_lead_m                     ! array used for the calculation of ice surface slope:
       !                                                                 !    ocean surface (ssh_m) if ice is not embedded
       !                                                                 !    ice top surface if ice is embedded   
@@ -261,19 +262,7 @@
       !------------------------------------------------------------------------------!
 
-      IF( ln_ice_embd ) THEN             !== embedded sea ice: compute representative ice top surface ==!
-         !                                            
-         ! average interpolation coeff as used in dynspg = (1/nn_fsbc)   * {SUM[n/nn_fsbc], n=0,nn_fsbc-1}
-         !                                               = (1/nn_fsbc)^2 * {SUM[n]        , n=0,nn_fsbc-1}
-         zintn = REAL( nn_fsbc - 1 ) / REAL( nn_fsbc ) * 0.5_wp     
-         !
-         ! average interpolation coeff as used in dynspg = (1/nn_fsbc)   *    {SUM[1-n/nn_fsbc], n=0,nn_fsbc-1}
-         !                                               = (1/nn_fsbc)^2 * (nn_fsbc^2 - {SUM[n], n=0,nn_fsbc-1})
-         zintb = REAL( nn_fsbc + 1 ) / REAL( nn_fsbc ) * 0.5_wp
-         !
-         zpice(:,:) = ssh_m(:,:) + ( zintn * snwice_mass(:,:) + zintb * snwice_mass_b(:,:) ) * r1_rau0
-         !
-      ELSE                                    !== non-embedded sea ice: use ocean surface for slope calculation ==!
-         zpice(:,:) = ssh_m(:,:)
-      ENDIF
+      !== embedded sea ice: compute representative ice top surface      ==!
+      !== non-embedded sea ice: use ocean surface for slope calculation ==!
+      zssh_lead_m(:,:) = ice_var_sshdyn( ssh_m, snwice_mass, snwice_mass_b)
 
       DO jj = 2, jpjm1
@@ -313,6 +302,6 @@
 
             ! Surface pressure gradient (- m*g*GRAD(ssh)) at U-V points
-            zspgU(ji,jj)    = - zmassU * grav * ( zpice(ji+1,jj) - zpice(ji,jj) ) * r1_e1u(ji,jj)
-            zspgV(ji,jj)    = - zmassV * grav * ( zpice(ji,jj+1) - zpice(ji,jj) ) * r1_e2v(ji,jj)
+            zspgU(ji,jj)    = - zmassU * grav * ( zssh_lead_m(ji+1,jj) - zssh_lead_m(ji,jj) ) * r1_e1u(ji,jj)
+            zspgV(ji,jj)    = - zmassV * grav * ( zssh_lead_m(ji,jj+1) - zssh_lead_m(ji,jj) ) * r1_e2v(ji,jj)
 
             ! masks
Index: NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icevar.F90
===================================================================
--- NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icevar.F90	(revision 10314)
+++ NEMO/branches/2018/dev_r10164_HPC09_ESIWACE_PREP_MERGE/src/ICE/icevar.F90	(revision 10345)
@@ -49,8 +49,9 @@
    !!   ice_var_bv        : brine volume
    !!   ice_var_enthalpy  : compute ice and snow enthalpies from temperature
+   !!   ice_var_sshdyn    : compute equivalent ssh in lead
    !!----------------------------------------------------------------------
    USE dom_oce        ! ocean space and time domain
    USE phycst         ! physical constants (ocean directory) 
-   USE sbc_oce , ONLY : sss_m
+   USE sbc_oce , ONLY : sss_m, ln_ice_embd, nn_fsbc
    USE ice            ! sea-ice: variables
    USE ice1D          ! sea-ice: thermodynamics variables
@@ -74,4 +75,5 @@
    PUBLIC   ice_var_bv           
    PUBLIC   ice_var_enthalpy           
+   PUBLIC   ice_var_sshdyn
 
    !!----------------------------------------------------------------------
@@ -949,4 +951,52 @@
    END SUBROUTINE ice_var_enthalpy
 
+   FUNCTION ice_var_sshdyn(pssh, psnwice_mass, psnwice_mass_b)
+      !!---------------------------------------------------------------------
+      !!                   ***  ROUTINE rhg_evp_rst  ***
+      !!                     
+      !! ** Purpose :  compute the equivalent ssh in lead when sea ice is embedded
+      !!
+      !! ** Method  :  ssh_lead = ssh + (Mice + Msnow) / rau0
+      !!
+      !! ** Reference : Jean-Michel Campin, John Marshall, David Ferreira,
+      !!                Sea ice-ocean coupling using a rescaled vertical coordinate z*, 
+      !!                Ocean Modelling, Volume 24, Issues 1-2, 2008
+      !!
+      !!----------------------------------------------------------------------
+      !
+      ! input
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pssh            !: ssh [m]
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: psnwice_mass    !: mass of snow and ice at current  ice time step [Kg/m2]
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: psnwice_mass_b  !: mass of snow and ice at previous ice time step [Kg/m2]
+      !
+      ! output
+      REAL(wp), DIMENSION(jpi,jpj) :: ice_var_sshdyn  ! equivalent ssh in lead [m]
+      !
+      ! temporary
+      REAL(wp) :: zintn, zintb                     ! time interpolation weights []
+      REAL(wp), DIMENSION(jpi,jpj) :: zsnwiceload  ! snow and ice load [m]
+      !
+      ! compute ice load used to define the equivalent ssh in lead
+      IF( ln_ice_embd ) THEN
+         !                                            
+         ! average interpolation coeff as used in dynspg = (1/nn_fsbc)   * {SUM[n/nn_fsbc], n=0,nn_fsbc-1}
+         !                                               = (1/nn_fsbc)^2 * {SUM[n]        , n=0,nn_fsbc-1}
+         zintn = REAL( nn_fsbc - 1 ) / REAL( nn_fsbc ) * 0.5_wp
+         !
+         ! average interpolation coeff as used in dynspg = (1/nn_fsbc)   *    {SUM[1-n/nn_fsbc], n=0,nn_fsbc-1}
+         !                                               = (1/nn_fsbc)^2 * (nn_fsbc^2 - {SUM[n], n=0,nn_fsbc-1})
+         zintb = REAL( nn_fsbc + 1 ) / REAL( nn_fsbc ) * 0.5_wp
+         !
+         zsnwiceload(:,:) = ( zintn * psnwice_mass(:,:) + zintb * psnwice_mass_b(:,:) ) * r1_rau0
+         !
+      ELSE
+         zsnwiceload(:,:) = 0.0_wp
+      ENDIF
+      ! compute equivalent ssh in lead
+      ice_var_sshdyn(:,:) = pssh(:,:) + zsnwiceload(:,:)
+      !
+   END FUNCTION ice_var_sshdyn
+
+
 #else
    !!----------------------------------------------------------------------
