Index: NEMO/trunk/doc/latex/NEMO/main/bibliography.bib
===================================================================
--- NEMO/trunk/doc/latex/NEMO/main/bibliography.bib	(revision 14302)
+++ NEMO/trunk/doc/latex/NEMO/main/bibliography.bib	(revision 14303)
@@ -119,4 +119,16 @@
   issn          = "0148-0227",
   doi           = "10.1029/2001jc000922"
+}
+
+@Article{         Asaydavis2016,
+  author        = {Asay-Davis, X. S. and Cornford, S. L. and Durand, G. and Galton-Fenzi, B. K. and Gladstone, R. M. and Gudmundsson, G. H. and Hattermann, T. and Holland, D. M. and Holland, D. and Holland, P. R. and Martin, D. F. and Mathiot, P. and Pattyn, F. and Seroussi, H.},
+  title         = {Experimental design for three interrelated marine ice sheet and ocean model intercomparison projects: MISMIP v. 3 (MISMIP$+$), ISOMIP v. 2 (ISOMIP$+$) and MISOMIP v. 1 (MISOMIP1)},
+  journal       = {Geoscientific Model Development},
+  volume        = {9},
+  year          = {2016},
+  number        = {7},
+  pages         = {2471--2497},
+  url           = {https://www.geosci-model-dev.net/9/2471/2016/},
+  doi           = {10.5194/gmd-9-2471-2016}
 }
 
@@ -878,4 +890,16 @@
 }
 
+@Article{         favier2019,
+  author        = {Favier, L. and Jourdain, N. C. and Jenkins, A. and Merino, N. and Durand, G. and Gagliardini, O. and Gillet-Chaulet, F. and Mathiot, P.},
+  title         = {Assessment of sub-shelf melting parameterisations using the ocean--ice-sheet coupled model NEMO(v3.6)--Elmer/Ice(v8.3)},
+  journal       = {Geoscientific Model Development},
+  volume        = {12},
+  year          = {2019},
+  number        = {6},
+  pages         = {2255--2283},
+  url           = {https://www.geosci-model-dev.net/12/2255/2019/},
+  doi           = {10.5194/gmd-12-2255-2019}
+}
+
 @article{         flather_JPO94,
   title         = "A storm surge prediction model for the northern Bay of
@@ -1186,4 +1210,17 @@
 }
 
+@article{         grosfeld1997,
+author          = {Grosfeld, K. and Gerdes, R. and Determann, J.},
+title           = {Thermohaline circulation and interaction between ice shelf cavities and the adjacent open ocean},
+journal         = {Journal of Geophysical Research: Oceans},
+
+volume          = {102},
+number          = {C7},
+pages           = {15595-15610},
+doi             = {10.1029/97JC00891},
+url             = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/97JC00891},
+year            = {1997}
+}
+
 @article{         guilyardi.madec.ea_CD01,
   title         = "The role of lateral ocean physics in the upper ocean
@@ -1414,4 +1451,29 @@
   issn          = "0148-0227",
   doi           = "10.1029/91jc01842"
+}
+
+@article{         jenkins2001,
+  author        = {Jenkins, Adrian and Hellmer, Hartmut H. and Holland, David M.},
+  title         = {The Role of Meltwater Advection in the Formulation of Conservative Boundary Conditions at an Ice–Ocean Interface},
+  journal       = {Journal of Physical Oceanography},
+  volume        = {31},
+  number        = {1},
+  pages         = {285-296},
+  year          = {2001},
+  doi           = {10.1175/1520-0485(2001)031<0285:TROMAI>2.0.CO;2},
+  url           = {https://doi.org/10.1175/1520-0485(2001)031<0285:TROMAI>2.0.CO;2}
+}
+
+@article{         jourdain2017,
+  author        = {Jourdain, Nicolas C. and Mathiot, Pierre and Merino, Nacho and Durand, Gaël and Le Sommer, Julien and Spence, Paul and Dutrieux, Pierre and Madec, Gurvan},
+  title         = {Ocean circulation and sea-ice thinning induced by melting ice shelves in the Amundsen Sea},
+  journal       = {Journal of Geophysical Research: Oceans},
+  volume        = {122},
+  number        = {3},
+  pages         = {2550-2573},
+  keywords      = {Amundsen Sea, ice shelf, efficiency, circumpolar deep water, ocean circulation, sea ice},
+  doi           = {10.1002/2016JC012509},
+  url           = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1002/2016JC012509},
+  year          = {2017}
 }
 
@@ -2226,4 +2288,18 @@
 }
 
+@article{Merino_OM2016,
+title = "Antarctic icebergs melt over the Southern Ocean: Climatology and impact on sea ice",
+journal = "Ocean Modelling",
+volume = "104",
+pages = "99 - 110",
+year = "2016",
+issn = "1463-5003",
+doi = "https://doi.org/10.1016/j.ocemod.2016.05.001",
+url = "http://www.sciencedirect.com/science/article/pii/S1463500316300300",
+author = "Nacho Merino and Julien {Le Sommer} and Gael Durand and Nicolas C. Jourdain and Gurvan Madec and Pierre Mathiot and Jean Tournadre",
+keywords = "Icebergs, Southern Ocean, Sea ice, Freshwater fluxes",
+abstract = "Recent increase in Antarctic freshwater release to the Southern Ocean is suggested to contribute to change in water masses and sea ice. However, climate models differ in their representation of the freshwater sources. Recent improvements in altimetry-based detection of small icebergs and in estimates of the mass loss of Antarctica may help better constrain the values of Antarctic freshwater releases. We propose a model-based seasonal climatology of iceberg melt over the Southern Ocean using state-of-the-art observed glaciological estimates of the Antarctic mass loss. An improved version of a Lagrangian iceberg model is coupled with a global, eddy-permitting ocean/sea ice model and compared to small icebergs observations. Iceberg melt increases sea ice cover, about 10% in annual mean sea ice volume, and decreases sea surface temperature over most of the Southern Ocean, but with distinctive regional patterns. Our results underline the importance of improving the representation of Antarctic freshwater sources. This can be achieved by forcing ocean/sea ice models with a climatological iceberg fresh-water flux."
+}
+
 @article{         merryfield.holloway.ea_JPO99,
   title         = "A Global Ocean Model with Double-Diffusive Mixing",
Index: NEMO/trunk/doc/latex/NEMO/subfiles/apdx_DOMAINcfg.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/apdx_DOMAINcfg.tex	(revision 14302)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/apdx_DOMAINcfg.tex	(revision 14303)
@@ -16,5 +16,6 @@
     Release & Author(s) & Modifications \\
     \hline
-    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   next}& {\em Pierre Mathiot} & {\em add ice shelf and closed sea option description } \\
+    {\em   4.0} & {\em Andrew Coward}  & {\em Created at v4.0 from materials removed from chap\_DOM that are still relevant to the \forcode{DOMAINcfg} tool and which illustrate and explain the choices to be made by the user when setting up new domains }  \\
     {\em   3.6} & {\em ...} & {\em ...} \\
     {\em   3.4} & {\em ...} & {\em ...} \\
@@ -350,9 +351,4 @@
   Defining the bathymetry also defines the coastline: where the bathymetry is zero,
   no wet levels are defined (all levels are masked).
-
-  The \textit{isfdraft\_meter.nc} file (Netcdf format) provides the ice shelf draft (positive, in meters) at
-  each grid point of the model grid.
-  This file is only needed if \np[=.true.]{ln_isfcav}{ln\_isfcav}.
-  Defining the ice shelf draft will also define the ice shelf edge and the grounding line position.
 \end{description}
 
@@ -590,4 +586,145 @@
 This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO\ web site.
 
