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 11487)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/cfgs/WED025/EXPREF/namelist_cfg	(revision 11488)
@@ -37,7 +37,7 @@
    cn_exp      =  'WED025' !  experience name
    nn_it000    =   1       !  first time step
-   nn_itend    =   1306920 !  last  time step (std 5475)
+   nn_itend    =  26280    !  last  time step (std 5475)
    nn_date0    = 19760301  !  date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1)
-   ln_rstart   = .true.    !  start from rest (F) or from a restart file (T)
+   ln_rstart   = .false.   !  start from rest (F) or from a restart file (T)
       nn_rstctl   =    2      !  restart control ==> activated only if ln_rstart=T
 /
@@ -45,5 +45,5 @@
 &namdom        !   time and space domain
 !-----------------------------------------------------------------------
-   rn_rdt      = 720.      !  time step for the dynamics and tracer
+   rn_rdt      = 1200.     !  time step for the dynamics and tracer
    ln_meshmask = .true.    !  =T create a mesh file
 /
@@ -51,4 +51,7 @@
 &namcfg        !   parameters of the configuration                      (default: use namusr_def in namelist_cfg)
 !-----------------------------------------------------------------------
+   ln_read_cfg = .true.    !  (=T) read the domain configuration file
+      !                    !  (=F) user defined configuration           (F => create/check namusr_def)
+      cn_domcfg = "domain_cfg"  ! domain configuration filename
 /
 !-----------------------------------------------------------------------
@@ -63,6 +66,6 @@
    !           !  file name              ! frequency (hours) ! variable  ! time interp.!  clim  ! 'yearly'/ ! weights filename ! rotation ! land/sea mask !
    !           !                         !  (if <0  months)  !   name    !   (logical) !  (T/F) ! 'monthly' !                  ! pairing  !    filename   !
-   sn_tem = 'inputs/dta_tem_WED025'      ,         -1        , 'votemper',   .true.   , .false., 'monthly' ,    ''            ,    ''    ,    ''
-   sn_sal = 'inputs/dta_sal_WED025'      ,         -1        , 'vosaline',   .true.   , .false., 'monthly' ,    ''            ,    ''    ,    ''
+   sn_tem = 'dta_temp_WED025'            ,         -12       , 'votemper',   .true.    , .true. , 'yearly'  ,    ''            ,    ''    ,    ''
+   sn_sal = 'dta_sal_WED025'             ,         -12       , 'vosaline',   .true.    , .true. , 'yearly'  ,    ''            ,    ''    ,    ''
 /
 !-----------------------------------------------------------------------
@@ -146,13 +149,13 @@
    !           !  file name              ! frequency (hours) ! variable  ! time interp.!  clim  ! 'yearly'/ !       weights filename               ! rotation ! land/sea mask !
    !           !                         !  (if <0  months)  !   name    !   (logical) !  (T/F) ! 'monthly' !                                      ! pairing  !    filename   !
-   sn_wndi     = 'u10_core'              ,         6         , 'U_10_MOD',   .true.    , .false. , 'yearly'  , 'weights_bicubic.nc'                , 'Uwnd'   , ''
-   sn_wndj     = 'v10_core'              ,         6         , 'V_10_MOD',   .true.    , .false. , 'yearly'  , 'weights_bicubic.nc'                , 'Vwnd'   , ''
-   sn_qsr      = 'qsw_core'              ,        24         , 'SWDN_MOD',   .false.   , .false. , 'yearly'  , 'weights_bilin.nc'                  , ''       , ''
-   sn_qlw      = 'qlw_core'              ,        24         , 'LWDN_MOD',   .false.   , .false. , 'yearly'  , 'weights_bilin.nc'                  , ''       , ''
-   sn_tair     = 't10_core'              ,         6         , 'T_10_MOD',   .true.    , .false. , 'yearly'  , 'weights_bilin.nc'                  , ''       , ''
-   sn_humi     = 'q10_core'              ,         6         , 'Q_10_MOD',   .true.    , .false. , 'yearly'  , 'weights_bilin.nc'                  , ''       , ''
-   sn_prec     = 'precip_core'           ,        -1         , 'TPRECIP',    .true.    , .false. , 'yearly'  , 'weights_bilin.nc'                  , ''       , ''
-   sn_snow     = 'snow_core'             ,        -1         , 'SNOW'    ,   .true.    , .false. , 'yearly'  , 'weights_bilin.nc'                  , ''       , ''
-   sn_slp      = 'slp_core'              ,         6         , 'SLP'     ,   .true.    , .true.  , 'yearly'  , 'weights_bilin.nc'                  , ''       , ''
+   sn_wndi     = 'u10_core'              ,         6         , 'U_10_MOD',   .true.    , .false. , 'yearly'  , 'weights_bicubic_core.nc'           , 'Uwnd'   , ''
+   sn_wndj     = 'v10_core'              ,         6         , 'V_10_MOD',   .true.    , .false. , 'yearly'  , 'weights_bicubic_core.nc'           , 'Vwnd'   , ''
+   sn_qsr      = 'qsw_core'              ,        24         , 'SWDN_MOD',   .false.   , .false. , 'yearly'  , 'weights_bilin_core.nc'             , ''       , ''
+   sn_qlw      = 'qlw_core'              ,        24         , 'LWDN_MOD',   .false.   , .false. , 'yearly'  , 'weights_bilin_core.nc'             , ''       , ''
+   sn_tair     = 't10_core'              ,         6         , 'T_10_MOD',   .true.    , .false. , 'yearly'  , 'weights_bilin_core.nc'             , ''       , ''
+   sn_humi     = 'q10_core'              ,         6         , 'Q_10_MOD',   .true.    , .false. , 'yearly'  , 'weights_bilin_core.nc'             , ''       , ''
+   sn_prec     = 'precip_core'           ,        -1         , 'TPRECIP',    .true.    , .false. , 'yearly'  , 'weights_bilin_core.nc'             , ''       , ''
+   sn_snow     = 'snow_core'             ,        -1         , 'SNOW'    ,   .true.    , .false. , 'yearly'  , 'weights_bilin_core.nc'             , ''       , ''
+   sn_slp      = 'slp_core'              ,         6         , 'SLP'     ,   .true.    , .false. , 'yearly'  , 'weights_bilin_core.nc'             , ''       , ''
 /
 !-----------------------------------------------------------------------
