Index: /branches/2015/dev_merge_2015/DOC/NEMO_book.tex
===================================================================
--- /branches/2015/dev_merge_2015/DOC/NEMO_book.tex	(revision 6072)
+++ /branches/2015/dev_merge_2015/DOC/NEMO_book.tex	(revision 6073)
@@ -302,4 +302,6 @@
 \include{./TexFiles/Chapters/Chap_STO}          % Stochastic param.
 
+\include{./TexFiles/Chapters/Chap_DIU}          % Diurnal SST models.
+
 \include{./TexFiles/Chapters/Chap_MISC}			% Miscellaneous topics
 
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Biblio/Biblio.bib
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Biblio/Biblio.bib	(revision 6072)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Biblio/Biblio.bib	(revision 6073)
@@ -149,4 +149,17 @@
   volume = {36},
   pages = {1502--1522}
+}
+
+@ARTICLE{Artale_al_JGR02,
+  author={V. Artale and D. Iudicone and R. Santoleri and V. Rupolo and S. Marullo
+          and F. {D'O}rtenzio},
+  title={{Role of surface fluxes in ocean general circulation models using satellite
+          sea surface temperature: Validation of and sensitivity to the forcing
+          frequency of the Mediterranean thermohaline circulation}},
+  journal=JGR,
+  year={2002},
+  volume={107},
+  pages={1978-2012},
+  doi = {10.1029/2000JC000452},
 }
 
@@ -1069,4 +1082,16 @@
 }
 
+@Article{Gentemann_al_JGR09,
+  author = 	 {C. L. Gentemann  and P. J. Minnett and B. Ward},
+  title =        {Profiles of Ocean Surface heating ({POSH}): A new model 
+                  of upper ocean diurnal warming},
+  journal = 	 JGR,
+  year = 	 {2009},
+  Volume = 	 {114},
+  Pages = 	 {C07017},
+  doi = 	 {10.1029/2008JC004825},
+  OPTannote = 	 {}
+}
+
 @ARTICLE{Gerdes1993a,
   author = {R. Gerdes},
@@ -1365,4 +1390,13 @@
 }
 
+@ARTICLE{Holland1999, 
+  author = {D. Holland and A. Jenkins},
+  title = {Modeling Thermodynamic Ice-Ocean Interactions at the Base of an Ice Shelf},
+  journal = JPO,
+  year = {1999},
+  volume = {29},  
+  pages = {1787--1800},
+}
+
 @ARTICLE{HollowayOM86,
   author = {Greg Holloway},
@@ -1519,4 +1553,22 @@
   journal = GRL,
   pages = {811--814}
+}
+
+@ARTICLE{Jenkins1991,
+  author = {A. Jenkins},
+  title = {A one-dimensional model of ice shelf-ocean interaction},
+  journal = JGR,
+  year = {1991},
+  volume = {96},  number = {C11},
+  pages = {2298--2312}
+}
+
+@ARTICLE{Jenkins2010,
+  author = {A. Jenkins},
+  title = {observation and parameterization of ablation at the base of Ronne Ice Shelf, Antarctica},
+  journal = JPO,
+  year = {2010},
+  volume = {40},  number = {10},
+  pages = {2298--2312}
 }
 
@@ -1948,4 +2000,12 @@
   volume = {51},
   pages = {737--769}
+}
+
+@ARTICLE{Losch2008,
+  author = {M. Losch},
+  title = {Modeling ice shelf cavities in a z coordinate ocean general circulation model},
+  journal = JGR,
+  year = {2008},
+  volume = {113},  number = {C13},
 }
 
@@ -2589,4 +2649,14 @@
 }
 
+@ARTICLE{Saunders_JAS82,
+  author={P. M. Saunders},
+  title={{The Temperature at the Ocean-air Interface}},
+  journal=JAS,
+  year={1967},
+  volume={24},
+  pages={269-273},
+  doi = {10.1175/1520-0469(1967)024<0269:TTATOA>2.0.CO;2},
+}
+
 @BOOK{Shchepetkin_McWilliams_Bk08,
   author = {A. F. Shchepetkin and J. C. McWilliams},
@@ -2761,4 +2831,15 @@
   volume = {359},
   pages = {123--129}
+}
+
+@ARTICLE{Takaya_al_JGR10,
+  author = 	 {Y. Takaya and J-R. Bidlot and A. C. M. Beljaars and 
+                  P. A. E. M. Janssen},
+  title =        {Refinements to a prognostic scheme of sea surface skin temperature},
+  journal = 	 JGR,
+  year = 	 {2010},
+  Volume = 	 {115},
+  Pages = 	 {C06009},
+  doi = 	 {10.1029/2009JC005985},
 }
 
@@ -2864,4 +2945,14 @@
   volume = {27},  number = {4},
   pages = {567--580}
+}
+
+@ARTICLE{Tu_Tsuang_GRL05,
+  title={{Cool-skin simulation by a one-column ocean model}},
+  author={{C-Y}. Tu  and {B-J}. Tsuang},
+  journal=GRL,
+  year={2005},
+  volume={32},
+  pages={L22602},
+  doi = {10.1029/2005GL024252},
 }
 
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Chapters/Chap_DIA.tex
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Chapters/Chap_DIA.tex	(revision 6072)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Chapters/Chap_DIA.tex	(revision 6073)
@@ -2,10 +2,10 @@
 % Chapter I/O & Diagnostics
 % ================================================================
-\chapter{Ouput and Diagnostics (IOM, DIA, TRD, FLO)}
+\chapter{Output and Diagnostics (IOM, DIA, TRD, FLO)}
 \label{DIA}
 \minitoc
 
 \newpage
-$\ $\newline    % force a new ligne
+$\ $\newline    % force a new line
 
 % ================================================================
@@ -33,5 +33,5 @@
 "\textit{grep -i numout}" in the source code directory.
 
-By default, diagnostic output files are written in NetCDF format but an IEEE binary output format, called DIMG, can be choosen by defining \key{dimgout}. 
+By default, diagnostic output files are written in NetCDF format but an IEEE binary output format, called DIMG, can be chosen by defining \key{dimgout}. 
 
 Since version 3.2, when defining \key{iomput}, an I/O server has been added which provides more flexibility in the choice of the fields to be written as well as how the writing work is distributed over the processors in massively parallel computing. The complete description of the use of this I/O server is presented in the next section. 
@@ -57,5 +57,5 @@
 \item The choice of output frequencies that can be different for each file (including real months and years).
 \item The choice of file contents; includes complete flexibility over which data are written in which files (the same data can be written in different files). 
-\item The possibility to split output files at a choosen frequency.
+\item The possibility to split output files at a chosen frequency.
 \item The possibility to extract a vertical or an horizontal subdomain.
 \item The choice of the temporal operation to perform, e.g.: average, accumulate, instantaneous, min, max and once.
@@ -1319,4 +1319,30 @@
 
 % -------------------------------------------------------------------------------------------------------------
+%       25 hour mean and hourly Surface, Mid and Bed 
+% -------------------------------------------------------------------------------------------------------------
+\section{25 hour mean output for tidal models }
+
+A module is available to compute a crudely detided M2 signal by obtaining a 25 hour mean.
+The 25 hour mean is available for daily runs by summing up the 25 hourly instantananeous hourly values from
+midnight at the start of the day to midight at the day end.
+This diagnostic is actived with the logical  $ln\_dia25h$
+
+%------------------------------------------nam_dia25h------------------------------------------------------
+\namdisplay{nam_dia25h}
+%----------------------------------------------------------------------------------------------------------
+
+\section{Top Middle and Bed hourly output }
+
+A module is available to output the surface (top), mid water and bed diagnostics of a set of standard variables. 
+This can be a useful diagnostic when hourly or sub-hourly output is required in high resolution tidal outputs.
+The tidal signal is retained but the overall data usage is cut to just three vertical levels. Also the bottom level 
+is calculated for each cell.
+This diagnostic is actived with the logical  $ln\_diatmb$
+
+%------------------------------------------nam_diatmb-----------------------------------------------------
+\namdisplay{nam_diatmb}
+%----------------------------------------------------------------------------------------------------------
+
+% -------------------------------------------------------------------------------------------------------------
 %       Sections transports
 % -------------------------------------------------------------------------------------------------------------