+\section{Ice shelf cavity definition}
+\label{subsec:zgrisf}
+
+  If the under ice shelf seas are opened (\np{ln_isfcav}{ln\_isfcav}), the depth of the ice shelf/ocean interface has to be include in 
+  the \textit{isfdraft\_meter} file (Netcdf format). This file need to include the \textit{isf\_draft} variable. 
+  A positive value will mean ice shelf/ocean or ice shelf bedrock interface below the reference 0m ssh. 
+  The exact shape of the ice shelf cavity (grounding line position and minimum thickness of the water column under an ice shelf, ...) can be specify in \nam{zgr_isf}{zgr_isf}.
+
+\begin{listing}
+  \caption{\forcode{&namzgr_isf}}
+  \label{lst:namzgr_isf}
+  \begin{forlines}
+!-----------------------------------------------------------------------
+&namzgr_isf    !   isf cavity geometry definition                       (default: OFF)
+!-----------------------------------------------------------------------
+   rn_isfdep_min    = 10.         ! minimum isf draft tickness (if lower, isf draft set to this value)
+   rn_glhw_min      = 1.e-3       ! minimum water column thickness to define the grounding line
+   rn_isfhw_min     = 10          ! minimum water column thickness in the cavity once the grounding line defined.
+   ln_isfchannel    = .false.     ! remove channel (based on 2d mask build from isfdraft-bathy)
+   ln_isfconnect    = .false.     ! force connection under the ice shelf (based on 2d mask build from isfdraft-bathy)
+      nn_kisfmax       = 999         ! limiter in level on the previous condition. (if change larger than this number, get back to value before we enforce the connection)
+      rn_zisfmax       = 7000.       ! limiter in m     on the previous condition. (if change larger than this number, get back to value before we enforce the connection)
+   ln_isfcheminey   = .false.     ! close cheminey
+   ln_isfsubgl      = .false.     ! remove subglacial lake created by the remapping process
+      rn_isfsubgllon   =    0.0      !  longitude of the seed to determine the open ocean
+      rn_isfsubgllat   =    0.0      !  latitude  of the seed to determine the open ocean
+/
+  \end{forlines}
+\end{listing}
+
+   The options available to define the shape of the under ice shelf cavities are listed in \nam{zgr_isf}{zgr_isf} (\texttt{DOMAINcfg} only, \autoref{lst:namzgr_isf}).
+
+   \subsection{Model ice shelf draft definition}
+   \label{subsec:zgrisf_isfd}
+
+   First of all, the tool make sure, the ice shelf draft ($h_{isf}$) is sensible and compatible with the bathymetry.
+   There are 3 compulsory steps to achieve this:
+
+   \begin{description}
+   \item{\np{rn_isfdep_min}{rn\_isfdep\_min}:} this is the minimum ice shelf draft. This is to make sure there is no ridiculous thin ice shelf. If \np{rn_isfdep_min}{rn\_isfdep\_min} is smaller than the surface level, \np{rn_isfdep_min}{rn\_isfdep\_min} is set to $e3t\_1d(1)$. 
+   Where $h_{isf} < MAX(e3t\_1d(1),\np{rn_isfdep_min}{rn\_isfdep\_min}$), $h_{isf}$ is set to \np{rn_isfdep_min}{rn\_isfdep\_min}.
+
+   \item{\np{rn_glhw_min}{rn\_glhw\_min}:} This parameter is used to define the grounding line position.
+   Where the difference between the bathymetry and the ice shelf draft is smaller than \np{rn_glhw_min}{rn\_glhw\_min}, the cell are grounded (ie masked). 
+   This step is needed to take into account possible small mismatch between ice shelf draft value and bathymetry value (sources are coming from different grid, different data processes, rounding error, ...).
+
+   \item{\np{rn_isfhw_min}{rn\_isfhw\_min}:} This parameter is the minimum water column thickness in the cavity. 
+   Where the water column thickness is lower than \np{rn_isfhw_min}{rn\_isfhw\_min}, the ice shelf draft is adjusted to match this criterion. 
+   If for any reason, this adjustement break the minimum ice shelf draft allowed (\np{rn_isfdep_min}{rn\_isfdep\_min}), the cell is masked.
+   \end{description}
+
+   Once all these adjustements are made, if the water column thickness contains one cell wide channels, these channels can be closed using \np{ln_isfchannel}{ln\_isfchannel}.  
+ 
+   \subsection{Model top level definition}
+   After the definition of the ice shelf draft, the tool defines the top level. 
+   The compulsory criterion is that the water column needs at least 2 wet cells in the water column at U- and V-points.
+   To do so, if there one cell wide water column, the tools adjust the ice shelf draft to fillful the requierement.\\
+
+   The process is the following:
+   \begin{description}
+   \item{step 1:} The top level is defined in the same way as the bottom level is defined.
+   \item{step 2:} The isolated grid point in the bathymetry are filled (as it is done in a domain without ice shelf)
+   \item{step 3:} The tools make sure, the top level is above or equal to the bottom level
+   \item{step 4:} If the water column at a U- or V- point is one wet cell wide, the ice shelf draft is adjusted. So the actual top cell become fully open and the new
+   top cell thickness is set to the minimum cell thickness allowed (following the same logic as for the bottom partial cell). This step is iterated 4 times to ensure the condition is fullfill along the 4 sides of the cell.
+   \end{description}
+
+   In case of steep slope and shallow water column, it likely that 2 cells are disconnected (bathymetry above its neigbourging ice shelf draft). 
+   The option \np{ln_isfconnect}{ln\_isfconnect} allow the tool to force the connection between these 2 cells.
+   Some limiters in meter or levels on the digging allowed by the tool are available (respectively, \np{rn_zisfmax}{rn\_zisfmax} or \np{rn_kisfmax}{rn\_kisfmax}).
+   This will prevent the formation of subglacial lakes at the expense of long vertical pipe to connect cells at very different levels.
+
+   \subsection{Subglacial lakes}
+   Despite careful setting of your ice shelf draft and bathymetry input file as well as setting described in \autoref{subsec:zgrisf_isfd}, some situation are unavoidable.
+   For exemple if you setup your ice shelf draft and bathymetry to do ocean/ice sheet coupling, 
+   you may decide to fill the whole antarctic with a bathymetry and an ice shelf draft value (ice/bedrock interface depth when grounded). 
+   If you do so, the subglacial lakes will show up (Vostock for example). An other possibility is with coarse vertical resolution, some ice shelves could be cut in 2 parts: 
+   one connected to the main ocean and an other one closed which can be considered as a subglacial sea be the model.\\
+
+   The namelist option \np{ln_isfsubgl}{ln\_isfsubgl} allow you to remove theses subglacial lakes.
+   This may be useful for esthetical reason or for stability reasons:
+
+   \begin{description}
+   \item $\bullet$ In a subglacial lakes, in case of very weak circulation (often the case), the only heat flux is the conductive heat flux through the ice sheet. 
+         This will lead to constant freezing until water reaches -20C. 
+         This is one of the defitiency of the 3 equation melt formulation (for details on this formulation, see: \autoref{sec:isf}).
+   \item $\bullet$ In case of coupling with an ice sheet model, 
+         the ssh in the subglacial lakes and the main ocean could be very different (ssh initial adjustement for example), 
+         and so if for any reason both a connected at some point, the model is likely to fall over.\\
+   \end{description}
+
+\section{Closed sea definition}
+\label{sec:clocfg}
+
+\begin{listing}
+  \caption{\forcode{&namclo}}
+  \label{lst:namdom_clo}
+  \begin{forlines}
+!-----------------------------------------------------------------------
+&namclo ! (closed sea : need ln_domclo = .true. in namcfg)
+!-----------------------------------------------------------------------
+   rn_lon_opnsea = -2.0     ! longitude seed of open ocean
+   rn_lat_opnsea = -2.0     ! latitude  seed of open ocean
+   nn_closea = 8           ! number of closed seas ( = 0; only the open_sea mask will be computed)
+   !                name   ! lon_src ! lat_src ! lon_trg ! lat_trg ! river mouth area   ! net evap/precip correction scheme ! radius tgt   ! id trg
+   !                       ! (degree)! (degree)! (degree)! (degree)! local/coast/global ! (glo/rnf/emp)                     !     (m)      !
+   ! North American lakes
+   sn_lake(1) = 'superior' ,  -86.57 ,  47.30  , -66.49  , 50.45   , 'local'            , 'rnf'                             ,   550000.0 , 2    
+   sn_lake(2) = 'michigan' ,  -87.06 ,  42.74  , -66.49  , 50.45   , 'local'            , 'rnf'                             ,   550000.0 , 2    
+   sn_lake(3) = 'huron'    ,  -82.51 ,  44.74  , -66.49  , 50.45   , 'local'            , 'rnf'                             ,   550000.0 , 2    
+   sn_lake(4) = 'erie'     ,  -81.13 ,  42.25  , -66.49  , 50.45   , 'local'            , 'rnf'                             ,   550000.0 , 2    
+   sn_lake(5) = 'ontario'  ,  -77.72 ,  43.62  , -66.49  , 50.45   , 'local'            , 'rnf'                             ,   550000.0 , 2    
+   ! African Lake
+   sn_lake(6) = 'victoria' ,   32.93 ,  -1.08  ,  30.44  , 31.37   , 'coast'            , 'emp'                             ,   100000.0 , 3    
+   ! Asian Lakes
+   sn_lake(7) = 'caspian'  ,   50.0  ,  44.0   ,   0.0   ,  0.0    , 'global'           , 'glo'                             ,        0.0 , 1     
+   sn_lake(8) = 'aral'     ,   60.0  ,  45.0   ,   0.0   ,  0.0    , 'global'           , 'glo'                             ,        0.0 , 1    
+/
+   \end{forlines}
+\end{listing}
+
+The options available to define the closed seas and how closed sea net fresh water input will be redistributed by NEMO are listed in \nam{clo}{dom_clo} (\texttt{DOMAINcfg} only).
+The individual definition of each closed sea is managed by \np{sn_lake}{sn\_lake}. In this fields the user needs to define:\\
+   \begin{description}
+   \item $\bullet$    the name of the closed sea (print output purposes).
+   \item $\bullet$    the seed location to define the area of the closed sea (if seed on land because not present in this configuration, this closed sea will be ignored).\\
+   \item $\bullet$    the seed location for the target area.
+   \item $\bullet$    the type of target area ('local','coast' or 'global'). See point 6 for definition of these cases.
+   \item $\bullet$    the type of redistribution scheme for the net fresh water flux over the closed sea (as a runoff in a target area, as emp in a target area, as emp globally). For the runoff case, if the net fwf is negative, it will be redistribut globally.
+   \item $\bullet$    the radius of the target area (not used for the 'global' case). So the target defined by a 'local' target area of a radius of 100km, for example, correspond to all the wet points within this radius. The coastal case will return only the coastal point within the specifid radius.
+   \item $\bullet$    the target id. This target id is used to group multiple lakes into the same river ouflow (Great Lakes for example).
+   \end{description}
+
+The closed sea module defines a number of masks in the \textit{domain\_cfg} output:
+   \begin{description}
+   \item[\textit{mask\_opensea}:] a mask of the main ocean without all the closed seas closed. This mask is defined by a flood filling algorithm with an initial seed (localisation defined by \np{rn_lon_opnsea}{rn\_lon\_opnsea} and \np{rn_lat_opnsea}{rn\_lat\_opnsea}).
+   \item[\textit{mask\_csglo}, \textit{mask\_csrnf}, \textit{mask\_csemp}:] a mask of all the closed seas defined in the namelist by \np{sn_lake}{sn\_lake} for each redistribution scheme. The total number of defined closed seas has to be defined in \np{nn_closea}{nn\_closea}.
+   \item[\textit{mask\_csgrpglo}, \textit{mask\_csgrprnf}, \textit{mask\_csgrpemp}:] a mask of all the closed seas and targets grouped by target id for each type of redistribution scheme.
+   \item[\textit{mask\_csundef}:] a mask of all the closed sea not defined in \np{sn_lake}{sn\_lake}. This will allows NEMO to mask them if needed or to inform the user of potential minor issues in its bathymetry.
+   \end{description}
+   
 \subinc{\input{../../global/epilogue}}
 
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_SBC.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_SBC.tex	(revision 14302)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_SBC.tex	(revision 14303)
@@ -15,4 +15,5 @@
     \hline
     {\em  next} & {\em Simon M{\" u}ller} & {\em Update of \autoref{sec:SBC_TDE}; revision of \autoref{subsec:SBC_fwb}}\\[2mm]
+    {\em  next} & {\em Pierre Mathiot} & {\em update of the ice shelf section (2019 developments)}\\[2mm]  
     {\em   4.0} & {\em ...} & {\em ...} \\
     {\em   3.6} & {\em ...} & {\em ...} \\
@@ -72,6 +73,4 @@
   (\np[=0..3]{nn_ice}{nn\_ice}),
 \item the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np[=.true.]{ln_rnf}{ln\_rnf}),
-\item the addition of ice-shelf melting as lateral inflow (parameterisation) or
-  as fluxes applied at the land-ice ocean interface (\np[=.true.]{ln_isf}{ln\_isf}),
 \item the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift
   (\np[=0..2]{nn_fwb}{nn\_fwb}),
@@ -97,6 +96,4 @@
 One of these is modification by icebergs (see \autoref{sec:SBC_ICB_icebergs}),
 which act as drifting sources of fresh water.
-Another example of modification is that due to the ice shelf melting/freezing (see \autoref{sec:SBC_isf}),
-which provides additional sources of fresh water.
 
 %% =================================================================================================
@@ -1181,146 +1178,295 @@
 
 %% =================================================================================================
-\section[Ice shelf melting (\textit{sbcisf.F90})]{Ice shelf melting (\protect\mdl{sbcisf})}
-\label{sec:SBC_isf}
+\section[Ice Shelf (ISF)]{Interaction with ice shelves (ISF)}
+\label{sec:isf}
 
 \begin{listing}
-%  \nlst{namsbc_isf}
-  \caption{\forcode{&namsbc_isf}}
-  \label{lst:namsbc_isf}
+  \nlst{namisf}
+  \caption{\forcode{&namisf}}
+  \label{lst:namisf}
 \end{listing}
 
-The namelist variable in \nam{sbc}{sbc}, \np{nn_isf}{nn\_isf}, controls the ice shelf representation.
-Description and result of sensitivity test to \np{nn_isf}{nn\_isf} are presented in \citet{mathiot.jenkins.ea_GMD17}.
-The different options are illustrated in \autoref{fig:SBC_isf}.
-
+The namelist variable in \nam{isf}{isf}, \np{ln_isf}{ln\_isf}, controls the ice shelf interactions:
 \begin{description}
-  \item [{\np[=1]{nn_isf}{nn\_isf}}]: The ice shelf cavity is represented (\np[=.true.]{ln_isfcav}{ln\_isfcav} needed).
-  The fwf and heat flux are depending of the local water properties.
-
-  Two different bulk formulae are available:
+   \item $\bullet$ representation of the ice shelf/ocean melting/freezing for opened cavity (cav, \np{ln_isfcav_mlt}{ln\_isfcav\_mlt}).
+   \item $\bullet$ parametrisation of the ice shelf/ocean melting/freezing for closed cavities (par, \np{ln_isfpar_mlt}{ln\_isfpar\_mlt}).
+   \item $\bullet$ coupling with an ice sheet model (\np{ln_isfcpl}{ln\_isfcpl}).
+\end{description}
+
+  \subsection{Ocean/Ice shelf fluxes in opened cavities}
+
+     \np{ln_isfcav_mlt}{ln\_isfcav\_mlt}\forcode{ = .true.} activates the ocean/ice shelf thermodynamics interactions at the ice shelf/ocean interface. 
+     If \np{ln_isfcav_mlt}\forcode{ = .false.}, thermodynamics interactions are desctivated but the ocean dynamics inside the cavity is still active.
+     The logical flag \np{ln_isfcav}{ln\_isfcav} control whether or not the ice shelf cavities are closed. \np{ln_isfcav}{ln\_isfcav} is not defined in the namelist but in the domcfg.nc input file.\\
+
+     3 options are available to represent to ice-shelf/ocean fluxes at the interface:
+     \begin{description}
+        \item[\np{cn_isfcav_mlt}\forcode{ = 'spe'}]:
+        The fresh water flux is specified by a forcing fields \np{sn_isfcav_fwf}{sn\_isfcav\_fwf}. Convention of the input file is: positive toward the ocean (i.e. positive for melting and negative for freezing).
+        The latent heat fluxes is derived from the fresh water flux. 
+        The heat content flux is derived from the fwf flux assuming a temperature set to the freezing point in the top boundary layer (\np{rn_htbl}{rn\_htbl})
+
+        \item[\np{cn_isfcav_mlt}\forcode{ = 'oasis'}]:
+        The \forcode{'oasis'} is a prototype of what could be a method to spread precipitation on Antarctic ice sheet as ice shelf melt inside the cavity when a coupled model Atmosphere/Ocean is used. 
+        It has not been tested and therefore the model will stop if you try to use it. 
+        Actions will be undertake in 2020 to build a comprehensive interface to do so for Greenland, Antarctic and ice shelf (cav), ice shelf (par), icebergs, subglacial runoff and runoff.
+
+        \item[\np{cn_isfcav_mlt}\forcode{ = '2eq'}]:
+        The heat flux and the fresh water flux (negative for melting) resulting from ice shelf melting/freezing are parameterized following \citet{Grosfeld1997}. 
+        This formulation is based on a balance between the vertical diffusive heat flux across the ocean top boundary layer (\autoref{eq:ISOMIP1}) 
+        and the latent heat due to melting/freezing (\autoref{eq:ISOMIP2}):
+
+        \begin{equation}
+        \label{eq:ISOMIP1}
+        \mathcal{Q}_h = \rho c_p \gamma (T_w - T_f)
+        \end{equation}
+        \begin{equation}
+        \label{eq:ISOMIP2}
+        q = \frac{-\mathcal{Q}_h}{L_f}
+        \end{equation}
+        
+        where $\mathcal{Q}_h$($W.m^{-2}$) is the heat flux,q($kg.s^{-1}m^{-2}$) the fresh-water flux, 
+        $L_f$ the specific latent heat, $T_w$ the temperature averaged over a boundary layer below the ice shelf (explained below), 
+        $T_f$ the freezing point using  the  pressure  at  the  ice  shelf  base  and  the  salinity  of the water in the boundary layer, 
+        and $\gamma$ the thermal exchange coefficient.
+
+        \item[\np{cn_isfcav_mlt}\forcode{ = '3eq'}]:
+        For realistic studies, the heat and freshwater fluxes are parameterized following \citep{Jenkins2001}. This formulation is based on three equations: 
+        a balance between the vertical diffusive heat flux across the boundary layer 
+        , the latent heat due to melting/freezing of ice and the vertical diffusive heat flux into the ice shelf (\autoref{eq:3eq1}); 
+        a balance between the vertical diffusive salt flux across the boundary layer and the salt source or sink represented by the melting/freezing (\autoref{eq:3eq2}); 
+        and a linear equation for the freezing temperature of sea water (\autoref{eq:3eq3}, detailed of the linearisation coefficient in \citet{AsayDavis2016}):
+
+        \begin{equation}
+        \label{eq:3eq1}
+        c_p \rho \gamma_T (T_w-T_b) = -L_f q - \rho_i c_{p,i} \kappa \frac{T_s - T_b}{h_{isf}}
+        \end{equation}
+        \begin{equation}
+        \label{eq:3eq2}
+        \rho \gamma_S (S_w - S_b) = (S_i - S_b)q
+        \end{equation}
+        \begin{equation}
+        \label{eq:3eq3}
+        T_b = \lambda_1 S_b + \lambda_2 +\lambda_3 z_{isf}
+        \end{equation}
+
+        where $T_b$ is the temperature at the interface, $S_b$ the salinity at the interface, $\gamma_T$ and $\gamma_S$ the exchange coefficients for temperature and salt, respectively, 
+        $S_i$ the salinity of the ice (assumed to be 0), $h_{isf}$ the ice shelf thickness, $z_{isf}$ the ice shelf draft, $\rho_i$ the density of the iceshelf, 
+        $c_{p,i}$ the specific heat capacity of the ice, $\kappa$ the thermal diffusivity of the ice 
+        and $T_s$ the atmospheric surface temperature (at the ice/air interface, assumed to be -20C). 
+        The Liquidus slope ($\lambda_1$), the liquidus intercept ($\lambda_2$) and the Liquidus pressure coefficient ($\lambda_3$) 
+        for TEOS80 and TEOS10 are described in \citep{AsayDavis2016} and in \citep{Jourdain2017}.
+        The linear system formed by \autoref{eq:3eq1}, \autoref{eq:3eq2} and the linearised equation for the freezing temperature of sea water (\autoref{eq:3eq3}) can be solved for $S_b$ or $T_b$. 
+        Afterward, the freshwater flux ($q$) and the heat flux ($\mathcal{Q}_h$) can be computed.
+
+     \end{description}
+
+     \begin{table}[h]
+        \centering
+        \caption{Description of the parameters hard coded into the ISF module}
+        \label{tab:isf}
+        \begin{tabular}{|l|l|l|l|}
+        \hline
+        Symbol    & Description               & Value              & Unit               \\
+        \hline
+        $C_p$     & Ocean specific heat       & 3992               & $J.kg^{-1}.K^{-1}$ \\
+        $L_f$     & Ice latent heat of fusion & $3.34 \times 10^5$ & $J.kg^{-1}$        \\
+        $C_{p,i}$ & Ice specific heat         & 2000               & $J.kg^{-1}.K^{-1}$ \\
+        $\kappa$  & Heat diffusivity          & $1.54 \times 10^{-6}$& $m^2.s^{-1}$     \\
+        $\rho_i$  & Ice density               & 920                & $kg.m^3$           \\
+        \hline
+        \end{tabular}
+     \end{table}
+
+     Temperature and salinity used to compute the fluxes in \autoref{eq:ISOMIP1}, \autoref{eq:3eq1} and \autoref{eq:3eq2} are the average temperature in the top boundary layer \citep{losch_JGR08}. 
+     Its thickness is defined by \np{rn_htbl}{rn\_htbl}.
+     The fluxes and friction velocity are computed using the mean temperature, salinity and velocity in the first \np{rn_htbl}{rn\_htbl} m.
+     Then, the fluxes are spread over the same thickness (ie over one or several cells).
+     If \np{rn_htbl}{rn\_htbl} is larger than top $e_{3}t$, there is no more direct feedback between the freezing point at the interface and the top cell temperature.
+     This can lead to super-cool temperature in the top cell under melting condition.
+     If \np{rn_htbl}{rn\_htbl} smaller than top $e_{3}t$, the top boundary layer thickness is set to the top cell thickness.\\
+
+     Each melt formula (\np{cn_isfcav_mlt}\forcode{ = '3eq'} or \np{cn_isfcav_mlt}\forcode{ = '2eq'}) depends on an exchange coeficient ($\Gamma^{T,S}$) between the ocean and the ice.
+     Below, the exchange coeficient $\Gamma^{T}$ and $\Gamma^{S}$ are respectively defined by \np{rn_gammat0}{rn\_gammat0} and \np{rn_gammas0}{rn\_gammas0}. 
+     There are 3 different ways to compute the exchange velocity:
+
+     \begin{description}
+        \item[\np{cn_gammablk}\forcode{='spe'}]:
+        The salt and heat exchange coefficients are constant and defined by:
+\[
+\gamma^{T} = \Gamma^{T}
+\]
+\[
+\gamma^{S} = \Gamma^{S}
+\] 
+        This is the recommended formulation for ISOMIP.
+
+	\item[\np{cn_gammablk}\forcode{='vel'}]:
+        The salt and heat exchange coefficients are velocity dependent and defined as
+\[
+\gamma^{T} = \Gamma^{T} \times u_{*} 
+\]
+\[
+\gamma^{S} = \Gamma^{S} \times u_{*}
+\]
+        where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_htbl}{rn\_htbl} meters).
+        See \citet{jenkins.nicholls.ea_JPO10} for all the details on this formulation. It is the recommended formulation for realistic application and ISOMIP+/MISOMIP configuration.
+
+	\item[\np{cn_gammablk}\forcode{'vel\_stab'}]:
+        The salt and heat exchange coefficients are velocity and stability dependent and defined as:
+\[
+\gamma^{T,S} = \frac{u_{*}}{\Gamma_{Turb} + \Gamma^{T,S}_{Mole}} 
+\]
+        where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_tbl}{rn\_htbl} meters),
+        $\Gamma_{Turb}$ the contribution of the ocean stability and
+        $\Gamma^{T,S}_{Mole}$ the contribution of the molecular diffusion.
+        See \citet{holland.jenkins_JPO99} for all the details on this formulation. 
+        This formulation has not been extensively tested in NEMO (not recommended).
+     \end{description}
+
+\subsection{Ocean/Ice shelf fluxes in parametrised cavities}
 
   \begin{description}
