Index: /NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/SHARED/namelist_ref
===================================================================
--- /NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/SHARED/namelist_ref	(revision 11843)
+++ /NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/SHARED/namelist_ref	(revision 11844)
@@ -455,6 +455,6 @@
          !                       ! ad15 = velocity dependend Gamma (u* * gammat/s)  (Jenkins et al. 2010)
          !                       ! hj99 = velocity and stability dependent Gamma    (Holland et al. 1999)
-         rn_gammat0  = 1.e-4     ! gammat coefficient used in blk formula
-         rn_gammas0  = 1.e-4     ! gammas coefficient used in blk formula
+         rn_gammat0  = 1.4e-2    ! gammat coefficient used in blk formula
+         rn_gammas0  = 4.e-4    ! gammas coefficient used in blk formula
          !
          rn_htbl     =  30.      ! thickness of the top boundary layer    (Losh et al. 2008)
@@ -465,5 +465,5 @@
          !           !  file name  ! frequency (hours) ! variable  ! time interp.!  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
          !           !             !  (if <0  months)  !   name    !  (logical)  !  (T/F)  ! 'monthly' ! filename ! pairing  ! filename      !
-         sn_isfcav_fwf = 'isfmlt_cav',      -12       , 'fwflisf' ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
+         sn_isfcav_fwf = 'isfmlt_cav',      -12.      , 'fwflisf'  ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
       !
       ! ---------------- cavities parametrised -------------------------------
@@ -482,7 +482,7 @@
          sn_isfpar_zmin = 'isfmlt_par',       0        ,'sozisfmin',  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
          !* 'spe' and 'oasis' case
-         sn_isfpar_fwf = 'isfmlt_par' ,      -12       ,'fwfisf'   ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
+         sn_isfpar_fwf = 'isfmlt_par' ,      -12.      ,'sofwfisf' ,  .false.    , .true.  , 'yearly'   ,    ''    ,   ''     ,    ''
          !* 'bg03' case
-         sn_isfpar_Leff = 'isfmlt_par',       0        ,'Leff'     ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
+         sn_isfpar_Leff = 'isfmlt_par',       0.       ,'Leff'     ,  .false.    , .true.  , 'yearly'   ,    ''    ,   ''     ,    ''
       !
       ! ---------------- ice sheet coupling -------------------------------
Index: /NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/WED025/EXPREF/file_def_nemo-ice.xml
===================================================================
--- /NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/WED025/EXPREF/file_def_nemo-ice.xml	(revision 11843)
+++ /NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/WED025/EXPREF/file_def_nemo-ice.xml	(revision 11844)
@@ -17,5 +17,4 @@
        <!-- ice mask -->
        <field field_ref="icemask"          name="simsk"   />
-       <field field_ref="icemask05"        name="simsk05" />
        <field field_ref="icemask15"        name="simsk15" />
        
@@ -28,6 +27,4 @@
        <field field_ref="iceapnd"          name="siapnd" />
        <field field_ref="icevpnd"          name="sivpnd" />
-       <field field_ref="sst_m"            name="sst_m"  />
-       <field field_ref="sss_m"            name="sss_m"  />
        
        <!-- heat -->
@@ -79,14 +76,4 @@
        <field field_ref="vfxsnw"           name="vfxsnw" />
 
-       <!-- categories -->
-       <field field_ref="icemask_cat"      name="simskcat"/>
-       <field field_ref="snwthic_cat"      name="snthicat"/>
-       <field field_ref="iceconc_cat"      name="siconcat"/>
-       <field field_ref="icethic_cat"      name="sithicat"/>
-       <field field_ref="icesalt_cat"      name="sisalcat"/>
-       <field field_ref="icetemp_cat"      name="sitemcat"/>
-       <field field_ref="snwtemp_cat"      name="sntemcat"/>
-       <field field_ref="icettop_cat"      name="sitopcat"/>
-
      </file>
      
Index: /NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/WED025/EXPREF/file_def_nemo-oce.xml
===================================================================
--- /NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/WED025/EXPREF/file_def_nemo-oce.xml	(revision 11843)
+++ /NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/WED025/EXPREF/file_def_nemo-oce.xml	(revision 11844)
@@ -9,5 +9,5 @@
     -->
    
