Index: NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfstp.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfstp.F90	(revision 11553)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfstp.F90	(revision 11823)
@@ -15,4 +15,5 @@
    USE oce            ! ocean dynamics and tracers
    USE dom_oce        ! ocean space and time domain
+   USE domvvl, ONLY : ln_vvl_zstar
    USE phycst         ! physical constants
    USE eosbn2         ! equation of state
@@ -120,10 +121,11 @@
       !! ** Purpose :   Initialisation of the ice shelf public variables
       !!
-      !! ** Method  :   Read the namsbc namelist and set derived parameters
-      !!                Call init routines for all other SBC modules that have one
-      !!
-      !! ** Action  : - read namsbc parameters
+      !! ** Method  :   Read the namisf namelist, check option compatibility and set derived parameters
+      !!
+      !! ** Action  : - read namisf parameters
       !!              - allocate memory
-      !!              - call cav/param init routine
+      !!              - output print
+      !!              - ckeck option compatibility
+      !!              - call cav/param/isfcpl init routine
       !!----------------------------------------------------------------------
       !
@@ -144,28 +146,4 @@
       ! terminate routine now if no ice shelf melt formulation specify
       IF ( ln_isf ) THEN
-         !
-         !---------------------------------------------------------------------------------------------------------------------
-         ! initialisation melt in the cavity
-         IF ( ln_isfcav_mlt ) THEN
-            !
-            ! initialisation  of cav variable
-            CALL isf_cav_init()
-            !
-            ! read cav variable from restart
-            IF ( ln_rstart ) CALL isfrst_read('cav', risf_cav_tsc, fwfisf_cav, risf_cav_tsc_b, fwfisf_cav_b)
-            !
-         END IF
-         !
-         !---------------------------------------------------------------------------------------------------------------------
-         ! initialisation parametrised melt
-         IF ( ln_isfpar_mlt ) THEN
-            !
-            ! initialisation  of par variable
-            CALL isf_par_init()
-            !
-            ! read par variable from restart
-            IF ( ln_rstart ) CALL isfrst_read('par', risf_par_tsc, fwfisf_par, risf_par_tsc_b, fwfisf_par_b)
-            !
-         END IF
          !
          !---------------------------------------------------------------------------------------------------------------------
@@ -173,4 +151,17 @@
          IF( ln_isfcpl ) THEN 
             !
+            ! start on an euler time step
+            neuler = 0
+            !
+            ! ice sheet coupling: extrapolation of restart to fill new wet cell and compute divergence correction
+            CALL isfcpl_init()
+            !
+            ! all before fields set to now values
+            tsb  (:,:,:,:) = tsn  (:,:,:,:)
+            ub   (:,:,:)   = un   (:,:,:)
+            vb   (:,:,:)   = vn   (:,:,:)
+            sshb (:,:)     = sshn (:,:)
+            e3t_b(:,:,:)   = e3t_n(:,:,:)
+ 
             ! prepare writing restart
             IF( lwxios ) CALL iom_set_rstw_var_active('ssmask')
@@ -182,9 +173,39 @@
          END IF
          !
+         !---------------------------------------------------------------------------------------------------------------------
+         ! initialisation melt in the cavity
+         IF ( ln_isfcav_mlt ) THEN
+            !
+            ! initialisation  of cav variable
+            CALL isf_cav_init()
+            !
+            ! read cav variable from restart
+            IF ( ln_rstart ) CALL isfrst_read('cav', risf_cav_tsc, fwfisf_cav, risf_cav_tsc_b, fwfisf_cav_b)
+            !
+         END IF
+         !
+         !---------------------------------------------------------------------------------------------------------------------
+         ! initialisation parametrised melt
+         IF ( ln_isfpar_mlt ) THEN
+            !
+            ! initialisation  of par variable
+            CALL isf_par_init()
+            !
+            ! read par variable from restart
+            IF ( ln_rstart ) CALL isfrst_read('par', risf_par_tsc, fwfisf_par, risf_par_tsc_b, fwfisf_par_b)
+            !
+         END IF
+         !
       END IF
          
   END SUBROUTINE isf_init
 
-  SUBROUTINE isf_ctl()!
+  SUBROUTINE isf_ctl()
+      !!---------------------------------------------------------------------
+      !!                  ***  ROUTINE isf_ctl  ***
+      !!
+      !! ** Purpose :   output print and option compatibility check
+      !!
+      !!----------------------------------------------------------------------
       IF (lwp) THEN
          WRITE(numout,*)
@@ -272,4 +293,7 @@
          END IF
          !
+         ! compatibility ice shelf and vvl
+         IF( .NOT. ln_vvl_zstar .AND. ln_isf ) CALL ctl_stop( 'Only vvl_zstar has been tested with ice shelf cavity' )
+         !
       END IF
    END SUBROUTINE isf_ctl