-  \item [{\np[=1]{nn_isfblk}{nn\_isfblk}}]: The melt rate is based on a balance between the upward ocean heat flux and
-    the latent heat flux at the ice shelf base. A complete description is available in \citet{hunter_trpt06}.
-  \item [{\np[=2]{nn_isfblk}{nn\_isfblk}}]: The melt rate and the heat flux are based on a 3 equations formulation
-    (a heat flux budget at the ice base, a salt flux budget at the ice base and a linearised freezing point temperature equation).
-    A complete description is available in \citet{jenkins_JGR91}.
+
+     \item[\np{cn_isfpar_mlt}\forcode{ = 'bg03'}]:
+     The ice shelf cavities are not represented.
+     The fwf and heat flux are computed using the \citet{beckmann.goosse_OM03} parameterisation of isf melting.
+     The fluxes are distributed along the ice shelf edge between the depth of the average grounding line (GL)
+     (\np{sn_isfpar_zmax}{sn\_isfpar\_zmax}) and the base of the ice shelf along the calving front
+     (\np{sn_isfpar_zmin}{sn\_isfpar\_zmin}) as in (\np{cn_isfpar_mlt}\forcode{ = 'spe'}).
+     The effective melting length (\np{sn_isfpar_Leff}{sn\_isfpar\_Leff}) is read from a file.
+     This parametrisation has not been tested since a while and based on \citet{Favier2019}, 
+     this parametrisation should probably not be used.
+
+     \item[\np{cn_isfpar_mlt}\forcode{ = 'spe'}]:
+     The ice shelf cavity is not represented.
+     The fwf (\np{sn_isfpar_fwf}{sn\_isfpar\_fwf}) is prescribed and distributed along the ice shelf edge between
+     the depth of the average grounding line (GL) (\np{sn_isfpar_zmax}{sn\_isfpar\_zmax}) and
+     the base of the ice shelf along the calving front (\np{sn_isfpar_zmin}{sn\_isfpar\_min}). Convention of the input file is positive toward the ocean (i.e. positive for melting and negative for freezing).
+     The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$.
+
+     \item[\np{cn_isfpar_mlt}\forcode{ = 'oasis'}]:
+     The \forcode{'oasis'} is a prototype of what could be a method to spread precipitation on Antarctic ice sheet as ice shelf melt inside the cavity when a coupled model Atmosphere/Ocean is used. 
+     It has not been tested and therefore the model will stop if you try to use it. 
+     Action will be undertake in 2020 to build a comprehensive interface to do so for Greenland, Antarctic and ice shelf (cav), ice shelf (par), icebergs, subglacial runoff and runoff.
+
   \end{description}
 