@@ -163,28 +166,4 @@
 &namsbc_sas    !   Stand-Alone Surface module: ocean data               (SAS_SRC  only)
 !-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
-&namsbc_core   !   namsbc_core  CORE bulk formulae
-!-----------------------------------------------------------------------
-!              !  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_wndi     = 'inputs/u10_core'    ,         6         , 'U_10_MOD',   .true.    , .false. , 'yearly'  , 'weights_bicubic.nc'           , 'Uwnd'   , ''
-   sn_wndj     = 'inputs/v10_core'    ,         6         , 'V_10_MOD',   .true.    , .false. , 'yearly'  , 'weights_bicubic.nc'           , 'Vwnd'   , ''
-   sn_qsr      = 'inputs/qsw_core'    ,        24         , 'SWDN_MOD',   .false.    , .false. , 'yearly'  , 'weights_bilin.nc'             , ''       , ''
-   sn_qlw      = 'inputs/qlw_core'    ,        24         , 'LWDN_MOD',   .false.    , .false. , 'yearly'  , 'weights_bilin.nc'             , ''       , ''
-   sn_tair     = 'inputs/t10_core'    ,         6         , 'T_10_MOD',   .true.    , .false. , 'yearly'  , 'weights_bilin.nc'             , ''       , ''
-   sn_humi     = 'inputs/q10_core'    ,         6         , 'Q_10_MOD',   .true.    , .false. , 'yearly'  , 'weights_bilin.nc'             , ''       , ''
-   sn_prec     = 'inputs/precip_core' ,        -1         , 'TPRECIP',    .true.    , .false. , 'yearly'  , 'weights_bilin.nc'             , ''       , ''
-   sn_snow     = 'inputs/snow_core'   ,        -1         , 'SNOW'    ,   .true.    , .false. , 'yearly'  , 'weights_bilin.nc'             , ''       , ''
-   sn_tdif     = 'inputs/taudif_core' ,        24         , 'taudif'  ,   .false.    , .true. , 'yearly'  , 'weights_bilin.nc'             , ''       , ''
-
-   cn_dir      = './'      !  root directory for the location of the bulk files
-   ln_taudif   = .false.   !  HF tau contribution: use "mean of stress module - module of the mean stress" data
-   rn_zqt      = 10.        !  Air temperature and humidity reference height (m)
-   rn_zu       = 10.        !  Wind vector reference height (m)
-   rn_pfac     = 1.        !  multiplicative factor for precipitation (total & snow)
-   rn_efac     = 1.        !  multiplicative factor for evaporation (0. or 1.)
-   rn_vfac     = 0.        !  multiplicative factor for ocean/ice velocity
-                           !  in the calculation of the wind stress (0.=absolute winds or 1.=relative winds)
 /
 !-----------------------------------------------------------------------
@@ -200,4 +179,9 @@
    nn_chldta   =      1    !  RGB : 2D Chl data (=1), 3D Chl data (=2) or cst value (=0)
 