@@ -1522,4 +1548,13 @@
 \\
 
+\section{Courant numbers}
+Courant numbers provide a theoretical indication of the model's numerical stability. The advective Courant numbers can be calculated according to
+\begin{equation}
+\label{eq:CFL}
+C_u = |u|\frac{\rdt}{e_{1u}}, \quad C_v = |v|\frac{\rdt}{e_{2v}}, \quad C_w = |w|\frac{\rdt}{e_{3w}}
+\end{equation}
+in the zonal, meridional and vertical directions respectively. The vertical component is included although it is not strictly valid as the vertical velocity is calculated from the continuity equation rather than as a prognostic variable. Physically this represents the rate at which information is propogated across a grid cell. Values greater than 1 indicate that information is propagated across more than one grid cell in a single time step.
+
+The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \ngn{namctl} namelist. The diagnostics will be written out to an ascii file named cfl\_diagnostics.ascii. In this file the maximum value of $C_u$, $C_v$, and $C_w$ are printed at each timestep along with the coordinates of where the maximum value occurs. At the end of the model run the maximum value of $C_u$, $C_v$, and $C_w$ for the whole model run is printed along with the coordinates of each. The maximum values from the run are also copied to the ocean.output file. 
 
 
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Chapters/Chap_DIU.tex
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Chapters/Chap_DIU.tex	(revision 6073)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Chapters/Chap_DIU.tex	(revision 6073)
@@ -0,0 +1,164 @@
+% ================================================================
+% Diurnal SST models (DIU)
+% Edited by James While
+% ================================================================
+\chapter{Diurnal SST models (DIU)}
+\label{DIU}
+
+\minitoc
+
+
+\newpage
+$\ $\newline % force a new line
+
+Code to produce an estimate of the diurnal warming and cooling of the sea surface skin
+temperature (skin SST) is found in the DIU directory.  The skin
+temperature can be split into three parts:
+\begin{itemize}
+\item A foundation SST which is free from diurnal warming.
+\item A warm layer, typically ~3\,m thick, where heating from solar radiation can
+cause a warm stably stratified layer during the daytime
+\item A cool skin, a thin layer, approximately ~1\,mm thick, where long wave cooling
+is dominant and cools the immediate ocean surface.
+\end{itemize}
+
+Models are provided for both the warm layer, diurnal\_bulk.F90, and the cool skin,
+cool\_skin.F90.  Foundation SST is not considered as it can be obtained
+either from the main NEMO model (i.e. from the temperature of the top few model levels)
+or from
+some other source.  It must be noted that both the cool skin and
+warm layer models produce estimates of the change in temperature ($\Delta T_{\rm{cs}}$
+and $\Delta T_{\rm{wl}}$) and both must
+be added to a foundation SST to obtain the true skin temperature.
+
+Both the cool skin and warm layer models are controlled through the namelist `namdiu':
+\namdisplay{namdiu}
+This namelist contains only two variables:
+\begin{description}
+\item[ln\_diurnal] A logical switch for turning on/off both the cool skin and warm layer.
+\item[ln\_diurnal\_only] A logical switch which if .TRUE. will run the diurnal model
+without the other dynamical parts of NEMO.  ln\_diurnal\_only must be
+.FALSE. if ln\_diurnal is .FALSE.
+\end{description}
+
+Output for the diurnal model is through the variables `sst\_wl' (warm\_layer) and
+`sst\_cs' (cool skin).  These are 2-D variables which will be included in the model
+output if they are specified in the iodef.xml file.
+
+Initialisation is through the restart file.  Specifically the code will expect the presence of the 2-D variable ``Dsst'' to initialise the warm layer.  The cool skin model, which is determined purely by the instantaneous fluxes, has no initialisation variable.  
+
+%===============================================================
+
+\section{Warm Layer model}
+\label{warm_layer_sec}
+
+%===============================================================
+
+The warm layer is calculated using the model of \citet{Takaya_al_JGR10} (TAKAYA10 model
+hereafter).  This is a simple flux based model that is defined by the equations
+\begin{eqnarray}
+\frac{\partial{\Delta T_{\rm{wl}}}}{\partial{t}}&=&\frac{Q(\nu+1)}{D_T\rho_w c_p
+\nu}-\frac{(\nu+1)ku^*_{w}f(L_a)\Delta T}{D_T\Phi\!\left(\frac{D_T}{L}\right)} \mbox{,}
+\label{ecmwf1} \\
+L&=&\frac{\rho_w c_p u^{*^3}_{w}}{\kappa g \alpha_w Q }\mbox{,}\label{ecmwf2}
+\end{eqnarray}
+where $\Delta T_{\rm{wl}}$ is the temperature difference between the top of the warm
+layer and the depth $D_T=3$\,m at which there is assumed to be no diurnal signal. In
+equation (\ref{ecmwf1}) $\alpha_w=2\times10^{-4}$ is the thermal expansion
+coefficient of water, $\kappa=0.4$ is von K\'{a}rm\'{a}n's constant, $c_p$ is the heat
+capacity at constant pressure of sea water, $\rho_w$ is the
+water density, and $L$ is the Monin-Obukhov length. The tunable
+variable $\nu$ is a shape parameter that defines the expected
+subskin temperature profile via $T(z)=T(0)-\left(\frac{z}{D_T}\right)^\nu\Delta
+T_{\rm{wl}}$,
+where $T$ is the absolute temperature and $z\le D_T$ is the depth
+below the top of the warm layer.
+The influence of wind on TAKAYA10 comes through the magnitude of the friction velocity
+of the water
+$u^*_{w}$, which can be related to the 10\,m wind speed $u_{10}$ through the relationship
+$u^*_{w} = u_{10}\sqrt{\frac{C_d\rho_a}{\rho_w}}$, where $C_d$ is
+the drag coefficient, and $\rho_a$ is the density of air.  The symbol $Q$ in equation
+(\ref{ecmwf1}) is the instantaneous total thermal energy
+flux into
+the diurnal layer, i.e.
+\begin{equation}
+Q = Q_{\rm{sol}} + Q_{\rm{lw}} + Q_{\rm{h}}\mbox{,} \label{e_flux_eqn}
+\end{equation}
+where $Q_{\rm{h}}$ is the sensible and latent heat flux, $Q_{\rm{lw}}$ is the long
+wave flux, and $Q_{\rm{sol}}$ is the solar flux absorbed
+within the diurnal warm layer. For $Q_{\rm{sol}}$ the 9 term
+representation of \citet{Gentemann_al_JGR09} is used.  In equation \ref{ecmwf1}
+the function $f(L_a)=\max(1,L_a^{\frac{2}{3}})$, where $L_a=0.3$\footnote{This
+is a global average value, more accurately $L_a$ could be computed as
+$L_a=(u^*_{w}/u_s)^{\frac{1}{2}}$, where $u_s$ is the stokes drift, but this is not
+currently done} is the turbulent Langmuir number and is a
+parametrization of the effect of waves.
+The function $\Phi\!\left(\frac{D_T}{L}\right)$ is the similarity function that
+parametrizes the stability of the water column and
+is given by:
+\begin{equation}
+\Phi(\zeta) = \left\{ \begin{array}{cc} 1 + \frac{5\zeta +
+4\zeta^2}{1+3\zeta+0.25\zeta^2} &(\zeta \ge 0) \\
+                                    (1 - 16\zeta)^{-\frac{1}{2}} & (\zeta < 0) \mbox{,}
+                                    \end{array} \right. \label{stab_func_eqn}
+\end{equation}
+where $\zeta=\frac{D_T}{L}$.  It is clear that the first derivative of
+(\ref{stab_func_eqn}), and thus of (\ref{ecmwf1}),
+is discontinuous at $\zeta=0$ (i.e. $Q\rightarrow0$ in equation (\ref{ecmwf2})).
+
+The two terms on the right hand side of (\ref{ecmwf1}) represent different processes.
+The first term is simply the diabatic heating or cooling of the
+diurnal warm
+layer due to thermal energy
+fluxes into and out of the layer.  The second term
+parametrizes turbulent fluxes of heat out of the diurnal warm layer due to wind
+induced mixing. In practice the second term acts as a relaxation
+on the temperature.
+
+%===============================================================
+
+\section{Cool Skin model}
+\label{cool_skin_sec}
+
+%===============================================================
+
+The cool skin is modelled using the framework of \citet{Saunders_JAS82} who used a
+formulation of the near surface temperature difference based upon the heat flux and
+the friction velocity $u^*_{w}$.  As the cool skin
+is so thin (~1\,mm) we ignore the solar flux component to the heat flux and the
+Saunders equation for the cool skin temperature difference $\Delta T_{\rm{cs}}$ becomes
+\begin{equation}
+\label{sunders_eqn}
+\Delta T_{\rm{cs}}=\frac{Q_{\rm{ns}}\delta}{k_t} \mbox{,}
+\end{equation}
+where $Q_{\rm{ns}}$ is the, usually negative, non-solar heat flux into the ocean and
+$k_t$ is the thermal conductivity of sea water. $\delta$ is the thickness of the
+skin layer and is given by
+\begin{equation}
+\label{sunders_thick_eqn}
+\delta=\frac{\lambda \mu}{u^*_{w}} \mbox{,}
+\end{equation}
+where $\mu$ is the kinematic viscosity of sea water and $\lambda$ is a constant of
+proportionality which \citet{Saunders_JAS82} suggested varied between 5 and 10.
+
+The value of $\lambda$ used in equation (\ref{sunders_thick_eqn}) is that of
+\citet{Artale_al_JGR02},
+which is shown in \citet{Tu_Tsuang_GRL05} to outperform a number of other
+parametrisations at both low and high wind speeds. Specifically,
+\begin{equation}
+\label{artale_lambda_eqn}
+\lambda = \frac{ 8.64\times10^4 u^*_{w} k_t }{ \rho c_p h \mu \gamma }\mbox{,}
+\end{equation}
+where $h=10$\,m is a reference depth and
+$\gamma$ is a dimensionless function of wind speed $u$:
+\begin{equation}
+\label{artale_gamma_eqn}
+\gamma = \left\{ \begin{matrix}
+                     0.2u+0.5\mbox{,} & u \le 7.5\,\mbox{ms}^{-1} \\
+                     1.6u-10\mbox{,} & 7.5 < u < 10\,\mbox{ms}^{-1} \\
+                     6\mbox{,} & \ge 10\,\mbox{ms}^{-1} \\
+                 \end{matrix}
+          \right.
+\end{equation}
+
+
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Chapters/Chap_DOM.tex
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Chapters/Chap_DOM.tex	(revision 6072)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Chapters/Chap_DOM.tex	(revision 6073)
@@ -499,8 +499,12 @@
 Contrary to the horizontal grid, the vertical grid is computed in the code and no 
 provision is made for reading it from a file. The only input file is the bathymetry 
-(in meters) (\ifile{bathy\_meter}) 
+(in meters) (\ifile{bathy\_meter}). 
 \footnote{N.B. in full step $z$-coordinate, a \ifile{bathy\_level} file can replace the 
 \ifile{bathy\_meter} file, so that the computation of the number of wet ocean point 
 in each water column is by-passed}. 
+If \np{ln\_isfcav}~=~true, an extra file input file describing the ice shelf draft 
+(in meters) (\ifile{isf\_draft\_meter}) is needed and all the location where the isf cavity thinnest
+ than \np{rn\_isfhmin} meters are grounded (ie masked). 
+
 After reading the bathymetry, the algorithm for vertical grid definition differs 
 between the different options:
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Chapters/Chap_OBS.tex
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Chapters/Chap_OBS.tex	(revision 6072)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Chapters/Chap_OBS.tex	(revision 6073)
@@ -18,10 +18,10 @@
 location and nearest model timestep. The resulting data are saved in a ``feedback'' file (or
 files). The code was originally developed for use with the NEMOVAR data assimilation code, but
-can be used for validation or verification of model or  any other data assimilation system.
-
-The OBS code is called from \mdl{nemogcm.F90} for model initialisation and to calculate the model
+can be used for validation or verification of the model or with any other data assimilation system.
+
+The OBS code is called from \mdl{nemogcm} for model initialisation and to calculate the model
 equivalent values for observations on the 0th timestep. The code is then called again after
-each timestep from \mdl{step.F90}. To build with the OBS code active \key{diaobs} must be
-set.
+each timestep from \mdl{step}. The code is only activated if the namelist logical \np{ln\_diaobs}
+is set to true.
 
 For all data types a 2D horizontal  interpolator is needed to interpolate the model fields to
@@ -29,13 +29,15 @@
 addition to provide model fields at the observation depths. Currently this only works in
 z-level model configurations, but is being developed to work with a generalised vertical
-coordinate system. Temperature data from moored buoys (TAO, TRITON, PIRATA) in the
-ENACT/ENSEMBLES data-base are available as daily averaged quantities. For this type of
-observation the observation operator will compare such observations to the model temperature
-fields averaged over one day. The relevant observation type may be specified in the namelist
-using \np{endailyavtypes}. Otherwise the model value from the nearest timestep to the
+coordinate system. 
+
+Some profile observation types (e.g. tropical moored buoys) are made available as daily averaged quantities.
+The observation operator code can be set-up to calculated the equivalent daily average model temperature fields
+using the \np{nn\_profdavtypes} namelist array. Some SST observations are equivalent to a night-time
+average value and the observation operator code can calculate equivalent night-time average model SST fields by
+setting the namelist value \np{ln\_sstnight} to true. Otherwise the model value from the nearest timestep to the
 observation time is used.
 
 The code is controlled by the namelist \textit{nam\_obs}. See the following sections for more
-details on setting up the namelist. 
+details on setting up the namelist.
 
 Section~\ref{OBS_example} introduces a test example of the observation operator code including
@@ -59,14 +61,23 @@
 
 \begin{enumerate}
-\item Compile NEMO with \key{diaobs} set.
-
-\item Download some ENSEMBLES EN3 data from 
-\href{http://www.hadobs.org}{http://www.hadobs.org}. Choose observations which are
+\item Compile NEMO.
+
+\item Download some EN4 data from 
+\href{http://www.metoffice.gov.uk/hadobs}{http://www.metoffice.gov.uk/hadobs}. Choose observations which are
 valid for the period of your test run because the observation operator compares
 the model and observations for a matching date and time. 
 
-\item Add the following to the NEMO namelist to run the observation
-operator on this data. Set the \np{enactfiles} namelist variable to the
-observation  file name:
+\item Compile the OBSTOOLS code using: 
+\begin{verbatim}
+./maketools -n OBSTOOLS -m [ARCH].
+\end{verbatim}
+
+\item Convert the EN4 data into feedback format: 
+\begin{verbatim}
+enact2fb.exe profiles_01.nc EN.4.1.1.f.profiles.g10.YYYYMM.nc
+\end{verbatim}
+
+\item Include the following in the NEMO namelist to run the observation
+operator on this data:
 \end{enumerate}
 
@@ -77,7 +88,6 @@
 Options are defined through the  \ngn{namobs} namelist variables.
 The options \np{ln\_t3d} and \np{ln\_s3d} switch on the temperature and salinity
-profile observation operator code. The \np{ln\_ena} switch turns on the reading
-of ENACT/ENSEMBLES type profile data. The filename or array of filenames are
-specified using the \np{enactfiles} variable. The model grid points for a
+profile observation operator code. The filename or array of filenames are
+specified using the \np{cn\_profbfiles} variable. The model grid points for a
 particular  observation latitude and longitude are found using the grid
 searching part of the code. This can be expensive, particularly for large
@@ -92,4 +102,6 @@
 A number of utilities are now provided to plot the feedback files, convert and
 recombine the files. These are explained in more detail in section~\ref{OBS_obsutils}.
+Utilites to convert other input data formats into the feedback format are also 
+described in section~\ref{OBS_obsutils}.
 
 \section{Technical details}
@@ -104,6 +116,6 @@
 %-------------------------------------------------------------------------------------------------------------
 
-This name list uses the "feedback" type observation file input format for
-profile, sea level anomaly and sea surface temperature data. All the
+The observation operator code uses the "feedback" observation file format for
+all data types. All the
 observation files must be in NetCDF format. Some example headers (produced using
 \mbox{\textit{ncdump~-h}}) for profile
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Chapters/Chap_SBC.tex
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Chapters/Chap_SBC.tex	(revision 6072)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Chapters/Chap_SBC.tex	(revision 6073)
@@ -49,6 +49,5 @@
 (\np{nn\_ice}~=~0,1, 2 or 3); the addition of river runoffs as surface freshwater 
 fluxes or lateral inflow (\np{ln\_rnf}~=~true); the addition of isf melting as lateral inflow (parameterisation) 
-(\np{nn\_isf}~=~2 or 3 and \np{ln\_isfcav}~=~false) or as surface flux at the land-ice ocean interface
-(\np{nn\_isf}~=~1 or 4 and \np{ln\_isfcav}~=~true); 
+ or as surface flux at the land-ice ocean interface (\np{ln\_isf}=~true); 
 the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift (\np{nn\_fwb}~=~0,~1~or~2); the 
 transformation of the solar radiation (if provided as daily mean) into a diurnal 
@@ -958,8 +957,9 @@
 \namdisplay{namsbc_isf}
 %--------------------------------------------------------------------------------------------------------
-Namelist variable in \ngn{namsbc}, \np{nn\_isf},  control the kind of ice shelf representation used. 
+Namelist variable in \ngn{namsbc}, \np{nn\_isf}, control the kind of ice shelf representation used. 
 \begin{description}
 \item[\np{nn\_isf}~=~1]
-The ice shelf cavity is represented. The fwf and heat flux are computed. 
+The ice shelf cavity is represented. The fwf and heat flux are computed. 2 bulk formulations are available: the ISOMIP one (\np{nn\_isfblk = 1}) described in (\np{nn\_isfblk = 2}), the 3 equation formulation described in \citet{Jenkins1991}. In addition to this, 
+3 different way to compute the exchange coefficient are available. $\gamma\_{T/S}$ is constant (\np{nn\_gammablk = 0}), $\gamma\_{T/S}$ is velocity dependant \citep{Jenkins2010} (\np{nn\_gammablk = 1}) and $\gamma\_{T/S}$ is velocity dependant and stratification dependent \citep{Holland1999} (\np{nn\_gammablk = 2}). For each of them, the thermal/salt exchange coefficient (\np{rn\_gammat0} and \np{rn\_gammas0}) have to be specified (the default values are for the ISOMIP case). 
 Full description, sensitivity and validation in preparation. 
 
@@ -969,5 +969,5 @@
 (\np{sn\_depmax\_isf}) and the base of the ice shelf along the calving front (\np{sn\_depmin\_isf}) as in (\np{nn\_isf}~=~3). 
 Furthermore the fwf is computed using the \citet{Beckmann2003} parameterisation of isf melting. 
-The effective melting length (\np{sn\_Leff\_isf}) is read from a file.
+The effective melting length (\np{sn\_Leff\_isf}) is read from a file and the exchange coefficients are set as (\np{rn\_gammat0}) and (\np{rn\_gammas0}).
 
 \item[\np{nn\_isf}~=~3]
@@ -987,13 +987,45 @@
 \np{nn\_isf}~=~3 and \np{nn\_isf}~=~4 read the melt rate and heat flux from a file. You have total control of the fwf scenario.
 
- This can be usefull if the water masses on the shelf are not realistic or the resolution (horizontal/vertical) are too 
+This can be usefull if the water masses on the shelf are not realistic or the resolution (horizontal/vertical) are too 
 coarse to have realistic melting or for sensitivity studies where you want to control your input. 
 Full description, sensitivity and validation in preparation. 
 
-There is 2 ways to apply the fwf to NEMO. The first possibility (\np{ln\_divisf}~=~false) applied the fwf
- and heat flux directly on the salinity and temperature tendancy. The second possibility (\np{ln\_divisf}~=~true)
- apply the fwf as for the runoff fwf (see \S\ref{SBC_rnf}). The mass/volume 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{divcur}). 
+\np{rn\_hisf\_tbl} is the top boundary layer (tbl) thickness used by the Losch parametrisation \citep{Losch2008} to compute the melt. if 0, temperature/salt/velocity in the top cell is used to compute the melt.
+Otherwise, NEMO used the mean value into the tbl. 
+
+\section{ Ice sheet coupling}
+\label{SBC_iscpl}
+%------------------------------------------namsbc_iscpl----------------------------------------------------
+\namdisplay{namsbc_iscpl}
+%--------------------------------------------------------------------------------------------------------
+Ice sheet/ocean coupling is done through file exchange at the restart step. NEMO, at each restart step, 
+read the bathymetry and ice shelf draft variable in a netcdf file. 
+If \np{ln\_iscpl = ~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 cases:
+\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 along i,j and k, T/S/U/V 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.
+\end{description}
+The extrapolation is call \np{nn\_drown} times. It means that if the grounding line retreat by more than \np{nn\_drown} cells between 2 coupling steps,
+ the code will be unable to fill all the new wet cells properly. 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. 
+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{ln\_hsb = ~true}. The heat/salt/vol. gain/loss is diagnose, as well as the location. 
+Based on what is done on sbcrnf to prescribed a source of heat/salt/vol., the heat/salt/vol. gain/loss is removed/added,
+ over a period of \np{rn\_fiscpl} time step, into the system. 
+So after \np{rn\_fiscpl} time step, all the heat/salt/vol. gain/loss due to extrapolation process is canceled.\\
+
+As the before and now fields are not compatible (modification of the geometry), the restart time step is prescribed to be an euler time step instead of a leap frog and $fields_b = fields_n$.
 %
 % ================================================================
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/nam_dia25h
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/nam_dia25h	(revision 6073)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/nam_dia25h	(revision 6073)
@@ -0,0 +1,5 @@
+!-----------------------------------------------------------------------
+&nam_dia25h  !   25h Mean Output
+!-----------------------------------------------------------------------
+   ln_dia25h  = .true.    !  Choose 25 mean output or not
+/
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/nam_diatmb
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/nam_diatmb	(revision 6073)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/nam_diatmb	(revision 6073)
@@ -0,0 +1,5 @@
+!-----------------------------------------------------------------------
+&nam_diatmb  !   25h Mean Output
+!-----------------------------------------------------------------------
+   ln_diatmb  = .true.    !  Choose Top Middle and Bottom output or not
+/
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namctl
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namctl	(revision 6072)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namctl	(revision 6073)
@@ -13,3 +13,4 @@
                            !     (no physical validity of the results)
    nn_timing   =    0      !  timing by routine activated (=1) creates timing.output file, or not (=0)
+   nn_diacfl   =    0      !  Write out cfl diagnostics (=1) in cfl_diagnostics.ascii, or not (=0)
 /
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namdiu
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namdiu	(revision 6073)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namdiu	(revision 6073)
@@ -0,0 +1,6 @@
+!-----------------------------------------------------------------------
+&namdiu        !   Control of diurnal SST models
+!-----------------------------------------------------------------------
+   ln_diurnal = .TRUE.   ! Turn diurnal models on/off
+   ln_diurnal_only = .FALSE.   ! Only run diurnal model, dynamical models switched off
+/
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namdom
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namdom	(revision 6072)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namdom	(revision 6073)
@@ -7,4 +7,5 @@
    nn_msh      =    1      !  create (=1) a mesh file or not (=0)
    rn_hmin     =   -3.     !  min depth of the ocean (>0) or min number of ocean level (<0)
+   rn_isfhmin  =    1.00   !  treshold (m) to discriminate grounding ice to floating ice
    rn_e3zps_min=   20.     !  partial step thickness is set larger than the minimum of
    rn_e3zps_rat=    0.1    !  rn_e3zps_min and rn_e3zps_rat*e3t, with 0<rn_e3zps_rat<1
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namobs
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namobs	(revision 6072)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namobs	(revision 6073)
@@ -1,55 +1,34 @@
 !-----------------------------------------------------------------------
-&namobs       !  observation usage switch                               ('key_diaobs')
+&namobs       !  observation usage switch
 !-----------------------------------------------------------------------
-   ln_t3d     = .false.    ! Logical switch for T profile observations
-   ln_s3d     = .false.    ! Logical switch for S profile observations
-   ln_ena     = .false.    ! Logical switch for ENACT insitu data set
-   ln_cor     = .false.    ! Logical switch for Coriolis insitu data set
-   ln_profb   = .false.    ! Logical switch for feedback insitu data set
-   ln_sla     = .false.    ! Logical switch for SLA observations
-   ln_sladt   = .false.    ! Logical switch for AVISO SLA data
-   ln_slafb   = .false.    ! Logical switch for feedback SLA data
-   ln_ssh     = .false.    ! Logical switch for SSH observations
-   ln_sst     = .false.    ! Logical switch for SST observations
-   ln_reysst  = .false.    ! Logical switch for Reynolds observations
-   ln_ghrsst  = .false.    ! Logical switch for GHRSST observations
-   ln_sstfb   = .false.    ! Logical switch for feedback SST data
-   ln_sss     = .false.    ! Logical switch for SSS observations
-   ln_seaice  = .false.    ! Logical switch for Sea Ice observations
-   ln_vel3d   = .false.    ! Logical switch for velocity observations
-   ln_velavcur= .false     ! Logical switch for velocity daily av. cur.
-   ln_velhrcur= .false     ! Logical switch for velocity high freq. cur.
-   ln_velavadcp=.false.    ! Logical switch for velocity daily av. ADCP
-   ln_velhradcp=.false.    ! Logical switch for velocity high freq. ADCP
-   ln_velfb   = .false.    ! Logical switch for feedback velocity data
-   ln_grid_global=.false.  ! Global distribtion of observations
-   ln_grid_search_lookup = .false. !  Logical switch for obs grid search w/lookup table
-   grid_search_file = 'grid_search'  !  Grid search lookup file header
-! All of the *files* variables below are arrays. Use namelist_cfg to add more files
-   enactfiles = 'enact.nc' !  ENACT input observation file names (specify full array in namelist_cfg)
-   coriofiles = 'corio.nc' !  Coriolis input observation file name
-   profbfiles = 'profiles_01.nc' ! Profile feedback input observation file name
-   ln_profb_enatim = .false !        Enact feedback input time setting switch
-   slafilesact = 'sla_act.nc' !  Active SLA input observation file names
-   slafilespas = 'sla_pass.nc' ! Passive SLA input observation file names
-   slafbfiles = 'sla_01.nc' ! slafbfiles: Feedback SLA input observation file names
-   sstfiles = 'ghrsst.nc'   ! GHRSST input observation file names
-   sstfbfiles = 'sst_01.nc' ! Feedback SST input observation file names
-   seaicefiles = 'seaice_01.nc' ! Sea Ice input observation file names
-   velavcurfiles  = 'velavcurfile.nc'  ! Vel. cur. daily av. input file name
-   velhrcurfiles  = 'velhrcurfile.nc'  ! Vel. cur. high freq. input file name
-   velavadcpfiles = 'velavadcpfile.nc' ! Vel. ADCP daily av. input file name
-   velhradcpfiles = 'velhradcpfile.nc' ! Vel. ADCP high freq. input file name
-   velfbfiles = 'velfbfile.nc' ! Vel. feedback input observation file name
-   dobsini = 20000101.000000  !  Initial date in window YYYYMMDD.HHMMSS
-   dobsend = 20010101.000000  !  Final date in window YYYYMMDD.HHMMSS
-   n1dint = 0  !               Type of vertical interpolation method
-   n2dint = 0  !               Type of horizontal interpolation method
-   ln_nea = .false.   !        Rejection of observations near land switch
-   nmsshc     = 0     !        MSSH correction scheme
-   mdtcorr = 1.61     !        MDT  correction
-   mdtcutoff = 65.0   !        MDT cutoff for computed correction
-   ln_altbias = .false.    ! Logical switch for alt bias
-   ln_ignmis  = .true.     ! Logical switch for ignoring missing files
-   endailyavtypes = 820    ! ENACT daily average types - array (use namelist_cfg to set more values)
+   ln_diaobs  = .true.                 ! Logical switch for the observation operator
+   ln_t3d     = .true.                 ! Logical switch for T profile observations
+   ln_s3d     = .true.                 ! Logical switch for S profile observations
+   ln_sla     = .true.                 ! Logical switch for SLA observations
+   ln_sst     = .true.                 ! Logical switch for SST observations
+   ln_sic     = .false.                ! Logical switch for Sea Ice observations
+   ln_vel3d   = .false.                ! Logical switch for velocity observations
+   ln_altbias = .false.                ! Logical switch for altimeter bias correction
+   ln_nea     = .false.                ! Logical switch for rejection of observations near land
+   ln_grid_global = .true.             ! Logical switch for global distribution of observations
+   ln_grid_search_lookup = .false.     ! Logical switch for obs grid search w/lookup table
+   ln_ignmis  = .true.                 ! Logical switch for ignoring missing files
+   ln_s_at_t  = .false.                ! Logical switch for computing model S at T obs if not there
+   ln_sstnight = .false.               ! Logical switch for calculating night-time average for SST obs
+   cn_profbfiles = 'profiles_01.nc'    ! Profile feedback input observation file names
+   cn_slafbfiles = 'sla_01.nc'         ! SLA feedback input observation file names
+   cn_sstfbfiles = 'sst_01.nc'         ! SST feedback input observation file names
+   cn_sicfbfiles = 'sic_01.nc'         ! SIC feedback input observation file names
+   cn_velfbfiles = 'vel_01.nc'         ! Velocity feedback input observation file names
+   cn_altbiasfile = 'altbias.nc'       ! Altimeter bias input file name
+   cn_gridsearchfile = 'gridsearch.nc' ! Grid search file name
+   rn_gridsearchres = 0.5              ! Grid search resolution
+   rn_dobsini = 20150101.000000        ! Initial date in window YYYYMMDD.HHMMSS
+   rn_dobsend = 20150102.000000        ! Final date in window YYYYMMDD.HHMMSS
+   nn_1dint = 0                        ! Type of vertical interpolation method
+   nn_2dint = 0                        ! Type of horizontal interpolation method
+   nn_msshc = 0                        ! MSSH correction scheme
+   rn_mdtcorr = 1.61                   ! MDT  correction
+   rn_mdtcutoff = 65.0                 ! MDT cutoff for computed correction
+   nn_profdavtypes = -1                ! Profile daily average types - array
 /
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namobs_example
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namobs_example	(revision 6072)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namobs_example	(revision 6073)
@@ -1,63 +1,34 @@
 !-----------------------------------------------------------------------
-!       namobs    observation usage switch
+&namobs       !  observation usage switch
 !-----------------------------------------------------------------------
-!
-!  ln_t3d                  Logical switch for T profile observations         
-!  ln_s3d                  Logical switch for S profile observations          
-!  ln_ena                  Logical switch for ENACT insitu data set           
-!  ln_cor                  Logical switch for Coriolis insitu data set       
-!  ln_profb                Logical switch for feedback insitu data set     
-!  ln_sla                  Logical switch for SLA observations               
-!  ln_sladt                Logical switch for AVISO SLA data              
-!  ln_slafb                Logical switch for feedback SLA data            
-!  ln_ssh                  Logical switch for SSH observations              
-!  ln_sst                  Logical switch for SST observations              
-!  ln_reysst               Logical switch for Reynolds observations       
-!  ln_ghrsst               Logical switch for GHRSST observations          
-!  ln_sstfb                Logical switch for feedback SST data          
-!  ln_sss                  Logical switch for SSS observations              
-!  ln_seaice               Logical switch for Sea Ice observations        
-!  ln_vel3d                Logical switch for velocity observations         
-!  ln_velavcur             Logical switch for velocity daily av. cur.    
-!  ln_velhrcur             Logical switch for velocity high freq. cur.   
-!  ln_velavadcp            Logical switch for velocity daily av. ADCP  
-!  ln_velhradcp            Logical switch for velocity high freq. ADCP
-!  ln_velfb                Logical switch for feedback velocity data       
-!  ln_grid_global          Global distribtion of observations         
-!  ln_grid_search_lookup   Logical switch for obs grid search w/lookup table  
-!  grid_search_file        Grid search lookup file header 
-!  enactfiles              ENACT input observation file names 
-!  coriofiles              Coriolis input observation file name  
-!  profbfiles              Profile feedback input observation file name 
-!  ln_profb_enatim         Enact feedback input time setting switch    
-!  slafilesact             Active SLA input observation file name
-!  slafilespas             Passive SLA input observation file name 
-!  slafbfiles              Feedback SLA input observation file name 
-!  sstfiles                GHRSST input observation file name       
-!  sstfbfiles              Feedback SST input observation file name 
-!  seaicefiles             Sea Ice input observation file name 
-!  velavcurfiles           Vel. cur. daily av. input file name  
-!  velhvcurfiles           Vel. cur. high freq. input file name  
-!  velavadcpfiles          Vel. ADCP daily av. input file name    
-!  velhvadcpfiles          Vel. ADCP high freq. input file name 
-!  velfbfiles              Vel. feedback input observation file name 
-!  dobsini                 Initial date in window YYYYMMDD.HHMMSS       
-!  dobsend                 Final date in window YYYYMMDD.HHMMSS         
-!  n1dint                  Type of vertical interpolation method        
-!  n2dint                  Type of horizontal interpolation method       
-!  ln_nea                  Rejection of observations near land switch    
-!  nmsshc                  MSSH correction scheme                         
-!  mdtcorr                 MDT  correction                               
-!  mdtcutoff               MDT cutoff for computed correction          
-!  ln_altbias              Logical switch for alt bias                
-!  ln_ignmis               Logical switch for ignoring missing files   
-!  endailyavtypes          ENACT daily average types                    
- &namobs
-   ln_t3d = .true.
-   ln_s3d = .true.
-   ln_ena = .true.
-   enactfiles = 'enact.1.nc'
-   ln_grid_global = .true.
-   ln_grid_search_lookup = .true.
-   ln_ignmis = .true.  
-/ 
+   ln_diaobs  = .true.                 ! Logical switch for the observation operator
+   ln_t3d     = .true.                 ! Logical switch for T profile observations
+   ln_s3d     = .true.                 ! Logical switch for S profile observations
+   ln_sla     = .false.                ! Logical switch for SLA observations
+   ln_sst     = .false.                ! Logical switch for SST observations
+   ln_sic     = .false.                ! Logical switch for Sea Ice observations
+   ln_vel3d   = .false.                ! Logical switch for velocity observations
+   ln_altbias = .false.                ! Logical switch for altimeter bias correction
+   ln_nea     = .false.                ! Logical switch for rejection of observations near land
+   ln_grid_global = .true.             ! Logical switch for global distribution of observations
+   ln_grid_search_lookup = .false.     ! Logical switch for obs grid search w/lookup table
+   ln_ignmis  = .true.                 ! Logical switch for ignoring missing files
+   ln_s_at_t  = .false.                ! Logical switch for computing model S at T obs if not there
+   ln_sstnight = .false.               ! Logical switch for calculating night-time average for SST obs
+   cn_profbfiles = 'profiles_01.nc'    ! Profile feedback input observation file names
+   cn_slafbfiles = 'sla_01.nc'         ! SLA feedback input observation file names
+   cn_sstfbfiles = 'sst_01.nc'         ! SST feedback input observation file names
+   cn_sicfbfiles = 'sic_01.nc'         ! SIC feedback input observation file names
+   cn_velfbfiles = 'vel_01.nc'         ! Velocity feedback input observation file names
+   cn_altbiasfile = 'altbias.nc'       ! Altimeter bias input file name
+   cn_gridsearchfile = 'gridsearch.nc' ! Grid search file name
+   rn_gridsearchres = 0.5              ! Grid search resolution
+   rn_dobsini = 00010101.000000        ! Initial date in window YYYYMMDD.HHMMSS
+   rn_dobsend = 00010102.000000        ! Final date in window YYYYMMDD.HHMMSS
+   nn_1dint = 0                        ! Type of vertical interpolation method
+   nn_2dint = 0                        ! Type of horizontal interpolation method
+   nn_msshc = 0                        ! MSSH correction scheme
+   rn_mdtcorr = 1.61                   ! MDT  correction
+   rn_mdtcutoff = 65.0                 ! MDT cutoff for computed correction
+   nn_profdavtypes = -1                ! Profile daily average types - array
+/
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namrun
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namrun	(revision 6072)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namrun	(revision 6073)
@@ -18,4 +18,5 @@
       cn_ocerst_out = "restart"  !  suffix of ocean restart name (output)
       cn_ocerst_outdir = "."     !  directory in which to write output ocean restarts
+   ln_iscpl    = .false.   !  cavity evolution forcing or coupling to ice sheet model (ln_iscpl = T => namsbc_iscpl)
    nn_istate   =       0   !  output the initial state (1) or not (0)
    ln_rst_list = .false.   !  output restarts at list of times using nn_stocklist (T) or at set frequency with nn_stock (F)
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namsbc
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namsbc	(revision 6072)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namsbc	(revision 6073)
@@ -38,9 +38,5 @@
                            !     =2 annual global mean of e-p-r set to zero
    ln_apr_dyn  = .false.   !  Patm gradient added in ocean & ice Eqs.   (T => fill namsbc_apr )
-   nn_isf      = 0         !  ice shelf melting/freezing                (/=0 => fill namsbc_isf)
-                           !  0 =no isf                  1 = presence of ISF
-                           !  2 = bg03 parametrisation   3 = rnf file for isf
-                           !  4 = ISF fwf specified
-                           !  option 1 and 4 need ln_isfcav = .true. (domzgr)
+   ln_isf      = .false.   !  ice shelf melting/freezing                (T => fill namsbc_isf)
    ln_wave = .false.       !  coupling with surface wave                    (T => fill namsbc_wave)
    nn_lsm  = 0             !  =0 land/sea mask for input fields is not applied (keep empty land/sea mask filename field) ,
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namsbc_iscpl
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namsbc_iscpl	(revision 6073)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namsbc_iscpl	(revision 6073)
@@ -0,0 +1,7 @@
+!-----------------------------------------------------------------------
+&namsbc_iscpl  !   land ice / ocean coupling option
+!-----------------------------------------------------------------------
+   nn_drown  = 10       ! number of iterations of the extrapolation loop (fill the new wet cells)
+   ln_hsb    = .false.  ! activate conservation module (conservation exact after a time of rn_fiscpl)
+   nn_fiscpl = 43800    ! (number of time step) conservation period (maybe should be fix to the coupling frequencey of restart frequency)
+/
Index: /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namsbc_isf
===================================================================
--- /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namsbc_isf	(revision 6072)
+++ /branches/2015/dev_merge_2015/DOC/TexFiles/Namelist/namsbc_isf	(revision 6073)
@@ -2,27 +2,30 @@
 &namsbc_isf    !  Top boundary layer (ISF)                              (nn_isf >0)
 !-----------------------------------------------------------------------
-!              ! file name ! frequency (hours) ! variable ! time interp. ! clim   ! 'yearly'/ ! weights  ! rotation !
-!              !           !  (if <0  months)  !   name   !   (logical)  ! (T/F)  ! 'monthly' ! filename ! pairing  !
+   nn_isf      = -99       !  ice shelf melting/freezing                (/=0 => fill namsbc_isf)
+                           !  1 = ISF explicit (cavity open)
+                           !  2 = bg03 parametrisation (cavity closed)  
+                           !  3 = ISF  specified in depth along the calving front (cavity closed)
+                           !  4 = ISF melting specified (cavity open)
+                           !  option 1 and 4 need ln_isfcav = .true. (domzgr)
+!              ! file name ! frequency (hours) ! variable ! time interpol. !  clim   ! 'yearly'/ ! weights  ! rotation !
+!              !           !  (if <0  months)  !   name   !    (logical)   !  (T/F)  ! 'monthly' ! filename ! pairing  !
 ! nn_isf == 4
-   sn_qisf      = 'rnfisf' ,         -12       ,'sohflisf',    .false.   , .true. , 'yearly'  ,  ''      ,   ''
-   sn_fwfisf    = 'rnfisf' ,         -12       ,'sowflisf',    .false.   , .true. , 'yearly'  ,  ''      ,   ''
+   sn_fwfisf     = 'rnfisf',         -12       ,'sowflisf',    .false.      , .true.  , 'yearly'  ,  ''      ,   ''
 ! nn_isf == 3
-   sn_rnfisf    = 'runoffs',         -12       ,'sofwfisf',    .false.   , .true. , 'yearly'  ,  ''      ,   ''
-! nn_isf == 2 and 3
-   sn_depmax_isf = 'runoffs',        -12       ,'sozisfmax',   .false.   , .true. , 'yearly'  ,  ''      ,   ''
-   sn_depmin_isf = 'runoffs',        -12       ,'sozisfmin',   .false.   , .true. , 'yearly'  ,  ''      ,   ''
+   sn_rnfisf     = 'rnfisf',         -12       ,'sofwfisf',    .false.   , .true. , 'yearly'  ,  ''      ,   ''
+! nn_isf == 2 or 3
+   sn_depmax_isf = 'rnfisf',         -12       ,'sozisfmax',   .false.   , .true. , 'yearly'  ,  ''      ,   ''
+   sn_depmin_isf = 'rnfisf',         -12       ,'sozisfmin',   .false.   , .true. , 'yearly'  ,  ''      ,   ''
 ! nn_isf == 2
-   sn_Leff_isf = 'rnfisf'  ,           0       ,'Leff'    ,    .false.   , .true. , 'yearly'  ,  ''      ,   ''
+   sn_Leff_isf = 'rnfisf'  ,         -12       ,'Leff'     ,    .false.  , .true. , 'yearly'  ,  ''      ,   ''
 
-! for all case
-   ln_divisf   = .true.   ! apply isf melting as a mass flux or in the salinity trend. (maybe I should remove this option as for runoff?)
 ! only for nn_isf = 1 or 2
    rn_gammat0  = 1.e-4    ! gammat coefficient used in blk formula
    rn_gammas0  = 1.e-4    ! gammas coefficient used in blk formula
+! only for nn_isf = 1 or 4
+   nn_isfblk   =  1       ! 1 ISOMIP ; 2 conservative (3 equation formulation, Jenkins et al. 1991 ??)
 ! only for nn_isf = 1
-   nn_isfblk   =  1       ! 1 ISOMIP ; 2 conservative (3 equation formulation, Jenkins et al. 1991 ??)
    rn_hisf_tbl =  30.     ! thickness of the top boundary layer           (Losh et al. 2008)
                           ! 0 => thickness of the tbl = thickness of the first wet cell
-   ln_conserve = .true.   ! conservative case (take into account meltwater advection)
    nn_gammablk = 1        ! 0 = cst Gammat (= gammat/s)
                           ! 1 = velocity dependend Gamma (u* * gammat/s)  (Jenkins et al. 2010)
Index: /branches/2015/dev_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg
===================================================================
--- /branches/2015/dev_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg	(revision 6072)
+++ /branches/2015/dev_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg	(revision 6073)
@@ -56,8 +56,4 @@
    rn_rdtmin   = 14400.          !  minimum time step on tracers (used if nn_acc=1)
    rn_rdtmax   = 14400.          !  maximum time step on tracers (used if nn_acc=1)
-/
-!-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
@@ -201,9 +197,13 @@
    ln_dynvor_een = .true.  !  energy & enstrophy scheme
       nn_een_e3f = 1             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1)
-   ln_dynvor_msk = .true.  !  vorticity multiplied by fmask (=T) or not (=F) (all vorticity schemes)
 /
 !-----------------------------------------------------------------------
 &namdyn_hpg    !   Hydrostatic pressure gradient option
 !-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_spg    !   Surface pressure gradient
+!-----------------------------------------------------------------------
+   ln_dynspg_ts = .true.   !  Split-explicit free surface
 /
 !-----------------------------------------------------------------------
@@ -249,8 +249,4 @@
 /
 !-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface 
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg	(revision 6072)
+++ /branches/2015/dev_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg	(revision 6073)
@@ -52,8 +52,4 @@
    ppkth2      =  999999.              !
    ppacr2      =  999999.              !
-/
-!-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
@@ -195,4 +191,9 @@
 /
 !-----------------------------------------------------------------------
+&namdyn_spg    !   Surface pressure gradient
+!-----------------------------------------------------------------------
+   ln_dynspg_ts = .true.   !  Split-explicit free surface
+/
+!-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
 !-----------------------------------------------------------------------
@@ -235,8 +236,4 @@
 /
 !-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
 !-----------------------------------------------------------------------
@@ -255,8 +252,4 @@
 /
 !-----------------------------------------------------------------------
-&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namobs       !  observation usage
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg	(revision 6072)
+++ /branches/2015/dev_merge_2015/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg	(revision 6073)
@@ -167,5 +167,6 @@
    !                                !   = 21 F(i,j,t)  =Treguier et al. JPO 1997 formulation
    !                                !   = 30 F(i,j,k)  =ldf_c2d + ldf_c1d
-/!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
 &namtra_dmp    !   tracer: T & S newtonian damping
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_merge_2015/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- /branches/2015/dev_merge_2015/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 6072)
+++ /branches/2015/dev_merge_2015/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 6073)
@@ -886,5 +886,5 @@
    ln_dynvor_een = .false. !  energy & enstrophy scheme
       nn_een_e3f = 1          ! e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1)
-   ln_dynvor_msk = .false. !  vorticity multiplied by fmask (=T) or not (=F) (all vorticity schemes)  ! PLEASE DO NOT USE
+   ln_dynvor_msk = .false. !  vorticity multiplied by fmask (=T) or not (=F) (all vorticity schemes)  ! PLEASE DO NOT ACTIVATE
 /
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diacfl.F90
===================================================================
--- /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diacfl.F90	(revision 6072)
+++ /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DIA/diacfl.F90	(revision 6073)
@@ -83,5 +83,5 @@
 
                   ! Courant number for z-direction (vertical current)
-                  zcw_cfl(ji,jj,jk) = ABS(wn(ji,jj,jk))*dt/fse3w_n(ji,jj,jk)
+                  zcw_cfl(ji,jj,jk) = ABS(wn(ji,jj,jk))*dt/e3w_n(ji,jj,jk)
                END DO
             END DO         
Index: /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_lap_blp.F90
===================================================================
--- /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_lap_blp.F90	(revision 6072)
+++ /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_lap_blp.F90	(revision 6073)
@@ -80,5 +80,5 @@
             DO ji = fs_2, jpi   ! vector opt.
                !                                      ! ahm * e3 * curl  (computed from 1 to jpim1/jpjm1)
-!!gm open question here : fse3f  at before or now ?    probably now...
+!!gm open question here : e3f  at before or now ?    probably now...
 !!gm note that ahmf has already been multiplied by fmask
                zcur(ji-1,jj-1) = ahmf(ji-1,jj-1,jk) * e3f_n(ji-1,jj-1,jk) * r1_e1e2f(ji-1,jj-1)       &
Index: /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
===================================================================
--- /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 6072)
+++ /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 6073)
@@ -148,8 +148,8 @@
                      CALL iom_rstput( kt, nitrst, numrow, 'vmask'  , vmask     ) ! need to correct barotropic velocity
                      CALL iom_rstput( kt, nitrst, numrow, 'smask'  , ssmask    ) ! need to correct barotropic velocity
-                     CALL iom_rstput( kt, nitrst, numrow, 'fse3t_n', fse3t_n(:,:,:) )   ! need to compute temperature correction
-                     CALL iom_rstput( kt, nitrst, numrow, 'fse3u_n', fse3u_n(:,:,:) )   ! need to compute bt conservation
-                     CALL iom_rstput( kt, nitrst, numrow, 'fse3v_n', fse3v_n(:,:,:) )   ! need to compute bt conservation
-                     CALL iom_rstput( kt, nitrst, numrow, 'fsdepw_n', fsdepw_n(:,:,:) ) ! need to compute extrapolation if vvl
+                     CALL iom_rstput( kt, nitrst, numrow, 'e3t_n', e3t_n(:,:,:) )   ! need to compute temperature correction
+                     CALL iom_rstput( kt, nitrst, numrow, 'e3u_n', e3u_n(:,:,:) )   ! need to compute bt conservation
+                     CALL iom_rstput( kt, nitrst, numrow, 'e3v_n', e3v_n(:,:,:) )   ! need to compute bt conservation
+                     CALL iom_rstput( kt, nitrst, numrow, 'gdepw_n', gdepw_n(:,:,:) ) ! need to compute extrapolation if vvl
                   END IF
       ENDIF
Index: /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90
===================================================================
--- /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 6072)
+++ /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 6073)
@@ -529,9 +529,6 @@
       !! * Modules used
       USE dom_oce, ONLY : &             ! Ocean space and time domain variables
-#if defined key_vvl 
          & gdept_n       
-#else 
          & gdept_1d      
-#endif                                        
       USE phycst, ONLY : &              ! Physical constants
          & rday                         
@@ -647,5 +644,5 @@
                   &              kstp, jpi, jpj, jpk, nit000, idaystp,   & 
                   &              zprofvar1, zprofvar2,                   & 
-                  &              fsdept(:,:,:), fsdepw(:,:,:),           &
+                  &              gdept_n(:,:,:), gdepw_n(:,:,:),           &
                   &              tmask, nn_1dint, nn_2dint,              & 
                   &              kdailyavtypes = nn_profdavtypes ) 
Index: /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/OBS/obs_oper.F90
===================================================================
--- /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/OBS/obs_oper.F90	(revision 6072)
+++ /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/OBS/obs_oper.F90	(revision 6073)
@@ -30,9 +30,5 @@
       & glamt, glamu, glamv, &
       & gphit, gphiu, gphiv, & 
-#if defined key_vvl 
-      & gdept_n 
-#else 
-      & gdept_0 
-#endif  
+      & gdept_n, gdept_0 
    USE lib_mpp,       ONLY : &
       & ctl_warn, ctl_stop
@@ -547,10 +543,4 @@
       !! * Modules used 
       USE obs_profiles_def   ! Definition of storage space for profile obs. 
-      USE dom_oce,  ONLY : & 
-#if defined key_vvl  
-      &   gdepw_n 
-#else 
-      &   gdepw_0 
-#endif 
        
       IMPLICIT NONE 
Index: /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/OBS/obs_prep.F90
===================================================================
--- /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/OBS/obs_prep.F90	(revision 6072)
+++ /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/OBS/obs_prep.F90	(revision 6073)
@@ -1057,8 +1057,6 @@
          & gdepw_1d,      &
          & gdepw_0,       &                       
-#if defined key_vvl
          & gdepw_n,       &
          & gdept_n,       &
-#endif
          & ln_zco,        &
          & ln_zps             
@@ -1150,5 +1148,5 @@
       IF ( .NOT.( ln_zps .OR. ln_zco ) ) THEN
         ! Need to know the bathy depth for each observation for sco
-        CALL obs_int_comm_3d( 2, 2, kprofno, kpi, kpj, kpk, igrdi, igrdj, fsdepw(:,:,:), &
+        CALL obs_int_comm_3d( 2, 2, kprofno, kpi, kpj, kpk, igrdi, igrdj, gdepw_n(:,:,:), &
         &                     zgdepw )
       ENDIF
Index: /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
===================================================================
--- /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 6072)
+++ /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 6073)
@@ -567,5 +567,5 @@
       !
  !!gm Not sure of that coding for ISF....
-      ! where wmask = 0 set zmxlm == fse3w
+      ! where wmask = 0 set zmxlm == e3w_n
       CASE ( 0 )           ! bounded by the distance to surface and bottom
          DO jk = 2, jpkm1
Index: /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 6072)
+++ /branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 6073)
@@ -293,5 +293,5 @@
 !!    place.
 !! 
-!!jc2: dynnxt must be the latest call. fse3t_b are indeed updated in that routine
+!!jc2: dynnxt must be the latest call. e3t_b are indeed updated in that routine
                          CALL tra_nxt       ( kstp )  ! finalize (bcs) tracer fields at next time step and swap
                          CALL dyn_nxt       ( kstp )  ! finalize (bcs) velocities at next time step and swap