-  Temperature and salinity used to compute the melt are the average temperature in the top boundary layer \citet{losch_JGR08}.
-  Its thickness is defined by \np{rn_hisf_tbl}{rn\_hisf\_tbl}.
-  The fluxes and friction velocity are computed using the mean temperature, salinity and velocity in the the first \np{rn_hisf_tbl}{rn\_hisf\_tbl} m.
-  Then, the fluxes are spread over the same thickness (ie over one or several cells).
-  If \np{rn_hisf_tbl}{rn\_hisf\_tbl} larger than top $e_{3}t$, there is no more feedback between the freezing point at the interface and the the top cell temperature.
-  This can lead to super-cool temperature in the top cell under melting condition.
-  If \np{rn_hisf_tbl}{rn\_hisf\_tbl} smaller than top $e_{3}t$, the top boundary layer thickness is set to the top cell thickness.\\
-
-  Each melt bulk formula depends on a exchange coeficient ($\Gamma^{T,S}$) between the ocean and the ice.
-  There are 3 different ways to compute the exchange coeficient:
-  \begin{description}
-  \item [{\np[=0]{nn_gammablk}{nn\_gammablk}}]: The salt and heat exchange coefficients are constant and defined by \np{rn_gammas0}{rn\_gammas0} and \np{rn_gammat0}{rn\_gammat0}.
-    \begin{gather*}
-       % \label{eq:SBC_isf_gamma_iso}
-      \gamma^{T} = rn\_gammat0 \\
-      \gamma^{S} = rn\_gammas0
-    \end{gather*}
-    This is the recommended formulation for ISOMIP.
-  \item [{\np[=1]{nn_gammablk}{nn\_gammablk}}]: The salt and heat exchange coefficients are velocity dependent and defined as
-    \begin{gather*}
-      \gamma^{T} = rn\_gammat0 \times u_{*} \\
-      \gamma^{S} = rn\_gammas0 \times u_{*}
-    \end{gather*}
-    where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_hisf_tbl}{rn\_hisf\_tbl} meters).
-    See \citet{jenkins.nicholls.ea_JPO10} for all the details on this formulation. It is the recommended formulation for realistic application.
-  \item [{\np[=2]{nn_gammablk}{nn\_gammablk}}]: The salt and heat exchange coefficients are velocity and stability dependent and defined as:
-    \[
-      \gamma^{T,S} = \frac{u_{*}}{\Gamma_{Turb} + \Gamma^{T,S}_{Mole}}
-    \]
-    where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_hisf_tbl}{rn\_hisf\_tbl} meters),
-    $\Gamma_{Turb}$ the contribution of the ocean stability and
-    $\Gamma^{T,S}_{Mole}$ the contribution of the molecular diffusion.
-    See \citet{holland.jenkins_JPO99} for all the details on this formulation.
-    This formulation has not been extensively tested in \NEMO\ (not recommended).
-  \end{description}
-\item [{\np[=2]{nn_isf}{nn\_isf}}]: The ice shelf cavity is not represented.
-  The fwf and heat flux are computed using the \citet{beckmann.goosse_OM03} parameterisation of isf melting.
-  The fluxes are distributed along the ice shelf edge between the depth of the average grounding line (GL)
-  (\np{sn_depmax_isf}{sn\_depmax\_isf}) and the base of the ice shelf along the calving front
-  (\np{sn_depmin_isf}{sn\_depmin\_isf}) as in (\np[=3]{nn_isf}{nn\_isf}).
-  The effective melting length (\np{sn_Leff_isf}{sn\_Leff\_isf}) is read from a file.
-\item [{\np[=3]{nn_isf}{nn\_isf}}]: The ice shelf cavity is not represented.
-  The fwf (\np{sn_rnfisf}{sn\_rnfisf}) is prescribed and distributed along the ice shelf edge between
-  the depth of the average grounding line (GL) (\np{sn_depmax_isf}{sn\_depmax\_isf}) and
-  the base of the ice shelf along the calving front (\np{sn_depmin_isf}{sn\_depmin\_isf}).
-  The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$.
-\item [{\np[=4]{nn_isf}{nn\_isf}}]: The ice shelf cavity is opened (\np[=.true.]{ln_isfcav}{ln\_isfcav} needed).
-  However, the fwf is not computed but specified from file \np{sn_fwfisf}{sn\_fwfisf}).
-  The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$.
-  As in \np[=1]{nn_isf}{nn\_isf}, the fluxes are spread over the top boundary layer thickness (\np{rn_hisf_tbl}{rn\_hisf\_tbl})
-\end{description}
-
-$\bullet$ \np[=1]{nn_isf}{nn\_isf} and \np[=2]{nn_isf}{nn\_isf} compute a melt rate based on
+\np{cn_isfcav_mlt}\forcode{ = '2eq'}, \np{cn_isfcav_mlt}\forcode{ = '3eq'} and \np{cn_isfpar_mlt}\forcode{ = 'bg03'} compute a melt rate based on
 the water mass properties, ocean velocities and depth.