-    <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1mo" min_digits="4">
+    <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="5d" min_digits="4">
     
       <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->   
@@ -20,11 +20,6 @@
           <field field_ref="sss"          name="sos"   />
           <field field_ref="ssh"          name="zos"   />
-          <field field_ref="sst"          name="tosstd"       long_name="sea surface temperature standard deviation"         operation="instant" freq_op="5d" > sqrt( @sst2 - @sst * @sst ) </field>
-          <field field_ref="ssh"          name="zosstd"       long_name="sea surface height above geoid standard deviation"  operation="instant" freq_op="5d" > sqrt( @ssh2 - @ssh * @ssh ) </field>
-          <field field_ref="sst"          name="sstdcy"       long_name="amplitude of sst diurnal cycle"                     operation="average" freq_op="1d" > @sstmax - @sstmin </field>
 
-          <field field_ref="mldkz5"   />
           <field field_ref="mldr10_1" />
-          <field field_ref="mldr10_1"     name="mldr10_1dcy"  long_name="amplitude of mldr10_1 diurnal cycle"                operation="average" freq_op="1d" > @mldr10_1max - @mldr10_1min </field>
 
           <field field_ref="sbt"                          />
@@ -44,4 +39,5 @@
           <field field_ref="isfgammat"    name="sogammat_cav"  />
           <field field_ref="isfgammas"    name="sogammas_cav"  />
+          <field field_ref="isfustar"     name="ustar_cav"  />
 
           <!-- ice shelf tbl properties  -->
@@ -53,13 +49,16 @@
 
           <!-- ice shelf fluxes  -->
-          <field field_ref="fwfisf_cav"    name="sowflisf_cav" />
-          <field field_ref="qoceisf_cav"   name="qoceisf_cav"  />
-          <field field_ref="qlatisf_cav"   name="qlatisf_cav"  />
-          <field field_ref="qhcisf_cav"    name="qhcisf_cav"   />
+          <field field_ref="fwfisf_cav"      name="sowflisf_cav" />
+          <field field_ref="qoceisf_cav"     name="qoceisf_cav"  />
+          <field field_ref="qlatisf_cav"     name="qlatisf_cav"  />
+          <field field_ref="qhcisf_cav"      name="qhcisf_cav"   />
+          <field field_ref="qconisf"         name="qhcond_cav"   />
+          <field field_ref="fwfisf3d_cav"    name="sowflisf3d_cav" />
           
-          <field field_ref="fwfisf_par"    name="sowflisf_par" />
-          <field field_ref="qoceisf_par"   name="qoceisf_par"  />
-          <field field_ref="qlatisf_par"   name="qlatisf_par"  />
-          <field field_ref="qhcisf_par"    name="qhcisf_par"   />
+          <field field_ref="fwfisf_par"      name="sowflisf_par" />
+          <field field_ref="qoceisf_par"     name="qoceisf_par"  />
+          <field field_ref="qlatisf_par"     name="qlatisf_par"  />
+          <field field_ref="qhcisf_par"      name="qhcisf_par"   />
+          <field field_ref="fwfisf3d_par"    name="sowflisf3d_par" />
 
 	</file>
@@ -86,21 +85,4 @@
 	</file>
 
-        <file id="file15" name_suffix="_scalar" description="scalar variables" >
-          <!-- global drifts (conservation checks) -->
-          <field field_ref="bgtemper"     grid_ref="grid_1point"   name="bgtemper"    />
-          <field field_ref="bgsaline"     grid_ref="grid_1point"   name="bgsaline"    />
-          <field field_ref="bgheatco"     grid_ref="grid_1point"   name="bgheatco"    />
-          <field field_ref="bgheatfx"     grid_ref="grid_1point"   name="bgheatfx"    />
-          <field field_ref="bgsaltco"     grid_ref="grid_1point"   name="bgsaltco"    />
-          <field field_ref="bgvolssh"     grid_ref="grid_1point"   name="bgvolssh"    />
-          <field field_ref="bgvole3t"     grid_ref="grid_1point"   name="bgvole3t"    />
-
-          <!-- global surface forcings  -->
-          <field field_ref="bgfrcvol"     grid_ref="grid_1point"   name="bgfrcvol"    />
-          <field field_ref="bgfrctem"     grid_ref="grid_1point"   name="bgfrctem"    />
-          <field field_ref="bgfrchfx"     grid_ref="grid_1point"   name="bgfrchfx"    />
-          <field field_ref="bgfrcsal"     grid_ref="grid_1point"   name="bgfrcsal"    />
-        </file>
-
       </file_group> 
 