+   cn_dir      = './'      !  root directory for the chlorophyl data location
+   !___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________!
+   !           !  file name              ! frequency (hours) ! variable  ! time interp.!  clim  ! 'yearly'/ ! weights filename ! rotation ! land/sea mask !
+   !           !                         !  (if <0  months)  !   name    !   (logical) !  (T/F) ! 'monthly' !                  ! pairing  !    filename   !
+   sn_chl      ='chlorophyll_WED025'     ,        -1         , 'CHLA'    ,   .true.    , .true. , 'yearly'  , ''               , ''       , ''
 /
 !-----------------------------------------------------------------------
@@ -218,9 +202,57 @@
    !           !  file name              ! frequency (hours) ! variable  ! time interp.!  clim  ! 'yearly'/ ! weights filename ! rotation ! land/sea mask !
    !           !                         !  (if <0  months)  !   name    !   (logical) !  (T/F) ! 'monthly' !                  ! pairing  !    filename   !
-   sn_rnf      = 'inputs/runofficebergWED025',    -1         , 'runoff'  ,   .true.    , .false. , 'yearly' , ''               , ''       , ''
+   sn_rnf      = 'runoff_WED025'         ,  -1               , 'runoff'  ,   .true.    , .false., 'yearly'  , ''               , ''       , ''
 /
 !-----------------------------------------------------------------------
 &namsbc_apr    !   Atmospheric pressure used as ocean forcing           (ln_apr_dyn =T)
 !-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namisf       !  Top boundary layer (ISF)                              (ln_isf = T .AND. ln_isfcav: read (ln_read_cfg=T) 
+!-----------------------------------------------------------------------                         or set or usr_def_zgr )
+   cn_isfdir = './'
+   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
+      !              !  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'  ,    ''    ,   ''     ,    ''
+
+
+   ln_isfpar_mlt = .false.   ! ice shelf melting parametrised
+      cn_isfpar_mlt = 'spe'  ! ice shelf melting parametrisation (spe/bg03/oasis)
+      !
+      !* 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',       0        ,'sozisfmax',  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
+      sn_isfpar_zmin = 'isfmlt_par',       0        ,'sozisfmin',  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
+      !* 'spe' and 'oasis' case
+      sn_isfpar_fwf = 'isfmlt_par' ,      -12       ,'fwfisf'   ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
+      !* 'bg03' case
+      sn_isfpar_Leff = 'isfmlt_par',       0        ,'Leff'     ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    ''
+
+   
+   ln_isfcpl = .false.
+      nn_drown       = 10        ! number of iteration of the extrapolation loop (fill the new wet cells)
+      ln_isfcpl_cons = .false.
 /
 !-----------------------------------------------------------------------
@@ -257,9 +289,15 @@
 &nam_tide      !   tide parameters                                      (default: OFF)
 !-----------------------------------------------------------------------
+   ln_tide     = .true.       ! Activate tides
+      ln_tide_pot   = .false.               !  use tidal potential forcing
+      clname(1) = 'M2'  !  name of constituent - all tidal components must be set in namelist_cfg
+      clname(2) = 'S2'
+      clname(3) = 'K1'
+      clname(4) = 'O1'
 /
 !-----------------------------------------------------------------------
 &nambdy        !  unstructured open boundaries                          (default: OFF)
 !-----------------------------------------------------------------------
-   ln_bdy         = .false.   !  Use unstructured open boundaries
+   ln_bdy         = .true.    !  Use unstructured open boundaries
    nb_bdy         = 1         !  number of open boundary sets
    ln_coords_file = .true.    !  =T : read bdy coordinates from file
@@ -278,6 +316,6 @@
    nn_tra_dta    =  1         !  = 0, bdy data are equal to the initial state
    !                          !  = 1, bdy data are read in 'bdydata   .nc' files
-   cn_ice_lim      =  'frs'   !
-   nn_ice_lim_dta  =  1       !  = 0, bdy data are equal to the initial state
+   cn_ice        =  'frs'     !
+   nn_ice_dta    =  1         !  = 0, bdy data are equal to the initial state
    !                          !  = 1, bdy data are read in 'bdydata   .nc' files
    rn_ice_tem    = 267.0      !  si3 only: arbitrary temperature of incoming sea ice
@@ -292,5 +330,5 @@
    ln_full_vel = .false.      !  ???
 
-   cn_dir      = 'bdydta/'    !  root directory for the BDY data location
+   cn_dir      = './'    !  root directory for the BDY data location
    !___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________!
    !           !  file name              ! frequency (hours) ! variable  ! time interp.!  clim  ! 'yearly'/ ! weights filename ! rotation ! land/sea mask !
@@ -304,12 +342,12 @@
    bn_sal      =    'bdyT_tra_WED025'    ,         -1        , 'vosaline' ,     .true. , .false., 'yearly'  ,    ''            ,   ''     ,     ''
 !* for si3