-This flux is thus highly dependent of the model resolution (horizontal and vertical),
-realism of the water masses onto the shelf ...\\
-
-$\bullet$ \np[=3]{nn_isf}{nn\_isf} and \np[=4]{nn_isf}{nn\_isf} read the melt rate from a file.
+The resulting fluxes are thus highly dependent of the model resolution (horizontal and vertical) and 
+realism of the water masses onto the shelf.\\
+
+\np{cn_isfcav_mlt}\forcode{ = 'spe'} and \np{cn_isfpar_mlt}\forcode{ = 'spe'} read the melt rate from a file.
 You have total control of the fwf forcing.
 This can be useful if the water masses on the shelf are not realistic or
 the resolution (horizontal/vertical) are too coarse to have realistic melting or
-for studies where you need to control your heat and fw input.\\
-
-The ice shelf melt is implemented as a volume flux as for the runoff.
-The fw addition due to the ice shelf melting is, at each relevant depth level, added to
-the horizontal divergence (\textit{hdivn}) in the subroutine \rou{sbc\_isf\_div}, called from \mdl{divhor}.
-See \autoref{sec:SBC_rnf} for all the details about the divergence correction.
+for studies where you need to control your heat and fw input. 
+However, if your forcing is not consistent with the dynamics below you can reach unrealistic low water temperature.\\
+
+The ice shelf fwf is implemented as a volume flux as for the runoff.
+The fwf addition due to the ice shelf melting is, at each relevant depth level, added to
+the horizontal divergence (\textit{hdivn}) in the subroutine \rou{isf\_hdiv}, called from \mdl{divhor}.
+See the runoff section \autoref{sec:SBC_rnf} for all the details about the divergence correction.\\
+
+Description and result of sensitivity tests to \np{ln_isfcav_mlt}{ln\_isfcav\_mlt} and \np{ln_isfpar_mlt}{ln\_isfpar\_mlt} are presented in \citet{mathiot.jenkins.ea_GMD17}. 
+The different options are illustrated in \autoref{fig:ISF}.
 
 \begin{figure}[!t]
   \centering
