Index: NEMO/trunk/doc/latex/NEMO/subfiles/annex_A.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/annex_A.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/annex_A.tex	(revision 11435)
@@ -9,5 +9,5 @@
 \label{apdx:A}
 
-\minitoc
+\chaptertoc
 
 \vfill
@@ -31,5 +31,5 @@
 
 In order to establish the set of Primitive Equation in curvilinear $s$-coordinates
-(\ie an orthogonal curvilinear coordinate in the horizontal and
+(\ie\ an orthogonal curvilinear coordinate in the horizontal and
 an Arbitrary Lagrangian Eulerian (ALE) coordinate in the vertical),
 we start from the set of equations established in \autoref{subsec:PE_zco_Eq} for
@@ -329,5 +329,5 @@
 \]
 This leads to the $s-$coordinate formulation of the total $z-$coordinate time derivative,
-\ie the total $s-$coordinate time derivative :
+\ie\ the total $s-$coordinate time derivative :
 \begin{align}
   \label{apdx:A_sco_Dt_vect}
@@ -368,5 +368,5 @@
 %
 Introducing the vertical scale factor inside the horizontal derivative of the first two terms 
-(\ie the horizontal divergence), it becomes :
+(\ie\ the horizontal divergence), it becomes :
 \begin{align*}
   {
@@ -411,5 +411,5 @@
 \end{align*}
 which leads to the $s-$coordinate flux formulation of the total $s-$coordinate time derivative, 
-\ie the total $s-$coordinate time derivative in flux form:
+\ie\ the total $s-$coordinate time derivative in flux form:
 \begin{flalign}
   \label{apdx:A_sco_Dt_flux}
@@ -569,5 +569,5 @@
 in particular the pressure gradient.
 By contrast, $\omega$ is not $w$, the third component of the velocity, but the dia-surface velocity component,
-\ie the volume flux across the moving $s$-surfaces per unit horizontal area. 
+\ie\ the volume flux across the moving $s$-surfaces per unit horizontal area. 
 
 
Index: NEMO/trunk/doc/latex/NEMO/subfiles/annex_B.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/annex_B.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/annex_B.tex	(revision 11435)
@@ -8,5 +8,5 @@
 \label{apdx:B}
 
-\minitoc
+\chaptertoc
 
 \newpage
Index: NEMO/trunk/doc/latex/NEMO/subfiles/annex_C.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/annex_C.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/annex_C.tex	(revision 11435)
@@ -8,5 +8,5 @@
 \label{apdx:C}
 
-\minitoc
+\chaptertoc
 
 %%%  Appendix put in gmcomment as it has not been updated for \zstar and s coordinate
@@ -39,7 +39,7 @@
 $dv=e_1\,e_2\,e_3 \,di\,dj\,dk$  is the volume element, with only $e_3$ that depends on time.
 $D$ and $S$ are the ocean domain volume and surface, respectively.
-No wetting/drying is allow (\ie $\frac{\partial S}{\partial t} = 0$).
+No wetting/drying is allow (\ie\ $\frac{\partial S}{\partial t} = 0$).
 Let $k_s$ and $k_b$ be the ocean surface and bottom, resp.
-(\ie $s(k_s) = \eta$ and $s(k_b)=-H$, where $H$ is the bottom depth).
+(\ie\ $s(k_s) = \eta$ and $s(k_b)=-H$, where $H$ is the bottom depth).
 \begin{flalign*}
   z(k) = \eta - \int\limits_{\tilde{k}=k}^{\tilde{k}=k_s}  e_3(\tilde{k}) \;d\tilde{k}
@@ -99,9 +99,9 @@
 \label{sec:C.1}
 
-The discretization of pimitive equation in $s$-coordinate (\ie time and space varying vertical coordinate)
-must be chosen so that the discrete equation of the model satisfy integral constrains on energy and enstrophy. 
+The discretization of pimitive equation in $s$-coordinate (\ie\ time and space varying vertical coordinate)
+must be chosen so that the discrete equation of the model satisfy integral constrains on energy and enstrophy.
 
 Let us first establish those constraint in the continuous world.
-The total energy (\ie kinetic plus potential energies) is conserved:
+The total energy (\ie\ kinetic plus potential energies) is conserved:
 \begin{flalign}
   \label{eq:Tot_Energy}
@@ -109,5 +109,5 @@
 \end{flalign}
 under the following assumptions: no dissipation, no forcing (wind, buoyancy flux, atmospheric pressure variations),
-mass conservation, and closed domain. 
+mass conservation, and closed domain.
 
 This equation can be transformed to obtain several sub-equalities.
@@ -211,5 +211,5 @@
 \end{subequations}
 
-\autoref{eq:E_tot_pg_3} is the balance between the conversion KE to PE and PE to KE. 
+\autoref{eq:E_tot_pg_3} is the balance between the conversion KE to PE and PE to KE.
 Indeed the left hand side of \autoref{eq:E_tot_pg_3} can be transformed as follows:
 \begin{flalign*}
@@ -224,7 +224,7 @@
   &=+  \int\limits_D g\, \rho \; w \; dv   &&&\\
 \end{flalign*}
-where the last equality is obtained by noting that the brackets is exactly the expression of $w$, 
-the vertical velocity referenced to the fixe $z$-coordinate system (see \autoref{apdx:A_w_s}). 
- 
+where the last equality is obtained by noting that the brackets is exactly the expression of $w$,
+the vertical velocity referenced to the fixe $z$-coordinate system (see \autoref{apdx:A_w_s}).
+
 The left hand side of \autoref{eq:E_tot_pg_3} can be transformed as follows:
 \begin{flalign*}
@@ -367,5 +367,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsubsection{Vorticity term with ENE scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})}
-\label{subsec:C_vorENE} 
+\label{subsec:C_vorENE}
 
 For the ENE scheme, the two components of the vorticity term are given by:
@@ -399,5 +399,5 @@
         - \overline{ U }^{\,j+1/2}\; \overline{ V }^{\,i+1/2}         \biggr\}  \quad  \equiv 0
     \end{array}
-  } 		
+  }
 \end{flalign*}
 In other words, the domain averaged kinetic energy does not change due to the vorticity term.
@@ -407,7 +407,7 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsubsection{Vorticity term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})}
-\label{subsec:C_vorEEN_vect} 
-
-With the EEN scheme, the vorticity terms are represented as: 
+\label{subsec:C_vorEEN_vect}
+
+With the EEN scheme, the vorticity terms are represented as:
 \begin{equation}
   \tag{\ref{eq:dynvor_een}}
@@ -420,7 +420,7 @@
       \end{aligned}
     } \right.
-\end{equation} 
+\end{equation}
 where the indices $i_p$ and $j_p$ take the following value: $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$,
-and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: 
+and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by:
 \begin{equation}
   \tag{\ref{eq:Q_triads}}
@@ -479,5 +479,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsubsection{Gradient of kinetic energy / Vertical advection}
-\label{subsec:C_zad} 
+\label{subsec:C_zad}
 
 The change of Kinetic Energy (KE) due to the vertical advection is exactly balanced by the change of KE due to the horizontal gradient of KE~:
@@ -487,8 +487,8 @@
   +   \frac{1}{2} \int_D {  \frac{{\textbf{U}_h}^2}{e_3} \partial_t ( e_3) \;dv }
 \]
-Indeed, using successively \autoref{eq:DOM_di_adj} (\ie the skew symmetry property of the $\delta$ operator)
+Indeed, using successively \autoref{eq:DOM_di_adj} (\ie\ the skew symmetry property of the $\delta$ operator)
 and the continuity equation, then \autoref{eq:DOM_di_adj} again,
 then the commutativity of operators $\overline {\,\cdot \,}$ and $\delta$, and finally \autoref{eq:DOM_mi_adj}
-(\ie the symmetry property of the $\overline {\,\cdot \,}$ operator)
+(\ie\ the symmetry property of the $\overline {\,\cdot \,}$ operator)
 applied in the horizontal and vertical directions, it becomes:
 \begin{flalign*}
@@ -566,5 +566,5 @@
       } } \right)
 \]
-a formulation that requires an additional horizontal mean in contrast with the one used in NEMO.
+a formulation that requires an additional horizontal mean in contrast with the one used in \NEMO.
 Nine velocity points have to be used instead of 3.
 This is the reason why it has not been chosen.
@@ -595,11 +595,11 @@
   A pressure gradient has no contribution to the evolution of the vorticity as the curl of a gradient is zero.
   In the $z$-coordinate, this property is satisfied locally on a C-grid with 2nd order finite differences
-  (property \autoref{eq:DOM_curl_grad}). 
+  (property \autoref{eq:DOM_curl_grad}).
 }
 
 When the equation of state is linear
-(\ie when an advection-diffusion equation for density can be derived from those of temperature and salinity)
+(\ie\ when an advection-diffusion equation for density can be derived from those of temperature and salinity)
 the change of KE due to the work of pressure forces is balanced by
-the change of potential energy due to buoyancy forces: 
+the change of potential energy due to buoyancy forces:
 \[
   - \int_D  \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv
@@ -621,5 +621,5 @@
   %
   \allowdisplaybreaks
-  \intertext{Using successively \autoref{eq:DOM_di_adj}, \ie the skew symmetry property of
+  \intertext{Using successively \autoref{eq:DOM_di_adj}, \ie\ the skew symmetry property of
     the $\delta$ operator, \autoref{eq:wzv}, the continuity equation, \autoref{eq:dynhpg_sco},
     the hydrostatic equation in the $s$-coordinate, and $\delta_{k+1/2} \left[ z_t \right] \equiv e_{3w} $,
@@ -771,5 +771,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsubsection{Coriolis plus ``metric'' term}
-\label{subsec:C.3.3} 
+\label{subsec:C.3.3}
 
 In flux from the vorticity term reduces to a Coriolis term in which
@@ -792,5 +792,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsubsection{Flux form advection}
-\label{subsec:C.3.4} 
+\label{subsec:C.3.4}
 
 The flux form operator of the momentum advection is evaluated using
@@ -811,5 +811,5 @@
 
 Let us first consider the first term of the scalar product
-(\ie just the the terms associated with the i-component of the advection):
+(\ie\ just the the terms associated with the i-component of the advection):
 \begin{flalign*}
   &  - \int_D u \cdot \nabla \cdot \left(   \textbf{U}\,u   \right) \; dv   \\
@@ -867,5 +867,5 @@
 When the UBS scheme is used to evaluate the flux form momentum advection,
 the discrete operator does not contribute to the global budget of linear momentum (flux form).
-The horizontal kinetic energy is not conserved, but forced to decay (\ie the scheme is diffusive). 
+The horizontal kinetic energy is not conserved, but forced to decay (\ie\ the scheme is diffusive).
 
 % ================================================================
@@ -879,5 +879,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsubsection{Vorticity term with ENS scheme  (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})}
-\label{subsec:C_vorENS} 
+\label{subsec:C_vorENS}
 
 In the ENS scheme, the vorticity term is descretized as follows:
@@ -890,8 +890,8 @@
     \end{aligned}
   \right.
-\end{equation} 
+\end{equation}
 
 The scheme does not allow but the conservation of the total kinetic energy but the conservation of $q^2$,
-the potential enstrophy for a horizontally non-divergent flow (\ie when $\chi$=$0$).
+the potential enstrophy for a horizontally non-divergent flow (\ie\ when $\chi$=$0$).
 Indeed, using the symmetry or skew symmetry properties of the operators
 ( \autoref{eq:DOM_mi_adj} and \autoref{eq:DOM_di_adj}),
@@ -942,5 +942,5 @@
   }
 \end{flalign*}
-The later equality is obtain only when the flow is horizontally non-divergent, \ie $\chi$=$0$. 
+The later equality is obtain only when the flow is horizontally non-divergent, \ie\ $\chi$=$0$.
 
 % -------------------------------------------------------------------------------------------------------------
@@ -948,7 +948,7 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsubsection{Vorticity Term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})}
-\label{subsec:C_vorEEN} 
-
-With the EEN scheme, the vorticity terms are represented as: 
+\label{subsec:C_vorEEN}
+
+With the EEN scheme, the vorticity terms are represented as:
 \begin{equation}
   \tag{\ref{eq:dynvor_een}}
@@ -961,8 +961,8 @@
       \end{aligned}
     } \right.
-\end{equation} 
-where the indices $i_p$ and $k_p$ take the following values: 
+\end{equation}
+where the indices $i_p$ and $k_p$ take the following values:
 $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$,
-and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: 
+and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by:
 \begin{equation}
   \tag{\ref{eq:Q_triads}}
@@ -971,5 +971,5 @@
 \end{equation}
 
-This formulation does conserve the potential enstrophy for a horizontally non-divergent flow (\ie $\chi=0$). 
+This formulation does conserve the potential enstrophy for a horizontally non-divergent flow (\ie\ $\chi=0$).
 
 Let consider one of the vorticity triad, for example ${^{i}_j}\mathbb{Q}^{+1/2}_{+1/2} $,
@@ -1023,14 +1023,14 @@
 \label{sec:C.5}
 
-All the numerical schemes used in NEMO are written such that the tracer content is conserved by
+All the numerical schemes used in \NEMO\ are written such that the tracer content is conserved by
 the internal dynamics and physics (equations in flux form).
 For advection,
-only the CEN2 scheme (\ie $2^{nd}$ order finite different scheme) conserves the global variance of tracer.
+only the CEN2 scheme (\ie\ $2^{nd}$ order finite different scheme) conserves the global variance of tracer.
 Nevertheless the other schemes ensure that the global variance decreases
-(\ie they are at least slightly diffusive).
+(\ie\ they are at least slightly diffusive).
 For diffusion, all the schemes ensure the decrease of the total tracer variance, except the iso-neutral operator.
 There is generally no strict conservation of mass,
 as the equation of state is non linear with respect to $T$ and $S$.
-In practice, the mass is conserved to a very high accuracy. 
+In practice, the mass is conserved to a very high accuracy.
 % -------------------------------------------------------------------------------------------------------------
 %       Advection Term
@@ -1056,5 +1056,5 @@
 Indeed, let $T$ be the tracer and its $\tau_u$, $\tau_v$, and $\tau_w$ interpolated values at velocity point
 (whatever the interpolation is),
-the conservation of the tracer content due to the advection tendency is obtained as follows: 
+the conservation of the tracer content due to the advection tendency is obtained as follows:
 \begin{flalign*}
   &\int_D { \frac{1}{e_3}\frac{\partial \left( e_3 \, T \right)}{\partial t} \;dv } = - \int_D \nabla \cdot \left( T \textbf{U} \right)\;dv    &&&\\
@@ -1072,5 +1072,5 @@
 
 The conservation of the variance of tracer due to the advection tendency can be achieved only with the CEN2 scheme,
-\ie when $\tau_u= \overline T^{\,i+1/2}$, $\tau_v= \overline T^{\,j+1/2}$, and $\tau_w= \overline T^{\,k+1/2}$. 
+\ie\ when $\tau_u= \overline T^{\,i+1/2}$, $\tau_v= \overline T^{\,j+1/2}$, and $\tau_w= \overline T^{\,k+1/2}$.
 It can be demonstarted as follows:
 \begin{flalign*}
@@ -1108,15 +1108,15 @@
 the conservation of potential vorticity and the horizontal divergence,
 and the dissipation of the square of these quantities
-(\ie enstrophy and the variance of the horizontal divergence) as well as
+(\ie\ enstrophy and the variance of the horizontal divergence) as well as
 the dissipation of the horizontal kinetic energy.
 In particular, when the eddy coefficients are horizontally uniform,
 it ensures a complete separation of vorticity and horizontal divergence fields,
 so that diffusion (dissipation) of vorticity (enstrophy) does not generate horizontal divergence
-(variance of the horizontal divergence) and \textit{vice versa}. 
+(variance of the horizontal divergence) and \textit{vice versa}.
 
 These properties of the horizontal diffusion operator are a direct consequence of
 properties \autoref{eq:DOM_curl_grad} and \autoref{eq:DOM_div_curl}.
 When the vertical curl of the horizontal diffusion of momentum (discrete sense) is taken,
-the term associated with the horizontal gradient of the divergence is locally zero. 
+the term associated with the horizontal gradient of the divergence is locally zero.
 
 % -------------------------------------------------------------------------------------------------------------
@@ -1237,5 +1237,5 @@
 
 When the horizontal divergence of the horizontal diffusion of momentum (discrete sense) is taken,
-the term associated with the vertical curl of the vorticity is zero locally, due to \autoref{eq:DOM_div_curl}. 
+the term associated with the vertical curl of the vorticity is zero locally, due to \autoref{eq:DOM_div_curl}.
 The resulting term conserves the $\chi$ and dissipates $\chi^2$ when the eddy coefficients are horizontally uniform.
 \begin{flalign*}
@@ -1396,5 +1396,5 @@
     \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv = 0    &&&
 \end{flalign*}
-and the square of the horizontal divergence decreases (\ie the horizontal divergence is dissipated) if
+and the square of the horizontal divergence decreases (\ie\ the horizontal divergence is dissipated) if
 the vertical diffusion coefficient is uniform over the whole domain:
 
@@ -1463,6 +1463,6 @@
 the heat and salt contents are conserved (equations in flux form).
 Since a flux form is used to compute the temperature and salinity,
-the quadratic form of these quantities (\ie their variance) globally tends to diminish.
-As for the advection term, there is conservation of mass only if the Equation Of Seawater is linear. 
+the quadratic form of these quantities (\ie\ their variance) globally tends to diminish.
+As for the advection term, there is conservation of mass only if the Equation Of Seawater is linear.
 
 % -------------------------------------------------------------------------------------------------------------
@@ -1497,5 +1497,5 @@
 \end{flalign*}
 
-In fact, this property simply results from the flux form of the operator. 
+In fact, this property simply results from the flux form of the operator.
 
 % -------------------------------------------------------------------------------------------------------------
Index: NEMO/trunk/doc/latex/NEMO/subfiles/annex_DOMAINcfg.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/annex_DOMAINcfg.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/annex_DOMAINcfg.tex	(revision 11435)
@@ -8,5 +8,5 @@
 \label{apdx:DOMAINcfg}
 
-\minitoc
+\chaptertoc
 \vfill
 \begin{figure}[b]
@@ -25,6 +25,6 @@
 
 This tool will evolve into an independent utility with its own documentation but its
-current manifestation is mostly a wrapper for \NEMO \forcode{DOM} modules more aligned to
-those in the previous versions of NEMO. These versions allowed the user to define some
+current manifestation is mostly a wrapper for \NEMO\ \forcode{DOM} modules more aligned to
+those in the previous versions of \NEMO. These versions allowed the user to define some
 horizontal and vertical grids through additional namelist parameters. Explanations of
 these parameters are retained here for reference pending better documentation for
@@ -32,5 +32,5 @@
 those read by \forcode{DOMAINcfg} via its own \forcode{namelist_ref} and
 \forcode{namelist_cfg} files. Although, due to their origins, these namelists share names
-with those used by NEMO, they are not interchangeable and should be considered independent
+with those used by \NEMO, they are not interchangeable and should be considered independent
 of those described elsewhere in this manual.
 
@@ -43,9 +43,9 @@
 %--------------------------------------------namdom-------------------------------------------------------
 
-\nlst{namdom_domcfg} 
+\nlst{namdom_domcfg}
 %--------------------------------------------------------------------------------------------------------------
 
 The user has three options available in defining a horizontal grid, which involve the
-namelist variable \np{jphgr\_mesh} of the \ngn{namdom} (\forcode{DOMAINcfg} variant only)
+namelist variable \np{jphgr\_mesh} of the \nam{dom} (\texttt{DOMAINcfg} variant only)
 namelist.
 
@@ -54,47 +54,47 @@
   The coordinates and their first derivatives with respect to $i$ and $j$ are provided
   in a input file (\ifile{coordinates}), read in \rou{hgr\_read} subroutine of the domhgr module.
-  This is now the only option available within \NEMO itself from v4.0 onwards.
-\item[\np{jphgr\_mesh}=1 to 5] A few simple analytical grids are provided (see below). 
-  For other analytical grids, the \textit{domhgr.f90} module (\forcode{DOMAINcfg} variant) must be 
-  modified by the user. In most cases, modifying the \mdl{usrdef\_hgr} module of \NEMO is
-  a better alternative since this is designed to allow simple analytical domains to be 
+  This is now the only option available within \NEMO\ itself from v4.0 onwards.
+\item[\np{jphgr\_mesh}=1 to 5] A few simple analytical grids are provided (see below).
+  For other analytical grids, the \mdl{domhgr} module (\texttt{DOMAINcfg} variant) must be
+  modified by the user. In most cases, modifying the \mdl{usrdef\_hgr} module of \NEMO\ is
+  a better alternative since this is designed to allow simple analytical domains to be
   configured and used without the need for external data files.
 \end{description}
 
-There are two simple cases of geographical grids on the sphere. With 
-\np{jphgr\_mesh}=1, the grid (expressed in degrees) is regular in space, 
-with grid sizes specified by parameters \np{ppe1\_deg} and \np{ppe2\_deg}, 
-respectively. Such a geographical grid can be very anisotropic at high latitudes 
-because of the convergence of meridians (the zonal scale factors $e_1$ 
-become much smaller than the meridional scale factors $e_2$). The Mercator 
-grid (\np{jphgr\_mesh}=4) avoids this anisotropy by refining the meridional scale 
-factors in the same way as the zonal ones. In this case, meridional scale factors 
-and latitudes are calculated analytically using the formulae appropriate for 
-a Mercator projection, based on \np{ppe1\_deg} which is a reference grid spacing 
-at the equator (this applies even when the geographical equator is situated outside 
-the model domain). 
-
-In these two cases (\np{jphgr\_mesh}=1 or 4), the grid position is defined by the 
-longitude and latitude of the south-westernmost point (\np{ppglamt0} 
-and \np{ppgphi0}). Note that for the Mercator grid the user need only provide 
-an approximate starting latitude: the real latitude will be recalculated analytically, 
-in order to ensure that the equator corresponds to line passing through $t$- 
-and $u$-points.  
-
-Rectangular grids ignoring the spherical geometry are defined with 
-\np{jphgr\_mesh} = 2, 3, 5. The domain is either an $f$-plane (\np{jphgr\_mesh} = 2, 
-Coriolis factor is constant) or a beta-plane (\np{jphgr\_mesh} = 3, the Coriolis factor 
-is linear in the $j$-direction). The grid size is uniform in meter in each direction, 
-and given by the parameters \np{ppe1\_m} and \np{ppe2\_m} respectively. 
-The zonal grid coordinate (\textit{glam} arrays) is in kilometers, starting at zero 
-with the first $t$-point. The meridional coordinate (gphi. arrays) is in kilometers, 
-and the second $t$-point corresponds to coordinate $gphit=0$. The input 
-variable \np{ppglam0} is ignored. \np{ppgphi0} is used to set the reference 
-latitude for computation of the Coriolis parameter. In the case of the beta plane, 
-\np{ppgphi0} corresponds to the center of the domain. Finally, the special case 
-\np{jphgr\_mesh}=5 corresponds to a beta plane in a rotated domain for the 
-GYRE configuration, representing a classical mid-latitude double gyre system. 
-The rotation allows us to maximize the jet length relative to the gyre areas 
-(and the number of grid points). 
+There are two simple cases of geographical grids on the sphere. With
+\np{jphgr\_mesh}=1, the grid (expressed in degrees) is regular in space,
+with grid sizes specified by parameters \np{ppe1\_deg} and \np{ppe2\_deg},
+respectively. Such a geographical grid can be very anisotropic at high latitudes
+because of the convergence of meridians (the zonal scale factors $e_1$
+become much smaller than the meridional scale factors $e_2$). The Mercator
+grid (\np{jphgr\_mesh}=4) avoids this anisotropy by refining the meridional scale
+factors in the same way as the zonal ones. In this case, meridional scale factors
+and latitudes are calculated analytically using the formulae appropriate for
+a Mercator projection, based on \np{ppe1\_deg} which is a reference grid spacing
+at the equator (this applies even when the geographical equator is situated outside
+the model domain).
+
+In these two cases (\np{jphgr\_mesh}=1 or 4), the grid position is defined by the
+longitude and latitude of the south-westernmost point (\np{ppglamt0}
+and \np{ppgphi0}). Note that for the Mercator grid the user need only provide
+an approximate starting latitude: the real latitude will be recalculated analytically,
+in order to ensure that the equator corresponds to line passing through $t$-
+and $u$-points.
+
+Rectangular grids ignoring the spherical geometry are defined with
+\np{jphgr\_mesh} = 2, 3, 5. The domain is either an $f$-plane (\np{jphgr\_mesh} = 2,
+Coriolis factor is constant) or a beta-plane (\np{jphgr\_mesh} = 3, the Coriolis factor
+is linear in the $j$-direction). The grid size is uniform in meter in each direction,
+and given by the parameters \np{ppe1\_m} and \np{ppe2\_m} respectively.
+The zonal grid coordinate (\textit{glam} arrays) is in kilometers, starting at zero
+with the first $t$-point. The meridional coordinate (gphi. arrays) is in kilometers,
+and the second $t$-point corresponds to coordinate $gphit=0$. The input
+variable \np{ppglam0} is ignored. \np{ppgphi0} is used to set the reference
+latitude for computation of the Coriolis parameter. In the case of the beta plane,
+\np{ppgphi0} corresponds to the center of the domain. Finally, the special case
+\np{jphgr\_mesh}=5 corresponds to a beta plane in a rotated domain for the
+GYRE configuration, representing a classical mid-latitude double gyre system.
+The rotation allows us to maximize the jet length relative to the gyre areas
+(and the number of grid points).
 
 % -------------------------------------------------------------------------------------------------------------
@@ -128,6 +128,6 @@
 the vertical scale factors.  The user must provide the analytical expression of both $z_0$
 and its first derivative with respect to $k$.  This is done in routine \mdl{domzgr}
-through statement functions, using parameters provided in the \ngn{namdom} namelist
-(\forcode{DOMAINcfg} variant).
+through statement functions, using parameters provided in the \nam{dom} namelist
+(\texttt{DOMAINcfg} variant).
 
 It is possible to define a simple regular vertical grid by giving zero stretching
@@ -156,5 +156,5 @@
     \begin{split}
     z_0  (k) = h_{sur} - h_0 \; k &- \; h_1 \; \log  \big[ \cosh ((k - h_{th}) / h_{cr}) \big] \\
-                             \;   &- \; h2_1 \; \log  \big[ \cosh ((k - h2_{th}) / h2_{cr}) \big] 
+                             \;   &- \; h2_1 \; \log  \big[ \cosh ((k - h2_{th}) / h2_{cr}) \big]
     \end{split}
 \end{gather}
@@ -177,5 +177,5 @@
 \end{equation}
 
-This formulation decreases the self-generated circulation into the ice shelf cavity 
+This formulation decreases the self-generated circulation into the ice shelf cavity
 (which can, in extreme case, leads to numerical instability). This is now the recommended formulation for all configurations using v4.0 onwards. The analytical derivation of thicknesses is maintained for backwards compatibility.
 
@@ -200,9 +200,9 @@
 The resulting depths and scale factors as a function of the model levels are shown in
 \autoref{fig:DOMCFG_zgr} and given in \autoref{tab:DOMCFG_orca_zgr}.
-Those values correspond to the parameters \np{ppsur}, \np{ppa0}, \np{ppa1}, \np{ppkth} in \ngn{namcfg} namelist.
+Those values correspond to the parameters \np{ppsur}, \np{ppa0}, \np{ppa1}, \np{ppkth} in \nam{cfg} namelist.
 
 Rather than entering parameters $h_{sur}$, $h_0$, and $h_1$ directly, it is possible to
 recalculate them.  In that case the user sets \np{ppsur}~$=$~\np{ppa0}~$=$~\np{ppa1}~$=
-999999$., in \ngn{namcfg} namelist, and specifies instead the four following parameters:
+999999$., in \nam{cfg} namelist, and specifies instead the four following parameters:
 \begin{itemize}
 \item
@@ -309,5 +309,5 @@
 
 Three options are possible for defining the bathymetry, according to the namelist variable
-\np{nn\_bathy} (found in \ngn{namdom} namelist (\forcode{DOMAINCFG} variant) ):
+\np{nn\_bathy} (found in \nam{dom} namelist (\texttt{DOMAINCFG} variant) ):
 \begin{description}
 \item[\np{nn\_bathy}\forcode{ = 0}]:
@@ -322,5 +322,5 @@
   The \ifile{bathy\_meter} file (Netcdf format) provides the ocean depth (positive, in meters) at
   each grid point of the model grid.
-  The bathymetry is usually built by interpolating a standard bathymetry product (\eg ETOPO2) onto
+  The bathymetry is usually built by interpolating a standard bathymetry product (\eg\ ETOPO2) onto
   the horizontal ocean mesh.
   Defining the bathymetry also defines the coastline: where the bathymetry is zero,
@@ -352,5 +352,5 @@
 \end{description}
 %%%
- 
+
 % -------------------------------------------------------------------------------------------------------------
 %        z-coordinate with constant thickness
@@ -386,6 +386,6 @@
 thickness than $e_{3t}(jpk)$: the maximum thickness allowed is $2*e_{3t}(jpk - 1)$.
 
-This has to be kept in mind when specifying values in \ngn{namdom} namelist
-(\forcode{DOMMAINCFG} variant), such as the maximum depth \np{pphmax} in partial steps.
+This has to be kept in mind when specifying values in \nam{dom} namelist
+(\texttt{DOMAINCFG} variant), such as the maximum depth \np{pphmax} in partial steps.
 
 For example, with \np{pphmax}~$= 5750~m$ for the DRAKKAR 45 layer grid, the maximum ocean
@@ -405,7 +405,7 @@
 %------------------------------------------nam_zgr_sco---------------------------------------------------
 %
-\nlst{namzgr_sco_domcfg} 
+\nlst{namzgr_sco_domcfg}
 %--------------------------------------------------------------------------------------------------------------
-Options are defined in \ngn{namzgr\_sco} (\forcode{DOMAINcfg} only).
+Options are defined in \nam{zgr\_sco} (\texttt{DOMAINcfg} only).
 In $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}), the depth and thickness of the model levels are defined from
 the product of a depth field and either a stretching function or its derivative, respectively:
@@ -430,5 +430,5 @@
 but care must be taken to ensure that the vertical stretch used is appropriate for the application.
 
-The original default NEMO s-coordinate stretching is available if neither of the other options are specified as true
+The original default \NEMO\ s-coordinate stretching is available if neither of the other options are specified as true
 (\np{ln\_s\_SH94}\forcode{ = .false.} and \np{ln\_s\_SF12}\forcode{ = .false.}).
 This uses a depth independent $\tanh$ function for the stretching \citep{madec.delecluse.ea_JPO96}:
@@ -555,5 +555,5 @@
 \label{subsec:DOMCFG_zgr_star}
 
-This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO web site.
+This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO\ web site.
 
 \biblio
Index: NEMO/trunk/doc/latex/NEMO/subfiles/annex_E.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/annex_E.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/annex_E.tex	(revision 11435)
@@ -8,5 +8,5 @@
 \label{apdx:E}
 
-\minitoc
+\chaptertoc
 
 \newpage
@@ -48,5 +48,5 @@
 $\tau "_i =\frac{e_{1T}}{e_{2T}\,e_{3T}}\delta_i \left[ \frac{e_{2u} e_{3u} }{e_{1u} }\delta_{i+1/2}[\tau] \right]$.
 
-This results in a dissipatively dominant (\ie hyper-diffusive) truncation error
+This results in a dissipatively dominant (\ie\ hyper-diffusive) truncation error
 \citep{shchepetkin.mcwilliams_OM05}.
 The overall performance of the advection scheme is similar to that reported in \cite{farrow.stevens_JPO95}.
@@ -135,5 +135,5 @@
 \end{equation}
 with ${A_u^{lT}}^2 = \frac{1}{12} {e_{1u}}^3\ |u|$, 
-\ie $A_u^{lT} = \frac{1}{\sqrt{12}} \,e_{1u}\ \sqrt{ e_{1u}\,|u|\,}$
+\ie\ $A_u^{lT} = \frac{1}{\sqrt{12}} \,e_{1u}\ \sqrt{ e_{1u}\,|u|\,}$
 it comes:
 \begin{equation}
@@ -147,5 +147,5 @@
   \end{split}
 \end{equation}
-if the velocity is uniform (\ie $|u|=cst$) then the diffusive flux is
+if the velocity is uniform (\ie\ $|u|=cst$) then the diffusive flux is
 \begin{equation}
   \label{eq:tra_ldf_lap}
@@ -166,5 +166,5 @@
   \end{split}
 \end{equation}
-if the velocity is uniform (\ie $|u|=cst$) and
+if the velocity is uniform (\ie\ $|u|=cst$) and
 choosing $\tau "_i =\frac{e_{1T}}{e_{2T}\,e_{3T}}\delta_i \left[ \frac{e_{2u} e_{3u} }{e_{1u} } \delta_{i+1/2}[\tau] \right]$
 
@@ -218,5 +218,5 @@
 not $2\rdt$ as it can be found sometimes in literature.
 The leap-Frog time stepping is a second order centered scheme.
-As such it respects the quadratic invariant in integral forms, \ie the following continuous property,
+As such it respects the quadratic invariant in integral forms, \ie\ the following continuous property,
 \[
   % \label{eq:Energy}
@@ -256,6 +256,6 @@
 
 Let try to define a scheme that get its inspiration from the \citet{griffies.gnanadesikan.ea_JPO98} scheme,
-but is formulated within the \NEMO framework
-(\ie using scale factors rather than grid-size and having a position of $T$-points that
+but is formulated within the \NEMO\ framework
+(\ie\ using scale factors rather than grid-size and having a position of $T$-points that
 is not necessary in the middle of vertical velocity points, see \autoref{fig:zgr_e3}).
 
@@ -271,5 +271,5 @@
 (see \autoref{chap:LDF}).
 Nevertheless, this technique works fine for $T$ and $S$ as they are active tracers
-(\ie they enter the computation of density), but it does not work for a passive tracer.
+(\ie\ they enter the computation of density), but it does not work for a passive tracer.
 \citep{griffies.gnanadesikan.ea_JPO98} introduce a different way to discretise the off-diagonal terms that
 nicely solve the problem.
@@ -386,5 +386,5 @@
 \item[$\bullet$ implicit treatment in the vertical]
   In the diagonal term associated with the vertical divergence of the iso-neutral fluxes
-  \ie the term associated with a second order vertical derivative)
+  \ie\ the term associated with a second order vertical derivative)
   appears only tracer values associated with a single water column.
   This is of paramount importance since it means that
@@ -431,5 +431,5 @@
 It is a key property for a diffusion term.
 It means that the operator is also a dissipation term,
-\ie it is a sink term for the square of the quantity on which it is applied.
+\ie\ it is a sink term for the square of the quantity on which it is applied.
 It therfore ensures that, when the diffusivity coefficient is large enough,
 the field on which it is applied become free of grid-point noise.
@@ -457,5 +457,5 @@
 the formulation of which depends on the slopes of iso-neutral surfaces.
 Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces,
-\ie \autoref{eq:ldfslp_geo} is used in $z$-coordinate,
+\ie\ \autoref{eq:ldfslp_geo} is used in $z$-coordinate,
 and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates. 
 
@@ -578,5 +578,5 @@
 Nevertheless this property can be used to choose a discret form of \autoref{eq:eiv_skew_continuous} which
 is consistent with the iso-neutral operator \autoref{eq:Gf_operator}.
-Using the slopes \autoref{eq:Gf_slopes} and defining $A_e$ at $T$-point(\ie as $A$,
+Using the slopes \autoref{eq:Gf_slopes} and defining $A_e$ at $T$-point(\ie\ as $A$,
 the eddy diffusivity coefficient), the resulting discret form is given by:
 \begin{equation}
@@ -600,5 +600,5 @@
 it uses the same definition for the slopes.
 It also ensures the conservation of the tracer variance (see Appendix \autoref{apdx:eiv_skew}),
-\ie it does not include a diffusive component but is a "pure" advection term.
+\ie\ it does not include a diffusive component but is a "pure" advection term.
 
 $\ $\newpage      %force an empty line
@@ -840,5 +840,5 @@
 Exactly the same thing occurs for the triad ${_i^k \mathbb{R}_{-1/2}^{+1/2}}$ in the $i$ direction.
 Therefore the sum over the domain is zero,
-\ie the variance of the tracer is preserved by the discretisation of the skew fluxes.
+\ie\ the variance of the tracer is preserved by the discretisation of the skew fluxes.
 
 \biblio
Index: NEMO/trunk/doc/latex/NEMO/subfiles/annex_iso.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/annex_iso.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/annex_iso.tex	(revision 11435)
@@ -18,9 +18,10 @@
 \label{apdx:triad}
 
-\minitoc
+\chaptertoc
 
 \newpage
 
-\section{Choice of \protect\ngn{namtra\_ldf} namelist parameters}
+\section[Choice of \texttt{namtra\_ldf} namelist parameters]
+{Choice of \protect\nam{tra\_ldf} namelist parameters}
 %-----------------------------------------nam_traldf------------------------------------------------------
 
@@ -30,5 +31,5 @@
 Two scheme are available to perform the iso-neutral diffusion.
 If the namelist logical \np{ln\_traldf\_triad} is set true,
-\NEMO updates both active and passive tracers using the Griffies triad representation of iso-neutral diffusion and
+\NEMO\ updates both active and passive tracers using the Griffies triad representation of iso-neutral diffusion and
 the eddy-induced advective skew (GM) fluxes.
 If the namelist logical \np{ln\_traldf\_iso} is set true,
@@ -38,5 +39,5 @@
 
 Values of iso-neutral diffusivity and GM coefficient are set as described in \autoref{sec:LDF_coef}.
-Note that when GM fluxes are used, the eddy-advective (GM) velocities are output for diagnostic purposes using xIOS,
+Note that when GM fluxes are used, the eddy-advective (GM) velocities are output for diagnostic purposes using XIOS,
 even though the eddy advection is accomplished by means of the skew fluxes.
 
@@ -72,6 +73,6 @@
 \label{sec:iso}
 
-We have implemented into \NEMO a scheme inspired by \citet{griffies.gnanadesikan.ea_JPO98},
-but formulated within the \NEMO framework, using scale factors rather than grid-sizes.
+We have implemented into \NEMO\ a scheme inspired by \citet{griffies.gnanadesikan.ea_JPO98},
+but formulated within the \NEMO\ framework, using scale factors rather than grid-sizes.
 
 \subsection{Iso-neutral diffusion operator}
@@ -191,5 +192,5 @@
 To correct this, we introduced a smoothing of the slopes of the iso-neutral surfaces (see \autoref{chap:LDF}).
 This technique works for $T$ and $S$ in so far as they are active tracers
-(\ie they enter the computation of density), but it does not work for a passive tracer.
+(\ie\ they enter the computation of density), but it does not work for a passive tracer.
 
 \subsection{Expression of the skew-flux in terms of triad slopes}
@@ -280,5 +281,5 @@
 the intersection of the $i,k$ $T$-cell, the $i+i_p,k$ $u$-cell and the $i,k+k_p$ $w$-cell.
 Expressing the slopes $s_i$ and $s'_i$ in \autoref{eq:i13} and \autoref{eq:i31} in this notation,
-we have \eg \ $s_1=s'_1={\:}_i^k \mathbb{R}_{1/2}^{1/2}$.
+we have \eg\ \ $s_1=s'_1={\:}_i^k \mathbb{R}_{1/2}^{1/2}$.
 Each triad slope $_i^k\mathbb{R}_{i_p}^{k_p}$ is used once (as an $s$) to
 calculate the lateral flux along its $u$-arm, at $(i+i_p,k)$,
@@ -288,5 +289,5 @@
 and we notate these areas, similarly to the triad slopes,
 as $_i^k{\mathbb{A}_u}_{i_p}^{k_p}$, $_i^k{\mathbb{A}_w}_{i_p}^{k_p}$,
-where \eg in \autoref{eq:i13} $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$,
+where \eg\ in \autoref{eq:i13} $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$,
 and in \autoref{eq:i31} $a'_{1}={\:}_i^k{\mathbb{A}_w}_{1/2}^{1/2}$.
 
@@ -477,5 +478,5 @@
 defined in terms of the distances between $T$, $u$,$f$ and $w$-points.
 This is the natural discretization of \autoref{eq:cts-var}.
-The \NEMO model, however, operates with scale factors instead of grid sizes,
+The \NEMO\ model, however, operates with scale factors instead of grid sizes,
 and scale factors for the quarter cells are not defined.
 Instead, therefore we simply choose
@@ -600,5 +601,5 @@
   It is a key property for a diffusion term.
   It means that it is also a dissipation term,
-  \ie it dissipates the square of the quantity on which it is applied.
+  \ie\ it dissipates the square of the quantity on which it is applied.
   It therefore ensures that, when the diffusivity coefficient is large enough,
   the field on which it is applied becomes free of grid-point noise.
@@ -649,10 +650,10 @@
 Similar comments apply to triads that would intersect the ocean floor (\autoref{fig:bdry_triads}b).
 Note that both near bottom triad slopes \triad{i}{k}{R}{1/2}{1/2} and \triad{i+1}{k}{R}{-1/2}{1/2} are masked when
-either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, \ie the $i,k+1$ $u$-point is masked.
+either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, \ie\ the $i,k+1$ $u$-point is masked.
 The associated lateral fluxes (grey-black dashed line) are masked if \np{ln\_botmix\_triad}\forcode{ = .false.},
 but left unmasked, giving bottom mixing, if \np{ln\_botmix\_triad}\forcode{ = .true.}.
 
 The default option \np{ln\_botmix\_triad}\forcode{ = .false.} is suitable when the bbl mixing option is enabled
-(\key{trabbl}, with \np{nn\_bbl\_ldf}\forcode{ = 1}), or for simple idealized problems.
+(\np{ln\_trabbl}\forcode{ = .true.}, with \np{nn\_bbl\_ldf}\forcode{ = 1}), or for simple idealized problems.
 For setups with topography without bbl mixing, \np{ln\_botmix\_triad}\forcode{ = .true.} may be necessary.
 % >>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -672,8 +673,8 @@
       (b) Both near bottom triad slopes \triad{i}{k}{R}{1/2}{1/2} and
       \triad{i+1}{k}{R}{-1/2}{1/2} are masked when either of the $i,k+1$ or $i+1,k+1$ tracer points is masked,
-      \ie the $i,k+1$ $u$-point is masked.
+      \ie\ the $i,k+1$ $u$-point is masked.
       The associated lateral fluxes (grey-black dashed line) are masked if
-      \protect\np{botmix\_triad}\forcode{ = .false.}, but left unmasked,
-      giving bottom mixing, if \protect\np{botmix\_triad}\forcode{ = .true.}
+      \protect\np{ln\_botmix\_triad}\forcode{ = .false.}, but left unmasked,
+      giving bottom mixing, if \protect\np{ln\_botmix\_triad}\forcode{ = .true.}
     }
   \end{center}
@@ -687,5 +688,5 @@
 iso-neutral slopes relative to geopotentials must be bounded everywhere,
 both for consistency with the small-slope approximation and for numerical stability \citep{cox_OM87, griffies_bk04}.
-The bound chosen in \NEMO is applied to each component of the slope separately and
+The bound chosen in \NEMO\ is applied to each component of the slope separately and
 has a value of $1/100$ in the ocean interior.
 %, ramping linearly down above 70~m depth to zero at the surface
@@ -765,5 +766,5 @@
   where $i,k_{10}$ is the tracer gridbox within which the depth reaches 10~m.
   See the left side of \autoref{fig:MLB_triad}.
-  We use the $k_{10}$-gridbox instead of the surface gridbox to avoid problems \eg with thin daytime mixed-layers.
+  We use the $k_{10}$-gridbox instead of the surface gridbox to avoid problems \eg\ with thin daytime mixed-layers.
   Currently we use the same $\Delta\rho_c=0.01\;\mathrm{kg\:m^{-3}}$ for ML triad tapering as is used to
   output the diagnosed mixed-layer depth $h_{\mathrm{ML}}=|z_{W}|_{k_{\mathrm{ML}}+1/2}$,
@@ -781,5 +782,5 @@
                                                        % \label{eq:Rbase}
     \\
-    \intertext{with \eg the green triad}
+    \intertext{with \eg\ the green triad}
     {\:}_i{\mathbb{R}_{\mathrm{base}}}_{1/2}^{-1/2}&=
                                                      {\:}^{k_{\mathrm{ML}}}_i{\mathbb{R}_{\mathrm{base}}}_{\,1/2}^{-1/2}.
@@ -828,5 +829,5 @@
     ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$.
     Triads with different $i_p,k_p$, denoted by different colours,
-    (\eg the green triad $i_p=1/2,k_p=-1/2$) are tapered to the appropriate basal triad.}
+    (\eg\ the green triad $i_p=1/2,k_p=-1/2$) are tapered to the appropriate basal triad.}
   % }
   \includegraphics[width=\textwidth]{Fig_GRIFF_MLB_triads}
@@ -889,5 +890,5 @@
 the formulation of which depends on the slopes of iso-neutral surfaces.
 Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces,
-\ie \autoref{eq:ldfslp_geo} is used in $z$-coordinate,
+\ie\ \autoref{eq:ldfslp_geo} is used in $z$-coordinate,
 and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates.
 
@@ -918,5 +919,5 @@
 The traditional way to implement this additional advection is to add it to the Eulerian velocity prior to
 computing the tracer advection.
-This is implemented if \key{traldf\_eiv} is set in the default implementation,
+This is implemented if \texttt{traldf\_eiv?} is set in the default implementation,
 where \np{ln\_traldf\_triad} is set false.
 This allows us to take advantage of all the advection schemes offered for the tracers
@@ -926,5 +927,5 @@
 
 However, when \np{ln\_traldf\_triad} is set true,
-\NEMO instead implements eddy induced advection according to the so-called skew form \citep{griffies_JPO98}.
+\NEMO\ instead implements eddy induced advection according to the so-called skew form \citep{griffies_JPO98}.
 It is based on a transformation of the advective fluxes using the non-divergent nature of the eddy induced velocity.
 For example in the (\textbf{i},\textbf{k}) plane,
@@ -1034,5 +1035,5 @@
 \subsubsection{No change in tracer variance}
 
-The discretization conserves tracer variance, \ie it does not include a diffusive component but is a `pure' advection term.
+The discretization conserves tracer variance, \ie\ it does not include a diffusive component but is a `pure' advection term.
 This can be seen %either from Appendix \autoref{apdx:eiv_skew} or
 by considering the fluxes associated with a given triad slope $_i^k{\mathbb{R}}_{i_p}^{k_p} (T)$.
@@ -1116,5 +1117,5 @@
 Thus surface layer triads $\triadt{i}{1}{R}{1/2}{-1/2}$ and $\triadt{i+1}{1}{R}{-1/2}{-1/2}$ are masked, 
 and both near bottom triad slopes $\triadt{i}{k}{R}{1/2}{1/2}$ and $\triadt{i+1}{k}{R}{-1/2}{1/2}$ are masked when 
-either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, \ie the $i,k+1$ $u$-point is masked. 
+either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, \ie\ the $i,k+1$ $u$-point is masked. 
 The namelist parameter \np{ln\_botmix\_triad} has no effect on the eddy-induced skew-fluxes.
 
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_ASM.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_ASM.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_ASM.tex	(revision 11435)
@@ -8,5 +8,5 @@
 \label{chap:ASM}
 
-\minitoc
+\chaptertoc
 
 \vfill
@@ -15,5 +15,5 @@
 \begin{tabular}{l||l|m{0.65\linewidth}}
     Release   & Author        & Modifications \\
-    {\em 4.0} & {\em D. J. Lea} & {\em \NEMO 4.0 updates}  \\
+    {\em 4.0} & {\em D. J. Lea} & {\em \NEMO\ 4.0 updates}  \\
     {\em 3.4} & {\em D. J. Lea, M. Martin, K. Mogensen, A. Weaver} & {\em Initial version}  \\
 \end{tabular}
@@ -26,5 +26,5 @@
 These are read into the model from a NetCDF file which may be produced by separate data assimilation code.
 The code can also output model background fields which are used as an input to data assimilation code.
-This is all controlled by the namelist \textit{\ngn{nam\_asminc} }.
+This is all controlled by the namelist \nam{\_asminc}.
 There is a brief description of all the namelist options provided.
 To build the ASM code \key{asminc} must be set.
@@ -101,5 +101,5 @@
 
 It is quite challenging for data assimilation systems to provide non-divergent velocity increments.
-Applying divergent velocity increments will likely cause spurious vertical velocities in the model. This section describes a method to take velocity increments provided to \NEMO ($u^0_I$ and $v^0_I$) and adjust them by the iterative application of a divergence damping operator. The method is also described in \citet{dobricic.pinardi.ea_OS07}.
+Applying divergent velocity increments will likely cause spurious vertical velocities in the model. This section describes a method to take velocity increments provided to \NEMO\ ($u^0_I$ and $v^0_I$) and adjust them by the iterative application of a divergence damping operator. The method is also described in \citet{dobricic.pinardi.ea_OS07}.
 
 In iteration step $n$ (starting at $n=1$) new estimates of velocity increments $u^{n}_I$ and $v^{n}_I$ are updated by:
@@ -134,5 +134,5 @@
 \citep{talagrand_JAS72, dobricic.pinardi.ea_OS07}.
 Diffusion coefficients are defined as $A_D = \alpha e_{1t} e_{2t}$, where $\alpha = 0.2$.
-The divergence damping is activated by assigning to \np{nn\_divdmp} in the \textit{nam\_asminc} namelist
+The divergence damping is activated by assigning to \np{nn\_divdmp} in the \nam{\_asminc} namelist
 a value greater than zero.
 This specifies the number of iterations of the divergence damping. Setting a value of the order of 100 will result in a significant reduction in the vertical velocity induced by the increments.
@@ -144,5 +144,5 @@
 \label{sec:ASM_details}
 
-Here we show an example \ngn{nam\_asminc} namelist and the header of an example assimilation increments file on
+Here we show an example \nam{\_asminc} namelist and the header of an example assimilation increments file on
 the ORCA2 grid.
 
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_CONFIG.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_CONFIG.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_CONFIG.tex	(revision 11435)
@@ -8,5 +8,5 @@
 \label{chap:CFG}
 
-\minitoc
+\chaptertoc
 
 \newpage
@@ -18,5 +18,5 @@
 \label{sec:CFG_intro}
 
-The purpose of this part of the manual is to introduce the NEMO reference configurations.
+The purpose of this part of the manual is to introduce the \NEMO\ reference configurations.
 These configurations are offered as means to explore various numerical and physical options,
 thus allowing the user to verify that the code is performing in a manner consistent with that we are running.
@@ -24,5 +24,5 @@
 The reference configurations also provide a sense for some of the options available in the code,
 though by no means are all options exercised in the reference configurations.
-Configuration is defined manually through the \textit{namcfg} namelist variables.
+Configuration is defined manually through the \nam{cfg} namelist variables.
 
 %------------------------------------------namcfg----------------------------------------------------
@@ -38,8 +38,8 @@
 \label{sec:CFG_c1d}
 
-The 1D model option simulates a stand alone water column within the 3D NEMO system.
+The 1D model option simulates a stand alone water column within the 3D \NEMO\ system.
 It can be applied to the ocean alone or to the ocean-ice system and can include passive tracers or a biogeochemical model.
 It is set up by defining the position of the 1D water column in the grid
-(see \textit{cfgs/SHARED/namelist\_ref}). 
+(see \path{./cfgs/SHARED/namelist\_ref}).
 The 1D model is a very useful tool
 \textit{(a)} to learn about the physics and numerical treatment of vertical mixing processes;
@@ -54,6 +54,6 @@
 
 The 1D model has some specifies. First, all the horizontal derivatives are assumed to be zero,
-and second, the two components of the velocity are moved on a $T$-point. 
-Therefore, defining \key{c1d} changes some things in the code behaviour: 
+and second, the two components of the velocity are moved on a $T$-point.
+Therefore, defining \key{c1d} changes some things in the code behaviour:
 \begin{description}
 \item[(1)]
@@ -68,5 +68,5 @@
 \end{description}
 All the relevant \textit{\_c1d} modules can be found in the src/OCE/C1D directory of
-the NEMO distribution.
+the \NEMO\ distribution.
 
 % to be added:  a test case on the yearlong Ocean Weather Station (OWS) Papa dataset of Martin (1985)
@@ -80,10 +80,10 @@
 The ORCA family is a series of global ocean configurations that are run together with
 the SI3 model (ORCA-ICE) and possibly with PISCES biogeochemical model (ORCA-ICE-PISCES).
-An appropriate namelist is available in \path{cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg} for ORCA2.
+An appropriate namelist is available in \path{./cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg} for ORCA2.
 The domain of ORCA2 configuration is defined in \ifile{ORCA\_R2\_zps\_domcfg} file,
-this file is available in tar file on the NEMO community zenodo platform: \\
+this file is available in tar file on the \NEMO\ community zenodo platform: \\
 https://doi.org/10.5281/zenodo.2640723
 
-In this namelist\_cfg the name of domain input file is set in \ngn{namcfg} block of namelist. 
+In this namelist\_cfg the name of domain input file is set in \nam{cfg} block of namelist.
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -118,5 +118,5 @@
 (\autoref{fig:MISC_ORCA_msh}).
 The resulting mesh presents no loss of continuity in either the mesh lines or the scale factors,
-or even the scale factor derivatives over the whole ocean domain, as the mesh is not a composite mesh. 
+or even the scale factor derivatives over the whole ocean domain, as the mesh is not a composite mesh.
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!tbp]
@@ -137,5 +137,5 @@
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
-The method is applied to Mercator grid (\ie same zonal and meridional grid spacing) poleward of 20\deg{N},
+The method is applied to Mercator grid (\ie\ same zonal and meridional grid spacing) poleward of 20\deg{N},
 so that the Equator is a mesh line, which provides a better numerical solution for equatorial dynamics.
 The choice of the series of embedded ellipses (position of the foci and variation of the ellipses)
@@ -146,5 +146,5 @@
 a half a degree grid (ORCA\_R05).
 The smallest ocean scale factor is found in along Antarctica,
-while the ratio of anisotropy remains close to one except near the Victoria Island in the Canadian Archipelago. 
+while the ratio of anisotropy remains close to one except near the Victoria Island in the Canadian Archipelago.
 
 % -------------------------------------------------------------------------------------------------------------
@@ -154,10 +154,10 @@
 \label{subsec:CFG_orca_resolution}
 
-The NEMO system is provided with five built-in ORCA configurations which differ in the horizontal resolution.
+The \NEMO\ system is provided with five built-in ORCA configurations which differ in the horizontal resolution.
 The value of the resolution is given by the resolution at the Equator expressed in degrees.
 Each of configuration is set through the \textit{domain\_cfg} domain configuration file,
 which sets the grid size and configuration name parameters.
-The NEMO System Team provides only ORCA2 domain input file "\ifile{ORCA\_R2\_zps\_domcfg}" file
-(Tab. \autoref{tab:ORCA}).
+The \NEMO\ System Team provides only ORCA2 domain input file "\ifile{ORCA\_R2\_zps\_domcfg}" file
+(\autoref{tab:ORCA}).
 
 %--------------------------------------------------TABLE--------------------------------------------------
@@ -165,16 +165,12 @@
   \begin{center}
     \begin{tabular}{p{4cm} c c c c}
-      Horizontal Grid         	             & \np{ORCA\_index} &  \np{jpiglo} & \np{jpjglo} &       \\
-      \hline
-      \hline
-      \~4\deg	   &        4         &         92     &      76      &       \\
-      \~2\deg        &        2         &       182     &    149      &        \\
-      \~1\deg        &        1         &       362     &     292     &        \\
-      \~0.5\deg     &        05       &       722     &     511     &        \\
-      \~0.25\deg   &        025     &      1442    &   1021     &        \\
-      % \key{orca\_r8}       &        8         &      2882    &   2042     &        \\
-      % \key{orca\_r12}     &      12         &      4322    &   3062      &       \\
-      \hline
-      \hline
+      Horizontal Grid & \jp{ORCA\_index} & \jp{jpiglo} & \jp{jpjglo} \\
+      \hline \hline
+%             4   \deg &              4   &          92 &          76 \\
+             2   \deg &              2   &         182 &         149 \\
+             1   \deg &              1   &         362 &         292 \\
+             0.5 \deg &              05  &         722 &         511 \\
+             0.25\deg &              025 &        1442 &        1021 \\
+      \hline \hline
     \end{tabular}
     \caption{
@@ -198,5 +194,5 @@
 Note that the tropical mesh refinements in ORCA\_R2 and R1 strongly increases the mesh anisotropy there.
 
-The ORCA\_R05 and higher global configurations do not incorporate any regional refinements.  
+The ORCA\_R05 and higher global configurations do not incorporate any regional refinements.
 
 For ORCA\_R1 and R025, setting the configuration key to 75 allows to use 75 vertical levels, otherwise 46 are used.
@@ -204,24 +200,25 @@
 (see \autoref{tab:orca_zgr}). %\sfcomment{HERE I need to put new table for ORCA2 values} and \autoref{fig:zgr}).
 
-Only the ORCA\_R2 is provided with all its input files in the NEMO distribution.
+Only the ORCA\_R2 is provided with all its input files in the \NEMO\ distribution.
 %It is very similar to that used as part of the climate model developed at IPSL for the 4th IPCC assessment of
 %climate change (Marti et al., 2009).
-%It is also the basis for the \NEMO contribution to the Coordinate Ocean-ice Reference Experiments (COREs)
-%documented in \citet{griffies.biastoch.ea_OM09}. 
+%It is also the basis for the \NEMO\ contribution to the Coordinate Ocean-ice Reference Experiments (COREs)
+%documented in \citet{griffies.biastoch.ea_OM09}.
 
 This version of ORCA\_R2 has 31 levels in the vertical, with the highest resolution (10m) in the upper 150m
-(see \autoref{tab:orca_zgr} and \autoref{fig:zgr}). 
-The bottom topography and the coastlines are derived from the global atlas of Smith and Sandwell (1997). 
-The default forcing uses the boundary forcing from \citet{large.yeager_rpt04} (see \autoref{subsec:SBC_blk_core}), 
+(see \autoref{tab:orca_zgr} and \autoref{fig:zgr}).
+The bottom topography and the coastlines are derived from the global atlas of Smith and Sandwell (1997).
+The default forcing uses the boundary forcing from \citet{large.yeager_rpt04} (see \autoref{subsec:SBC_blk_core}),
 which was developed for the purpose of running global coupled ocean-ice simulations without
 an interactive atmosphere.
 This \citet{large.yeager_rpt04} dataset is available through
 the \href{http://nomads.gfdl.noaa.gov/nomads/forms/mom4/CORE.html}{GFDL web site}.
-The "normal year" of \citet{large.yeager_rpt04} has been chosen of the NEMO distribution since release v3.3. 
-
-ORCA\_R2 pre-defined configuration can also be run with multiply online nested zooms (\ie with AGRIF, \key{agrif} defined). This is available as the AGRIF\_DEMO configuration that can be found in the \path{cfgs/AGRIF_DEMO/} directory.
+The "normal year" of \citet{large.yeager_rpt04} has been chosen of the \NEMO\ distribution since release v3.3.
+
+ORCA\_R2 pre-defined configuration can also be run with multiply online nested zooms (\ie\ with AGRIF, \key{agrif} defined).
+This is available as the AGRIF\_DEMO configuration that can be found in the \path{./cfgs/AGRIF_DEMO/} directory.
 
 A regional Arctic or peri-Antarctic configuration is extracted from an ORCA\_R2 or R05 configurations using
-sponge layers at open boundaries. 
+sponge layers at open boundaries.
 
 % -------------------------------------------------------------------------------------------------------------
@@ -236,6 +233,6 @@
 \citet{hazeleger.drijfhout_JPO98, hazeleger.drijfhout_JPO99, hazeleger.drijfhout_JGR00, hazeleger.drijfhout_JPO00},
 over which an analytical seasonal forcing is applied.
-This allows to investigate the spontaneous generation of a large number of interacting, transient mesoscale eddies 
-and their contribution to the large scale circulation. 
+This allows to investigate the spontaneous generation of a large number of interacting, transient mesoscale eddies
+and their contribution to the large scale circulation.
 
 The GYRE configuration run together with the PISCES biogeochemical model (GYRE-PISCES).
@@ -245,5 +242,5 @@
 The configuration is meant to represent an idealized North Atlantic or North Pacific basin.
 The circulation is forced by analytical profiles of wind and buoyancy fluxes.
-The applied forcings vary seasonally in a sinusoidal manner between winter and summer extrema \citep{levy.klein.ea_OM10}. 
+The applied forcings vary seasonally in a sinusoidal manner between winter and summer extrema \citep{levy.klein.ea_OM10}.
 The wind stress is zonal and its curl changes sign at 22\deg{N} and 36\deg{N}.
 It forces a subpolar gyre in the north, a subtropical gyre in the wider part of the domain and
@@ -257,16 +254,16 @@
 
 The GYRE configuration is set like an analytical configuration.
-Through \np{ln\_read\_cfg}\forcode{ = .false.} in \textit{namcfg} namelist defined in
-the reference configuration \path{cfgs/GYRE_PISCES/EXPREF/namelist_cfg}
+Through \np{ln\_read\_cfg}\forcode{ = .false.} in \nam{cfg} namelist defined in
+the reference configuration \path{./cfgs/GYRE_PISCES/EXPREF/namelist_cfg}
 analytical definition of grid in GYRE is done in usrdef\_hrg, usrdef\_zgr routines.
 Its horizontal resolution (and thus the size of the domain) is determined by
-setting \np{nn\_GYRE} in \ngn{namusr\_def}: \\
-
-\np{jpiglo} $= 30 \times$ \np{nn\_GYRE} + 2   \\
-
-\np{jpjglo} $= 20 \times$ \np{nn\_GYRE} + 2   \\
+setting \np{nn\_GYRE} in \nam{usr\_def}: \\
+
+\jp{jpiglo} $= 30 \times$ \np{nn\_GYRE} + 2   \\
+
+\jp{jpjglo} $= 20 \times$ \np{nn\_GYRE} + 2   \\
 
 Obviously, the namelist parameters have to be adjusted to the chosen resolution,
-see the Configurations pages on the NEMO web site (NEMO Configurations).
+see the Configurations pages on the \NEMO\ web site (\NEMO\ Configurations).
 In the vertical, GYRE uses the default 30 ocean levels (\jp{jpk}\forcode{ = 31}) (\autoref{fig:zgr}).
 
@@ -275,6 +272,6 @@
 For example, keeping a same model size on each processor while increasing the number of processor used is very easy,
 even though the physical integrity of the solution can be compromised.
-Benchmark is activate via \np{ln\_bench}\forcode{ = .true.} in \ngn{namusr\_def} in
-namelist \path{cfgs/GYRE_PISCES/EXPREF/namelist_cfg}.
+Benchmark is activate via \np{ln\_bench}\forcode{ = .true.} in \nam{usr\_def} in
+namelist \path{./cfgs/GYRE_PISCES/EXPREF/namelist_cfg}.
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -299,8 +296,8 @@
 The AMM, Atlantic Margins Model, is a regional model covering the Northwest European Shelf domain on
 a regular lat-lon grid at approximately 12km horizontal resolution.
-The appropriate \textit{\&namcfg} namelist  is available in \textit{cfgs/AMM12/EXPREF/namelist\_cfg}.
+The appropriate \textit{\&namcfg} namelist  is available in \path{./cfgs/AMM12/EXPREF/namelist\_cfg}.
 It is used to build the correct dimensions of the AMM domain.
 
-This configuration tests several features of NEMO functionality specific to the shelf seas.
+This configuration tests several features of \NEMO\ functionality specific to the shelf seas.
 In particular, the AMM uses $s$-coordinates in the vertical rather than $z$-coordinates and
 is forced with tidal lateral boundary conditions using a Flather boundary condition from the BDY module.
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIA.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIA.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIA.tex	(revision 11435)
@@ -8,5 +8,5 @@
 \label{chap:DIA}
 
-\minitoc
+\chaptertoc
 
 \vfill
@@ -18,13 +18,13 @@
     {\em }      & {\em Dorotea Iovino, Nicolas Martin} & {\em }  \\
     {\em 3.6} & {\em Gurvan Madec, Sebastien Masson } & {\em }  \\
-    {\em 3.4} & {\em Gurvan Madec, Rachid Benshila, Andrew Coward } & {\em }  \\ 
-    {\em }      & {\em Christian Ethe, Sebastien Masson } & {\em }  \\ 
+    {\em 3.4} & {\em Gurvan Madec, Rachid Benshila, Andrew Coward } & {\em }  \\
+    {\em }      & {\em Christian Ethe, Sebastien Masson } & {\em }  \\
 \end{tabular}
-\end{figure} 
+\end{figure}
 
 \newpage
 
 % ================================================================
-%       Old Model Output 
+%       Old Model Output
 % ================================================================
 \section{Model output}
@@ -41,6 +41,6 @@
 
 The output listing and file(s) are predefined but should be checked and eventually adapted to the user's needs.
-The output listing is stored in the $ocean.output$ file.
-The information is printed from within the code on the logical unit $numout$.
+The output listing is stored in the \textit{ocean.output} file.
+The information is printed from within the code on the logical unit \texttt{numout}.
 To locate these prints, use the UNIX command "\textit{grep -i numout}" in the source code directory.
 
@@ -59,7 +59,7 @@
 \label{sec:DIA_iom}
 
-Since version 3.2, iomput is the NEMO output interface of choice.
+Since version 3.2, iomput is the \NEMO\ output interface of choice.
 It has been designed to be simple to use, flexible and efficient.
-The two main purposes of iomput are: 
+The two main purposes of iomput are:
 
 \begin{enumerate}
@@ -72,5 +72,5 @@
 \end{enumerate}
 
-The first functionality allows the user to specify, without code changes or recompilation, 
+The first functionality allows the user to specify, without code changes or recompilation,
 aspects of the diagnostic output stream, such as:
 
@@ -94,5 +94,5 @@
 in a very easy way.
 All details of iomput functionalities are listed in the following subsections.
-Examples of the XML files that control the outputs can be found in: 
+Examples of the XML files that control the outputs can be found in:
 \path{cfgs/ORCA2_ICE_PISCES/EXPREF/iodef.xml},
 \path{cfgs/SHARED/field_def_nemo-oce.xml},
@@ -101,22 +101,22 @@
 
 The second functionality targets output performance when running in parallel (\key{mpp\_mpi}).
-Iomput provides the possibility to specify N dedicated I/O processes (in addition to the NEMO processes)
+Iomput provides the possibility to specify N dedicated I/O processes (in addition to the \NEMO\ processes)
 to collect and write the outputs.
 With an appropriate choice of N by the user, the bottleneck associated with the writing of
 the output files can be greatly reduced.
 
-In version 3.6, the iom\_put interface depends on
-an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-2.5}{XIOS-2.5} 
-(use of revision 618 or higher is required).
+In version 3.6, the \rou{iom\_put} interface depends on
+an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-2.5}{XIOS-2.5}
+%(use of revision 618 or higher is required).
 This new IO server can take advantage of the parallel I/O functionality of NetCDF4 to
 create a single output file and therefore to bypass the rebuilding phase.
 Note that writing in parallel into the same NetCDF files requires that your NetCDF4 library is linked to
-an HDF5 library that has been correctly compiled (\ie with the configure option $--$enable-parallel).
+an HDF5 library that has been correctly compiled (\ie\ with the configure option $--$enable-parallel).
 Note that the files created by iomput through XIOS are incompatible with NetCDF3.
 All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3.
 
 Even if not using the parallel I/O functionality of NetCDF4, using N dedicated I/O servers,
-where N is typically much less than the number of NEMO processors, will reduce the number of output files created.
-This can greatly reduce the post-processing burden usually associated with using large numbers of NEMO processors.
+where N is typically much less than the number of \NEMO\ processors, will reduce the number of output files created.
+This can greatly reduce the post-processing burden usually associated with using large numbers of \NEMO\ processors.
 Note that for smaller configurations, the rebuilding phase can be avoided,
 even without a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server.
@@ -124,9 +124,9 @@
 \subsection{XIOS: Reading and writing restart file}
 
-XIOS may be used to read single file restart produced by NEMO. Currently only the variables written to 
+XIOS may be used to read single file restart produced by \NEMO. Currently only the variables written to
 file \forcode{numror} can be handled by XIOS. To activate restart reading using XIOS, set \np{ln\_xios\_read}\forcode{ = .true. }
-in \textit{namelist\_cfg}. This setting will be ignored when multiple restart files are present, and default NEMO 
-functionality will be used for reading. There is no need to change iodef.xml file to use XIOS to read 
-restart, all definitions are done within the NEMO code. For high resolution configuration, however, 
+in \textit{namelist\_cfg}. This setting will be ignored when multiple restart files are present, and default \NEMO
+functionality will be used for reading. There is no need to change iodef.xml file to use XIOS to read
+restart, all definitions are done within the \NEMO\ code. For high resolution configuration, however,
 there may be a need to add the following line in iodef.xml (xios context):
 
@@ -135,25 +135,25 @@
 \end{xmllines}
 
-This variable sets timeout for reading. 
-
-If XIOS is to be used to read restart from file generated with an earlier NEMO version (3.6 for instance),
+This variable sets timeout for reading.
+
+If XIOS is to be used to read restart from file generated with an earlier \NEMO\ version (3.6 for instance),
 dimension \forcode{z} defined in restart file must be renamed to \forcode{nav_lev}.\\
 
-XIOS can also be used to write NEMO restart. A namelist parameter \np{nn\_wxios} is used to determine the 
-type of restart NEMO will write. If it is set to 0, default NEMO functionality will be used - each 
-processor writes its own restart file; if it is set to 1 XIOS will write restart into a single file; 
-for \np{nn\_wxios = 2} the restart will be written by XIOS into multiple files, one for each XIOS server. 
-Note, however, that \textbf{NEMO will not read restart generated by XIOS when \np{nn\_wxios = 2}}. The restart will 
-have to be rebuild before continuing the run. This option aims to reduce number of restart files generated by NEMO only, 
-and may be useful when there is a need to change number of processors used to run simulation. 
+XIOS can also be used to write \NEMO\ restart. A namelist parameter \np{nn\_wxios} is used to determine the
+type of restart \NEMO\ will write. If it is set to 0, default \NEMO\ functionality will be used - each
+processor writes its own restart file; if it is set to 1 XIOS will write restart into a single file;
+for \np{nn\_wxios}\forcode{ = 2} the restart will be written by XIOS into multiple files, one for each XIOS server.
+Note, however, that \textbf{\NEMO\ will not read restart generated by XIOS when \np{nn\_wxios}\forcode{ = 2}}. The restart will
+have to be rebuild before continuing the run. This option aims to reduce number of restart files generated by \NEMO\ only,
+and may be useful when there is a need to change number of processors used to run simulation.
 
 If an additional variable must be written to a restart file, the following steps are needed:
 \begin{description}
-   \item[step 1:] add variable name to a list of restart variables (in subroutine \rou{iom\_set\_rst\_vars,} \mdl{iom}) and 
-define correct grid for the variable (\forcode{grid_N_3D} - 3D variable, \forcode{grid_N} - 2D variable, \forcode{grid_vector} - 
+   \item[step 1:] add variable name to a list of restart variables (in subroutine \rou{iom\_set\_rst\_vars,} \mdl{iom}) and
+define correct grid for the variable (\forcode{grid_N_3D} - 3D variable, \forcode{grid_N} - 2D variable, \forcode{grid_vector} -
 1D variable, \forcode{grid_scalar} - scalar),
-   \item[step 2:] add variable to the list of fields written by restart.  This can be done either in subroutine 
-\rou{iom\_set\_rstw\_core} (\mdl{iom}) or by calling  \rou{iom\_set\_rstw\_active} (\mdl{iom}) with the name of a variable 
-as an argument. This convention follows approach for writing restart using iom, where variables are 
+   \item[step 2:] add variable to the list of fields written by restart.  This can be done either in subroutine
+\rou{iom\_set\_rstw\_core} (\mdl{iom}) or by calling  \rou{iom\_set\_rstw\_active} (\mdl{iom}) with the name of a variable
+as an argument. This convention follows approach for writing restart using iom, where variables are
 written either by \rou{rst\_write} or by calling \rou{iom\_rstput} from individual routines.
 \end{description}
@@ -181,5 +181,5 @@
 
 In \textit{attached mode} and if the type of file is ''multiple\_file'',
-then each NEMO process will also act as an IO server and produce its own set of output files.
+then each \NEMO\ process will also act as an IO server and produce its own set of output files.
 Superficially, this emulates the standard behaviour in previous versions.
 However, the subdomain written out by each process does not correspond to
@@ -193,5 +193,5 @@
 write to its own set of output files.
 If the ''one\_file'' option is chosen then all XIOS processes will collect their longitudinal strips and
-write (in parallel) to a single output file. 
+write (in parallel) to a single output file.
 Note running in detached mode requires launching a Multiple Process Multiple Data (MPMD) parallel job.
 The following subsection provides a typical example but the syntax will vary in different MPP environments.
@@ -200,10 +200,10 @@
 
 The number of cores used by the XIOS is specified when launching the model.
-The number of cores dedicated to XIOS should be from \texttildelow1/10 to \texttildelow1/50 of the number of 
-cores dedicated to NEMO.
+The number of cores dedicated to XIOS should be from \texttildelow1/10 to \texttildelow1/50 of the number of
+cores dedicated to \NEMO.
 Some manufacturers suggest using O($\sqrt{N}$) dedicated IO processors for N processors but
-this is a general recommendation and not specific to NEMO.
+this is a general recommendation and not specific to \NEMO.
 It is difficult to provide precise recommendations because the optimal choice will depend on
-the particular hardware properties of the target system 
+the particular hardware properties of the target system
 (parallel filesystem performance, available memory, memory bandwidth etc.)
 and the volume and frequency of data to be created.
@@ -213,5 +213,6 @@
 \subsubsection{Control of XIOS: the context in iodef.xml}
 
-As well as the {\ttfamily using\_server} flag, other controls on the use of XIOS are set in the XIOS context in iodef.xml.
+As well as the \texttt{using\_server} flag, other controls on the use of XIOS are set in
+the XIOS context in \textit{iodef.xml}.
 See the XML basics section below for more details on XML syntax and rules.
 
@@ -226,5 +227,5 @@
     \hline
     buffer\_size                                                            &
-    buffer size used by XIOS to send data from NEMO to XIOS.
+    buffer size used by XIOS to send data from \NEMO\ to XIOS.
     Larger is more efficient.
     Note that needed/used buffer sizes are summarized at the end of the job &
@@ -232,5 +233,5 @@
     \hline
     buffer\_server\_factor\_size                                            &
-    ratio between NEMO and XIOS buffer size.
+    ratio between \NEMO\ and XIOS buffer size.
     Should be 2.                                                            &
     2        \\
@@ -249,5 +250,5 @@
     \hline
     oasis\_codes\_id                                                        &
-    when using oasis, define the identifier of NEMO in the namcouple.
+    when using oasis, define the identifier of \NEMO\ in the namcouple.
     Note that the identifier of XIOS is xios.x                              &
     oceanx   \\
@@ -260,7 +261,7 @@
 \subsubsection{Installation}
 
-As mentioned, XIOS is supported separately and must be downloaded and compiled before it can be used with NEMO.
+As mentioned, XIOS is supported separately and must be downloaded and compiled before it can be used with \NEMO.
 See the installation guide on the \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS} wiki for help and guidance.
-NEMO will need to link to the compiled XIOS library.
+\NEMO\ will need to link to the compiled XIOS library.
 The \href{https://forge.ipsl.jussieu.fr/nemo/chrome/site/doc/NEMO/guide/html/install.html#extract-and-install-xios}
 {Extract and install XIOS} guide provides an example illustration of how this can be achieved.
@@ -275,5 +276,5 @@
 \begin{enumerate}
 \item[1.]
-  in NEMO code, add a \forcode{CALL iom_put( 'identifier', array )} where you want to output a 2D or 3D array.
+  in \NEMO\ code, add a \forcode{CALL iom_put( 'identifier', array )} where you want to output a 2D or 3D array.
 \item[2.]
   If necessary, add \forcode{USE iom ! I/O manager library} to the list of used modules in
@@ -288,7 +289,7 @@
 	<field_group id="grid_T" grid_ref="grid_T_3D"> <!-- T grid -->
 	...
-		<field id="identifier" long_name="blabla" ... />   
+		<field id="identifier" long_name="blabla" ... />
 		...
-</field_definition> 
+</field_definition>
 \end{xmllines}
 
@@ -313,9 +314,9 @@
 
 \begin{xmllines}
-<file id="file1" .../>   
+<file id="file1" .../>
 ...
-	<field field_ref="identifier" />   
+	<field field_ref="identifier" />
 	...
-</file>   
+</file>
 \end{xmllines}
 
@@ -333,5 +334,5 @@
 See \href{http://www.xmlnews.org/docs/xml-basics.html}{here} for more details.
 
-\subsubsection{Structure of the XML file used in NEMO}
+\subsubsection{Structure of the XML file used in \NEMO}
 
 The XML file used in XIOS is structured by 7 families of tags:
@@ -382,11 +383,11 @@
                                                                                                      \xmlcode{<context id="xios" ... >}   \\
     \hline
-    context nemo    &	context containing IO information for NEMO (mother grid when using AGRIF)  & 
+    context nemo    &	context containing IO information for \NEMO\ (mother grid when using AGRIF)  &
                                                                                                      \xmlcode{<context id="nemo" ... >}   \\
     \hline
-    context 1\_nemo &	context containing IO information for NEMO child grid 1 (when using AGRIF) & 
+    context 1\_nemo &	context containing IO information for \NEMO\ child grid 1 (when using AGRIF) &
                                                                                                      \xmlcode{<context id="1_nemo" ... >} \\
     \hline
-    context n\_nemo &	context containing IO information for NEMO child grid n (when using AGRIF) & 
+    context n\_nemo &	context containing IO information for \NEMO\ child grid n (when using AGRIF) &
                                                                                                      \xmlcode{<context id="n_nemo" ... >} \\
     \hline
@@ -413,5 +414,5 @@
 \end{table}
 
-\noindent Each context tag related to NEMO (mother or child grids) is divided into 5 parts 
+\noindent Each context tag related to \NEMO\ (mother or child grids) is divided into 5 parts
 (that can be defined in any order):
 
@@ -447,6 +448,6 @@
 The inclusion of XML files into the main XML file can be done through the attribute src:
 \xmlline|<context src="./nemo_def.xml" />|
- 
-\noindent In NEMO, by default, the field definition is done in 3 separate files (
+
+\noindent In \NEMO, by default, the field definition is done in 3 separate files (
 \path{cfgs/SHARED/field_def_nemo-oce.xml},
 \path{cfgs/SHARED/field_def_nemo-pisces.xml} and
@@ -455,5 +456,5 @@
 are included in the main iodef.xml file through the following commands:
 \begin{xmllines}
-<context id="nemo" src="./context_nemo.xml"/> 
+<context id="nemo" src="./context_nemo.xml"/>
 \end{xmllines}
 
@@ -470,7 +471,7 @@
 \begin{xmllines}
 <field_definition operation="average" >
-	<field id="sst"                    />   <!-- averaged      sst --> 
-	<field id="sss" operation="instant"/>   <!-- instantaneous sss --> 
-</field_definition> 
+	<field id="sst"                    />   <!-- averaged      sst -->
+	<field id="sss" operation="instant"/>   <!-- instantaneous sss -->
+</field_definition>
 \end{xmllines}
 
@@ -489,9 +490,9 @@
 </field_definition>
 <file_definition>
-	<file id="myfile" output_freq="1d" />   
+	<file id="myfile" output_freq="1d" />
 		<field field_ref="sst"                            />  <!-- default def -->
 		<field field_ref="sss" long_name="my description" />  <!-- overwrite   -->
 	</file>
-</file_definition> 
+</file_definition>
 \end{xmllines}
 
@@ -536,5 +537,5 @@
 	<field_group group_ref="groupU" />
 	<field field_ref="uocetr_eff"   />  <!-- add another field -->
-</file>   
+</file>
 \end{xmllines}
 
@@ -548,6 +549,6 @@
 Horizontal subdomains are defined through the attributs zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj of
 the tag family domain.
-It must therefore be done in the domain part of the XML file. 
-For example, in \path{cfgs/SHARED/domain_def.xml}, we provide the following example of a definition of 
+It must therefore be done in the domain part of the XML file.
+For example, in \path{cfgs/SHARED/domain_def.xml}, we provide the following example of a definition of
 a 5 by 5 box with the bottom left corner at point (10,10).
 
@@ -566,5 +567,5 @@
 \end{xmllines}
 
-Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain. 
+Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain.
 The Equatorial section, the TAO, RAMA and PIRATA moorings are already registered in the code and
 can therefore be outputted without taking care of their (i,j) position in the grid.
@@ -579,7 +580,7 @@
 \end{xmllines}
 
-Note that if the domain decomposition used in XIOS cuts the subdomain in several parts and if 
-you use the ''multiple\_file'' type for your output files, 
-you will endup with several files you will need to rebuild using unprovided tools (like ncpdq and ncrcat, 
+Note that if the domain decomposition used in XIOS cuts the subdomain in several parts and if
+you use the ''multiple\_file'' type for your output files,
+you will endup with several files you will need to rebuild using unprovided tools (like ncpdq and ncrcat,
 \href{http://nco.sourceforge.net/nco.html#Concatenation}{see nco manual}).
 We are therefore advising to use the ''one\_file'' type in this case.
@@ -614,5 +615,5 @@
 
 \begin{xmllines}
-<file_group id="1d" output_freq="1d" name="myfile_1d" > 
+<file_group id="1d" output_freq="1d" name="myfile_1d" >
 	<file id="myfileA" name_suffix="_AAA" > <!-- will create file "myfile_1d_AAA"  -->
 		...
@@ -669,5 +670,5 @@
 \end{table}
 
-\noindent For example, 
+\noindent For example,
 \xmlline|<file id="myfile_hzoom" name="myfile_@expname@_@startdate@_freq@freq@" output_freq="1d" >|
 
@@ -681,7 +682,7 @@
 \noindent will give the following file name radical: \ifile{myfile\_ORCA2\_19891231\_freq1d}
 
-\subsubsection{Other controls of the XML attributes from NEMO}
-
-The values of some attributes are defined by subroutine calls within NEMO 
+\subsubsection{Other controls of the XML attributes from \NEMO}
+
+The values of some attributes are defined by subroutine calls within \NEMO
 (calls to iom\_set\_domain\_attr, iom\_set\_axis\_attr and iom\_set\_field\_attr in \mdl{iom}).
 Any definition given in the XML file will be overwritten.
@@ -778,5 +779,5 @@
 \end{xmllines}
 
-Note that, then the code is crashing, writting real4 variables forces a numerical conversion from 
+Note that, then the code is crashing, writting real4 variables forces a numerical conversion from
 real8 to real4 which will create an internal error in NetCDF and will avoid the creation of the output files.
 Forcing double precision outputs with prec="8" (for example in the field\_definition) will avoid this problem.
@@ -786,5 +787,5 @@
 
 \begin{xmllines}
-<file_group id="1d" output_freq="1d" output_level="10" enabled=".true."> <!-- 1d files --> 
+<file_group id="1d" output_freq="1d" output_level="10" enabled=".true."> <!-- 1d files -->
 	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
 		<field field_ref="sst" name="tos" >
@@ -795,5 +796,5 @@
 		<variable id="my_global_attribute" type="string" > blabla_global </variable>
 	</file>
-</file_group> 
+</file_group>
 \end{xmllines}
 
@@ -810,9 +811,9 @@
 
 \begin{xmllines}
-<file_group id="5d" output_freq="5d"  output_level="10" enabled=".true." >  <!-- 5d files -->  
+<file_group id="5d" output_freq="5d"  output_level="10" enabled=".true." >  <!-- 5d files -->
 	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
 		<field field_ref="toce" operation="instant" freq_op="5d" > @toce_e3t / @e3t </field>
 	</file>
-</file_group> 
+</file_group>
 \end{xmllines}
 
@@ -839,12 +840,12 @@
 
 \begin{xmllines}
-<file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files -->  
+<file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files -->
 	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
-		<field field_ref="ssh" name="sshstd" long_name="sea_surface_temperature_standard_deviation" 
+		<field field_ref="ssh" name="sshstd" long_name="sea_surface_temperature_standard_deviation"
 		operation="instant" freq_op="1m" >
 			sqrt( @ssh2 - @ssh * @ssh )
 		</field>
 	</file>
-</file_group> 
+</file_group>
 \end{xmllines}
 
@@ -853,5 +854,5 @@
 here we use the default, average.
 So, in the above case, @ssh2 will do the monthly mean of ssh*ssh.
-Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'': 
+Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'':
 here the temporal average is alreday done by the ``@'' function so we just use instant.
 field\_ref="ssh" means that attributes not explicitely defined, are inherited from ssh field.
@@ -871,5 +872,5 @@
 
 \begin{xmllines}
-<file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files -->  
+<file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files -->
 	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
 		<field field_ref="sst" name="sstdcy" long_name="amplitude of sst diurnal cycle" operation="average" freq_op="1d" >
@@ -877,5 +878,5 @@
 		</field>
 	</file>
-</file_group> 
+</file_group>
 \end{xmllines}
 
@@ -1331,12 +1332,12 @@
 \subsection{CF metadata standard compliance}
 
-Output from the XIOS IO server is compliant with 
+Output from the XIOS IO server is compliant with
 \href{http://cfconventions.org/Data/cf-conventions/cf-conventions-1.5/build/cf-conventions.html}{version 1.5} of
-the CF metadata standard. 
+the CF metadata standard.
 Therefore while a user may wish to add their own metadata to the output files (as demonstrated in example 4 of
 section \autoref{subsec:IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard.
 
 Some metadata that may significantly increase the file size (horizontal cell areas and vertices) are controlled by
-the namelist parameter \np{ln\_cfmeta} in the \ngn{namrun} namelist.
+the namelist parameter \np{ln\_cfmeta} in the \nam{run} namelist.
 This must be set to true if these metadata are to be included in the output files.
 
@@ -1360,6 +1361,6 @@
 Datasets created with chunking and compression are not backwards compatible with NetCDF3 "classic" format but
 most analysis codes can be relinked simply with the new libraries and will then read both NetCDF3 and NetCDF4 files.
-NEMO executables linked with NetCDF4 libraries can be made to produce NetCDF3 files by
-setting the \np{ln\_nc4zip} logical to false in the \textit{namnc4} namelist:
+\NEMO\ executables linked with NetCDF4 libraries can be made to produce NetCDF3 files by
+setting the \np{ln\_nc4zip} logical to false in the \nam{nc4} namelist:
 
 %------------------------------------------namnc4----------------------------------------------------
@@ -1404,6 +1405,6 @@
 
 \noindent for a standard ORCA2\_LIM configuration gives chunksizes of {\small\ttfamily 46x38x1} respectively in
-the mono-processor case (\ie global domain of {\small\ttfamily 182x149x31}).
-An illustration of the potential space savings that NetCDF4 chunking and compression provides is given in 
+the mono-processor case (\ie\ global domain of {\small\ttfamily 182x149x31}).
+An illustration of the potential space savings that NetCDF4 chunking and compression provides is given in
 table \autoref{tab:NC4} which compares the results of two short runs of the ORCA2\_LIM reference configuration with
 a 4x2 mpi partitioning.
@@ -1453,31 +1454,31 @@
 
 When \key{iomput} is activated with \key{netcdf4} chunking and compression parameters for fields produced via
-\np{iom\_put} calls are set via an equivalent and identically named namelist to \textit{namnc4} in
-\np{xmlio\_server.def}.
-Typically this namelist serves the mean files whilst the \ngn{ namnc4} in the main namelist file continues to
+\rou{iom\_put} calls are set via an equivalent and identically named namelist to \nam{nc4} in
+\textit{xmlio\_server.def}.
+Typically this namelist serves the mean files whilst the \nam{nc4} in the main namelist file continues to
 serve the restart files.
 This duplication is unfortunate but appropriate since, if using io\_servers, the domain sizes of
 the individual files produced by the io\_server processes may be different to those produced by
 the invidual processing regions and different chunking choices may be desired.
- 
+
 % -------------------------------------------------------------------------------------------------------------
 %       Tracer/Dynamics Trends
 % -------------------------------------------------------------------------------------------------------------
 \section[Tracer/Dynamics trends (\texttt{namtrd})]
-{Tracer/Dynamics trends (\protect\ngn{namtrd})}
+{Tracer/Dynamics trends (\protect\nam{trd})}
 \label{sec:DIA_trd}
 
 %------------------------------------------namtrd----------------------------------------------------
 
-\nlst{namtrd} 
+\nlst{namtrd}
 %-------------------------------------------------------------------------------------------------------------
 
 Each trend of the dynamics and/or temperature and salinity time evolution equations can be send to
 \mdl{trddyn} and/or \mdl{trdtra} modules (see TRD directory) just after their computation
-(\ie at the end of each $dyn\cdots.F90$ and/or $tra\cdots.F90$ routines).
-This capability is controlled by options offered in \ngn{namtrd} namelist.
+(\ie\ at the end of each \textit{dyn....F90} and/or \textit{tra....F90} routines).
+This capability is controlled by options offered in \nam{trd} namelist.
 Note that the output are done with XIOS, and therefore the \key{iomput} is required.
 
-What is done depends on the \ngn{namtrd} logical set to \forcode{.true.}:
+What is done depends on the \nam{trd} logical set to \forcode{.true.}:
 
 \begin{description}
@@ -1502,10 +1503,10 @@
 \end{description}
 
-Note that the mixed layer tendency diagnostic can also be used on biogeochemical models via 
+Note that the mixed layer tendency diagnostic can also be used on biogeochemical models via
 the \key{trdtrc} and \key{trdmxl\_trc} CPP keys.
 
 \textbf{Note that} in the current version (v3.6), many changes has been introduced but not fully tested.
 In particular, options associated with \np{ln\_dyn\_mxl}, \np{ln\_vor\_trd}, and \np{ln\_tra\_mxl} are not working,
-and none of the options have been tested with variable volume (\ie \np{ln\_linssh}\forcode{ = .true.}).
+and none of the options have been tested with variable volume (\ie\ \np{ln\_linssh}\forcode{ = .true.}).
 
 % -------------------------------------------------------------------------------------------------------------
@@ -1517,10 +1518,10 @@
 %--------------------------------------------namflo-------------------------------------------------------
 
-\nlst{namflo} 
+\nlst{namflo}
 %--------------------------------------------------------------------------------------------------------------
 
 The on-line computation of floats advected either by the three dimensional velocity field or constraint to
 remain at a given depth ($w = 0$ in the computation) have been introduced in the system during the CLIPPER project.
-Options are defined by \ngn{namflo} namelist variables.
+Options are defined by \nam{flo} namelist variables.
 The algorithm used is based either on the work of \cite{blanke.raynaud_JPO97} (default option),
 or on a $4^th$ Runge-Hutta algorithm (\np{ln\_flork4}\forcode{ = .true.}).
@@ -1533,5 +1534,5 @@
 (IJK coordinates, (\np{ln\_ariane}\forcode{ = .true.}) ) or with longitude and latitude.
 
-In case of Ariane convention, input filename is \np{init\_float\_ariane}.
+In case of Ariane convention, input filename is \textit{init\_float\_ariane}.
 Its format is: \\
 {\scriptsize \texttt{I J K nisobfl itrash}}
@@ -1541,5 +1542,5 @@
  - I,J,K  : indexes of initial position
 
- - nisobfl: 0 for an isobar float, 1 for a float following the w velocity  
+ - nisobfl: 0 for an isobar float, 1 for a float following the w velocity
 
  - itrash : set to zero; it is a dummy variable to respect Ariane Tools convention
@@ -1627,5 +1628,5 @@
 This on-line Harmonic analysis is actived with \key{diaharm}.
 
-Some parameters are available in namelist \ngn{nam\_diaharm}:
+Some parameters are available in namelist \nam{\_diaharm}:
 
  - \np{nit000\_han} is the first time step used for harmonic analysis
@@ -1635,5 +1636,5 @@
  - \np{nstep\_han}  is the  time step frequency for harmonic analysis
 
- - \np{nb\_ana}     is the number of harmonics to analyse
+% - \np{nb\_ana}     is the number of harmonics to analyse
 
  - \np{tname}       is an array with names of tidal constituents to analyse
@@ -1678,5 +1679,5 @@
 The pathways between them are contructed using tools which can be found in \texttt{tools/SECTIONS\_DIADCT}
 and are written in a binary file \texttt{section\_ijglobal.diadct} which is later read in by
-NEMO to compute on-line transports.
+\NEMO\ to compute on-line transports.
 
 The on-line transports module creates three output ascii files:
@@ -1688,5 +1689,5 @@
 - \texttt{salt\_transport}   for   salt transports (unit: $10^{9}Kg s^{-1}$) \\
 
-Namelist variables in \ngn{namdct} control how frequently the flows are summed and the time scales over which
+Namelist variables in \nam{dct} control how frequently the flows are summed and the time scales over which
 they are averaged, as well as the level of output for debugging:
 \np{nn\_dct}   : frequency of instantaneous transports computing
@@ -1710,5 +1711,5 @@
  - \texttt{long2 lat2}, coordinates of the second extremity of the section;
 
- - \texttt{nclass}    the number of bounds of your classes (\eg bounds for 2 classes);
+ - \texttt{nclass}    the number of bounds of your classes (\eg\ bounds for 2 classes);
 
  - \texttt{okstrpond} to compute    heat and       salt transports, \texttt{nostrpond} if no;
@@ -1743,7 +1744,7 @@
 
  - \texttt{zsigp} for potential density classes \\
-  
+
  The script \texttt{job.ksh} computes the pathway for each section and creates a binary file
- \texttt{section\_ijglobal.diadct} which is read by NEMO. \\
+ \texttt{section\_ijglobal.diadct} which is read by \NEMO. \\
 
  It is possible to use this tools for new configuations: \texttt{job.ksh} has to be updated with
@@ -1831,10 +1832,10 @@
 
 Let denote
-$\mathcal{M}$ the total mass    of liquid seawater ($\mathcal{M} = \int_D \rho dv$), 
-$\mathcal{V}$ the total volume  of        seawater      ($\mathcal{V} = \int_D dv$), 
-$\mathcal{A}$ the total surface of       the ocean      ($\mathcal{A} = \int_S ds$), 
-$\bar{\rho}$ the global mean  seawater (\textit{in situ}) density 
+$\mathcal{M}$ the total mass    of liquid seawater ($\mathcal{M} = \int_D \rho dv$),
+$\mathcal{V}$ the total volume  of        seawater      ($\mathcal{V} = \int_D dv$),
+$\mathcal{A}$ the total surface of       the ocean      ($\mathcal{A} = \int_S ds$),
+$\bar{\rho}$ the global mean  seawater (\textit{in situ}) density
 ($\bar{\rho} = 1/\mathcal{V} \int_D \rho \,dv$), and
-$\bar{\eta}$ the global mean sea level 
+$\bar{\eta}$ the global mean sea level
 ($\bar{\eta} = 1/\mathcal{A} \int_S \eta \,ds$).
 
@@ -1859,5 +1860,5 @@
 where $\rho$ is the \textit{in situ} density, and \textit{emp} the surface mass exchanges with the other media of
 the Earth system (atmosphere, sea-ice, land).
-Its global averaged leads to the total mass change 
+Its global averaged leads to the total mass change
 
 \begin{equation}
@@ -1876,9 +1877,9 @@
 \end{equation}
 
-The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or subtracting mass from the ocean. 
-The second term arises from temporal changes in the global mean density; \ie from steric effects.
+The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or subtracting mass from the ocean.
+The second term arises from temporal changes in the global mean density; \ie\ from steric effects.
 
 In a Boussinesq fluid, $\rho$ is replaced by $\rho_o$ in all the equation except when $\rho$ appears multiplied by
-the gravity (\ie in the hydrostatic balance of the primitive Equations).
+the gravity (\ie\ in the hydrostatic balance of the primitive Equations).
 In particular, the mass conservation equation, \autoref{eq:Co_nBq}, degenerates into the incompressibility equation:
 
@@ -1901,5 +1902,5 @@
 
 Nevertheless, following \citep{greatbatch_JGR94}, the steric effect on the volume can be diagnosed by
-considering the mass budget of the ocean. 
+considering the mass budget of the ocean.
 The apparent changes in $\mathcal{M}$, mass of the ocean, which are not induced by surface mass flux
 must be compensated by a spatially uniform change in the mean sea level due to expansion/contraction of the ocean
@@ -1917,5 +1918,5 @@
 is converted into a mean change in sea level.
 Introducing the total density anomaly, $\mathcal{D}= \int_D d_a \,dv$,
-where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO (cf. \autoref{subsec:TRA_eos})
+where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO\ (cf. \autoref{subsec:TRA_eos})
 in \autoref{eq:M_Bq} leads to a very simple form for the steric height:
 
@@ -1927,5 +1928,5 @@
 The above formulation of the steric height of a Boussinesq ocean requires four remarks.
 First, one can be tempted to define $\rho_o$ as the initial value of $\mathcal{M}/\mathcal{V}$,
-\ie set $\mathcal{D}_{t=0}=0$, so that the initial steric height is zero.
+\ie\ set $\mathcal{D}_{t=0}=0$, so that the initial steric height is zero.
 We do not recommend that.
 Indeed, in this case $\rho_o$ depends on the initial state of the ocean.
@@ -1941,7 +1942,7 @@
 does not change when the sea level is changing as it is the case in all global ocean GCMs
 (wetting and drying of grid point is not allowed).
-  
+
 Third, the discretisation of \autoref{eq:steric_Bq} depends on the type of free surface which is considered.
-In the non linear free surface case, \ie \np{ln\_linssh}\forcode{ = .true.}, it is given by
+In the non linear free surface case, \ie\ \np{ln\_linssh}\forcode{ = .true.}, it is given by
 
 \[
@@ -1966,6 +1967,6 @@
 so that there are no associated ocean currents.
 Hence, the dynamically relevant sea level is the effective sea level,
-\ie the sea level as if sea ice (and snow) were converted to liquid seawater \citep{campin.marshall.ea_OM08}.
-However, in the current version of \NEMO the sea-ice is levitating above the ocean without mass exchanges between
+\ie\ the sea level as if sea ice (and snow) were converted to liquid seawater \citep{campin.marshall.ea_OM08}.
+However, in the current version of \NEMO\ the sea-ice is levitating above the ocean without mass exchanges between
 ice and ocean.
 Therefore the model effective sea level is always given by $\eta + \eta_s$, whether or not there is sea ice present.
@@ -2021,9 +2022,9 @@
     }
   \end{center}
-\end{figure}  
+\end{figure}
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
 % -----------------------------------------------------------
-%       CMIP specific diagnostics 
+%       CMIP specific diagnostics
 % -----------------------------------------------------------
 \subsection[CMIP specific diagnostics (\textit{diaar5.F90}, \textit{diaptr.F90})]
@@ -2033,8 +2034,12 @@
 In \mdl{diaar5} they correspond to outputs that are required for AR5 simulations (CMIP5)
 (see also \autoref{sec:DIA_steric} for one of them).
-The module \mdl{diaar5} is active when one of the following outputs is required : global total volume (voltot), global mean ssh (sshtot), global total mass (masstot), global mean temperature (temptot), global mean ssh steric (sshsteric), global mean ssh thermosteric (sshthster), global mean salinity (saltot), sea water pressure at sea floor (botpres), dynamic sea surface height (sshdyn).
-
-In \mdl{diaptr} when \np{ln\_diaptr}\forcode{ = .true.} 
-(see the \textit{\ngn{namptr} } namelist below) can be computed on-line the poleward heat and salt transports, their advective and diffusive component, and the meriodional stream function .
+The module \mdl{diaar5} is active when one of the following outputs is required :
+global total volume (voltot), global mean ssh (sshtot), global total mass (masstot), global mean temperature (temptot),
+global mean ssh steric (sshsteric), global mean ssh thermosteric (sshthster), global mean salinity (saltot),
+sea water pressure at sea floor (botpres), dynamic sea surface height (sshdyn).
+
+In \mdl{diaptr} when \np{ln\_diaptr}\forcode{ = .true.}
+(see the \nam{ptr} namelist below) can be computed on-line the poleward heat and salt transports,
+their advective and diffusive component, and the meriodional stream function .
 When \np{ln\_subbas}\forcode{ = .true.}, transports and stream function are computed for the Atlantic, Indian,
 Pacific and Indo-Pacific Oceans (defined north of 30\deg{S}) as well as for the World Ocean.
@@ -2044,9 +2049,9 @@
 %------------------------------------------namptr-----------------------------------------
 
-\nlst{namptr} 
+\nlst{namptr}
 %-----------------------------------------------------------------------------------------
 
 % -----------------------------------------------------------
-%       25 hour mean and hourly Surface, Mid and Bed 
+%       25 hour mean and hourly Surface, Mid and Bed
 % -----------------------------------------------------------
 \subsection{25 hour mean output for tidal models}
@@ -2097,5 +2102,5 @@
 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 variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \nam{ctl} 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
@@ -2103,5 +2108,5 @@
 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. 
+The maximum values from the run are also copied to the ocean.output file.
 
 % ================================================================
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIU.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIU.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIU.tex	(revision 11435)
@@ -9,5 +9,5 @@
 \label{chap:DIU}
 
-\minitoc
+\chaptertoc
 
 
@@ -16,5 +16,5 @@
 
 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.  
+temperature (skin SST) is found in the DIU directory.
 The skin temperature can be split into three parts:
 \begin{itemize}
@@ -30,11 +30,11 @@
 
 Models are provided for both the warm layer, \mdl{diurnal\_bulk}, and the cool skin, \mdl{cool\_skin}.
-Foundation SST is not considered as it can be obtained either from the main NEMO model
-(\ie from the temperature of the top few model levels) or from some other source.  
+Foundation SST is not considered as it can be obtained either from the main \NEMO\ model
+(\ie\ 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_{\mathrm{cs}}$ and $\Delta T_{\mathrm{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 \ngn{namdiu}:
+Both the cool skin and warm layer models are controlled through the namelist \nam{diu}:
 
 \nlst{namdiu}
@@ -44,5 +44,5 @@
   A logical switch for turning on/off both the cool skin and warm layer.
 \item[\np{ln\_diurnal\_only}]
-  A logical switch which if \forcode{.true.} will run the diurnal model without the other dynamical parts of NEMO.
+  A logical switch which if \forcode{.true.} will run the diurnal model without the other dynamical parts of \NEMO.
   \np{ln\_diurnal\_only} must be \forcode{.false.} if \np{ln\_diurnal} is \forcode{.false.}.
 \end{description}
@@ -53,5 +53,5 @@
 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.  
+The cool skin model, which is determined purely by the instantaneous fluxes, has no initialisation variable.
 
 %===============================================================
@@ -102,5 +102,5 @@
 \end{equation}
 where $\zeta=\frac{D_T}{L}$.  It is clear that the first derivative of (\autoref{eq:stab_func_eqn}),
-and thus of (\autoref{eq:ecmwf1}), is discontinuous at $\zeta=0$ (\ie $Q\rightarrow0$ in
+and thus of (\autoref{eq:ecmwf1}), is discontinuous at $\zeta=0$ (\ie\ $Q\rightarrow0$ in
 equation (\autoref{eq:ecmwf2})).
 
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_DOM.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_DOM.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_DOM.tex	(revision 11435)
@@ -8,9 +8,9 @@
 \label{chap:DOM}
 
-\minitoc
+%\chaptertoc
 
 % Missing things:
 % 	- istate: description of the initial state   ==> this has to be put elsewhere..
-%                  perhaps in MISC ?  By the way the initialisation of T S and dynamics 
+%                  perhaps in MISC ?  By the way the initialisation of T S and dynamics
 %                  should be put outside of DOM routine (better with TRC staff and off-line
 %                  tracers)
@@ -19,20 +19,27 @@
 
 \vfill
-\begin{figure}[b]
-\subsubsection*{Changes record}
-\begin{tabular}{m{0.08\linewidth}||m{0.32\linewidth}|m{0.6\linewidth}}
-    Release   & Author(s)     & Modifications \\
-\hline
-    {\em 4.0} & {\em Simon M{\"u}ller \& Andrew Coward} & {\em Compatibility changes for v4.0. Major simplication has moved many of the options to external domain configuration tools. For now this information has been retained in \autoref{apdx:DOMAINcfg} }  \\
-    {\em 3.x} & {\em Sebastien Masson, Gurvan Madec \& Rashid Benshila } & {\em }  \\
-\end{tabular}
-\end{figure}
+
+\begin{table}[b]
+  \footnotesize
+  \caption*{Changes record}
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications                                                          \\
+    \hline
+    {\em 4.0} & {\em Simon M\"{u}ller \& Andrew Coward} &
+    {\em
+      Compatibility changes Major simplification has moved many of the options to external domain configuration tools.
+      (see \autoref{apdx:DOMAINcfg})
+    }                                                                                            \\
+    {\em 3.x} & {\em Rachid Benshila, Gurvan Madec \& S\'{e}bastien Masson} &
+    {\em First version}                                                                          \\
+  \end{tabularx}
+\end{table}
 
 \newpage
 
-Having defined the continuous equations in \autoref{chap:PE} and chosen a time discretization \autoref{chap:STP},
-we need to choose a grid for spatial discretization and related numerical algorithms.
+Having defined the continuous equations in \autoref{chap:PE} and chosen a time discretisation \autoref{chap:STP},
+we need to choose a grid for spatial discretisation and related numerical algorithms.
 In the present chapter, we provide a general description of the staggered grid used in \NEMO,
-and other relevant information about the DOM (DOMain) source-code modules .
+and other relevant information about the DOM (DOMain) source code modules.
 
 % ================================================================
@@ -43,5 +50,5 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%        Arrangement of Variables 
+%        Arrangement of Variables
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Arrangement of variables}
@@ -75,5 +82,5 @@
 the barotropic stream function $\psi$ is defined at horizontal points overlying the $\zeta$ and $f$-points.
 
-The ocean mesh (\ie the position of all the scalar and vector points) is defined by the transformation that
+The ocean mesh (\ie\ the position of all the scalar and vector points) is defined by the transformation that
 gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$.
 The grid-points are located at integer or integer and a half value of $(i,j,k)$ as indicated on \autoref{tab:cell}.
@@ -127,7 +134,7 @@
 
 Note that the definition of the scale factors
-(\ie as the analytical first derivative of the transformation that
+(\ie\ as the analytical first derivative of the transformation that
 results in $(\lambda,\varphi,z)$ as a function of $(i,j,k)$)
-is specific to the \NEMO model \citep{marti.madec.ea_JGR92}.
+is specific to the \NEMO\ model \citep{marti.madec.ea_JGR92}.
 As an example, a scale factor in the $i$ direction is defined locally at a $t$-point,
 whereas many other models on a C grid choose to define such a scale factor as
@@ -159,5 +166,5 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%        Vector Invariant Formulation 
+%        Vector Invariant Formulation
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Discrete operators}
@@ -173,7 +180,6 @@
 
 Similar operators are defined with respect to $i + 1/2$, $j$, $j + 1/2$, $k$, and $k + 1/2$.
-Following \autoref{eq:PE_grad} and \autoref{eq:PE_lap}, the gradient of a variable $q$ defined at
-a $t$-point has its three components defined at $u$-, $v$- and $w$-points while
-its Laplacian is defined at the $t$-point.
+Following \autoref{eq:PE_grad} and \autoref{eq:PE_lap}, the gradient of a variable $q$ defined at a $t$-point has
+its three components defined at $u$-, $v$- and $w$-points while its Laplacian is defined at the $t$-point.
 These operators have the following discrete forms in the curvilinear $s$-coordinates system:
 \[
@@ -215,5 +221,5 @@
 
 The vertical average over the whole water column is denoted by an overbar and is for
-a masked field $q$ (\ie a quantity that is equal to zero inside solid areas):
+a masked field $q$ (\ie\ a quantity that is equal to zero inside solid areas):
 \begin{equation}
   \label{eq:DOM_bar}
@@ -247,5 +253,5 @@
 \end{alignat}
 
-In other words, the adjoint of the differencing and averaging operators are $\delta_i^* = \delta_{i + 1/2}$ and 
+In other words, the adjoint of the differencing and averaging operators are $\delta_i^* = \delta_{i + 1/2}$ and
 $(\overline{\cdots}^{\, i})^* = \overline{\cdots}^{\, i + 1/2}$, respectively.
 These two properties will be used extensively in the \autoref{apdx:C} to
@@ -253,5 +259,5 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%        Numerical Indexing 
+%        Numerical Indexing
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Numerical indexing}
@@ -275,9 +281,9 @@
 integer values for $t$-points only while all the other points involve integer and a half values.
 Therefore, a specific integer indexing has been defined for points other than $t$-points
-(\ie velocity and vorticity grid-points).
+(\ie\ velocity and vorticity grid-points).
 Furthermore, the direction of the vertical indexing has been reversed and the surface level set at $k = 1$.
 
 % -----------------------------------
-%        Horizontal Indexing 
+%        Horizontal Indexing
 % -----------------------------------
 \subsubsection{Horizontal indexing}
@@ -288,8 +294,8 @@
 the $t$-point and the eastward $u$-point (northward $v$-point) have the same index
 (see the dashed area in \autoref{fig:index_hor}).
-A $t$-point and its nearest northeast $f$-point have the same $i$-and $j$-indices.
+A $t$-point and its nearest north-east $f$-point have the same $i$-and $j$-indices.
 
 % -----------------------------------
-%        Vertical indexing 
+%        Vertical indexing
 % -----------------------------------
 \subsubsection{Vertical indexing}
@@ -303,11 +309,13 @@
 The last $w$-level ($k = jpk$) either corresponds to or is below the ocean floor while
 the last $t$-level is always outside the ocean domain (\autoref{fig:index_vert}).
-Note that a $w$-point and the directly underlaying $t$-point have a common $k$ index (\ie $t$-points and their
-nearest $w$-point neighbour in negative index direction), in contrast to the indexing on the horizontal plane where
-the $t$-point has the same index as the nearest velocity points in the positive direction of the respective horizontal axis index
+Note that a $w$-point and the directly underlaying $t$-point have a common $k$ index
+(\ie\ $t$-points and their nearest $w$-point neighbour in negative index direction),
+in contrast to the indexing on the horizontal plane where the $t$-point has the same index as
+the nearest velocity points in the positive direction of the respective horizontal axis index
 (compare the dashed area in \autoref{fig:index_hor} and \autoref{fig:index_vert}).
 Since the scale factors are chosen to be strictly positive,
-a \textit{minus sign} is included in the \fortran implementations of \textit{all the vertical derivatives} of
-the discrete equations given in this manual in order to accommodate the opposing vertical index directions in implementation and documentation.
+a \textit{minus sign} is included in the \fortran implementations of
+\textit{all the vertical derivatives} of the discrete equations given in this manual in order to
+accommodate the opposing vertical index directions in implementation and documentation.
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -333,37 +341,34 @@
 \nlst{namcfg}
 
-Two typical methods are available to specify the spatial domain
-configuration; they can be selected using parameter \np{ln\_read\_cfg}
-parameter in namelist \ngn{namcfg}. 
-
-If \np{ln\_read\_cfg} is set to \forcode{.true.}, the domain-specific parameters
-and fields are read from a netCDF input file, whose name (without its .nc
-suffix) can be specified as the value of the \np{cn\_domcfg} parameter in
-namelist \ngn{namcfg}.
-
-If \np{ln\_read\_cfg} is set to \forcode{.false.}, the domain-specific
-parameters and fields can be provided (\eg analytically computed) by subroutines
-\mdl{usrdef\_hgr} and \mdl{usrdef\_zgr}. These subroutines can be supplied in
-the \path{MY_SRC} directory of the configuration, and default versions that
-configure the spatial domain for the GYRE reference configuration are present in
-the \path{src/OCE/USR} directory.
-
-In version 4.0 there are no longer any options for reading complex bathmetries and 
-performing a vertical discretization at run-time. Whilst it is occasionally convenient
-to have a common bathymetry file and, for example, to run similar models with and
-without partial bottom boxes and/or sigma-coordinates, supporting such choices leads to
-overly complex code. Worse still is the difficulty of ensuring the model configurations 
-intended to be identical are indeed so when the model domain itself can be altered by runtime
-selections. The code previously used to perform vertical discretization has be incorporated 
-into an external tool (\path{tools/DOMAINcfg}) which is briefly described in \autoref{apdx:DOMAINcfg}.
-
-The next subsections summarise the parameter and fields related to the
-configuration of the whole model domain. These represent the minimum information
-that must be provided either via the \np{cn\_domcfg} file or set by code
-inserted into user-supplied versions of the \mdl{usrdef\_*} subroutines. The
-requirements are presented in three sections: the domain size
-(\autoref{subsec:DOM_size}), the horizontal mesh
-(\autoref{subsec:DOM_hgr}), and the vertical grid
-(\autoref{subsec:DOM_zgr}).
+Two typical methods are available to specify the spatial domain configuration;
+they can be selected using parameter \np{ln\_read\_cfg} parameter in namelist \nam{cfg}.
+
+If \np{ln\_read\_cfg} is set to \forcode{.true.},
+the domain-specific parameters and fields are read from a netCDF input file,
+whose name (without its .nc suffix) can be specified as the value of the \np{cn\_domcfg} parameter in namelist \nam{cfg}.
+
+If \np{ln\_read\_cfg} is set to \forcode{.false.},
+the domain-specific parameters and fields can be provided (\eg\ analytically computed) by
+subroutines \mdl{usrdef\_hgr} and \mdl{usrdef\_zgr}.
+These subroutines can be supplied in the \path{MY_SRC} directory of the configuration,
+and default versions that configure the spatial domain for the GYRE reference configuration are present in
+the \path{./src/OCE/USR} directory.
+
+In version 4.0 there are no longer any options for reading complex bathymetries and
+performing a vertical discretisation at run-time.
+Whilst it is occasionally convenient to have a common bathymetry file and, for example,
+to run similar models with and without partial bottom boxes and/or sigma-coordinates,
+supporting such choices leads to overly complex code.
+Worse still is the difficulty of ensuring the model configurations intended to be identical are indeed so when
+the model domain itself can be altered by runtime selections.
+The code previously used to perform vertical discretisation has been incorporated into an external tool
+(\path{./tools/DOMAINcfg}) which is briefly described in \autoref{apdx:DOMAINcfg}.
+
+The next subsections summarise the parameter and fields related to the configuration of the whole model domain.
+These represent the minimum information that must be provided either via the \np{cn\_domcfg} file or set by code
+inserted into user-supplied versions of the \texttt{usrdef\_*} subroutines.
+The requirements are presented in three sections:
+the domain size (\autoref{subsec:DOM_size}), the horizontal mesh (\autoref{subsec:DOM_hgr}),
+and the vertical grid (\autoref{subsec:DOM_zgr}).
 
 % -----------------------------------
@@ -373,24 +378,20 @@
 \label{subsec:DOM_size}
 
-The total size of the computational domain is set by the parameters
-\np{jpiglo}, \np{jpjglo} and \np{jpkglo} for the $i$, $j$ and $k$
-directions, respectively. Note, that the variables \forcode{jpi} and \forcode{jpj}
-refer to the size of each processor subdomain when the code is run in
-parallel using domain decomposition (\key{mpp\_mpi} defined, see
-\autoref{sec:LBC_mpp}).
+The total size of the computational domain is set by the parameters \jp{jpiglo}, \jp{jpjglo} and \jp{jpkglo} for
+the $i$, $j$ and $k$ directions, respectively.
+Note, that the variables \texttt{jpi} and \texttt{jpj} refer to the size of each processor subdomain when
+the code is run in parallel using domain decomposition (\key{mpp\_mpi} defined,
+see \autoref{sec:LBC_mpp}).
 
 The name of the configuration is set through parameter \np{cn\_cfg},
-and the nominal resolution through parameter \np{nn\_cfg} (unless in
-the input file both of variables \forcode{ORCA} and \forcode{ORCA_index}
-are present, in which case \np{cn\_cfg} and \np{nn\_cfg} are set from these
-values accordingly).
-
-The global lateral boundary condition type is selected from 8 options
-using parameter \np{jperio}. See \autoref{sec:LBC_jperio} for
-details on the available options and the corresponding values for
-\np{jperio}.
-
-% ================================================================
-% Domain: Horizontal Grid (mesh) 
+and the nominal resolution through parameter \np{nn\_cfg}
+(unless in the input file both of variables \texttt{ORCA} and \texttt{ORCA\_index} are present,
+in which case \np{cn\_cfg} and \np{nn\_cfg} are set from these values accordingly).
+
+The global lateral boundary condition type is selected from 8 options using parameter \jp{jperio}.
+See \autoref{sec:LBC_jperio} for details on the available options and the corresponding values for \jp{jperio}.
+
+% ================================================================
+% Domain: Horizontal Grid (mesh)
 % ================================================================
 \subsection{Horizontal grid mesh (\protect\mdl{domhgr})}
@@ -402,7 +403,9 @@
 \subsubsection{Required fields}
 \label{sec:DOM_hgr_fields}
-The explicit specification of a range of mesh-related fields are required for the definition of a configuration. These include:
-
-\begin{Verbatim}[fontsize=\tiny]
+
+The explicit specification of a range of mesh-related fields are required for the definition of a configuration.
+These include:
+
+\begin{clines}
 int    jpiglo, jpjglo, jpkglo            /* global domain sizes                                          */
 int    jperio                            /* lateral global domain b.c.                                   */
@@ -411,40 +414,49 @@
 double e1t, e1u, e1v, e1f                /* horizontal scale factors                                     */
 double e2t, e2u, e2v, e2f                /* horizontal scale factors                                     */
-\end{Verbatim}
-
-The values of the geographic longitude and latitude arrays at indices $i,j$ correspond to the analytical expressions of the longitude $\lambda$ and latitude $\varphi$ as a function of $(i,j)$, evaluated at the values as specified in Table \autoref{tab:cell} for the respective grid-point position. The calculation of the values of the horizontal scale factor arrays in general additionally involves partial derivatives of $\lambda$ and $\varphi$ with respect to $i$ and $j$, evaluated for the same arguments as $\lambda$ and $\varphi$.
+\end{clines}
+
+The values of the geographic longitude and latitude arrays at indices $i,j$ correspond to
+the analytical expressions of the longitude $\lambda$ and latitude $\varphi$ as a function of $(i,j)$,
+evaluated at the values as specified in \autoref{tab:cell} for the respective grid-point position.
+The calculation of the values of the horizontal scale factor arrays in general additionally involves
+partial derivatives of $\lambda$ and $\varphi$ with respect to $i$ and $j$,
+evaluated for the same arguments as $\lambda$ and $\varphi$.
 
 \subsubsection{Optional fields}
-\begin{Verbatim}[fontsize=\tiny]
+
+\begin{clines}
                                          /* Optional:                                                    */
 int    ORCA, ORCA_index                  /* configuration name, configuration resolution                 */
 double e1e2u, e1e2v                      /* U and V surfaces (if grid size reduction in some straits)    */
 double ff_f, ff_t                        /* Coriolis parameter (if not on the sphere)                    */
-\end{Verbatim}
-
-NEMO can support the local reduction of key strait widths by altering individual values of
-e2u or e1v at the appropriate locations. This is particularly useful for locations such as
-Gibraltar or Indonesian Throughflow pinch-points (see \autoref{sec:MISC_strait} for
-illustrated examples). The key is to reduce the faces of $T$-cell (\ie change the value of
-the horizontal scale factors at $u$- or $v$-point) but not the volume of the cells. Doing
-otherwise can lead to numerical instability issues.  In normal operation the surface areas
-are computed from $\texttt{e1u} * \texttt{e2u}$ and $\texttt{e1v} * \texttt{e2v}$ but in
-cases where a gridsize reduction is required, the unaltered surface areas at $u$ and $v$
-grid points (\texttt{e1e2u} and \texttt{e1e2v}, respectively) must be read or pre-computed
-in \mdl{usrdef\_hgr}. If these arrays are present in the \np{cn\_domcfg} file they are
-read and the internal computation is suppressed. Versions of \mdl{usrdef\_hgr} which set
-their own values of \texttt{e1e2u} and \texttt{e1e2v} should set the surface-area
-computation flag: \texttt{ie1e2u\_v} to a non-zero value to suppress their re-computation.
+\end{clines}
+
+\NEMO\ can support the local reduction of key strait widths by
+altering individual values of e2u or e1v at the appropriate locations.
+This is particularly useful for locations such as Gibraltar or Indonesian Throughflow pinch-points
+(see \autoref{sec:MISC_strait} for illustrated examples).
+The key is to reduce the faces of $T$-cell (\ie\ change the value of the horizontal scale factors at $u$- or $v$-point) but
+not the volume of the cells.
+Doing otherwise can lead to numerical instability issues.
+In normal operation the surface areas are computed from $e1u * e2u$ and $e1v * e2v$ but
+in cases where a gridsize reduction is required,
+the unaltered surface areas at $u$ and $v$ grid points (\texttt{e1e2u} and \texttt{e1e2v}, respectively) must be read or
+pre-computed in \mdl{usrdef\_hgr}.
+If these arrays are present in the \np{cn\_domcfg} file they are read and the internal computation is suppressed.
+Versions of \mdl{usrdef\_hgr} which set their own values of \texttt{e1e2u} and \texttt{e1e2v} should set
+the surface-area computation flag:
+\texttt{ie1e2u\_v} to a non-zero value to suppress their re-computation.
 
 \smallskip
-Similar logic applies to the other optional fields: \texttt{ff\_f} and \texttt{ff\_t}
-which can be used to provide the Coriolis parameter at F- and T-points respectively if the
-mesh is not on a sphere. If present these fields will be read and used and the normal
-calculation ($2*\Omega*\sin(\varphi)$) suppressed. Versions of \mdl{usrdef\_hgr} which set
-their own values of \texttt{ff\_f} and \texttt{ff\_t} should set the Coriolis computation
-flag: \texttt{iff} to a non-zero value to suppress their re-computation.
-
-Note that longitudes, latitudes, and scale factors at $w$ points are exactly
-equal to those of $t$ points, thus no specific arrays are defined at $w$ points.
+Similar logic applies to the other optional fields:
+\texttt{ff\_f} and \texttt{ff\_t} which can be used to provide the Coriolis parameter at F- and T-points respectively if
+the mesh is not on a sphere.
+If present these fields will be read and used and the normal calculation ($2 * \Omega * \sin(\varphi)$) suppressed.
+Versions of \mdl{usrdef\_hgr} which set their own values of \texttt{ff\_f} and \texttt{ff\_t} should set
+the Coriolis computation flag:
+\texttt{iff} to a non-zero value to suppress their re-computation.
+
+Note that longitudes, latitudes, and scale factors at $w$ points are exactly equal to those of $t$ points,
+thus no specific arrays are defined at $w$ points.
 
 
@@ -459,10 +471,10 @@
 %-------------------------------------------------------------------------------------------------------------
 
-In the vertical, the model mesh is determined by four things: 
+In the vertical, the model mesh is determined by four things:
 \begin{enumerate}
-  \item the bathymetry given in meters; 
-  \item the number of levels of the model (\jp{jpk}); 
+  \item the bathymetry given in meters;
+  \item the number of levels of the model (\jp{jpk});
   \item the analytical transformation $z(i,j,k)$ and the vertical scale factors (derivatives of the transformation); and
-  \item the masking system, \ie the number of wet model levels at each 
+  \item the masking system, \ie\ the number of wet model levels at each
 $(i,j)$ location of the horizontal grid.
 \end{enumerate}
@@ -488,28 +500,27 @@
 
 The choice of a vertical coordinate is made when setting up the configuration;
-it is not intended to be an option which can be changed in the middle of an
-experiment. The one exception to this statement being the choice of linear or
-non-linear free surface. In v4.0 the linear free surface option is implemented
-as a special case of the non-linear free surface. This is computationally
-wasteful since it uses the structures for time-varying 3D metrics for fields
-that (in the linear free surface case) are fixed. However, the linear
-free-surface is rarely used and implementing it this way means a single configuration
-file can support both options.
-
-By default a non-linear free surface is used (\np{ln\_linssh} set to \forcode{ =
-.false.} in \ngn{namdom}): the coordinate follow the time-variation of the free
-surface so that the transformation is time dependent: $z(i,j,k,t)$
-(\eg \autoref{fig:z_zps_s_sps}f).  When a linear free surface is assumed
-(\np{ln\_linssh} set to \forcode{ = .true.} in \ngn{namdom}), the vertical
-coordinates are fixed in time, but the seawater can move up and down across the
-$z_0$ surface (in other words, the top of the ocean in not a rigid lid).
-
-Note that settings: \np{ln\_zco}, \np{ln\_zps}, \np{ln\_sco} and \np{ln\_isfcav} mentioned
-in the following sections appear to be namelist options but they are no longer truly
-namelist options for NEMO. Their value is written to and read from the domain configuration file
-and they should be treated as fixed parameters for a particular configuration. They are
-namelist options for the \forcode{DOMAINcfg} tool that can be used to build the
-configuration file and serve both to provide a record of the choices made whilst building the
-configuration and to trigger appropriate code blocks within NEMO.
+it is not intended to be an option which can be changed in the middle of an experiment.
+The one exception to this statement being the choice of linear or non-linear free surface.
+In v4.0 the linear free surface option is implemented as a special case of the non-linear free surface.
+This is computationally wasteful since it uses the structures for time-varying 3D metrics
+for fields that (in the linear free surface case) are fixed.
+However, the linear free-surface is rarely used and implementing it this way means
+a single configuration file can support both options.
+
+By default a non-linear free surface is used (\np{ln\_linssh} set to \forcode{ = .false.} in \nam{dom}):
+the coordinate follow the time-variation of the free surface so that the transformation is time dependent:
+$z(i,j,k,t)$ (\eg\ \autoref{fig:z_zps_s_sps}f).
+When a linear free surface is assumed (\np{ln\_linssh} set to \forcode{ = .true.} in \nam{dom}),
+the vertical coordinates are fixed in time, but the seawater can move up and down across the $z_0$ surface
+(in other words, the top of the ocean in not a rigid lid).
+
+Note that settings:
+\np{ln\_zco}, \np{ln\_zps}, \np{ln\_sco} and \np{ln\_isfcav} mentioned in the following sections
+appear to be namelist options but they are no longer truly namelist options for \NEMO.
+Their value is written to and read from the domain configuration file and
+they should be treated as fixed parameters for a particular configuration.
+They are namelist options for the \texttt{DOMAINcfg} tool that can be used to build the configuration file and
+serve both to provide a record of the choices made whilst building the configuration and
+to trigger appropriate code blocks within \NEMO.
 These values should not be altered in the \np{cn\_domcfg} file.
 
@@ -527,25 +538,28 @@
 $s-z$ or $s-zps$ coordinate (\autoref{fig:z_zps_s_sps}d and \autoref{fig:z_zps_s_sps}e).
 
-A further choice related to vertical coordinate concerns the presence (or not) of ocean
-cavities beneath ice shelves within the model domain.  A setting of \np{ln\_isfcav} as
-\forcode{.true.} indicates that the domain contains  ocean cavities, otherwise the top,
-wet layer of the ocean will always be at the ocean surface.  This option is currently only
-available for $z$- or $zps$-coordinates. In the latter case, partial steps are also applied
-at the ocean/ice shelf interface.
-
-Within the model, the arrays describing the grid point depths and vertical scale factors
-are three set of three dimensional arrays $(i,j,k)$ defined at \textit{before},
-\textit{now} and \textit{after} time step.  The time at which they are defined is
-indicated by a suffix: $\_b$, $\_n$, or $\_a$, respectively.  They are updated at each
-model time step. The initial fixed reference coordinate system is held in variable names
-with a $\_0$ suffix.  When the linear free surface option is used
-(\np{ln\_linssh}\forcode{ = .true.}), \textit{before}, \textit{now} and \textit{after}
-arrays are initially set to their reference counterpart and remain fixed.
+A further choice related to vertical coordinate concerns
+the presence (or not) of ocean cavities beneath ice shelves within the model domain.
+A setting of \np{ln\_isfcav} as \forcode{.true.} indicates that the domain contains ocean cavities,
+otherwise the top, wet layer of the ocean will always be at the ocean surface.
+This option is currently only available for $z$- or $zps$-coordinates.
+In the latter case, partial steps are also applied at the ocean/ice shelf interface.
+
+Within the model, the arrays describing the grid point depths and vertical scale factors are three set of
+three dimensional arrays $(i,j,k)$ defined at \textit{before}, \textit{now} and \textit{after} time step.
+The time at which they are defined is indicated by a suffix: $\_b$, $\_n$, or $\_a$, respectively.
+They are updated at each model time step.
+The initial fixed reference coordinate system is held in variable names with a $\_0$ suffix.
+When the linear free surface option is used (\np{ln\_linssh}\forcode{ = .true.}),
+\textit{before}, \textit{now} and \textit{after} arrays are initially set to
+their reference counterpart and remain fixed.
 
 \subsubsection{Required fields}
 \label{sec:DOM_zgr_fields}
-The explicit specification of a range of fields related to the vertical grid are required for the definition of a configuration. These include:
-
-\begin{Verbatim}[fontsize=\tiny]
+
+The explicit specification of a range of fields related to the vertical grid are required for
+the definition of a configuration.
+These include:
+
+\begin{clines}
 int    ln_zco, ln_zps, ln_sco            /* flags for z-coord, z-coord with partial steps and s-coord    */
 int    ln_isfcav                         /* flag  for ice shelf cavities                                 */
@@ -556,27 +570,26 @@
                                          /* For reference:                                               */
 float  bathy_metry                       /* bathymetry used in setting top and bottom levels             */
-\end{Verbatim}
-
-This set of vertical metrics is sufficient to describe the initial depth and thickness of
-every gridcell in the model regardless of the choice of vertical coordinate. With constant
-z-levels, e3 metrics will be uniform across each horizontal level. In the partial step
-case each e3 at the \np{bottom\_level} (and, possibly, \np{top\_level} if ice cavities are
-present) may vary from its horizontal neighbours. And, in s-coordinates, variations can
-occur throughout the water column. With the non-linear free-surface, all the coordinates
-behave more like the s-coordinate in that variations occurr throughout the water column
-with displacements related to the sea surface height. These variations are typically much
-smaller than those arising from bottom fitted coordinates. The values for vertical metrics
-supplied in the domain configuration file can be considered as those arising from a flat
-sea surface with zero elevation.
-
-The \np{bottom\_level} and \np{top\_level} 2D arrays define the \np{bottom\_level} and top
-wet levels in each grid column. Without ice cavities, \np{top\_level} is essentially a land
-mask (0 on land; 1 everywhere else). With ice cavities, \np{top\_level} determines the
-first wet point below the overlying ice shelf.
-
-
-
-% -------------------------------------------------------------------------------------------------------------
-%        level bathymetry and mask 
+\end{clines}
+
+This set of vertical metrics is sufficient to describe the initial depth and thickness of every gridcell in
+the model regardless of the choice of vertical coordinate.
+With constant z-levels, e3 metrics will be uniform across each horizontal level.
+In the partial step case each e3 at the \jp{bottom\_level}
+(and, possibly, \jp{top\_level} if ice cavities are present)
+may vary from its horizontal neighbours.
+And, in s-coordinates, variations can occur throughout the water column.
+With the non-linear free-surface, all the coordinates behave more like the s-coordinate in
+that variations occur throughout the water column with displacements related to the sea surface height.
+These variations are typically much smaller than those arising from bottom fitted coordinates.
+The values for vertical metrics supplied in the domain configuration file can be considered as
+those arising from a flat sea surface with zero elevation.
+
+The \jp{bottom\_level} and \jp{top\_level} 2D arrays define the \jp{bottom\_level} and top wet levels in each grid column.
+Without ice cavities, \jp{top\_level} is essentially a land mask (0 on land; 1 everywhere else).
+With ice cavities, \jp{top\_level} determines the first wet point below the overlying ice shelf.
+
+
+% -------------------------------------------------------------------------------------------------------------
+%        level bathymetry and mask
 % -------------------------------------------------------------------------------------------------------------
 \subsubsection{Level bathymetry and mask}
@@ -584,5 +597,5 @@
 
 
-From \np{top\_level} and \np{bottom\_level} fields, the mask fields are defined as follows:
+From \jp{top\_level} and \jp{bottom\_level} fields, the mask fields are defined as follows:
 \begin{alignat*}{2}
   tmask(i,j,k) &= &  &
@@ -603,5 +616,5 @@
 Note that, without ice shelves cavities,
 masks at $t-$ and $w-$points are identical with the numerical indexing used (\autoref{subsec:DOM_Num_Index}).
-Nevertheless, $wmask$ are required with ocean cavities to deal with the top boundary (ice shelf/ocean interface) 
+Nevertheless, $wmask$ are required with ocean cavities to deal with the top boundary (ice shelf/ocean interface)
 exactly in the same way as for the bottom boundary.
 
@@ -614,23 +627,24 @@
 
 %-------------------------------------------------------------------------------------------------
-%        Closed seas 
+%        Closed seas
 %-------------------------------------------------------------------------------------------------
-\subsection{Closed seas} \label{subsec:DOM_closea} 
-
-When a global ocean is coupled to an atmospheric model it is better to represent all large
-water bodies (\eg great lakes, Caspian sea...) even if the model resolution does not allow
-their communication with the rest of the ocean.  This is unnecessary when the ocean is
-forced by fixed atmospheric conditions, so these seas can be removed from the ocean
-domain.  The user has the option to set the bathymetry in closed seas to zero (see
-\autoref{sec:MISC_closea}) and to optionally decide on the fate of any freshwater
-imbalance over the area. The options are explained in \autoref{sec:MISC_closea} but it
-should be noted here that a successful use of these options requires appropriate mask
-fields to be present in the domain configuration file. Among the possibilities are:
-
-\begin{Verbatim}[fontsize=\tiny]
+\subsection{Closed seas} \label{subsec:DOM_closea}
+
+When a global ocean is coupled to an atmospheric model it is better to represent all large water bodies
+(\eg\ Great Lakes, Caspian sea \dots) even if the model resolution does not allow their communication with
+the rest of the ocean.
+This is unnecessary when the ocean is forced by fixed atmospheric conditions,
+so these seas can be removed from the ocean domain.
+The user has the option to set the bathymetry in closed seas to zero (see \autoref{sec:MISC_closea}) and
+to optionally decide on the fate of any freshwater imbalance over the area.
+The options are explained in \autoref{sec:MISC_closea} but it should be noted here that
+a successful use of these options requires appropriate mask fields to be present in the domain configuration file.
+Among the possibilities are:
+
+\begin{clines}
 int    closea_mask          /* non-zero values in closed sea areas for optional masking                  */
 int    closea_mask_rnf      /* non-zero values in closed sea areas with runoff locations (precip only)   */
 int    closea_mask_emp      /* non-zero values in closed sea areas with runoff locations (total emp)     */
-\end{Verbatim}
+\end{clines}
 
 % -------------------------------------------------------------------------------------------------------------
@@ -642,9 +656,11 @@
 \nlst{namcfg}
 
-Most of the arrays relating to a particular ocean model configuration dicussed in this
-chapter (grid-point position, scale factors) can be saved in a file if namelist parameter
-\np{ln\_write\_cfg} (namelist \ngn{namcfg}) is set to \forcode{.true.}; the output
-filename is set thorugh parameter \np{cn\_domcfg\_out}. This is only really useful
-if the fields are computed in subroutines \mdl{usrdef\_hgr} or \mdl{usrdef\_zgr} and
+Most of the arrays relating to a particular ocean model configuration discussed in this chapter
+(grid-point position, scale factors)
+can be saved in a file if
+namelist parameter \np{ln\_write\_cfg} (namelist \nam{cfg}) is set to \forcode{.true.};
+the output filename is set through parameter \np{cn\_domcfg\_out}.
+This is only really useful if
+the fields are computed in subroutines \mdl{usrdef\_hgr} or \mdl{usrdef\_zgr} and
 checking or confirmation is required.
 
@@ -652,8 +668,8 @@
 
 Alternatively, all the arrays relating to a particular ocean model configuration
-(grid-point position, scale factors, depths and masks) can be saved in a file called
-\texttt{mesh\_mask} if namelist parameter \np{ln\_meshmask} (namelist \ngn{namdom}) is set
-to \forcode{.true.}. This file contains additional fields that can be useful for
-post-processing applications
+(grid-point position, scale factors, depths and masks)
+can be saved in a file called \texttt{mesh\_mask} if
+namelist parameter \np{ln\_meshmask} (namelist \nam{dom}) is set to \forcode{.true.}.
+This file contains additional fields that can be useful for post-processing applications.
 
 % ================================================================
@@ -664,22 +680,22 @@
 \label{sec:DTA_tsd}
 %-----------------------------------------namtsd-------------------------------------------
-\nlst{namtsd} 
+\nlst{namtsd}
 %------------------------------------------------------------------------------------------
 
-Basic initial state options are defined in \ngn{namtsd}.  By default, the ocean starts
-from rest (the velocity field is set to zero) and the initialization of temperature and
-salinity fields is controlled through the \np{ln\_tsd\_init} namelist parameter.
+Basic initial state options are defined in \nam{tsd}.
+By default, the ocean starts from rest (the velocity field is set to zero) and
+the initialization of temperature and salinity fields is controlled through the \np{ln\_tsd\_init} namelist parameter.
 
 \begin{description}
 \item[\np{ln\_tsd\_init}\forcode{= .true.}]
-  Use T and S input files that can be given on the model grid itself or on their native
-  input data grids.  In the latter case, the data will be interpolated on-the-fly both in
-  the horizontal and the vertical to the model grid (see \autoref{subsec:SBC_iof}).  The
-  information relating to the input files are specified in the \np{sn\_tem} and
-  \np{sn\_sal} structures.  The computation is done in the \mdl{dtatsd} module.
+  Use T and S input files that can be given on the model grid itself or on their native input data grids.
+  In the latter case, the data will be interpolated on-the-fly both in the horizontal and the vertical to the model grid
+  (see \autoref{subsec:SBC_iof}).
+  The information relating to the input files are specified in the \np{sn\_tem} and \np{sn\_sal} structures.
+  The computation is done in the \mdl{dtatsd} module.
 \item[\np{ln\_tsd\_init}\forcode{= .false.}]
-  Initial values for T and S are set via a user supplied \rou{usr\_def\_istate} routine
-  contained in \mdl{userdef\_istate}. The default version sets horizontally uniform T and
-  profiles as used in the  GYRE configuration (see \autoref{sec:CFG_gyre}).
+  Initial values for T and S are set via a user supplied \rou{usr\_def\_istate} routine contained in \mdl{userdef\_istate}.
+  The default version sets horizontally uniform T and profiles as used in the GYRE configuration
+  (see \autoref{sec:CFG_gyre}).
 \end{description}
 
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_DYN.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_DYN.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_DYN.tex	(revision 11435)
@@ -8,5 +8,5 @@
 \label{chap:DYN}
 
-\minitoc
+\chaptertoc
 
 Using the representation described in \autoref{chap:DOM},
@@ -36,22 +36,22 @@
 (surface wind stress calculation using bulk formulae, estimation of mixing coefficients)
 that are carried out in modules SBC, LDF and ZDF and are described in
-\autoref{chap:SBC}, \autoref{chap:LDF} and \autoref{chap:ZDF}, respectively. 
+\autoref{chap:SBC}, \autoref{chap:LDF} and \autoref{chap:ZDF}, respectively.
 
 In the present chapter we also describe the diagnostic equations used to compute the horizontal divergence,
 curl of the velocities (\emph{divcur} module) and the vertical velocity (\emph{wzvmod} module).
 
-The different options available to the user are managed by namelist variables. 
-For term \textit{ttt} in the momentum equations, the logical namelist variables are \textit{ln\_dynttt\_xxx}, 
+The different options available to the user are managed by namelist variables.
+For term \textit{ttt} in the momentum equations, the logical namelist variables are \textit{ln\_dynttt\_xxx},
 where \textit{xxx} is a 3 or 4 letter acronym corresponding to each optional scheme.
-If a CPP key is used for this term its name is \key{ttt}.
+%If a CPP key is used for this term its name is \key{ttt}.
 The corresponding code can be found in the \textit{dynttt\_xxx} module in the DYN directory,
 and it is usually computed in the \textit{dyn\_ttt\_xxx} subroutine.
 
 The user has the option of extracting and outputting each tendency term from the 3D momentum equations
-(\key{trddyn} defined), as described in \autoref{chap:MISC}.
-Furthermore, the tendency terms associated with the 2D barotropic vorticity balance (when \key{trdvor} is defined)
+(\texttt{trddyn?} defined), as described in \autoref{chap:MISC}.
+Furthermore, the tendency terms associated with the 2D barotropic vorticity balance (when \texttt{trdvor?} is defined)
 can be derived from the 3D terms.
 %%%
-\gmcomment{STEVEN: not quite sure I've got the sense of the last sentence. does 
+\gmcomment{STEVEN: not quite sure I've got the sense of the last sentence. does
 MISC correspond to "extracting tendency terms" or "vorticity balance"?}
 
@@ -69,10 +69,10 @@
 \label{subsec:DYN_divcur}
 
-The vorticity is defined at an $f$-point (\ie corner point) as follows:
+The vorticity is defined at an $f$-point (\ie\ corner point) as follows:
 \begin{equation}
   \label{eq:divcur_cur}
   \zeta =\frac{1}{e_{1f}\,e_{2f} }\left( {\;\delta_{i+1/2} \left[ {e_{2v}\;v} \right]
       -\delta_{j+1/2} \left[ {e_{1u}\;u} \right]\;} \right)
-\end{equation} 
+\end{equation}
 
 The horizontal divergence is defined at a $T$-point.
@@ -97,5 +97,5 @@
 ensure perfect restartability.
 The vorticity and divergence at the \textit{now} time step are used for the computation of
-the nonlinear advection and of the vertical velocity respectively. 
+the nonlinear advection and of the vertical velocity respectively.
 
 %--------------------------------------------------------------------------------------------------------------
@@ -117,13 +117,13 @@
   \end{aligned}
 \end{equation}
-where \textit{emp} is the surface freshwater budget (evaporation minus precipitation), 
+where \textit{emp} is the surface freshwater budget (evaporation minus precipitation),
 expressed in Kg/m$^2$/s (which is equal to mm/s),
 and $\rho_w$=1,035~Kg/m$^3$ is the reference density of sea water (Boussinesq approximation).
 If river runoff is expressed as a surface freshwater flux (see \autoref{chap:SBC}) then
-\textit{emp} can be written as the evaporation minus precipitation, minus the river runoff. 
+\textit{emp} can be written as the evaporation minus precipitation, minus the river runoff.
 The sea-surface height is evaluated using exactly the same time stepping scheme as
 the tracer equation \autoref{eq:tra_nxt}:
 a leapfrog scheme in combination with an Asselin time filter,
-\ie the velocity appearing in \autoref{eq:dynspg_ssh} is centred in time (\textit{now} velocity).
+\ie\ the velocity appearing in \autoref{eq:dynspg_ssh} is centred in time (\textit{now} velocity).
 This is of paramount importance.
 Replacing $T$ by the number $1$ in the tracer equation and summing over the water column must lead to
@@ -144,5 +144,5 @@
 \end{equation}
 
-In the case of a non-linear free surface (\key{vvl}), the top vertical velocity is $-\textit{emp}/\rho_w$, 
+In the case of a non-linear free surface (\texttt{vvl?}), the top vertical velocity is $-\textit{emp}/\rho_w$,
 as changes in the divergence of the barotropic transport are absorbed into the change of the level thicknesses,
 re-orientated downward.
@@ -151,5 +151,5 @@
 The upper boundary condition applies at a fixed level $z=0$.
 The top vertical velocity is thus equal to the divergence of the barotropic transport
-(\ie the first term in the right-hand-side of \autoref{eq:dynspg_ssh}).
+(\ie\ the first term in the right-hand-side of \autoref{eq:dynspg_ssh}).
 
 Note also that whereas the vertical velocity has the same discrete expression in $z$- and $s$-coordinates,
@@ -158,5 +158,5 @@
 Note also that the $k$-axis is re-orientated downwards in the \fortran code compared to
 the indexing used in the semi-discrete equations such as \autoref{eq:wzv}
-(see \autoref{subsec:DOM_Num_Index_vertical}). 
+(see \autoref{subsec:DOM_Num_Index_vertical}).
 
 
@@ -168,18 +168,18 @@
 %-----------------------------------------nam_dynadv----------------------------------------------------
 
-\nlst{namdyn_adv} 
+\nlst{namdyn_adv}
 %-------------------------------------------------------------------------------------------------------------
 
 The vector invariant form of the momentum equations is the one most often used in
-applications of the \NEMO ocean model.
+applications of the \NEMO\ ocean model.
 The flux form option (see next section) has been present since version $2$.
-Options are defined through the \ngn{namdyn\_adv} namelist variables Coriolis and
+Options are defined through the \nam{dyn\_adv} namelist variables Coriolis and
 momentum advection terms are evaluated using a leapfrog scheme,
-\ie the velocity appearing in these expressions is centred in time (\textit{now} velocity). 
+\ie\ the velocity appearing in these expressions is centred in time (\textit{now} velocity).
 At the lateral boundaries either free slip, no slip or partial slip boundary conditions are applied following
 \autoref{chap:LBC}.
 
 % -------------------------------------------------------------------------------------------------------------
-%        Vorticity term 
+%        Vorticity term
 % -------------------------------------------------------------------------------------------------------------
 \subsection[Vorticity term (\textit{dynvor.F90})]
@@ -188,9 +188,9 @@
 %------------------------------------------nam_dynvor----------------------------------------------------
 
-\nlst{namdyn_vor} 
+\nlst{namdyn_vor}
 %-------------------------------------------------------------------------------------------------------------
 
-Options are defined through the \ngn{namdyn\_vor} namelist variables.
-Four discretisations of the vorticity term (\np{ln\_dynvor\_xxx}\forcode{ = .true.}) are available:
+Options are defined through the \nam{dyn\_vor} namelist variables.
+Four discretisations of the vorticity term (\texttt{ln\_dynvor\_xxx}\forcode{ = .true.}) are available:
 conserving potential enstrophy of horizontally non-divergent flow (ENS scheme);
 conserving horizontal kinetic energy (ENE scheme);
@@ -212,5 +212,5 @@
 In the enstrophy conserving case (ENS scheme),
 the discrete formulation of the vorticity term provides a global conservation of the enstrophy
-($ [ (\zeta +f ) / e_{3f} ]^2 $ in $s$-coordinates) for a horizontally non-divergent flow (\ie $\chi$=$0$),
+($ [ (\zeta +f ) / e_{3f} ]^2 $ in $s$-coordinates) for a horizontally non-divergent flow (\ie\ $\chi$=$0$),
 but does not conserve the total kinetic energy.
 It is given by:
@@ -225,5 +225,5 @@
     \end{aligned}
   \right.
-\end{equation} 
+\end{equation}
 
 %-------------------------------------------------------------
@@ -246,5 +246,5 @@
     \end{aligned}
   \right.
-\end{equation} 
+\end{equation}
 
 %-------------------------------------------------------------
@@ -285,5 +285,5 @@
 the presence of grid point oscillation structures that will be invisible to the operator.
 These structures are \textit{computational modes} that will be at least partly damped by
-the momentum diffusion operator (\ie the subgrid-scale advection), but not by the resolved advection term.
+the momentum diffusion operator (\ie\ the subgrid-scale advection), but not by the resolved advection term.
 The ENS and ENE schemes therefore do not contribute to dump any grid point noise in the horizontal velocity field.
 Such noise would result in more noise in the vertical velocity field, an undesirable feature.
@@ -291,5 +291,5 @@
 $u$ and $v$ are located at different grid points,
 a price worth paying to avoid a double averaging in the pressure gradient term as in the $B$-grid.
-\gmcomment{ To circumvent this, Adcroft (ADD REF HERE) 
+\gmcomment{ To circumvent this, Adcroft (ADD REF HERE)
 Nevertheless, this technique strongly distort the phase and group velocity of Rossby waves....}
 
@@ -299,7 +299,7 @@
 \citep{griffies.gnanadesikan.ea_JPO98} for the discretization of the iso-neutral diffusion operator (see \autoref{apdx:C}).
 
-The \citet{arakawa.hsu_MWR90} vorticity advection scheme for a single layer is modified 
-for spherical coordinates as described by \citet{arakawa.lamb_MWR81} to obtain the EEN scheme. 
-First consider the discrete expression of the potential vorticity, $q$, defined at an $f$-point: 
+The \citet{arakawa.hsu_MWR90} vorticity advection scheme for a single layer is modified
+for spherical coordinates as described by \citet{arakawa.lamb_MWR81} to obtain the EEN scheme.
+First consider the discrete expression of the potential vorticity, $q$, defined at an $f$-point:
 \[
   % \label{eq:pot_vor}
@@ -307,5 +307,5 @@
 \]
 where the relative vorticity is defined by (\autoref{eq:divcur_cur}),
-the Coriolis parameter is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is: 
+the Coriolis parameter is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is:
 \begin{equation}
   \label{eq:een_e3f}
@@ -326,5 +326,5 @@
 % >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
-A key point in \autoref{eq:een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made. 
+A key point in \autoref{eq:een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made.
 It uses the sum of masked t-point vertical scale factor divided either by the sum of the four t-point masks
 (\np{nn\_een\_e3f}\forcode{ = 1}), or just by $4$ (\np{nn\_een\_e3f}\forcode{ = .true.}).
@@ -334,9 +334,9 @@
 (with a systematic reduction of $e_{3f}$ when a model level intercept the bathymetry)
 that tends to reinforce the topostrophy of the flow
-(\ie the tendency of the flow to follow the isobaths) \citep{penduff.le-sommer.ea_OS07}. 
+(\ie\ the tendency of the flow to follow the isobaths) \citep{penduff.le-sommer.ea_OS07}.
 
 Next, the vorticity triads, $ {^i_j}\mathbb{Q}^{i_p}_{j_p}$ can be defined at a $T$-point as
 the following triad combinations of the neighbouring potential vorticities defined at f-points
-(\autoref{fig:DYN_een_triad}): 
+(\autoref{fig:DYN_een_triad}):
 \begin{equation}
   \label{eq:Q_triads}
@@ -344,7 +344,7 @@
   = \frac{1}{12} \ \left(   q^{i-i_p}_{j+j_p} + q^{i+j_p}_{j+i_p} + q^{i+i_p}_{j-j_p}  \right)
 \end{equation}
-where the indices $i_p$ and $k_p$ take the values: $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$. 
-
-Finally, the vorticity terms are represented as: 
+where the indices $i_p$ and $k_p$ take the values: $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$.
+
+Finally, the vorticity terms are represented as:
 \begin{equation}
   \label{eq:dynvor_een}
@@ -357,14 +357,14 @@
       \end{aligned}
     } \right.
-\end{equation} 
+\end{equation}
 
 This EEN scheme in fact combines the conservation properties of the ENS and ENE schemes.
 It conserves both total energy and potential enstrophy in the limit of horizontally nondivergent flow
-(\ie $\chi$=$0$) (see \autoref{subsec:C_vorEEN}). 
+(\ie\ $\chi$=$0$) (see \autoref{subsec:C_vorEEN}).
 Applied to a realistic ocean configuration, it has been shown that it leads to a significant reduction of
 the noise in the vertical velocity field \citep{le-sommer.penduff.ea_OM09}.
 Furthermore, used in combination with a partial steps representation of bottom topography,
 it improves the interaction between current and topography,
-leading to a larger topostrophy of the flow \citep{barnier.madec.ea_OD06, penduff.le-sommer.ea_OS07}. 
+leading to a larger topostrophy of the flow \citep{barnier.madec.ea_OD06, penduff.le-sommer.ea_OS07}.
 
 %--------------------------------------------------------------------------------------------------------------
@@ -412,5 +412,5 @@
 When \np{ln\_dynzad\_zts}\forcode{ = .true.},
 a split-explicit time stepping with 5 sub-timesteps is used on the vertical advection term.
-This option can be useful when the value of the timestep is limited by vertical advection \citep{lemarie.debreu.ea_OM15}. 
+This option can be useful when the value of the timestep is limited by vertical advection \citep{lemarie.debreu.ea_OM15}.
 Note that in this case,
 a similar split-explicit time stepping should be used on vertical advection of tracer to ensure a better stability,
@@ -425,11 +425,11 @@
 %------------------------------------------nam_dynadv----------------------------------------------------
 
-\nlst{namdyn_adv} 
+\nlst{namdyn_adv}
 %-------------------------------------------------------------------------------------------------------------
 
-Options are defined through the \ngn{namdyn\_adv} namelist variables.
+Options are defined through the \nam{dyn\_adv} namelist variables.
 In the flux form (as in the vector invariant form),
 the Coriolis and momentum advection terms are evaluated using a leapfrog scheme,
-\ie the velocity appearing in their expressions is centred in time (\textit{now} velocity).
+\ie\ the velocity appearing in their expressions is centred in time (\textit{now} velocity).
 At the lateral boundaries either free slip,
 no slip or partial slip boundary conditions are applied following \autoref{chap:LBC}.
@@ -445,5 +445,5 @@
 In flux form, the vorticity term reduces to a Coriolis term in which the Coriolis parameter has been modified to account for the "metric" term.
 This altered Coriolis parameter is thus discretised at $f$-points.
-It is given by: 
+It is given by:
 \begin{multline*}
   % \label{eq:dyncor_metric}
@@ -451,10 +451,10 @@
   \equiv   f + \frac{1}{e_{1f} e_{2f} } \left( { \ \overline v ^{i+1/2}\delta_{i+1/2} \left[ {e_{2u} } \right]
       -  \overline u ^{j+1/2}\delta_{j+1/2} \left[ {e_{1u} } \right]  }  \ \right)
-\end{multline*} 
+\end{multline*}
 
 Any of the (\autoref{eq:dynvor_ens}), (\autoref{eq:dynvor_ene}) and (\autoref{eq:dynvor_een}) schemes can be used to
 compute the product of the Coriolis parameter and the vorticity.
 However, the energy-conserving scheme (\autoref{eq:dynvor_een}) has exclusively been used to date.
-This term is evaluated using a leapfrog scheme, \ie the velocity is centred in time (\textit{now} velocity).
+This term is evaluated using a leapfrog scheme, \ie\ the velocity is centred in time (\textit{now} velocity).
 
 %--------------------------------------------------------------------------------------------------------------
@@ -487,8 +487,8 @@
 or a $3^{rd}$ order upstream biased scheme, UBS.
 The latter is described in \citet{shchepetkin.mcwilliams_OM05}.
-The schemes are selected using the namelist logicals \np{ln\_dynadv\_cen2} and \np{ln\_dynadv\_ubs}. 
+The schemes are selected using the namelist logicals \np{ln\_dynadv\_cen2} and \np{ln\_dynadv\_ubs}.
 In flux form, the schemes differ by the choice of a space and time interpolation to define the value of
-$u$ and $v$ at the centre of each face of $u$- and $v$-cells, \ie at the $T$-, $f$-,
-and $uw$-points for $u$ and at the $f$-, $T$- and $vw$-points for $v$. 
+$u$ and $v$ at the centre of each face of $u$- and $v$-cells, \ie\ at the $T$-, $f$-,
+and $uw$-points for $u$ and at the $f$-, $T$- and $vw$-points for $v$.
 
 %-------------------------------------------------------------
@@ -508,7 +508,7 @@
     \end{aligned}
   \right.
-\end{equation} 
-
-The scheme is non diffusive (\ie conserves the kinetic energy) but dispersive (\ie it may create false extrema).
+\end{equation}
+
+The scheme is non diffusive (\ie\ conserves the kinetic energy) but dispersive (\ie\ it may create false extrema).
 It is therefore notoriously noisy and must be used in conjunction with an explicit diffusion operator to
 produce a sensible solution.
@@ -535,5 +535,5 @@
 \end{equation}
 where $u"_{i+1/2} =\delta_{i+1/2} \left[ {\delta_i \left[ u \right]} \right]$.
-This results in a dissipatively dominant (\ie hyper-diffusive) truncation error
+This results in a dissipatively dominant (\ie\ hyper-diffusive) truncation error
 \citep{shchepetkin.mcwilliams_OM05}.
 The overall performance of the advection scheme is similar to that reported in \citet{farrow.stevens_JPO95}.
@@ -541,12 +541,12 @@
 It is not a \emph{positive} scheme, meaning that false extrema are permitted.
 But the amplitudes of the false extrema are significantly reduced over those in the centred second order method.
-As the scheme already includes a diffusion component, it can be used without explicit lateral diffusion on momentum 
-(\ie \np{ln\_dynldf\_lap}\forcode{ = }\np{ln\_dynldf\_bilap}\forcode{ = .false.}),
+As the scheme already includes a diffusion component, it can be used without explicit lateral diffusion on momentum
+(\ie\ \np{ln\_dynldf\_lap}\forcode{ = }\np{ln\_dynldf\_bilap}\forcode{ = .false.}),
 and it is recommended to do so.
 
 The UBS scheme is not used in all directions.
-In the vertical, the centred $2^{nd}$ order evaluation of the advection is preferred, \ie $u_{uw}^{ubs}$ and
+In the vertical, the centred $2^{nd}$ order evaluation of the advection is preferred, \ie\ $u_{uw}^{ubs}$ and
 $u_{vw}^{ubs}$ in \autoref{eq:dynadv_cen2} are used.
-UBS is diffusive and is associated with vertical mixing of momentum. \gmcomment{ gm  pursue the 
+UBS is diffusive and is associated with vertical mixing of momentum. \gmcomment{ gm  pursue the
 sentence:Since vertical mixing of momentum is a source term of the TKE equation...  }
 
@@ -578,16 +578,16 @@
 %------------------------------------------nam_dynhpg---------------------------------------------------
 
-\nlst{namdyn_hpg} 
+\nlst{namdyn_hpg}
 %-------------------------------------------------------------------------------------------------------------
 
-Options are defined through the \ngn{namdyn\_hpg} namelist variables.
+Options are defined through the \nam{dyn\_hpg} namelist variables.
 The key distinction between the different algorithms used for
 the hydrostatic pressure gradient is the vertical coordinate used,
-since HPG is a \emph{horizontal} pressure gradient, \ie computed along geopotential surfaces.
+since HPG is a \emph{horizontal} pressure gradient, \ie\ computed along geopotential surfaces.
 As a result, any tilt of the surface of the computational levels will require a specific treatment to
 compute the hydrostatic pressure gradient.
 
 The hydrostatic pressure gradient term is evaluated either using a leapfrog scheme,
-\ie the density appearing in its expression is centred in time (\emph{now} $\rho$),
+\ie\ the density appearing in its expression is centred in time (\emph{now} $\rho$),
 or a semi-implcit scheme.
 At the lateral boundaries either free slip, no slip or partial slip boundary conditions are applied.
@@ -616,5 +616,5 @@
     \end{aligned}
   \right.
-\end{equation} 
+\end{equation}
 
 for $1<k<km$ (interior layer)
@@ -631,9 +631,9 @@
     \end{aligned}
   \right.
-\end{equation} 
+\end{equation}
 
 Note that the $1/2$ factor in (\autoref{eq:dynhpg_zco_surf}) is adequate because of the definition of $e_{3w}$ as
 the vertical derivative of the scale factor at the surface level ($z=0$).
-Note also that in case of variable volume level (\key{vvl} defined),
+Note also that in case of variable volume level (\texttt{vvl?} defined),
 the surface pressure gradient is included in \autoref{eq:dynhpg_zco_surf} and
 \autoref{eq:dynhpg_zco} through the space and time variations of the vertical scale factor $e_{3w}$.
@@ -649,5 +649,5 @@
 Before taking horizontal gradients between these tracer points,
 a linear interpolation is used to approximate the deeper tracer as if
-it actually lived at the depth of the shallower tracer point. 
+it actually lived at the depth of the shallower tracer point.
 
 Apart from this modification,
@@ -668,5 +668,5 @@
 
 Pressure gradient formulations in an $s$-coordinate have been the subject of a vast number of papers
-(\eg, \citet{song_MWR98, shchepetkin.mcwilliams_OM05}). 
+(\eg, \citet{song_MWR98, shchepetkin.mcwilliams_OM05}).
 A number of different pressure gradient options are coded but the ROMS-like,
 density Jacobian with cubic polynomial method is currently disabled whilst known bugs are under investigation.
@@ -683,11 +683,11 @@
     \end{aligned}
   \right.
-\end{equation} 
+\end{equation}
 
 Where the first term is the pressure gradient along coordinates,
 computed as in \autoref{eq:dynhpg_zco_surf} - \autoref{eq:dynhpg_zco},
-and $z_T$ is the depth of the $T$-point evaluated from the sum of the vertical scale factors at the $w$-point 
+and $z_T$ is the depth of the $T$-point evaluated from the sum of the vertical scale factors at the $w$-point
 ($e_{3w}$).
- 
+
 $\bullet$ Traditional coding with adaptation for ice shelf cavities (\np{ln\_dynhpg\_isf}\forcode{ = .true.}).
 This scheme need the activation of ice shelf cavities (\np{ln\_isfcav}\forcode{ = .true.}).
@@ -695,12 +695,12 @@
 $\bullet$ Pressure Jacobian scheme (prj) (a research paper in preparation) (\np{ln\_dynhpg\_prj}\forcode{ = .true.})
 
-$\bullet$ Density Jacobian with cubic polynomial scheme (DJC) \citep{shchepetkin.mcwilliams_OM05} 
+$\bullet$ Density Jacobian with cubic polynomial scheme (DJC) \citep{shchepetkin.mcwilliams_OM05}
 (\np{ln\_dynhpg\_djc}\forcode{ = .true.}) (currently disabled; under development)
 
 Note that expression \autoref{eq:dynhpg_sco} is commonly used when the variable volume formulation is activated
-(\key{vvl}) because in that case, even with a flat bottom,
+(\texttt{vvl?}) because in that case, even with a flat bottom,
 the coordinate surfaces are not horizontal but follow the free surface \citep{levier.treguier.ea_rpt07}.
 The pressure jacobian scheme (\np{ln\_dynhpg\_prj}\forcode{ = .true.}) is available as
-an improved option to \np{ln\_dynhpg\_sco}\forcode{ = .true.} when \key{vvl} is active.
+an improved option to \np{ln\_dynhpg\_sco}\forcode{ = .true.} when \texttt{vvl?} is active.
 The pressure Jacobian scheme uses a constrained cubic spline to
 reconstruct the density profile across the water column.
@@ -723,5 +723,5 @@
 
 The pressure gradient due to ocean load is computed using the expression \autoref{eq:dynhpg_sco} described in
-\autoref{subsec:DYN_hpg_sco}. 
+\autoref{subsec:DYN_hpg_sco}.
 
 %--------------------------------------------------------------------------------------------------------------
@@ -742,6 +742,6 @@
 It involves the evaluation of the hydrostatic pressure gradient as
 an average over the three time levels $t-\rdt$, $t$, and $t+\rdt$
-(\ie \textit{before}, \textit{now} and  \textit{after} time-steps),
-rather than at the central time level $t$ only, as in the standard leapfrog scheme. 
+(\ie\ \textit{before}, \textit{now} and  \textit{after} time-steps),
+rather than at the central time level $t$ only, as in the standard leapfrog scheme.
 
 $\bullet$ leapfrog scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}):
@@ -795,20 +795,20 @@
 %-----------------------------------------nam_dynspg----------------------------------------------------
 
-\nlst{namdyn_spg} 
+\nlst{namdyn_spg}
 %------------------------------------------------------------------------------------------------------------
 
-Options are defined through the \ngn{namdyn\_spg} namelist variables.
+Options are defined through the \nam{dyn\_spg} namelist variables.
 The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}).
 The main distinction is between the fixed volume case (linear free surface) and
-the variable volume case (nonlinear free surface, \key{vvl} is defined).
+the variable volume case (nonlinear free surface, \texttt{vvl?} is defined).
 In the linear free surface case (\autoref{subsec:PE_free_surface})
 the vertical scale factors $e_{3}$ are fixed in time,
 while they are time-dependent in the nonlinear case (\autoref{subsec:PE_free_surface}).
-With both linear and nonlinear free surface, external gravity waves are allowed in the equations, 
+With both linear and nonlinear free surface, external gravity waves are allowed in the equations,
 which imposes a very small time step when an explicit time stepping is used.
-Two methods are proposed to allow a longer time step for the three-dimensional equations: 
-the filtered free surface, which is a modification of the continuous equations (see \autoref{eq:PE_flt?}), 
+Two methods are proposed to allow a longer time step for the three-dimensional equations:
+the filtered free surface, which is a modification of the continuous equations (see \autoref{eq:PE_flt?}),
 and the split-explicit free surface described below.
-The extra term introduced in the filtered method is calculated implicitly, 
+The extra term introduced in the filtered method is calculated implicitly,
 so that the update of the next velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}.
 
@@ -819,5 +819,5 @@
 an explicit formulation which requires a small time step;
 a filtered free surface formulation which allows a larger time step by
-adding a filtering term into the momentum equation; 
+adding a filtering term into the momentum equation;
 and a split-explicit free surface formulation, described below, which also allows a larger time step.
 
@@ -829,12 +829,12 @@
 % Explicit free surface formulation
 %--------------------------------------------------------------------------------------------------------------
-\subsection[Explicit free surface (\texttt{\textbf{key\_dynspg\_exp}})]
-{Explicit free surface (\protect\key{dynspg\_exp})}
+\subsection[Explicit free surface (\texttt{ln\_dynspg\_exp}\forcode{ = .true.})]
+{Explicit free surface (\protect\np{ln\_dynspg\_exp}\forcode{ = .true.})}
 \label{subsec:DYN_spg_exp}
 
-In the explicit free surface formulation (\key{dynspg\_exp} defined),
+In the explicit free surface formulation (\np{ln\_dynspg\_exp} set to true),
 the model time step is chosen to be small enough to resolve the external gravity waves
 (typically a few tens of seconds).
-The surface pressure gradient, evaluated using a leap-frog scheme (\ie centered in time),
+The surface pressure gradient, evaluated using a leap-frog scheme (\ie\ centered in time),
 is thus simply given by :
 \begin{equation}
@@ -846,7 +846,7 @@
     \end{aligned}
   \right.
-\end{equation} 
-
-Note that in the non-linear free surface case (\ie \key{vvl} defined),
+\end{equation}
+
+Note that in the non-linear free surface case (\ie\ \texttt{vvl?} defined),
 the surface pressure gradient is already included in the momentum tendency through
 the level thickness variation allowed in the computation of the hydrostatic pressure gradient.
@@ -856,6 +856,6 @@
 % Split-explict free surface formulation
 %--------------------------------------------------------------------------------------------------------------
-\subsection[Split-explicit free surface (\texttt{\textbf{key\_dynspg\_ts}})]
-{Split-explicit free surface (\protect\key{dynspg\_ts})}
+\subsection[Split-explicit free surface (\texttt{ln\_dynspg\_ts}\forcode{ = .true.})]
+{Split-explicit free surface (\protect\np{ln\_dynspg\_ts}\forcode{ = .true.})}
 \label{subsec:DYN_spg_ts}
 %------------------------------------------namsplit-----------------------------------------------------------
@@ -864,5 +864,5 @@
 %-------------------------------------------------------------------------------------------------------------
 
-The split-explicit free surface formulation used in \NEMO (\key{dynspg\_ts} defined),
+The split-explicit free surface formulation used in \NEMO\ (\np{ln\_dynspg\_ts} set to true),
 also called the time-splitting formulation, follows the one proposed by \citet{shchepetkin.mcwilliams_OM05}.
 The general idea is to solve the free surface equation and the associated barotropic velocity equations with
@@ -897,7 +897,7 @@
 Temporal discretization of the system above follows a three-time step Generalized Forward Backward algorithm
 detailed in \citet{shchepetkin.mcwilliams_OM05}.
-AB3-AM4 coefficients used in \NEMO follow the second-order accurate,
+AB3-AM4 coefficients used in \NEMO\ follow the second-order accurate,
 "multi-purpose" stability compromise as defined in \citet{shchepetkin.mcwilliams_ibk09}
-(see their figure 12, lower left). 
+(see their figure 12, lower left).
 
 %>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >
@@ -935,5 +935,5 @@
 provide time filtered quantities.
 These are used for the subsequent initialization of the barotropic mode in the following baroclinic step.
-Since external mode equations written at baroclinic time steps finally follow a forward time stepping scheme, 
+Since external mode equations written at baroclinic time steps finally follow a forward time stepping scheme,
 asselin filtering is not applied to barotropic quantities.\\
 Alternatively, one can choose to integrate barotropic equations starting from \textit{before} time step
@@ -963,10 +963,10 @@
 
 One can eventually choose to feedback instantaneous values by not using any time filter
-(\np{ln\_bt\_av}\forcode{ = .false.}). 
+(\np{ln\_bt\_av}\forcode{ = .false.}).
 In that case, external mode equations are continuous in time,
-\ie they are not re-initialized when starting a new sub-stepping sequence.
+\ie\ they are not re-initialized when starting a new sub-stepping sequence.
 This is the method used so far in the POM model, the stability being maintained by
 refreshing at (almost) each barotropic time step advection and horizontal diffusion terms.
-Since the latter terms have not been added in \NEMO for computational efficiency,
+Since the latter terms have not been added in \NEMO\ for computational efficiency,
 removing time filtering is not recommended except for debugging purposes.
 This may be used for instance to appreciate the damping effect of the standard formulation on
@@ -976,5 +976,5 @@
 
 %>>>>>===============
-\gmcomment{               %%% copy from griffies Book 
+\gmcomment{               %%% copy from griffies Book
 
 \textbf{title: Time stepping the barotropic system }
@@ -983,5 +983,5 @@
 Hence, we can update the surface height and vertically integrated velocity with a leap-frog scheme using
 the small barotropic time step $\rdt$.
-We have 
+We have
 
 \[
@@ -1006,5 +1006,5 @@
 and total depth of the ocean $H(\tau)$ are held for the duration of the barotropic time stepping over
 a single cycle.
-This is also the time that sets the barotropic time steps via 
+This is also the time that sets the barotropic time steps via
 \[
   % \label{eq:DYN_spg_ts_t}
@@ -1012,5 +1012,5 @@
 \]
 with $n$ an integer.
-The density scaled surface pressure is evaluated via 
+The density scaled surface pressure is evaluated via
 \[
   % \label{eq:DYN_spg_ts_ps}
@@ -1021,5 +1021,5 @@
   \end{cases}
 \]
-To get started, we assume the following initial conditions 
+To get started, we assume the following initial conditions
 \[
   % \label{eq:DYN_spg_ts_eta}
@@ -1029,5 +1029,5 @@
   \end{split}
 \]
-with 
+with
 \[
   % \label{eq:DYN_spg_ts_etaF}
@@ -1035,5 +1035,5 @@
 \]
 the time averaged surface height taken from the previous barotropic cycle.
-Likewise, 
+Likewise,
 \[
   % \label{eq:DYN_spg_ts_u}
@@ -1041,5 +1041,5 @@
   \textbf{U}(\tau,t_{n=1}) = \textbf{U}^{(b)}(\tau,t_{n=0}) + \rdt \ \text{RHS}_{n=0}
 \]
-with 
+with
 \[
   % \label{eq:DYN_spg_ts_u}
@@ -1047,9 +1047,9 @@
 \]
 the time averaged vertically integrated transport.
-Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration. 
+Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration.
 
 Upon reaching $t_{n=N} = \tau + 2\rdt \tau$ ,
 the vertically integrated velocity is time averaged to produce the updated vertically integrated velocity at
-baroclinic time $\tau + \rdt \tau$ 
+baroclinic time $\tau + \rdt \tau$
 \[
   % \label{eq:DYN_spg_ts_u}
@@ -1057,15 +1057,15 @@
 \]
 The surface height on the new baroclinic time step is then determined via a baroclinic leap-frog using
-the following form 
+the following form
 
 \begin{equation}
   \label{eq:DYN_spg_ts_ssh}
-  \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\rdt \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right]  
+  \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\rdt \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right]
 \end{equation}
 
 The use of this "big-leap-frog" scheme for the surface height ensures compatibility between
 the mass/volume budgets and the tracer budgets.
-More discussion of this point is provided in Chapter 10 (see in particular Section 10.2). 
- 
+More discussion of this point is provided in Chapter 10 (see in particular Section 10.2).
+
 In general, some form of time filter is needed to maintain integrity of the surface height field due to
 the leap-frog splitting mode in equation \autoref{eq:DYN_spg_ts_ssh}.
@@ -1078,5 +1078,5 @@
   \eta^{F}(\tau-\Delta) =  \overline{\eta^{(b)}(\tau)}
 \end{equation}
-Another approach tried was 
+Another approach tried was
 
 \[
@@ -1091,5 +1091,5 @@
 eliminating tracer and surface height time filtering (see ?? for more complete discussion).
 However, in the general case with a non-zero $\alpha$,
-the filter \autoref{eq:DYN_spg_ts_sshf} was found to be more conservative, and so is recommended. 
+the filter \autoref{eq:DYN_spg_ts_sshf} was found to be more conservative, and so is recommended.
 
 }            %%end gm comment (copy of griffies book)
@@ -1101,14 +1101,14 @@
 % Filtered free surface formulation
 %--------------------------------------------------------------------------------------------------------------
-\subsection[Filtered free surface (\texttt{\textbf{key\_dynspg\_flt}})]
-{Filtered free surface (\protect\key{dynspg\_flt})}
+\subsection[Filtered free surface (\texttt{dynspg\_flt?})]
+{Filtered free surface (\protect\texttt{dynspg\_flt?})}
 \label{subsec:DYN_spg_fltp}
 
-The filtered formulation follows the \citet{roullet.madec_JGR00} implementation. 
-The extra term introduced in the equations (see \autoref{subsec:PE_free_surface}) is solved implicitly. 
+The filtered formulation follows the \citet{roullet.madec_JGR00} implementation.
+The extra term introduced in the equations (see \autoref{subsec:PE_free_surface}) is solved implicitly.
 The elliptic solvers available in the code are documented in \autoref{chap:MISC}.
 
 %% gm %%======>>>>   given here the discrete eqs provided to the solver
-\gmcomment{               %%% copy from chap-model basics 
+\gmcomment{               %%% copy from chap-model basics
   \[
     % \label{eq:spg_flt}
@@ -1123,7 +1123,7 @@
 }   %end gmcomment
 
-Note that in the linear free surface formulation (\key{vvl} not defined),
+Note that in the linear free surface formulation (\texttt{vvl?} not defined),
 the ocean depth is time-independent and so is the matrix to be inverted.
-It is computed once and for all and applies to all ocean time steps. 
+It is computed once and for all and applies to all ocean time steps.
 
 % ================================================================
@@ -1135,13 +1135,13 @@
 %------------------------------------------nam_dynldf----------------------------------------------------
 
-\nlst{namdyn_ldf} 
+\nlst{namdyn_ldf}
 %-------------------------------------------------------------------------------------------------------------
 
-Options are defined through the \ngn{namdyn\_ldf} namelist variables.
+Options are defined through the \nam{dyn\_ldf} namelist variables.
 The options available for lateral diffusion are to use either laplacian (rotated or not) or biharmonic operators.
 The coefficients may be constant or spatially variable;
 the description of the coefficients is found in the chapter on lateral physics (\autoref{chap:LDF}).
 The lateral diffusion of momentum is evaluated using a forward scheme,
-\ie the velocity appearing in its expression is the \textit{before} velocity in time,
+\ie\ the velocity appearing in its expression is the \textit{before} velocity in time,
 except for the pure vertical component that appears when a tensor of rotation is used.
 This latter term is solved implicitly together with the vertical diffusion term (see \autoref{chap:STP}).
@@ -1159,5 +1159,5 @@
   In finite difference methods,
   the biharmonic operator is frequently the method of choice to achieve this scale selective dissipation since
-  its damping time (\ie its spin down time) scale like $\lambda^{-4}$ for disturbances of wavelength $\lambda$
+  its damping time (\ie\ its spin down time) scale like $\lambda^{-4}$ for disturbances of wavelength $\lambda$
   (so that short waves damped more rapidelly than long ones),
   whereas the Laplace operator damping time scales only like $\lambda^{-2}$.
@@ -1169,5 +1169,5 @@
 \label{subsec:DYN_ldf_lap}
 
-For lateral iso-level diffusion, the discrete operator is: 
+For lateral iso-level diffusion, the discrete operator is:
 \begin{equation}
   \label{eq:dynldf_lap}
@@ -1175,16 +1175,16 @@
     \begin{aligned}
       D_u^{l{\mathrm {\mathbf U}}} =\frac{1}{e_{1u} }\delta_{i+1/2} \left[ {A_T^{lm}
-          \;\chi } \right]-\frac{1}{e_{2u} {\kern 1pt}e_{3u} }\delta_j \left[ 
+          \;\chi } \right]-\frac{1}{e_{2u} {\kern 1pt}e_{3u} }\delta_j \left[
         {A_f^{lm} \;e_{3f} \zeta } \right] \\ \\
       D_v^{l{\mathrm {\mathbf U}}} =\frac{1}{e_{2v} }\delta_{j+1/2} \left[ {A_T^{lm}
-          \;\chi } \right]+\frac{1}{e_{1v} {\kern 1pt}e_{3v} }\delta_i \left[ 
+          \;\chi } \right]+\frac{1}{e_{1v} {\kern 1pt}e_{3v} }\delta_i \left[
         {A_f^{lm} \;e_{3f} \zeta } \right]
     \end{aligned}
   \right.
-\end{equation} 
+\end{equation}
 
 As explained in \autoref{subsec:PE_ldf},
 this formulation (as the gradient of a divergence and curl of the vorticity) preserves symmetry and
-ensures a complete separation between the vorticity and divergence parts of the momentum diffusion. 
+ensures a complete separation between the vorticity and divergence parts of the momentum diffusion.
 
 %--------------------------------------------------------------------------------------------------------------
@@ -1230,19 +1230,19 @@
                 -e_{2f} \; r_{1f} \,\overline{\overline {\delta_{k+1/2}[v]}}^{\,i+1/2,\,k}}
             \right)} \right]} 	\right. \\
-    & \qquad +\ \delta_j \left[ {A_T^{lm} \left( {\frac{e_{1t}\,e_{3t} }{e_{2t} 
+    & \qquad +\ \delta_j \left[ {A_T^{lm} \left( {\frac{e_{1t}\,e_{3t} }{e_{2t}
             }\,\delta_{j} [v] - e_{1t}\, r_{2t}
             \,\overline{\overline {\delta_{k+1/2} [v]}} ^{\,j,\,k}}
         \right)} \right] \\
-    & \qquad +\ \delta_k \left[ {A_{vw}^{lm} \left( {-e_{2v} \, r_{1vw} \,\overline{\overline 
+    & \qquad +\ \delta_k \left[ {A_{vw}^{lm} \left( {-e_{2v} \, r_{1vw} \,\overline{\overline
               {\delta_{i+1/2} [v]}}^{\,i+1/2,\,k+1/2} }\right.} \right. \\
     &  \ \qquad \qquad \qquad \quad\
     - e_{1v} \, r_{2vw} \,\overline{\overline {\delta_{j+1/2} [v]}} ^{\,j+1/2,\,k+1/2} \\
-    & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\ 
+    & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\
                 +\frac{e_{1v}\, e_{2v} }{e_{3vw} }\,\left( {r_{1vw}^2+r_{2vw}^2}
-                \right)\,\delta_{k+1/2} [v]} \right)} \right]\;\;\;} \right\} 
+                \right)\,\delta_{k+1/2} [v]} \right)} \right]\;\;\;} \right\}
   \end{split}
 \end{equation}
 where $r_1$ and $r_2$ are the slopes between the surface along which the diffusion operator acts and
-the surface of computation ($z$- or $s$-surfaces). 
+the surface of computation ($z$- or $s$-surfaces).
 The way these slopes are evaluated is given in the lateral physics chapter (\autoref{chap:LDF}).
 
@@ -1270,8 +1270,8 @@
 %----------------------------------------------namzdf------------------------------------------------------
 
-\nlst{namzdf} 
+\nlst{namzdf}
 %-------------------------------------------------------------------------------------------------------------
 
-Options are defined through the \ngn{namzdf} namelist variables.
+Options are defined through the \nam{zdf} namelist variables.
 The large vertical diffusion coefficient found in the surface mixed layer together with high vertical resolution implies that in the case of explicit time stepping there would be too restrictive a constraint on the time step.
 Two time stepping schemes can be used for the vertical diffusion term:
@@ -1280,5 +1280,5 @@
 $(b)$ a backward (or implicit) time differencing scheme (\np{ln\_zdfexp}\forcode{ = .false.})
 (see \autoref{chap:STP}).
-Note that namelist variables \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics. 
+Note that namelist variables \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics.
 
 The formulation of the vertical subgrid scale physics is the same whatever the vertical coordinate is.
@@ -1309,5 +1309,5 @@
 where $\left( \tau_u ,\tau_v \right)$ are the two components of the wind stress vector in
 the (\textbf{i},\textbf{j}) coordinate system.
-The high mixing coefficients in the surface mixed layer ensure that the surface wind stress is distributed in 
+The high mixing coefficients in the surface mixed layer ensure that the surface wind stress is distributed in
 the vertical over the mixed layer depth.
 If the vertical mixing coefficient is small (when no mixed layer scheme is used)
@@ -1326,5 +1326,5 @@
 Besides the surface and bottom stresses (see the above section)
 which are introduced as boundary conditions on the vertical mixing,
-three other forcings may enter the dynamical equations by affecting the surface pressure gradient. 
+three other forcings may enter the dynamical equations by affecting the surface pressure gradient.
 
 (1) When \np{ln\_apr\_dyn}\forcode{ = .true.} (see \autoref{sec:SBC_apr}),
@@ -1335,5 +1335,5 @@
 
 (3) When \np{nn\_ice\_embd}\forcode{ = 2} and LIM or CICE is used
-(\ie when the sea-ice is embedded in the ocean),
+(\ie\ when the sea-ice is embedded in the ocean),
 the snow-ice mass is taken into account when computing the surface pressure gradient.
 
@@ -1343,5 +1343,5 @@
 
 % ================================================================
-% Wetting and drying 
+% Wetting and drying
 % ================================================================
 \section{Wetting and drying }
@@ -1359,5 +1359,5 @@
 
 The following terminology is used. The depth of the topography (positive downwards)
-at each $(i,j)$ point is the quantity stored in array $\mathrm{ht\_wd}$ in the NEMO code.
+at each $(i,j)$ point is the quantity stored in array $\mathrm{ht\_wd}$ in the \NEMO\ code.
 The height of the free surface (positive upwards) is denoted by $ \mathrm{ssh}$. Given the sign
 conventions used, the water depth, $h$, is the height of the free surface plus the depth of the
@@ -1367,5 +1367,5 @@
 covered by water. They require the topography specified with a model
 configuration to have negative depths at points where the land is higher than the
-topography's reference sea-level. The vertical grid in NEMO is normally computed relative to an
+topography's reference sea-level. The vertical grid in \NEMO\ is normally computed relative to an
 initial state with zero sea surface height elevation.
 The user can choose to compute the vertical grid and heights in the model relative to
@@ -1386,5 +1386,5 @@
 All these configurations have used pure sigma coordinates. It is expected that
 the wetting and drying code will work in domains with more general s-coordinates provided
-the coordinates are pure sigma in the region where wetting and drying actually occurs. 
+the coordinates are pure sigma in the region where wetting and drying actually occurs.
 
 The next sub-section descrbies the directional limiter and the following sub-section the iterative limiter.
@@ -1399,5 +1399,5 @@
 \label{subsec:DYN_wd_directional_limiter}
 The principal idea of the directional limiter is that
-water should not be allowed to flow out of a dry tracer cell (i.e. one whose water depth is less than rn\_wdmin1).
+water should not be allowed to flow out of a dry tracer cell (i.e. one whose water depth is less than \np{rn\_wdmin1}).
 
 All the changes associated with this option are made to the barotropic solver for the non-linear
@@ -1409,8 +1409,8 @@
 
 The flux across each $u$-face of a tracer cell is multiplied by a factor zuwdmask (an array which depends on ji and jj).
-If the user sets ln\_wd\_dl\_ramp = .False. then zuwdmask is 1 when the
-flux is from a cell with water depth greater than rn\_wdmin1 and 0 otherwise. If the user sets
-ln\_wd\_dl\_ramp = .True. the flux across the face is ramped down as the water depth decreases
-from 2 * rn\_wdmin1 to rn\_wdmin1. The use of this ramp reduced grid-scale noise in idealised test cases.
+If the user sets \np{ln\_wd\_dl\_ramp}\forcode{ = .false.} then zuwdmask is 1 when the
+flux is from a cell with water depth greater than \np{rn\_wdmin1} and 0 otherwise. If the user sets
+\np{ln\_wd\_dl\_ramp}\forcode{ = .true.} the flux across the face is ramped down as the water depth decreases
+from 2 * \np{rn\_wdmin1} to \np{rn\_wdmin1}. The use of this ramp reduced grid-scale noise in idealised test cases.
 
 At the point where the flux across a $u$-face is multiplied by zuwdmask , we have chosen
@@ -1428,6 +1428,6 @@
 fields (tracers independent of $x$, $y$ and $z$). Our scheme conserves constant tracers because
 the velocities used at the tracer cell faces on the baroclinic timesteps are carefully calculated by dynspg\_ts
-to equal their mean value during the barotropic steps. If the user sets ln\_wd\_dl\_bc = .True., the
-baroclinic velocities are also multiplied by a suitably weighted average of zuwdmask.  
+to equal their mean value during the barotropic steps. If the user sets \np{ln\_wd\_dl\_bc}\forcode{ = .true.}, the
+baroclinic velocities are also multiplied by a suitably weighted average of zuwdmask.
 
 %-----------------------------------------------------------------------------------------
@@ -1455,5 +1455,5 @@
 
 \begin{align} \label{dyn_wd_continuity_2}
-\frac{e_1 e_2}{\Delta t} ( h_{i,j}(t_{n+1}) - h_{i,j}(t_e) ) 
+\frac{e_1 e_2}{\Delta t} ( h_{i,j}(t_{n+1}) - h_{i,j}(t_e) )
 &= - ( \mathrm{flxu}_{i+1,j} - \mathrm{flxu}_{i,j}  + \mathrm{flxv}_{i,j+1} - \mathrm{flxv}_{i,j} ) \\
 &= \mathrm{zzflx}_{i,j} .
@@ -1471,5 +1471,5 @@
 
 \begin{equation} \label{dyn_wd_zzflx_p_n_1}
-\mathrm{zzflx}_{i,j} = \mathrm{zzflxp}_{i,j} + \mathrm{zzflxn}_{i,j} .  
+\mathrm{zzflx}_{i,j} = \mathrm{zzflxp}_{i,j} + \mathrm{zzflxn}_{i,j} .
 \end{equation}
 
@@ -1495,5 +1495,5 @@
 
 \begin{equation} \label{dyn_wd_zzflx_initial}
-\mathrm{zzflxp^{(0)}}_{i,j} = \mathrm{zzflxp}_{i,j} , \quad  \mathrm{zzflxn^{(0)}}_{i,j} = \mathrm{zzflxn}_{i,j} . 
+\mathrm{zzflxp^{(0)}}_{i,j} = \mathrm{zzflxp}_{i,j} , \quad  \mathrm{zzflxn^{(0)}}_{i,j} = \mathrm{zzflxn}_{i,j} .
 \end{equation}
 
@@ -1525,5 +1525,5 @@
 \begin{split}
 \mathrm{zcoef}^{(m+1)}_{i,j} = \Big[ (h_{i,j}(t_e) & - \mathrm{rn\_wdmin1} - \mathrm{rn\_wdmin2})  \frac{e_1 e_2}{\Delta t} \phantom{]} \\
-\phantom{[} & -  \mathrm{zzflxn}^{(m)}_{i,j} \Big] \frac{1}{ \mathrm{zzflxp}^{(0)}_{i,j} } 
+\phantom{[} & -  \mathrm{zzflxn}^{(m)}_{i,j} \Big] \frac{1}{ \mathrm{zzflxp}^{(0)}_{i,j} }
 \end{split}
 \end{equation}
@@ -1635,5 +1635,5 @@
 
 % ================================================================
-% Time evolution term 
+% Time evolution term
 % ================================================================
 \section[Time evolution term (\textit{dynnxt.F90})]
@@ -1643,17 +1643,17 @@
 %----------------------------------------------namdom----------------------------------------------------
 
-\nlst{namdom} 
+\nlst{namdom}
 %-------------------------------------------------------------------------------------------------------------
 
-Options are defined through the \ngn{namdom} namelist variables.
+Options are defined through the \nam{dom} namelist variables.
 The general framework for dynamics time stepping is a leap-frog scheme,
-\ie a three level centred time scheme associated with an Asselin time filter (cf. \autoref{chap:STP}).
+\ie\ a three level centred time scheme associated with an Asselin time filter (cf. \autoref{chap:STP}).
 The scheme is applied to the velocity, except when
 using the flux form of momentum advection (cf. \autoref{sec:DYN_adv_cor_flux})
-in the variable volume case (\key{vvl} defined),
-where it has to be applied to the thickness weighted velocity (see \autoref{sec:A_momentum})  
+in the variable volume case (\texttt{vvl?} defined),
+where it has to be applied to the thickness weighted velocity (see \autoref{sec:A_momentum})
 
 $\bullet$ vector invariant form or linear free surface
-(\np{ln\_dynhpg\_vec}\forcode{ = .true.} ; \key{vvl} not defined):
+(\np{ln\_dynhpg\_vec}\forcode{ = .true.} ; \texttt{vvl?} not defined):
 \[
   % \label{eq:dynnxt_vec}
@@ -1667,5 +1667,5 @@
 
 $\bullet$ flux form and nonlinear free surface
-(\np{ln\_dynhpg\_vec}\forcode{ = .false.} ; \key{vvl} defined):
+(\np{ln\_dynhpg\_vec}\forcode{ = .false.} ; \texttt{vvl?} defined):
 \[
   % \label{eq:dynnxt_flux}
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_LBC.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_LBC.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_LBC.tex	(revision 11435)
@@ -3,10 +3,10 @@
 \begin{document}
 % ================================================================
-% Chapter — Lateral Boundary Condition (LBC) 
+% Chapter — Lateral Boundary Condition (LBC)
 % ================================================================
 \chapter{Lateral Boundary Condition (LBC)}
 \label{chap:LBC}
 
-\minitoc
+\chaptertoc
 
 \newpage
@@ -22,12 +22,23 @@
 %--------------------------------------------nam_lbc-------------------------------------------------------
 
-\nlst{namlbc} 
+\nlst{namlbc}
 %--------------------------------------------------------------------------------------------------------------
 
-%The lateral ocean boundary conditions contiguous to coastlines are Neumann conditions for heat and salt (no flux across boundaries) and Dirichlet conditions for momentum (ranging from free-slip to "strong" no-slip). They are handled automatically by the mask system (see \autoref{subsec:DOM_msk}). 
-
-%OPA allows land and topography grid points in the computational domain due to the presence of continents or islands, and includes the use of a full or partial step representation of bottom topography. The computation is performed over the whole domain, \ie we do not try to restrict the computation to ocean-only points. This choice has two motivations. Firstly, working on ocean only grid points overloads the code and harms the code readability. Secondly, and more importantly, it drastically reduces the vector portion of the computation, leading to a dramatic increase of CPU time requirement on vector computers.  The current section describes how the masking affects the computation of the various terms of the equations with respect to the boundary condition at solid walls. The process of defining which areas are to be masked is described in \autoref{subsec:DOM_msk}.
-
-Options are defined through the \ngn{namlbc} namelist variables.
+%The lateral ocean boundary conditions contiguous to coastlines are Neumann conditions for heat and salt
+%(no flux across boundaries) and Dirichlet conditions for momentum (ranging from free-slip to "strong" no-slip).
+%They are handled automatically by the mask system (see \autoref{subsec:DOM_msk}).
+
+%OPA allows land and topography grid points in the computational domain due to the presence of continents or islands,
+%and includes the use of a full or partial step representation of bottom topography.
+%The computation is performed over the whole domain, \ie\ we do not try to restrict the computation to ocean-only points.
+%This choice has two motivations.
+%Firstly, working on ocean only grid points overloads the code and harms the code readability.
+%Secondly, and more importantly, it drastically reduces the vector portion of the computation,
+%leading to a dramatic increase of CPU time requirement on vector computers.
+%The current section describes how the masking affects the computation of the various terms of the equations
+%with respect to the boundary condition at solid walls.
+%The process of defining which areas are to be masked is described in \autoref{subsec:DOM_msk}.
+
+Options are defined through the \nam{lbc} namelist variables.
 The discrete representation of a domain with complex boundaries (coastlines and bottom topography) leads to
 arrays that include large portions where a computation is not required as the model variables remain at zero.
@@ -41,5 +52,5 @@
 Since most of the boundary conditions consist of a zero flux across the solid boundaries,
 they can be simply applied by multiplying variables by the correct mask arrays,
-\ie the mask array of the grid point where the flux is evaluated.
+\ie\ the mask array of the grid point where the flux is evaluated.
 For example, the heat flux in the \textbf{i}-direction is evaluated at $u$-points.
 Evaluating this quantity as,
@@ -52,5 +63,5 @@
 (where mask$_{u}$ is the mask array at a $u$-point) ensures that the heat flux is zero inside land and
 at the boundaries, since mask$_{u}$ is zero at solid boundaries which in this case are defined at $u$-points
-(normal velocity $u$ remains zero at the coast) (\autoref{fig:LBC_uv}). 
+(normal velocity $u$ remains zero at the coast) (\autoref{fig:LBC_uv}).
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -104,5 +115,5 @@
 \item[free-slip boundary condition (\np{rn\_shlat}\forcode{ = 0}):] the tangential velocity at
   the coastline is equal to the offshore velocity,
-  \ie the normal derivative of the tangential velocity is zero at the coast,
+  \ie\ the normal derivative of the tangential velocity is zero at the coast,
   so the vorticity: mask$_{f}$ array is set to zero inside the land and just at the coast
   (\autoref{fig:LBC_shlat}-a).
@@ -114,5 +125,5 @@
   the closest ocean velocity gridpoint were of the same magnitude but in the opposite direction
   (\autoref{fig:LBC_shlat}-b).
-  Therefore, the vorticity along the coastlines is given by: 
+  Therefore, the vorticity along the coastlines is given by:
 
   \[
@@ -130,5 +141,5 @@
 
 \item["partial" free-slip boundary condition (0$<$\np{rn\_shlat}$<$2):] the tangential velocity at
-  the coastline is smaller than the offshore velocity, \ie there is a lateral friction but
+  the coastline is smaller than the offshore velocity, \ie\ there is a lateral friction but
   not strong enough to make the tangential velocity at the coast vanish (\autoref{fig:LBC_shlat}-c).
   This can be selected by providing a value of mask$_{f}$ strictly inbetween $0$ and $2$.
@@ -149,5 +160,5 @@
 % ================================================================
 \section[Model domain boundary condition (\texttt{jperio})]
-{Model domain boundary condition (\protect\np{jperio})}
+{Model domain boundary condition (\protect\jp{jperio})}
 \label{sec:LBC_jperio}
 
@@ -155,28 +166,28 @@
 closed, cyclic east-west, cyclic north-south, a north-fold, and combination closed-north fold or
 bi-cyclic east-west and north-fold.
-The north-fold boundary condition is associated with the 3-pole ORCA mesh. 
+The north-fold boundary condition is associated with the 3-pole ORCA mesh.
 
 % -------------------------------------------------------------------------------------------------------------
-%        Closed, cyclic (\np{jperio}\forcode{ = 0..2}) 
+%        Closed, cyclic (\jp{jperio}\forcode{ = 0..2})
 % -------------------------------------------------------------------------------------------------------------
 \subsection[Closed, cyclic (\forcode{jperio = [0127]})]
-{Closed, cyclic (\protect\np{jperio}\forcode{ = [0127]})}
+{Closed, cyclic (\protect\jp{jperio}\forcode{ = [0127]})}
 \label{subsec:LBC_jperio012}
 
 The choice of closed or cyclic model domain boundary condition is made by
-setting \np{jperio} to 0, 1, 2 or 7 in namelist \ngn{namcfg}.
+setting \jp{jperio} to 0, 1, 2 or 7 in namelist \nam{cfg}.
 Each time such a boundary condition is needed, it is set by a call to routine \mdl{lbclnk}.
 The computation of momentum and tracer trends proceeds from $i=2$ to $i=jpi-1$ and from $j=2$ to $j=jpj-1$,
-\ie in the model interior.
+\ie\ in the model interior.
 To choose a lateral model boundary condition is to specify the first and last rows and columns of
-the model variables. 
+the model variables.
 
 \begin{description}
 
-\item[For closed boundary (\np{jperio}\forcode{ = 0})],
+\item[For closed boundary (\jp{jperio}\forcode{ = 0})],
   solid walls are imposed at all model boundaries:
   first and last rows and columns are set to zero.
 
-\item[For cyclic east-west boundary (\np{jperio}\forcode{ = 1})],
+\item[For cyclic east-west boundary (\jp{jperio}\forcode{ = 1})],
   first and last rows are set to zero (closed) whilst the first column is set to
   the value of the last-but-one column and the last column to the value of the second one
@@ -184,5 +195,5 @@
   Whatever flows out of the eastern (western) end of the basin enters the western (eastern) end.
 
-\item[For cyclic north-south boundary (\np{jperio}\forcode{ = 2})],
+\item[For cyclic north-south boundary (\jp{jperio}\forcode{ = 2})],
   first and last columns are set to zero (closed) whilst the first row is set to
   the value of the last-but-one row and the last row to the value of the second one
@@ -190,5 +201,5 @@
   Whatever flows out of the northern (southern) end of the basin enters the southern (northern) end.
 
-\item[Bi-cyclic east-west and north-south boundary (\np{jperio}\forcode{ = 7})] combines cases 1 and 2.
+\item[Bi-cyclic east-west and north-south boundary (\jp{jperio}\forcode{ = 7})] combines cases 1 and 2.
 
 \end{description}
@@ -207,8 +218,8 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%        North fold (\textit{jperio = 3 }to $6)$ 
+%        North fold (\textit{jperio = 3 }to $6)$
 % -------------------------------------------------------------------------------------------------------------
 \subsection[North-fold (\forcode{jperio = [3-6]})]
-{North-fold (\protect\np{jperio}\forcode{ = [3-6]})}
+{North-fold (\protect\jp{jperio}\forcode{ = [3-6]})}
 \label{subsec:LBC_north_fold}
 
@@ -216,5 +227,5 @@
 a three-polar ORCA grid.
 Such a grid has two poles in the northern hemisphere (\autoref{fig:MISC_ORCA_msh},
-and thus requires a specific treatment illustrated in \autoref{fig:North_Fold_T}. 
+and thus requires a specific treatment illustrated in \autoref{fig:North_Fold_T}.
 Further information can be found in \mdl{lbcnfd} module which applies the north fold boundary condition.
 
@@ -234,5 +245,5 @@
 
 % ====================================================================
-% Exchange with neighbouring processors 
+% Exchange with neighbouring processors
 % ====================================================================
 \section[Exchange with neighbouring processors (\textit{lbclnk.F90}, \textit{lib\_mpp.F90})]
@@ -272,10 +283,10 @@
 After a computation, a communication phase starts:
 each processor sends to its neighbouring processors the update values of the points corresponding to
-the interior overlapping area to its neighbouring sub-domain (\ie the innermost of the two overlapping rows).
+the interior overlapping area to its neighbouring sub-domain (\ie\ the innermost of the two overlapping rows).
 The communication is done through the Message Passing Interface (MPI).
 The data exchanges between processors are required at the very place where
 lateral domain boundary conditions are set in the mono-domain computation:
 the \rou{lbc\_lnk} routine (found in \mdl{lbclnk} module) which manages such conditions is interfaced with
-routines found in \mdl{lib\_mpp} module when running on an MPP computer (\ie when \key{mpp\_mpi} defined).
+routines found in \mdl{lib\_mpp} module when running on an MPP computer (\ie\ when \key{mpp\_mpi} defined).
 It has to be pointed out that when using the MPP version of the model,
 the east-west cyclic boundary condition is done implicitly,
@@ -297,5 +308,5 @@
 The i-axis is divided by \jp{jpni} and
 the j-axis by \jp{jpnj} for a number of processors \jp{jpnij} most often equal to $jpni \times jpnj$
-(parameters set in  \ngn{nammpp} namelist).
+(parameters set in  \nam{mpp} namelist).
 Each processor is independent and without message passing or synchronous process,
 programs run alone and access just its own local memory.
@@ -304,5 +315,5 @@
 These dimensions include the internal domain and the overlapping rows.
 The number of rows to exchange (known as the halo) is usually set to one (\jp{jpreci}=1, in \mdl{par\_oce}).
-The whole domain dimensions are named \np{jpiglo}, \np{jpjglo} and \jp{jpk}.
+The whole domain dimensions are named \jp{jpiglo}, \jp{jpjglo} and \jp{jpk}.
 The relationship between the whole domain and a sub-domain is:
 \[
@@ -312,8 +323,8 @@
 where \jp{jpni}, \jp{jpnj} are the number of processors following the i- and j-axis.
 
-One also defines variables nldi and nlei which correspond to the internal domain bounds, 
-and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain. 
+One also defines variables nldi and nlei which correspond to the internal domain bounds,
+and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain.
 An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$,
-a global array (whole domain) by the relationship: 
+a global array (whole domain) by the relationship:
 \[
   % \label{eq:lbc_nimpp}
@@ -337,8 +348,8 @@
 
 
-The \NEMO model computes equation terms with the help of mask arrays (0 on land points and 1 on sea points).
+The \NEMO\ model computes equation terms with the help of mask arrays (0 on land points and 1 on sea points).
 It is easily readable and very efficient in the context of a computer with vectorial architecture.
 However, in the case of a scalar processor, computations over the land regions become more expensive in
-terms of CPU time. 
+terms of CPU time.
 It is worse when we use a complex configuration with a realistic bathymetry like the global ocean where
 more than 50 \% of points are land points.
@@ -349,9 +360,9 @@
 The user then chooses optimal parameters \jp{jpni}, \jp{jpnj} and \jp{jpnij} with $jpnij < jpni \times jpnj$,
 leading to the elimination of $jpni \times jpnj - jpnij$ land processors.
-When those parameters are specified in \ngn{nammpp} namelist,
+When those parameters are specified in \nam{mpp} namelist,
 the algorithm in the \rou{inimpp2} routine sets each processor's parameters (nbound, nono, noea,...) so that
 the land-only processors are not taken into account.
 
-\gmcomment{Note that the inimpp2 routine is general so that the original inimpp 
+\gmcomment{Note that the inimpp2 routine is general so that the original inimpp
 routine should be suppressed from the code.}
 
@@ -360,5 +371,5 @@
 Note that this is a problem for the meshmask file which requires to be defined over the whole domain.
 Therefore, user should not eliminate land processors when creating a meshmask file
-(\ie when setting a non-zero value to \np{nn\_msh}).
+(\ie\ when setting a non-zero value to \np{nn\_msh}).
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -381,5 +392,5 @@
 
 % ====================================================================
-% Unstructured open boundaries BDY 
+% Unstructured open boundaries BDY
 % ====================================================================
 \section{Unstructured open boundary conditions (BDY)}
@@ -388,20 +399,20 @@
 %-----------------------------------------nambdy--------------------------------------------
 
-\nlst{nambdy} 
+\nlst{nambdy}
 %-----------------------------------------------------------------------------------------------
 %-----------------------------------------nambdy_dta--------------------------------------------
 
-\nlst{nambdy_dta} 
+\nlst{nambdy_dta}
 %-----------------------------------------------------------------------------------------------
 
-Options are defined through the \ngn{nambdy} \ngn{nambdy\_dta} namelist variables.
-The BDY module is the core implementation of open boundary conditions for regional configurations on 
+Options are defined through the \nam{bdy} \nam{bdy\_dta} namelist variables.
+The BDY module is the core implementation of open boundary conditions for regional configurations on
 temperature, salinity, barotropic and baroclinic velocities, as well as ice concentration, ice and snow thicknesses).
 
-The BDY module was modelled on the OBC module (see NEMO 3.4) and shares many features and
+The BDY module was modelled on the OBC module (see \NEMO\ 3.4) and shares many features and
 a similar coding structure \citep{chanut_rpt05}.
 The specification of the location of the open boundary is completely flexible and
-allows for example the open boundary to follow an isobath or other irregular contour. 
-Boundary data files used with versions of NEMO prior to Version 3.4 may need to be re-ordered to work with this version.
+allows for example the open boundary to follow an isobath or other irregular contour.
+Boundary data files used with versions of \NEMO\ prior to Version 3.4 may need to be re-ordered to work with this version.
 See the section on the Input Boundary Data Files for details.
 
@@ -415,7 +426,7 @@
 Each boundary set may be defined as a set of straight line segments in a namelist
 (\np{ln\_coords\_file}\forcode{ = .false.}) or read in from a file (\np{ln\_coords\_file}\forcode{ = .true.}).
-If the set is defined in a namelist, then the namelists \ngn{nambdy\_index} must be included separately, one for each set.
+If the set is defined in a namelist, then the namelists \nam{bdy\_index} must be included separately, one for each set.
 If the set is defined by a file, then a ``\ifile{coordinates.bdy}'' file must be provided.
-The coordinates.bdy file is analagous to the usual NEMO ``\ifile{coordinates}'' file.
+The coordinates.bdy file is analagous to the usual \NEMO\ ``\ifile{coordinates}'' file.
 In the example above, there are two boundary sets, the first of which is defined via a file and
 the second is defined in a namelist.
@@ -423,8 +434,8 @@
 
 For each boundary set a boundary condition has to be chosen for the barotropic solution
-(``u2d'':sea-surface height and barotropic velocities), for the baroclinic velocities (``u3d''), 
+(``u2d'':sea-surface height and barotropic velocities), for the baroclinic velocities (``u3d''),
 for the active tracers \footnote{The BDY module does not deal with passive tracers at this version} (``tra''), and sea-ice (``ice'').
 For each set of variables there is a choice of algorithm and a choice for the data,
-eg. for the active tracers the algorithm is set by \np{cn\_tra} and the choice of data is set by \np{nn\_tra\_dta}.\\ 
+eg. for the active tracers the algorithm is set by \np{cn\_tra} and the choice of data is set by \np{nn\_tra\_dta}.\\
 
 The choice of algorithm is currently as follows:
@@ -436,6 +447,6 @@
 \item[\forcode{'neumann'}:] Value at the boundary are duplicated (No gradient). Only available for baroclinic velocity and tracer variables.
 \item[\forcode{'frs'}:] Flow Relaxation Scheme (FRS) available for all variables.
-\item[\forcode{'Orlanski'}:] Orlanski radiation scheme (fully oblique) for barotropic, baroclinic and tracer variables. 
-\item[\forcode{'Orlanski_npo'}:] Orlanski radiation scheme for barotropic, baroclinic and tracer variables. 
+\item[\forcode{'Orlanski'}:] Orlanski radiation scheme (fully oblique) for barotropic, baroclinic and tracer variables.
+\item[\forcode{'Orlanski_npo'}:] Orlanski radiation scheme for barotropic, baroclinic and tracer variables.
 \item[\forcode{'flather'}:] Flather radiation scheme for the barotropic variables only.
 \end{description}
@@ -443,17 +454,17 @@
 The main choice for the boundary data is to use initial conditions as boundary data
 (\np{nn\_tra\_dta}\forcode{ = 0}) or to use external data from a file (\np{nn\_tra\_dta}\forcode{ = 1}).
-In case the 3d velocity data contain the total velocity (ie, baroclinic and barotropic velocity), 
+In case the 3d velocity data contain the total velocity (ie, baroclinic and barotropic velocity),
 the bdy code can derived baroclinic and barotropic velocities by setting \np{ln\_full\_vel}\forcode{ = .true. }
 For the barotropic solution there is also the option to use tidal harmonic forcing either by
 itself (\np{nn\_dyn2d\_dta}\forcode{ = 2}) or in addition to other external data (\np{nn\_dyn2d\_dta}\forcode{ = 3}).\\
-Sea-ice salinity, temperature and age data at the boundary are constant and defined repectively by \np{rn\_ice\_sal}, \np{rn\_ice\_tem} and \np{rn\_ice\_age}. 
-
-If external boundary data is required then the \ngn{nambdy\_dta} namelist must be defined.
-One \ngn{nambdy\_dta} namelist is required for each boundary set in the order in which
+Sea-ice salinity, temperature and age data at the boundary are constant and defined repectively by \np{rn\_ice\_sal}, \np{rn\_ice\_tem} and \np{rn\_ice\_age}.
+
+If external boundary data is required then the \nam{bdy\_dta} namelist must be defined.
+One \nam{bdy\_dta} namelist is required for each boundary set in the order in which
 the boundary sets are defined in nambdy.
-In the example given, two boundary sets have been defined. The first one is reading data file in the \ngn{nambdy\_dta} namelist shown above 
+In the example given, two boundary sets have been defined. The first one is reading data file in the \nam{bdy\_dta} namelist shown above
 and the second one is using data from intial condition (no namelist bloc needed).
 The boundary data is read in using the fldread module,
-so the \ngn{nambdy\_dta} namelist is in the format required for fldread.
+so the \nam{bdy\_dta} namelist is in the format required for fldread.
 For each variable required, the filename, the frequency of the files and
 the frequency of the data in the files is given.
@@ -461,9 +472,9 @@
 
 There is currently an option to vertically interpolate the open boundary data onto the native grid at run-time.
-If \np{nn\_bdy\_jpk} $< -1$, it is assumed that the lateral boundary data are already on the native grid. 
-However, if \np{nn\_bdy\_jpk} is set to the number of vertical levels present in the boundary data, 
-a bilinear interpolation onto the native grid will be triggered at runtime. 
-For this to be successful the additional variables: $gdept$, $gdepu$, $gdepv$, $e3t$, $e3u$ and $e3v$, are required to be present in the lateral boundary files. 
-These correspond to the depths and scale factors of the input data, 
+If \np{nn\_bdy\_jpk} $< -1$, it is assumed that the lateral boundary data are already on the native grid.
+However, if \np{nn\_bdy\_jpk} is set to the number of vertical levels present in the boundary data,
+a bilinear interpolation onto the native grid will be triggered at runtime.
+For this to be successful the additional variables: $gdept$, $gdepu$, $gdepv$, $e3t$, $e3u$ and $e3v$, are required to be present in the lateral boundary files.
+These correspond to the depths and scale factors of the input data,
 the latter used to make any adjustment to the velocity fields due to differences in the total water depths between the two vertical grids.\\
 
@@ -474,5 +485,5 @@
 Tidal harmonic forcing is also used.
 The second set is defined in a namelist.
-FRS conditions are applied on temperature and salinity and climatological data is read from initial condition files. 
+FRS conditions are applied on temperature and salinity and climatological data is read from initial condition files.
 
 %----------------------------------------------
@@ -505,5 +516,5 @@
 is relaxed towards the external conditions over the rest of the FRS zone.
 The application of a relaxation zone helps to prevent spurious reflection of
-outgoing signals from the model boundary. 
+outgoing signals from the model boundary.
 
 The function $\alpha$ is specified as a $tanh$ function:
@@ -534,5 +545,5 @@
 Note that the sea-surface height gradient in \autoref{eq:bdy_fla1} is a spatial gradient across the model boundary,
 so that $\eta_{e}$ is defined on the $T$ points with $nbr=1$ and $\eta$ is defined on the $T$ points with $nbr=2$.
-$U$ and $U_{e}$ are defined on the $U$ or $V$ points with $nbr=1$, \ie between the two $T$ grid points.
+$U$ and $U_{e}$ are defined on the $U$ or $V$ points with $nbr=1$, \ie\ between the two $T$ grid points.
 
 %----------------------------------------------
@@ -575,8 +586,8 @@
 \end{equation}
 
-Generally the relaxation time scale at inward propagation points \np{(rn\_time\_dmp}) is set much shorter than the time scale at outward propagation
+Generally the relaxation time scale at inward propagation points (\np{rn\_time\_dmp}) is set much shorter than the time scale at outward propagation
 points (\np{rn\_time\_dmp\_out}) so that the solution is constrained more strongly by the external data at inward propagation points.
-See \autoref{subsec:BDY_relaxation} for detailed on the spatial shape of the scaling.\\ 
-The ``normal propagation of oblique radiation'' or NPO approximation (called \forcode{'orlanski_npo'}) involves assuming 
+See \autoref{subsec:BDY_relaxation} for detailed on the spatial shape of the scaling.\\
+The ``normal propagation of oblique radiation'' or NPO approximation (called \forcode{'orlanski_npo'}) involves assuming
 that $c_y$ is zero in equation (\autoref{eq:wave_continuous}), but including
 this term in the denominator of equation (\autoref{eq:cx}). Both versions of the scheme are options in BDY. Equations
@@ -587,8 +598,8 @@
 \label{subsec:BDY_relaxation}
 
-In addition to a specific boundary condition specified as \np{cn\_tra} and \np{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available. 
+In addition to a specific boundary condition specified as \np{cn\_tra} and \np{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available.
 It is control by the namelist parameter \np{ln\_tra\_dmp} and \np{ln\_dyn3d\_dmp} for each boundary set.
 
-The relaxation time scale value (\np{rn\_time\_dmp} and \np{rn\_time\_dmp\_out}, $\tau$) are defined at the boundaries itself. 
+The relaxation time scale value (\np{rn\_time\_dmp} and \np{rn\_time\_dmp\_out}, $\tau$) are defined at the boundaries itself.
 This time scale ($\alpha$) is weighted by the distance ($d$) from the boundary over \np{nn\_rimwidth} cells ($N$):
 
@@ -597,5 +608,5 @@
 \]
 
-The same scaling is applied in the Orlanski damping. 
+The same scaling is applied in the Orlanski damping.
 
 %----------------------------------------------
@@ -610,13 +621,13 @@
 the point is increasingly further away from the edge of the model domain.
 A set of $nbi$, $nbj$, and $nbr$ arrays is defined for each of the $T$, $U$ and $V$ grids.
-Figure \autoref{fig:LBC_bdy_geom} shows an example of an irregular boundary. 
+Figure \autoref{fig:LBC_bdy_geom} shows an example of an irregular boundary.
 
 The boundary geometry for each set may be defined in a namelist nambdy\_index or
 by reading in a ``\ifile{coordinates.bdy}'' file.
 The nambdy\_index namelist defines a series of straight-line segments for north, east, south and west boundaries.
-One nambdy\_index namelist bloc is needed for each boundary condition defined by indexes. 
-For the northern boundary, \np{nbdysegn} gives the number of segments,
-\np{jpjnob} gives the $j$ index for each segment and \np{jpindt} and
-\np{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries.
+One nambdy\_index namelist bloc is needed for each boundary condition defined by indexes.
+For the northern boundary, \texttt{nbdysegn} gives the number of segments,
+\jp{jpjnob} gives the $j$ index for each segment and \jp{jpindt} and
+\jp{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries.
 These segments define a list of $T$ grid points along the outermost row of the boundary ($nbr\,=\, 1$).
 The code deduces the $U$ and $V$ points and also the points for $nbr\,>\, 1$ if \np{nn\_rimwidth}\forcode{ > 1}.
@@ -629,5 +640,5 @@
 Typically this file will be used to generate external boundary data via interpolation and so
 will also contain the latitudes and longitudes of each point as shown.
-However, this is not necessary to run the model. 
+However, this is not necessary to run the model.
 
 For some choices of irregular boundary the model domain may contain areas of ocean which
@@ -658,6 +669,6 @@
 a time dimension;
 $xb$ which is the index of the boundary data point in the horizontal;
-and $yb$ which is a degenerate dimension of 1 to enable the file to be read by the standard NEMO I/O routines.
-The 3D fields also have a depth dimension. 
+and $yb$ which is a degenerate dimension of 1 to enable the file to be read by the standard \NEMO\ I/O routines.
+The 3D fields also have a depth dimension.
 
 From Version 3.4 there are new restrictions on the order in which the boundary points are defined
@@ -670,5 +681,5 @@
 \item All the data for a particular boundary set must be in the same order.
   (Prior to 3.4 it was possible to define barotropic data in a different order to
-  the data for tracers and baroclinic velocities). 
+  the data for tracers and baroclinic velocities).
 \end{enumerate}
 
@@ -697,5 +708,5 @@
 This is controlled  by the \np{ln\_vol} parameter in the namelist.
 A value of \np{ln\_vol}\forcode{ = .false.} indicates that this option is not used.
-Two options to control the volume are available (\np{nn\_volctl}). 
+Two options to control the volume are available (\np{nn\_volctl}).
 If \np{nn\_volctl}\forcode{ = 0} then a correction is applied to the normal barotropic velocities around the boundary at
 each timestep to ensure that the integrated volume flow through the boundary is zero.
@@ -713,15 +724,15 @@
 %-----------------------------------------nambdy_tide--------------------------------------------
 
-\nlst{nambdy_tide} 
+\nlst{nambdy_tide}
 %-----------------------------------------------------------------------------------------------
 
 Tidal forcing at open boundaries requires the activation of surface
-tides (i.e., in \ngn{nam\_tide}, \np{ln\_tide} needs to be set to
+tides (i.e., in \nam{\_tide}, \np{ln\_tide} needs to be set to
 \forcode{.true.} and the required constituents need to be activated by
-including their names in the \np{cname} array; see
+including their names in the \np{clname} array; see
 \autoref{sec:SBC_tide}). Specific options related to the reading in of
 the complex harmonic amplitudes of elevation (SSH) and barotropic
 velocity (u,v) at open boundaries are defined through the
-\ngn{nambdy\_tide} namelist parameters.\\
+\nam{bdy\_tide} namelist parameters.\\
 
 The tidal harmonic data at open boundaries can be specified in two
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_LDF.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_LDF.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_LDF.tex	(revision 11435)
@@ -9,5 +9,5 @@
 \label{chap:LDF}
 
-\minitoc
+\chaptertoc
 
 \newpage
@@ -22,5 +22,5 @@
 (3) the space and time variations of the eddy coefficients.
 These three aspects of the lateral diffusion are set through namelist parameters
-(see the \ngn{nam\_traldf} and \ngn{nam\_dynldf} below).
+(see the \nam{tra\_ldf} and \nam{dyn\_ldf} below).
 Note that this chapter describes the standard implementation of iso-neutral tracer mixing. 
 Griffies's implementation, which is used if \np{ln\_traldf\_triad}\forcode{ = .true.},
@@ -53,5 +53,5 @@
 {Laplacian mixing (\protect\np{ln\_traldf\_lap}, \protect\np{ln\_dynldf\_lap})}
 Setting \protect\np{ln\_traldf\_lap}\forcode{ = .true.} and/or \protect\np{ln\_dynldf\_lap}\forcode{ = .true.} enables 
-a second order diffusion on tracers and momentum respectively. Note that in \NEMO 4, one can not combine 
+a second order diffusion on tracers and momentum respectively. Note that in \NEMO\ 4, one can not combine 
 Laplacian and Bilaplacian operators for the same variable.
 
@@ -60,5 +60,5 @@
 Setting \protect\np{ln\_traldf\_blp}\forcode{ = .true.} and/or \protect\np{ln\_dynldf\_blp}\forcode{ = .true.} enables 
 a fourth order diffusion on tracers and momentum respectively. It is implemented by calling the above Laplacian operator twice. 
-We stress again that from \NEMO 4, the simultaneous use Laplacian and Bilaplacian operators is not allowed.
+We stress again that from \NEMO\ 4, the simultaneous use Laplacian and Bilaplacian operators is not allowed.
 
 % ================================================================
@@ -90,9 +90,9 @@
 \subsection{Slopes for tracer geopotential mixing in the $s$-coordinate}
 
-In $s$-coordinates, geopotential mixing (\ie horizontal mixing) $r_1$ and $r_2$ are the slopes between
+In $s$-coordinates, geopotential mixing (\ie\ horizontal mixing) $r_1$ and $r_2$ are the slopes between
 the geopotential and computational surfaces.
 Their discrete formulation is found by locally solving \autoref{eq:tra_ldf_iso} when
 the diffusive fluxes in the three directions are set to zero and $T$ is assumed to be horizontally uniform,
-\ie a linear function of $z_T$, the depth of a $T$-point. 
+\ie\ a linear function of $z_T$, the depth of a $T$-point. 
 %gm { Steven : My version is obviously wrong since I'm left with an arbitrary constant which is the local vertical temperature gradient}
 
@@ -124,5 +124,5 @@
 Their formulation does not depend on the vertical coordinate used.
 Their discrete formulation is found using the fact that the diffusive fluxes of
-locally referenced potential density (\ie $in situ$ density) vanish.
+locally referenced potential density (\ie\ $in situ$ density) vanish.
 So, substituting $T$ by $\rho$ in \autoref{eq:tra_ldf_iso} and setting the diffusive fluxes in
 the three directions to zero leads to the following definition for the neutral slopes:
@@ -230,5 +230,5 @@
 To overcome this problem, several techniques have been proposed in which the numerical schemes of
 the ocean model are modified \citep{weaver.eby_JPO97, griffies.gnanadesikan.ea_JPO98}.
-Griffies's scheme is now available in \NEMO if \np{ln\_traldf\_triad}=\forcode{= .true.}; see \autoref{apdx:triad}.
+Griffies's scheme is now available in \NEMO\ if \np{ln\_traldf\_triad}\forcode{ = .true.}; see \autoref{apdx:triad}.
 Here, another strategy is presented \citep{lazar_phd97}:
 a local filtering of the iso-neutral slopes (made on 9 grid-points) prevents the development of
@@ -284,5 +284,5 @@
       \textit{(a)} in the real ocean the slope is the iso-neutral slope in the ocean interior,
       which has to be adjusted at the surface boundary
-      \ie it must tend to zero at the surface since there is no mixing across the air-sea interface:
+      \ie\ it must tend to zero at the surface since there is no mixing across the air-sea interface:
       wall boundary condition).
       Nevertheless, the profile between the surface zero value and the interior iso-neutral one is unknown,
@@ -309,5 +309,5 @@
 \textit{vw}- points for the $v$-component.
 They are computed from the slopes used for tracer diffusion,
-\ie \autoref{eq:ldfslp_geo} and \autoref{eq:ldfslp_iso}:
+\ie\ \autoref{eq:ldfslp_geo} and \autoref{eq:ldfslp_iso}:
 
 \[
@@ -323,5 +323,5 @@
 The major issue remaining is in the specification of the boundary conditions.
 The same boundary conditions are chosen as those used for lateral diffusion along model level surfaces,
-\ie using the shear computed along the model levels and with no additional friction at the ocean bottom
+\ie\ using the shear computed along the model levels and with no additional friction at the ocean bottom
 (see \autoref{sec:LBC_coast}).
 
@@ -420,5 +420,5 @@
 
 The 3D space variation of the mixing coefficient is simply the combination of the 1D and 2D cases above,
-\ie a hyperbolic tangent variation with depth associated with a grid size dependence of
+\ie\ a hyperbolic tangent variation with depth associated with a grid size dependence of
 the magnitude of the coefficient. 
 
@@ -527,8 +527,8 @@
 the formulation of which depends on the slopes of iso-neutral surfaces.
 Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces,
-\ie \autoref{eq:ldfslp_geo} is used in $z$-coordinates,
+\ie\ \autoref{eq:ldfslp_geo} is used in $z$-coordinates,
 and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $s$-coordinates.
 
-If isopycnal mixing is used in the standard way, \ie \np{ln\_traldf\_triad}\forcode{ = .false.}, the eddy induced velocity is given by: 
+If isopycnal mixing is used in the standard way, \ie\ \np{ln\_traldf\_triad}\forcode{ = .false.}, the eddy induced velocity is given by: 
 \begin{equation}
   \label{eq:ldfeiv}
@@ -539,5 +539,5 @@
   \end{split}
 \end{equation}
-where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{nn\_aei\_ijk\_t} \ngn{namtra\_eiv} namelist parameter. 
+where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{nn\_aei\_ijk\_t} \nam{tra\_eiv} namelist parameter. 
 The three components of the eddy induced velocity are computed in \rou{ldf\_eiv\_trp} and
 added to the eulerian velocity in \rou{tra\_adv} where tracer advection is performed.
@@ -570,5 +570,5 @@
 %--------------------------------------------------------------------------------------------------------------
 
-If  \np{ln\_mle}\forcode{ = .true.} in \ngn{namtra\_mle} namelist, a parameterization of the mixing due to unresolved mixed layer instabilities is activated (\citet{foxkemper.ferrari_JPO08}). Additional transport is computed in \rou{ldf\_mle\_trp} and added to the eulerian transport in \rou{tra\_adv} as done for eddy induced advection.
+If  \np{ln\_mle}\forcode{ = .true.} in \nam{tra\_mle} namelist, a parameterization of the mixing due to unresolved mixed layer instabilities is activated (\citet{foxkemper.ferrari_JPO08}). Additional transport is computed in \rou{ldf\_mle\_trp} and added to the eulerian transport in \rou{tra\_adv} as done for eddy induced advection.
 
 \colorbox{yellow}{TBC}
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_OBS.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_OBS.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_OBS.tex	(revision 11435)
@@ -8,5 +8,5 @@
 \label{chap:OBS}
 
-\minitoc
+\chaptertoc
 
 \vfill
@@ -15,5 +15,5 @@
 \begin{tabular}{l||l|m{0.65\linewidth}}
     Release   & Author        & Modifications \\
-    {\em 4.0} & {\em D. J. Lea} & {\em \NEMO 4.0 updates}  \\
+    {\em 4.0} & {\em D. J. Lea} & {\em \NEMO\ 4.0 updates}  \\
     {\em 3.6} & {\em M. Martin, A. Ryan} & {\em Add averaging operator, standalone obs oper} \\
     {\em 3.4} & {\em D. J. Lea, M. Martin, ...} & {\em Initial version}  \\
@@ -32,5 +32,5 @@
 The OBS code is called from \mdl{nemogcm} for model initialisation and to calculate the model equivalent values for observations on the 0th time step.
 The code is then called again after each time step from \mdl{step}.
-The code is only activated if the \ngn{namobs} namelist logical \np{ln\_diaobs} is set to true.
+The code is only activated if the \nam{obs} namelist logical \np{ln\_diaobs} is set to true.
 
 For all data types a 2D horizontal interpolator or averager is needed to
@@ -40,5 +40,5 @@
 This now works in a generalised vertical coordinate system.
 
-Some profile observation types (\eg tropical moored buoys) are made available as daily averaged quantities.
+Some profile observation types (\eg\ tropical moored buoys) are made available as daily averaged quantities.
 The observation operator code can be set-up to calculate the equivalent daily average model temperature fields using
 the \np{nn\_profdavtypes} namelist array.
@@ -48,5 +48,5 @@
 Otherwise (by default) the model value from the nearest time step to the observation time is used.
 
-The code is controlled by the namelist \ngn{namobs}.
+The code is controlled by the namelist \nam{obs}.
 See the following sections for more details on setting up the namelist.
 
@@ -68,8 +68,8 @@
 In this section an example of running the observation operator code is described using
 profile observation data which can be freely downloaded.
-It shows how to adapt an existing run and build of \NEMO to run the observation operator. Note also the observation operator and the assimilation increments code are run in the \np{ORCA2\_ICE\_OBS} SETTE test.
+It shows how to adapt an existing run and build of \NEMO\ to run the observation operator. Note also the observation operator and the assimilation increments code are run in the ORCA2\_ICE\_OBS SETTE test.
 
 \begin{enumerate}
-\item Compile NEMO.
+\item Compile \NEMO.
 
 \item Download some EN4 data from \href{http://www.metoffice.gov.uk/hadobs}{www.metoffice.gov.uk/hadobs}.
@@ -77,10 +77,10 @@
   the observation operator compares the model and observations for a matching date and time.
 
-\item Compile the OBSTOOLS code in the \np{tools} directory using:
+\item Compile the OBSTOOLS code in the \path{tools} directory using:
 \begin{cmds}
 ./maketools -n OBSTOOLS -m [ARCH]
 \end{cmds}
 
-replacing \np{[ARCH]} with the build architecture file for your machine. Note the tools are checked out from a separate repository under \np{utils/tools}.
+replacing \texttt{[ARCH]} with the build architecture file for your machine. Note the tools are checked out from a separate location of the repository (under \path{/utils/tools}).
 
 \item Convert the EN4 data into feedback format:
@@ -89,8 +89,8 @@
 \end{cmds}
 
-\item Include the following in the \NEMO namelist to run the observation operator on this data:
+\item Include the following in the \NEMO\ namelist to run the observation operator on this data:
 \end{enumerate}
 
-Options are defined through the \ngn{namobs} namelist variables.
+Options are defined through the \nam{obs} namelist variables.
 The options \np{ln\_t3d} and \np{ln\_s3d} switch on the temperature and salinity profile observation operator code.
 The filename or array of filenames are specified using the \np{cn\_profbfiles} variable.
@@ -114,5 +114,5 @@
 \label{sec:OBS_details}
 
-Here we show a more complete example namelist \ngn{namobs} and also show the NetCDF headers of
+Here we show a more complete example namelist \nam{obs} and also show the NetCDF headers of
 the observation files that may be used with the observation operator.
 
@@ -554,9 +554,9 @@
 the model equivalent of the observation is calculated by interpolating from
 the four surrounding grid points to the observation location.
-Some satellite observations (\eg microwave satellite SST data, or satellite SSS data) have a footprint which
+Some satellite observations (\eg\ microwave satellite SST data, or satellite SSS data) have a footprint which
 is similar in size or larger than the model grid size (particularly when the grid size is small).
 In those cases the model counterpart should be calculated by averaging the model grid points over
 the same size as the footprint.
-\NEMO therefore has the capability to specify either an interpolation or an averaging
+\NEMO\ therefore has the capability to specify either an interpolation or an averaging
 (for surface observation types only).
 
@@ -571,15 +571,15 @@
 \item \np{nn\_2dint}\forcode{ = 4}: Polynomial interpolation
 \item \np{nn\_2dint}\forcode{ = 5}: Radial footprint averaging with diameter specified in the namelist as
-  \np{rn\_[var]\_avglamscl} in degrees or metres (set using \np{ln\_[var]\_fp\_indegs})
+  \texttt{rn\_[var]\_avglamscl} in degrees or metres (set using \texttt{ln\_[var]\_fp\_indegs})
 \item \np{nn\_2dint}\forcode{ = 6}: Rectangular footprint averaging with E/W and N/S size specified in
-  the namelist as \np{rn\_[var]\_avglamscl} and \np{rn\_[var]\_avgphiscl} in degrees or metres
-  (set using \np{ln\_[var]\_fp\_indegs})
+  the namelist as \texttt{rn\_[var]\_avglamscl} and \texttt{rn\_[var]\_avgphiscl} in degrees or metres
+  (set using \texttt{ln\_[var]\_fp\_indegs})
 \end{itemize}
-Replace \np{[var]} in the last two options with the observation type (sla, sst, sss or sic) for
+Replace \texttt{[var]} in the last two options with the observation type (sla, sst, sss or sic) for
 which the averaging is to be performed (see namelist example above).
 The \np{nn\_2dint} default option can be overridden for surface observation types using
-namelist values \np{nn\_2dint\_[var]} where \np{[var]} is the observation type.
-
-Below is some more detail on the various options for interpolation and averaging available in NEMO.
+namelist values \texttt{nn\_2dint\_[var]} where \texttt{[var]} is the observation type.
+
+Below is some more detail on the various options for interpolation and averaging available in \NEMO.
 
 \subsubsection{Horizontal interpolation}
@@ -588,5 +588,5 @@
 the four nearest neighbouring model grid points ${\mathrm A}$, ${\mathrm B}$, ${\mathrm C}$ and ${\mathrm D}$ with
 longitude and latitude ($\lambda_{\mathrm A}$, $\phi_{\mathrm A}$),($\lambda_{\mathrm B}$, $\phi_{\mathrm B}$) etc.
-All horizontal interpolation methods implemented in \NEMO estimate the value of a model variable $x$ at point $P$ as
+All horizontal interpolation methods implemented in \NEMO\ estimate the value of a model variable $x$ at point $P$ as
 a weighted linear combination of the values of the model variables at the grid points ${\mathrm A}$, ${\mathrm B}$ etc.:
 
@@ -628,5 +628,5 @@
    and $M$ corresponds to $B$, $C$ or $D$.
    A more stable form of the great-circle distance formula for small distances ($x$ near 1)
-   involves the arcsine function (\eg see p.~101 of \citet{daley.barker_bk01}:
+   involves the arcsine function (\eg\ see p.~101 of \citet{daley.barker_bk01}:
 
    \begin{alignat*}{2}
@@ -722,5 +722,5 @@
 \subsection{Grid search}
 
-For many grids used by the \NEMO model, such as the ORCA family, the horizontal grid coordinates $i$ and $j$ are not simple functions of latitude and longitude.
+For many grids used by the \NEMO\ model, such as the ORCA family, the horizontal grid coordinates $i$ and $j$ are not simple functions of latitude and longitude.
 Therefore, it is not always straightforward to determine the grid points surrounding any given observational position.
 Before the interpolation can be performed, a search algorithm is then required to determine the corner points of
@@ -759,5 +759,5 @@
 \end{align*}
 point in the opposite direction to the unit normal $\widehat{\mathbf k}$
-(\ie that the coefficients of $\widehat{\mathbf k}$ are negative),
+(\ie\ that the coefficients of $\widehat{\mathbf k}$ are negative),
 where ${{\mathbf r}_{}}_{\mathrm PA}$, ${{\mathbf r}_{}}_{\mathrm PB}$, etc. correspond to
 the vectors between points P and A, P and B, etc..
@@ -775,5 +775,5 @@
 For horizontal interpolation, there is the basic problem that
 the observations are unevenly distributed on the globe.
-In \NEMO the model grid is divided into subgrids (or domains) where
+In \NEMO\ the model grid is divided into subgrids (or domains) where
 each subgrid is executed on a single processing element with explicit message passing for
 exchange of information along the domain boundaries when running on a massively parallel processor (MPP) system.
@@ -807,5 +807,5 @@
 any MPP communication.
 This is under the assumption that we are dealing with point observations and only using a $2 \times 2$ grid-point stencil for
-the interpolation (\eg bilinear interpolation).
+the interpolation (\eg\ bilinear interpolation).
 For higher order interpolation schemes this is no longer valid.
 A disadvantage with the above scheme is that the number of observations on each processor can be very different.
@@ -844,5 +844,5 @@
 At the bottom boundary, this is done using the land-ocean mask.
 
-For profile observation types we do both vertical and horizontal interpolation. \NEMO has a generalised vertical coordinate system this means the vertical level depths can vary with location. Therefore, it is necessary first to perform vertical interpolation of the model value to the observation depths for each of the four surrounding grid points. After this the model values, at these points, at the observation depth, are horizontally interpolated to the observation location.
+For profile observation types we do both vertical and horizontal interpolation. \NEMO\ has a generalised vertical coordinate system this means the vertical level depths can vary with location. Therefore, it is necessary first to perform vertical interpolation of the model value to the observation depths for each of the four surrounding grid points. After this the model values, at these points, at the observation depth, are horizontally interpolated to the observation location.
 
 \newpage
@@ -892,5 +892,5 @@
 
 The simplest way to use the executable is to edit and append the \textbf{sao.nml} namelist to
-a full \NEMO namelist and then to run the executable as if it were nemo.exe.
+a full \NEMO\ namelist and then to run the executable as if it were nemo.exe.
 
 %--------------------------------------------------------------------------------------------------------
@@ -898,6 +898,6 @@
 %--------------------------------------------------------------------------------------------------------
 \subsection{Configuring the standalone observation operator}
-The observation files and settings understood by \ngn{namobs} have been outlined in the online observation operator section.
-In addition is a further namelist \ngn{namsao} which used to set the input model fields for the SAO
+The observation files and settings understood by \nam{obs} have been outlined in the online observation operator section.
+In addition is a further namelist \nam{sao} which used to set the input model fields for the SAO
 
 \subsubsection{Single field}
@@ -909,5 +909,5 @@
 \textbf{votemper}, \textbf{vosaline} and optionally \textbf{sshn} present.
 
-For each field read there must be an entry in the \ngn{namsao} namelist specifying
+For each field read there must be an entry in the \nam{sao} namelist specifying
 the name of the file to read and the index along the \emph{time\_counter}.
 For example, to read the second time counter from a single file the namelist would be.
@@ -958,5 +958,5 @@
 However, just to note, it is possible to extend this approach by comparing multiple forecasts, analyses, persisted analyses and
 climatologies with the same set of observations.
-This approach is referred to as \emph{Class 4} since it is the fourth metric defined by the GODAE intercomparison project. This requires multiple runs of the SAO and running an additional utility (not currently in the \NEMO repository) to combine the feedback files into one class 4 file.
+This approach is referred to as \emph{Class 4} since it is the fourth metric defined by the GODAE intercomparison project. This requires multiple runs of the SAO and running an additional utility (not currently in the \NEMO\ repository) to combine the feedback files into one class 4 file.
 
 \newpage
@@ -966,5 +966,5 @@
 
 For convenience some tools for viewing and processing of observation and feedback files are provided in
-the \NEMO repository.
+the \NEMO\ repository.
 These tools include OBSTOOLS which are a collection of \fortran programs which are helpful to deal with feedback files.
 They do such tasks as observation file conversion, printing of file contents,
@@ -976,5 +976,5 @@
 \subsection{Obstools}
 
-A series of \fortran utilities is provided with \NEMO called OBSTOOLS.
+A series of \fortran utilities is provided with \NEMO\ called OBSTOOLS.
 This are helpful in handling observation files and the feedback file output from the observation operator. A brief description of some of the utilities follows
 
@@ -1000,5 +1000,5 @@
 
 The program fbcomb combines multiple feedback files produced by individual processors in
-an MPI run of \NEMO into a single feedback file.
+an MPI run of \NEMO\ into a single feedback file.
 It is called in the following way:
 
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_SBC.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_SBC.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_SBC.tex	(revision 11435)
@@ -4,9 +4,9 @@
 
 % ================================================================
-% Chapter —— Surface Boundary Condition (SBC, SAS, ISF, ICB) 
+% Chapter —— Surface Boundary Condition (SBC, SAS, ISF, ICB)
 % ================================================================
 \chapter{Surface Boundary Condition (SBC, SAS, ISF, ICB)}
 \label{chap:SBC}
-\minitoc
+\chaptertoc
 
 \newpage
@@ -33,5 +33,5 @@
 
 Four different ways are available to provide the seven fields to the ocean. They are controlled by
-namelist \ngn{namsbc} variables:
+namelist \nam{sbc} variables:
 
 \begin{itemize}
@@ -46,5 +46,4 @@
   a user defined formulation (\np{ln\_usr}\forcode{ = .true.}).
 \end{itemize}
-
 
 The frequency at which the forcing fields have to be updated is given by the \np{nn\_fsbc} namelist parameter.
@@ -88,7 +87,7 @@
   a neutral drag coefficient is read from an external wave model (\np{ln\_cdgw}\forcode{ = .true.}),
 \item
-  the Stokes drift from an external wave model is accounted for (\np{ln\_sdw}\forcode{ = .true.}), 
-\item
-  the choice of the Stokes drift profile parameterization (\np{nn\_sdrift}\forcode{ = 0..2}), 
+  the Stokes drift from an external wave model is accounted for (\np{ln\_sdw}\forcode{ = .true.}),
+\item
+  the choice of the Stokes drift profile parameterization (\np{nn\_sdrift}\forcode{ = 0..2}),
 \item
   the surface stress given to the ocean is modified by surface waves (\np{ln\_tauwoc}\forcode{ = .true.}),
@@ -98,7 +97,7 @@
   the Stokes-Coriolis term is included (\np{ln\_stcor}\forcode{ = .true.}),
 \item
-  the light penetration in the ocean (\np{ln\_traqsr}\forcode{ = .true.} with namelist \ngn{namtra\_qsr}),
-\item
-  the atmospheric surface pressure gradient effect on ocean and ice dynamics (\np{ln\_apr\_dyn}\forcode{ = .true.} with namelist \ngn{namsbc\_apr}),
+  the light penetration in the ocean (\np{ln\_traqsr}\forcode{ = .true.} with namelist \nam{tra\_qsr}),
+\item
+  the atmospheric surface pressure gradient effect on ocean and ice dynamics (\np{ln\_apr\_dyn}\forcode{ = .true.} with namelist \nam{sbc\_apr}),
 \item
   the effect of sea-ice pressure on the ocean (\np{ln\_ice\_embd}\forcode{ = .true.}).
@@ -106,11 +105,11 @@
 
 In this chapter, we first discuss where the surface boundary conditions appear in the model equations.
-Then we present the three ways of providing the surface boundary conditions, 
-followed by the description of the atmospheric pressure and the river runoff. 
+Then we present the three ways of providing the surface boundary conditions,
+followed by the description of the atmospheric pressure and the river runoff.
 Next, the scheme for interpolation on the fly is described.
 Finally, the different options that further modify the fluxes applied to the ocean are discussed.
 One of these is modification by icebergs (see \autoref{sec: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}), 
+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.
 
@@ -127,10 +126,10 @@
 the momentum vertical mixing trend (see \autoref{eq:dynzdf_sbc} in \autoref{sec:DYN_zdf}).
 As such, it has to be provided as a 2D vector interpolated onto the horizontal velocity ocean mesh,
-\ie resolved onto the model (\textbf{i},\textbf{j}) direction at $u$- and $v$-points.
+\ie\ resolved onto the model (\textbf{i},\textbf{j}) direction at $u$- and $v$-points.
 
 The surface heat flux is decomposed into two parts, a non solar and a solar heat flux,
 $Q_{ns}$ and $Q_{sr}$, respectively.
 The former is the non penetrative part of the heat flux
-(\ie the sum of sensible, latent and long wave heat fluxes plus
+(\ie\ the sum of sensible, latent and long wave heat fluxes plus
 the heat content of the mass exchange between the ocean and sea-ice).
 It is applied in \mdl{trasbc} module as a surface boundary condition trend of
@@ -141,5 +140,5 @@
 \np{ln\_traqsr}\forcode{ = .true.}.
 The way the light penetrates inside the water column is generally a sum of decreasing exponentials
-(see \autoref{subsec:TRA_qsr}). 
+(see \autoref{subsec:TRA_qsr}).
 
 The surface freshwater budget is provided by the \textit{emp} field.
@@ -148,5 +147,5 @@
 It affects the ocean in two different ways:
 $(i)$  it changes the volume of the ocean, and therefore appears in the sea surface height equation as		%GS: autoref ssh equation to be added
-a volume flux, and 
+a volume flux, and
 $(ii)$ it changes the surface temperature and salinity through the heat and salt contents of
 the mass exchanged with atmosphere, sea-ice and ice shelves.
@@ -155,21 +154,21 @@
 %\colorbox{yellow}{Miss: }
 %
-%A extensive description of all namsbc namelist (parameter that have to be 
+%A extensive description of all namsbc namelist (parameter that have to be
 %created!)
 %
-%Especially the \np{nn\_fsbc}, the \mdl{sbc\_oce} module (fluxes + mean sst sss ssu 
-%ssv) \ie information required by flux computation or sea-ice
+%Especially the \np{nn\_fsbc}, the \mdl{sbc\_oce} module (fluxes + mean sst sss ssu
+%ssv) \ie\ information required by flux computation or sea-ice
 %
-%\mdl{sbc\_oce} containt the definition in memory of the 7 fields (6+runoff), add 
+%\mdl{sbc\_oce} containt the definition in memory of the 7 fields (6+runoff), add
 %a word on runoff: included in surface bc or add as lateral obc{\ldots}.
 %
 %Sbcmod manage the ``providing'' (fourniture) to the ocean the 7 fields
 %
-%Fluxes update only each nf{\_}sbc time step (namsbc) explain relation 
-%between nf{\_}sbc and nf{\_}ice, do we define nf{\_}blk??? ? only one 
-%nf{\_}sbc
+%Fluxes update only each nf\_sbc time step (namsbc) explain relation
+%between nf\_sbc and nf\_ice, do we define nf\_blk??? ? only one
+%nf\_sbc
 %
 %Explain here all the namlist namsbc variable{\ldots}.
-% 
+%
 % explain : use or not of surface currents
 %
@@ -177,5 +176,5 @@
 
 The ocean model provides, at each time step, to the surface module (\mdl{sbcmod})
-the surface currents, temperature and salinity.  
+the surface currents, temperature and salinity.
 These variables are averaged over \np{nn\_fsbc} time-step (\autoref{tab:ssm}), and
 these averaged fields are used to compute the surface fluxes at the frequency of \np{nn\_fsbc} time-steps.
@@ -197,5 +196,5 @@
       Ocean variables provided by the ocean to the surface module (SBC).
       The variable are averaged over \np{nn\_fsbc} time-step,
-      \ie the frequency of computation of surface fluxes.
+      \ie\ the frequency of computation of surface fluxes.
     }
   \end{center}
@@ -203,10 +202,10 @@
 %--------------------------------------------------------------------------------------------------------------
 
-%\colorbox{yellow}{Penser a} mettre dans le restant l'info nn{\_}fsbc ET nn{\_}fsbc*rdt de sorte de reinitialiser la moyenne si on change la frequence ou le pdt
-
-
-
-% ================================================================
-%       Input Data 
+%\colorbox{yellow}{Penser a} mettre dans le restant l'info nn\_fsbc ET nn\_fsbc*rdt de sorte de reinitialiser la moyenne si on change la frequence ou le pdt
+
+
+
+% ================================================================
+%       Input Data
 % ================================================================
 \section{Input data generic interface}
@@ -216,5 +215,5 @@
 (2D or 3D fields, like surface forcing or ocean T and S) are specified in \NEMO.
 This task is achieved by \mdl{fldread}.
-The module is designed with four main objectives in mind: 
+The module is designed with four main objectives in mind:
 \begin{enumerate}
 \item
@@ -227,5 +226,5 @@
 \item
   provide a simple user interface and a rather simple developer interface by
-  limiting the number of prerequisite informations. 
+  limiting the number of prerequisite informations.
 \end{enumerate}
 
@@ -238,5 +237,5 @@
 and simply call \rou{fld\_read} to obtain the desired input field at the model time-step and grid points.
 
-The only constraints are that the input file is a NetCDF file, the file name follows a nomenclature 
+The only constraints are that the input file is a NetCDF file, the file name follows a nomenclature
 (see \autoref{subsec:SBC_fldread}), the period it cover is one year, month, week or day, and,
 if on-the-fly interpolation is used, a file of weights must be supplied (see \autoref{subsec:SBC_iof}).
@@ -256,14 +255,14 @@
 The structure associated with an input variable contains the following information:
 \begin{forlines}
-!  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
+!  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
 !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
 \end{forlines}
-where 
-\begin{description}  
+where
+\begin{description}
 \item[File name]:
   the stem name of the NetCDF file to be opened.
   This stem will be completed automatically by the model, with the addition of a '.nc' at its end and
   by date information and possibly a prefix (when using AGRIF).
-  Tab.\autoref{tab:fldread} provides the resulting file name in all possible cases according to
+  \autoref{tab:fldread} provides the resulting file name in all possible cases according to
   whether it is a climatological file or not, and to the open/close frequency (see below for definition).
 
@@ -283,5 +282,5 @@
       The stem name is assumed to be 'fn'.
       For weekly files, the 'LLL' corresponds to the first three letters of the first day of the week
-      (\ie 'sun','sat','fri','thu','wed','tue','mon').
+      (\ie\ 'sun','sat','fri','thu','wed','tue','mon').
       The 'YYYY', 'MM' and 'DD' should be replaced by the actual year/month/day, always coded with 4 or 2 digits.
       Note that (1) in mpp, if the file is split over each subdomain, the suffix '.nc' is replaced by '\_PPPP.nc',
@@ -291,5 +290,5 @@
   \end{table}
 %--------------------------------------------------------------------------------------------------------------
-  
+
 
 \item[Record frequency]:
@@ -311,5 +310,5 @@
   Records are assumed to be dated at the middle of the forcing period.
   For example, when using a daily forcing with time interpolation,
-  linear interpolation will be performed between mid-day of two consecutive days. 
+  linear interpolation will be performed between mid-day of two consecutive days.
 
 \item[Climatological forcing]:
@@ -317,5 +316,5 @@
   or an interannual forcing which will requires additional files if
   the period covered by the simulation exceeds the one of the file.
-  See the above file naming strategy which impacts the expected name of the file to be opened. 
+  See the above file naming strategy which impacts the expected name of the file to be opened.
 
 \item[Open/close frequency]:
@@ -345,5 +344,5 @@
 For example with \np{nn\_fsbc}\forcode{ = 3}, the surface module will be called at time-steps 1, 4, 7, etc.
 The date used for the time interpolation is thus redefined to the middle of \np{nn\_fsbc} time-step period.
-In the previous example, this leads to: 1h30'00", 4h30'00", 7h30'00", etc. \\ 
+In the previous example, this leads to: 1h30'00", 4h30'00", 7h30'00", etc. \\
 (2) For code readablility and maintenance issues, we don't take into account the NetCDF input file calendar.
 The calendar associated with the forcing field is build according to the information provided by
@@ -353,5 +352,5 @@
 (3) If a time interpolation is requested, the code will pick up the needed data in the previous (next) file when
 interpolating data with the first (last) record of the open/close period.
-For example, if the input file specifications are ''yearly, containing daily data to be interpolated in time'', 
+For example, if the input file specifications are ''yearly, containing daily data to be interpolated in time'',
 the values given by the code between 00h00'00" and 11h59'59" on Jan 1st will be interpolated values between
 Dec 31st 12h00'00" and Jan 1st 12h00'00".
@@ -365,5 +364,5 @@
 we do accept that the file related to year Y-1 is not existing.
 The value of Jan 1st will be used as the missing one for Dec 31st of year Y-1.
-If the file of year Y-1 exists, the code will read its last record. 
+If the file of year Y-1 exists, the code will read its last record.
 Therefore, this file can contain only one record corresponding to Dec 31st,
 a useful feature for user considering that it is too heavy to manipulate the complete file for year Y-1.
@@ -488,5 +487,5 @@
 \label{subsec:SBC_iof_lim}
 
-\begin{enumerate}  
+\begin{enumerate}
 \item
   The case where input data grids are not logically rectangular (irregular grid case) has not been tested.
@@ -524,5 +523,5 @@
 
 In some circumstances, it may be useful to avoid calculating the 3D temperature,
-salinity and velocity fields and simply read them in from a previous run or receive them from OASIS.  
+salinity and velocity fields and simply read them in from a previous run or receive them from OASIS.
 For example:
 
@@ -542,7 +541,7 @@
 
 The Standalone Surface scheme provides this capacity.
-Its options are defined through the \ngn{namsbc\_sas} namelist variables.
+Its options are defined through the \nam{sbc\_sas} namelist variables.
 A new copy of the model has to be compiled with a configuration based on ORCA2\_SAS\_LIM.
-However, no namelist parameters need be changed from the settings of the previous run (except perhaps nn{\_}date0).
+However, no namelist parameters need be changed from the settings of the previous run (except perhaps nn\_date0).
 In this configuration, a few routines in the standard model are overriden by new versions.
 Routines replaced are:
@@ -560,5 +559,5 @@
   This has been cut down and now only calculates surface forcing and the ice model required.
   New surface modules that can function when only the surface level of the ocean state is defined can also be added
-  (\eg icebergs).
+  (\eg\ icebergs).
 \item
   \mdl{daymod}:
@@ -566,5 +565,5 @@
   so calls to restart functions have been removed.
   This also means that the calendar cannot be controlled by time in a restart file,
-  so the user must check that nn{\_}date0 in the model namelist is correct for his or her purposes.
+  so the user must check that nn\_date0 in the model namelist is correct for his or her purposes.
 \item
   \mdl{stpctl}:
@@ -584,5 +583,5 @@
   This module initialises the input files needed for reading temperature, salinity and
   velocity arrays at the surface.
-  These filenames are supplied in namelist namsbc{\_}sas.
+  These filenames are supplied in namelist namsbc\_sas.
   Unfortunately, because of limitations with the \mdl{iom} module,
   the full 3D fields from the mean files have to be read in and interpolated in time,
@@ -592,5 +591,5 @@
 
 
-The user can also choose in the \ngn{namsbc\_sas} namelist to read the mean (nn\_fsbc time-step) fraction of solar net radiation absorbed in the 1st T level using
+The user can also choose in the \nam{sbc\_sas} namelist to read the mean (nn\_fsbc time-step) fraction of solar net radiation absorbed in the 1st T level using
  (\np{ln\_flx}\forcode{ = .true.}) and to provide 3D oceanic velocities instead of 2D ones (\np{ln\_flx}\forcode{ = .true.}). In that last case, only the 1st level will be read in.
 
@@ -598,5 +597,5 @@
 
 % ================================================================
-% Flux formulation 
+% Flux formulation
 % ================================================================
 \section[Flux formulation (\textit{sbcflx.F90})]
@@ -605,10 +604,10 @@
 %------------------------------------------namsbc_flx----------------------------------------------------
 
-\nlst{namsbc_flx} 
+\nlst{namsbc_flx}
 %-------------------------------------------------------------------------------------------------------------
 
 In the flux formulation (\np{ln\_flx}\forcode{ = .true.}),
 the surface boundary condition fields are directly read from input files.
-The user has to define in the namelist \ngn{namsbc{\_}flx} the name of the file,
+The user has to define in the namelist \nam{sbc\_flx} the name of the file,
 the name of the variable read in the file, the time frequency at which it is given (in hours),
 and a logical setting whether a time interpolation to the model time step is required for this field.
@@ -631,5 +630,5 @@
 %--------------------------------------------------------------------------------------------------------------
 
-In the bulk formulation, the surface boundary condition fields are computed with bulk formulae using atmospheric fields 
+In the bulk formulation, the surface boundary condition fields are computed with bulk formulae using atmospheric fields
 and ocean (and sea-ice) variables averaged over \np{nn\_fsbc} time-step.
 
@@ -637,6 +636,6 @@
 In forced mode, when a sea-ice model is used, a specific bulk formulation is used.
 Therefore, different bulk formulae are used for the turbulent fluxes computation
-over the ocean and over sea-ice surface. 
-For the ocean, four bulk formulations are available thanks to the \href{https://brodeau.github.io/aerobulk/}{Aerobulk} package (\citet{brodeau.barnier.ea_JPO16}): 
+over the ocean and over sea-ice surface.
+For the ocean, four bulk formulations are available thanks to the \href{https://brodeau.github.io/aerobulk/}{Aerobulk} package (\citet{brodeau.barnier.ea_JPO16}):
 the NCAR (formerly named CORE), COARE 3.0, COARE 3.5 and ECMWF bulk formulae.
 The choice is made by setting to true one of the following namelist variable:
@@ -645,5 +644,5 @@
 a constant transfer coefficient (1.4e-3; default value), \citet{lupkes.gryanik.ea_JGR12} (\np{ln\_Cd\_L12}), and \citet{lupkes.gryanik_JGR15} (\np{ln\_Cd\_L15}) parameterizations
 
-Common options are defined through the \ngn{namsbc\_blk} namelist variables.
+Common options are defined through the \nam{sbc\_blk} namelist variables.
 The required 9 input fields are:
 
@@ -675,5 +674,5 @@
 The \np{sn\_wndi}, \np{sn\_wndj}, \np{sn\_qsr}, \np{sn\_qlw}, \np{sn\_tair}, \np{sn\_humi}, \np{sn\_prec},
 \np{sn\_snow}, \np{sn\_tdif} parameters describe the fields and the way they have to be used
-(spatial and temporal interpolations). 
+(spatial and temporal interpolations).
 
 \np{cn\_dir} is the directory of location of bulk files
@@ -682,5 +681,5 @@
 \np{rn\_zu}: is the height of wind measurements (m)
 
-Three multiplicative factors are available: 
+Three multiplicative factors are available:
 \np{rn\_pfac} and \np{rn\_efac} allow to adjust (if necessary) the global freshwater budget by
 increasing/reducing the precipitations (total and snow) and or evaporation, respectively.
@@ -690,5 +689,5 @@
 
 As for the flux formulation, information about the input data required by the model is provided in
-the namsbc\_blk namelist (see \autoref{subsec:SBC_fldread}). 
+the namsbc\_blk namelist (see \autoref{subsec:SBC_fldread}).
 
 
@@ -696,10 +695,12 @@
 %        Ocean-Atmosphere Bulk formulae
 % -------------------------------------------------------------------------------------------------------------
-\subsection{Ocean-Atmosphere Bulk formulae}
-%\subsection[Ocean-Atmosphere Bulk formulae (\textit{sbcblk_algo\{\_ncar,\_coare,\_coare3p5,\_ecmwf}.F90})]
+\subsection[Ocean-Atmosphere Bulk formulae (\textit{sbcblk\_algo\_coare.F90, sbcblk\_algo\_coare3p5.F90,
+sbcblk\_algo\_ecmwf.F90, sbcblk\_algo\_ncar.F90})]
+{Ocean-Atmosphere Bulk formulae (\mdl{sbcblk\_algo\_coare}, \mdl{sbcblk\_algo\_coare3p5},
+\mdl{sbcblk\_algo\_ecmwf}, \mdl{sbcblk\_algo\_ncar})}
 \label{subsec:SBC_blk_ocean}
 
 Four different bulk algorithms are available to compute surface turbulent momentum and heat fluxes over the ocean.
-COARE 3.0, COARE 3.5 and ECMWF schemes mainly differ by their roughness lenghts computation and consequently 
+COARE 3.0, COARE 3.5 and ECMWF schemes mainly differ by their roughness lenghts computation and consequently
 their neutral transfer coefficients relationships with neutral wind.
 \begin{itemize}
@@ -715,20 +716,19 @@
   This is the so-called DRAKKAR Forcing Set (DFS) \citep{brodeau.barnier.ea_OM10}.
 \item
-  COARE 3.0 (\np{ln\_COARE\_3p0}\forcode{ = .true.}): 
+  COARE 3.0 (\np{ln\_COARE\_3p0}\forcode{ = .true.}):
   See \citet{fairall.bradley.ea_JC03} for more details
 \item
-  COARE 3.5 (\np{ln\_COARE\_3p5}\forcode{ = .true.}): 
+  COARE 3.5 (\np{ln\_COARE\_3p5}\forcode{ = .true.}):
   See \citet{edson.jampana.ea_JPO13} for more details
 \item
-  ECMWF (\np{ln\_ECMWF}\forcode{ = .true.}): 
+  ECMWF (\np{ln\_ECMWF}\forcode{ = .true.}):
   Based on \href{https://www.ecmwf.int/node/9221}{IFS (Cy31)} implementation and documentation.
   Surface roughness lengths needed for the Obukhov length are computed following \citet{beljaars_QJRMS95}.
 \end{itemize}
 
-
 % -------------------------------------------------------------------------------------------------------------
 %        Ice-Atmosphere Bulk formulae
 % -------------------------------------------------------------------------------------------------------------
-\subsection{ Ice-Atmosphere Bulk formulae }
+\subsection{Ice-Atmosphere Bulk formulae}
 \label{subsec:SBC_blk_ice}
 
@@ -742,5 +742,5 @@
   \citet{lupkes.gryanik.ea_JGR12} (\np{ln\_Cd\_L12}\forcode{ = .true.}):
   This scheme adds a dependency on edges at leads, melt ponds and flows
-  of the constant neutral air-ice drag. After some approximations, 
+  of the constant neutral air-ice drag. After some approximations,
   this can be resumed to a dependency on ice concentration (A).
   This drag coefficient has a parabolic shape (as a function of ice concentration)
@@ -749,6 +749,6 @@
 \item
   \citet{lupkes.gryanik_JGR15} (\np{ln\_Cd\_L15}\forcode{ = .true.}):
-  Alternative turbulent transfer coefficients formulation between sea-ice 
-  and atmosphere with distinct momentum and heat coefficients depending 
+  Alternative turbulent transfer coefficients formulation between sea-ice
+  and atmosphere with distinct momentum and heat coefficients depending
   on sea-ice concentration and atmospheric stability (no melt-ponds effect for now).
   The parameterization is adapted from ECHAM6 atmospheric model.
@@ -768,5 +768,5 @@
 %------------------------------------------namsbc_cpl----------------------------------------------------
 
-\nlst{namsbc_cpl} 
+\nlst{namsbc_cpl}
 %-------------------------------------------------------------------------------------------------------------
 
@@ -779,16 +779,16 @@
 It is currently interfaced with OASIS-3-MCT versions 1 to 4 (\key{oasis3}).
 An additional specific CPP key (\key{oa3mct\_v1v2}) is needed for OASIS-3-MCT versions 1 and 2.
-It has been successfully used to interface \NEMO to most of the European atmospheric GCM
+It has been successfully used to interface \NEMO\ to most of the European atmospheric GCM
 (ARPEGE, ECHAM, ECMWF, HadAM, HadGAM, LMDz), as well as to \href{http://wrf-model.org/}{WRF}
 (Weather Research and Forecasting Model).
 
-When PISCES biogeochemical model (\key{top}) is also used in the coupled system, 
+When PISCES biogeochemical model (\key{top}) is also used in the coupled system,
 the whole carbon cycle is computed.
 In this case, CO$_2$ fluxes will be exchanged between the atmosphere and the ice-ocean system
-(and need to be activated in \ngn{namsbc{\_}cpl} ).
+(and need to be activated in \nam{sbc\_cpl} ).
 
 The namelist above allows control of various aspects of the coupling fields (particularly for vectors) and
 now allows for any coupling fields to have multiple sea ice categories (as required by LIM3 and CICE).
-When indicating a multi-category coupling field in \ngn{namsbc{\_}cpl}, the number of categories will be determined by
+When indicating a multi-category coupling field in \nam{sbc\_cpl}, the number of categories will be determined by
 the number used in the sea ice model.
 In some limited cases, it may be possible to specify single category coupling fields even when
@@ -807,10 +807,10 @@
 %------------------------------------------namsbc_apr----------------------------------------------------
 
-\nlst{namsbc_apr} 
+\nlst{namsbc_apr}
 %-------------------------------------------------------------------------------------------------------------
 
 The optional atmospheric pressure can be used to force ocean and ice dynamics
-(\np{ln\_apr\_dyn}\forcode{ = .true.}, \ngn{namsbc} namelist).
-The input atmospheric forcing defined via \np{sn\_apr} structure (\ngn{namsbc\_apr} namelist)
+(\np{ln\_apr\_dyn}\forcode{ = .true.}, \nam{sbc} namelist).
+The input atmospheric forcing defined via \np{sn\_apr} structure (\nam{sbc\_apr} namelist)
 can be interpolated in time to the model time step, and even in space when the interpolation on-the-fly is used.
 When used to force the dynamics, the atmospheric pressure is further transformed into
@@ -823,5 +823,5 @@
 A value of $101,000~N/m^2$ is used unless \np{ln\_ref\_apr} is set to true.
 In this case, $P_o$ is set to the value of $P_{atm}$ averaged over the ocean domain,
-\ie the mean value of $\eta_{ib}$ is kept to zero at all time steps.
+\ie\ the mean value of $\eta_{ib}$ is kept to zero at all time steps.
 
 The gradient of $\eta_{ib}$ is added to the RHS of the ocean momentum equation (see \mdl{dynspg} for the ocean).
@@ -833,5 +833,5 @@
 
 When using time-splitting and BDY package for open boundaries conditions,
-the equivalent inverse barometer sea surface height $\eta_{ib}$ can be added to BDY ssh data: 
+the equivalent inverse barometer sea surface height $\eta_{ib}$ can be added to BDY ssh data:
 \np{ln\_apr\_obc}  might be set to true.
 
@@ -851,5 +851,5 @@
 
 The tidal forcing, generated by the gravity forces of the Earth-Moon and Earth-Sun sytems,
-is activated if \np{ln\_tide} and \np{ln\_tide\_pot} are both set to \forcode{.true.} in \ngn{nam\_tide}.
+is activated if \np{ln\_tide} and \np{ln\_tide\_pot} are both set to \forcode{.true.} in \nam{\_tide}.
 This translates as an additional barotropic force in the momentum equations \ref{eq:PE_dyn} such that:
 \[
@@ -860,13 +860,13 @@
 where $\Pi_{eq}$ stands for the equilibrium tidal forcing and
 $\Pi_{sal}$ is a self-attraction and loading term (SAL).
- 
+
 The equilibrium tidal forcing is expressed as a sum over a subset of
 constituents chosen from the set of available tidal constituents
-defined in file \textit{SBC/tide.h90} (this comprises the tidal
+defined in file \hf{SBC/tide} (this comprises the tidal
 constituents \textit{M2, N2, 2N2, S2, K2, K1, O1, Q1, P1, M4, Mf, Mm,
   Msqm, Mtm, S1, MU2, NU2, L2}, and \textit{T2}). Individual
 constituents are selected by including their names in the array
-\np{clname} in \ngn{nam\_tide} (e.g., \np{clname(1) = 'M2',
-  clname(2)='S2'} to select solely the tidal consituents \textit{M2}
+\np{clname} in \nam{\_tide} (e.g., \np{clname}\forcode{(1) = 'M2', }
+\np{clname}\forcode{(2) = 'S2'} to select solely the tidal consituents \textit{M2}
 and \textit{S2}). Optionally, when \np{ln\_tide\_ramp} is set to
 \forcode{.true.}, the equilibrium tidal forcing can be ramped up
@@ -880,6 +880,6 @@
 computationally too expensive. Here, two options are available:
 $\Pi_{sal}$ generated by an external model can be read in
-(\np{ln\_read\_load=.true.}), or a ``scalar approximation'' can be
-used (\np{ln\_scal\_load=.true.}). In the latter case
+(\np{ln\_read\_load}\forcode{ =.true.}), or a ``scalar approximation'' can be
+used (\np{ln\_scal\_load}\forcode{ =.true.}). In the latter case
 \[
   \Pi_{sal} = \beta \eta,
@@ -900,22 +900,22 @@
 %------------------------------------------namsbc_rnf----------------------------------------------------
 
-\nlst{namsbc_rnf} 
+\nlst{namsbc_rnf}
 %-------------------------------------------------------------------------------------------------------------
 
-%River runoff generally enters the ocean at a nonzero depth rather than through the surface. 
+%River runoff generally enters the ocean at a nonzero depth rather than through the surface.
 %Many models, however, have traditionally inserted river runoff to the top model cell.
-%This was the case in \NEMO prior to the version 3.3. The switch toward a input of runoff 
-%throughout a nonzero depth has been motivated by the numerical and physical problems 
-%that arise when the top grid cells are of the order of one meter. This situation is common in 
-%coastal modelling and becomes more and more often open ocean and climate modelling 
+%This was the case in \NEMO\ prior to the version 3.3. The switch toward a input of runoff
+%throughout a nonzero depth has been motivated by the numerical and physical problems
+%that arise when the top grid cells are of the order of one meter. This situation is common in
+%coastal modelling and becomes more and more often open ocean and climate modelling
 %\footnote{At least a top cells thickness of 1~meter and a 3 hours forcing frequency are
 %required to properly represent the diurnal cycle \citep{bernie.woolnough.ea_JC05}. see also \autoref{fig:SBC_dcy}.}.
 
 
-%To do this we need to treat evaporation/precipitation fluxes and river runoff differently in the 
-%\mdl{tra\_sbc} module.  We decided to separate them throughout the code, so that the variable 
-%\textit{emp} represented solely evaporation minus precipitation fluxes, and a new 2d variable 
-%rnf was added which represents the volume flux of river runoff (in kg/m2s to remain consistent with 
-%emp).  This meant many uses of emp and emps needed to be changed, a list of all modules which use 
+%To do this we need to treat evaporation/precipitation fluxes and river runoff differently in the
+%\mdl{tra\_sbc} module.  We decided to separate them throughout the code, so that the variable
+%\textit{emp} represented solely evaporation minus precipitation fluxes, and a new 2d variable
+%rnf was added which represents the volume flux of river runoff (in kg/m2s to remain consistent with
+%emp).  This meant many uses of emp and emps needed to be changed, a list of all modules which use
 %emp or emps and the changes made are below:
 
@@ -924,9 +924,9 @@
 River runoff generally enters the ocean at a nonzero depth rather than through the surface.
 Many models, however, have traditionally inserted river runoff to the top model cell.
-This was the case in \NEMO prior to the version 3.3,
+This was the case in \NEMO\ prior to the version 3.3,
 and was combined with an option to increase vertical mixing near the river mouth.
 
 However, with this method numerical and physical problems arise when the top grid cells are of the order of one meter.
-This situation is common in coastal modelling and is becoming more common in open ocean and climate modelling 
+This situation is common in coastal modelling and is becoming more common in open ocean and climate modelling
 \footnote{
   At least a top cells thickness of 1~meter and a 3 hours forcing frequency are required to
@@ -939,14 +939,14 @@
 along with the depth (in metres) which the river should be added to.
 
-Namelist variables in \ngn{namsbc\_rnf}, \np{ln\_rnf\_depth}, \np{ln\_rnf\_sal} and
+Namelist variables in \nam{sbc\_rnf}, \np{ln\_rnf\_depth}, \np{ln\_rnf\_sal} and
 \np{ln\_rnf\_temp} control whether the river attributes (depth, salinity and temperature) are read in and used.
 If these are set as false the river is added to the surface box only, assumed to be fresh (0~psu),
 and/or taken as surface temperature respectively.
 
-The runoff value and attributes are read in in sbcrnf.  
+The runoff value and attributes are read in in sbcrnf.
 For temperature -999 is taken as missing data and the river temperature is taken to
 be the surface temperatue at the river point.
-For the depth parameter a value of -1 means the river is added to the surface box only, 
-and a value of -999 means the river is added through the entire water column. 
+For the depth parameter a value of -1 means the river is added to the surface box only,
+and a value of -999 means the river is added through the entire water column.
 After being read in the temperature and salinity variables are multiplied by the amount of runoff
 (converted into m/s) to give the heat and salt content of the river runoff.
@@ -955,5 +955,5 @@
 The variable \textit{h\_dep} is then calculated to be the depth (in metres) of
 the bottom of the lowest box the river water is being added to
-(\ie the total depth that river water is being added to in the model).
+(\ie\ the total depth that river water is being added to in the model).
 
 The mass/volume addition due to the river runoff is, at each relevant depth level, added to
@@ -961,5 +961,5 @@
 This increases the diffusion term in the vicinity of the river, thereby simulating a momentum flux.
 The sea surface height is calculated using the sum of the horizontal divergence terms,
-and so the river runoff indirectly forces an increase in sea surface height. 
+and so the river runoff indirectly forces an increase in sea surface height.
 
 The \textit{hdivn} terms are used in the tracer advection modules to force vertical velocities.
@@ -983,5 +983,5 @@
 This is done in the same way for both vvl and non-vvl.
 The temperature and salinity are increased through the specified depth according to
-the heat and salt content of the river. 
+the heat and salt content of the river.
 
 In the non-linear free surface case (vvl),
@@ -992,11 +992,11 @@
 
 It is also possible for runnoff to be specified as a negative value for modelling flow through straits,
-\ie modelling the Baltic flow in and out of the North Sea.
+\ie\ modelling the Baltic flow in and out of the North Sea.
 When the flow is out of the domain there is no change in temperature and salinity,
 regardless of the namelist options used,
-as the ocean water leaving the domain removes heat and salt (at the same concentration) with it. 
-
-
-%\colorbox{yellow}{Nevertheless, Pb of vertical resolution and 3D input : increase vertical mixing near river mouths to mimic a 3D river 
+as the ocean water leaving the domain removes heat and salt (at the same concentration) with it.
+
+
+%\colorbox{yellow}{Nevertheless, Pb of vertical resolution and 3D input : increase vertical mixing near river mouths to mimic a 3D river
 
 %All river runoff and emp fluxes are assumed to be fresh water (zero salinity) and at the same temperature as the sea surface.}
@@ -1010,6 +1010,6 @@
 %\gmcomment{  word doc of runoffs:
 %
-%In the current \NEMO setup river runoff is added to emp fluxes, these are then applied at just the sea surface as a volume change (in the variable volume case this is a literal volume change, and in the linear free surface case the free surface is moved) and a salt flux due to the concentration/dilution effect.  There is also an option to increase vertical mixing near river mouths; this gives the effect of having a 3d river.  All river runoff and emp fluxes are assumed to be fresh water (zero salinity) and at the same temperature as the sea surface.
-%Our aim was to code the option to specify the temperature and salinity of river runoff, (as well as the amount), along with the depth that the river water will affect.  This would make it possible to model low salinity outflow, such as the Baltic, and would allow the ocean temperature to be affected by river runoff.  
+%In the current \NEMO\ setup river runoff is added to emp fluxes, these are then applied at just the sea surface as a volume change (in the variable volume case this is a literal volume change, and in the linear free surface case the free surface is moved) and a salt flux due to the concentration/dilution effect.  There is also an option to increase vertical mixing near river mouths; this gives the effect of having a 3d river.  All river runoff and emp fluxes are assumed to be fresh water (zero salinity) and at the same temperature as the sea surface.
+%Our aim was to code the option to specify the temperature and salinity of river runoff, (as well as the amount), along with the depth that the river water will affect.  This would make it possible to model low salinity outflow, such as the Baltic, and would allow the ocean temperature to be affected by river runoff.
 
 %The depth option makes it possible to have the river water affecting just the surface layer, throughout depth, or some specified point in between.
@@ -1030,6 +1030,6 @@
 %--------------------------------------------------------------------------------------------------------
 
-The namelist variable in \ngn{namsbc}, \np{nn\_isf}, controls the ice shelf representation.
-Description and result of sensitivity test to \np{nn\_isf} are presented in \citet{mathiot.jenkins.ea_GMD17}. 
+The namelist variable in \nam{sbc}, \np{nn\_isf}, controls the ice shelf representation.
+Description and result of sensitivity test to \np{nn\_isf} are presented in \citet{mathiot.jenkins.ea_GMD17}.
 The different options are illustrated in \autoref{fig:SBC_isf}.
 
@@ -1039,5 +1039,5 @@
   The ice shelf cavity is represented (\np{ln\_isfcav}\forcode{ = .true.} needed).
   The fwf and heat flux are depending of the local water properties.
-  
+
   Two different bulk formulae are available:
 
@@ -1048,9 +1048,9 @@
 	\item[\np{nn\_isfblk}\forcode{ = 2}]:
      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 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}.
 	\end{description}
 
-     Temperature and salinity used to compute the melt are the average temperature in the top boundary layer \citet{losch_JGR08}. 
+     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}.
      The fluxes and friction velocity are computed using the mean temperature, salinity and velocity in the the first \np{rn\_hisf\_tbl} m.
@@ -1060,9 +1060,9 @@
      If \np{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. 
+     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{nn\_gammablk}\forcode{ = 0}]:
-     The salt and heat exchange coefficients are constant and defined by \np{rn\_gammas0} and \np{rn\_gammat0}. 
+     The salt and heat exchange coefficients are constant and defined by \np{rn\_gammas0} and \np{rn\_gammat0}.
 \[
   % \label{eq:sbc_isf_gamma_iso}
@@ -1076,5 +1076,5 @@
      The salt and heat exchange coefficients are velocity dependent and defined as
 \[
-\gamma^{T} = \np{rn\_gammat0} \times u_{*} 
+\gamma^{T} = \np{rn\_gammat0} \times u_{*}
 \]
 \[
@@ -1086,11 +1086,11 @@
      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}} 
+\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} 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).
+     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{nn\_isf}\forcode{ = 2}]:
@@ -1123,5 +1123,5 @@
 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.\\ 
+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.
@@ -1160,5 +1160,5 @@
 \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 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 4.
 \item[Step 5]: go back to 1.
@@ -1178,7 +1178,7 @@
   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]: 
+\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, 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]:
@@ -1197,5 +1197,5 @@
 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 processe.
 This could lead to a trend in heat/salt content and volume.\\
 
@@ -1203,5 +1203,5 @@
 a simple conservation scheme is available with \np{ln\_hsb}\forcode{ = .true.}.
 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} time steps. 
+A correction increment is computed and apply each time step during the next \np{rn\_fiscpl} time steps.
 For safety, it is advised to set \np{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).
@@ -1219,9 +1219,9 @@
 %-------------------------------------------------------------------------------------------------------------
 
-Icebergs are modelled as lagrangian particles in NEMO \citep{marsh.ivchenko.ea_GMD15}.
+Icebergs are modelled as lagrangian particles in \NEMO\ \citep{marsh.ivchenko.ea_GMD15}.
 Their physical behaviour is controlled by equations as described in \citet{martin.adcroft_OM10} ).
-(Note that the authors kindly provided a copy of their code to act as a basis for implementation in NEMO).
+(Note that the authors kindly provided a copy of their code to act as a basis for implementation in \NEMO).
 Icebergs are initially spawned into one of ten classes which have specific mass and thickness as
-described in the \ngn{namberg} namelist: \np{rn\_initial\_mass} and \np{rn\_initial\_thickness}.
+described in the \nam{berg} namelist: \np{rn\_initial\_mass} and \np{rn\_initial\_thickness}.
 Each class has an associated scaling (\np{rn\_mass\_scaling}),
 which is an integer representing how many icebergs of this class are being described as one lagrangian point
@@ -1247,5 +1247,5 @@
   At each time step, a test is performed to see if there is enough ice mass to
   calve an iceberg of each class in order (1 to 10).
-  Note that this is the initial mass multiplied by the number each particle represents (\ie the scaling).
+  Note that this is the initial mass multiplied by the number each particle represents (\ie\ the scaling).
   If there is enough ice, a new iceberg is spawned and the total available ice reduced accordingly.
 \end{description}
@@ -1256,5 +1256,5 @@
 or (if \np{rn\_bits\_erosion\_fraction}~$>$~0) into melt and additionally small ice bits
 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.
+Melt water (and other variables on the configuration grid) are written into the main \NEMO\ model output files.
 
 Extensive diagnostics can be produced.
@@ -1290,21 +1290,21 @@
 %-------------------------------------------------------------------------------------------------------------
 
-Ocean waves represent the interface between the ocean and the atmosphere, so NEMO is extended to incorporate 
-physical processes related to ocean surface waves, namely the surface stress modified by growth and 
-dissipation of the oceanic wave field, the Stokes-Coriolis force and the Stokes drift impact on mass and 
-tracer advection; moreover the neutral surface drag coefficient from a wave model can be used to evaluate 
+Ocean waves represent the interface between the ocean and the atmosphere, so \NEMO\ is extended to incorporate
+physical processes related to ocean surface waves, namely the surface stress modified by growth and
+dissipation of the oceanic wave field, the Stokes-Coriolis force and the Stokes drift impact on mass and
+tracer advection; moreover the neutral surface drag coefficient from a wave model can be used to evaluate
 the wind stress.
 
-Physical processes related to ocean surface waves can be accounted by setting the logical variable 
-\np{ln\_wave} \forcode{= .true.} in \ngn{namsbc} namelist. In addition, specific flags accounting for 
+Physical processes related to ocean surface waves can be accounted by setting the logical variable
+\np{ln\_wave}\forcode{ = .true.} in \nam{sbc} namelist. In addition, specific flags accounting for
 different processes should be activated as explained in the following sections.
 
 Wave fields can be provided either in forced or coupled mode:
 \begin{description}
-\item[forced mode]: wave fields should be defined through the \ngn{namsbc\_wave} namelist 
-for external data names, locations, frequency, interpolation and all the miscellanous options allowed by 
-Input Data generic Interface (see \autoref{sec:SBC_input}). 
-\item[coupled mode]: NEMO and an external wave model can be coupled by setting \np{ln\_cpl} \forcode{= .true.} 
-in \ngn{namsbc} namelist and filling the \ngn{namsbc\_cpl} namelist.
+\item[forced mode]: wave fields should be defined through the \nam{sbc\_wave} namelist
+for external data names, locations, frequency, interpolation and all the miscellanous options allowed by
+Input Data generic Interface (see \autoref{sec:SBC_input}).
+\item[coupled mode]: \NEMO\ and an external wave model can be coupled by setting \np{ln\_cpl} \forcode{= .true.}
+in \nam{sbc} namelist and filling the \nam{sbc\_cpl} namelist.
 \end{description}
 
@@ -1318,9 +1318,9 @@
 \label{subsec:SBC_wave_cdgw}
 
-The neutral surface drag coefficient provided from an external data source (\ie a wave model), 
-can be used by setting the logical variable \np{ln\_cdgw} \forcode{= .true.} in \ngn{namsbc} namelist. 
-Then using the routine \rou{sbcblk\_algo\_ncar} and starting from the neutral drag coefficent provided, 
-the drag coefficient is computed according to the stable/unstable conditions of the 
-air-sea interface following \citet{large.yeager_rpt04}. 
+The neutral surface drag coefficient provided from an external data source (\ie\ a wave model),
+can be used by setting the logical variable \np{ln\_cdgw} \forcode{= .true.} in \nam{sbc} namelist.
+Then using the routine \rou{sbcblk\_algo\_ncar} and starting from the neutral drag coefficent provided,
+the drag coefficient is computed according to the stable/unstable conditions of the
+air-sea interface following \citet{large.yeager_rpt04}.
 
 
@@ -1332,13 +1332,13 @@
 \label{subsec:SBC_wave_sdw}
 
-The Stokes drift is a wave driven mechanism of mass and momentum transport \citep{stokes_ibk09}. 
-It is defined as the difference between the average velocity of a fluid parcel (Lagrangian velocity) 
-and the current measured at a fixed point (Eulerian velocity). 
-As waves travel, the water particles that make up the waves travel in orbital motions but 
-without a closed path. Their movement is enhanced at the top of the orbit and slowed slightly 
-at the bottom, so the result is a net forward motion of water particles, referred to as the Stokes drift. 
-An accurate evaluation of the Stokes drift and the inclusion of related processes may lead to improved 
+The Stokes drift is a wave driven mechanism of mass and momentum transport \citep{stokes_ibk09}.
+It is defined as the difference between the average velocity of a fluid parcel (Lagrangian velocity)
+and the current measured at a fixed point (Eulerian velocity).
+As waves travel, the water particles that make up the waves travel in orbital motions but
+without a closed path. Their movement is enhanced at the top of the orbit and slowed slightly
+at the bottom, so the result is a net forward motion of water particles, referred to as the Stokes drift.
+An accurate evaluation of the Stokes drift and the inclusion of related processes may lead to improved
 representation of surface physics in ocean general circulation models. %GS: reference needed
-The Stokes drift velocity $\mathbf{U}_{st}$ in deep water can be computed from the wave spectrum and may be written as: 
+The Stokes drift velocity $\mathbf{U}_{st}$ in deep water can be computed from the wave spectrum and may be written as:
 
 \[
@@ -1349,25 +1349,25 @@
 \]
 
-where: ${\theta}$ is the wave direction, $f$ is the wave intrinsic frequency, 
-$\mathrm{S}($f$,\theta)$ is the 2D frequency-direction spectrum, 
-$k$ is the mean wavenumber defined as: 
+where: ${\theta}$ is the wave direction, $f$ is the wave intrinsic frequency,
+$\mathrm{S}($f$,\theta)$ is the 2D frequency-direction spectrum,
+$k$ is the mean wavenumber defined as:
 $k=\frac{2\pi}{\lambda}$ (being $\lambda$ the wavelength). \\
 
-In order to evaluate the Stokes drift in a realistic ocean wave field, the wave spectral shape is required 
-and its computation quickly becomes expensive as the 2D spectrum must be integrated for each vertical level. 
+In order to evaluate the Stokes drift in a realistic ocean wave field, the wave spectral shape is required
+and its computation quickly becomes expensive as the 2D spectrum must be integrated for each vertical level.
 To simplify, it is customary to use approximations to the full Stokes profile.
-Three possible parameterizations for the calculation for the approximate Stokes drift velocity profile 
-are included in the code through the \np{nn\_sdrift} parameter once provided the surface Stokes drift 
-$\mathbf{U}_{st |_{z=0}}$ which is evaluated by an external wave model that accurately reproduces the wave spectra 
-and makes possible the estimation of the surface Stokes drift for random directional waves in 
+Three possible parameterizations for the calculation for the approximate Stokes drift velocity profile
+are included in the code through the \np{nn\_sdrift} parameter once provided the surface Stokes drift
+$\mathbf{U}_{st |_{z=0}}$ which is evaluated by an external wave model that accurately reproduces the wave spectra
+and makes possible the estimation of the surface Stokes drift for random directional waves in
 realistic wave conditions:
 
 \begin{description}
-\item[\np{nn\_sdrift} = 0]: exponential integral profile parameterization proposed by 
+\item[\np{nn\_sdrift} = 0]: exponential integral profile parameterization proposed by
 \citet{breivik.janssen.ea_JPO14}:
 
 \[
   % \label{eq:sbc_wave_sdw_0a}
-  \mathbf{U}_{st} \cong \mathbf{U}_{st |_{z=0}} \frac{\mathrm{e}^{-2k_ez}} {1-8k_ez} 
+  \mathbf{U}_{st} \cong \mathbf{U}_{st |_{z=0}} \frac{\mathrm{e}^{-2k_ez}} {1-8k_ez}
 \]
 
@@ -1378,10 +1378,10 @@
   k_e = \frac{|\mathbf{U}_{\left.st\right|_{z=0}}|} {|T_{st}|}
   \quad \text{and }\
-  T_{st} = \frac{1}{16} \bar{\omega} H_s^2 
+  T_{st} = \frac{1}{16} \bar{\omega} H_s^2
 \]
 
 where $H_s$ is the significant wave height and $\omega$ is the wave frequency.
 
-\item[\np{nn\_sdrift} = 1]: velocity profile based on the Phillips spectrum which is considered to be a 
+\item[\np{nn\_sdrift} = 1]: velocity profile based on the Phillips spectrum which is considered to be a
 reasonable estimate of the part of the spectrum mostly contributing to the Stokes drift velocity near the surface
 \citep{breivik.bidlot.ea_OM16}:
@@ -1395,11 +1395,11 @@
 where $erf$ is the complementary error function and $k_p$ is the peak wavenumber.
 
-\item[\np{nn\_sdrift} = 2]: velocity profile based on the Phillips spectrum as for \np{nn\_sdrift} = 1 
+\item[\np{nn\_sdrift} = 2]: velocity profile based on the Phillips spectrum as for \np{nn\_sdrift} = 1
 but using the wave frequency from a wave model.
 
 \end{description}
 
-The Stokes drift enters the wave-averaged momentum equation, as well as the tracer advection equations 
-and its effect on the evolution of the sea-surface height ${\eta}$ is considered as follows: 
+The Stokes drift enters the wave-averaged momentum equation, as well as the tracer advection equations
+and its effect on the evolution of the sea-surface height ${\eta}$ is considered as follows:
 
 \[
@@ -1409,9 +1409,9 @@
 \]
 
-The tracer advection equation is also modified in order for Eulerian ocean models to properly account 
-for unresolved wave effect. The divergence of the wave tracer flux equals the mean tracer advection 
-that is induced by the three-dimensional Stokes velocity. 
-The advective equation for a tracer $c$ combining the effects of the mean current and sea surface waves 
-can be formulated as follows: 
+The tracer advection equation is also modified in order for Eulerian ocean models to properly account
+for unresolved wave effect. The divergence of the wave tracer flux equals the mean tracer advection
+that is induced by the three-dimensional Stokes velocity.
+The advective equation for a tracer $c$ combining the effects of the mean current and sea surface waves
+can be formulated as follows:
 
 \[
@@ -1429,9 +1429,9 @@
 \label{subsec:SBC_wave_stcor}
 
-In a rotating ocean, waves exert a wave-induced stress on the mean ocean circulation which results 
-in a force equal to $\mathbf{U}_{st}$×$f$, where $f$ is the Coriolis parameter. 
-This additional force may have impact on the Ekman turning of the surface current. 
-In order to include this term, once evaluated the Stokes drift (using one of the 3 possible 
-approximations described in \autoref{subsec:SBC_wave_sdw}), 
+In a rotating ocean, waves exert a wave-induced stress on the mean ocean circulation which results
+in a force equal to $\mathbf{U}_{st}$×$f$, where $f$ is the Coriolis parameter.
+This additional force may have impact on the Ekman turning of the surface current.
+In order to include this term, once evaluated the Stokes drift (using one of the 3 possible
+approximations described in \autoref{subsec:SBC_wave_sdw}),
 \np{ln\_stcor}\forcode{ = .true.} has to be set.
 
@@ -1444,11 +1444,11 @@
 \label{subsec:SBC_wave_tauw}
 
-The surface stress felt by the ocean is the atmospheric stress minus the net stress going 
-into the waves \citep{janssen.breivik.ea_rpt13}. Therefore, when waves are growing, momentum and energy is spent and is not 
-available for forcing the mean circulation, while in the opposite case of a decaying sea 
-state, more momentum is available for forcing the ocean. 
-Only when the sea state is in equilibrium, the ocean is forced by the atmospheric stress, 
-but in practice, an equilibrium sea state is a fairly rare event. 
-So the atmospheric stress felt by the ocean circulation $\tau_{oc,a}$ can be expressed as: 
+The surface stress felt by the ocean is the atmospheric stress minus the net stress going
+into the waves \citep{janssen.breivik.ea_rpt13}. Therefore, when waves are growing, momentum and energy is spent and is not
+available for forcing the mean circulation, while in the opposite case of a decaying sea
+state, more momentum is available for forcing the ocean.
+Only when the sea state is in equilibrium, the ocean is forced by the atmospheric stress,
+but in practice, an equilibrium sea state is a fairly rare event.
+So the atmospheric stress felt by the ocean circulation $\tau_{oc,a}$ can be expressed as:
 
 \[
@@ -1466,14 +1466,14 @@
 
 where: $c_p$ is the phase speed of the gravity waves,
-$S_{in}$, $S_{nl}$ and $S_{diss}$ are three source terms that represent 
-the physics of ocean waves. The first one, $S_{in}$, describes the generation 
-of ocean waves by wind and therefore represents the momentum and energy transfer 
-from air to ocean waves; the second term $S_{nl}$ denotes 
-the nonlinear transfer by resonant four-wave interactions; while the third term $S_{diss}$ 
-describes the dissipation of waves by processes such as white-capping, large scale breaking 
+$S_{in}$, $S_{nl}$ and $S_{diss}$ are three source terms that represent
+the physics of ocean waves. The first one, $S_{in}$, describes the generation
+of ocean waves by wind and therefore represents the momentum and energy transfer
+from air to ocean waves; the second term $S_{nl}$ denotes
+the nonlinear transfer by resonant four-wave interactions; while the third term $S_{diss}$
+describes the dissipation of waves by processes such as white-capping, large scale breaking
 eddy-induced damping.
 
-The wave stress derived from an external wave model can be provided either through the normalized 
-wave stress into the ocean by setting \np{ln\_tauwoc}\forcode{ = .true.}, or through the zonal and 
+The wave stress derived from an external wave model can be provided either through the normalized
+wave stress into the ocean by setting \np{ln\_tauwoc}\forcode{ = .true.}, or through the zonal and
 meridional stress components by setting \np{ln\_tauw}\forcode{ = .true.}.
 
@@ -1495,5 +1495,5 @@
 %------------------------------------------namsbc-------------------------------------------------------------
 %
-\nlst{namsbc} 
+\nlst{namsbc}
 %-------------------------------------------------------------------------------------------------------------
 
@@ -1520,6 +1520,6 @@
 as higher frequency variations can be reconstructed from them,
 assuming that the diurnal cycle of SWF is a scaling of the top of the atmosphere diurnal cycle of incident SWF.
-The \cite{bernie.guilyardi.ea_CD07} reconstruction algorithm is available in \NEMO by
-setting \np{ln\_dm2dc}\forcode{ = .true.} (a \textit{\ngn{namsbc}} namelist variable) when
+The \cite{bernie.guilyardi.ea_CD07} reconstruction algorithm is available in \NEMO\ by
+setting \np{ln\_dm2dc}\forcode{ = .true.} (a \textit{\nam{sbc}} namelist variable) when
 using a bulk formulation (\np{ln\_blk}\forcode{ = .true.}) or
 the flux formulation (\np{ln\_flx}\forcode{ = .true.}).
@@ -1529,5 +1529,5 @@
 a given time step is the mean value of the analytical cycle over this time step (\autoref{fig:SBC_diurnal}).
 The use of diurnal cycle reconstruction requires the input SWF to be daily
-(\ie a frequency of 24 hours and a time interpolation set to true in \np{sn\_qsr} namelist parameter).
+(\ie\ a frequency of 24 hours and a time interpolation set to true in \np{sn\_qsr} namelist parameter).
 Furthermore, it is recommended to have a least 8 surface module time steps per day,
 that is  $\rdt \ nn\_fsbc < 10,800~s = 3~h$.
@@ -1565,5 +1565,5 @@
 be defined relative to a rectilinear grid.
 To activate this option, a non-empty string is supplied in the rotation pair column of the relevant namelist.
-The eastward component must start with "U" and the northward component with "V".  
+The eastward component must start with "U" and the northward component with "V".
 The remaining characters in the strings are used to identify which pair of components go together.
 So for example, strings "U1" and "V1" next to "utau" and "vtau" would pair the wind stress components together and
@@ -1582,8 +1582,8 @@
 %------------------------------------------namsbc_ssr----------------------------------------------------
 
-\nlst{namsbc_ssr} 
+\nlst{namsbc_ssr}
 %-------------------------------------------------------------------------------------------------------------
 
-Options are defined through the \ngn{namsbc\_ssr} namelist variables.
+Options are defined through the \nam{sbc\_ssr} namelist variables.
 On forced mode using a flux formulation (\np{ln\_flx}\forcode{ = .true.}),
 a feedback term \emph{must} be added to the surface heat flux $Q_{ns}^o$:
@@ -1595,6 +1595,6 @@
 $T$ is the model surface layer temperature and
 $\frac{dQ}{dT}$ is a negative feedback coefficient usually taken equal to $-40~W/m^2/K$.
-For a $50~m$ mixed-layer depth, this value corresponds to a relaxation time scale of two months. 
-This term ensures that if $T$ perfectly matches the supplied SST, then $Q$ is equal to $Q_o$. 
+For a $50~m$ mixed-layer depth, this value corresponds to a relaxation time scale of two months.
+This term ensures that if $T$ perfectly matches the supplied SST, then $Q$ is equal to $Q_o$.
 
 In the fresh water budget, a feedback term can also be added.
@@ -1627,12 +1627,12 @@
 The presence at the sea surface of an ice covered area modifies all the fluxes transmitted to the ocean.
 There are several way to handle sea-ice in the system depending on
-the value of the \np{nn\_ice} namelist parameter found in \ngn{namsbc} namelist.
+the value of the \np{nn\_ice} namelist parameter found in \nam{sbc} namelist.
 \begin{description}
-\item[nn{\_}ice = 0]
+\item[nn\_ice = 0]
   there will never be sea-ice in the computational domain.
   This is a typical namelist value used for tropical ocean domain.
   The surface fluxes are simply specified for an ice-free ocean.
   No specific things is done for sea-ice.
-\item[nn{\_}ice = 1]
+\item[nn\_ice = 1]
   sea-ice can exist in the computational domain, but no sea-ice model is used.
   An observed ice covered area is read in a file.
@@ -1645,6 +1645,6 @@
   This manner of managing sea-ice area, just by using a IF case,
   is usually referred as the \textit{ice-if} model.
-  It can be found in the \mdl{sbcice{\_}if} module.
-\item[nn{\_}ice = 2 or more]
+  It can be found in the \mdl{sbcice\_if} module.
+\item[nn\_ice = 2 or more]
   A full sea ice model is used.
   This model computes the ice-ocean fluxes,
@@ -1652,6 +1652,6 @@
   provide the surface averaged ocean fluxes.
   Note that the activation of a sea-ice model is done by defining a CPP key (\key{si3} or \key{cice}).
-  The activation automatically overwrites the read value of nn{\_}ice to its appropriate value
-  (\ie $2$ for SI3 or $3$ for CICE).
+  The activation automatically overwrites the read value of nn\_ice to its appropriate value
+  (\ie\ $2$ for SI3 or $3$ for CICE).
 \end{description}
 
@@ -1667,14 +1667,14 @@
 \label{subsec:SBC_cice}
 
-It is possible to couple a regional or global NEMO configuration (without AGRIF)
+It is possible to couple a regional or global \NEMO\ configuration (without AGRIF)
 to the CICE sea-ice model by using \key{cice}.
 The CICE code can be obtained from \href{http://oceans11.lanl.gov/trac/CICE/}{LANL} and
 the additional 'hadgem3' drivers will be required, even with the latest code release.
-Input grid files consistent with those used in NEMO will also be needed,
+Input grid files consistent with those used in \NEMO\ will also be needed,
 and CICE CPP keys \textbf{ORCA\_GRID}, \textbf{CICE\_IN\_NEMO} and \textbf{coupled} should be used
 (seek advice from UKMO if necessary).
-Currently, the code is only designed to work when using the NCAR forcing option for NEMO %GS: still true ?
+Currently, the code is only designed to work when using the NCAR forcing option for \NEMO\ %GS: still true ?
 (with \textit{calc\_strair}\forcode{ = .true.} and \textit{calc\_Tsfc}\forcode{ = .true.} in the CICE name-list),
-or alternatively when NEMO is coupled to the HadGAM3 atmosphere model
+or alternatively when \NEMO\ is coupled to the HadGAM3 atmosphere model
 (with \textit{calc\_strair}\forcode{ = .false.} and \textit{calc\_Tsfc}\forcode{ = false}).
 The code is intended to be used with \np{nn\_fsbc} set to 1
@@ -1683,9 +1683,9 @@
 the user should check that results are not significantly different to the standard case).
 
-There are two options for the technical coupling between NEMO and CICE.
+There are two options for the technical coupling between \NEMO\ and CICE.
 The standard version allows complete flexibility for the domain decompositions in the individual models,
 but this is at the expense of global gather and scatter operations in the coupling which
 become very expensive on larger numbers of processors.
-The alternative option (using \key{nemocice\_decomp} for both NEMO and CICE) ensures that
+The alternative option (using \key{nemocice\_decomp} for both \NEMO\ and CICE) ensures that
 the domain decomposition is identical in both models (provided domain parameters are set appropriately,
 and \textit{processor\_shape~=~square-ice} and \textit{distribution\_wght~=~block} in the CICE name-list) and
@@ -1696,5 +1696,5 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%        Freshwater budget control 
+%        Freshwater budget control
 % -------------------------------------------------------------------------------------------------------------
 \subsection[Freshwater budget control (\textit{sbcfwb.F90})]
@@ -1705,5 +1705,5 @@
 prevent unrealistic drift of the sea surface height due to inaccuracy in the freshwater fluxes.
 In \NEMO, two way of controlling the freshwater budget are proposed:
- 
+
 \begin{description}
 \item[\np{nn\_fwb}\forcode{ = 0}]
@@ -1711,35 +1711,35 @@
   The mean sea level is free to drift, and will certainly do so.
 \item[\np{nn\_fwb}\forcode{ = 1}]
-  global mean \textit{emp} set to zero at each model time step. 
+  global mean \textit{emp} set to zero at each model time step.
   %GS: comment below still relevant ?
-  %Note that with a sea-ice model, this technique only controls the mean sea level with linear free surface and no mass flux between ocean and ice (as it is implemented in the current ice-ocean coupling). 
+  %Note that with a sea-ice model, this technique only controls the mean sea level with linear free surface and no mass flux between ocean and ice (as it is implemented in the current ice-ocean coupling).
 \item[\np{nn\_fwb}\forcode{ = 2}]
   freshwater budget is adjusted from the previous year annual mean budget which
   is read in the \textit{EMPave\_old.dat} file.
   As the model uses the Boussinesq approximation, the annual mean fresh water budget is simply evaluated from
-  the change in the mean sea level at January the first and saved in the \textit{EMPav.dat} file. 
+  the change in the mean sea level at January the first and saved in the \textit{EMPav.dat} file.
 \end{description}
 
 % Griffies doc:
-% When running ocean-ice simulations, we are not explicitly representing land processes, 
-% such as rivers, catchment areas, snow accumulation, etc. However, to reduce model drift, 
-% it is important to balance the hydrological cycle in ocean-ice models. 
-% We thus need to prescribe some form of global normalization to the precipitation minus evaporation plus river runoff. 
-% The result of the normalization should be a global integrated zero net water input to the ocean-ice system over 
-% a chosen time scale. 
-% How often the normalization is done is a matter of choice. In mom4p1, we choose to do so at each model time step, 
-% so that there is always a zero net input of water to the ocean-ice system. 
-% Others choose to normalize over an annual cycle, in which case the net imbalance over an annual cycle is used 
-% to alter the subsequent year�s water budget in an attempt to damp the annual water imbalance. 
-% Note that the annual budget approach may be inappropriate with interannually varying precipitation forcing. 
-% When running ocean-ice coupled models, it is incorrect to include the water transport between the ocean 
-% and ice models when aiming to balance the hydrological cycle. 
-% The reason is that it is the sum of the water in the ocean plus ice that should be balanced when running ocean-ice models, 
-% not the water in any one sub-component. As an extreme example to illustrate the issue, 
-% consider an ocean-ice model with zero initial sea ice. As the ocean-ice model spins up, 
-% there should be a net accumulation of water in the growing sea ice, and thus a net loss of water from the ocean. 
-% The total water contained in the ocean plus ice system is constant, but there is an exchange of water between 
-% the subcomponents. This exchange should not be part of the normalization used to balance the hydrological cycle 
-% in ocean-ice models. 
+% When running ocean-ice simulations, we are not explicitly representing land processes,
+% such as rivers, catchment areas, snow accumulation, etc. However, to reduce model drift,
+% it is important to balance the hydrological cycle in ocean-ice models.
+% We thus need to prescribe some form of global normalization to the precipitation minus evaporation plus river runoff.
+% The result of the normalization should be a global integrated zero net water input to the ocean-ice system over
+% a chosen time scale.
+% How often the normalization is done is a matter of choice. In mom4p1, we choose to do so at each model time step,
+% so that there is always a zero net input of water to the ocean-ice system.
+% Others choose to normalize over an annual cycle, in which case the net imbalance over an annual cycle is used
+% to alter the subsequent year�s water budget in an attempt to damp the annual water imbalance.
+% Note that the annual budget approach may be inappropriate with interannually varying precipitation forcing.
+% When running ocean-ice coupled models, it is incorrect to include the water transport between the ocean
+% and ice models when aiming to balance the hydrological cycle.
+% The reason is that it is the sum of the water in the ocean plus ice that should be balanced when running ocean-ice models,
+% not the water in any one sub-component. As an extreme example to illustrate the issue,
+% consider an ocean-ice model with zero initial sea ice. As the ocean-ice model spins up,
+% there should be a net accumulation of water in the growing sea ice, and thus a net loss of water from the ocean.
+% The total water contained in the ocean plus ice system is constant, but there is an exchange of water between
+% the subcomponents. This exchange should not be part of the normalization used to balance the hydrological cycle
+% in ocean-ice models.
 
 
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_STO.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_STO.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_STO.tex	(revision 11435)
@@ -8,5 +8,5 @@
 \label{chap:STO}
 
-\minitoc
+\chaptertoc
 
 % \vfill
@@ -118,5 +118,5 @@
 either first principles, model simulations, or real-world observations.
 The parameters are set by default as described in \cite{brankart_OM13}, which has been shown in the paper
-to give good results for a global low resolution (2°) NEMO configuration. where this parametrization produces a major effect on the average large-scale circulation, especilally in regions of intense mesoscale activity.
+to give good results for a global low resolution (2°) \NEMO\ configuration. where this parametrization produces a major effect on the average large-scale circulation, especilally in regions of intense mesoscale activity.
 The set of parameters will need further investigation to find appropriate values
 for any other configuration or resolution of the model.
@@ -127,5 +127,5 @@
 
 The code implementing stochastic parametrisation is located in the src/OCE/STO directory.
-It contains three modules : 
+It contains three modules :
 % \begin{description}
 
@@ -150,5 +150,5 @@
 the values $a^{(i)}, b^{(i)}, c^{(i)}$ for each autoregressive process,
 as a function of the statistical properties required by the model user
-(mean, standard deviation, time correlation, order of the process,\ldots). 
+(mean, standard deviation, time correlation, order of the process,\ldots).
 This routine also includes the initialization (seeding) of the random number generator.
 
@@ -162,12 +162,16 @@
 The simulation will continue exactly as if it was not interrupted only
 when \np{ln\_rstseed} is set to \forcode{.true.},
-\ie when the state of the random number generator is read in the restart file.\\
+\ie\ when the state of the random number generator is read in the restart file.\\
 
-The implementation includes the basics for a few possible stochastic parametrisations including equation of state, lateral diffusion, horizontal pressure gradient, ice strength, trend, tracers dynamics. As for this release, only the stochastic parametrisation of equation of state is fully available and tested. \\ 
+The implementation includes the basics for a few possible stochastic parametrisations including equation of state,
+lateral diffusion, horizontal pressure gradient, ice strength, trend, tracers dynamics.
+As for this release, only the stochastic parametrisation of equation of state is fully available and tested. \\
 
 Options and parameters \\
 
-The \np{ln\_sto\_eos} namelist variable activates stochastic parametrisation of equation of state. By default it set to \forcode{.false.}) and not active.
-The set of parameters is available in \ngn{namsto} namelist(only the subset for equation of state stochastic parametrisation is listed below):
+The \np{ln\_sto\_eos} namelist variable activates stochastic parametrisation of equation of state.
+By default it set to \forcode{.false.}) and not active.
+The set of parameters is available in \nam{sto} namelist
+(only the subset for equation of state stochastic parametrisation is listed below):
 %---------------------------------------namsto--------------------------------------------------
 
@@ -176,4 +180,5 @@
 
 The variables of stochastic paramtetrisation itself (based on the global 2° experiments as in \cite{brankart_OM13} are:
+
 \begin{description}
 \item[\np{nn\_sto\_eos}:]   number of independent random walks
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_TRA.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_TRA.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_TRA.tex	(revision 11435)
@@ -8,10 +8,11 @@
 \label{chap:TRA}
 
-\minitoc
-
-% missing/update 
+\chaptertoc
+
+% missing/update
 % traqsr: need to coordinate with SBC module
 
-%STEVEN :  is the use of the word "positive" to describe a scheme enough, or should it be "positive definite"? I added a comment to this effect on some instances of this below
+%STEVEN :  is the use of the word "positive" to describe a scheme enough, or should it be "positive definite"?
+%I added a comment to this effect on some instances of this below
 
 Using the representation described in \autoref{chap:DOM}, several semi -discrete space forms of
@@ -35,5 +36,5 @@
 The terms QSR, BBC, BBL and DMP are optional.
 The external forcings and parameterisations require complex inputs and complex calculations
-(\eg bulk formulae, estimation of mixing coefficients) that are carried out in the SBC,
+(\eg\ bulk formulae, estimation of mixing coefficients) that are carried out in the SBC,
 LDF and ZDF modules and described in \autoref{chap:SBC}, \autoref{chap:LDF} and
 \autoref{chap:ZDF}, respectively.
@@ -50,5 +51,5 @@
 For each equation term \textit{TTT}, the namelist logicals are \textit{ln\_traTTT\_xxx},
 where \textit{xxx} is a 3 or 4 letter acronym corresponding to each optional scheme.
-The CPP key (when it exists) is \key{traTTT}.
+%The CPP key (when it exists) is \key{traTTT}.
 The equivalent code can be found in the \textit{traTTT} or \textit{traTTT\_xxx} module,
 in the \path{./src/OCE/TRA} directory.
@@ -68,7 +69,7 @@
 %-------------------------------------------------------------------------------------------------------------
 
-When considered (\ie when \np{ln\_traadv\_NONE} is not set to \forcode{.true.}),
+When considered (\ie\ when \np{ln\_traadv\_NONE} is not set to \forcode{.true.}),
 the advection tendency of a tracer is expressed in flux form,
-\ie as the divergence of the advective fluxes.
+\ie\ as the divergence of the advective fluxes.
 Its discrete expression is given by :
 \begin{equation}
@@ -82,5 +83,5 @@
 Indeed, it is obtained by using the following equality: $\nabla \cdot (\vect U \, T) = \vect U \cdot \nabla T$ which
 results from the use of the continuity equation, $\partial_t e_3 + e_3 \; \nabla \cdot \vect U = 0$
-(which reduces to $\nabla \cdot \vect U = 0$ in linear free surface, \ie \np{ln\_linssh}\forcode{ = .true.}).
+(which reduces to $\nabla \cdot \vect U = 0$ in linear free surface, \ie\ \np{ln\_linssh}\forcode{ = .true.}).
 Therefore it is of paramount importance to design the discrete analogue of the advection tendency so that
 it is consistent with the continuity equation in order to enforce the conservation properties of
@@ -110,5 +111,5 @@
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
-The key difference between the advection schemes available in \NEMO is the choice made in space and
+The key difference between the advection schemes available in \NEMO\ is the choice made in space and
 time interpolation to define the value of the tracer at the velocity points
 (\autoref{fig:adv_scheme}).
@@ -125,5 +126,5 @@
   the moving surface $z = \eta$.
   There is a non-zero advective flux which is set for all advection schemes as
-  $\tau_w|_{k = 1/2} = T_{k = 1}$, \ie the product of surface velocity (at $z = 0$) by
+  $\tau_w|_{k = 1/2} = T_{k = 1}$, \ie\ the product of surface velocity (at $z = 0$) by
   the first level tracer value.
 \item[non-linear free surface:]
@@ -140,5 +141,5 @@
 
 The velocity field that appears in (\autoref{eq:tra_adv} and \autoref{eq:tra_adv_zco?}) is
-the centred (\textit{now}) \textit{effective} ocean velocity, \ie the \textit{eulerian} velocity
+the centred (\textit{now}) \textit{effective} ocean velocity, \ie\ the \textit{eulerian} velocity
 (see \autoref{chap:DYN}) plus the eddy induced velocity (\textit{eiv}) and/or
 the mixed layer eddy induced velocity (\textit{eiv}) when those parameterisations are used
@@ -149,9 +150,9 @@
 Conservative Laws scheme (MUSCL), a $3^{rd}$ Upstream Biased Scheme (UBS, also often called UP3),
 and a Quadratic Upstream Interpolation for Convective Kinematics with Estimated Streaming Terms scheme (QUICKEST).
-The choice is made in the \ngn{namtra\_adv} namelist, by setting to \forcode{.true.} one of
+The choice is made in the \nam{tra\_adv} namelist, by setting to \forcode{.true.} one of
 the logicals \textit{ln\_traadv\_xxx}.
 The corresponding code can be found in the \textit{traadv\_xxx.F90} module, where
 \textit{xxx} is a 3 or 4 letter acronym corresponding to each scheme.
-By default (\ie in the reference namelist, \textit{namelist\_ref}), all the logicals are set to \forcode{.false.}.
+By default (\ie\ in the reference namelist, \textit{namelist\_ref}), all the logicals are set to \forcode{.false.}.
 If the user does not select an advection scheme in the configuration namelist (\textit{namelist\_cfg}),
 the tracers will \textit{not} be advected!
@@ -188,5 +189,5 @@
 \label{subsec:TRA_adv_cen}
 
-%        2nd order centred scheme  
+%        2nd order centred scheme
 
 The centred advection scheme (CEN) is used when \np{ln\_traadv\_cen}\forcode{ = .true.}.
@@ -203,6 +204,6 @@
 \end{equation}
 
-CEN2 is non diffusive (\ie it conserves the tracer variance, $\tau^2$) but dispersive
-(\ie it may create false extrema).
+CEN2 is non diffusive (\ie\ it conserves the tracer variance, $\tau^2$) but dispersive
+(\ie\ it may create false extrema).
 It is therefore notoriously noisy and must be used in conjunction with an explicit diffusion operator to
 produce a sensible solution.
@@ -213,5 +214,5 @@
 both (\autoref{eq:tra_adv}) and (\autoref{eq:tra_adv_cen2}) have this order of accuracy.
 
-%        4nd order centred scheme  
+%        4nd order centred scheme
 
 In the $4^{th}$ order formulation (CEN4), tracer values are evaluated at u- and v-points as
@@ -225,5 +226,5 @@
 a $4^{th}$ COMPACT interpolation has been prefered \citep{demange_phd14}.
 In the COMPACT scheme, both the field and its derivative are interpolated, which leads, after a matrix inversion,
-spectral characteristics similar to schemes of higher order \citep{lele_JCP92}. 
+spectral characteristics similar to schemes of higher order \citep{lele_JCP92}.
 
 Strictly speaking, the CEN4 scheme is not a $4^{th}$ order advection scheme but
@@ -237,5 +238,5 @@
 
 A direct consequence of the pseudo-fourth order nature of the scheme is that it is not non-diffusive,
-\ie the global variance of a tracer is not preserved using CEN4.
+\ie\ the global variance of a tracer is not preserved using CEN4.
 Furthermore, it must be used in conjunction with an explicit diffusion operator to produce a sensible solution.
 As in CEN2 case, the time-stepping is performed using a leapfrog scheme in conjunction with an Asselin time-filter,
@@ -250,5 +251,5 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%        FCT scheme  
+%        FCT scheme
 % -------------------------------------------------------------------------------------------------------------
 \subsection[FCT: Flux Corrected Transport scheme (\forcode{ln_traadv_fct = .true.})]
@@ -278,7 +279,7 @@
 where $c_u$ is a flux limiter function taking values between 0 and 1.
 The FCT order is the one of the centred scheme used
-(\ie it depends on the setting of \np{nn\_fct\_h} and \np{nn\_fct\_v}).
+(\ie\ it depends on the setting of \np{nn\_fct\_h} and \np{nn\_fct\_v}).
 There exist many ways to define $c_u$, each corresponding to a different FCT scheme.
-The one chosen in \NEMO is described in \citet{zalesak_JCP79}.
+The one chosen in \NEMO\ is described in \citet{zalesak_JCP79}.
 $c_u$ only departs from $1$ when the advective term produces a local extremum in the tracer field.
 The resulting scheme is quite expensive but \textit{positive}.
@@ -301,5 +302,5 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%        MUSCL scheme  
+%        MUSCL scheme
 % -------------------------------------------------------------------------------------------------------------
 \subsection[MUSCL: Monotone Upstream Scheme for Conservative Laws (\forcode{ln_traadv_mus = .true.})]
@@ -310,5 +311,5 @@
 MUSCL implementation can be found in the \mdl{traadv\_mus} module.
 
-MUSCL has been first implemented in \NEMO by \citet{levy.estublier.ea_GRL01}.
+MUSCL has been first implemented in \NEMO\ by \citet{levy.estublier.ea_GRL01}.
 In its formulation, the tracer at velocity points is evaluated assuming a linear tracer variation between
 two $T$-points (\autoref{fig:adv_scheme}).
@@ -338,5 +339,5 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%        UBS scheme  
+%        UBS scheme
 % -------------------------------------------------------------------------------------------------------------
 \subsection[UBS a.k.a. UP3: Upstream-Biased Scheme (\forcode{ln_traadv_ubs = .true.})]
@@ -408,8 +409,8 @@
 Thirdly, the diffusion term is in fact a biharmonic operator with an eddy coefficient which
 is simply proportional to the velocity: $A_u^{lm} = \frac{1}{12} \, {e_{1u}}^3 \, |u|$.
-Note the current version of NEMO uses the computationally more efficient formulation \autoref{eq:tra_adv_ubs}.
-
-% -------------------------------------------------------------------------------------------------------------
-%        QCK scheme  
+Note the current version of \NEMO\ uses the computationally more efficient formulation \autoref{eq:tra_adv_ubs}.
+
+% -------------------------------------------------------------------------------------------------------------
+%        QCK scheme
 % -------------------------------------------------------------------------------------------------------------
 \subsection[QCK: QuiCKest scheme (\forcode{ln_traadv_qck = .true.})]
@@ -423,5 +424,5 @@
 QUICKEST is the third order Godunov scheme which is associated with the ULTIMATE QUICKEST limiter
 \citep{leonard_CMAME91}.
-It has been implemented in NEMO by G. Reffray (MERCATOR-ocean) and can be found in the \mdl{traadv\_qck} module.
+It has been implemented in \NEMO\ by G. Reffray (MERCATOR-ocean) and can be found in the \mdl{traadv\_qck} module.
 The resulting scheme is quite expensive but \textit{positive}.
 It can be used on both active and passive tracers.
@@ -444,10 +445,10 @@
 \nlst{namtra_ldf}
 %-------------------------------------------------------------------------------------------------------------
- 
-Options are defined through the \ngn{namtra\_ldf} namelist variables.
-They are regrouped in four items, allowing to specify 
+
+Options are defined through the \nam{tra\_ldf} namelist variables.
+They are regrouped in four items, allowing to specify
 $(i)$   the type of operator used (none, laplacian, bilaplacian),
 $(ii)$  the direction along which the operator acts (iso-level, horizontal, iso-neutral),
-$(iii)$ some specific options related to the rotated operators (\ie non-iso-level operator), and
+$(iii)$ some specific options related to the rotated operators (\ie\ non-iso-level operator), and
 $(iv)$  the specification of eddy diffusivity coefficient (either constant or variable in space and time).
 Item $(iv)$ will be described in \autoref{chap:LDF}.
@@ -457,5 +458,5 @@
 
 The lateral diffusion of tracers is evaluated using a forward scheme,
-\ie the tracers appearing in its expression are the \textit{before} tracers in time,
+\ie\ the tracers appearing in its expression are the \textit{before} tracers in time,
 except for the pure vertical component that appears when a rotation tensor is used.
 This latter component is solved implicitly together with the vertical diffusion term (see \autoref{chap:STP}).
@@ -467,5 +468,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection[Type of operator (\texttt{ln\_traldf}\{\texttt{\_NONE,\_lap,\_blp}\})]
-{Type of operator (\protect\np{ln\_traldf\_NONE}, \protect\np{ln\_traldf\_lap}, or \protect\np{ln\_traldf\_blp}) } 
+{Type of operator (\protect\np{ln\_traldf\_NONE}, \protect\np{ln\_traldf\_lap}, or \protect\np{ln\_traldf\_blp}) }
 \label{subsec:TRA_ldf_op}
 
@@ -494,5 +495,5 @@
 minimizing the impact on the larger scale features.
 The main difference between the two operators is the scale selectiveness.
-The bilaplacian damping time (\ie its spin down time) scales like $\lambda^{-4}$ for
+The bilaplacian damping time (\ie\ its spin down time) scales like $\lambda^{-4}$ for
 disturbances of wavelength $\lambda$ (so that short waves damped more rapidelly than long ones),
 whereas the laplacian damping time scales only like $\lambda^{-2}$.
@@ -502,5 +503,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection[Action direction (\texttt{ln\_traldf}\{\texttt{\_lev,\_hor,\_iso,\_triad}\})]
-{Direction of action (\protect\np{ln\_traldf\_lev}, \protect\np{ln\_traldf\_hor}, \protect\np{ln\_traldf\_iso}, or \protect\np{ln\_traldf\_triad}) } 
+{Direction of action (\protect\np{ln\_traldf\_lev}, \protect\np{ln\_traldf\_hor}, \protect\np{ln\_traldf\_iso}, or \protect\np{ln\_traldf\_triad}) }
 \label{subsec:TRA_ldf_dir}
 
@@ -508,5 +509,5 @@
 The operator is a simple (re-entrant) laplacian acting in the (\textbf{i},\textbf{j}) plane when
 iso-level option is used (\np{ln\_traldf\_lev}\forcode{ = .true.}) or
-when a horizontal (\ie geopotential) operator is demanded in \textit{z}-coordinate
+when a horizontal (\ie\ geopotential) operator is demanded in \textit{z}-coordinate
 (\np{ln\_traldf\_hor} and \np{ln\_zco} equal \forcode{.true.}).
 The associated code can be found in the \mdl{traldf\_lap\_blp} module.
@@ -516,5 +517,5 @@
 (\np{ln\_traldf\_iso} or \np{ln\_traldf\_triad} equals \forcode{.true.},
 see \mdl{traldf\_iso} or \mdl{traldf\_triad} module, resp.), or
-when a horizontal (\ie geopotential) operator is demanded in \textit{s}-coordinate
+when a horizontal (\ie\ geopotential) operator is demanded in \textit{s}-coordinate
 (\np{ln\_traldf\_hor} and \np{ln\_sco} equal \forcode{.true.})
 \footnote{In this case, the standard iso-neutral operator will be automatically selected}.
@@ -532,5 +533,5 @@
 \label{subsec:TRA_ldf_lev}
 
-The laplacian diffusion operator acting along the model (\textit{i,j})-surfaces is given by: 
+The laplacian diffusion operator acting along the model (\textit{i,j})-surfaces is given by:
 \begin{equation}
   \label{eq:tra_ldf_lap}
@@ -545,5 +546,5 @@
 compute the iso-level bilaplacian operator.
 
-It is a \textit{horizontal} operator (\ie acting along geopotential surfaces) in
+It is a \textit{horizontal} operator (\ie\ acting along geopotential surfaces) in
 the $z$-coordinate with or without partial steps, but is simply an iso-level operator in the $s$-coordinate.
 It is thus used when, in addition to \np{ln\_traldf\_lap} or \np{ln\_traldf\_blp}\forcode{ = .true.},
@@ -584,5 +585,5 @@
 where $b_t = e_{1t} \, e_{2t} \, e_{3t}$  is the volume of $T$-cells,
 $r_1$ and $r_2$ are the slopes between the surface of computation ($z$- or $s$-surfaces) and
-the surface along which the diffusion operator acts (\ie horizontal or iso-neutral surfaces).
+the surface along which the diffusion operator acts (\ie\ horizontal or iso-neutral surfaces).
 It is thus used when, in addition to \np{ln\_traldf\_lap}\forcode{ = .true.},
 we have \np{ln\_traldf\_iso}\forcode{ = .true.},
@@ -616,5 +617,5 @@
 
 An alternative scheme developed by \cite{griffies.gnanadesikan.ea_JPO98} which ensures tracer variance decreases
-is also available in \NEMO (\np{ln\_traldf\_grif}\forcode{ = .true.}).
+is also available in \NEMO\ (\np{ln\_traldf\_grif}\forcode{ = .true.}).
 A complete description of the algorithm is given in \autoref{apdx:triad}.
 
@@ -637,5 +638,5 @@
 \item \np{rn\_slpmax} = slope limit (both operators)
 \item \np{ln\_triad\_iso} = pure horizontal mixing in ML (triad only)
-\item \np{rn\_sw\_triad} $= 1$ switching triad; $= 0$ all 4 triads used (triad only) 
+\item \np{rn\_sw\_triad} $= 1$ switching triad; $= 0$ all 4 triads used (triad only)
 \item \np{ln\_botmix\_triad} = lateral mixing on bottom (triad only)
 \end{itemize}
@@ -652,5 +653,5 @@
 %--------------------------------------------------------------------------------------------------------------
 
-Options are defined through the \ngn{namzdf} namelist variables.
+Options are defined through the \nam{zdf} namelist variables.
 The formulation of the vertical subgrid scale tracer physics is the same for all the vertical coordinates,
 and is based on a laplacian operator.
@@ -664,5 +665,5 @@
 respectively.
 Generally, $A_w^{vT} = A_w^{vS}$ except when double diffusive mixing is parameterised
-(\ie \key{zdfddm} is defined).
+(\ie\ \texttt{zdfddm?} is defined).
 The way these coefficients are evaluated is given in \autoref{chap:ZDF} (ZDF).
 Furthermore, when iso-neutral mixing is used, both mixing coefficients are increased by
@@ -704,5 +705,5 @@
 
 Due to interactions and mass exchange of water ($F_{mass}$) with other Earth system components
-(\ie atmosphere, sea-ice, land), the change in the heat and salt content of the surface layer of the ocean is due
+(\ie\ atmosphere, sea-ice, land), the change in the heat and salt content of the surface layer of the ocean is due
 both to the heat and salt fluxes crossing the sea surface (not linked with $F_{mass}$) and
 to the heat and salt content of the mass exchange.
@@ -716,5 +717,5 @@
 \item
   $Q_{ns}$, the non-solar part of the net surface heat flux that crosses the sea surface
-  (\ie the difference between the total surface heat flux and the fraction of the short wave flux that
+  (\ie\ the difference between the total surface heat flux and the fraction of the short wave flux that
   penetrates into the water column, see \autoref{subsec:TRA_qsr})
   plus the heat content associated with of the mass exchange with the atmosphere and lands.
@@ -758,5 +759,5 @@
           &\overline{(\textit{sfx} -        \textit{emp} \lt. S \rt|_{k = 1})}^t
   \end{alignedat}
-\end{equation} 
+\end{equation}
 Note that an exact conservation of heat and salt content is only achieved with non-linear free surface.
 In the linear free surface case, there is a small imbalance.
@@ -765,5 +766,5 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%        Solar Radiation Penetration 
+%        Solar Radiation Penetration
 % -------------------------------------------------------------------------------------------------------------
 \subsection[Solar radiation penetration (\textit{traqsr.F90})]
@@ -775,10 +776,10 @@
 %--------------------------------------------------------------------------------------------------------------
 
-Options are defined through the \ngn{namtra\_qsr} namelist variables.
+Options are defined through the \nam{tra\_qsr} namelist variables.
 When the penetrative solar radiation option is used (\np{ln\_flxqsr}\forcode{ = .true.}),
 the solar radiation penetrates the top few tens of meters of the ocean.
 If it is not used (\np{ln\_flxqsr}\forcode{ = .false.}) all the heat flux is absorbed in the first ocean level.
 Thus, in the former case a term is added to the time evolution equation of temperature \autoref{eq:PE_tra_T} and
-the surface boundary condition is modified to take into account only the non-penetrative part of the surface 
+the surface boundary condition is modified to take into account only the non-penetrative part of the surface
 heat flux:
 \begin{equation}
@@ -789,5 +790,5 @@
   \end{gathered}
 \end{equation}
-where $Q_{sr}$ is the penetrative part of the surface heat flux (\ie the shortwave radiation) and
+where $Q_{sr}$ is the penetrative part of the surface heat flux (\ie\ the shortwave radiation) and
 $I$ is the downward irradiance ($\lt. I \rt|_{z = \eta} = Q_{sr}$).
 The additional term in \autoref{eq:PE_qsr} is discretized as follows:
@@ -803,5 +804,5 @@
 (specified through namelist parameter \np{rn\_abs}).
 It is assumed to penetrate the ocean with a decreasing exponential profile, with an e-folding depth scale, $\xi_0$,
-of a few tens of centimetres (typically $\xi_0 = 0.35~m$ set as \np{rn\_si0} in the \ngn{namtra\_qsr} namelist).
+of a few tens of centimetres (typically $\xi_0 = 0.35~m$ set as \np{rn\_si0} in the \nam{tra\_qsr} namelist).
 For shorter wavelengths (400-700~nm), the ocean is more transparent, and solar energy propagates to
 larger depths where it contributes to local heating.
@@ -836,5 +837,5 @@
 
 The RGB formulation is used when \np{ln\_qsr\_rgb}\forcode{ = .true.}.
-The RGB attenuation coefficients (\ie the inverses of the extinction length scales) are tabulated over
+The RGB attenuation coefficients (\ie\ the inverses of the extinction length scales) are tabulated over
 61 nonuniform chlorophyll classes ranging from 0.01 to 10 g.Chl/L
 (see the routine \rou{trc\_oce\_rgb} in \mdl{trc\_oce} module).
@@ -843,5 +844,5 @@
 \begin{description}
 \item[\np{nn\_chdta}\forcode{ = 0}]
-  a constant 0.05 g.Chl/L value everywhere ; 
+  a constant 0.05 g.Chl/L value everywhere ;
 \item[\np{nn\_chdta}\forcode{ = 1}]
   an observed time varying chlorophyll deduced from satellite surface ocean color measurement spread uniformly in
@@ -854,5 +855,5 @@
   In this case, the RGB formulation is used to calculate both the phytoplankton light limitation in
   PISCES or LOBSTER and the oceanic heating rate.
-\end{description} 
+\end{description}
 
 The trend in \autoref{eq:tra_qsr} associated with the penetration of the solar radiation is added to
@@ -862,9 +863,9 @@
 the depth of $w-$levels does not significantly vary with location.
 The level at which the light has been totally absorbed
-(\ie it is less than the computer precision) is computed once,
+(\ie\ it is less than the computer precision) is computed once,
 and the trend associated with the penetration of the solar radiation is only added down to that level.
 Finally, note that when the ocean is shallow ($<$ 200~m), part of the solar radiation can reach the ocean floor.
 In this case, we have chosen that all remaining radiation is absorbed in the last ocean level
-(\ie $I$ is masked).
+(\ie\ $I$ is masked).
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -910,5 +911,5 @@
 
 Usually it is assumed that there is no exchange of heat or salt through the ocean bottom,
-\ie a no flux boundary condition is applied on active tracers at the bottom.
+\ie\ a no flux boundary condition is applied on active tracers at the bottom.
 This is the default option in \NEMO, and it is implemented using the masking technique.
 However, there is a non-zero heat flux across the seafloor that is associated with solid earth cooling.
@@ -916,7 +917,7 @@
 but it warms systematically the ocean and acts on the densest water masses.
 Taking this flux into account in a global ocean model increases the deepest overturning cell
-(\ie the one associated with the Antarctic Bottom Water) by a few Sverdrups \citep{emile-geay.madec_OS09}.
-
-Options are defined through the  \ngn{namtra\_bbc} namelist variables.
+(\ie\ the one associated with the Antarctic Bottom Water) by a few Sverdrups \citep{emile-geay.madec_OS09}.
+
+Options are defined through the \nam{tra\_bbc} namelist variables.
 The presence of geothermal heating is controlled by setting the namelist parameter \np{ln\_trabbc} to true.
 Then, when \np{nn\_geoflx} is set to 1, a constant geothermal heating is introduced whose value is given by
@@ -928,6 +929,6 @@
 % Bottom Boundary Layer
 % ================================================================
-\section[Bottom boundary layer (\textit{trabbl.F90} - \texttt{\textbf{key\_trabbl}})]
-{Bottom boundary layer (\protect\mdl{trabbl} - \protect\key{trabbl})}
+\section[Bottom boundary layer (\textit{trabbl.F90} - \forcode{ln_trabbl = .true.})]
+{Bottom boundary layer (\protect\mdl{trabbl} - \protect\np{ln\_trabbl}\forcode{ = .true.})}
 \label{sec:TRA_bbl}
 %--------------------------------------------nambbl---------------------------------------------------------
@@ -936,5 +937,5 @@
 %--------------------------------------------------------------------------------------------------------------
 
-Options are defined through the \ngn{nambbl} namelist variables.
+Options are defined through the \nam{bbl} namelist variables.
 In a $z$-coordinate configuration, the bottom topography is represented by a series of discrete steps.
 This is not adequate to represent gravity driven downslope flows.
@@ -965,6 +966,6 @@
 \label{subsec:TRA_bbl_diff}
 
-When applying sigma-diffusion (\key{trabbl} defined and \np{nn\_bbl\_ldf} set to 1),
-the diffusive flux between two adjacent cells at the ocean floor is given by 
+When applying sigma-diffusion (\np{ln\_trabbl}\forcode{ = .true.} and \np{nn\_bbl\_ldf} set to 1),
+the diffusive flux between two adjacent cells at the ocean floor is given by
 \[
   % \label{eq:tra_bbl_diff}
@@ -974,5 +975,5 @@
 $A_l^\sigma$ the lateral diffusivity in the BBL.
 Following \citet{beckmann.doscher_JPO97}, the latter is prescribed with a spatial dependence,
-\ie in the conditional form
+\ie\ in the conditional form
 \begin{equation}
   \label{eq:tra_bbl_coef}
@@ -990,5 +991,5 @@
 (see green arrow in \autoref{fig:bbl}).
 In practice, this constraint is applied separately in the two horizontal directions,
-and the density gradient in \autoref{eq:tra_bbl_coef} is evaluated with the log gradient formulation: 
+and the density gradient in \autoref{eq:tra_bbl_coef} is evaluated with the log gradient formulation:
 \[
   % \label{eq:tra_bbl_Drho}
@@ -1041,6 +1042,6 @@
 (see black arrow in \autoref{fig:bbl}) \citep{beckmann.doscher_JPO97}.
 It is a \textit{conditional advection}, that is, advection is allowed only
-if dense water overlies less dense water on the slope (\ie $\nabla_\sigma \rho \cdot \nabla H < 0$) and
-if the velocity is directed towards greater depth (\ie $\vect U \cdot \nabla H > 0$).
+if dense water overlies less dense water on the slope (\ie\ $\nabla_\sigma \rho \cdot \nabla H < 0$) and
+if the velocity is directed towards greater depth (\ie\ $\vect U \cdot \nabla H > 0$).
 
 \np{nn\_bbl\_adv}\forcode{ = 2}:
@@ -1048,5 +1049,5 @@
 the density difference between the higher cell and lower cell densities \citep{campin.goosse_T99}.
 The advection is allowed only  if dense water overlies less dense water on the slope
-(\ie $\nabla_\sigma \rho \cdot \nabla H < 0$).
+(\ie\ $\nabla_\sigma \rho \cdot \nabla H < 0$).
 For example, the resulting transport of the downslope flow, here in the $i$-direction (\autoref{fig:bbl}),
 is simply given by the following expression:
@@ -1070,5 +1071,5 @@
 The advective BBL scheme modifies the tracer time tendency of the ocean cells near the topographic step by
 the downslope flow \autoref{eq:bbl_dw}, the horizontal \autoref{eq:bbl_hor} and
-the upward \autoref{eq:bbl_up} return flows as follows: 
+the upward \autoref{eq:bbl_up} return flows as follows:
 \begin{alignat}{3}
   \label{eq:bbl_dw}
@@ -1108,12 +1109,12 @@
     \pd[S]{t} = \cdots - \gamma (S - S_o)
   \end{gathered}
-\end{equation} 
+\end{equation}
 where $\gamma$ is the inverse of a time scale, and $T_o$ and $S_o$ are given temperature and salinity fields
 (usually a climatology).
-Options are defined through the  \ngn{namtra\_dmp} namelist variables.
+Options are defined through the  \nam{tra\_dmp} namelist variables.
 The restoring term is added when the namelist parameter \np{ln\_tradmp} is set to true.
 It also requires that both \np{ln\_tsd\_init} and \np{ln\_tsd\_tradmp} are set to true in
-\ngn{namtsd} namelist as well as \np{sn\_tem} and \np{sn\_sal} structures are correctly set
-(\ie that $T_o$ and $S_o$ are provided in input files and read using \mdl{fldread},
+\nam{tsd} namelist as well as \np{sn\_tem} and \np{sn\_sal} structures are correctly set
+(\ie\ that $T_o$ and $S_o$ are provided in input files and read using \mdl{fldread},
 see \autoref{subsec:SBC_fldread}).
 The restoring coefficient $\gamma$ is a three-dimensional array read in during the \rou{tra\_dmp\_init} routine.
@@ -1157,7 +1158,7 @@
 %--------------------------------------------------------------------------------------------------------------
 
-Options are defined through the \ngn{namdom} namelist variables.
+Options are defined through the \nam{dom} namelist variables.
 The general framework for tracer time stepping is a modified leap-frog scheme \citep{leclair.madec_OM09},
-\ie a three level centred time scheme associated with a Asselin time filter (cf. \autoref{sec:STP_mLF}):
+\ie\ a three level centred time scheme associated with a Asselin time filter (cf. \autoref{sec:STP_mLF}):
 \begin{equation}
   \label{eq:tra_nxt}
@@ -1165,10 +1166,10 @@
     &(e_{3t}T)^{t + \rdt} &&= (e_{3t}T)_f^{t - \rdt} &&+ 2 \, \rdt \,e_{3t}^t \ \text{RHS}^t \\
     &(e_{3t}T)_f^t        &&= (e_{3t}T)^t            &&+ \, \gamma \, \lt[ (e_{3t}T)_f^{t - \rdt} - 2(e_{3t}T)^t + (e_{3t}T)^{t + \rdt} \rt] \\
-    &                     &&                         &&- \, \gamma \, \rdt \, \lt[ Q^{t + \rdt/2} - Q^{t - \rdt/2} \rt]  
+    &                     &&                         &&- \, \gamma \, \rdt \, \lt[ Q^{t + \rdt/2} - Q^{t - \rdt/2} \rt]
   \end{alignedat}
-\end{equation} 
+\end{equation}
 where RHS is the right hand side of the temperature equation, the subscript $f$ denotes filtered values,
 $\gamma$ is the Asselin coefficient, and $S$ is the total forcing applied on $T$
-(\ie fluxes plus content in mass exchanges).
+(\ie\ fluxes plus content in mass exchanges).
 $\gamma$ is initialized as \np{rn\_atfp} (\textbf{namelist} parameter).
 Its default value is \np{rn\_atfp}\forcode{ = 10.e-3}.
@@ -1185,5 +1186,5 @@
 
 % ================================================================
-% Equation of State (eosbn2) 
+% Equation of State (eosbn2)
 % ================================================================
 \section[Equation of state (\textit{eosbn2.F90})]
@@ -1219,5 +1220,5 @@
 practical salinity for EOS-980, both variables being more suitable for use as model variables
 \citep{ioc.iapso_bk10, graham.mcdougall_JPO13}.
-EOS-80 is an obsolescent feature of the NEMO system, kept only for backward compatibility.
+EOS-80 is an obsolescent feature of the \NEMO\ system, kept only for backward compatibility.
 For process studies, it is often convenient to use an approximation of the EOS.
 To that purposed, a simplified EOS (S-EOS) inspired by \citet{vallis_bk06} is also available.
@@ -1229,5 +1230,5 @@
 density in the World Ocean varies by no more than 2$\%$ from that value \citep{gill_bk82}.
 
-Options are defined through the \ngn{nameos} namelist variables, and in particular \np{nn\_eos} which
+Options are defined through the \nam{eos} namelist variables, and in particular \np{nn\_eos} which
 controls the EOS used (\forcode{= -1} for TEOS10 ; \forcode{= 0} for EOS-80 ; \forcode{= 1} for S-EOS).
 
@@ -1278,5 +1279,5 @@
     \begin{alignedat}{2}
     &d_a(T,S,z) = \frac{1}{\rho_o} \big[ &- a_0 \; ( 1 + 0.5 \; \lambda_1 \; T_a + \mu_1 \; z ) * &T_a \big. \\
-    &                                    &+ b_0 \; ( 1 - 0.5 \; \lambda_2 \; S_a - \mu_2 \; z ) * &S_a       \\  
+    &                                    &+ b_0 \; ( 1 - 0.5 \; \lambda_2 \; S_a - \mu_2 \; z ) * &S_a       \\
     &                              \big. &- \nu \;                           T_a                  &S_a \big] \\
     \end{alignedat}
@@ -1336,5 +1337,5 @@
 In particular, $N^2$ has to be computed at the local pressure
 (pressure in decibar being approximated by the depth in meters).
-The expression for $N^2$  is given by: 
+The expression for $N^2$  is given by:
 \[
   % \label{eq:tra_bn2}
@@ -1358,5 +1359,5 @@
   \begin{split}
     &T_f (S,p) = \lt( a + b \, \sqrt{S} + c \, S \rt) \, S + d \, p \\
-    &\text{where~} a = -0.0575, \, b = 1.710523~10^{-3}, \, c = -2.154996~10^{-4} \\ 
+    &\text{where~} a = -0.0575, \, b = 1.710523~10^{-3}, \, c = -2.154996~10^{-4} \\
     &\text{and~} d = -7.53~10^{-3}
     \end{split}
@@ -1364,5 +1365,5 @@
 
 \autoref{eq:tra_eos_fzp} is only used to compute the potential freezing point of sea water
-(\ie referenced to the surface $p = 0$),
+(\ie\ referenced to the surface $p = 0$),
 thus the pressure dependent terms in \autoref{eq:tra_eos_fzp} (last term) have been dropped.
 The freezing point is computed through \textit{eos\_fzp},
@@ -1370,5 +1371,5 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%        Potential Energy     
+%        Potential Energy
 % -------------------------------------------------------------------------------------------------------------
 %\subsection{Potential Energy anomalies}
@@ -1379,5 +1380,5 @@
 
 % ================================================================
-% Horizontal Derivative in zps-coordinate 
+% Horizontal Derivative in zps-coordinate
 % ================================================================
 \section[Horizontal derivative in \textit{zps}-coordinate (\textit{zpshde.F90})]
@@ -1385,5 +1386,5 @@
 \label{sec:TRA_zpshde}
 
-\gmcomment{STEVEN: to be consistent with earlier discussion of differencing and averaging operators, 
+\gmcomment{STEVEN: to be consistent with earlier discussion of differencing and averaging operators,
 I've changed "derivative" to "difference" and "mean" to "average"}
 
@@ -1427,5 +1428,5 @@
   \rt.
 \]
-and the resulting forms for the horizontal difference and the horizontal average value of $T$ at a $U$-point are: 
+and the resulting forms for the horizontal difference and the horizontal average value of $T$ at a $U$-point are:
 \begin{equation}
   \label{eq:zps_hde}
@@ -1453,5 +1454,5 @@
 Instead of forming a linear approximation of density, we compute $\widetilde \rho$ from the interpolated values of
 $T$ and $S$, and the pressure at a $u$-point
-(in the equation of state pressure is approximated by depth, see \autoref{subsec:TRA_eos}): 
+(in the equation of state pressure is approximated by depth, see \autoref{subsec:TRA_eos}):
 \[
   % \label{eq:zps_hde_rho}
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_ZDF.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_ZDF.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_ZDF.tex	(revision 11435)
@@ -8,5 +8,5 @@
 \label{chap:ZDF}
 
-\minitoc
+\chaptertoc
 
 %gm% Add here a small introduction to ZDF and naming of the different physics (similar to what have been written for TRA and DYN.
@@ -25,7 +25,7 @@
 At the surface they are prescribed from the surface forcing (see \autoref{chap:SBC}),
 while at the bottom they are set to zero for heat and salt,
-unless a geothermal flux forcing is prescribed as a bottom boundary condition (\ie \np{ln\_trabbc} defined,
+unless a geothermal flux forcing is prescribed as a bottom boundary condition (\ie\ \np{ln\_trabbc} defined,
 see \autoref{subsec:TRA_bbc}), and specified through a bottom friction parameterisation for momentum
-(see \autoref{sec:ZDF_drg}). 
+(see \autoref{sec:ZDF_drg}).
 
 In this section we briefly discuss the various choices offered to compute the vertical eddy viscosity and
@@ -37,5 +37,5 @@
 the \mdl{zdfric}, \mdl{zdftke} or \mdl{zdfgls} or \mdl{zdfosm} modules.
 The trends due to the vertical momentum and tracer diffusion, including the surface forcing,
-are computed and added to the general trend in the \mdl{dynzdf} and \mdl{trazdf} modules, respectively. 
+are computed and added to the general trend in the \mdl{dynzdf} and \mdl{trazdf} modules, respectively.
 %These trends can be computed using either a forward time stepping scheme
 %(namelist parameter \np{ln\_zdfexp}\forcode{ = .true.}) or a backward time stepping scheme
@@ -49,5 +49,5 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%        Constant 
+%        Constant
 % -------------------------------------------------------------------------------------------------------------
 \subsection[Constant (\forcode{ln_zdfcst = .true.})]
@@ -55,5 +55,5 @@
 \label{subsec:ZDF_cst}
 
-Options are defined through the \ngn{namzdf} namelist variables.
+Options are defined through the \nam{zdf} namelist variables.
 When \np{ln\_zdfcst} is defined, the momentum and tracer vertical eddy coefficients are set to
 constant values over the whole ocean.
@@ -66,5 +66,5 @@
 \end{align*}
 
-These values are set through the \np{rn\_avm0} and \np{rn\_avt0} namelist parameters. 
+These values are set through the \np{rn\_avm0} and \np{rn\_avt0} namelist parameters.
 In all cases, do not use values smaller that those associated with the molecular viscosity and diffusivity,
 that is $\sim10^{-6}~m^2.s^{-1}$ for momentum, $\sim10^{-7}~m^2.s^{-1}$ for temperature and
@@ -84,10 +84,10 @@
 
 When \np{ln\_zdfric}\forcode{ = .true.}, a local Richardson number dependent formulation for the vertical momentum and
-tracer eddy coefficients is set through the \ngn{namzdf\_ric} namelist variables.
-The vertical mixing coefficients are diagnosed from the large scale variables computed by the model. 
+tracer eddy coefficients is set through the \nam{zdf\_ric} namelist variables.
+The vertical mixing coefficients are diagnosed from the large scale variables computed by the model.
 \textit{In situ} measurements have been used to link vertical turbulent activity to large scale ocean structures.
 The hypothesis of a mixing mainly maintained by the growth of Kelvin-Helmholtz like instabilities leads to
 a dependency between the vertical eddy coefficients and the local Richardson number
-(\ie the ratio of stratification to vertical shear).
+(\ie\ the ratio of stratification to vertical shear).
 Following \citet{pacanowski.philander_JPO81}, the following formulation has been implemented:
 \[
@@ -101,5 +101,5 @@
 \]
 where $Ri = N^2 / \left(\partial_z \textbf{U}_h \right)^2$ is the local Richardson number,
-$N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}), 
+$N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}),
 $A_b^{vT} $ and $A_b^{vm}$ are the constant background values set as in the constant case
 (see \autoref{subsec:ZDF_cst}), and $A_{ric}^{vT} = 10^{-4}~m^2.s^{-1}$ is the maximum value that
@@ -130,5 +130,5 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%        TKE Turbulent Closure Scheme 
+%        TKE Turbulent Closure Scheme
 % -------------------------------------------------------------------------------------------------------------
 \subsection[TKE turbulent closure scheme (\forcode{ln_zdftke = .true.})]
@@ -144,5 +144,5 @@
 and a closure assumption for the turbulent length scales.
 This turbulent closure model has been developed by \citet{bougeault.lacarrere_MWR89} in the atmospheric case,
-adapted by \citet{gaspar.gregoris.ea_JGR90} for the oceanic case, and embedded in OPA, the ancestor of NEMO,
+adapted by \citet{gaspar.gregoris.ea_JGR90} for the oceanic case, and embedded in OPA, the ancestor of \NEMO,
 by \citet{blanke.delecluse_JPO93} for equatorial Atlantic simulations.
 Since then, significant modifications have been introduced by \citet{madec.delecluse.ea_NPM98} in both the implementation and
@@ -167,9 +167,9 @@
   \end{split}
 \]
-where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}), 
-$l_{\epsilon }$ and $l_{\kappa }$ are the dissipation and mixing length scales, 
+where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}),
+$l_{\epsilon }$ and $l_{\kappa }$ are the dissipation and mixing length scales,
 $P_{rt}$ is the Prandtl number, $K_m$ and $K_\rho$ are the vertical eddy viscosity and diffusivity coefficients.
 The constants $C_k =  0.1$ and $C_\epsilon = \sqrt {2} /2$ $\approx 0.7$ are designed to deal with
-vertical mixing at any depth \citep{gaspar.gregoris.ea_JGR90}. 
+vertical mixing at any depth \citep{gaspar.gregoris.ea_JGR90}.
 They are set through namelist parameters \np{nn\_ediff} and \np{nn\_ediss}.
 $P_{rt}$ can be set to unity or, following \citet{blanke.delecluse_JPO93}, be a function of the local Richardson number, $R_i$:
@@ -199,5 +199,5 @@
 too weak vertical diffusion.
 They must be specified at least larger than the molecular values, and are set through \np{rn\_avm0} and
-\np{rn\_avt0} (\ngn{namzdf} namelist, see \autoref{subsec:ZDF_cst}).
+\np{rn\_avt0} (\nam{zdf} namelist, see \autoref{subsec:ZDF_cst}).
 
 \subsubsection{Turbulent length scale}
@@ -227,5 +227,5 @@
 \autoref{eq:tke_mxl_constraint} means that the vertical variations of the length scale cannot be larger than
 the variations of depth.
-It provides a better approximation of the \citet{gaspar.gregoris.ea_JGR90} formulation while being much less 
+It provides a better approximation of the \citet{gaspar.gregoris.ea_JGR90} formulation while being much less
 time consuming.
 In particular, it allows the length scale to be limited not only by the distance to the surface or
@@ -256,5 +256,5 @@
   \end{aligned}
 \]
-where $l^{(k)}$ is computed using \autoref{eq:tke_mxl0_1}, \ie $l^{(k)} = \sqrt {2 {\bar e}^{(k)} / {N^2}^{(k)} }$.
+where $l^{(k)}$ is computed using \autoref{eq:tke_mxl0_1}, \ie\ $l^{(k)} = \sqrt {2 {\bar e}^{(k)} / {N^2}^{(k)} }$.
 
 In the \np{nn\_mxl}\forcode{ = 2} case, the dissipation and mixing length scales take the same value:
@@ -283,6 +283,6 @@
 This results in a reduction of summertime surface temperature when the mixed layer is relatively shallow.
 The \citet{mellor.blumberg_JPO04} modifications acts on surface length scale and TKE values and
-air-sea drag coefficient. 
-The latter concerns the bulk formulae and is not discussed here. 
+air-sea drag coefficient.
+The latter concerns the bulk formulae and is not discussed here.
 
 Following \citet{craig.banner_JPO94}, the boundary condition on surface TKE value is :
@@ -292,5 +292,5 @@
 \end{equation}
 where $\alpha_{CB}$ is the \citet{craig.banner_JPO94} constant of proportionality which depends on the ''wave age'',
-ranging from 57 for mature waves to 146 for younger waves \citep{mellor.blumberg_JPO04}. 
+ranging from 57 for mature waves to 146 for younger waves \citep{mellor.blumberg_JPO04}.
 The boundary condition on the turbulent length scale follows the Charnock's relation:
 \begin{equation}
@@ -303,9 +303,9 @@
 $\alpha_{CB} = 100$ the Craig and Banner's value.
 As the surface boundary condition on TKE is prescribed through $\bar{e}_o = e_{bb} |\tau| / \rho_o$,
-with $e_{bb}$ the \np{rn\_ebb} namelist parameter, setting \np{rn\_ebb}\forcode{ = 67.83} corresponds 
+with $e_{bb}$ the \np{rn\_ebb} namelist parameter, setting \np{rn\_ebb}\forcode{ = 67.83} corresponds
 to $\alpha_{CB} = 100$.
-Further setting  \np{ln\_mxl0=.true.},  applies \autoref{eq:ZDF_Lsbc} as the surface boundary condition on the length scale,
+Further setting  \np{ln\_mxl0}\forcode{ =.true.},  applies \autoref{eq:ZDF_Lsbc} as the surface boundary condition on the length scale,
 with $\beta$ hard coded to the Stacey's value.
-Note that a minimal threshold of \np{rn\_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters) is applied on the 
+Note that a minimal threshold of \np{rn\_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters) is applied on the
 surface $\bar{e}$ value.
 
@@ -319,5 +319,5 @@
 The detailed physics behind LC is described in, for example, \citet{craik.leibovich_JFM76}.
 The prevailing explanation is that LC arise from a nonlinear interaction between the Stokes drift and
-wind drift currents. 
+wind drift currents.
 
 Here we introduced in the TKE turbulent closure the simple parameterization of Langmuir circulations proposed by
@@ -326,14 +326,14 @@
 an extra source term of TKE, $P_{LC}$.
 The presence of $P_{LC}$ in \autoref{eq:zdftke_e}, the TKE equation, is controlled by setting \np{ln\_lc} to
-\forcode{.true.} in the \ngn{namzdf\_tke} namelist.
- 
+\forcode{.true.} in the \nam{zdf\_tke} namelist.
+
 By making an analogy with the characteristic convective velocity scale (\eg, \citet{dalessio.abdella.ea_JPO98}),
-$P_{LC}$ is assumed to be : 
+$P_{LC}$ is assumed to be :
 \[
 P_{LC}(z) = \frac{w_{LC}^3(z)}{H_{LC}}
 \]
 where $w_{LC}(z)$ is the vertical velocity profile of LC, and $H_{LC}$ is the LC depth.
-With no information about the wave field, $w_{LC}$ is assumed to be proportional to 
-the Stokes drift $u_s = 0.377\,\,|\tau|^{1/2}$, where $|\tau|$ is the surface wind stress module 
+With no information about the wave field, $w_{LC}$ is assumed to be proportional to
+the Stokes drift $u_s = 0.377\,\,|\tau|^{1/2}$, where $|\tau|$ is the surface wind stress module
 \footnote{Following \citet{li.garrett_JMR93}, the surface Stoke drift velocity may be expressed as
   $u_s =  0.016 \,|U_{10m}|$.
@@ -343,5 +343,5 @@
 For the vertical variation, $w_{LC}$ is assumed to be zero at the surface as well as at
 a finite depth $H_{LC}$ (which is often close to the mixed layer depth),
-and simply varies as a sine function in between (a first-order profile for the Langmuir cell structures). 
+and simply varies as a sine function in between (a first-order profile for the Langmuir cell structures).
 The resulting expression for $w_{LC}$ is :
 \[
@@ -355,9 +355,9 @@
 The chosen value yields maximum vertical velocities $w_{LC}$ of the order of a few centimeters per second.
 The value of $c_{LC}$ is set through the \np{rn\_lc} namelist parameter,
-having in mind that it should stay between 0.15 and 0.54 \citep{axell_JGR02}. 
+having in mind that it should stay between 0.15 and 0.54 \citep{axell_JGR02}.
 
 The $H_{LC}$ is estimated in a similar way as the turbulent length scale of TKE equations:
 $H_{LC}$ is the depth to which a water parcel with kinetic energy due to Stoke drift can reach on its own by
-converting its kinetic energy to potential energy, according to 
+converting its kinetic energy to potential energy, according to
 \[
 - \int_{-H_{LC}}^0 { N^2\;z  \;dz} = \frac{1}{2} u_s^2
@@ -370,11 +370,11 @@
 produce mixed-layer depths that are too shallow during summer months and windy conditions.
 This bias is particularly acute over the Southern Ocean.
-To overcome this systematic bias, an ad hoc parameterization is introduced into the TKE scheme \cite{rodgers.aumont.ea_B14}. 
-The parameterization is an empirical one, \ie not derived from theoretical considerations,
-but rather is meant to account for observed processes that affect the density structure of 
-the ocean’s planetary boundary layer that are not explicitly captured by default in the TKE scheme 
-(\ie near-inertial oscillations and ocean swells and waves).
-
-When using this parameterization (\ie when \np{nn\_etau}\forcode{ = 1}),
+To overcome this systematic bias, an ad hoc parameterization is introduced into the TKE scheme \cite{rodgers.aumont.ea_B14}.
+The parameterization is an empirical one, \ie\ not derived from theoretical considerations,
+but rather is meant to account for observed processes that affect the density structure of
+the ocean’s planetary boundary layer that are not explicitly captured by default in the TKE scheme
+(\ie\ near-inertial oscillations and ocean swells and waves).
+
+When using this parameterization (\ie\ when \np{nn\_etau}\forcode{ = 1}),
 the TKE input to the ocean ($S$) imposed by the winds in the form of near-inertial oscillations,
 swell and waves is parameterized by \autoref{eq:ZDF_Esbc} the standard TKE surface boundary condition,
@@ -387,31 +387,31 @@
 penetrates in the ocean, $h_\tau$ is a vertical mixing length scale that controls exponential shape of
 the penetration, and $f_i$ is the ice concentration
-(no penetration if $f_i=1$, \ie if the ocean is entirely covered by sea-ice).
+(no penetration if $f_i=1$, \ie\ if the ocean is entirely covered by sea-ice).
 The value of $f_r$, usually a few percents, is specified through \np{rn\_efr} namelist parameter.
 The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np{nn\_etau}\forcode{ = 0}) or
 a latitude dependent value (varying from 0.5~m at the Equator to a maximum value of 30~m at high latitudes
-(\np{nn\_etau}\forcode{ = 1}). 
+(\np{nn\_etau}\forcode{ = 1}).
 
 Note that two other option exist, \np{nn\_etau}\forcode{ = 2, 3}.
 They correspond to applying \autoref{eq:ZDF_Ehtau} only at the base of the mixed layer,
-or to using the high frequency part of the stress to evaluate the fraction of TKE that penetrates the ocean. 
+or to using the high frequency part of the stress to evaluate the fraction of TKE that penetrates the ocean.
 Those two options are obsolescent features introduced for test purposes.
-They will be removed in the next release. 
+They will be removed in the next release.
 
 % This should be explain better below what this rn_eice parameter is meant for:
 In presence of Sea Ice, the value of this mixing can be modulated by the \np{rn\_eice} namelist parameter.
 This parameter varies from \forcode{0} for no effect to \forcode{4} to suppress the TKE input into the ocean when Sea Ice concentration
-is greater than 25\%. 
-
-% from Burchard et al OM 2008 : 
-% the most critical process not reproduced by statistical turbulence models is the activity of 
-% internal waves and their interaction with turbulence. After the Reynolds decomposition, 
-% internal waves are in principle included in the RANS equations, but later partially 
-% excluded by the hydrostatic assumption and the model resolution. 
-% Thus far, the representation of internal wave mixing in ocean models has been relatively crude 
-% (\eg Mellor, 1989; Large et al., 1994; Meier, 2001; Axell, 2002; St. Laurent and Garrett, 2002).
-
-% -------------------------------------------------------------------------------------------------------------
-%        GLS Generic Length Scale Scheme 
+is greater than 25\%.
+
+% from Burchard et al OM 2008 :
+% the most critical process not reproduced by statistical turbulence models is the activity of
+% internal waves and their interaction with turbulence. After the Reynolds decomposition,
+% internal waves are in principle included in the RANS equations, but later partially
+% excluded by the hydrostatic assumption and the model resolution.
+% Thus far, the representation of internal wave mixing in ocean models has been relatively crude
+% (\eg\ Mellor, 1989; Large et al., 1994; Meier, 2001; Axell, 2002; St. Laurent and Garrett, 2002).
+
+% -------------------------------------------------------------------------------------------------------------
+%        GLS Generic Length Scale Scheme
 % -------------------------------------------------------------------------------------------------------------
 \subsection[GLS: Generic Length Scale (\forcode{ln_zdfgls = .true.})]
@@ -427,8 +427,8 @@
 one for the turbulent kinetic energy $\bar {e}$, and another for the generic length scale,
 $\psi$ \citep{umlauf.burchard_JMR03, umlauf.burchard_CSR05}.
-This later variable is defined as: $\psi = {C_{0\mu}}^{p} \ {\bar{e}}^{m} \ l^{n}$, 
+This later variable is defined as: $\psi = {C_{0\mu}}^{p} \ {\bar{e}}^{m} \ l^{n}$,
 where the triplet $(p, m, n)$ value given in Tab.\autoref{tab:GLS} allows to recover a number of
 well-known turbulent closures ($k$-$kl$ \citep{mellor.yamada_RG82}, $k$-$\epsilon$ \citep{rodi_JGR87},
-$k$-$\omega$ \citep{wilcox_AJ88} among others \citep{umlauf.burchard_JMR03,kantha.carniel_JMR03}). 
+$k$-$\omega$ \citep{wilcox_AJ88} among others \citep{umlauf.burchard_JMR03,kantha.carniel_JMR03}).
 The GLS scheme is given by the following set of equations:
 \begin{equation}
@@ -467,9 +467,9 @@
 \]
 where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}) and
-$\epsilon$ the dissipation rate. 
+$\epsilon$ the dissipation rate.
 The constants $C_1$, $C_2$, $C_3$, ${\sigma_e}$, ${\sigma_{\psi}}$ and the wall function ($Fw$) depends of
 the choice of the turbulence model.
 Four different turbulent models are pre-defined (\autoref{tab:GLS}).
-They are made available through the \np{nn\_clo} namelist parameter. 
+They are made available through the \np{nn\_clo} namelist parameter.
 
 %--------------------------------------------------TABLE--------------------------------------------------
@@ -497,5 +497,5 @@
       \protect\label{tab:GLS}
       Set of predefined GLS parameters, or equivalently predefined turbulence models available with
-      \protect\np{ln\_zdfgls}\forcode{ = .true.} and controlled by the \protect\np{nn\_clos} namelist variable in \protect\ngn{namzdf\_gls}.
+      \protect\np{ln\_zdfgls}\forcode{ = .true.} and controlled by the \protect\np{nn\_clos} namelist variable in \protect\nam{zdf\_gls}.
     }
   \end{center}
@@ -508,5 +508,5 @@
 $C_{\mu}$ and $C_{\mu'}$ are calculated from stability function proposed by \citet{galperin.kantha.ea_JAS88},
 or by \citet{kantha.clayson_JGR94} or one of the two functions suggested by \citet{canuto.howard.ea_JPO01}
-(\np{nn\_stab\_func}\forcode{ = 0, 3}, resp.).  
+(\np{nn\_stab\_func}\forcode{ = 0, 3}, resp.).
 The value of $C_{0\mu}$ depends on the choice of the stability function.
 
@@ -516,5 +516,5 @@
 \np{rn\_crban}\forcode{ > 0.} \citep{craig.banner_JPO94, mellor.blumberg_JPO04}.
 The \np{rn\_crban} namelist parameter is $\alpha_{CB}$ in \autoref{eq:ZDF_Esbc} and
-\np{rn\_charn} provides the value of $\beta$ in \autoref{eq:ZDF_Lsbc}. 
+\np{rn\_charn} provides the value of $\beta$ in \autoref{eq:ZDF_Lsbc}.
 
 The $\psi$ equation is known to fail in stably stratified flows, and for this reason
@@ -531,9 +531,9 @@
 the TKE case described in \autoref{subsec:ZDF_tke_ene} \citep{burchard_OM02}.
 Evaluation of the 4 GLS turbulent closure schemes can be found in \citet{warner.sherwood.ea_OM05} in ROMS model and
- in \citet{reffray.guillaume.ea_GMD15} for the \NEMO model.
-
-
-% -------------------------------------------------------------------------------------------------------------
-%        OSM OSMOSIS BL Scheme 
+ in \citet{reffray.guillaume.ea_GMD15} for the \NEMO\ model.
+
+
+% -------------------------------------------------------------------------------------------------------------
+%        OSM OSMOSIS BL Scheme
 % -------------------------------------------------------------------------------------------------------------
 \subsection[OSM: OSMosis boundary layer scheme (\forcode{ln_zdfosm = .true.})]
@@ -562,5 +562,5 @@
       Illustration of the subgrid kinetic energy integration in GLS and TKE schemes and its links to the momentum and tracer time integration.
     }
-  \end{center}  
+  \end{center}
 \end{figure}
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -577,5 +577,5 @@
 With this framework, the total loss of kinetic energy (in 1D for the demonstration) due to
 the vertical momentum diffusion is obtained by multiplying this quantity by $u^t$ and
-summing the result vertically:   
+summing the result vertically:
 \begin{equation}
   \label{eq:energ1}
@@ -613,5 +613,5 @@
   \end{split}
 \end{equation}
-where we use $N^2 = -g \,\partial_k \rho / (e_3 \rho)$. 
+where we use $N^2 = -g \,\partial_k \rho / (e_3 \rho)$.
 The first term of the right hand side of \autoref{eq:energ2} is always zero because
 there is no diffusive flux through the ocean surface and bottom).
@@ -652,5 +652,5 @@
 %The restart of the TKE scheme requires the storage of $\bar {e}$, $K_m$, $K_\rho$ and $l_\epsilon$ as
 %they all appear in the right hand side of \autoref{eq:zdftke_ene}.
-%For the latter, it is in fact the ratio $\sqrt{\bar{e}}/l_\epsilon$ which is stored. 
+%For the latter, it is in fact the ratio $\sqrt{\bar{e}}/l_\epsilon$ which is stored.
 
 % ================================================================
@@ -660,5 +660,5 @@
 \label{sec:ZDF_conv}
 
-Static instabilities (\ie light potential densities under heavy ones) may occur at particular ocean grid points.
+Static instabilities (\ie\ light potential densities under heavy ones) may occur at particular ocean grid points.
 In nature, convective processes quickly re-establish the static stability of the water column.
 These processes have been removed from the model via the hydrostatic assumption so they must be parameterized.
@@ -668,5 +668,5 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%       Non-Penetrative Convective Adjustment 
+%       Non-Penetrative Convective Adjustment
 % -------------------------------------------------------------------------------------------------------------
 \subsection[Non-penetrative convective adjustment (\forcode{ln_tranpc = .true.})]
@@ -696,9 +696,9 @@
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
-Options are defined through the \ngn{namzdf} namelist variables.
+Options are defined through the \nam{zdf} namelist variables.
 The non-penetrative convective adjustment is used when \np{ln\_zdfnpc}\forcode{ = .true.}.
 It is applied at each \np{nn\_npc} time step and mixes downwards instantaneously the statically unstable portion of
 the water column, but only until the density structure becomes neutrally stable
-(\ie until the mixed portion of the water column has \textit{exactly} the density of the water just below)
+(\ie\ until the mixed portion of the water column has \textit{exactly} the density of the water just below)
 \citep{madec.delecluse.ea_JPO91}.
 The associated algorithm is an iterative process used in the following way (\autoref{fig:npc}):
@@ -717,5 +717,5 @@
 This algorithm is significantly different from mixing statically unstable levels two by two.
 The latter procedure cannot converge with a finite number of iterations for some vertical profiles while
-the algorithm used in \NEMO converges for any profile in a number of iterations which is less than
+the algorithm used in \NEMO\ converges for any profile in a number of iterations which is less than
 the number of vertical levels.
 This property is of paramount importance as pointed out by \citet{killworth_iprc89}:
@@ -727,6 +727,6 @@
 (L. Brodeau, personnal communication).
 Two main differences have been introduced compared to the original algorithm:
-$(i)$ the stability is now checked using the Brunt-V\"{a}is\"{a}l\"{a} frequency 
-(not the difference in potential density); 
+$(i)$ the stability is now checked using the Brunt-V\"{a}is\"{a}l\"{a} frequency
+(not the difference in potential density);
 $(ii)$ when two levels are found unstable, their thermal and haline expansion coefficients are vertically mixed in
 the same way their temperature and salinity has been mixed.
@@ -735,5 +735,5 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%       Enhanced Vertical Diffusion 
+%       Enhanced Vertical Diffusion
 % -------------------------------------------------------------------------------------------------------------
 \subsection[Enhanced vertical diffusion (\forcode{ln_zdfevd = .true.})]
@@ -741,9 +741,9 @@
 \label{subsec:ZDF_evd}
 
-Options are defined through the  \ngn{namzdf} namelist variables.
+Options are defined through the  \nam{zdf} namelist variables.
 The enhanced vertical diffusion parameterisation is used when \np{ln\_zdfevd}\forcode{ = .true.}.
-In this case, the vertical eddy mixing coefficients are assigned very large values 
+In this case, the vertical eddy mixing coefficients are assigned very large values
 in regions where the stratification is unstable
-(\ie when $N^2$ the Brunt-Vais\"{a}l\"{a} frequency is negative) \citep{lazar_phd97, lazar.madec.ea_JPO99}.
+(\ie\ when $N^2$ the Brunt-Vais\"{a}l\"{a} frequency is negative) \citep{lazar_phd97, lazar.madec.ea_JPO99}.
 This is done either on tracers only (\np{nn\_evdm}\forcode{ = 0}) or
 on both momentum and tracers (\np{nn\_evdm}\forcode{ = 1}).
@@ -762,17 +762,16 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%       Turbulent Closure Scheme 
-% -------------------------------------------------------------------------------------------------------------
-\subsection[Handling convection with turbulent closure schemes (\forcode{ln_zdf/tke/gls/osm = .true.})]
-{Handling convection with turbulent closure schemes (\protect\np{ln\_zdf/tke/gls/osm}\forcode{ = .true.})}
+%       Turbulent Closure Scheme
+% -------------------------------------------------------------------------------------------------------------
+\subsection{Handling convection with turbulent closure schemes (\forcode{ln_zdf\{tke,gls,osm\} = .true.})}
 \label{subsec:ZDF_tcs}
 
 
 The turbulent closure schemes presented in \autoref{subsec:ZDF_tke}, \autoref{subsec:ZDF_gls} and
-\autoref{subsec:ZDF_osm} (\ie \np{ln\_zdftke} or \np{ln\_zdfgls} or \np{ln\_zdfosm} defined) deal, in theory, 
+\autoref{subsec:ZDF_osm} (\ie\ \np{ln\_zdftke} or \np{ln\_zdfgls} or \np{ln\_zdfosm} defined) deal, in theory,
 with statically unstable density profiles.
 In such a case, the term corresponding to the destruction of turbulent kinetic energy through stratification in
-\autoref{eq:zdftke_e} or \autoref{eq:zdfgls_e} becomes a source term, since $N^2$ is negative. 
-It results in large values of $A_T^{vT}$ and  $A_T^{vT}$, and also of the four neighboring values at 
+\autoref{eq:zdftke_e} or \autoref{eq:zdfgls_e} becomes a source term, since $N^2$ is negative.
+It results in large values of $A_T^{vT}$ and  $A_T^{vT}$, and also of the four neighboring values at
 velocity points $A_u^{vm} {and}\;A_v^{vm}$ (up to $1\;m^2s^{-1}$).
 These large values restore the static stability of the water column in a way similar to that of
@@ -782,5 +781,5 @@
 because the mixing length scale is bounded by the distance to the sea surface.
 It can thus be useful to combine the enhanced vertical diffusion with the turbulent closure scheme,
-\ie setting the \np{ln\_zdfnpc} namelist parameter to true and
+\ie\ setting the \np{ln\_zdfnpc} namelist parameter to true and
 defining the turbulent closure (\np{ln\_zdftke} or \np{ln\_zdfgls} = \forcode{.true.}) all together.
 
@@ -804,14 +803,14 @@
 
 This parameterisation has been introduced in \mdl{zdfddm} module and is controlled by the namelist parameter
-\np{ln\_zdfddm} in \ngn{namzdf}.
+\np{ln\_zdfddm} in \nam{zdf}.
 Double diffusion occurs when relatively warm, salty water overlies cooler, fresher water, or vice versa.
 The former condition leads to salt fingering and the latter to diffusive convection.
 Double-diffusive phenomena contribute to diapycnal mixing in extensive regions of the ocean.
-\citet{merryfield.holloway.ea_JPO99} include a parameterisation of such phenomena in a global ocean model and show that 
+\citet{merryfield.holloway.ea_JPO99} include a parameterisation of such phenomena in a global ocean model and show that
 it leads to relatively minor changes in circulation but exerts significant regional influences on
 temperature and salinity.
 
 
-Diapycnal mixing of S and T are described by diapycnal diffusion coefficients 
+Diapycnal mixing of S and T are described by diapycnal diffusion coefficients
 \begin{align*}
   % \label{eq:zdfddm_Kz}
@@ -834,5 +833,5 @@
              \end{cases}
   \\ 		    \label{eq:zdfddm_f_T}
-  A_f^{vT} &= 0.7 \ A_f^{vS} / R_\rho 
+  A_f^{vT} &= 0.7 \ A_f^{vS} / R_\rho
 \end{align}
 
@@ -860,5 +859,5 @@
 
 To represent mixing of S and T by diffusive layering,  the diapycnal diffusivities suggested by
-Federov (1988) is used: 
+Federov (1988) is used:
 \begin{align}
   % \label{eq:zdfddm_d}
@@ -900,8 +899,8 @@
 %--------------------------------------------------------------------------------------------------------------
 
-Options to define the top and bottom friction are defined through the \ngn{namdrg} namelist variables.
+Options to define the top and bottom friction are defined through the \nam{drg} namelist variables.
 The bottom friction represents the friction generated by the bathymetry.
 The top friction represents the friction generated by the ice shelf/ocean interface.
-As the friction processes at the top and the bottom are treated in and identical way, 
+As the friction processes at the top and the bottom are treated in and identical way,
 the description below considers mostly the bottom friction case, if not stated otherwise.
 
@@ -921,5 +920,5 @@
 one needs a vertical diffusion coefficient $A^{vm} = 0.125$~m$^2$s$^{-1}$
 (for a Coriolis frequency $f = 10^{-4}$~m$^2$s$^{-1}$).
-With a background diffusion coefficient $A^{vm} = 10^{-4}$~m$^2$s$^{-1}$, the Ekman layer depth is only 1.4~m. 
+With a background diffusion coefficient $A^{vm} = 10^{-4}$~m$^2$s$^{-1}$, the Ekman layer depth is only 1.4~m.
 When the vertical mixing coefficient is this small, using a flux condition is equivalent to
 entering the viscous forces (either wind stress or bottom friction) as a body force over the depth of the top or
@@ -951,6 +950,6 @@
   - \frac{{\cal F}^{\textbf U}_{h}}{e_{3u}} = \frac{c_b^{\textbf U}}{e_{3u}} \;{\textbf U}_h^b
 \end{equation}
-where $\textbf{U}_h^b = (u_b\;,\;v_b)$ is the near-bottom, horizontal, ocean velocity. 
-Note than from \NEMO 4.0, drag coefficients are only computed at cell centers (\ie at T-points) and refer to as $c_b^T$ in the following. These are then linearly interpolated in space to get $c_b^\textbf{U}$ at velocity points.
+where $\textbf{U}_h^b = (u_b\;,\;v_b)$ is the near-bottom, horizontal, ocean velocity.
+Note than from \NEMO\ 4.0, drag coefficients are only computed at cell centers (\ie\ at T-points) and refer to as $c_b^T$ in the following. These are then linearly interpolated in space to get $c_b^\textbf{U}$ at velocity points.
 
 % -------------------------------------------------------------------------------------------------------------
@@ -962,5 +961,5 @@
 
 The linear friction parameterisation (including the special case of a free-slip condition) assumes that
-the friction is proportional to the interior velocity (\ie the velocity of the first/last model level):
+the friction is proportional to the interior velocity (\ie\ the velocity of the first/last model level):
 \[
   % \label{eq:zdfbfr_linear}
@@ -968,5 +967,5 @@
 \]
 where $r$ is a friction coefficient expressed in $m s^{-1}$.
-This coefficient is generally estimated by setting a typical decay time $\tau$ in the deep ocean, 
+This coefficient is generally estimated by setting a typical decay time $\tau$ in the deep ocean,
 and setting $r = H / \tau$, where $H$ is the ocean depth.
 Commonly accepted values of $\tau$ are of the order of 100 to 200 days \citep{weatherly_JMR84}.
@@ -979,5 +978,5 @@
 It can be changed by specifying \np{rn\_Uc0} (namelist parameter).
 
- For the linear friction case the drag coefficient used in the general expression \autoref{eq:zdfbfr_bdef} is: 
+ For the linear friction case the drag coefficient used in the general expression \autoref{eq:zdfbfr_bdef} is:
 \[
   % \label{eq:zdfbfr_linbfr_b}
@@ -1001,5 +1000,5 @@
  \label{subsec:ZDF_drg_nonlinear}
 
-The non-linear bottom friction parameterisation assumes that the top/bottom friction is quadratic: 
+The non-linear bottom friction parameterisation assumes that the top/bottom friction is quadratic:
 \[
   % \label{eq:zdfdrg_nonlinear}
@@ -1089,5 +1088,5 @@
 To ensure that the friction cannot reverse the direction of flow it is necessary to have:
 \[
-  |\Delta u| < \;|u| 
+  |\Delta u| < \;|u|
 \]
 \noindent which, using \autoref{eq:Eqn_drgstab}, gives:
@@ -1104,5 +1103,5 @@
 For example, if $|u| = 1$ m.s$^{-1}$, $rdt = 1800$ s, $r = 10^{-3}$ then $e_{3u}$ should be greater than 3.6 m.
 For most applications, with physically sensible parameters these restrictions should not be of concern.
-But caution may be necessary if attempts are made to locally enhance the bottom friction parameters. 
+But caution may be necessary if attempts are made to locally enhance the bottom friction parameters.
 To ensure stability limits are imposed on the top/bottom friction coefficients both
 during initialisation and at each time step.
@@ -1127,8 +1126,8 @@
 An optional implicit form of bottom friction has been implemented to improve model stability.
 We recommend this option for shelf sea and coastal ocean applications. %, especially for split-explicit time splitting.
-This option can be invoked by setting \np{ln\_drgimp} to \forcode{.true.} in the \textit{namdrg} namelist.
-%This option requires \np{ln\_zdfexp} to be \forcode{.false.} in the \textit{namzdf} namelist. 
-
-This implementation is performed in \mdl{dynzdf} where the following boundary conditions are set while solving the fully implicit diffusion step: 
+This option can be invoked by setting \np{ln\_drgimp} to \forcode{.true.} in the \nam{drg} namelist.
+%This option requires \np{ln\_zdfexp} to be \forcode{.false.} in the \nam{zdf} namelist.
+
+This implementation is performed in \mdl{dynzdf} where the following boundary conditions are set while solving the fully implicit diffusion step:
 
 At the top (below an ice shelf cavity):
@@ -1146,5 +1145,5 @@
 \]
 
-where $t$ and $b$ refers to top and bottom layers respectively. 
+where $t$ and $b$ refers to top and bottom layers respectively.
 Superscript $n+1$ means the velocity used in the friction formula is to be calculated, so it is implicit.
 
@@ -1156,13 +1155,13 @@
  \label{subsec:ZDF_drg_ts}
 
-With split-explicit free surface, the sub-stepping of barotropic equations needs the knowledge of top/bottom stresses. An obvious way to satisfy this is to take them as constant over the course of the barotropic integration and equal to the value used to update the baroclinic momentum trend. Provided \np{ln\_drgimp}\forcode{= .false.} and a centred or \textit{leap-frog} like integration of barotropic equations is used (\ie \forcode{ln_bt_fw = .false.}, cf \autoref{subsec:DYN_spg_ts}), this does ensure that barotropic and baroclinic dynamics feel the same stresses during one leapfrog time step. However, if \np{ln\_drgimp}\forcode{= .true.},  stresses depend on the \textit{after} value of the velocities which themselves depend on the barotropic iteration result. This cyclic dependency makes difficult obtaining consistent stresses in 2d and 3d dynamics. Part of this mismatch is then removed when setting the final barotropic component of 3d velocities to the time splitting estimate. This last step can be seen as a necessary evil but should be minimized since it interferes with the adjustment to the boundary conditions. 
-
-The strategy to handle top/bottom stresses with split-explicit free surface in \NEMO is as follows:
+With split-explicit free surface, the sub-stepping of barotropic equations needs the knowledge of top/bottom stresses. An obvious way to satisfy this is to take them as constant over the course of the barotropic integration and equal to the value used to update the baroclinic momentum trend. Provided \np{ln\_drgimp}\forcode{= .false.} and a centred or \textit{leap-frog} like integration of barotropic equations is used (\ie\ \forcode{ln_bt_fw = .false.}, cf \autoref{subsec:DYN_spg_ts}), this does ensure that barotropic and baroclinic dynamics feel the same stresses during one leapfrog time step. However, if \np{ln\_drgimp}\forcode{= .true.},  stresses depend on the \textit{after} value of the velocities which themselves depend on the barotropic iteration result. This cyclic dependency makes difficult obtaining consistent stresses in 2d and 3d dynamics. Part of this mismatch is then removed when setting the final barotropic component of 3d velocities to the time splitting estimate. This last step can be seen as a necessary evil but should be minimized since it interferes with the adjustment to the boundary conditions.
+
+The strategy to handle top/bottom stresses with split-explicit free surface in \NEMO\ is as follows:
 \begin{enumerate}
 \item To extend the stability of the barotropic sub-stepping, bottom stresses are refreshed at each sub-iteration. The baroclinic part of the flow entering the stresses is frozen at the initial time of the barotropic iteration. In case of non-linear friction, the drag coefficient is also constant.
 \item In case of an implicit drag, specific computations are performed in \mdl{dynzdf} which renders the overall scheme mixed explicit/implicit: the barotropic components of 3d velocities are removed before seeking for the implicit vertical diffusion result. Top/bottom stresses due to the barotropic components are explicitly accounted for thanks to the updated values of barotropic velocities. Then the implicit solution of 3d velocities is obtained. Lastly, the residual barotropic component is replaced by the time split estimate.
-\end{enumerate} 
-
-Note that other strategies are possible, like considering vertical diffusion step in advance, \ie prior barotropic integration.  
+\end{enumerate}
+
+Note that other strategies are possible, like considering vertical diffusion step in advance, \ie\ prior barotropic integration.
 
 
@@ -1182,5 +1181,5 @@
 the approach originally proposed by \citet{st-laurent.simmons.ea_GRL02}.
 A three-dimensional field of internal wave energy dissipation $\epsilon(x,y,z)$ is first constructed,
-and the resulting diffusivity is obtained as 
+and the resulting diffusivity is obtained as
 \[
   % \label{eq:Kwave}
@@ -1198,6 +1197,6 @@
 the mixing efficiency is constant.
 
-In addition to the mixing efficiency, the ratio of salt to heat diffusivities can chosen to vary 
-as a function of $Re_b$ by setting the \np{ln\_tsdiff} parameter to \forcode{.true.}, a recommended choice. 
+In addition to the mixing efficiency, the ratio of salt to heat diffusivities can chosen to vary
+as a function of $Re_b$ by setting the \np{ln\_tsdiff} parameter to \forcode{.true.}, a recommended choice.
 This parameterization of differential mixing, due to \cite{jackson.rehmann_JPO14},
 is implemented as in \cite{de-lavergne.madec.ea_JPO16}.
@@ -1211,5 +1210,5 @@
   F_{pyc}(i,j,k) &\propto N^{n_p}\\
   F_{bot}(i,j,k) &\propto N^2 \, e^{- h_{wkb} / h_{bot} }
-\end{align*} 
+\end{align*}
 In the above formula, $h_{ab}$ denotes the height above bottom,
 $h_{wkb}$ denotes the WKB-stretched height above bottom, defined by
@@ -1217,5 +1216,5 @@
   h_{wkb} = H \, \frac{ \int_{-H}^{z} N \, dz' } { \int_{-H}^{\eta} N \, dz'  } \; ,
 \]
-The $n_p$ parameter (given by \np{nn\_zpyc} in \ngn{namzdf\_iwm} namelist)
+The $n_p$ parameter (given by \np{nn\_zpyc} in \nam{zdf\_iwm} namelist)
 controls the stratification-dependence of the pycnocline-intensified dissipation.
 It can take values of $1$ (recommended) or $2$.
@@ -1229,5 +1228,5 @@
 
 % ================================================================
-% surface wave-induced mixing 
+% surface wave-induced mixing
 % ================================================================
 \section[Surface wave-induced mixing (\forcode{ln_zdfswm = .true.})]
@@ -1237,5 +1236,5 @@
 Surface waves produce an enhanced mixing through wave-turbulence interaction.
 In addition to breaking waves induced turbulence (\autoref{subsec:ZDF_tke}),
-the influence of non-breaking waves can be accounted introducing 
+the influence of non-breaking waves can be accounted introducing
 wave-induced viscosity and diffusivity as a function of the wave number spectrum.
 Following \citet{qiao.yuan.ea_OD10}, a formulation of wave-induced mixing coefficient
@@ -1247,15 +1246,15 @@
 \end{equation}
 
-Where $B_{v}$ is the wave-induced mixing coefficient, $A$ is the wave amplitude, 
-${U}_{st}$ is the Stokes Drift velocity, $k$ is the wave number and $\alpha$ 
-is a constant which should be determined by observations or 
+Where $B_{v}$ is the wave-induced mixing coefficient, $A$ is the wave amplitude,
+${U}_{st}$ is the Stokes Drift velocity, $k$ is the wave number and $\alpha$
+is a constant which should be determined by observations or
 numerical experiments and is set to be 1.
 
-The coefficient $B_{v}$ is then directly added to the vertical viscosity 
+The coefficient $B_{v}$ is then directly added to the vertical viscosity
 and diffusivity coefficients.
 
 In order to account for this contribution set: \forcode{ln_zdfswm = .true.},
 then wave interaction has to be activated through \forcode{ln_wave = .true.},
-the Stokes Drift can be evaluated by setting \forcode{ln_sdw = .true.} 
+the Stokes Drift can be evaluated by setting \forcode{ln_sdw = .true.}
 (see \autoref{subsec:SBC_wave_sdw})
 and the needed wave fields can be provided either in forcing or coupled mode
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_conservation.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_conservation.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_conservation.tex	(revision 11435)
@@ -8,5 +8,5 @@
 \chapter{Invariants of the Primitive Equations}
 \label{chap:Invariant}
-\minitoc
+\chaptertoc
 
 The continuous equations of motion have many analytic properties.
@@ -35,5 +35,5 @@
 The alternative is to use diffusive schemes such as upstream or flux corrected schemes.
 This last option was rejected because we prefer a complete handling of the model diffusion,
-\ie of the model physics rather than letting the advective scheme produces its own implicit diffusion without
+\ie\ of the model physics rather than letting the advective scheme produces its own implicit diffusion without
 controlling the space and time structure of this implicit diffusion.
 Note that in some very specific cases as passive tracer studies, the positivity of the advective scheme is required.
@@ -122,5 +122,5 @@
 This properties is satisfied locally with the choice of discretization we have made (property (II.1.9)~).
 In addition, when the equation of state is linear
-(\ie when an advective-diffusive equation for density can be derived from those of temperature and salinity)
+(\ie\ when an advective-diffusive equation for density can be derived from those of temperature and salinity)
 the change of horizontal kinetic energy due to the work of pressure forces is balanced by the change of
 potential energy due to buoyancy forces:
@@ -283,5 +283,5 @@
 In discrete form, all these properties are satisfied in $z$-coordinate (see Appendix C).
 In $s$-coordinates, only first order properties can be demonstrated,
-\ie the vertical momentum physics conserve momentum, potential vorticity, and horizontal divergence.
+\ie\ the vertical momentum physics conserve momentum, potential vorticity, and horizontal divergence.
 
 % -------------------------------------------------------------------------------------------------------------
@@ -294,5 +294,5 @@
 the heat and salt contents are conserved (equations in flux form, second order centred finite differences).
 As a form flux is used to compute the temperature and salinity,
-the quadratic form of these quantities (\ie their variance) globally tends to diminish.
+the quadratic form of these quantities (\ie\ their variance) globally tends to diminish.
 As for the advective term, there is generally no strict conservation of mass even if,
 in practice, the mass is conserved with a very good accuracy. 
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_misc.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_misc.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_misc.tex	(revision 11435)
@@ -8,5 +8,5 @@
 \label{chap:MISC}
 
-\minitoc
+\chaptertoc
 
 \newpage
@@ -30,5 +30,5 @@
 are much narrow than even a single ocean grid-point.
 
-We describe briefly here the two methods that can be used in \NEMO to handle such
+We describe briefly here the two methods that can be used in \NEMO\ to handle such
 improperly resolved straits. The methods consist of opening the strait while ensuring
 that the mass exchanges through the strait are not too large by either artificially
@@ -46,5 +46,5 @@
 (\autoref{fig:MISC_strait_hand}).  This technique is sometime called "partially open face"
 or "partially closed cells".  The key issue here is only to reduce the faces of $T$-cell
-(\ie change the value of the horizontal scale factors at $u$- or $v$-point) but not the
+(\ie\ change the value of the horizontal scale factors at $u$- or $v$-point) but not the
 volume of the $T$-cell.  Indeed, reducing the volume of strait $T$-cell can easily produce
 a numerical instability at that grid point which would require a reduction of the model
@@ -57,5 +57,5 @@
 and $\texttt{e1u}*\texttt{e2v}$ respectively. That is the original surface areas of $u$-
 and $v$- cells respectively.  These areas are usually defined by the corresponding product
-within the \NEMO code but the presence of \texttt{e1e2u} and \texttt{e1e2v} in the
+within the \NEMO\ code but the presence of \texttt{e1e2u} and \texttt{e1e2v} in the
 \np{cn\_domcfg} file will suppress this calculation and use the supplied fields instead.
 If the model domain is provided by user-supplied code in \mdl{usrdef\_hgr}, then this
@@ -67,5 +67,5 @@
 via code in  \mdl{usrdef\_hgr}), whereever a Strait reduction is required. The choice of
 whether to alter \texttt{e2u} or \texttt{e1v} depends. respectively,  on whether the
-Strait in question is North-South orientated (\eg Gibraltar) or East-West orientated (\eg
+Strait in question is North-South orientated (\eg\ Gibraltar) or East-West orientated (\eg
 Lombok).
 
@@ -98,5 +98,5 @@
       \textit{Bottom}: using viscous boundary layers.
       The four fmask parameters along the strait coastlines are set to a value larger than 4,
-      \ie "strong" no-slip case (see \autoref{fig:LBC_shlat}) creating a large viscous boundary layer that
+      \ie\ "strong" no-slip case (see \autoref{fig:LBC_shlat}) creating a large viscous boundary layer that
       allows a reduced transport through the strait.
     }
@@ -117,5 +117,5 @@
       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. 
+      shown.
     }
   \end{center}
@@ -141,6 +141,6 @@
 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
+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.
@@ -189,8 +189,8 @@
 
 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. 
-
-% ================================================================
-% Sub-Domain Functionality 
+them to the domain configuration file in the utils/tools/DOMAINcfg directory.
+
+% ================================================================
+% Sub-Domain Functionality
 % ================================================================
 \section{Sub-domain functionality}
@@ -205,5 +205,5 @@
 subsetting operates for the j-direction only and works by optionally looking for and using
 a global file attribute (named: \np{open\_ocean\_jstart}) to determine the starting j-row
-for input.  The use of this option is best explained with an example: 
+for input.  The use of this option is best explained with an example:
 \medskip
 
@@ -220,9 +220,9 @@
 \begin{itemize}
 \item  Add the new attribute to any input files requiring a j-row offset, i.e:
-\begin{cmds} 
-ncatted  -a open_ocean_jstart,global,a,d,41 eORCA1_domcfg.nc 
+\begin{cmds}
+ncatted  -a open_ocean_jstart,global,a,d,41 eORCA1_domcfg.nc
 \end{cmds}
 
-\item Add the logical switch \np{ln\_use\_jattr} to \ngn{namcfg} in the configuration
+\item Add the logical switch \np{ln\_use\_jattr} to \nam{cfg} in the configuration
 namelist (if it is not already there) and set \np{.true.}
 \end{itemize}
@@ -238,10 +238,11 @@
 \end{cmds}
 
-The domain configuration file is unique in this respect since it also contains the value
-of \texttt{jpjglo} that is read and used by the model. Any other global, 2D and 3D,
-netcdf, input field can be prepared for use in a reduced domain by adding the
-\texttt{open\_ocean\_jstart} attribute to the file's  global attributes. In particular
-this is true for any field that is read by \NEMO using the following optional argument to
+The domain configuration file is unique in this respect since it also contains the value of \jp{jpjglo}
+that is read and used by the model.
+Any other global, 2D and 3D, netcdf, input field can be prepared for use in a reduced domain by adding the
+\texttt{open\_ocean\_jstart} attribute to the file's global attributes.
+In particular this is true for any field that is read by \NEMO\ using the following optional argument to
 the appropriate call to \np{iom\_get}.
+
 \begin{forlines}
 lrowattr=ln_use_jattr
@@ -294,10 +295,10 @@
 
 The numerical reproducibility of simulations on distributed memory parallel computers is a critical issue.
-In particular, within NEMO global summation of distributed arrays is most susceptible to rounding errors,
+In particular, within \NEMO\ global summation of distributed arrays is most susceptible to rounding errors,
 and their propagation and accumulation cause uncertainty in final simulation reproducibility on
 different numbers of processors.
 To avoid so, based on \citet{he.ding_JS01} review of different technics,
 we use a so called self-compensated summation method.
-The idea is to estimate the roundoff error, store it in a buffer, and then add it back in the next addition. 
+The idea is to estimate the roundoff error, store it in a buffer, and then add it back in the next addition.
 
 Suppose we need to calculate $b = a_1 + a_2 + a_3$.
@@ -317,5 +318,5 @@
 The self-compensated summation method should be used in all summation in i- and/or j-direction.
 See \mdl{closea} module for an example.
-Note also that this implementation may be sensitive to the optimization level. 
+Note also that this implementation may be sensitive to the optimization level.
 
 \subsection{MPP scalability}
@@ -339,5 +340,5 @@
 This alternative method should give identical results to the default \textsc{ALLGATHER} method and
 is recommended for large values of \np{jpni}.
-The new method is activated by setting \np{ln\_nnogather} to be true (\ngn{nammpp}).
+The new method is activated by setting \np{ln\_nnogather} to be true (\nam{mpp}).
 The reproducibility of results using the two methods should be confirmed for each new,
 non-reference configuration.
@@ -350,8 +351,8 @@
 %--------------------------------------------namctl-------------------------------------------------------
 
-\nlst{namctl} 
+\nlst{namctl}
 %--------------------------------------------------------------------------------------------------------------
 
-Options are defined through the  \ngn{namctl} namelist variables.
+Options are defined through the  \nam{ctl} namelist variables.
 
 \subsection{Vector optimisation}
@@ -360,9 +361,9 @@
 This is very a very efficient way to increase the length of vector calculations and thus
 to speed up the model on vector computers.
- 
+
 % Add here also one word on NPROMA technique that has been found useless, since compiler have made significant progress during the last decade.
- 
+
 % Add also one word on NEC specific optimisation (Novercheck option for example)
- 
+
 \subsection{Control print}
 
@@ -411,9 +412,9 @@
 at a suitably long interval. For example:
 
-\begin{verbatim}     
+\begin{verbatim}
        sn_cfctl%ptimincr  = 25
 \end{verbatim}
 
-will carry out the global communications and write the information every 25 timesteps. This 
+will carry out the global communications and write the information every 25 timesteps. This
 increment also applies to the time.step file which is otherwise updated every timestep.
 
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_model_basics.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_model_basics.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_model_basics.tex	(revision 11435)
@@ -1,2 +1,3 @@
+
 \documentclass[../main/NEMO_manual]{subfiles}
 
@@ -8,5 +9,6 @@
 \chapter{Model Basics}
 \label{chap:PE}
-\minitoc
+
+\chaptertoc
 
 \newpage
@@ -19,5 +21,5 @@
 
 % -------------------------------------------------------------------------------------------------------------
-%        Vector Invariant Formulation 
+%        Vector Invariant Formulation
 % -------------------------------------------------------------------------------------------------------------
 
@@ -26,5 +28,5 @@
 
 The ocean is a fluid that can be described to a good approximation by the primitive equations,
-\ie the Navier-Stokes equations along with a nonlinear equation of state which
+\ie\ the Navier-Stokes equations along with a nonlinear equation of state which
 couples the two active tracers (temperature and salinity) to the fluid velocity,
 plus the following additional assumptions made from scale considerations:
@@ -34,6 +36,6 @@
   \textit{spherical Earth approximation}: the geopotential surfaces are assumed to be oblate spheriods
   that follow the Earth's bulge; these spheroids are approximated by spheres with
-  gravity locally vertical (parallel to the Earth's radius) and independent of latitude 
-  \citep[][section 2]{white.hoskins.ea_QJRMS05}.   
+  gravity locally vertical (parallel to the Earth's radius) and independent of latitude
+  \citep[][section 2]{white.hoskins.ea_QJRMS05}.
 \item
   \textit{thin-shell approximation}: the ocean depth is neglected compared to the earth's radius
@@ -65,10 +67,10 @@
     \nabla \cdot \vect U = 0
   \end{equation}
- \item 
-  \textit{Neglect of additional Coriolis terms}: the Coriolis terms that vary with the cosine of latitude are neglected. 
+ \item
+  \textit{Neglect of additional Coriolis terms}: the Coriolis terms that vary with the cosine of latitude are neglected.
   These terms may be non-negligible where the Brunt-Vaisala frequency $N$ is small, either in the deep ocean or
-  in the sub-mesoscale motions of the mixed layer, or near the equator \citep[][section 1]{white.hoskins.ea_QJRMS05}. 
-  They can be consistently included as part of the ocean dynamics \citep[][section 3(d)]{white.hoskins.ea_QJRMS05} and are 
-  retained in the MIT ocean model.     
+  in the sub-mesoscale motions of the mixed layer, or near the equator \citep[][section 1]{white.hoskins.ea_QJRMS05}.
+  They can be consistently included as part of the ocean dynamics \citep[][section 3(d)]{white.hoskins.ea_QJRMS05} and are
+  retained in the MIT ocean model.
 \end{enumerate}
 
@@ -76,7 +78,7 @@
 it is useful to choose an orthogonal set of unit vectors $(i,j,k)$ linked to the Earth such that
 $k$ is the local upward vector and $(i,j)$ are two vectors orthogonal to $k$,
-\ie tangent to the geopotential surfaces.
+\ie\ tangent to the geopotential surfaces.
 Let us define the following variables: $\vect U$ the vector velocity, $\vect U = \vect U_h + w \, \vect k$
-(the subscript $h$ denotes the local horizontal vector, \ie over the $(i,j)$ plane), 
+(the subscript $h$ denotes the local horizontal vector, \ie\ over the $(i,j)$ plane),
 $T$ the potential temperature, $S$ the salinity, $\rho$ the \textit{in situ} density.
 The vector invariant form of the primitive equations in the $(i,j,k)$ vector system provides
@@ -115,7 +117,7 @@
 an air-sea or ice-sea interface at its top.
 These boundaries can be defined by two surfaces, $z = - H(i,j)$ and $z = \eta(i,j,k,t)$,
-where $H$ is the depth of the ocean bottom and $\eta$ is the height of the sea surface 
-(discretisation can introduce additional artificial ``side-wall'' boundaries). 
-Both $H$ and $\eta$ are referenced to a surface of constant geopotential (\ie a mean sea surface height) on which $z = 0$. 
+where $H$ is the depth of the ocean bottom and $\eta$ is the height of the sea surface
+(discretisation can introduce additional artificial ``side-wall'' boundaries).
+Both $H$ and $\eta$ are referenced to a surface of constant geopotential (\ie\ a mean sea surface height) on which $z = 0$.
 (\autoref{fig:ocean_bc}).
 Through these two boundaries, the ocean can exchange fluxes of heat, fresh water, salt, and momentum with
@@ -153,10 +155,10 @@
   \footnote{
     In fact, it has been shown that the heat flux associated with the solid Earth cooling
-    (\ie the geothermal heating) is not negligible for the thermohaline circulation of the world ocean
+    (\ie\ the geothermal heating) is not negligible for the thermohaline circulation of the world ocean
     (see \autoref{subsec:TRA_bbc}).
   }.
   The boundary condition is thus set to no flux of heat and salt across solid boundaries.
   For momentum, the situation is different. There is no flow across solid boundaries,
-  \ie the velocity normal to the ocean bottom and coastlines is zero (in other words,
+  \ie\ the velocity normal to the ocean bottom and coastlines is zero (in other words,
   the bottom velocity is parallel to solid boundaries). This kinematic boundary condition
   can be expressed as:
@@ -221,7 +223,7 @@
 the time step has to be very short when they are present in the model.
 The latter strategy filters out these waves since the rigid lid approximation implies $\eta = 0$,
-\ie the sea surface is the surface $z = 0$.
+\ie\ the sea surface is the surface $z = 0$.
 This well known approximation increases the surface wave speed to infinity and
-modifies certain other longwave dynamics (\eg barotropic Rossby or planetary waves).
+modifies certain other longwave dynamics (\eg\ barotropic Rossby or planetary waves).
 The rigid-lid hypothesis is an obsolescent feature in modern OGCMs.
 It has been available until the release 3.1 of \NEMO, and it has been removed in release 3.2 and followings.
@@ -246,5 +248,5 @@
 Allowing the air-sea interface to move introduces the external gravity waves (EGWs) as
 a class of solution of the primitive equations.
-These waves are barotropic (\ie nearly independent of depth) and their phase speed is quite high.
+These waves are barotropic (\ie\ nearly independent of depth) and their phase speed is quite high.
 Their time scale is short with respect to the other processes described by the primitive equations.
 
@@ -275,5 +277,5 @@
 the implicit scheme \citep{dukowicz.smith_JGR94} or
 the addition of a filtering force in the momentum equation \citep{roullet.madec_JGR00}.
-With the present release, \NEMO  offers the choice between
+With the present release, \NEMO\  offers the choice between
 an explicit free surface (see \autoref{subsec:DYN_spg_exp}) or
 a split-explicit scheme strongly inspired the one proposed by \citet{shchepetkin.mcwilliams_OM05}
@@ -293,5 +295,5 @@
 
 In many ocean circulation problems, the flow field has regions of enhanced dynamics
-(\ie surface layers, western boundary currents, equatorial currents, or ocean fronts).
+(\ie\ surface layers, western boundary currents, equatorial currents, or ocean fronts).
 The representation of such dynamical processes can be improved by
 specifically increasing the model resolution in these regions.
@@ -313,5 +315,5 @@
 $(i,j,k)$ linked to the earth such that
 $k$ is the local upward vector and $(i,j)$ are two vectors orthogonal to $k$,
-\ie along geopotential surfaces (\autoref{fig:referential}).
+\ie\ along geopotential surfaces (\autoref{fig:referential}).
 Let $(\lambda,\varphi,z)$ be the geographical coordinate system in which a position is defined by
 the latitude $\varphi(i,j)$, the longitude $\lambda(i,j)$ and
@@ -445,5 +447,5 @@
 This is the so-called \textit{vector invariant form} of the momentum advection term.
 For some purposes, it can be advantageous to write this term in the so-called flux form,
-\ie to write it as the divergence of fluxes.
+\ie\ to write it as the divergence of fluxes.
 For example, the first component of \autoref{eq:PE_vector_form} (the $i$-component) is transformed as follows:
 \begin{alignat*}{2}
@@ -484,5 +486,5 @@
 the first one is expressed as the divergence of momentum fluxes (hence the flux form name given to this formulation)
 and the second one is due to the curvilinear nature of the coordinate system used.
-The latter is called the \textit{metric} term and can be viewed as a modification of the Coriolis parameter: 
+The latter is called the \textit{metric} term and can be viewed as a modification of the Coriolis parameter:
 \[
   % \label{eq:PE_cor+metric}
@@ -491,5 +493,5 @@
 
 Note that in the case of geographical coordinate,
-\ie when $(i,j) \to (\lambda,\varphi)$ and $(e_1,e_2) \to (a \, \cos \varphi,a)$,
+\ie\ when $(i,j) \to (\lambda,\varphi)$ and $(e_1,e_2) \to (a \, \cos \varphi,a)$,
 we recover the commonly used modification of the Coriolis parameter $f \to f + (u / a) \tan \varphi$.
 
@@ -508,5 +510,5 @@
                   &+ D_u^{\vect U} + F_u^{\vect U} \\
       \pd[v]{t} = &- (\zeta + f) \, u - \frac{1}{2 e_2} \pd[]{j} (u^2 + v^2)
-                   - \frac{1}{e_3} w \pd[v]{k} - \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) \\ 
+                   - \frac{1}{e_3} w \pd[v]{k} - \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) \\
                   &+ D_v^{\vect U} + F_v^{\vect U}
     \end{split}
@@ -540,5 +542,5 @@
   \[
   % \label{eq:w_diag}
-    \pd[w]{k} = - \chi \; e_3 \qquad 
+    \pd[w]{k} = - \chi \; e_3 \qquad
   % \label{eq:hp_diag}
     \pd[p_h]{k} = - \rho \; g \; e_3
@@ -546,5 +548,5 @@
   where the divergence of the horizontal velocity, $\chi$ is given by \autoref{eq:PE_div_Uh}.
 
-\item 
+\item
   \textbf{tracer equations}:
   \begin{equation}
@@ -579,9 +581,9 @@
 Therefore, in order to represent the ocean with respect to
 the first point a space and time dependent vertical coordinate that follows the variation of the sea surface height
-\eg an \zstar-coordinate;
+\eg\ an \zstar-coordinate;
 for the second point, a space variation to fit the change of bottom topography
-\eg a terrain-following or $\sigma$-coordinate;
+\eg\ a terrain-following or $\sigma$-coordinate;
 and for the third point, one will be tempted to use a space and time dependent coordinate that
-follows the isopycnal surfaces, \eg an isopycnic coordinate.
+follows the isopycnal surfaces, \eg\ an isopycnic coordinate.
 
 In order to satisfy two or more constraints one can even be tempted to mixed these coordinate systems, as in
@@ -666,5 +668,5 @@
   \sigma_2 = \frac{1}{e_2} \; \lt. \pd[z]{j} \rt|_s
 \end{equation}
-We also introduce $\omega$, a dia-surface velocity component, defined as the velocity 
+We also introduce $\omega$, a dia-surface velocity component, defined as the velocity
 relative to the moving $s$-surfaces and normal to them:
 \[
@@ -761,5 +763,5 @@
 
 In this case, the free surface equation is nonlinear, and the variations of volume are fully taken into account.
-These coordinates systems is presented in a report \citep{levier.treguier.ea_rpt07} available on the \NEMO web site.
+These coordinates systems is presented in a report \citep{levier.treguier.ea_rpt07} available on the \NEMO\ web site.
 
 The \zstar coordinate approach is an unapproximated, non-linear free surface implementation which allows one to
@@ -784,5 +786,5 @@
 \[
   % \label{eq:PE_zstar_2}
-  \zstar = H \lt( \frac{z - \eta}{H + \eta} \rt) . 
+  \zstar = H \lt( \frac{z - \eta}{H + \eta} \rt) .
 \]
 Since the vertical displacement of the free surface is incorporated in the vertical coordinate \zstar,
@@ -831,5 +833,5 @@
 %end MOM doc %%%
 
-\newpage 
+\newpage
 
 % -------------------------------------------------------------------------------------------------------------
@@ -911,5 +913,5 @@
 In contrast, the ocean will stay at rest in a $z$-model.
 As for the truncation error, the problem can be reduced by introducing the terrain-following coordinate below
-the strongly stratified portion of the water column (\ie the main thermocline) \citep{madec.delecluse.ea_JPO96}.
+the strongly stratified portion of the water column (\ie\ the main thermocline) \citep{madec.delecluse.ea_JPO96}.
 An alternate solution consists of rotating the lateral diffusive tensor to geopotential or to isoneutral surfaces
 (see \autoref{subsec:PE_ldf}).
@@ -929,9 +931,9 @@
 
 The \ztilde -coordinate has been developed by \citet{leclair.madec_OM11}.
-It is available in \NEMO since the version 3.4 and is more robust in version 4.0 than previously. 
+It is available in \NEMO\ since the version 3.4 and is more robust in version 4.0 than previously.
 Nevertheless, it is currently not robust enough to be used in all possible configurations.
 Its use is therefore not recommended.
 
-\newpage 
+\newpage
 
 % ================================================================
@@ -947,5 +949,5 @@
 must be represented entirely in terms of large-scale patterns to close the equations.
 These effects appear in the equations as the divergence of turbulent fluxes
-(\ie fluxes associated with the mean correlation of small scale perturbations).
+(\ie\ fluxes associated with the mean correlation of small scale perturbations).
 Assuming a turbulent closure hypothesis is equivalent to choose a formulation for these fluxes.
 It is usually called the subgrid scale physics.
@@ -991,7 +993,7 @@
 All the vertical physics is embedded in the specification of the eddy coefficients.
 They can be assumed to be either constant, or function of the local fluid properties
-(\eg Richardson number, Brunt-Vais\"{a}l\"{a} frequency, distance from the boundary ...),
+(\eg\ Richardson number, Brunt-Vais\"{a}l\"{a} frequency, distance from the boundary ...),
 or computed from a turbulent closure model.
-The choices available in \NEMO are discussed in \autoref{chap:ZDF}).
+The choices available in \NEMO\ are discussed in \autoref{chap:ZDF}).
 
 % -------------------------------------------------------------------------------------------------------------
@@ -1006,5 +1008,5 @@
 and a sub mesoscale turbulence which is never explicitly solved even partially, but always parameterized.
 The formulation of lateral eddy fluxes depends on whether the mesoscale is below or above the grid-spacing
-(\ie the model is eddy-resolving or not).
+(\ie\ the model is eddy-resolving or not).
 
 In non-eddy-resolving configurations, the closure is similar to that used for the vertical physics.
@@ -1014,5 +1016,5 @@
 (or more precisely neutral surfaces \cite{mcdougall_JPO87}) rather than across them.
 As the slope of neutral surfaces is small in the ocean, a common approximation is to assume that
-the `lateral' direction is the horizontal, \ie the lateral mixing is performed along geopotential surfaces.
+the `lateral' direction is the horizontal, \ie\ the lateral mixing is performed along geopotential surfaces.
 This leads to a geopotential second order operator for lateral subgrid scale physics.
 This assumption can be relaxed: the eddy-induced turbulent fluxes can be better approached by assuming that
@@ -1021,5 +1023,5 @@
 it has components in the three space directions.
 However,
-both horizontal and isoneutral operators have no effect on mean (\ie large scale) potential energy whereas
+both horizontal and isoneutral operators have no effect on mean (\ie\ large scale) potential energy whereas
 potential energy is a main source of turbulence (through baroclinic instabilities).
 \citet{gent.mcwilliams_JPO90} proposed a parameterisation of mesoscale eddy-induced turbulence which
@@ -1065,5 +1067,5 @@
 \end{equation}
 where $r_1$ and $r_2$ are the slopes between the surface along which the diffusive operator acts and
-the model level (\eg $z$- or $s$-surfaces).
+the model level (\eg\ $z$- or $s$-surfaces).
 Note that the formulation \autoref{eq:PE_iso_tensor} is exact for
 the rotation between geopotential and $s$-surfaces,
@@ -1112,5 +1114,5 @@
 (or equivalently the isoneutral thickness diffusivity coefficient),
 and $\tilde r_1$ and $\tilde r_2$ are the slopes between isoneutral and \textit{geopotential} surfaces.
-Their values are thus independent of the vertical coordinate, but their expression depends on the coordinate: 
+Their values are thus independent of the vertical coordinate, but their expression depends on the coordinate:
 \begin{align}
   \label{eq:PE_slopes_eiv}
@@ -1126,5 +1128,5 @@
 This can be achieved in a model by tapering either the eddy coefficient or the slopes to zero in the vicinity of
 the boundaries.
-The latter strategy is used in \NEMO (cf. \autoref{chap:LDF}).
+The latter strategy is used in \NEMO\ (cf. \autoref{chap:LDF}).
 
 \subsubsection{Lateral bilaplacian tracer diffusive operator}
@@ -1148,5 +1150,5 @@
                          - \nabla_h \times \big( A^{lm} \, \zeta \; \vect k \big) \\
                       &= \lt(   \frac{1}{e_1}     \pd[ \lt( A^{lm}    \chi      \rt) ]{i} \rt.
-                              - \frac{1}{e_2 e_3} \pd[ \lt( A^{lm} \; e_3 \zeta \rt) ]{j} , 
+                              - \frac{1}{e_2 e_3} \pd[ \lt( A^{lm} \; e_3 \zeta \rt) ]{j} ,
                                 \frac{1}{e_2}     \pd[ \lt( A^{lm}    \chi      \rt) ]{j}
                          \lt. + \frac{1}{e_1 e_3} \pd[ \lt( A^{lm} \; e_3 \zeta \rt) ]{i} \rt)
@@ -1157,5 +1159,5 @@
 Unfortunately, it is only available in \textit{iso-level} direction.
 When a rotation is required
-(\ie geopotential diffusion in $s$-coordinates or isoneutral diffusion in both $z$- and $s$-coordinates),
+(\ie\ geopotential diffusion in $s$-coordinates or isoneutral diffusion in both $z$- and $s$-coordinates),
 the $u$ and $v$-fields are considered as independent scalar fields, so that the diffusive operator is given by:
 \begin{gather*}
@@ -1167,5 +1169,5 @@
 It is the same expression as those used for diffusive operator on tracers.
 It must be emphasised that such a formulation is only exact in a Cartesian coordinate system,
-\ie on a $f$- or $\beta$-plane, not on the sphere.
+\ie\ on a $f$- or $\beta$-plane, not on the sphere.
 It is also a very good approximation in vicinity of the Equator in
 a geographical coordinate system \citep{lengaigne.madec.ea_JGR03}.
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_model_basics_zstar.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_model_basics_zstar.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_model_basics_zstar.tex	(revision 11435)
@@ -18,5 +18,5 @@
 
 In that case, the free surface equation is nonlinear, and the variations of volume are fully taken into account.
-These coordinates systems is presented in a report \citep{levier.treguier.ea_rpt07} available on the \NEMO web site. 
+These coordinates systems is presented in a report \citep{levier.treguier.ea_rpt07} available on the \NEMO\ web site.
 
 \colorbox{yellow}{  end of to be updated}
@@ -24,5 +24,5 @@
 % from MOM4p1 documentation
 
-To overcome problems with vanishing surface and/or bottom cells, we consider the zstar coordinate 
+To overcome problems with vanishing surface and/or bottom cells, we consider the zstar coordinate
 \[
   % \label{eq:PE_}
@@ -40,5 +40,5 @@
 the surface height, it is clear that surfaces constant $z^\star$ are very similar to the depth surfaces.
 These properties greatly reduce difficulties of computing the horizontal pressure gradient relative to
-terrain following sigma models discussed in \autoref{subsec:PE_sco}. 
+terrain following sigma models discussed in \autoref{subsec:PE_sco}.
 Additionally, since $z^\star$ when $\eta = 0$, no flow is spontaneously generated in
 an unforced ocean starting from rest, regardless the bottom topography.
@@ -49,12 +49,12 @@
 neutral physics parameterizations in $z^\star$ models using the same techniques as in $z$-models
 (see Chapters 13-16 of Griffies (2004) for a discussion of neutral physics in $z$-models,
-as well as  \autoref{sec:LDF_slp} in this document for treatment in \NEMO). 
+as well as  \autoref{sec:LDF_slp} in this document for treatment in \NEMO).
 
 The range over which $z^\star$ varies is time independent $-H \leq z^\star \leq 0$.
 Hence, all cells remain nonvanishing, so long as the surface height maintains $\eta > ?H$.
-This is a minor constraint relative to that encountered on the surface height when using $s = z$ or $s = z - \eta$. 
+This is a minor constraint relative to that encountered on the surface height when using $s = z$ or $s = z - \eta$.
 
 Because $z^\star$ has a time independent range, all grid cells have static increments ds,
-and the sum of the ver tical increments yields the time independent ocean depth %�k ds = H. 
+and the sum of the ver tical increments yields the time independent ocean depth %�k ds = H.
 The $z^\star$ coordinate is therefore invisible to undulations of the free surface,
 since it moves along with the free surface.
@@ -64,5 +64,5 @@
 Quite generally, the time independent range for the $z^\star$ coordinate is a very convenient property that
 allows for a nearly arbitrary vertical resolution even in the presence of large amplitude fluctuations of
-the surface height, again so long as $\eta > -H$. 
+the surface height, again so long as $\eta > -H$.
 
 %%%
@@ -78,7 +78,7 @@
 %-----------------------------------------nam_dynspg----------------------------------------------------
 
-%\nlst{nam_dynspg} 
+%\nlst{nam_dynspg}
 %------------------------------------------------------------------------------------------------------------
-Options are defined through the \ngn{nam\_dynspg} namelist variables.
+Options are defined through the \nam{\_dynspg} namelist variables.
 The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}).
 The main distinction is between the fixed volume case (linear free surface or rigid lid) and
@@ -116,5 +116,5 @@
 and $\rho_w =1,000\,Kg.m^{-3}$ is the volumic mass of pure water.
 The sea-surface height is evaluated using a leapfrog scheme in combination with an Asselin time filter,
-(\ie the velocity appearing in (\autoref{eq:dynspg_ssh}) is centred in time (\textit{now} velocity). 
+(\ie\ the velocity appearing in (\autoref{eq:dynspg_ssh}) is centred in time (\textit{now} velocity).
 
 The surface pressure gradient, also evaluated using a leap-frog scheme, is then simply given by:
@@ -127,8 +127,8 @@
     \end{aligned}
   \right.
-\end{equation} 
+\end{equation}
 
 Consistent with the linearization, a $\left. \rho \right|_{k=1} / \rho_o$ factor is omitted in
-(\autoref{eq:dynspg_exp}). 
+(\autoref{eq:dynspg_exp}).
 
 %-------------------------------------------------------------
@@ -140,10 +140,10 @@
 %--------------------------------------------namdom----------------------------------------------------
 
-\nlst{namdom} 
+\nlst{namdom}
 %--------------------------------------------------------------------------------------------------------------
 The split-explicit free surface formulation used in OPA follows the one proposed by \citet{Griffies2004?}.
 The general idea is to solve the free surface equation with a small time step,
 while the three dimensional prognostic variables are solved with a longer time step that
-is a multiple of \np{rdtbt} in the \ngn{namdom} namelist (Figure III.3). 
+is a multiple of \np{rdtbt} in the \nam{dom} namelist (Figure III.3).
 
 %>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >
@@ -175,5 +175,5 @@
 The split-explicit formulation has a damping effect on external gravity waves,
 which is weaker than the filtered free surface but still significant as shown by \citet{levier.treguier.ea_rpt07} in
-the case of an analytical barotropic Kelvin wave. 
+the case of an analytical barotropic Kelvin wave.
 
 %from griffies book: .....   copy past !
@@ -188,5 +188,5 @@
   % \label{eq:DYN_spg_ts_eta}
   \eta^{(b)}(\tau,t_{n+1}) - \eta^{(b)}(\tau,t_{n+1}) (\tau,t_{n-1})
-  = 2 \Delta t \left[-\nabla \cdot \textbf{U}^{(b)}(\tau,t_n) + \text{EMP}_w(\tau) \right] 
+  = 2 \Delta t \left[-\nabla \cdot \textbf{U}^{(b)}(\tau,t_n) + \text{EMP}_w(\tau) \right]
 \]
 \begin{multline*}
@@ -205,11 +205,11 @@
 the freshwater flux $\text{EMP}_w(\tau)$, and total depth of the ocean $H(\tau)$ are held for
 the duration of the barotropic time stepping over a single cycle.
-This is also the time that sets the barotropic time steps via 
+This is also the time that sets the barotropic time steps via
 \[
   % \label{eq:DYN_spg_ts_t}
-  t_n=\tau+n\Delta t   
+  t_n=\tau+n\Delta t
 \]
 with $n$ an integer.
-The density scaled surface pressure is evaluated via 
+The density scaled surface pressure is evaluated via
 \[
   % \label{eq:DYN_spg_ts_ps}
@@ -220,5 +220,5 @@
   \end{cases}
 \]
-To get started, we assume the following initial conditions 
+To get started, we assume the following initial conditions
 \[
   % \label{eq:DYN_spg_ts_eta}
@@ -228,5 +228,5 @@
   \end{split}
 \]
-with 
+with
 \[
   % \label{eq:DYN_spg_ts_etaF}
@@ -240,5 +240,5 @@
   \textbf{U}(\tau,t_{n=1}) = \textbf{U}^{(b)}(\tau,t_{n=0}) + \Delta t \ \text{RHS}_{n=0}
 \]
-with 
+with
 \[
   % \label{eq:DYN_spg_ts_u}
@@ -246,8 +246,8 @@
 \]
 the time averaged vertically integrated transport.
-Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration. 
+Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration.
 
 Upon reaching $t_{n=N} = \tau + 2\Delta \tau$ , the vertically integrated velocity is time averaged to
-produce the updated vertically integrated velocity at baroclinic time $\tau + \Delta \tau$ 
+produce the updated vertically integrated velocity at baroclinic time $\tau + \Delta \tau$
 \[
   % \label{eq:DYN_spg_ts_u}
@@ -256,5 +256,5 @@
 \]
 The surface height on the new baroclinic time step is then determined via
-a baroclinic leap-frog using the following form 
+a baroclinic leap-frog using the following form
 \begin{equation}
   \label{eq:DYN_spg_ts_ssh}
@@ -264,11 +264,11 @@
 The use of this "big-leap-frog" scheme for the surface height ensures compatibility between
 the mass/volume budgets and the tracer budgets.
-More discussion of this point is provided in Chapter 10 (see in particular Section 10.2). 
- 
+More discussion of this point is provided in Chapter 10 (see in particular Section 10.2).
+
 In general, some form of time filter is needed to maintain integrity of the surface height field due to
 the leap-frog splitting mode in equation \autoref{eq:DYN_spg_ts_ssh}.
 We have tried various forms of such filtering,
 with the following method discussed in Griffies et al. (2001) chosen due to its stability and
-reasonably good maintenance of tracer conservation properties (see ??) 
+reasonably good maintenance of tracer conservation properties (see ??)
 
 \begin{equation}
@@ -276,5 +276,5 @@
   \eta^{F}(\tau-\Delta) =  \overline{\eta^{(b)}(\tau)}
 \end{equation}
-Another approach tried was 
+Another approach tried was
 
 \[
@@ -289,8 +289,8 @@
 surface height time filtering (see ?? for more complete discussion).
 However, in the general case with a non-zero $\alpha$, the filter \autoref{eq:DYN_spg_ts_sshf} was found to
-be more conservative, and so is recommended. 
-
-%-------------------------------------------------------------
-% Filtered formulation 
+be more conservative, and so is recommended.
+
+%-------------------------------------------------------------
+% Filtered formulation
 %-------------------------------------------------------------
 \subsubsection[Filtered formulation (\texttt{\textbf{key\_dynspg\_flt}})]
@@ -307,5 +307,5 @@
 
 %-------------------------------------------------------------
-% Non-linear free surface formulation 
+% Non-linear free surface formulation
 %-------------------------------------------------------------
 \subsection[Non-linear free surface formulation (\texttt{\textbf{key\_vvl}})]
@@ -314,5 +314,5 @@
 
 In the non-linear free surface formulation, the variations of volume are fully taken into account.
-This option is presented in a report \citep{levier.treguier.ea_rpt07} available on the NEMO web site.
+This option is presented in a report \citep{levier.treguier.ea_rpt07} available on the \NEMO\ web site.
 The three time-stepping methods (explicit, split-explicit and filtered) are the same as in
 \autoref{DYN_spg_linear} except that the ocean depth is now time-dependent.
Index: NEMO/trunk/doc/latex/NEMO/subfiles/chap_time_domain.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/chap_time_domain.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/chap_time_domain.tex	(revision 11435)
@@ -8,5 +8,5 @@
 \chapter{Time Domain (STP)}
 \label{chap:STP}
-\minitoc
+\chaptertoc
 
 % Missing things:
@@ -21,6 +21,6 @@
 Having defined the continuous equations in \autoref{chap:PE}, we need now to choose a time discretization,
 a key feature of an ocean model as it exerts a strong influence on the structure of the computer code
-(\ie on its flowchart).
-In the present chapter, we provide a general description of the \NEMO  time stepping strategy and
+(\ie\ on its flowchart).
+In the present chapter, we provide a general description of the \NEMO\  time stepping strategy and
 the consequences for the order in which the equations are solved.
 
@@ -31,9 +31,9 @@
 \label{sec:STP_environment}
 
-The time stepping used in \NEMO is a three level scheme that can be represented as follows:
+The time stepping used in \NEMO\ is a three level scheme that can be represented as follows:
 \begin{equation}
   \label{eq:STP}
   x^{t + \rdt} = x^{t - \rdt} + 2 \, \rdt \ \text{RHS}_x^{t - \rdt, \, t, \, t + \rdt}
-\end{equation} 
+\end{equation}
 where $x$ stands for $u$, $v$, $T$ or $S$;
 RHS is the Right-Hand-Side of the corresponding time evolution equation;
@@ -53,5 +53,5 @@
 is usually not the variable at the after time step;
 but rather it is used to store the time derivative (RHS in \autoref{eq:STP}) prior to time-stepping the equation.
-The time stepping itself is performed once at each time step where implicit vertical diffusion is computed, \ie in the \mdl{trazdf} and \mdl{dynzdf} modules.
+The time stepping itself is performed once at each time step where implicit vertical diffusion is computed, \ie\ in the \mdl{trazdf} and \mdl{dynzdf} modules.
 
 % -------------------------------------------------------------------------------------------------------------
@@ -64,5 +64,5 @@
 \citep{mesinger.arakawa_bk76}.
 This scheme is widely used for advection processes in low-viscosity fluids.
-It is a time centred scheme, \ie the RHS in \autoref{eq:STP} is evaluated at time step $t$, the now time step.
+It is a time centred scheme, \ie\ the RHS in \autoref{eq:STP} is evaluated at time step $t$, the now time step.
 It may be used for momentum and tracer advection, pressure gradient, and Coriolis terms,
 but not for diffusion terms.
@@ -92,8 +92,8 @@
 Therefore, the LF-RA is a quasi second order accurate scheme.
 The LF-RA scheme is preferred to other time differencing schemes such as predictor corrector or trapezoidal schemes,
-because the user has an explicit and simple control of the magnitude of the time diffusion of the scheme. 
+because the user has an explicit and simple control of the magnitude of the time diffusion of the scheme.
 When used with the 2nd order space centred discretisation of the advection terms in
 the momentum and tracer equations, LF-RA avoids implicit numerical diffusion:
-diffusion is set explicitly by the user through the Robert-Asselin 
+diffusion is set explicitly by the user through the Robert-Asselin
 filter parameter and the viscosity and diffusion coefficients.
 
@@ -128,5 +128,5 @@
 
 For the vertical diffusion terms, a forward time differencing scheme can be used,
-but usually the numerical stability condition imposes a strong constraint on the time step. To overcome the stability constraint, a 
+but usually the numerical stability condition imposes a strong constraint on the time step. To overcome the stability constraint, a
 backward (or implicit) time differencing scheme is used. This scheme is unconditionally stable but diffusive and can be written as follows:
 \begin{equation}
@@ -152,6 +152,6 @@
   -c(k + 1) \; T^{t + 1}(k + 1) + d(k) \; T^{t + 1}(k) - \; c(k) \; T^{t + 1}(k - 1) \equiv b(k)
 \end{equation}
-where 
-\begin{align*} 
+where
+\begin{align*}
   c(k) &= A_w^{vT} (k) \, / \, e_{3w} (k)     \\
   d(k) &= e_{3t}   (k)       \, / \, (2 \rdt) + c_k + c_{k + 1}    \\
@@ -171,17 +171,17 @@
 \label{sec:STP_spg_ts}
 
-The leapfrog environment supports a centred in time computation of the surface pressure, \ie evaluated 
-at \textit{now} time step. This refers to as the explicit free surface case in the code (\np{ln\_dynspg\_exp}\forcode{ = .true.}). 
-This choice however imposes a strong constraint on the time step which should be small enough to resolve the propagation 
-of external gravity waves. As a matter of fact, one rather use in a realistic setup, a split-explicit free surface 
-(\np{ln\_dynspg\_ts}\forcode{ = .true.}) in which barotropic and baroclinic dynamical equations are solved separately with ad-hoc 
-time steps. The use of the time-splitting (in combination with non-linear free surface) imposes some constraints on the design of 
+The leapfrog environment supports a centred in time computation of the surface pressure, \ie\ evaluated
+at \textit{now} time step. This refers to as the explicit free surface case in the code (\np{ln\_dynspg\_exp}\forcode{ = .true.}).
+This choice however imposes a strong constraint on the time step which should be small enough to resolve the propagation
+of external gravity waves. As a matter of fact, one rather use in a realistic setup, a split-explicit free surface
+(\np{ln\_dynspg\_ts}\forcode{ = .true.}) in which barotropic and baroclinic dynamical equations are solved separately with ad-hoc
+time steps. The use of the time-splitting (in combination with non-linear free surface) imposes some constraints on the design of
 the overall flowchart, in particular to ensure exact tracer conservation (see \autoref{fig:TimeStep_flowchart}).
 
-Compared to the former use of the filtered free surface in \NEMO v3.6 (\citet{roullet.madec_JGR00}), the use of a split-explicit free surface is advantageous 
-on massively parallel computers. Indeed, no global computations are anymore required by the elliptic solver which saves a substantial amount of communication 
-time. Fast barotropic motions (such as tides) are also simulated with a better accuracy. 
-
-%\gmcomment{ 
+Compared to the former use of the filtered free surface in \NEMO\ v3.6 (\citet{roullet.madec_JGR00}), the use of a split-explicit free surface is advantageous
+on massively parallel computers. Indeed, no global computations are anymore required by the elliptic solver which saves a substantial amount of communication
+time. Fast barotropic motions (such as tides) are also simulated with a better accuracy.
+
+%\gmcomment{
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!t]
@@ -190,8 +190,8 @@
     \caption{
       \protect\label{fig:TimeStep_flowchart}
-      Sketch of the leapfrog time stepping sequence in \NEMO with split-explicit free surface. The latter combined
-       with non-linear free surface requires the dynamical tendency being updated prior tracers tendency to ensure 
-       conservation. Note the use of time integrated fluxes issued from the barotropic loop  in subsequent calculations 
-       of tracer advection and in the continuity equation. Details about the time-splitting scheme can be found 
+      Sketch of the leapfrog time stepping sequence in \NEMO\ with split-explicit free surface. The latter combined
+       with non-linear free surface requires the dynamical tendency being updated prior tracers tendency to ensure
+       conservation. Note the use of time integrated fluxes issued from the barotropic loop  in subsequent calculations
+       of tracer advection and in the continuity equation. Details about the time-splitting scheme can be found
        in \autoref{subsec:DYN_spg_ts}.
     }
@@ -212,5 +212,5 @@
 
 In a classical LF-RA environment, the forcing term is centred in time,
-\ie it is time-stepped over a $2 \rdt$ period:
+\ie\ it is time-stepped over a $2 \rdt$ period:
 $x^t = x^t + 2 \rdt Q^t$ where $Q$ is the forcing applied to $x$,
 and the time filter is given by \autoref{eq:STP_asselin} so that $Q$ is redistributed over several time step.
@@ -236,5 +236,5 @@
 Second, the LF-RA becomes a truly quasi -second order scheme.
 Indeed, \autoref{eq:STP_forcing} used in combination with a careful treatment of static instability
-(\autoref{subsec:ZDF_evd}) and of the TKE physics (\autoref{subsec:ZDF_tke_ene}) 
+(\autoref{subsec:ZDF_evd}) and of the TKE physics (\autoref{subsec:ZDF_tke_ene})
 (the two other main sources of time step divergence),
 allows a reduction by two orders of magnitude of the Asselin filter parameter.
@@ -280,7 +280,7 @@
   x^1 = x^0 + \rdt \ \text{RHS}^0
 \]
-This is done simply by keeping the leapfrog environment (\ie the \autoref{eq:STP} three level time stepping) but
+This is done simply by keeping the leapfrog environment (\ie\ the \autoref{eq:STP} three level time stepping) but
 setting all $x^0$ (\textit{before}) and $x^1$ (\textit{now}) fields equal at the first time step and
-using half the value of a leapfrog time step ($2 \rdt$). 
+using half the value of a leapfrog time step ($2 \rdt$).
 
 It is also possible to restart from a previous computation, by using a restart file.
@@ -292,8 +292,8 @@
 
 Note that the time step $\rdt$, is also saved in the restart file.
-When restarting, if the time step has been changed, or one of the prognostic variables at \textit{before} time step 
-is missing, an Euler time stepping scheme is imposed. A forward initial step can still be enforced by the user by setting 
-the namelist variable \np{nn\_euler}\forcode{=0}. Other options to control the time integration of the model 
-are defined through the  \ngn{namrun} namelist variables.
+When restarting, if the time step has been changed, or one of the prognostic variables at \textit{before} time step
+is missing, an Euler time stepping scheme is imposed. A forward initial step can still be enforced by the user by setting
+the namelist variable \np{nn\_euler}\forcode{=0}. Other options to control the time integration of the model
+are defined through the  \nam{run} namelist variables.
 %%%
 \gmcomment{
@@ -302,5 +302,5 @@
 add also the idea of writing several restart for seasonal forecast : how is it done ?
 
-verify that all namelist pararmeters are truly described 
+verify that all namelist pararmeters are truly described
 
 a word on the check of restart  .....
@@ -308,5 +308,5 @@
 %%%
 
-\gmcomment{       % add a subsection here  
+\gmcomment{       % add a subsection here
 
 %-------------------------------------------------------------------------------------------------------------
@@ -317,8 +317,8 @@
 %--------------------------------------------namrun-------------------------------------------
 
-\nlst{namdom}         
+\nlst{namdom}
 %--------------------------------------------------------------------------------------------------------------
 
-Options are defined through the  \ngn{namdom} namelist variables.
+Options are defined through the  \nam{dom} namelist variables.
  \colorbox{yellow}{add here a few word on nit000 and nitend}
 
@@ -332,5 +332,5 @@
 
 %%
-\gmcomment{       % add implicit in vvl case  and Crant-Nicholson scheme   
+\gmcomment{       % add implicit in vvl case  and Crant-Nicholson scheme
 
 Implicit time stepping in case of variable volume thickness.
Index: NEMO/trunk/doc/latex/NEMO/subfiles/introduction.tex
===================================================================
--- NEMO/trunk/doc/latex/NEMO/subfiles/introduction.tex	(revision 11433)
+++ NEMO/trunk/doc/latex/NEMO/subfiles/introduction.tex	(revision 11435)
@@ -1,3 +1,6 @@
 \documentclass[../main/NEMO_manual]{subfiles}
+
+%% Remove section heading (no section here)
+\rehead{}
 
 \begin{document}
@@ -12,25 +15,25 @@
 namely OPA \footnote{OPA: Oc\'{e}an PArall\'{e}lis\'{e} (french)} for the ocean dynamics and thermodynamics,
 SI$^3$ \footnote{SI$^3$: Sea-Ice modelling Integrated Initiative} for the sea-ice dynamics and thermodynamics,
-TOP \footnote{TOP: Tracer in the Ocean Paradigm} for the biogeochemistry 
-(both transport (TRP) and sources minus sinks 
+TOP \footnote{TOP: Tracer in the Ocean Paradigm} for the biogeochemistry
+(both transport (TRP) and sources minus sinks
 (PISCES \footnote{PISCES: Pelagic Interactions Scheme for Carbon and Ecosystem Studies})).
 It is intended to be a flexible tool for studying the ocean and its interactions with the other components of
 the earth climate system (atmosphere, sea-ice, biogeochemical tracers, ...) over
 a wide range of space and time scales.
-This manual provides information about the physics represented by the ocean component of \NEMO and
+This manual provides information about the physics represented by the ocean component of \NEMO\ and
 the rationale for the choice of numerical schemes and the model design.
-For the use of framework, 
-a guide which gathers the \texttt{README} files spread out in the source code can be build and 
+For the use of framework,
+a guide which gathers the \texttt{README} files spread out in the source code can be build and
 exported in web or printable format (see \path{./doc/rst}).
-An online version of the guide is also available on the 
-\href{http://forge.ipsl.jussieu.fr/nemo}{\NEMO forge platform}.
-
-The ocean component of \NEMO has been developed from the legacy of the OPA model, release 8.2, 
+An online version of the guide is also available on the
+\href{http://forge.ipsl.jussieu.fr/nemo}{\NEMO\ forge platform}.
+
+The ocean component of \NEMO\ has been developed from the legacy of the OPA model, release 8.2,
 described in \citet{madec.delecluse.ea_NPM98}.
-This model has been used for a wide range of applications, both regional or global, as a forced ocean model and 
+This model has been used for a wide range of applications, both regional or global, as a forced ocean model and
 as a model coupled with the sea-ice and/or the atmosphere.
 
 This manual is organised in as follows.
-\autoref{chap:PE} presents the model basics, \ie the equations and their assumptions,
+\autoref{chap:PE} presents the model basics, \ie\ the equations and their assumptions,
 the vertical coordinates used, and the subgrid scale physics.
 This part deals with the continuous equations of the model
@@ -43,12 +46,12 @@
 The following chapters deal with the discrete equations.
 \autoref{chap:STP} presents the time domain.
-The model time stepping environment is a three level scheme in which 
-the tendency terms of the equations are evaluated either centered in time, or forward, or backward depending of 
+The model time stepping environment is a three level scheme in which
+the tendency terms of the equations are evaluated either centered in time, or forward, or backward depending of
 the nature of the term.
 \autoref{chap:DOM} presents the space domain.
 The model is discretised on a staggered grid (Arakawa C grid) with masking of land areas.
-Vertical discretisation used depends on both how the bottom topography is represented and whether 
+Vertical discretisation used depends on both how the bottom topography is represented and whether
 the free surface is linear or not.
-Full step or partial step $z$-coordinate or $s$- (terrain-following) coordinate is used with linear free surface 
+Full step or partial step $z$-coordinate or $s$- (terrain-following) coordinate is used with linear free surface
 (level position are then fixed in time).
 In non-linear free surface, the corresponding rescaled height coordinate formulation (\zstar or \sstar) is used
@@ -57,13 +60,13 @@
 the prognostic equations for the active tracers and the momentum.
 Explicit, split-explicit and filtered free surface formulations are implemented.
-A number of numerical schemes are available for momentum advection, 
-for the computation of the pressure gradients, as well as for the advection of tracers 
+A number of numerical schemes are available for momentum advection,
+for the computation of the pressure gradients, as well as for the advection of tracers
 (second or higher order advection schemes, including positive ones).
 
-Surface boundary conditions (\autoref{chap:SBC}) can be implemented as prescribed fluxes, or bulk formulations for 
+Surface boundary conditions (\autoref{chap:SBC}) can be implemented as prescribed fluxes, or bulk formulations for
 the surface fluxes (wind stress, heat, freshwater).
 The model allows penetration of solar radiation.
 There is an optional geothermal heating at the ocean bottom.
-Within the \NEMO system the ocean model is interactively coupled with a sea ice model (SI$^3$) and
+Within the \NEMO\ system the ocean model is interactively coupled with a sea ice model (SI$^3$) and
 a biogeochemistry model (PISCES).
 Interactive coupling to Atmospheric models is possible via the \href{https://portal.enes.org/oasis}{OASIS coupler}.
@@ -86,7 +89,7 @@
 \citet{treguier.held.ea_JPO97}.
 The model has vertical harmonic viscosity and diffusion with a space and time variable coefficient,
-with options to compute the coefficients with \citet{blanke.delecluse_JPO93}, \citet{pacanowski.philander_JPO81}, or 
+with options to compute the coefficients with \citet{blanke.delecluse_JPO93}, \citet{pacanowski.philander_JPO81}, or
 \citet{umlauf.burchard_JMR03} mixing schemes.
- 
+
 %%gm    To be put somewhere else ....
 %%nm    We should consider creating a glossary for all this kind of stuff (terms, acronyms and symbols)
@@ -100,5 +103,5 @@
 it changes the code from one set of CPP keys to the other.
 It is used only when the addition/suppression of the part of code highly changes the amount of memory at run time.
-Usual coding looks like: 
+Usual coding looks like:
 
 \begin{forlines}
@@ -112,7 +115,7 @@
 
 The namelist allows to input variables (character, logical, real and integer) into the code.
-There is one namelist file for each component of NEMO (dynamics, sea-ice, biogeochemistry...)
+There is one namelist file for each component of \NEMO\ (dynamics, sea-ice, biogeochemistry...)
 containing all the \fortran namelists needed.
-The implementation in NEMO uses a 2-step process. 
+The implementation in \NEMO\ uses a 2-step process.
 For each \fortran namelist, two files are read:
 
@@ -136,5 +139,5 @@
 the computation of on-line floats trajectories...
 \autoref{chap:OBS} describes a tool which reads in observation files
-(profile temperature and salinity, sea surface temperature, sea level anomaly and sea ice concentration) 
+(profile temperature and salinity, sea surface temperature, sea level anomaly and sea ice concentration)
 and calculates an interpolated model equivalent value at the observation location and nearest model timestep.
 Originally developed of data assimilation, it is a fantastic tool for model and data comparison.
@@ -143,5 +146,5 @@
 (water column model, ORCA and GYRE families of configurations).
 
-%%nm: Add some words on the NEMO dependencies
+%%nm: Add some words on the \NEMO\ dependencies
 The model is implemented in \fninety, with preprocessing (C pre-processor).
 It runs under UNIX.
@@ -164,9 +167,9 @@
 The manual mirrors the organization of the model.
 After the presentation of the continuous equations (\autoref{chap:PE}),
-the following chapters refer to specific terms of the equations each associated with a group of modules 
+the following chapters refer to specific terms of the equations each associated with a group of modules
 (\autoref{tab:chapters}).
 
 %--------------------------------------------------TABLE--------------------------------------------------
-\begin{table}[!t]	
+\begin{table}[!t]
   \caption{
     \protect\label{tab:chapters}
@@ -207,17 +210,17 @@
 %--------------------------------------------------------------------------------------------------------------
 
-%% nm: the following section has to vastly remodeled to focus only on well-identified versions of NEMO
+%% nm: the following section has to vastly remodeled to focus only on well-identified versions of \NEMO
 %% (3.4, 3.6, 4.0 and further releases). Then its formatting must be improved too.
 \subsubsection{Changes between releases}
 
-NEMO/OPA, like all research tools, is in perpetual evolution.
-The present document describes the OPA version include in the release 3.4 of NEMO.
+\NEMO/OPA, like all research tools, is in perpetual evolution.
+The present document describes the OPA version include in the release 3.4 of \NEMO.
 This release differs significantly from version 8, documented in \citet{madec.delecluse.ea_NPM98}. \\
 
-The main modifications from OPA v8 and NEMO/OPA v3.2 are :
-
-\begin{itemize}
-\item
-  transition to full native \fninety, deep code restructuring and drastic reduction of CPP keys; 
+The main modifications from OPA v8 and \NEMO/OPA v3.2 are :
+
+\begin{itemize}
+\item
+  transition to full native \fninety, deep code restructuring and drastic reduction of CPP keys;
 \item
   introduction of partial step representation of bottom topography
@@ -253,5 +256,5 @@
   which includes an on-the-fly interpolation of input forcing fields;
 \item
-  RGB light penetration and optional use of ocean color 
+  RGB light penetration and optional use of ocean color
 \item
   major changes in the TKE schemes: it now includes a Langmuir cell parameterization \citep{axell_JGR02},
@@ -267,10 +270,10 @@
 \end{itemize}
 
-The main modifications from NEMO/OPA v3.2 and v3.3 are:
+The main modifications from \NEMO/OPA v3.2 and v3.3 are:
 
 \begin{itemize}
 \item
   introduction of a modified leapfrog-Asselin filter time stepping scheme
-  \citep{leclair.madec_OM09}; 
+  \citep{leclair.madec_OM09};
 \item
   additional scheme for iso-neutral mixing \citep{griffies.gnanadesikan.ea_JPO98}, although it is still a "work in progress";
@@ -315,5 +318,5 @@
 improving the model performance.
 
-The main modifications from NEMO/OPA v3.3 and v3.4 are:
+The main modifications from \NEMO/OPA v3.3 and v3.4 are:
 
 \begin{itemize}
@@ -329,5 +332,5 @@
 \end{itemize}
 
-The main modifications from NEMO/OPA v3.4 and v3.6 are:
+The main modifications from \NEMO/OPA v3.4 and v3.6 are:
 
 \begin{itemize}
@@ -335,10 +338,10 @@
 \end{itemize}
 
-The main modifications from NEMO/OPA v3.6 and v4.0 are:
+The main modifications from \NEMO/OPA v3.6 and v4.0 are:
 
 \begin{itemize}
 \item new definition of configurations;
 \item bulk formulation;
-\item NEMO-wave large scale interactions;
+\item \NEMO-wave large scale interactions;
 \item ...;
 \end{itemize}
@@ -348,3 +351,6 @@
 \pindex
 
+%% Restore section heading
+\rehead{Sect.\ \thesection\ \rightmark}
+
 \end{document}