Index: /NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/WED025/EXPREF/namelist_cfg
===================================================================
--- /NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/WED025/EXPREF/namelist_cfg	(revision 11843)
+++ /NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/WED025/EXPREF/namelist_cfg	(revision 11844)
@@ -211,59 +211,61 @@
 !-----------------------------------------------------------------------
    !
-   ! ---------------- general -------------------------------
+   ! ---------------- ice shelf load -------------------------------
+   !
+   cn_isfload = 'isomip'      ! scheme to compute ice shelf load (ln_isfcav = .true. in domain_cfg.nc)
+   !
+   ! ---------------- ice shelf melt formulation -------------------------------
    !
    ln_isf = .true.            ! activate ice shelf module
-   cn_isfdir = './'           ! directory for all ice shelf input file
-   !
-   ! ---------------- cavities opened -------------------------------
-   !
-   cn_isfload = 'isomip'
-   !
-   ln_isfcav_mlt = .true.     ! ice shelf melting into the cavity
-      cn_isfcav_mlt = '3eq'   ! ice shelf melting formulation (spe/2eq/3eq/oasis)
-      !                       ! spe = fwfisf is read from a forcing field
-      !                       ! 2eq = ISOMIP  like: 2 equations formulation (Hunter et al., 2006)
-      !                       ! 3eq = ISOMIP+ like: 3 equations formulation (Asay-Davis et al., 2015)
-      !                       ! oasis = fwfisf is given by oasis and pattern by file sn_isfcav_fwf
-      !              !  cn_isfcav_mlt = 2eq or 3eq cases:
-      cn_gammablk = 'ad15'    ! scheme to compute gammat/s (spe,ad15,hj99)
-      !                       ! ad15 = velocity dependend Gamma (u* * gammat/s)  (Jenkins et al. 2010)
-      !                       ! hj99 = velocity and stability dependent Gamma    (Holland et al. 1999)
-      rn_gammat0  = 1.4e-2    ! gammat coefficient used in blk formula
-      rn_gammas0  = 4.e-4    ! gammas coefficient used in blk formula
+      cn_isfdir = './'           ! directory for all ice shelf input file
       !
-      rn_htbl     =  30.      ! thickness of the top boundary layer    (Losh et al. 2008)
-      !                       ! 0 => thickness of the tbl = thickness of the first wet cell
+      ! ---------------- cavities opened -------------------------------
       !