-  \includegraphics[width=0.66\textwidth]{SBC_isf}
+  \includegraphics[width=0.66\textwidth]{SBC_isf_v4.2}
   \caption[Ice shelf location and fresh water flux definition]{
     Illustration of the location where the fwf is injected and
-    whether or not the fwf is interactif or not depending of \protect\np{nn_isf}{nn\_isf}.}
-  \label{fig:SBC_isf}
+    whether or not the fwf is interactive or not.}
+  \label{fig:ISF}
 \end{figure}
 
-%% =================================================================================================
-\section{Ice sheet coupling}
-\label{sec:SBC_iscpl}
-
-\begin{listing}
-%  \nlst{namsbc_iscpl}
-  \caption{\forcode{&namsbc_iscpl}}
-  \label{lst:namsbc_iscpl}
-\end{listing}
+\subsection{Available outputs}
+The following outputs are availables via XIOS:
+\begin{description}
+   \item[for parametrised cavities]:
+      \begin{xmllines}
+ <field id="isftfrz_par"     long_name="freezing point temperature in the parametrization boundary layer" unit="degC"     />
+ <field id="fwfisf_par"      long_name="Ice shelf melt rate"                           unit="kg/m2/s"  />
+ <field id="qoceisf_par"     long_name="Ice shelf ocean  heat flux"                    unit="W/m2"     />
+ <field id="qlatisf_par"     long_name="Ice shelf latent heat flux"                    unit="W/m2"     />
+ <field id="qhcisf_par"      long_name="Ice shelf heat content flux of injected water" unit="W/m2"     />
+ <field id="fwfisf3d_par"    long_name="Ice shelf melt rate"                           unit="kg/m2/s"  grid_ref="grid_T_3D" />
+ <field id="qoceisf3d_par"   long_name="Ice shelf ocean  heat flux"                    unit="W/m2"     grid_ref="grid_T_3D" />
+ <field id="qlatisf3d_par"   long_name="Ice shelf latent heat flux"                    unit="W/m2"     grid_ref="grid_T_3D" />
+ <field id="qhcisf3d_par"    long_name="Ice shelf heat content flux of injected water" unit="W/m2"     grid_ref="grid_T_3D" />
+ <field id="ttbl_par"        long_name="temperature in the parametrisation boundary layer" unit="degC" />
+ <field id="isfthermald_par" long_name="thermal driving of ice shelf melting"          unit="degC"     />
+      \end{xmllines}
+   \item[for open cavities]:
+      \begin{xmllines}
+ <field id="isftfrz_cav"     long_name="freezing point temperature at ocean/isf interface"                unit="degC"     />
+ <field id="fwfisf_cav"      long_name="Ice shelf melt rate"                           unit="kg/m2/s"  />
+ <field id="qoceisf_cav"     long_name="Ice shelf ocean  heat flux"                    unit="W/m2"     />
+ <field id="qlatisf_cav"     long_name="Ice shelf latent heat flux"                    unit="W/m2"     />
+ <field id="qhcisf_cav"      long_name="Ice shelf heat content flux of injected water" unit="W/m2"     />
+ <field id="fwfisf3d_cav"    long_name="Ice shelf melt rate"                           unit="kg/m2/s"  grid_ref="grid_T_3D" />
+ <field id="qoceisf3d_cav"   long_name="Ice shelf ocean  heat flux"                    unit="W/m2"     grid_ref="grid_T_3D" />
+ <field id="qlatisf3d_cav"   long_name="Ice shelf latent heat flux"                    unit="W/m2"     grid_ref="grid_T_3D" />
+ <field id="qhcisf3d_cav"    long_name="Ice shelf heat content flux of injected water" unit="W/m2"     grid_ref="grid_T_3D" />
+ <field id="ttbl_cav"        long_name="temperature in Losch tbl"                      unit="degC"     />
+ <field id="isfthermald_cav" long_name="thermal driving of ice shelf melting"          unit="degC"     />
+ <field id="isfgammat"       long_name="Ice shelf heat-transfert velocity"             unit="m/s"      />
+ <field id="isfgammas"       long_name="Ice shelf salt-transfert velocity"             unit="m/s"      />
+ <field id="stbl"            long_name="salinity in the Losh tbl"                      unit="1e-3"     />
+ <field id="utbl"            long_name="zonal current in the Losh tbl at T point"      unit="m/s"      />
+ <field id="vtbl"            long_name="merid current in the Losh tbl at T point"      unit="m/s"      />
+ <field id="isfustar"        long_name="ustar at T point used in ice shelf melting"    unit="m/s"      />
+ <field id="qconisf"         long_name="Conductive heat flux through the ice shelf"    unit="W/m2"     />
+      \end{xmllines}
+\end{description}
+
+%% =================================================================================================
+\subsection{Ice sheet coupling}
+\label{subsec:ISF_iscpl}
 
 Ice sheet/ocean coupling is done through file exchange at the restart step.
