Index: NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/SHARED/namelist_ref
===================================================================
--- NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/SHARED/namelist_ref	(revision 11523)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/SHARED/namelist_ref	(revision 11529)
@@ -485,10 +485,10 @@
          !* 'bg03' case
          sn_isfpar_Leff = 'isfmlt_par',       0        ,'Leff'     ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
-   !
-   ! ---------------- ice sheet coupling -------------------------------
-   !
-   ln_isfcpl = .false.
-      nn_drown       = 10        ! number of iteration of the extrapolation loop (fill the new wet cells)
-      ln_isfcpl_cons = .false.
+      !
+      ! ---------------- ice sheet coupling -------------------------------
+      !
+      ln_isfcpl = .false.
+         nn_drown       = 10        ! number of iteration of the extrapolation loop (fill the new wet cells)
+         ln_isfcpl_cons = .false.
 /
 !-----------------------------------------------------------------------
Index: NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DIA/diahsb.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DIA/diahsb.F90	(revision 11523)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DIA/diahsb.F90	(revision 11529)
@@ -288,4 +288,5 @@
               ! if ice sheet/oceqn coupling, need to mask ini variables here (mask could change at the next NEMO instance).
                e3t_ini   (:,:,jk) = e3t_n(:,:,jk)                      * tmask(:,:,jk)  ! initial vertical scale factors
+               tmask_ini (:,:,jk) = tmask(:,:,jk)                                       ! initial mask
                hc_loc_ini(:,:,jk) = tsn(:,:,jk,jp_tem) * e3t_n(:,:,jk) * tmask(:,:,jk)  ! initial heat content
                sc_loc_ini(:,:,jk) = tsn(:,:,jk,jp_sal) * e3t_n(:,:,jk) * tmask(:,:,jk)  ! initial salt content
Index: NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DIA/diawri.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DIA/diawri.F90	(revision 11523)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DIA/diawri.F90	(revision 11529)
@@ -925,8 +925,4 @@
          END IF
       END IF
-      DO jk = 1,jpk
-         zisfdebug(:,:,jk) = risfcpl_cons_vol(:,:,jk) * rdt_iscpl / e1e2t(:,:)
-      END DO
-      CALL iom_rstput( 0, 0, inum, 'isfdebug', zisfdebug)
       IF( ALLOCATED(ahtu) ) THEN
          CALL iom_rstput( 0, 0, inum,  'ahtu', ahtu              )    ! aht at u-point
Index: NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/divhor.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/divhor.F90	(revision 11523)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/divhor.F90	(revision 11529)
@@ -100,7 +100,6 @@
       ! 
 #endif
-      CALL debug('isfdivdebug 0',hdivn)
-      IF( ln_isf .OR. ll_isfcpl_cons )   CALL isf_hdiv( kt, hdivn )      !==  ice shelf  ==!   (update hdivn field)
-      CALL debug('isfdivdebug 3',hdivn)
+      !
+      IF( ln_isf .OR. ln_isfcpl )   CALL isf_hdiv( kt, hdivn )      !==  ice shelf  ==!   (update hdivn field)
       !
       CALL lbc_lnk( 'divhor', hdivn, 'T', 1. )   !   (no sign change)
Index: NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/dynspg_ts.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/dynspg_ts.F90	(revision 11523)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/dynspg_ts.F90	(revision 11529)
@@ -647,4 +647,8 @@
       IF( ll_isfcpl_cons ) THEN
          zssh_frc(:,:) = zssh_frc(:,:) + risfcpl_cons_ssh(:,:)
+      END IF
+      !
+      IF( ln_isfcpl .AND. ln_rstart .AND. kt == nit000 ) THEN
+         zssh_frc(:,:) = zssh_frc(:,:) + risfcpl_ssh(:,:)
       END IF
       !
Index: NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isf.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isf.F90	(revision 11523)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isf.F90	(revision 11529)
@@ -101,5 +101,5 @@
    INTEGER , PUBLIC                                        ::   nstp_iscpl   !:
    REAL(wp), PUBLIC                                        ::   rdt_iscpl    !: 
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)     ::   risfcpl_cons_ssh, risfcpl_cons_ssh_b               !:
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)     ::   risfcpl_ssh, risfcpl_cons_ssh, risfcpl_cons_ssh_b               !:
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::   risfcpl_vol, risfcpl_cons_vol, risfcpl_cons_vol_b  !:
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) ::   risfcpl_tsc, risfcpl_cons_tsc, risfcpl_cons_tsc_b  !:
@@ -185,5 +185,5 @@
       ierr = 0
       !