-      !* 'spe' and 'oasis' case
-      !___________!_____________!___________________!___________!_____________!_________!___________!__________!__________!_______________!
-      !           !  file name  ! frequency (hours) ! variable  ! time interp.!  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
-      !           !             !  (if <0  months)  !   name    !  (logical)  !  (T/F)  ! 'monthly' ! filename ! pairing  ! filename      !
-      sn_isfcav_fwf = 'isfmlt_cav',      -12.      , 'fwflisf' ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
-   !
-   ! ---------------- cavities parametrised -------------------------------
-   !
-   ln_isfpar_mlt = .true.    ! ice shelf melting parametrised
-      cn_isfpar_mlt = 'spe'  ! ice shelf melting parametrisation (spe/bg03/oasis)
-      !                      ! spe   = fwfisf is read from a forcing field
-      !                      ! bg03  = melt computed using Beckmann and Goosse parametrisation
-      !                      ! oasis = fwfisf is given by oasis and pattern by file sn_isfpar_fwf
+      ln_isfcav_mlt = .true.     ! ice shelf melting into the cavity
+         cn_isfcav_mlt = '3eq'   ! ice shelf melting formulation (spe/2eq/3eq/oasis)
+         !                       ! spe = fwfisf is read from a forcing field
+         !                       ! 2eq = ISOMIP  like: 2 equations formulation (Hunter et al., 2006)
+         !                       ! 3eq = ISOMIP+ like: 3 equations formulation (Asay-Davis et al., 2015)
+         !                       ! oasis = fwfisf is given by oasis and pattern by file sn_isfcav_fwf
+         !              !  cn_isfcav_mlt = 2eq or 3eq cases:
+         cn_gammablk = 'ad15'    ! scheme to compute gammat/s (spe,ad15,hj99)
+         !                       ! ad15 = velocity dependend Gamma (u* * gammat/s)  (Jenkins et al. 2010)
+         !                       ! hj99 = velocity and stability dependent Gamma    (Holland et al. 1999)
+         rn_gammat0  = 1.4e-2    ! gammat coefficient used in blk formula
+         rn_gammas0  = 4.e-4    ! gammas coefficient used in blk formula
+         !
+         rn_htbl     =  30.      ! thickness of the top boundary layer    (Losh et al. 2008)
+         !                       ! 0 => thickness of the tbl = thickness of the first wet cell
+         !
+         !* 'spe' and 'oasis' case
+         !___________!_____________!___________________!___________!_____________!_________!___________!__________!__________!_______________!
+         !           !  file name  ! frequency (hours) ! variable  ! time interp.!  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+         !           !             !  (if <0  months)  !   name    !  (logical)  !  (T/F)  ! 'monthly' ! filename ! pairing  ! filename      !
+         sn_isfcav_fwf = 'isfmlt_cav',      -12.      , 'fwflisf'  ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
       !
-      !* all cases
-      !___________!_____________!___________________!___________!_____________!_________!___________!__________!__________!_______________!
-      !           !  file name  ! frequency (hours) ! variable  ! time interp.!  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
-      !           !             !  (if <0  months)  !   name    !  (logical)  !  (T/F)  ! 'monthly' ! filename ! pairing  ! filename      !
-      sn_isfpar_zmax = 'isfmlt_par',      -12.      , 'sozisfmax' ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
-      sn_isfpar_zmin = 'isfmlt_par',      -12.      , 'sozisfmin' ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
-      !* 'spe' and 'oasis' case
-      sn_isfpar_fwf = 'isfmlt_par' ,      -12.      , 'sofwfisf' ,  .false.    , .true.  , 'yearly'   ,    ''    ,   ''     ,    ''
-      !* '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.
+      ! ---------------- cavities parametrised -------------------------------
+      !
+      ln_isfpar_mlt = .true.    ! ice shelf melting parametrised
+         cn_isfpar_mlt = 'spe'  ! ice shelf melting parametrisation (spe/bg03/oasis)
+         !                      ! spe   = fwfisf is read from a forcing field
+         !                      ! bg03  = melt computed using Beckmann and Goosse parametrisation
+         !                      ! oasis = fwfisf is given by oasis and pattern by file sn_isfpar_fwf
+         !
+         !* all cases
+         !___________!_____________!___________________!___________!_____________!_________!___________!__________!__________!_______________!
+         !           !  file name  ! frequency (hours) ! variable  ! time interp.!  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+         !           !             !  (if <0  months)  !   name    !  (logical)  !  (T/F)  ! 'monthly' ! filename ! pairing  ! filename      !
+         sn_isfpar_zmax = 'isfmlt_par',      -12.      , 'sozisfmax' ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
+         sn_isfpar_zmin = 'isfmlt_par',      -12.      , 'sozisfmin' ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
+         !* 'spe' and 'oasis' case
+         sn_isfpar_fwf = 'isfmlt_par' ,      -12.      , 'sofwfisf' ,  .false.    , .true.  , 'yearly'   ,    ''    ,   ''     ,    ''
+         !* '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.
 /
 !-----------------------------------------------------------------------