-At each restart step:
-
-\begin{enumerate}
-\item the ice sheet model send a new bathymetry and ice shelf draft netcdf file.
-\item a new domcfg.nc file is built using the DOMAINcfg tools.
-\item \NEMO\ run for a specific period and output the average melt rate over the period.
-\item the ice sheet model run using the melt rate outputed in step 4.
-\item go back to 1.
-\end{enumerate}
-
-If \np[=.true.]{ln_iscpl}{ln\_iscpl}, the isf draft is assume to be different at each restart step with
+At each restart step, the procedure is this one:
+
+\begin{description}
+\item[Step 1]: the ice sheet model send a new bathymetry and ice shelf draft netcdf file.
+\item[Step 2]: a new domcfg.nc file is built using the DOMAINcfg tools.
+\item[Step 3]: NEMO run for a specific period and output the average melt rate over the period.
+\item[Step 4]: the ice sheet model run using the melt rate outputed in step 3.
+\item[Step 5]: go back to 1.
+\end{description}
+
+If \np{ln_iscpl}\forcode{ = .true.}, the isf draft is assume to be different at each restart step with
 potentially some new wet/dry cells due to the ice sheet dynamics/thermodynamics.
-The wetting and drying scheme applied on the restart is very simple and described below for the 6 different possible cases:
+The wetting and drying scheme, applied on the restart, is very simple. The 6 different possible cases for the tracer and ssh are:
 
 \begin{description}
-\item [Thin a cell down]: T/S/ssh are unchanged and U/V in the top cell are corrected to keep the barotropic transport (bt) constant
-  ($bt_b=bt_n$).
-\item [Enlarge  a cell]: See case "Thin a cell down"
-\item [Dry a cell]: mask, T/S, U/V and ssh are set to 0.
-  Furthermore, U/V into the water column are modified to satisfy ($bt_b=bt_n$).
-\item [Wet a cell]: mask is set to 1, T/S is extrapolated from neighbours, $ssh_n = ssh_b$ and U/V set to 0.
-  If no neighbours, T/S is extrapolated from old top cell value.
-  If no neighbours along i,j and k (both previous test failed), T/S/U/V/ssh and mask are set to 0.
-\item [Dry a column]: mask, T/S, U/V are set to 0 everywhere in the column and ssh set to 0.
-\item [Wet a column]: set mask to 1, T/S is extrapolated from neighbours, ssh is extrapolated from neighbours and U/V set to 0.
-  If no neighbour, T/S/U/V and mask set to 0.
+   \item[Thin a cell]:
+   T/S/ssh are unchanged.
+
+   \item[Enlarge  a cell]:
+   See case "Thin a cell down"
+
+   \item[Dry a cell]:
+   Mask, T/S, U/V and ssh are set to 0.
+
+   \item[Wet a cell]: 
+   Mask is set to 1, T/S is extrapolated from neighbours, $ssh_n = ssh_b$.
+   If no neighbours, T/S is extrapolated from old top cell value. 
+   If no neighbours along i,j and k (both previous tests failed), T/S/ssh and mask are set to 0.
+
+   \item[Dry a column]:
+   mask, T/S and ssh are set to 0.
+
+   \item[Wet a column]:
+   set mask to 1, T/S/ssh are extrapolated from neighbours.
+   If no neighbour, T/S/ssh and mask set to 0.
 \end{description}
+
+The method described above will strongly affect the barotropic transport under an ice shelf when the geometry change.
+In order to keep the model stable, an adjustment of the dynamics at the initialisation after the coupling step is needed. 
+The idea behind this is to keep $\pd[\eta]{t}$ as it should be without change in geometry at the initialisation. 
+This will prevent any strong velocity due to large pressure gradient. 
+To do so, we correct the horizontal divergence before $\pd[\eta]{t}$ is computed in the first time step.\\
 
 Furthermore, as the before and now fields are not compatible (modification of the geometry),
@@ -1329,16 +1475,15 @@
 The horizontal extrapolation to fill new cell with realistic value is called \np{nn_drown}{nn\_drown} times.
 It means that if the grounding line retreat by more than \np{nn_drown}{nn\_drown} cells between 2 coupling steps,
-the code will be unable to fill all the new wet cells properly.
+the code will be unable to fill all the new wet cells properly and the model is likely to blow up at the initialisation.
 The default number is set up for the MISOMIP idealised experiments.
 This coupling procedure is able to take into account grounding line and calving front migration.
-However, it is a non-conservative processe.
+However, it is a non-conservative proccess. 
 This could lead to a trend in heat/salt content and volume.\\
 
 In order to remove the trend and keep the conservation level as close to 0 as possible,
-a simple conservation scheme is available with \np[=.true.]{ln_hsb}{ln\_hsb}.
-The heat/salt/vol. gain/loss is diagnosed, as well as the location.
-A correction increment is computed and apply each time step during the next \np{rn_fiscpl}{rn\_fiscpl} time steps.
-For safety, it is advised to set \np{rn_fiscpl}{rn\_fiscpl} equal to the coupling period (smallest increment possible).
-The corrective increment is apply into the cell itself (if it is a wet cell), the neigbouring cells or the closest wet cell (if the cell is now dry).
+a simple conservation scheme is available with \np{ln_isfcpl_cons}\forcode{ = .true.}.
+The heat/salt/vol. gain/loss are diagnosed, as well as the location.
+A correction increment is computed and applied each time step during the model run.
+The corrective increment are applied into the cells itself (if it is a wet cell), the neigbouring cells or the closest wet cell (if the cell is now dry).
 
 %% =================================================================================================
@@ -1388,4 +1533,11 @@
 which are assumed to propagate with their larger parent and thus delay fluxing into the ocean.
 Melt water (and other variables on the configuration grid) are written into the main \NEMO\ model output files.
+
+By default, iceberg thermodynamic and dynamic are computed using ocean surface variable (sst, ssu, ssv) and the icebergs are not sensible to the bathymetry (only to land) whatever the iceberg draft. 
+\citet{Merino_OM2016} developed an option to use vertical profiles of ocean currents and temperature instead (\np{ln_M2016}{ln\_M2016}).
+Full details on the sensitivity to this parameter in done in \citet{Merino_OM2016}. 
+If \np{ln_M2016}{ln\_M2016} activated, \np{ln_icb_grd}{ln\_icb\_grd} activate (or not) an option to prevent thick icebergs to move across shallow bank (ie shallower than the iceberg draft).
+This option need to be used with care as it could required to either change the distribution to prevent generation of icebergs with draft larger than the bathymetry 
+or to build a variable \forcode{maxclass} to prevent NEMO filling the icebergs classes too thick for the local bathymetry.
 
 Extensive diagnostics can be produced.
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_TRA.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_TRA.tex	(revision 14302)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_TRA.tex	(revision 14303)
@@ -733,5 +733,5 @@
   (see \autoref{sec:SBC_rnf} for further detail of how it acts on temperature and salinity tendencies)
 \item [\textit{fwfisf}] The mass flux associated with ice shelf melt,
-  (see \autoref{sec:SBC_isf} for further details on how the ice shelf melt is computed and applied).
+  (see \autoref{sec:isf} for further details on how the ice shelf melt is computed and applied).
 \end{labeling}
 
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_misc.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_misc.tex	(revision 14302)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_misc.tex	(revision 14303)
@@ -14,4 +14,5 @@
     Release & Author(s) & Modifications \\
     \hline
