Index: NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcpl.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcpl.F90	(revision 11876)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcpl.F90	(revision 11902)
@@ -13,4 +13,5 @@
    !!----------------------------------------------------------------------
    USE isf                             ! ice shelf variable
+   USE isfutils, ONLY : debug
    USE lib_mpp, ONLY: mpp_sum, mpp_max ! mpp routine
    USE domvvl , ONLY: dom_vvl_zgr      ! vertical scale factor interpolation
@@ -46,23 +47,45 @@
 CONTAINS
    SUBROUTINE isfcpl_init()
+      !!---------------------------------------------------------------------
+      !!
+      !!---------------------------------------------------------------------
+      INTEGER :: id
+      !!----------------------------------------------------------------------
       !
       ! start on an euler time step
       neuler = 0
       ! 
+      ! allocation and initialisation to 0
       CALL isf_alloc_cpl()
       !
-      ! extrapolation ssh
-      CALL isfcpl_ssh()
-      !
-      ! extrapolation tracer properties
-      CALL isfcpl_tra()
-      !
-      ! correction of the horizontal divergence and associated temp. and salt content flux
-      ! Need to : - include in the cpl cons the risfcpl_vol/tsc contribution
-      !           - decide how to manage thickness level change in conservation
-      CALL isfcpl_vol()
-      !
-      ! apply the 'conservation' method
-      IF ( ln_isfcpl_cons ) CALL isfcpl_cons()
+      ! check presence of variable needed for coupling
+      ! iom_varid return 0 if not found
+      id = 0
+      id = id * iom_varid(numror, 'ssmask', ldstop = .false.)
+      id = id * iom_varid(numror, 'tmask' , ldstop = .false.)
+      id = id * iom_varid(numror, 'e3t_n' , ldstop = .false.)
+      id = id * iom_varid(numror, 'e3u_n' , ldstop = .false.)
+      id = id * iom_varid(numror, 'e3v_n' , ldstop = .false.)
+      IF(lwp) WRITE(numout,*) ' isfcpl_init:', id
+      IF (id == 0) THEN
+         IF(lwp) WRITE(numout,*) ' isfcpl_init: restart variables for ice sheet coupling are missing, skip coupling for this leg ' 
+         IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~'
+         IF(lwp) WRITE(numout,*) ''
+      ELSE
+         ! extrapolation ssh
+         CALL isfcpl_ssh()
+         !
+         ! extrapolation tracer properties
+         CALL isfcpl_tra()
+         !
+         ! correction of the horizontal divergence and associated temp. and salt content flux
+         ! Need to : - include in the cpl cons the risfcpl_vol/tsc contribution
+         !           - decide how to manage thickness level change in conservation
+         CALL isfcpl_vol()
+         !
+         ! apply the 'conservation' method
+         IF ( ln_isfcpl_cons ) CALL isfcpl_cons()
+         !
+      END IF
       !
       ! mask velocity properly (mask used in restart not compatible with new mask)
@@ -169,4 +192,6 @@
       sshb(:,:) = sshn(:,:)
       !
+      IF ( ln_isfdebug ) CALL debug('isfcpl_ssh: sshn',sshn(:,:))
+      !
       ! recompute the vertical scale factor, depth and water thickness
       CALL dom_vvl_zgr()
@@ -198,8 +223,4 @@
       !!----------------------------------------------------------------------
       ! 
-      IF(lwp) WRITE(numout,*) ' isfrst_cpl_read: read ice sheet coupling restart variable ' 
-      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~~'
-      IF(lwp) WRITE(numout,*) ''
-      !
       CALL iom_get( numror, jpdom_autoglo, 'tmask'  , ztmask_b, ldxios = lrxios   ) ! need to extrapolate T/S
       !CALL iom_get( numror, jpdom_autoglo, 'wmask'  , zwmask_b, ldxios = lrxios   ) ! need to extrapolate T/S
@@ -401,6 +422,4 @@
       !
       CALL lbc_lnk( 'iscpl', risfcpl_vol, 'T', 1. )
-      CALL lbc_lnk( 'iscpl', zqvolb, 'T', 1. )
-      CALL lbc_lnk( 'iscpl', zqvoln, 'T', 1. )
       !
       ! get 3d tra increment to apply at the first time step
Index: NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfhdiv.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfhdiv.F90	(revision 11876)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfhdiv.F90	(revision 11902)
@@ -2,4 +2,5 @@
 
    USE isf                    ! ice shelf
+   USE isfutils 
    USE dom_oce                ! time and space domain
    USE phycst , ONLY: r1_rau0 ! physical constant
@@ -35,5 +36,4 @@
          IF ( ln_isfpar_mlt ) CALL isf_hdiv_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, fwfisf_par, fwfisf_par_b, phdiv)
          !
-         !
          ! ice sheet coupling contribution 
          IF ( ln_isfcpl .AND. kt /= 0 ) THEN
@@ -46,4 +46,10 @@
             ! conservation option
             IF ( ln_isfcpl_cons ) CALL isf_hdiv_cpl(risfcpl_cons_vol, phdiv)
+            !
+            IF ( ln_isfdebug ) THEN
+               CALL debug('isfdiv: phdiv'      ,phdiv(:,:,:))
+               CALL debug('isfdiv: risfcpl_vol',risfcpl_vol(:,:,:))
+               CALL debug('isfdiv: fwfisf     ',fwfisf_cav(:,:)+fwfisf_cav_b(:,:))
+            END IF
             !
          END IF