@@ -595,5 +597,4 @@
 &namhsb        !  Heat and salt budgets                                 (default: OFF)
 !-----------------------------------------------------------------------
-   ln_diahsb  = .true.    !  check the heat and salt budgets (T) or not (F)
 /
 !-----------------------------------------------------------------------
@@ -664,4 +665,25 @@
 &namctl        !   Control prints                                       (default: OFF)
 !-----------------------------------------------------------------------
+   ln_ctl = .FALSE.                 ! Toggle all report printing on/off (T/F); Ignored if sn_cfctl%l_config is T
+     sn_cfctl%l_config = .TRUE.     ! IF .true. then control which reports are written with the following
+       sn_cfctl%l_runstat = .FALSE. ! switches and which areas produce reports with the proc integer settings.
+       sn_cfctl%l_trcstat = .FALSE. ! The default settings for the proc integers should ensure
+       sn_cfctl%l_oceout  = .FALSE. ! that  all areas report.
+       sn_cfctl%l_layout  = .FALSE. !
+       sn_cfctl%l_mppout  = .FALSE. !
+       sn_cfctl%l_mpptop  = .FALSE. !
+       sn_cfctl%procmin   = 0       ! Minimum area number for reporting [default:0]
+       sn_cfctl%procmax   = 1000000 ! Maximum area number for reporting [default:1000000]
+       sn_cfctl%procincr  = 1       ! Increment for optional subsetting of areas [default:1]
+       sn_cfctl%ptimincr  = 1       ! Timestep increment for writing time step progress info
+   nn_print    =    0      !  level of print (0 no extra print)
+   nn_ictls    =    0      !  start i indice of control sum (use to compare mono versus
+   nn_ictle    =    0      !  end   i indice of control sum        multi processor runs
+   nn_jctls    =    0      !  start j indice of control               over a subdomain)
+   nn_jctle    =    0      !  end   j indice of control
+   nn_isplt    =    1      !  number of processors in i-direction
+   nn_jsplt    =    1      !  number of processors in j-direction
+   ln_timing   = .true.    !  timing by routine write out in timing.output file
+   ln_diacfl   = .false.   !  CFL diagnostics write out in cfl_diagnostics.ascii
 /
 !-----------------------------------------------------------------------
Index: /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/dynzdf.F90
===================================================================
--- /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/dynzdf.F90	(revision 11843)
+++ /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/dynzdf.F90	(revision 11844)
@@ -428,5 +428,5 @@
                   ikv = mikv(ji,jj)       ! (first wet ocean u- and v-points)
                   ze3va =  ( 1._wp - r_vvl ) * e3v_n(ji,jj,ikv) + r_vvl * e3v_a(ji,jj,ikv)   ! after scale factor at T-point
-                  zwd(ji,jj,iku) = zwd(ji,jj,iku) - r2dt * 0.5*( rCdU_top(ji+1,jj)+rCdU_top(ji,jj) ) / ze3va
+                  zwd(ji,jj,ikv) = zwd(ji,jj,ikv) - r2dt * 0.5*( rCdU_top(ji+1,jj)+rCdU_top(ji,jj) ) / ze3va
                END DO
             END DO
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 11843)
+++ /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isf.F90	(revision 11844)
@@ -31,4 +31,5 @@
    CHARACTER(LEN=256), PUBLIC :: cn_isfdir
    LOGICAL           , PUBLIC :: ln_isf
+   LOGICAL           , PUBLIC :: ln_isfdebug=.TRUE.
    !
    ! 0.2 -------- ice shelf cavity opened namelist parameter -------------
Index: /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcav.F90
===================================================================
--- /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcav.F90	(revision 11843)
+++ /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcav.F90	(revision 11844)
@@ -15,4 +15,5 @@
    USE oce            ! ocean dynamics and tracers
    USE isf            ! ice shelf public variables
+   USE isfutils
    USE isftbl         ! ice shelf top boundary layer properties
    USE isfcavmlt      ! ice shelf melt formulation
@@ -139,4 +140,10 @@
       ptsc(:,:,jp_tem) = - zqh(:,:) * r1_rau0_rcp
       !