+    {\em   X.X} & {\em Pierre Mathiot} & {update of the closed sea section}
     {\em   4.0} & {\em ...} & {\em ...} \\
     {\em   3.6} & {\em ...} & {\em ...} \\
@@ -107,21 +108,13 @@
 \end{figure}
 
-\begin{figure}[!tbp]
-  \centering
-  \includegraphics[width=0.66\textwidth]{MISC_closea_mask_example}
-  \caption[Mask fields for the \protect\mdl{closea} module]{
-    Example of mask fields for the \protect\mdl{closea} module.
-    \textit{Left}: a closea\_mask field;
-    \textit{Right}: a closea\_mask\_rnf field.
-    In this example, if \protect\np{ln_closea}{ln\_closea} is set to \forcode{.true.},
-    the mean freshwater flux over each of the American Great Lakes will be set to zero,
-    and the total residual for all the lakes, if negative, will be put into
-    the St Laurence Seaway in the area shown.}
-  \label{fig:MISC_closea_mask_example}
-\end{figure}
-
 %% =================================================================================================
 \section[Closed seas (\textit{closea.F90})]{Closed seas (\protect\mdl{closea})}
 \label{sec:MISC_closea}
+
+\begin{listing}
+  \nlst{namclo}
+  \caption{\forcode{&namclo}}
+  \label{lst:namclo}
+\end{listing}
 
 Some configurations include inland seas and lakes as ocean
@@ -136,53 +129,50 @@
 to zero and put the residual flux into the ocean.
 
-Prior to \NEMO\ 4 the locations of inland seas and lakes was set via
-hardcoded indices for various ORCA configurations. From \NEMO\ 4 onwards
-the inland seas and lakes are defined using mask fields in the
-domain configuration file. The options are as follows.
-
-\begin{enumerate}
-\item {{\bfseries No ``closea\_mask'' field is included in domain configuration
-  file.} In this case the closea module does nothing.}
-
-\item {{\bfseries A field called closea\_mask is included in the domain
-configuration file and ln\_closea=.false. in namelist namcfg.} In this
-case the inland seas defined by the closea\_mask field are filled in
-(turned to land points) at run time. That is every point in
-closea\_mask that is nonzero is set to be a land point.}
-
-\item {{\bfseries A field called closea\_mask is included in the domain
-configuration file and ln\_closea=.true. in namelist namcfg.} Each
-inland sea or group of inland seas is set to a positive integer value
-in the closea\_mask field (see \autoref{fig:MISC_closea_mask_example}
-for an example). The net surface flux over each inland sea or group of
+The inland seas and lakes are defined using mask fields in the
+domain configuration file. Special treatment of the closed sea (redistribution of net freshwater or mask those), are defined in \autoref{lst:namclo} and
+can be trigger by \np{ln_closea}{ln\_closea}\forcode{=.true.} in namelist namcfg.
+
+The options available are the following:
+\begin{description}
+\item[\np{ln_maskcs}{ln\_maskcs}\forcode{ = .true.}] All the closed seas are masked using \textit{mask\_opensea} variable.
+\item[\np{ln_maskcs}{ln\_maskcs}\forcode{ = .false.}] The net surface flux over each inland sea or group of
 inland seas is set to zero each timestep and the residual flux is
-distributed over the global ocean (ie. all ocean points where
-closea\_mask is zero).}
-
-\item {{\bfseries Fields called closea\_mask and closea\_mask\_rnf are
-included in the domain configuration file and ln\_closea=.true. in
-namelist namcfg.} This option works as for option 3, except that if
-the net surface flux over an inland sea is negative (net
-precipitation) it is put into the ocean at specified runoff points. A
-net positive surface flux (net evaporation) is still spread over the
-global ocean. The mapping from inland seas to runoff points is defined
-by the closea\_mask\_rnf field. Each mapping is defined by a positive
-integer value for the inland sea(s) and the corresponding runoff
-points. An example is given in
-\autoref{fig:MISC_closea_mask_example}. If no mapping is provided for a
-particular inland sea then the residual is spread over the global
-ocean.}
-
-\item {{\bfseries Fields called closea\_mask and closea\_mask\_emp are
-included in the domain configuration file and ln\_closea=.true. in
-namelist namcfg.} This option works the same as option 4 except that
-the nonzero net surface flux is sent to the ocean at the specified
-runoff points regardless of whether it is positive or negative. The
-mapping from inland seas to runoff points in this case is defined by
-the closea\_mask\_emp field.}
-\end{enumerate}
-
-There is a python routine to create the closea\_mask fields and append
-them to the domain configuration file in the utils/tools/DOMAINcfg directory.
+distributed over a target area.
+\end{description}
+
+When \np{ln_maskcs}{ln\_maskcs}\forcode{ = .false.}, 
+3 options are available for the redistribution (set up of these options is done in the tool DOMAINcfg):
+\begin{description}[font=$\bullet$ ]
+\item[ glo]: The residual flux is redistributed globally.
+\item[ emp]: The residual flux is redistributed as emp in a river outflow.
+\item[ rnf]: The residual flux is redistributed as rnf in a river outflow if negative. If there is a net evaporation, the residual flux is redistributed globally.
+\end{description}
+
+For each case, 2 masks are needed (\autoref{fig:MISC_closea_mask_example}): 
+\begin{description}
+\item $\bullet$ one describing the 'sources' (ie the closed seas concerned by each options) called \textit{mask\_csglo}, \textit{mask\_csrnf}, \textit{mask\_csemp}. 
+\item $\bullet$ one describing each group of inland seas (the Great Lakes for example) and the target area (river outflow or world ocean) for each group of inland seas (St Laurence for the Great Lakes for example) called
+\textit{mask\_csgrpglo}, \textit{mask\_csgrprnf}, \textit{mask\_csgrpemp}.
+\end{description}
+
+\begin{figure}[!tbp]
+  \centering
+  \includegraphics[width=0.66\textwidth]{MISC_closea_mask_example}
+  \caption[Mask fields for the \protect\mdl{closea} module]{
+    Example of mask fields for the \protect\mdl{closea} module.
+    \textit{Left}: a \textit{mask\_csrnf} field;
+    \textit{Right}: a \textit{mask\_csgrprnf} field.
+    In this example, if \protect\np{ln_closea}{ln\_closea} is set to \forcode{.true.},
+    the mean freshwater flux over each of the American Great Lakes will be set to zero,
+    and the total residual for all the lakes, if negative, will be put into
+    the St Laurence Seaway in the area shown.}
+  \label{fig:MISC_closea_mask_example}
+\end{figure}
+
+Closed sea not defined (because too small, issue in the bathymetry definition ...) are defined in \textit{mask\_csundef}.
+These points can be masked using the namelist option \np{ln_mask_csundef}{ln\_mask\_csundef}\forcode{= .true.} or used to correct the bathymetry input file.\\
+
+The masks needed for the closed sea can be created using the DOMAINcfg tool in the utils/tools/DOMAINcfg directory.
+See \autoref{sec:clocfg} for details on the usage of definition of the closed sea masks.
 
 %% =================================================================================================
Index: NEMO/trunk/doc/namelists/namberg
===================================================================
--- NEMO/trunk/doc/namelists/namberg	(revision 14302)
+++ NEMO/trunk/doc/namelists/namberg	(revision 14303)
@@ -33,4 +33,7 @@
    rn_speed_limit          = 0.      ! CFL speed limit for a berg
 
+   ln_M2016                = .false. ! use Merino et al. (2016) modification (use of 3d ocean data instead of only sea surface data)
+      ln_icb_grd           = .false. ! ground icb when icb bottom level hit oce bottom level (need ln_M2016 to be activated)
+
    cn_dir      = './'      !  root directory for the calving data location
    !___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________!