-    bn_a_i     =    'bdyT_ice_WED025'    ,         -1        , 'ileadfra' ,     .true. , .false., 'yearly'  ,    ''            ,   ''     ,     ''
-    bn_ht_i    =    'bdyT_ice_WED025'    ,         -1        , 'iicethic' ,     .true. , .false., 'yearly'  ,    ''            ,   ''     ,     ''
-    bn_ht_s    =    'bdyT_ice_WED025'    ,         -1        , 'isnowthi' ,     .true. , .false., 'yearly'  ,    ''            ,   ''     ,     ''
+   bn_a_i      =    'bdyT_ice_WED025'    ,         -1        , 'ileadfra' ,     .true. , .false., 'yearly'  ,    ''            ,   ''     ,     ''
+   bn_h_i      =    'bdyT_ice_WED025'    ,         -1        , 'iicethic' ,     .true. , .false., 'yearly'  ,    ''            ,   ''     ,     ''
+   bn_h_s      =    'bdyT_ice_WED025'    ,         -1        , 'isnowthi' ,     .true. , .false., 'yearly'  ,    ''            ,   ''     ,     ''
 /
 !-----------------------------------------------------------------------
 &nambdy_tide   !  tidal forcing at open boundaries                      (default: OFF)
 !-----------------------------------------------------------------------
-   filtide          = 'inputs/bdytide_WED025_'         !  file name root of tidal forcing files
+   filtide          = 'bdytide_WED025_'         !  file name root of tidal forcing files
 /
 
@@ -332,8 +370,10 @@
 &namdrg_top    !   TOP friction                                         (ln_OFF =F & ln_isfcav=T)
 !-----------------------------------------------------------------------
+   rn_Cd0      =  2.5e-3    !  drag coefficient [-]
 /
 !-----------------------------------------------------------------------
 &namdrg_bot    !   BOTTOM friction                                      (ln_OFF =F)
 !-----------------------------------------------------------------------
+   rn_Cd0      =  2.5e-3    !  drag coefficient [-]
 /
 !-----------------------------------------------------------------------
@@ -440,4 +480,5 @@
 !-----------------------------------------------------------------------
    ln_dynspg_ts   = .true.   ! split-explicit free surface
+/
 !-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum                        (default: NO selection)
@@ -508,4 +549,8 @@
 /
 !-----------------------------------------------------------------------
+&namzdf_osm    !   OSM vertical diffusion                               (ln_zdfosm =T)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
 &namzdf_iwm    !    internal wave-driven mixing parameterization        (ln_zdfiwm =T)
 !-----------------------------------------------------------------------
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 11487)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavgam.F90	(revision 11488)
@@ -111,5 +111,5 @@
       !
       ! compute ustar (AD15 eq. 27)
-      zustar(:,:) = SQRT( pCd(:,:) * ( putbl(:,:) * putbl(:,:) + pvtbl(:,:) * pvtbl(:,:) + pke2 ) )
+      zustar(:,:) = SQRT( pCd(:,:) * ( putbl(:,:) * putbl(:,:) + pvtbl(:,:) * pvtbl(:,:) + pke2 ) ) * mskisf_cav(:,:)
       !
       ! Compute 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 11487)
+++ NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavmlt.F90	(revision 11488)
@@ -137,5 +137,5 @@
       !
       ! thermal driving
-      zthd (:,:) = pttbl(:,:) - ztfrz(:,:)
+      zthd (:,:) = ( pttbl(:,:) - ztfrz(:,:) ) * mskisf_cav(:,:)
       !
       ! compute ocean-ice heat flux and then derive fwf assuming that ocean heat flux equal latent heat
@@ -211,5 +211,5 @@
             !
             ! thermal driving
-            zthd(ji,jj) = pttbl(ji,jj) - ztfrz(ji,jj)
+            zthd(ji,jj) = ( pttbl(ji,jj) - ztfrz(ji,jj) )
             !
             ! compute the upward water and heat flux (eq. 24 and eq. 26)
@@ -218,5 +218,5 @@
             pqhc (ji,jj) = rcp      * pqfwf(ji,jj) * ztfrz(ji,jj)                             ! heat content   flux (> 0 out)
             !
-            zqcon(ji,jj) = zeps3 * ( ztfrz(ji,jj) - rtsurf )                                  ! conductive flux through the ice (> 0 out)
+            zqcon(ji,jj) = zeps3 * ( ztfrz(ji,jj) - rtsurf )
             !
          END DO
@@ -224,8 +224,8 @@
       !
       ! output conductive heat flux through the ice
-      CALL iom_put('qconisf', zqcon)
+      CALL iom_put('qconisf', zqcon(:,:) * mskisf_cav(:,:) )
       !
       ! output thermal driving
-      CALL iom_put('isfthermald_cav', zthd)
+      CALL iom_put('isfthermald_cav', zthd(:,:) * mskisf_cav(:,:) )
       !
    END SUBROUTINE isfcav_mlt_3eq