+      IF ( ln_isfdebug ) THEN
+         CALL debug('isf_cav: ptsc T',ptsc(:,:,1))
+         CALL debug('isf_cav: ptsc S',ptsc(:,:,2))
+         CALL debug('isf_cav: pqfwf fwf',pqfwf(:,:))
+      END IF
+      !
    END SUBROUTINE isf_cav
 
Index: /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavgam.F90
===================================================================
--- /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavgam.F90	(revision 11843)
+++ /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavgam.F90	(revision 11844)
@@ -12,4 +12,5 @@
    USE oce            ! ocean dynamics and tracers
    USE isf
+   USE isfutils
    USE isftbl
    USE dom_oce        ! ocean space and time domain
@@ -91,4 +92,9 @@
       CALL iom_put('isfgammas', pgs(:,:))
       !
+      IF (ln_isfdebug) THEN
+         CALL debug( 'isfcav_gam pgt:', pgt(:,:) )
+         CALL debug( 'isfcav_gam pgs:', pgs(:,:) )
+      END IF
+      !
    END SUBROUTINE isfcav_gammats
    !
Index: /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavmlt.F90
===================================================================
--- /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavmlt.F90	(revision 11843)
+++ /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavmlt.F90	(revision 11844)
@@ -13,4 +13,5 @@
    USE oce            ! ocean dynamics and tracers
    USE isf            ! ice shelf public variables
+   USE isfutils       ! ice shelf debug subroutine
    USE dom_oce        ! ocean space and time domain
    USE phycst         ! physical constants
@@ -74,4 +75,10 @@
       END SELECT
       !
+      IF (ln_isfdebug) THEN
+         CALL debug( 'isfcav_mlt:', pqhc (:,:) )
+         CALL debug( 'isfcav_mlt:', pqoce(:,:) )
+         CALL debug( 'isfcav_mlt:', pqfwf(:,:) )
+      END IF
+      !
    END SUBROUTINE isfcav_mlt
 
Index: /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isftbl.F90
===================================================================
--- /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isftbl.F90	(revision 11843)
+++ /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isftbl.F90	(revision 11844)
@@ -16,4 +16,6 @@
    USE dom_oce ! vertical scale factor
    USE lbclnk  ! lbc_lnk subroutine
+   USE isfutils
+   USE isf
 
    IMPLICIT NONE
@@ -48,8 +50,9 @@
       REAL(wp), DIMENSION(jpi,jpj), OPTIONAL, INTENT(in   ) :: pfrac         ! fraction of bottom cell affected by tbl
       !!--------------------------------------------------------------------
-      INTEGER ::   ji, jj                   ! loop index
-      INTEGER , DIMENSION(jpi,jpj) :: ikbot ! bottom level of the tbl
-      REAL(wp), DIMENSION(jpi,jpj) :: zhtbl ! thickness of the tbl
-      REAL(wp), DIMENSION(jpi,jpj) :: zfrac ! thickness of the tbl
+      INTEGER ::   ji, jj                     ! loop index
+      INTEGER , DIMENSION(jpi,jpj) :: ikbot   ! bottom level of the tbl
+      REAL(wp), DIMENSION(jpi,jpj) :: zvarout ! 2d average of pvarin
+      REAL(wp), DIMENSION(jpi,jpj) :: zhtbl   ! thickness of the tbl
+      REAL(wp), DIMENSION(jpi,jpj) :: zfrac   ! thickness of the tbl
       !!--------------------------------------------------------------------
       ! 
@@ -64,15 +67,17 @@
          !
          ! compute tbl property at U point
-         CALL isf_tbl_avg( miku, ikbot, zhtbl, zfrac, e3u_n, pvarin, pvarout )
+         CALL isf_tbl_avg( miku, ikbot, zhtbl, zfrac, e3u_n, pvarin, zvarout )
+         !
+         ! check if needed (probably yes)
+         CALL lbc_lnk('sbcisf', pvarout,'U',-1.)
          !
          ! compute tbl property at T point
+         pvarout(1,:) = 0._wp
          DO jj = 1, jpj
             DO ji = 2, jpi