-      ALLOCATE( risfcpl_tsc(jpi,jpj,jpk,jpts)      , risfcpl_vol(jpi,jpj,jpk)      ,             &
+      ALLOCATE( risfcpl_ssh(jpi,jpj), risfcpl_tsc(jpi,jpj,jpk,jpts)      , risfcpl_vol(jpi,jpj,jpk)      ,             &
          &      risfcpl_cons_tsc(jpi,jpj,jpk,jpts) , risfcpl_cons_vol(jpi,jpj,jpk) ,             &
          &      risfcpl_cons_tsc_b(jpi,jpj,jpk,jpts) , risfcpl_cons_vol_b(jpi,jpj,jpk),          &
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 11523)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfhdiv.F90	(revision 11529)
@@ -30,7 +30,4 @@
       INTEGER, INTENT(in) :: kt
       !
-      IF (lwp) WRITE(numout,*) ' isfdiv start'
-      FLUSH(numout)
-      !
       IF ( ln_isf ) THEN
          !
@@ -47,12 +44,10 @@
          !
          ! correct divergence only for the first time step
-         !IF ( kt == nit000 ) CALL isf_hdiv_cpl(risfcpl_vol, phdiv)
+         IF ( kt == nit000 ) CALL isf_hdiv_cpl(risfcpl_vol, phdiv)
          !
          ! correct divergence every time step to remove any trend due to coupling
-         IF ( ll_isfcpl_cons ) CALL isf_hdiv_cpl(risfcpl_cons_vol, risfcpl_cons_vol_b, phdiv)
+         IF ( ll_isfcpl_cons ) CALL isf_hdiv_cpl(risfcpl_cons_vol, phdiv)
          !
       END IF
-      IF (lwp) WRITE(numout,*) ' isfdiv end'
-      FLUSH(numout)
       !
    END SUBROUTINE isf_hdiv
@@ -102,5 +97,5 @@
    END SUBROUTINE isf_hdiv_mlt
 
-   SUBROUTINE isf_hdiv_cpl(pqvol, pqvol_b, phdiv)
+   SUBROUTINE isf_hdiv_cpl(pqvol, phdiv)
       !!----------------------------------------------------------------------
       !!                  ***  SUBROUTINE isf_hdiv_cpl  ***
@@ -114,5 +109,5 @@
       REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: phdiv
       !!----------------------------------------------------------------------
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) :: pqvol, pqvol_b
+      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) :: pqvol
       !!----------------------------------------------------------------------
       INTEGER :: jk
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 11523)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfstp.F90	(revision 11529)
@@ -104,8 +104,8 @@
       END IF
 
-      IF ( ll_isfcpl ) THEN
-
+      IF ( ln_isfcpl ) THEN
+         ! 
          IF (lrst_oce) CALL isfcpl_rst_write(kt)
-
+         !
       END IF
       !
Index: NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/TRA/traisf.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/TRA/traisf.F90	(revision 11523)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/TRA/traisf.F90	(revision 11529)
@@ -46,5 +46,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( ln_timing )   CALL timing_start('tra_sbc')
+      IF( ln_timing )   CALL timing_start('tra_isf')
       !
       IF (ln_isf) THEN
@@ -61,5 +61,5 @@
       IF ( ll_isfcpl ) THEN
          !
-!         IF ( kt == nit000 ) CALL tra_isf_cpl(risfcpl_tsc, tsa)
+         IF ( kt == nit000 ) CALL tra_isf_cpl(risfcpl_tsc, tsa)
          !
          ! ensure 0 trend due to unconservation of the ice shelf coupling
@@ -130,6 +130,6 @@
       !
       DO jk = 1,jpk
-         ptsa(:,:,jk,jp_tem) = ptsa(:,:,jk,jp_tem) - ptsc(:,:,jk,jp_tem) * r1_e1e2t(:,:) / e3t_n(:,:,jk)
-         ptsa(:,:,jk,jp_sal) = ptsa(:,:,jk,jp_sal) - ptsc(:,:,jk,jp_sal) * r1_e1e2t(:,:) / e3t_n(:,:,jk)
+         ptsa(:,:,jk,jp_tem) = ptsa(:,:,jk,jp_tem) + ptsc(:,:,jk,jp_tem) * r1_e1e2t(:,:) / e3t_n(:,:,jk)
+         ptsa(:,:,jk,jp_sal) = ptsa(:,:,jk,jp_sal) + ptsc(:,:,jk,jp_sal) * r1_e1e2t(:,:) / e3t_n(:,:,jk)
       END DO
       !
Index: NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/step.F90
===================================================================
--- NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/step.F90	(revision 11523)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/step.F90	(revision 11529)
@@ -114,5 +114,5 @@
       IF( ln_apr_dyn )   CALL sbc_apr ( kstp )                   ! atmospheric pressure (NB: call before bdy_dta which needs ssh_ib) 
       IF( ln_bdy     )   CALL bdy_dta ( kstp, time_offset=+1 )   ! update dynamic & tracer data at open boundaries
-      IF( ln_isf     .OR. ll_isfcpl )   CALL isf_stp ( kstp )
+      IF( ln_isf     .OR. ln_isfcpl )   CALL isf_stp ( kstp )
                          CALL sbc     ( kstp )                   ! Sea Boundary Condition (including sea-ice)
 
@@ -242,5 +242,5 @@
                          CALL tra_sbc       ( kstp )  ! surface boundary condition
       IF( ln_traqsr  )   CALL tra_qsr       ( kstp )  ! penetrative solar radiation qsr
-      IF( ln_isf .OR. ll_isfcpl ) CALL tra_isf       ( kstp )  ! ice shelf heat flux
+      IF( ln_isf .OR. ln_isfcpl ) CALL tra_isf ( kstp )  ! ice shelf heat flux
       IF( ln_trabbc  )   CALL tra_bbc       ( kstp )  ! bottom heat flux
       IF( ln_trabbl  )   CALL tra_bbl       ( kstp )  ! advective (and/or diffusive) bottom boundary layer scheme