-               pvarout(ji,jj) = 0.5_wp * (pvarout(ji,jj) + pvarout(ji-1,jj))
+               pvarout(ji,jj) = 0.5_wp * (zvarout(ji,jj) + zvarout(ji-1,jj))
             END DO
          END DO
-         !
-         ! check if needed (probably yes)
-         CALL lbc_lnk('sbcisf', pvarout,'T',-1.)
+         ! lbclnk not needed as a final communication is done after the computation of fwf
          ! 
       CASE ( 'V' )
@@ -85,15 +90,17 @@
          !
          ! compute tbl property at V point
-         CALL isf_tbl_avg( mikv, ikbot, zhtbl, zfrac, e3v_n, pvarin, pvarout )
+         CALL isf_tbl_avg( mikv, ikbot, zhtbl, zfrac, e3v_n, pvarin, zvarout )
+         !
+         ! check if needed (probably yes)
+         CALL lbc_lnk('sbcisf', pvarout,'V',-1.)
          !
          ! pvarout is an averaging of wet point
+         pvarout(:,1) = 0._wp
          DO jj = 2, jpj
             DO ji = 1, jpi
-               pvarout(ji,jj) = 0.5_wp * (pvarout(ji,jj) + pvarout(ji,jj-1))
+               pvarout(ji,jj) = 0.5_wp * (zvarout(ji,jj) + zvarout(ji,jj-1))
             END DO
          END DO
-         !
-         ! check if needed (probably yes)
-         CALL lbc_lnk('sbcisf', pvarout,'T',-1.)
+         ! lbclnk not needed as a final communication is done after the computation of fwf
          !
       CASE ( 'T' )
@@ -103,4 +110,6 @@
          !
       END SELECT
+      !
+      IF (ln_isfdebug) CALL debug('isf_tbl pvarout:',pvarout)
       !
    END SUBROUTINE isf_tbl
Index: /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfutils.F90
===================================================================
--- /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfutils.F90	(revision 11843)
+++ /NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfutils.F90	(revision 11844)
@@ -65,11 +65,12 @@
       !!--------------------------------------------------------------------
       !
-      zsum = glob_sum_full( 'debug', pvar(:,:) )
-      zmin = MINVAL( pvar(:,:) ) ; CALL mpp_min( 'debug', zmin ) ! min over the global domain
-      zmax = MAXVAL( pvar(:,:) ) ; CALL mpp_max( 'debug', zmax ) ! max over the global domain
+      zsum = glob_sum( 'debug', pvar(:,:) )
+      zmin = glob_min( 'debug', pvar(:,:) )
+      zmax = glob_max( 'debug', pvar(:,:) )
       !
-      WRITE(numout,*) TRIM(cdtxt),' (min, max, sum) : ',zmin, zmax, zsum
+      IF (lwp) WRITE(numout,*) TRIM(cdtxt),' (min, max, sum) : ',zmin, zmax, zsum
       !
-      FLUSH(numout)
+      CALL FLUSH(numout)
+      !
    END SUBROUTINE debug2d
 
@@ -89,11 +90,11 @@
       !!--------------------------------------------------------------------
       !
-      zsum = glob_sum_full( 'debug', pvar(:,:,:) )
-      zmin = MINVAL( pvar(:,:,:) ) ; CALL mpp_min( 'debug', zmin ) ! min over the global domain
-      zmax = MAXVAL( pvar(:,:,:) ) ; CALL mpp_max( 'debug', zmax ) ! max over the global domain
+      zsum = glob_sum( 'debug', pvar(:,:,:) )
+      zmin = glob_min( 'debug', pvar(:,:,:) )
+      zmax = glob_max( 'debug', pvar(:,:,:) )
       !
-      WRITE(numout,*) TRIM(cdtxt),' (min, max, sum) : ',zmin, zmax, zsum
+      IF (lwp) WRITE(numout,*) TRIM(cdtxt),' (min, max, sum) : ',zmin, zmax, zsum
       !
-      FLUSH(numout)
+      CALL FLUSH(numout)
       !
    END SUBROUTINE debug3d
