Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/.svnignore
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/.svnignore	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/.svnignore	(revision 11831)
@@ -0,0 +1,17 @@
+*.aux
+*.bbl
+*.blg
+*.dvi
+*.fdb*
+*.fls
+*.idx
+*.ilg
+*.ind
+*.lo*
+*.maf
+*.mtc*
+*.out
+*.pdf
+*.toc
+*.xdv
+_minted-*
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/DEPS
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/DEPS	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/DEPS	(revision 11831)
@@ -23,9 +23,10 @@
 helvetic
 hyperref
-idxlayout
 ifplatform
+imakeidx
+koma-script
 latex
+latexconfig
 latex-bin
-latexconfig
 latex-fonts
 latexmk
@@ -39,4 +40,5 @@
 oberdiek
 parskip
+preview
 psnfss
 subfiles
@@ -44,4 +46,5 @@
 times
 titlesec
+titling
 tools
 upquote
@@ -50,4 +53,6 @@
 wrapfig
 xcolor
+xkeyval
 xstring
 zapfchan
+
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/HTML_latex2html.sh
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/HTML_latex2html.sh	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/HTML_latex2html.sh	(revision 11831)
@@ -1,20 +1,27 @@
 #!/bin/bash
 
-./inc/clean.sh
-./inc/build.sh
+#./inc/clean.sh
+#./inc/build.sh
 
-cd tex_main
-sed -i -e 's#\\documentclass#%\\documentclass#' -e '/{document}/ s/^/%/' \
-	../tex_sub/*.tex
-sed -i    's#\\subfile{#\\include{#g' \
-	NEMO_manual.tex
-latex2html -local_icons -no_footnode -split 4 -link 2 -mkdir -dir ../html_LaTeX2HTML 	\
-				$* 																								\
-	NEMO_manual
-sed -i -e 's#%\\documentclass#\\documentclass#' -e '/{document}/ s/^%//' \
-	../tex_sub/*.tex
-sed -i    's#\\include{#\\subfile{#g' \
-	NEMO_manual.tex
+sed -i -e 's#utf8#latin1#'                                 \
+       -e 's#\[outputdir=../build\]{minted}#\[\]{minted}#' \
+       -e '/graphicspath/ s#{../#{../../#g'                \
+          global/packages.tex
+
+cd ./NEMO/main
+sed -i -e 's#\\documentclass#%\\documentclass#' -e '/{document}/ s#^#%#'   ../subfiles/*.tex
+sed -i    's#\\subfile{#\\input{#'                                         chapters.tex appendices.tex
+
+#latex2html                                   -noimages -local_icons -no_footnode -split 4 -link 2 -dir ../html_LaTeX2HTML $*	NEMO_manual
+latex2html -debug -noreuse -init_file ../../l2hconf.pm -local_icons                               -dir ../build/html               NEMO_manual
+
+sed -i -e 's#%\\documentclass#\\documentclass#' -e '/{document}/ s#^%##'   ../subfiles/*.tex
+sed -i    's#\\input{#\\subfile{#'                                         chapters.tex appendices.tex
 cd -
 
+sed -i -e 's#latin1#utf8#'                                 \
+       -e 's#\[\]{minted}#\[outputdir=../build\]{minted}#' \
+       -e '/graphicspath/ s#{../../#{../#g'                \
+	  global/packages.tex
+
 exit 0
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/NEMO_coding_conv.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/NEMO_coding_conv.tex	(revision 11086)
+++ 	(revision )
@@ -1,807 +1,0 @@
-\documentclass{article}
-
-\usepackage{fancyhdr}
-\usepackage{times}
-\usepackage{graphicx}
-\usepackage{hyperref}
-\usepackage{minted}
-%\usepackage[normalem]{ulem}   % striketrough style with \sout{...}
-
-\hypersetup{pdftitle={NEMO coding conventions}, pdfauthor={NEMO System Team}, colorlinks}
-\setminted{style=emacs, breaklines, frame=leftline}
-\newmintinline[forcode]{fortran}{fontsize=auto, frame=lines}   % \forcode{...}
-\newminted[forlines]{fortran}{}                                % \begin{forlines}
-
-\pagestyle{empty}
-\setlength{\leftmargin}{1 cm}
-\setlength{\rightmargin}{1 cm}
-\setlength{\oddsidemargin}{0 cm}
-\setlength{\evensidemargin}{0 cm}
-\setlength{\topmargin}{-1cm}
-\setlength{\textwidth}{16 cm}
-\setlength{\textheight}{25cm}
-\pagestyle{fancy}
-
-\title{
-  \includegraphics[width=0.3\textwidth]{../../../figures/NEMO_grey} \\
-  \vspace{1.0cm} \rule{345pt}{1.5pt} \\
-  \vspace{0.45cm} {\Huge NEMO coding conventions} \rule{345pt}{1.5pt} \\
-}
-%\title{NEMO coding conventions}
-\author{\Large NEMO System Team
-  \thanks{
-    To be completed
-  }
-}
-\date{version X.X -- month year}
-
-\begin{document}
-
-\maketitle
-
-\newpage
-
-\tableofcontents
-
-\newpage
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Introduction}
-
-This document describes conventions\index{conventions} used in NEMO coding and suggested for its development.
-The objectives are to offer a guide to all readers of the NEMO code, and to facilitate the work of
-all the developers, including the validation of their developments, and
-eventually the implementation of these developments within the NEMO platform.
-
-A first approach of these rules can be found in the code in \path{./src/OCE/module_example} where
-all the basics coding conventions are illustrated.
-More details can be found below.
-
-This work is based on the coding conventions in use for the Community Climate System Model
-\footnote {\href{http://www.cesm.ucar.edu/working_groups/Software/dev_guide/dev_guide/node7.html}{UCAR conventions}}, 
-the previous version of this document (``FORTRAN coding standard in the OPA System'') and
-the expertise of the NEMO System Team.
-After a general overview below, this document will describe:
-
-\begin{itemize}
-\item
-  The style rules, $i.e.$ the syntax, appearance and naming conventions chosen to improve readability of the code;
-\item
-  The content rules, $i.e.$ the conventions to improve the reliability of the different parts of the code;
-\item
-  The package rules to go a step further by improving the reliability of the whole and
-  interfaces between routines and modules.
-\end{itemize}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Overview and general conventions}
-
-NEMO has 3 major components: ocean dynamics (\path{./src/OCE}), sea-ice (\path{./src/ICE}) and
-marine biogeochemistry (\path{./src/MBG}).
-%, linear-tangent and adjoint of the dynamics ($TAM$) each of them corresponding to a directory.
-In each directory, one will find some FORTRAN files and/or subdirectories, one per functionality of the code:
-\path{./src/OCE/BDY} (boundaries), \path{./src/OCE/DIA} (diagnostics), \path{./src/OCE/DOM} (domain),
-\path{./src/OCE/DYN} (dynamics), \path{./src/OCE/LDF} (lateral diffusion), etc... \\
-All name are chosen to be as self-explanatory as possible, in English, all prefixes are 3 digits. \\
-English is used for all variables names, comments, and documentation. \\
-Physical units are MKS. The only exception to this is the temperature, which is expressed in degrees Celsius,
-except in bulk formulae and part of SI$^3$ sea-ice model where it is in Kelvin.
-See \path{.src/OCE/DOM/phycst.F90} files for conversions.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Architecture}
-
-Within each directory, organisation of files is driven by orthogonality\index{orthogonality},
-$i.e.$ one functionality of the code is intended to be in one and only one directory, and
-one module and all its related routines are in one file.
-The functional modules\index{module} are:
-
-\begin{itemize}
-\item \path{SBC}             surface module
-\item \path{IOM}             management of the I/O
-\item \path{NST}             interface to AGRIF (nesting model) for dynamics and biogeochemistry
-\item \path{OBC}, \path{BDY} management of structured and unstructured open boundaries 
-\item \path{C1D}             1D (vertical) configuration for dynamics, sea-ice and biogeochemistry
-\item \path{OFF}             off-line module: passive tracer or biogeochemistry alone
-\item \path{...}
-\end{itemize}
-
-For example, the file \textit{domain.F90} contains the module \texttt{domain} and all the subroutines related to
-this module (\texttt{dom\_init, dom\_nam, dom\_ctl}).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Style rules}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Argument list format}
-
-Routine argument lists will contain a maximum 5 variables\index{variable} per line,
-whilst continuation lines can be used.
-This applies both to the calling routine and the dummy argument list in the routine being called.
-The purpose is to simplify matching up the arguments between caller and callee.
-
-\begin{forlines}
-SUBROUTINE tra_adv_eiv( kt, pun, pvn, pwn )
-
-      CALL tra_adv_eiv( kt, zun, zvn, zwn )
-\end{forlines}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Array syntax}
-
-Except for long loops (see below), array notation should be used if possible.
-To improve readability the array shape must be shown in brackets, $e.g.$:
-
-\begin{forlines}
-onedarraya(:)   = onedarrayb(:) + onedarrayc(:)
-twodarray (:,:) = scalar * anothertwodarray(:,:)
-\end{forlines}
-
-When accessing sections of arrays, for example in finite difference equations,
-do so by using the triplet notation on the full array, $e.g.$:
-
-\begin{forlines}
-twodarray(:,2:len2) =   scalar                      &
-   &                  * ( twodarray2(:,1:len2-1 )   &
-   &                  -   twodarray2(:,2:len2 ) )
-\end{forlines}
-
-For long, complicated loops, explicitly indexed loops should be preferred.
-In general when using this syntax, the order of the loops indices should reflect the following scheme
-(for best usage of data locality):
-
-\begin{forlines}
-DO jk = 1, jpk
-   DO jj = 1, jpj
-      DO ji = 1, jpi
-         threedarray(ji,jj,jk) = ...
-      END DO
-   END DO
-END DO
-\end{forlines}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Case}
-
-All FORTRAN keywords are in capital: \forcode{DIMENSION}, \forcode{WRITE}, \forcode{DO}, \forcode{END DO},
-\forcode{NAMELIST}, ... All other parts of the NEMO code will be written in lower case.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Comments}
-
-Comments in the code are useful when reading the code and changing or developing it. \\
-The full documentation and detailed explanations are to be added in the reference manual
-(TeX files, aside from the code itself). \\
-In the code, the comments should explain variable content and describe each computational step. \\
-Comments in the header start with ``!!''.
-For more details on the content of the headers, see Content rules/Headers in this document. \\
-Comments in the code start with ``!''. \\
-All comments are indented (3, 6, or 9 blank spaces). \\
-Short comments may be included on the same line as executable code, and an additional line can be used with
-proper alignment.
-For example:
-
-\begin{forlines}
-zx = zx *zzy   ! Describe what is going on and if it is
-!              ! too long use another ! for proper
-!              ! alignment with automatic indentation
-\end{forlines}
-
-More in-depth comments should be written in the form:
-
-\begin{forlines}
-   !  Check of some namelist values
-\end{forlines}
-
-or
-
-\begin{forlines}
-!
-!     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-!     !  Bottom boundary condition on tke
-!     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-!
-\end{forlines}
-
-Key features of this style are
-
-\begin{enumerate}
-\item it starts with a "!" in the column required for proper indentation,
-\item the text is offset above and below by a blank line or a content line built for underlying.
-\end{enumerate}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Continuation lines}
-
-Continuation lines can be used with precise alignment for readability. For example:
-
-\begin{forlines}
-avmu(ji,jj,jk) =   avmu(ji,jj,jk) * ( un(ji,jj,jk-1) - un(ji,jj,jk) )   &
-   &                              * ( ub(ji,jj,jk-1) - ub(ji,jj,jk) )   &
-   &             / (   fse3uw_n(ji,jj,jk)                               &
-   &                 * fse3uw_b(ji,jj,jk) )
-\end{forlines}
-
-Code lines, which are continuation lines of assignment statements, must begin to the right of the column of
-the assignment operator.
-Due to the possibility of automatic indentation in some editor (emacs for example),
-use a ``\&'' as first character of the continuing lines to maintain the alignment.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Declaration of arguments and local variables}
-
-In a routine, input arguments and local variables are declared 1 per line,
-with a comment field on the same line as the declaration.
-Multiple comment lines describing a single variable are acceptable if needed.
-For example:
-
-\begin{forlines}
-INTEGER             ::   kstp   ! ocean time-step index
-\end{forlines}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{F90 Standard}
-
-NEMO software adheres to the FORTRAN 95 language standard and does not rely on any specific language or
-vendor extensions.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Free-Form Source}
-
-Free-form source will be used.
-The F90/95 standard allows lines of up to 132 characters, but a self-imposed limit of 80 should enhance readability,
-or print source files with two columns per page.
-Multi-line comments that extend to column 100 are unacceptable.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Indentation}
-
-Code as well as comment lines within loops, if-blocks, continuation lines, \forcode{MODULE} or
-\forcode{SUBROUTINE} statements will be indented 3 characters for readability
-(except for \forcode{CONTAINS} that remains at first column).
-
-\begin{forlines}
-MODULE mod1
-   REAL(wp) xx
-CONTAINS
-   SUBROUTINE sub76( px, py, pz, pw, pa,   &
-      &              pb, pc, pd, pe          )
-      <instruction>
-   END SUBROUTINE sub76
-END MODULE mod1
-\end{forlines}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Loops}
-
-Loops, if explicit, should be structured with the do-end do construct as opposed to numbered loops.
-Nevertheless non-numeric labels can be used for a big iterative loop of a recursive algorithm.
-In the case of a long loop, a self-descriptive label can be used ($i.e.$ not just a number).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Naming Conventions: files}
-
-A file containing a module will have the same name as the module it contains
-(because dependency rules used by "make" programs are based on file names).
-\footnote{
-  For example, if routine A "\forcode{USE}"s module B, then "make" must be told of the dependency relation which
-  requires B to be compiled before A.
-  If one can assume that module B resides in file B.o,
-  building a tool to generate this dependency rule ($e.g.$ A.o: B.o) is quite simple.
-  Put another way, it is difficult (to say nothing of CPU-intensive) to search an entire source tree to
-  find the file in which module B resides for each routine or module which "\forcode{USE}"s B.
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Naming Conventions: modules}
-
-Use a meaningful English name and the ``3 letters'' naming convention:
-first 3 letters for the code section, and last 3 to describe the module.
-For example, zdftke, where ``zdf'' stands for vertical diffusion, and ``tke'' for turbulent kinetic energy. \\
-Note that by implication multiple modules are not allowed in a single file.
-The use of common blocks is deprecated in Fortran 90 and their use in NEMO is strongly discouraged.
-Modules are a better way to declare static data.
-Among the advantages of modules is the ability to freely mix data of various types, and
-to limit access to contained variables through the use of the \forcode{ONLY} and \forcode{PRIVATE} attributes.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Naming Conventions: variables}
-
-All variable should be named as explicitly as possible in English.
-The naming convention concerns prefix letters of these name, in order to identify the variable type and status. \\
-Never use a FORTRAN keyword as a routine or variable name. \\
-The table below lists the starting letter(s) to be used for variable naming, depending on their type and status:
-%--------------------------------------------------TABLE--------------------------------------------------
-\begin{table}[htbp]
-  \begin{center}
-    \begin{tabular}{|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|}
-      \hline
-      Type \par / Status &   integer&   real&   logical &   character&   double \par precision&   complex \\
-      \hline
-      public  \par or  \par module variable& \textbf{m n} \par \textit{but not } \par \textbf{nn\_}& \textbf{a b e f g h o} \textbf{q} \textit{to} \textbf{x} \par but not \par \textbf{fs rn\_}& \textbf{l} \par \textit{but not} \par \textbf{lp ld ll ln\_}& \textbf{c} \par \textit{but not} \par \textbf{cp cd cl cn\_}& \textbf{d} \par \textit{but not} \par \textbf{dp dd dl dn\_}& \textbf{y} \par \textit{but not} \par \textbf{yp yd yl} \\
-      \hline
-      dummy \par argument& \textbf{k} \par \textit{but not} \par \textbf{kf}& \textbf{p} \par \textit{but not}  \par \textbf{pp pf}& \textbf{ld}& \textbf{cd}& \textbf{dd}& \textbf{yd} \\
-      \hline
-      local \par variable& \textbf{i}& \textbf{z}& \textbf{ll}& \textbf{cl}& \textbf{cd}& \textbf{yl} \\
-      \hline
-      loop \par control& \textbf{j} \par \textit{but not } \par \textbf{jp}& & & & &  \\
-      \hline
-      parameter& \textbf{jp}& \textbf{pp}& \textbf{lp}& \textbf{cp}& \textbf{dp}& \textbf{yp} \\
-      \hline
-      namelist& \textbf{nn\_}& \textbf{rn\_}& \textbf{ln\_}& \textbf{cn\_}& \textbf{dn\_}& \\
-      \hline
-      CPP \par macro& \textbf{kf}& \textbf{sf} \par & & & & \\
-      \hline
-    \end{tabular}
-    \label{tab1}
-  \end{center}
-\end{table}
-%--------------------------------------------------------------------------------------------------------------
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Operators}
-
-Use of the operators \texttt{<, >, <=, >=, ==, /=} is strongly recommended instead of their deprecated counterparts
-(\texttt{.lt., .gt., .le., .ge., .eq., .ne.}).
-The motivation is readability.
-In general use the notation: \\
-$<Blank><Operator><Blank>$
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Pre processor}
-
-Where the use of a language pre-processor is required, it will be the C pre-processor (cpp). \\
-The cpp key is the main feature used, allowing to ignore some useless parts of the code at compilation step. \\
-The advantage is to reduce the memory use; the drawback is that compilation of this part of the code isn't checked. \\
-The cpp key feature should only be used for a few limited options, if it reduces the memory usage.
-In all cases, a logical variable and a FORTRAN \forcode{IF} should be preferred.
-When using a cpp key \textit{key\_optionname},
-a corresponding logical variable \textit{lk\_optionname} should be declared to
-allow FORTRAN \forcode{IF} tests in the code and
-a FORTRAN module with the same name ($i.e.$ \textit{optionname.F90}) should be defined.
-This module is the only place where a \``\#if defined'' command appears, selecting either the whole FORTRAN code or
-a dummy module.
-For example, the TKE vertical physics, the module name is \textit{zdftke.F90},
-the CPP key is \textit{key\_zdftke} and the associated logical is \textit{lk\_zdftke}.
-
-The following syntax:
-
-\begin{forlines}
-#if defined key_optionname
-!! Part of code conditionally compiled if cpp key key_optionname is active
-#endif
-\end{forlines}
-
-Is to be used rather than the \#ifdef abbreviate form since it may have conflicts with some Unix scripts.
-
-Tests on cpp keys included in NEMO at compilation step:
-
-\begin{itemize}
-\item
-  The CPP keys used are compared to the previous list of cpp keys
-  (the compilation will stop if trying to specify a non-existing key)
-\item
-  If a change occurs in the CPP keys used for a given experiment, the whole compilation phase is done again.
-\end{itemize}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Content rules}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Configurations}
-
-The configuration defines the domain and the grid on which NEMO is running.
-It may be useful to associate a cpp key and some variables to a given configuration, although
-the part of the code changed under each of those keys should be minimized.
-As an example, the "ORCA2" configuration (global ocean, 2 degrees grid size) is associated with
-the cpp key \texttt{key\_orca2} for which
-
-\begin{forlines}
-cp_cfg = "orca"
-jp_cfg = 2
-\end{forlines}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Constants}
-
-Physical constants ($e.g.$ $\pi$, gas constants) must never be hardwired into the executable portion of a code.
-Instead, a mnemonically named variable or parameter should be set to the appropriate value,
-in the setup routine for the package\index{package}.
-We realize than many parameterizations rely on empirically derived constants or fudge factors,
-which are not easy to name.
-In these cases it is not forbidden to leave such factors coded as "magic numbers" buried in executable code, but
-comments should be included referring to the source of the empirical formula.
-Hard-coded numbers should never be passed through argument lists.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Declaration for variables and constants}
-
-\subsubsection{Rules}
-
-Variables used as constants should be declared with attribute \forcode{PARAMETER} and
-used always without copying to local variables, in order to
-prevent from using different values for the same constant or changing it accidentally.
-
-\begin{itemize}
-\item
-  Usage of the \forcode{DIMENSION} statement or attribute is required in declaration statements
-\item
-  The ``::'' notation is quite useful to show that this program unit declaration part is written in
-  standard FORTRAN syntax, even if there are no attributes to clarify the declaration section.
-  Always use the notation $<$blank$>$::$<$three blanks$>$ to improve readability.
-\item
-  Declare the length of a character variable using the \forcode{CHARACTER} (len=xxx) syntax
-  \footnote {
-    The len specifier is important because it is possible to have several kinds for characters
-    ($e.g.$ Unicode using two bytes per character, or there might be a different kind for Japanese $e.g.$ NEC).
-  }
-\item
-  For all global data (in contrast to module data, that is all data that can be access by other module)
-  must be accompanied with a comment field on the same line
-  \footnote {
-    This allows a easy research of where and how a variable is declared using the unix command:
-    ``grep var *90 | grep !:''.
-  }.
-  For example:
-  \begin{forlines}
-  REAL(wp), DIMENSION(jpi,jpj,jpk) ::  ua   ! i-horizontal velocity (m/s)
-  \end{forlines}
-\end{itemize}
-
-\subsubsection{Implicit None}
-
-All subroutines and functions will include an \forcode{IMPLICIT NONE} statement.
-Thus all variables must be explicitly typed.
-It also allows the compiler to detect typographical errors in variable names.
-For modules, one \forcode{IMPLICIT NONE} statement in the modules definition section is needed.
-This also removes the need to have \forcode{IMPLICIT NONE} statements in
-any routines that are \forcode{CONTAINS}'ed in the module.
-Improper data initialisation is another common source of errors
-\footnote{
-  A variable could contain an initial value you did not expect.
-  This can happen for several reasons, $e.g.$ the variable has never been assigned a value, its value is outdated,
-  memory has been allocated for a pointer but you have forgotten to initialise the variable pointed to.
-}.
-To avoid problems, initialise variables as close as possible to where they are first used.
-
-\subsubsection{Attributes}
-
-\forcode{PRIVATE} / \forcode{PUBLIC}:
-All resources of a module are \forcode{PUBLIC} by default.
-A reason to store multiple routines and their data in a single module is that
-the scope of the data defined in the module can be limited to the routines which are in the same module.
-This is accomplished with the \forcode{PRIVATE} attribute. \\
-\forcode{INTENT}:
-All dummy arguments of a routine must include the \forcode{INTENT} clause in their declaration in order to
-improve control of variables in routine calls.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Headers}
-
-Prologues are not used in NEMO for now, although it may become an interesting tool in combination with
-ProTeX auto documentation script in the future.
-Rules to code the headers and layout of a module or a routine are illustrated in the example module available with
-the code: \path{./src/OCE/module_example}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Interface blocks}
-
-Explicit interface blocks are required between routines if optional or keyword arguments are to be used.
-They also allow the compiler to check that the type, shape and number of arguments specified in the \forcode{CALL}
-are the same as those specified in the subprogram itself.
-FORTRAN 95 compilers can automatically provide explicit interface blocks for routines contained in a module.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{I/O Error Conditions}
-
-I/O statements which need to check an error condition will use the \texttt{iostat=<integer variable>} construct
-instead of the outmoded \texttt{end=} and \forcode{err=}. \\
-Note that a 0 value means success, a positive value means an error has occurred, and
-a negative value means the end of record or end of file was encountered.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{PRINT - ASCII output files}
-
-Output listing and errors are directed to \texttt{numout} logical unit =6 and
-produces a file called \textit{ocean.output} (use \texttt{ln\_prt} to have one output per process in MPP).
-Logical \texttt{lwp} variable allows for less verbose outputs.
-To output an error from a routine, one can use the following template:
-
-\begin{forlines}
-IF( nstop /= 0 .AND. lwp ) THEN   ! error print
-   WRITE(numout,cform_err)
-   WRITE(numout,*) nstop, ' error have been found'
-ENDIF
-\end{forlines}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Precision}
-
-Parameterizations should not rely on vendor-supplied flags to supply a default floating point precision or
-integer size.
-The F95 \forcode{KIND} feature should be used instead.
-In order to improve portability between 32 and 64 bit platforms,
-it is necessary to make use of kinds by using a specific module \path{./src/OCE/par_kind.F90}
-declaring the "kind definitions" to obtain the required numerical precision and range as well as
-the size of \forcode{INTEGER}.
-It should be noted that numerical constants need to have a suffix of \texttt{\_kindvalue} to
-have the according size. \\
-Thus \forcode{wp} being the "working precision" as declared in \path{./src/OCE/par_kind.F90},
-declaring real array \forcode{zpc} will take the form:
-
-\begin{forlines}
-REAL(wp), DIMENSION(jpi,jpj,jpk) ::  zpc      ! power consumption
-\end{forlines}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Structures}
-
-The \forcode{TYPE} structure allowing to declare some variables is more often used in NEMO,
-especially in the modules dealing with reading fields, or interfaces.
-For example:
-
-\begin{forlines}
-! Definition of a tracer as a structure
-TYPE PTRACER
-   CHARACTER(len = 20)  :: sname  ! short name
-   CHARACTER(len = 80 ) :: lname  ! long name
-   CHARACTER(len = 20 ) :: unit   ! unit
-   LOGICAL              :: lini   ! read in a file or not
-   LOGICAL              :: lsav   ! ouput the tracer or not
-END TYPE PTRACER
-
-TYPE(PTRACER) , DIMENSION(jptra) :: tracer
-\end{forlines}
-
-Missing rule on structure name??
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Packages coding rules}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Bounds checking}
-
-NEMO is able to run when an array bounds checking option is enabled
-(provided the cpp key \texttt{key\_vectopt\_loop} is not defined). \\
-Thus, constructs of the following form are disallowed:
-
-\begin{forlines}
-REAL(wp) :: arr(1)
-\end{forlines}
-
-where "arr" is an input argument into which the user wishes to index beyond 1.
-Use of the (*) construct in array dimensioning is forbidden also because
-it effectively disables array bounds checking.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Communication}
-
-A package should refer only to its own modules and subprograms and to those intrinsic functions included in
-the Fortran standard. \\
-All communication with the package will be through the argument list or namelist input.
-\footnote{
-  The point behind this rule is that packages should not have to know details of
-  the surrounding model data structures, or the names of variables outside of the package.
-  A notable exception to this rule is model resolution parameters.
-  The reason for the exception is to allow compile-time array sizing inside the package.
-  This is often important for efficiency.
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Error conditions}
-
-When an error condition occurs inside a package, a message describing what went wrong will be printed
-(see PRINT - ASCII output files).
-The name of the routine in which the error occurred must be included.
-It is acceptable to terminate execution within a package, but
-the developer may instead wish to return an error flag through the argument list,
-see \textit{stpctl.F90}.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Memory management}
-
-The main action is to identify and declare which arrays are \forcode{PUBLIC} and which are \forcode{PRIVATE}. \\
-As of version 3.3.1 of NEMO, the use of static arrays (size fixed at compile time) has been deprecated.
-All module arrays are now declared \forcode{ALLOCATABLE} and
-allocated in either the \texttt{<module\_name>\_alloc()} or \texttt{<module\_name>\_init()} routines.
-The success or otherwise of each \forcode{ALLOCATE} must be checked using
-the \texttt{stat=<integer\ variable>} optional argument. \\
-
-In addition to arrays contained within modules, many routines in NEMO require local, ``workspace'' arrays to
-hold the intermediate results of calculations.
-In previous versions of NEMO, these arrays were declared in such a way as to be automatically allocated on
-the stack when the routine was called.
-An example of an automatic array is:
-
-\begin{forlines}
-SUBROUTINE sub(n)
-   REAL :: a(n)
-   ...
-END SUBROUTINE sub
-\end{forlines}
-
-The downside of this approach is that the program will crash if it runs out of stack space and
-the reason for the crash might not be obvious to the user.
-
-Therefore, as of version 3.3.1, the use of automatic arrays is deprecated.
-Instead, a new module, \textit{wrk\_nemo.F90}, has been introduced which
-contains 1-,2-,3- and 4-dimensional workspace arrays for use in subroutines.
-These workspace arrays should be used in preference to declaring new, local (allocatable) arrays whenever possible.
-The only exceptions to this are when workspace arrays with lower bounds other than 1 and/or
-with extent(s) greater than those in the \textit{wrk\_nemo.F90} module are required. \\
-
-The 2D, 3D and 4D workspace arrays in \textit{wrk\_nemo.F90} have extents \texttt{jpi}, \texttt{jpj},
-\texttt{jpk} and \texttt{jpts} ($x$, $y$, $z$ and tracers) in the first, second, third and fourth dimensions,
-respectively.
-The 1D arrays are allocated with extent MAX($jpi \times jpj, jpk \times jpj, jpi \times jpk$). \\
-
-The \forcode{REAL (KIND = wp)} workspace arrays in \textit{wrk\_nemo.F90}
-are named $e.g.$ \texttt{wrk\_1d\_1, wrk\_4d\_2} etc. and
-should be accessed by USE'ing the \textit{wrk\_nemo.F90} module.
-Since these arrays are available to any routine,
-some care must be taken that a given workspace array is not already being used somewhere up the call stack.
-To help with this, \textit{wrk\_nemo.F90} also contains some utility routines;
-\texttt{wrk\_in\_use()} and \texttt{wrk\_not\_released()}.
-The former first checks that the requested arrays are not already in use and then sets internal flags to show that
-they are now in use.
-The \texttt{wrk\_not\_released()} routine un-sets those internal flags.
-A subroutine using this functionality for two, 3D workspace arrays named \texttt{zwrk1} and
-\texttt{zwrk2} will look something like:
-
-\begin{forlines}
-SUBROUTINE sub()
-   USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
-   USE wrk_nemo, ONLY: zwrk1 => wrk_3d_5, zwrk2 => wrk_3d_6
-   !
-   IF(wrk_in_use(3, 5,6)THEN
-      CALL ctl_stop('sub: requested workspace arrays unavailable.')
-      RETURN
-   END IF
-   ...
-   ...
-   IF(wrk_not_released(3, 5,6)THEN
-      CALL ctl_stop('sub: failed to release workspace arrays.')
-   END IF
-   !
-END SUBROUTINE sub
-\end{forlines}
-
-The first argument to each of the utility routines is the dimensionality of the required workspace (1--4).
-Following this there must be one or more integers identifying which workspaces are to be used/released.
-Note that, in the interests of keeping the code as simple as possible,
-there is no use of \forcode{POINTER}s etc. in the \textit{wrk\_nemo.F90} module.
-Therefore it is the responsibility of the developer to ensure that the arguments to \texttt{wrk\_in\_use()} and
-\texttt{wrk\_not\_released()} match the workspace arrays actually being used by the subroutine. \\
-
-If a workspace array is required that has extent(s) less than those of the arrays in
-the \textit{wrk\_nemo.F90} module then the advantages of implicit loops and bounds checking may be retained by
-defining a pointer to a sub-array as follows:
-
-\begin{forlines}
-SUBROUTINE sub()
-   USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
-   USE wrk_nemo, ONLY: wrk_3d_5
-   !
-   REAL(wp), DIMENSION(:,:,:), POINTER :: zwrk1
-   !
-   IF(wrk_in_use(3, 5)THEN
-      CALL ctl_stop('sub: requested workspace arrays unavailable.')
-      RETURN
-   END IF
-   !
-   zwrk1 => wrk_3d_5(1:10,1:10,1:10)
-   ...
-END SUBROUTINE sub
-\end{forlines}
-
-Here, instead of ``use associating'' the variable \texttt{zwrk1} with the array \texttt{wrk\_3d\_5}
-(as in the first example), it is explicitly declared as a pointer to a 3D array.
-It is then associated with a sub-array of \texttt{wrk\_3d\_5} once the call to
-\texttt{wrk\_in\_use()} has completed successfully.
-Note that in F95 (to which NEMO conforms) it is not possible for either the upper or lower array bounds of
-the pointer object to differ from those of the target array. \\
-
-In addition to the \forcode{REAL (KIND = wp)} workspace arrays,
-\textit{wrk\_nemo.F90} also contains 2D integer arrays and 2D REAL arrays with extent (\texttt{jpi}, \texttt{jpk}),
-$i.e.$ $xz$.
-The utility routines for the integer workspaces are \texttt{iwrk\_in\_use()} and \texttt{iwrk\_not\_released()} while
-those for the $xz$ workspaces are \texttt{wrk\_in\_use\_xz()} and \texttt{wrk\_not\_released\_xz()}.
-
-Should a call to one of the \texttt{wrk\_in\_use()} family of utilities fail,
-an error message is printed along with a table showing which of the workspace arrays are currently in use.
-This should enable the developer to choose alternatives for use in the subroutine being worked on. \\
-
-When compiling NEMO for production runs,
-the calls to {\texttt{wrk\_in\_use()} / \texttt{wrk\_not\_released()} can be reduced to stubs that just
-return \forcode{.false.} by setting the cpp key \texttt{key\_no\_workspace\_check}.
-These stubs may then be inlined (and thus effectively removed altogether) by setting appropriate compiler flags
-($e.g.$ ``-finline'' for the Intel compiler or ``-Q'' for the IBM compiler).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Optimisation}
-
-Considering the new computer architecture, optimisation cannot be considered independently from the computer type.
-In NEMO, portability is a priority, before any too specific optimisation.
-
-Some tools are available to help: for vector computers, \texttt{key\_vectopt\_loop} allows to unroll a loop
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection{Package attribute: \forcode{PRIVATE}, \forcode{PUBLIC}, \forcode{USE}, \forcode{ONLY}}
-
-Module variables and routines should be encapsulated by using the \forcode{PRIVATE} attribute.
-What shall be used outside the module can be declared \forcode{PUBLIC} instead.
-Use \forcode{USE} with the \forcode{ONLY} attribute to specify which of the variables, type definitions etc...
-defined in a module are to be made available to the using routine.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\subsection {Parallelism using MPI}
-
-NEMO is written in order to be able to run on one processor, or on one or more using MPI
-($i.e.$ activating the cpp key $key\_mpp\_mpi$).
-The domain decomposition divides the global domain in cubes (see NEMO reference manual).
-Whilst coding a new development, the MPI compatibility has to be taken in account
-(see \path{./src/LBC/lib_mpp.F90}) and should be tested.
-By default, the $x$-$z$ part of the decomposition is chosen to be as square as possible.
-However, this may be overriden by specifying the number of subdomains in latitude and longitude in
-the \texttt{nammpp} section of the namelist file.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{Features to be avoided}
-
-The code must follow the current standards of FORTRAN and ANSI C.
-In particular, the code should not produce any WARNING at compiling phase, so that
-users can be easily alerted of potential bugs when some appear in their new developments.
-Below is a list of features to avoid:
-\begin{itemize}
-\item
-  \forcode{COMMON} block
-  (use the declaration part of \forcode{MODULE} instead)
-\item
-  \forcode{EQUIVALENCE}
-  (use \forcode{POINTER} or derived data type instead to form data structure)
-\item
-  Assigned and computed \forcode{GOTO}
-  (use the \forcode{CASE} construct instead)
-\item
-  Arithmetic \forcode{IF} statement
-  (use the block \forcode{IF}, \forcode{ELSE}, \forcode{ELSEIF}, \forcode{ENDIF} or
-  \forcode{SELECT CASE} construct instead)
-\item
-  Labeled \forcode{DO} construct
-  (use unlabeled \forcode{END DO} instead)
-\item
-  \forcode{FORMAT} statement
-  (use character parameters or
-  explicit format- specifiers inside the \forcode{READ} or \forcode{WRITE} statement instead)
-\item
-  \forcode{GOTO} and \forcode{CONTINUE} statements
-  (use \forcode{IF}, \forcode{CASE}, \forcode{DO WHILE}, \forcode{EXIT} or \forcode{CYCLE} statements or
-  a contained ?)
-\item
-  \forcode{PAUSE}
-\item
-  \forcode{ENTRY} statement: a subprogram must only have one entry point.
-\item
-  \forcode{RETURN} is obsolete and so not necessary at the end of program units
-\item
-  \forcode{FUNCTION} statement
-\item
-  Avoid functions with side effects.
-  \footnote{
-    First, the code is easier to understand, if you can rely on
-    the rule that functions don't change their arguments.
-    Second, some compilers generate more efficient code for PURE functions
-    (in FORTRAN 95 there are the attributes PURE and ELEMENTAL), because
-    they can store the arguments in different places.
-    This is especially important on massive parallel and as well on vector machines.
-  }
-\item
-  \forcode{DATA} and \forcode{BLOCK DATA}
-  (use initialisers)
-\end{itemize}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-% \printindex
-% \input NEMO_coding.conv.ind
-
-\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/NEMO_manual.bib
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/NEMO_manual.bib	(revision 11086)
+++ 	(revision )
@@ -1,5308 +1,0 @@
-
-@Article{         adcroft_campin_04,
-  author        = {Adcroft, Alistair and Campin, Jean-Michel},
-  title         = {Rescaled height coordinates for accurate representation of
-                  free-surface flows in ocean circulation models},
-  year          = 2004,
-  volume        = 7,
-  number        = {3-4},
-  month         = {Jan},
-  pages         = {269–284},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2003.09.003},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2003.09.003},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         arakawa_66,
-  author       = {Arakawa, Akio},
-  title	       = {Computational design for long-term numerical
-                  integration of the equations of fluid motion:
-                  Two-dimensional incompressible flow. Part I},
-  year	       = 1966,
-  volume       = 1,
-  number       = 1,
-  month	       = {Aug},
-  pages	       = {119–143},
-  issn	       = {0021-9991},
-  doi	       = {10.1016/0021-9991(66)90015-5},
-  url	       = {http://dx.doi.org/10.1016/0021-9991(66)90015-5},
-  journal      = {Journal of Computational Physics},
-  publisher    = {Elsevier BV}
-}
-
-@Article{         arakawa_hsu_90,
-  author        = {Arakawa, Akio and Hsu, Yueh-Jiuan G.},
-  title         = {Energy Conserving and Potential-Enstrophy Dissipating
-                  Schemes for the Shallow Water Equations},
-  year          = 1990,
-  volume        = 118,
-  number        = 10,
-  month         = {Oct},
-  pages         = {1960–1969},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(1990)118<1960:ecaped>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(1990)118<1960:ecaped>2.0.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         arakawa_lamb_81,
-  author        = {Arakawa, Akio and Lamb, Vivian R.},
-  title         = {A Potential Enstrophy and Energy Conserving Scheme for the
-                  Shallow Water Equations},
-  year          = 1981,
-  volume        = 109,
-  number        = 1,
-  month         = {Jan},
-  pages         = {18–36},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(1981)109<0018:apeaec>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(1981)109<0018:apeaec>2.0.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         arbic_garner_ea_04,
-  author        = {Arbic, Brian K. and Garner, Stephen T. and Hallberg,
-                  Robert W. and Simmons, Harper L.},
-  title         = {The accuracy of surface elevations in forward global
-                  barotropic and baroclinic tide models},
-  year          = 2004,
-  volume        = 51,
-  number        = {25-26},
-  month         = {Dec},
-  pages         = {3069–3101},
-  issn          = {0967-0645},
-  doi           = {10.1016/j.dsr2.2004.09.014},
-  url           = {http://dx.doi.org/10.1016/j.dsr2.2004.09.014},
-  journal       = {Deep Sea Research Part II: Topical Studies in
-                  Oceanography},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         arbic_wallcraft_ea_10,
-  author        = {Arbic, Brian K. and Wallcraft, Alan J. and Metzger, E.
-                  Joseph},
-  title         = {Concurrent simulation of the eddying general circulation
-                  and tides in a global ocean model},
-  year          = 2010,
-  volume        = 32,
-  number        = {3-4},
-  month         = {Jan},
-  pages         = {175–187},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2010.01.007},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2010.01.007},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         arhan_treguier_ea_06,
-  author        = {Arhan, M. and Treguier, A. M. and Bourlès, B. and Michel,
-                  S.},
-  title         = {Diagnosing the Annual Cycle of the Equatorial Undercurrent
-                  in the Atlantic Ocean from a General Circulation Model},
-  year          = 2006,
-  volume        = 36,
-  number        = 8,
-  month         = {Aug},
-  pages         = {1502–1522},
-  issn          = {1520-0485},
-  doi           = {10.1175/jpo2929.1},
-  url           = {http://dx.doi.org/10.1175/jpo2929.1},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         artale_02,
-author = {Artale, Vincenzo and Iudicone, Daniele and Santoleri, Rosalia and Rupolo, Volfango and Marullo, Salvatore and D'Ortenzio, Fabrizio},
-title = {Role of surface fluxes in ocean general circulation models using satellite sea surface temperature: Validation of and sensitivity to the forcing frequency of the Mediterranean thermohaline circulation},
-journal = {Journal of Geophysical Research: Oceans},
-volume = {107},
-number = {C8},
-pages = {29-1-29-24},
-doi = {10.1029/2000JC000452},
-url = {http://dx.doi.org/10.1029/2000JC000452},
-year = {2002},
-  issn          = {0148-0227},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         asselin_72,
-  author        = {Asselin, Richard},
-  title         = {Frequency Filter for Time Integrations},
-  year          = 1972,
-  volume        = 100,
-  number        = 6,
-  month         = {Jun},
-  pages         = {487–490},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(1972)100<0487:fffti>2.3.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(1972)100<0487:fffti>2.3.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         atmadipoera_molcard_ea_09,
-  author        = {Atmadipoera, Agus and Molcard, Robert and Madec, Gurvan
-                  and Wijffels, Susan and Sprintall, Janet and Koch-Larrouy,
-                  Ariane and Jaya, Indra and Supangat, Agus},
-  title         = {Characteristics and variability of the Indonesian
-                  throughflow water at the outflow straits},
-  year          = 2009,
-  volume        = 56,
-  number        = 11,
-  month         = {Nov},
-  pages         = {1942–1954},
-  issn          = {0967-0637},
-  doi           = {10.1016/j.dsr.2009.06.004},
-  url           = {http://dx.doi.org/10.1016/j.dsr.2009.06.004},
-  journal       = {Deep Sea Research Part I: Oceanographic Research Papers},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         aumont_orr_ea_98,
-  author        = {Aumont, O. and Orr, J. C. and Jamous, D. and Monfray, P.
-                  and Marti, O. and Madec, G.},
-  title         = {A degradation approach to accelerate simulations to
-                  steady-state in a 3-D tracer transport model of the global
-                  ocean},
-  year          = 1998,
-  volume        = 14,
-  number        = 2,
-  month         = {Feb},
-  pages         = {101–116},
-  issn          = {1432-0894},
-  doi           = {10.1007/s003820050212},
-  url           = {http://dx.doi.org/10.1007/s003820050212},
-  journal       = {Climate Dynamics},
-  publisher     = {Springer Nature}
-}
-
-@Article{         aumont_orr_ea_99,
-  author        = {Aumont, O. and Orr, J. C. and Monfray, P. and Madec, G.
-                  and Maier-Reimer, E.},
-  title         = {Nutrient trapping in the equatorial Pacific: The ocean
-                  circulation solution},
-  year          = 1999,
-  volume        = 13,
-  number        = 2,
-  month         = {Jun},
-  pages         = {351–369},
-  issn          = {0886-6236},
-  doi           = {10.1029/1998gb900012},
-  url           = {http://dx.doi.org/10.1029/1998gb900012},
-  journal       = {Global Biogeochemical Cycles},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         axell_02,
-  author        = {Axell, Lars B.},
-  title         = {Wind-driven internal waves and Langmuir circulations in a
-                  numerical ocean model of the southern Baltic Sea},
-  year          = 2002,
-  volume        = 107,
-  number        = {C11},
-  issn          = {0148-0227},
-  doi           = {10.1029/2001jc000922},
-  url           = {http://dx.doi.org/10.1029/2001JC000922},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         axell_liungman_01,
-  author        = {Axell, L.B. and Liungman, O.},
-  title         = {A one-equation turbulence model for geophysical
-                  applications: Comparison with data and the k-$\epsilon$
-                  model},
-  year          = 2001,
-  volume        = 1,
-  number        = 1,
-  pages         = {71–106},
-  issn          = {1567-7419},
-  doi           = {10.1023/a:1011560202388},
-  url           = {http://dx.doi.org/10.1023/A:1011560202388},
-  journal       = {Environmental Fluid Mechanics},
-  publisher     = {Springer Nature}
-}
-
-@Article{         ayina_bentamy_ea_06,
-  author        = {Ayina, Ludos-Herve and Bentamy, Abderrahim and
-                  Mestas-Nuñez, Alberto M. and Madec, Gurvan},
-  title         = {The Impact of Satellite Winds and Latent Heat Fluxes in a
-                  Numerical Simulation of the Tropical Pacific Ocean},
-  year          = 2006,
-  volume        = 19,
-  number        = 22,
-  month         = {Nov},
-  pages         = {5889–5902},
-  issn          = {1520-0442},
-  doi           = {10.1175/jcli3939.1},
-  url           = {http://dx.doi.org/10.1175/jcli3939.1},
-  journal       = {Journal of Climate},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         barnier_madec_ea_06,
-  author        = {Barnier, Bernard and Madec, Gurvan and Penduff, Thierry
-                  and Molines, Jean-Marc and Treguier, Anne-Marie and Le
-                  Sommer, Julien and Beckmann, Aike and Biastoch, Arne and
-                  Böning, Claus and Dengg, Joachim and et al.},
-  title         = {Impact of partial steps and momentum advection schemes in
-                  a global ocean circulation model at eddy-permitting
-                  resolution},
-  year          = 2006,
-  volume        = 56,
-  number        = {5-6},
-  month         = {Jun},
-  pages         = {543–567},
-  issn          = {1616-7228},
-  doi           = {10.1007/s10236-006-0082-1},
-  url           = {http://dx.doi.org/10.1007/s10236-006-0082-1},
-  journal       = {Ocean Dynamics},
-  publisher     = {Springer Nature}
-}
-
-@InCollection{    barnier_marchesiello_ea_96,
-  author        = {Barnier, B. and Marchesiello, P. and de Miranda, A. P.},
-  title         = {Modelling the Ocean Circulation in the South Atlantic: A
-                  Strategy for Dealing with Open Boundaries},
-  year          = 1996,
-  pages         = {289–304},
-  doi           = {10.1007/978-3-642-80353-6_16},
-  url           = {http://dx.doi.org/10.1007/978-3-642-80353-6_16},
-  isbn          = 9783642803536,
-  booktitle     = {The South Atlantic: Present and Past Circulation},
-  editor        = {G.Wefer and W.H. Berger and G Siedler and D. Webb},
-  publisher     = {Springer-Verlag, Berlin},
-}
-
-@Article{         barnier_marchesiello_ea_98,
-  author        = {Barnier, Bernard and Marchesiello, Patrick and De Miranda,
-                  Anne Pimenta and Molines, Jean-Marc and Coulibaly, Macky},
-  title         = {A sigma-coordinate primitive equation model for studying
-                  the circulation in the South Atlantic. Part I: Model
-                  configuration with error estimates},
-  year          = 1998,
-  volume        = 45,
-  number        = {4-5},
-  month         = {Apr},
-  pages         = {543–572},
-  issn          = {0967-0637},
-  doi           = {10.1016/s0967-0637(97)00086-1},
-  url           = {http://dx.doi.org/10.1016/s0967-0637(97)00086-1},
-  journal       = {Deep Sea Research Part I: Oceanographic Research Papers},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         barthelet_bony_ea_98,
-  author        = {P. Barthelet and S. Bony and P. Braconnot and A. Braum and
-                  D. Cariolle and E. Cohen-Solal and J.-L. Dufresne and P.
-                  Delecluse and M. D\'{e}qu\'{e} and L. Fairhead and M.-A.
-                  Filiberti and M. Forichon and J.-Y. Grandpeix and E.
-                  Guilyardi and M.-N. Houssais and M. Imbard and H. Le Treut
-                  and C. Lévy and Z.X. Li and G. Madec and P. Marquet and O.
-                  Marti and S. Planton and L. Terray and O. Thual and S.
-                  Valcke},
-  year          = {1998},
-  month         = {01},
-  pages         = {677-684},
-  title         = {Global coupled simulations of climate change due to
-                  increased atmospheric CO2 concentration},
-  volume        = {326},
-  journal       = {Comptes Rendus De l'Academie Des Sciences Serie Ii
-                  Fascicule a-Sciences De La Terre Et Des Planetes},
-  url           = {https://www.researchgate.net/publication/230559590_Global_coupled_simulations_of_climate_change_due_to_increased_atmospheric_CO}
-}
-
-@InCollection{   beckmann_98,
-  author        = {Beckmann, Aike},
-  title         = {The Representation of Bottom Boundary Layer Processes in
-                  Numerical Ocean Circulation Models},
-  year          = 1998,
-  pages         = {135–154},
-  doi           = {10.1007/978-94-011-5096-5_5},
-  url           = {http://dx.doi.org/10.1007/978-94-011-5096-5_5},
-  isbn          = 9789401150965,
-  booktitle     = {Ocean Modeling and Parameterization},
-  editor        = "Chassignet, Eric P. and Verron, Jacques",
-  publisher     = {Springer Netherlands}
-}
-
-@Article{         beckmann_doscher_97,
-  author        = {Beckmann, A. and D\"{o}scher, R.},
-  title         = {A Method for Improved Representation of Dense Water
-                  Spreading over Topography in Geopotential-Coordinate
-                  Models},
-  year          = 1997,
-  volume        = 27,
-  number        = 4,
-  month         = {Apr},
-  pages         = {581–591},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1997)027<0581:amfiro>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1997)027<0581:amfiro>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         beckmann_goosse_03,
-  author        = {Beckmann, A and Goosse, H},
-  title         = {A parameterization of ice shelf–ocean interaction for
-                  climate models},
-  year          = 2003,
-  volume        = 5,
-  number        = 2,
-  month         = {Jan},
-  pages         = {157–170},
-  issn          = {1463-5003},
-  doi           = {10.1016/s1463-5003(02)00019-7},
-  url           = {http://dx.doi.org/10.1016/s1463-5003(02)00019-7},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         beckmann_haidvogel_93,
-  author        = {Beckmann, Aike and Haidvogel, Dale B.},
-  title         = {Numerical Simulation of Flow around a Tall Isolated
-                  Seamount. Part I: Problem Formulation and Model Accuracy},
-  year          = 1993,
-  volume        = 23,
-  number        = 8,
-  month         = {Aug},
-  pages         = {1736–1753},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1993)023<1736:nsofaa>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1993)023<1736:nsofaa>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         bernie_guilyardi_ea_07,
-  author        = {Bernie, D. J. and Guilyardi, E. and Madec, G. and Slingo,
-                  J. M. and Woolnough, S. J.},
-  title         = {Impact of resolving the diurnal cycle in an
-                  ocean–atmosphere GCM. Part 1: a diurnally forced OGCM},
-  year          = 2007,
-  volume        = 29,
-  number        = 6,
-  month         = {May},
-  pages         = {575–590},
-  issn          = {1432-0894},
-  doi           = {10.1007/s00382-007-0249-6},
-  url           = {http://dx.doi.org/10.1007/s00382-007-0249-6},
-  journal       = {Climate Dynamics},
-  publisher     = {Springer Nature}
-}
-
-@Article{         bernie_guilyardi_ea_08,
-  author        = {Bernie, D. J. and Guilyardi, E. and Madec, G. and Slingo,
-                  J. M. and Woolnough, S. J. and Cole, J.},
-  title         = {Impact of resolving the diurnal cycle in an
-                  ocean–atmosphere GCM. Part 2: A diurnally coupled CGCM},
-  year          = 2008,
-  volume        = 31,
-  number        = {7-8},
-  month         = {Jun},
-  pages         = {909–925},
-  issn          = {1432-0894},
-  doi           = {10.1007/s00382-008-0429-z},
-  url           = {http://dx.doi.org/10.1007/s00382-008-0429-z},
-  journal       = {Climate Dynamics},
-  publisher     = {Springer Science and Business Media LLC}
-}
-
-@Article{         bernie_woolnough_ea_05,
-  author        = {Bernie, D. J. and Woolnough, S. J. and Slingo, J. M. and
-                  Guilyardi, E.},
-  title         = {Modeling Diurnal and Intraseasonal Variability of the
-                  Ocean Mixed Layer},
-  year          = 2005,
-  volume        = 18,
-  number        = 8,
-  month         = {Apr},
-  pages         = {1190–1202},
-  issn          = {1520-0442},
-  doi           = {10.1175/jcli3319.1},
-  url           = {http://dx.doi.org/10.1175/jcli3319.1},
-  journal       = {Journal of Climate},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         bessieres_madec_ea_08,
-  author        = {Bessi\'{e}res, Laurent and Madec, Gurvan and Lyard, Florent},
-  title         = {Global tidal residual mean circulation: Does it affect a
-                  climate OGCM?},
-  year          = 2008,
-  volume        = 35,
-  number        = 3,
-  pages         = {L03609},
-  month         = {Feb},
-  issn          = {0094-8276},
-  doi           = {10.1029/2007gl032644},
-  url           = {http://dx.doi.org/10.1029/2007GL032644},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         biastoch_böning_ea_08,
-  author        = {Biastoch, Arne and Böning, Claus W. and Getzlaff, Julia
-                  and Molines, Jean-Marc and Madec, Gurvan},
-  title         = {Causes of Interannual–Decadal Variability in the
-                  Meridional Overturning Circulation of the Midlatitude North
-                  Atlantic Ocean},
-  year          = 2008,
-  volume        = 21,
-  number        = 24,
-  month         = {Dec},
-  pages         = {6599–6615},
-  issn          = {1520-0442},
-  doi           = {10.1175/2008jcli2404.1},
-  url           = {http://dx.doi.org/10.1175/2008JCLI2404.1},
-  journal       = {Journal of Climate},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         bignami_marullo_ea_95,
-  author        = {Bignami, F. and Marullo, S. and Santoleri, R. and Schiano,
-                  M. E.},
-  title         = {Longwave radiation budget in the Mediterranean Sea},
-  year          = 1995,
-  volume        = 100,
-  number        = {C2},
-  pages         = {2501--2514},
-  issn          = {0148-0227},
-  doi           = {10.1029/94jc02496},
-  url           = {http://dx.doi.org/10.1029/94JC02496},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         blanke_arhan_ea_99,
-  author        = {Blanke, Bruno and Arhan, Michel and Madec, Gurvan and
-                  Roche, Sophie},
-  title         = {Warm Water Paths in the Equatorial Atlantic as Diagnosed
-                  with a General Circulation Model},
-  year          = 1999,
-  volume        = 29,
-  number        = 11,
-  month         = {Nov},
-  pages         = {2753–2768},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1999)029<2753:wwpite>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1999)029<2753:wwpite>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         blanke_delecluse_93,
-  author        = {Blanke, Bruno and Delecluse, Pascale},
-  title         = {Variability of the Tropical Atlantic Ocean Simulated by a
-                  General Circulation Model with Two Different Mixed-Layer
-                  Physics},
-  year          = 1993,
-  volume        = 23,
-  number        = 7,
-  month         = {Jul},
-  pages         = {1363–1388},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1993)023<1363:vottao>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1993)023<1363:vottao>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         blanke_neelin_ea_97,
-  author        = {Blanke, Bruno and Neelin, J. David and Gutzler, David},
-  title         = {Estimating the Effect of Stochastic Wind Stress Forcing on
-                  ENSO Irregularity},
-  year          = 1997,
-  volume        = 10,
-  number        = 7,
-  month         = {Jul},
-  pages         = {1473–1486},
-  issn          = {1520-0442},
-  doi           = {10.1175/1520-0442(1997)010<1473:eteosw>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0442(1997)010<1473:eteosw>2.0.co;2},
-  journal       = {Journal of Climate},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         blanke_raynaud_97,
-  author        = {Blanke, Bruno and Raynaud, Stéphane},
-  title         = {Kinematics of the Pacific Equatorial Undercurrent: An
-                  Eulerian and Lagrangian Approach from GCM Results},
-  year          = 1997,
-  volume        = 27,
-  number        = 6,
-  month         = {Jun},
-  pages         = {1038–1053},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1997)027<1038:kotpeu>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1997)027<1038:kotpeu>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         blanke_speich_ea_01,
-  author        = {Blanke, B. and Speich, S. and Madec, G. and D\"{o}\"{o}s, K.},
-  title         = {A Global Diagnostic of Interocean Mass Transfers},
-  year          = 2001,
-  volume        = 31,
-  number        = 6,
-  month         = {Jun},
-  pages         = {1623–1632},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(2001)031<1623:agdoim>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(2001)031<1623:agdoim>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         blanke_speich_ea_02,
-  author        = {Blanke, Bruno and Speich, Sabrina and Madec, Gurvan and
-                  Maug\'{e}, Rudy},
-  title         = {A global diagnostic of interior ocean ventilation},
-  year          = 2002,
-  volume        = 29,
-  number        = 8,
-  month         = {Apr},
-  pages         = {1081--1084},
-  issn          = {0094-8276},
-  doi           = {10.1029/2001gl013727},
-  url           = {http://dx.doi.org/10.1029/2001gl013727},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         blayo_debreu_05,
-  author        = {Blayo, E. and Debreu, L.},
-  title         = {Revisiting open boundary conditions from the point of view
-                  of characteristic variables},
-  year          = 2005,
-  volume        = 9,
-  number        = 3,
-  month         = {Jan},
-  pages         = {231–252},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2004.07.001},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2004.07.001},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         bloom_takacs_ea_96,
-  author        = {Bloom, S. C. and Takacs, L. L. and da Silva, A. M. and
-                  Ledvina, D.},
-  title         = {Data Assimilation Using Incremental Analysis Updates},
-  year          = 1996,
-  volume        = 124,
-  number        = 6,
-  month         = {Jun},
-  pages         = {1256–1271},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(1996)124<1256:dauiau>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(1996)124<1256:dauiau>2.0.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         bopp_monfray_ea_01,
-  author        = {Bopp, Laurent and Monfray, Patrick and Aumont, Olivier and
-                  Dufresne, Jean-Louis and Le Treut, Hervé and Madec, Gurvan
-                  and Terray, Laurent and Orr, James C.},
-  title         = {Potential impact of climate change on marine export
-                  production},
-  year          = 2001,
-  volume        = 15,
-  number        = 1,
-  month         = {Mar},
-  pages         = {81–99},
-  issn          = {0886-6236},
-  doi           = {10.1029/1999gb001256},
-  url           = {http://dx.doi.org/10.1029/1999gb001256},
-  journal       = {Global Biogeochemical Cycles},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         bouffard_boegman_13,
-  author        = {Bouffard, Damien and Boegman, Leon},
-  title         = {A diapycnal diffusivity model for stratified environmental
-                  flows},
-  year          = 2013,
-  volume        = {61-62},
-  month         = {Jun},
-  pages         = {14–34},
-  issn          = {0377-0265},
-  doi           = {10.1016/j.dynatmoce.2013.02.002},
-  url           = {http://dx.doi.org/10.1016/j.dynatmoce.2013.02.002},
-  journal       = {Dynamics of Atmospheres and Oceans},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         bougeault_lacarrere_89,
-  author        = {Bougeault, P. and Lacarrere, P.},
-  title         = {Parameterization of Orography-Induced Turbulence in a
-                  Mesobeta--Scale Model},
-  year          = 1989,
-  volume        = 117,
-  number        = 8,
-  month         = {Aug},
-  pages         = {1872–1890},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(1989)117<1872:pooiti>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(1989)117<1872:pooiti>2.0.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         bouillon_morales-maqueda_ea_09,
-  author        = {Bouillon, Sylvain and Morales Maqueda, Miguel Ángel and
-                  Legat, Vincent and Fichefet, Thierry},
-  title         = {An elastic–viscous–plastic sea ice model formulated on
-                  Arakawa B and C grids},
-  year          = 2009,
-  volume        = 27,
-  number        = {3-4},
-  month         = {Jan},
-  pages         = {174–184},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2009.01.004},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2009.01.004},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         boulanger_durand_ea_01,
-  author        = {Boulanger, J.-P. and Durand, E. and Duvel, J.-P. and
-                  Menkes, C. and Delecluse, P. and Imbard, M. and Lengaigne,
-                  M. and Madec, G. and Masson, S.},
-  title         = {Role of non-linear oceanic processes in the response to
-                  westerly wind events: New implications for the 1997 El
-                  Niño onset},
-  year          = 2001,
-  volume        = 28,
-  number        = 8,
-  month         = {Apr},
-  pages         = {1603–1606},
-  issn          = {0094-8276},
-  doi           = {10.1029/2000gl012364},
-  url           = {http://dx.doi.org/10.1029/2000gl012364},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         boyer-montegut_vialard_ea_07,
-  author        = {De Boyer Mont\'{e}gut, Cl\'{e}ment and Vialard, J\'{e}r\^{o}me and
-                  Shenoi, S. S. C. and Shankar, D. and Durand, Fabien and
-                  Eth\'{e}, Christian and Madec, Gurvan},
-  title         = {Simulated Seasonal and Interannual Variability of the
-                  Mixed Layer Heat Budget in the Northern Indian Ocean},
-  year          = 2007,
-  volume        = 20,
-  number        = 13,
-  month         = {Jul},
-  pages         = {3249–3268},
-  issn          = {1520-0442},
-  doi           = {10.1175/jcli4148.1},
-  url           = {http://dx.doi.org/10.1175/jcli4148.1},
-  journal       = {Journal of Climate},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         boyer-montégut_04,
-  author        = {De Boyer Mont\'{e}gut, Clément},
-  title         = {Mixed layer depth over the global ocean: An examination of
-                  profile data and a profile-based climatology},
-  year          = 2004,
-  volume        = 109,
-  number        = {C12},
-  pages         = {C12003},
-  issn          = {0148-0227},
-  doi           = {10.1029/2004jc002378},
-  url           = {http://dx.doi.org/10.1029/2004JC002378},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         brankart_13,
-  author        = {Brankart, Jean-Michel},
-  title         = {Impact of uncertainties in the horizontal density gradient
-                  upon low resolution global ocean modelling},
-  year          = 2013,
-  volume        = 66,
-  month         = {Jun},
-  pages         = {64–76},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2013.02.004},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2013.02.004},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         brankart_candille_ea_15,
-  author        = {Brankart, J.-M. and Candille, G. and Garnier, F. and
-                  Calone, C. and Melet, A. and Bouttier, P.-A. and Brasseur,
-                  P. and Verron, J.},
-  title         = {A generic approach to explicit simulation of uncertainty
-                  in the NEMO ocean model},
-  year          = 2015,
-  volume        = 8,
-  number        = 5,
-  month         = {May},
-  pages         = {1285–1297},
-  issn          = {1991-9603},
-  doi           = {10.5194/gmd-8-1285-2015},
-  url           = {http://dx.doi.org/10.5194/gmd-8-1285-2015},
-  journal       = {Geoscientific Model Development},
-  publisher     = {Copernicus GmbH}
-}
-
-@Article{         breivik_bidlot_ea_16,
-  author        = {Breivik, {\O}yvind and Bidlot, Jean-Raymond and Janssen,
-                  Peter A.E.M.},
-  title         = {A Stokes drift approximation based on the Phillips
-                  spectrum},
-  year          = 2016,
-  volume        = 100,
-  month         = {Apr},
-  pages         = {49--56, arXiv:1601.08092},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2016.01.005},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2016.01.005},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         breivik_janssen_ea_14,
-  author        = {Breivik, {\O}yvind and Janssen, Peter A. E. M. and Bidlot,
-                  Jean-Raymond},
-  title         = {Approximate Stokes Drift Profiles in Deep Water},
-  year          = 2014,
-  volume        = 44,
-  number        = 9,
-  month         = {Sep},
-  pages         = {2433--2445, arXiv:1406.5039},
-  issn          = {1520-0485},
-  doi           = {10.1175/jpo-d-14-0020.1},
-  url           = {http://dx.doi.org/10.1175/JPO-D-14-0020.1},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         brodeau_barnier_ea_10,
-  author        = {Brodeau, Laurent and Barnier, Bernard and Tr\'{e}guier,
-                  Anne-Marie and Penduff, Thierry and Gulev, Sergei},
-  title         = {An ERA40-based atmospheric forcing for global ocean
-                  circulation models},
-  year          = 2010,
-  volume        = 31,
-  number        = {3-4},
-  month         = {Jan},
-  pages         = {88–104},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2009.10.005},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2009.10.005},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         brown_campana_78,
-  author        = {Brown, John A. and Campana, Kenneth A.},
-  title         = {An Economical Time–Differencing System for Numerical
-                  Weather Prediction},
-  year          = 1978,
-  volume        = 106,
-  number        = 8,
-  month         = {Aug},
-  pages         = {1125–1136},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(1978)106<1125:aetsfn>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(1978)106<1125:aetsfn>2.0.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         bryan_84,
-  author        = {Bryan, Kirk},
-  title         = {Accelerating the Convergence to Equilibrium of
-                  Ocean-Climate Models},
-  year          = 1984,
-  volume        = 14,
-  number        = 4,
-  month         = {Apr},
-  pages         = {666–673},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1984)014<0666:atcteo>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1984)014<0666:atcteo>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         bryan_97,
-  author       = {Bryan, Kirk},
-  title	       = {A Numerical Method for the Study of the Circulation
-                  of the World Ocean},
-  year	       = 1997,
-  volume       = 135,
-  number       = 2,
-  month	       = {Aug},
-  pages	       = {154–169},
-  issn	       = {0021-9991},
-  doi	       = {10.1006/jcph.1997.5699},
-  url	       = {http://dx.doi.org/10.1006/jcph.1997.5699},
-  journal      = {Journal of Computational Physics},
-  publisher    = {Elsevier BV}
-}
-
-@Article{         bryden_73,
-  author        = {Bryden, Harry L.},
-  title         = {New polynomials for thermal expansion, adiabatic
-                  temperature gradient and potential temperature of sea
-                  water},
-  year          = 1973,
-  volume        = 20,
-  number        = 4,
-  month         = {Apr},
-  pages         = {401–408},
-  issn          = {0011-7471},
-  doi           = {10.1016/0011-7471(73)90063-6},
-  url           = {http://dx.doi.org/10.1016/0011-7471(73)90063-6},
-  journal       = {Deep Sea Research and Oceanographic Abstracts},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         burchard_02,
-  author        = {Burchard, Hans},
-  title         = {Energy-conserving discretisation of turbulent shear and
-                  buoyancy production},
-  year          = 2002,
-  volume        = 4,
-  number        = {3-4},
-  month         = {Jun},
-  pages         = {347–361},
-  issn          = {1463-5003},
-  doi           = {10.1016/s1463-5003(02)00009-4},
-  url           = {http://dx.doi.org/10.1016/S1463-5003(02)00009-4},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@TechReport{      cice_manual,
-  author        = {C. Hunke, Elizabeth and Lipscomb, W},
-  title         = {CICE: The Los Alamos sea ice model documentation and
-                  software user's manual LA-CC-06-012},
-  year          = 2010,
-  url           = {https://csdms.colorado.edu/w/images/CICE_documentation_and_software_user's_manual.pdf},
-  institution   = {Los Alamos National Laboratory},
-  number        = {4.1}
-}
-
-@Article{         campin_adcroft_ea_04,
-  author        = {Campin, Jean-Michel and Adcroft, Alistair and Hill, Chris
-                  and Marshall, John},
-  title         = {Conservation of properties in a free-surface model},
-  year          = 2004,
-  volume        = 6,
-  number        = {3-4},
-  month         = {Jan},
-  pages         = {221–244},
-  issn          = {1463-5003},
-  doi           = {10.1016/s1463-5003(03)00009-x},
-  url           = {http://dx.doi.org/10.1016/s1463-5003(03)00009-x},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         campin_goosse_99,
-  author        = {Campin, Jean-Michel and Goosse, Hugues},
-  title         = {Parameterization of density-driven downsloping flow for a
-                  coarse-resolution ocean model in z-coordinate},
-  year          = 1999,
-  volume        = 51,
-  number        = 3,
-  month         = {May},
-  pages         = {412–430},
-  issn          = {1600-0870},
-  doi           = {10.1034/j.1600-0870.1999.t01-3-00006.x},
-  url           = {http://dx.doi.org/10.1034/j.1600-0870.1999.t01-3-00006.x},
-  journal       = {Tellus A},
-  publisher     = {Informa UK Limited}
-}
-
-@Article{         campin_marshall_ea_08,
-  author        = {Campin, Jean-Michel and Marshall, John and Ferreira,
-                  David},
-  title         = {Sea ice–ocean coupling using a rescaled vertical
-                  coordinate z∗},
-  year          = 2008,
-  volume        = 24,
-  number        = {1-2},
-  month         = {Jan},
-  pages         = {1–14},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2008.05.005},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2008.05.005},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         canuto_howard_ea_01,
-  author        = {Canuto, V. M. and Howard, A. and Cheng, Y. and Dubovikov,
-                  M. S.},
-  title         = {Ocean Turbulence. Part I: One-Point Closure
-                  Model—Momentum and Heat Vertical Diffusivities},
-  year          = 2001,
-  volume        = 31,
-  number        = 6,
-  month         = {Jun},
-  pages         = {1413–1426},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(2001)031<1413:otpiop>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(2001)031<1413:otpiop>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         carrère_lyard_03,
-  author        = {Carr\`{e}re, Loren and Lyard, Florent},
-  title         = {Modeling the barotropic response of the global ocean to
-                  atmospheric wind and pressure forcing - comparisons with
-                  observations},
-  year          = 2003,
-  volume        = 30,
-  number        = 6,
-  month         = {Mar},
-  issn          = {0094-8276},
-  doi           = {10.1029/2002gl016473},
-  url           = {http://dx.doi.org/10.1029/2002GL016473},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         castellari_pinardi_ea_98,
-  author        = {Castellari, Sergio and Pinardi, Nadia and Leaman, Kevin},
-  title         = {A model study of air–sea interactions in the
-                  Mediterranean Sea},
-  year          = 1998,
-  volume        = 18,
-  number        = {1-3},
-  month         = {Dec},
-  pages         = {89–114},
-  issn          = {0924-7963},
-  doi           = {10.1016/s0924-7963(98)90007-0},
-  url           = {http://dx.doi.org/10.1016/s0924-7963(98)90007-0},
-  journal       = {Journal of Marine Systems},
-  publisher     = {Elsevier BV}
-}
-
-@TechReport{      chanut_05,
-  author        = {J. Chanut},
-  title         = {Nesting code for NEMO},
-  year          = 2005,
-  institution   = {European Union: Marine Environment and Security for the
-                  European Area (MERSEA) Integrated Project},
-  note          = {MERSEA-WP09-MERCA-TASK-9.1.1}
-}
-
-@Article{         chassignet_smith_ea_03,
-  author        = {Chassignet, Eric P. and Smith, Linda T. and Halliwell,
-                  George R. and Bleck, Rainer},
-  title         = {North Atlantic Simulations with the Hybrid Coordinate
-                  Ocean Model (HYCOM): Impact of the Vertical Coordinate
-                  Choice, Reference Pressure, and Thermobaricity},
-  year          = 2003,
-  volume        = 33,
-  number        = 12,
-  month         = {Dec},
-  pages         = {2504–2526},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(2003)033<2504:naswth>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(2003)033<2504:naswth>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         covey_abe-ouchi_ea_00,
-  author        = {Covey, C. and Abe-Ouchi, A. and Boer, G. J. and Boville,
-                  B. A. and Cubasch, U. and Fairhead, L. and Flato, G. M. and
-                  Gordon, H. and Guilyardi, E. and Jiang, X. and et al.},
-  title         = {The seasonal cycle in coupled ocean-atmosphere general
-                  circulation models},
-  year          = 2000,
-  volume        = 16,
-  number        = {10-11},
-  month         = {Oct},
-  pages         = {775–787},
-  issn          = {1432-0894},
-  doi           = {10.1007/s003820000081},
-  url           = {http://dx.doi.org/10.1007/s003820000081},
-  journal       = {Climate Dynamics},
-  publisher     = {Springer Nature}
-}
-
-@Article{         cox_87,
-  author        = {Cox, M. D.},
-  year          = {1987},
-  month         = {01},
-  title         = {Isopycnal diffusion in a z-coordinate ocean model},
-  volume        = {74},
-  pages         = {1--9},
-  journal       = {Ocean Modelling},
-  url           = {https://www.researchgate.net/publication/243768762_Isopycnal_diffusion_in_a_z-coordinate_ocean_model}
-}
-
-@Article{         craig_banner_94,
-  author        = {Craig, Peter D. and Banner, Michael L.},
-  title         = {Modeling Wave-Enhanced Turbulence in the Ocean Surface
-                  Layer},
-  year          = 1994,
-  volume        = 24,
-  number        = 12,
-  month         = {Dec},
-  pages         = {2546–2559},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1994)024<2546:mwetit>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1994)024<2546:mwetit>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         craik_leibovich_76,
-  author        = {Craik, A. D. D. and Leibovich, S.},
-  title         = {A rational model for Langmuir circulations},
-  year          = 1976,
-  volume        = 73,
-  number        = 3,
-  month         = {Feb},
-  pages         = {401–426},
-  issn          = {1469-7645},
-  doi           = {10.1017/s0022112076001420},
-  url           = {http://dx.doi.org/10.1017/s0022112076001420},
-  journal       = {Journal of Fluid Mechanics},
-  publisher     = {Cambridge University Press (CUP)}
-}
-
-@Article{         cravatte_madec_ea_07,
-  author        = {Cravatte, Sophie and Madec, Gurvan and Izumo, Takeshi and
-                  Menkes, Christophe and Bozec, Alexandra},
-  title         = {Progress in the 3-D circulation of the eastern equatorial
-                  Pacific in a climate ocean model},
-  year          = 2007,
-  volume        = 17,
-  number        = 1,
-  month         = {Jan},
-  pages         = {28–48},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2006.11.003},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2006.11.003},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         dalessio_abdella_ea_98,
-  author        = {D’Alessio, S. J. D. and Abdella, K. and McFarlane, N.
-                  A.},
-  title         = {A New Second-Order Turbulence Closure Scheme for Modeling
-                  the Oceanic Mixed Layer},
-  year          = 1998,
-  volume        = 28,
-  number        = 8,
-  month         = {Aug},
-  pages         = {1624–1641},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1998)028<1624:ansotc>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1998)028<1624:ansotc>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Book{            navdas_book,
-  author        = {Daley, Roger and Barker, Edward},
-  title         = {NAVDAS Source Book 2000: NRL Atmospheric Variational Data
-                  Assimilation System},
-  year          = 2000,
-  month         = {Jan},
-  doi           = {10.21236/ada383797},
-  url           = {http://dx.doi.org/10.21236/ada383797},
-  publisher     = {Defense Technical Information Center}
-}
-
-@Article{         danabasoglu_ferrari_ea_08,
-  author        = {Danabasoglu, Gokhan and Ferrari, Raffaele and McWilliams,
-                  James C.},
-  title         = {Sensitivity of an Ocean General Circulation Model to a
-                  Parameterization of Near-Surface Eddy Fluxes},
-  year          = 2008,
-  volume        = 21,
-  number        = 6,
-  month         = {Mar},
-  pages         = {1192–1208},
-  issn          = {1520-0442},
-  doi           = {10.1175/2007jcli1508.1},
-  url           = {http://dx.doi.org/10.1175/2007JCLI1508.1},
-  journal       = {Journal of Climate},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         dandonneau_04,
-  author        = {Dandonneau, Yves and Menkes, Christophe and Gorgues, Thomas and Madec, Gurvan},
-  title         = {Response to Comment on "Oceanic Rossby Waves Acting As a {\textquoteleft}Hay Rake{\textquoteright} for Ecosystem Floating By-Products"},
-  year          = 2004,
-  volume        = 304,
-  number        = 5669,
-  month         = {Apr},
-  pages         = {390c–390c},
-  issn          = {1095-9203},
-  doi           = {10.1126/science.1095997},
-  url           = {http://dx.doi.org/10.1126/science.1095997},
-  journal       = {Science},
-  publisher     = {American Association for the Advancement of Science
-                  (AAAS)}
-}
-
-@Article{         davies_76,
-  author        = {Davies, H. C.},
-  title         = {A lateral boundary formulation for multi-level prediction
-                  models},
-  year          = 1976,
-  volume        = 102,
-  number        = 432,
-  month         = {Apr},
-  pages         = {405–418},
-  issn          = {0035-9009},
-  doi           = {10.1002/qj.49710243210},
-  url           = {http://dx.doi.org/10.1002/qj.49710243210},
-  journal       = {Quarterly Journal of the Royal Meteorological Society},
-  publisher     = {Wiley}
-}
-
-@Article{         debreu_vouland_ea_08,
-  author        = {Debreu, Laurent and Vouland, Christophe and Blayo, Eric},
-  title         = {AGRIF: Adaptive grid refinement in Fortran},
-  year          = 2008,
-  volume        = 34,
-  number        = 1,
-  month         = {Jan},
-  pages         = {8–13},
-  issn          = {0098-3004},
-  doi           = {10.1016/j.cageo.2007.01.009},
-  url           = {http://dx.doi.org/10.1016/j.cageo.2007.01.009},
-  journal       = {Computers \& Geosciences},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         delecluse_madec_00,
-  author        = {P. Delecluse and G. Madec},
-  title         = {Ocean modelling and the role of the ocean in the climate
-                  system},
-  journal       = {In \textit{Modeling the Earth's Climate and its
-                  Variability}, Les Houches, Session, LXVII 1997, Eds. W. R.
-                  Holland, S. Joussaume and F. David, Elsevier Science},
-  year          = 2000,
-  pages         = {237--313}
-}
-
-@PhDThesis{       demange_14,
-  title         = {{Advection and gravity waves propagation numerical schemes
-                  for oceanic circulation models}},
-  author        = {Demange, J\'{e}r'{e}mie},
-  url           = {https://tel.archives-ouvertes.fr/tel-01104703},
-  number        = {2014GRENM096},
-  pages         = {138pp},
-  school        = {Doctorat es Applied Mathematiques, Grenoble University,
-                  France},
-  year          = {2014},
-  month         = oct,
-  type          = {Theses},
-  pdf           = {https://tel.archives-ouvertes.fr/tel-01104703/file/DEMANGE_2014_archivage.pdf},
-  hal_id        = {tel-01104703},
-  hal_version   = {v2}
-}
-
-@Article{         dobricic_pinardi_ea_07,
-  author        = {Dobricic, S. and Pinardi, N. and Adani, M. and Tonani, M.
-                  and Fratianni, C. and Bonazzi, A. and Fernandez, V.},
-  title         = {Daily oceanographic analyses by Mediterranean Forecasting
-                  System at the basin scale},
-  year          = 2007,
-  volume        = 3,
-  number        = 1,
-  month         = {Mar},
-  pages         = {149–157},
-  issn          = {1812-0792},
-  doi           = {10.5194/os-3-149-2007},
-  url           = {http://dx.doi.org/10.5194/os-3-149-2007},
-  journal       = {Ocean Science},
-  publisher     = {Copernicus GmbH}
-}
-
-@Article{         doney_lindsay_ea_04,
-  author        = {Doney, S. C. and Lindsay, K. and Caldeira, K. and Campin,
-                  J.-M. and Drange, H. and Dutay, J.-C. and Follows, M. and
-                  Gao, Y. and Gnanadesikan, A. and Gruber, N. and et al.},
-  title         = {Evaluating global ocean carbon models: The importance of
-                  realistic physics},
-  year          = 2004,
-  volume        = 18,
-  number        = 3,
-  month         = {Sep},
-  pages         = {GB3017},
-  issn          = {0886-6236},
-  doi           = {10.1029/2003gb002150},
-  url           = {http://dx.doi.org/10.1029/2003GB002150},
-  journal       = {Global Biogeochemical Cycles},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         dortenzio_iudicone_ea_05,
-  author        = {D\’Ortenzio, Fabrizio and Iudicone, Daniele and De Boyer
-                  Mont\'{e}gut, Cl\'{e}ment and Testor, Pierre and Antoine, David and
-                  Marullo, Salvatore and Santoleri, Rosalia and Madec,
-                  Gurvan},
-  title         = {Seasonal variability of the mixed layer depth in the
-                  Mediterranean Sea as derived from in situ profiles},
-  year          = 2005,
-  volume        = 32,
-  number        = 12,
-  month         = {Jun},
-  pages         = {L12605},
-  issn          = {0094-8276},
-  doi           = {10.1029/2005gl022463},
-  url           = {http://dx.doi.org/10.1029/2005GL022463},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         doscher_beckmann_00,
-  author        = {D\"{o}scher, R. and Beckmann, A.},
-  title         = {Effects of a Bottom Boundary Layer Parameterization in a
-                  Coarse-Resolution Model of the North Atlantic Ocean},
-  year          = 2000,
-  volume        = 17,
-  number        = 5,
-  month         = {May},
-  pages         = {698–707},
-  issn          = {1520-0426},
-  doi           = {10.1175/1520-0426(2000)017<0698:eoabbl>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0426(2000)017<0698:eoabbl>2.0.co;2},
-  journal       = {Journal of Atmospheric and Oceanic Technology},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         drijfhout_94,
-  author        = {Drijfhout, Sybren S.},
-  title         = {Heat Transport by Mesoscale Eddies in an Ocean Circulation
-                  Model},
-  year          = 1994,
-  volume        = 24,
-  number        = 2,
-  month         = {Feb},
-  pages         = {353–369},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1994)024<0353:htbmei>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1994)024<0353:htbmei>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         dukowicz_smith_94,
-  author        = {Dukowicz, John K. and Smith, Richard D.},
-  title         = {Implicit free-surface method for the Bryan-Cox-Semtner
-                  ocean model},
-  year          = 1994,
-  volume        = 99,
-  number        = {C4},
-  pages         = {7991--8014},
-  issn          = {0148-0227},
-  doi           = {10.1029/93jc03455},
-  url           = {http://dx.doi.org/10.1029/93jc03455},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         durand_shetye_ea_04,
-  author        = {F. Durand and S. R. Shetye and J. Vialard and D. Shankar
-                  and S.S.C. Shenoi and C. Eth\'{e} and G. Madec},
-  title         = {Impact of temperature inversions on SST evolution in the
-                  South-Eastern Arabian Sea during the pre-summer monsoon
-                  season},
-  year          = 2004,
-  volume        = 31,
-  number        = 1,
-  pages         = {L01305},
-  issn          = {0094-8276},
-  doi           = {10.1029/2003gl018906},
-  url           = {http://dx.doi.org/10.1029/2003GL018906},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         durand_shankar_ea_07,
-  author        = {Durand, F. and Shankar, D. and De Boyer Mont\'{e}gut, C. and
-                  Shenoi, S. S. C. and Blanke, B. and Madec, G.},
-  title         = {Modeling the Barrier-Layer Formation in the South-Eastern
-                  Arabian Sea},
-  year          = 2007,
-  volume        = 20,
-  number        = 10,
-  month         = {May},
-  pages         = {2109–2120},
-  issn          = {1520-0442},
-  doi           = {10.1175/jcli4112.1},
-  url           = {http://dx.doi.org/10.1175/jcli4112.1},
-  journal       = {Journal of Climate},
-  publisher     = {American Meteorological Society}
-}
-
-@InCollection{    durran_01,
-  author        = {Durran, Dale R.},
-  title         = {Open Boundary Conditions: Fact and Fiction},
-  booktitle     = {Advances in Mathematical Modelling of Atmosphere and Ocean
-                  Dynamics},
-  editor        = {P.F. Hodnett},
-  year          = 2001,
-  pages         = {1–18},
-  issn          = {0926-5112},
-  doi           = {10.1007/978-94-010-0792-4_1},
-  url           = {http://dx.doi.org/10.1007/978-94-010-0792-4_1},
-  isbn          = 9789401007924,
-  journal       = {Fluid Mechanics and Its Applications},
-  publisher     = {Springer Netherlands}
-}
-
-@Article{         dutay_jean-baptiste_ea_04,
-  author        = {Dutay, J.-C and Jean-Baptiste, P and Campin, J.-M and
-                  Ishida, A and Maier-Reimer, E and Matear, R.J and Mouchet,
-                  A and Totterdell, I.J and Yamanaka, Y and Rodgers, K and et
-                  al.},
-  title         = {Evaluation of OCMIP-2 ocean models deep circulation
-                  with mantle helium-3},
-  year          = 2004,
-  volume        = 48,
-  number        = {1-4},
-  month         = {Jul},
-  pages         = {15–36},
-  issn          = {0924-7963},
-  doi           = {10.1016/j.jmarsys.2003.05.010},
-  url           = {http://dx.doi.org/10.1016/j.jmarsys.2003.05.010},
-  journal       = {Journal of Marine Systems},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         dutay_bullister_ea_02,
-  author        = {Dutay, J.-C and Bullister, J.L and Doney, S.C and Orr, J.C
-                  and Najjar, R and Caldeira, K and Campin, J.-M and Drange,
-                  H and Follows, M and Gao, Y and et al.},
-  title         = {Evaluation of ocean model ventilation with CFC-11:
-                  comparison of 13 global ocean models},
-  year          = 2002,
-  volume        = 4,
-  number        = 2,
-  month         = {Jan},
-  pages         = {89–120},
-  issn          = {1463-5003},
-  doi           = {10.1016/s1463-5003(01)00013-0},
-  url           = {http://dx.doi.org/10.1016/s1463-5003(01)00013-0},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         dutay_emile-geay_ea_09,
-  author        = {Dutay, Jean-Claude and Emile-Geay, Julien and Iudicone,
-                  Daniele and Jean-Baptiste, Philippe and Madec, Gurvan and
-                  Carouge, Claire},
-  title         = {Helium isotopic constraints on simulated ocean
-                  circulations: implications for abyssal theories},
-  year          = 2009,
-  volume        = 10,
-  number        = {1-2},
-  month         = {Dec},
-  pages         = {257–273},
-  issn          = {1573-1510},
-  doi           = {10.1007/s10652-009-9159-y},
-  url           = {http://dx.doi.org/10.1007/s10652-009-9159-y},
-  journal       = {Environmental Fluid Mechanics},
-  publisher     = {Springer Nature}
-}
-
-@Article{         eby_holloway_94,
-  author        = {Eby, Michael and Holloway, Greg},
-  title         = {Sensitivity of a Large-Scale Ocean Model to a
-                  Parameterization of Topographic Stress},
-  year          = 1994,
-  volume        = 24,
-  number        = 12,
-  month         = {Dec},
-  pages         = {2577–2588},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1994)024<2577:soalso>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1994)024<2577:soalso>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         egbert_ray_00,
-  author        = {Egbert, G. D. and Ray, R. D.},
-  title         = {Significant dissipation of tidal energy in the deep ocean
-                  inferred from satellite altimeter data},
-  year          = 2000,
-  volume        = 405,
-  number        = 6788,
-  month         = {Jun},
-  pages         = {775–778},
-  issn          = {1476-4687},
-  doi           = {10.1038/35015531},
-  url           = {http://dx.doi.org/10.1038/35015531},
-  journal       = {Nature},
-  publisher     = {Springer Nature}
-}
-
-@Article{         egbert_ray_01,
-  author        = {Egbert, Gary D. and Ray, Richard D.},
-  title         = {Estimates of M2 tidal energy dissipation from
-                  TOPEX/Poseidon altimeter data},
-  year          = 2001,
-  volume        = 106,
-  number        = {C10},
-  month         = {Oct},
-  pages         = {22475–22502},
-  issn          = {0148-0227},
-  doi           = {10.1029/2000jc000699},
-  url           = {http://dx.doi.org/10.1029/2000jc000699},
-  journal       = {Journal of Geophysical Research: Oceans},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         eiseman_stone_80,
-  author        = {Eiseman, P. R. and Stone, A. P.},
-  title         = {Conservation Laws of Fluid Dynamics – A Survey},
-  year          = 1980,
-  volume        = 22,
-  number        = 1,
-  month         = {Jan},
-  pages         = {12–27},
-  issn          = {1095-7200},
-  doi           = {10.1137/1022002},
-  url           = {http://dx.doi.org/10.1137/1022002},
-  journal       = {SIAM Review},
-  publisher     = {Society for Industrial & Applied Mathematics (SIAM)}
-}
-
-@Article{         emile-geay_madec_09,
-  author        = {Emile-Geay, J. and Madec, G.},
-  title         = {Geothermal heating, diapycnal mixing and the abyssal
-                  circulation},
-  year          = 2009,
-  volume        = 5,
-  number        = 2,
-  month         = {Jun},
-  pages         = {203–217},
-  issn          = {1812-0792},
-  doi           = {10.5194/os-5-203-2009},
-  url           = {http://dx.doi.org/10.5194/os-5-203-2009},
-  journal       = {Ocean Science},
-  publisher     = {Copernicus GmbH}
-}
-
-@Article{         engedahl_95,
-  author        = {Engedahl, Harald},
-  title         = {Use of the flow relaxation scheme in a three-dimensional
-                  baroclinic ocean model with realistic topography},
-  year          = 1995,
-  volume        = 47,
-  number        = 3,
-  month         = {Jan},
-  pages         = {365–382},
-  issn          = {1600-0870},
-  doi           = {10.3402/tellusa.v47i3.11523},
-  url           = {http://dx.doi.org/10.3402/tellusa.v47i3.11523},
-  journal       = {Tellus A: Dynamic Meteorology and Oceanography},
-  publisher     = {Informa UK Limited}
-}
-
-@Article{         euromodel-group_95,
-  author        = {EUROMODEL Group (P.M. Lehucher, L. Beautier, M. Chartier,
-                  F. Martel, L. Mortier, P. Brehmer, C. Millot, C. Alberola,
-                  M. Benzhora, I. Taupier-Letage, G. Chabert d'Hieres, H.
-                  Didelle, P. Gleizon, D. Obaton, M. Cr\'{e}pon, C. Herbaut,
-                  G. Madec, S. Speich, J. Nihoul, J. M. Beckers, P. Brasseur,
-                  E. Deleersnijder, S. Djenidi, J. Font, A. Castellon, E.
-                  Garcia-Ladona, M. J. Lopez-Garcia, M. Manriquez, M. Maso,
-                  J. Salat, J. Tintore, S. Alonso, D. Gomis, A. Viudez, M.
-                  Astraldi, D. Bacciola, M. Borghini, F. Dell'amico, C.
-                  Galli, E. Lazzoni, G. P. Gasparini, S. Sparnocchia, and A.
-                  Harzallah)},
-  year          = {1995},
-  month         = {01},
-  number        = 2,
-  pages         = {255-271},
-  title         = {Progress from 1989 to 1992 in understanding the
-                  circulation of the Western Mediterranean Sea},
-  volume        = {18},
-  journal       = {Oceanologica Acta},
-  url           = {https://www.researchgate.net/publication/265905930_Progress_from_1989_to_1992_in_understanding_the_circulation_of_the_Western_Mediterranean_Sea},
-}
-
-@PhDThesis{       farge-coulombier_87,
-  url           = {http://www.theses.fr/1987PA066365},
-  title         = {Dynamique non-lineaire des ondes et des tourbillons dans
-                  les equations de Saint-Venant},
-  author        = {Farge Coulombier, Marie},
-  school        = {Doctorat es Mathematiques, Paris VI University, France},
-  year          = {1987},
-  pages         = {353 P.},
-  note          = {1987PA066365}
-}
-
-@Article{         farrow_stevens_95,
-  author        = {Farrow, Duncan E. and Stevens, David P.},
-  title         = {A New Tracer Advection Scheme for Bryan and Cox Type Ocean
-                  General Circulation Models},
-  year          = 1995,
-  volume        = 25,
-  number        = 7,
-  month         = {Jul},
-  pages         = {1731–1741},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1995)025<1731:antasf>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1995)025<1731:antasf>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         flather_76,
-  author        = {R.A. Flather},
-  year          = 1976,
-  title         = {A tidal model of the north-west European continental
-                  shelf},
-  journal       = {Memoires de la Societ\'{e} Royale des Sciences de
-                  Li\`{e}ge},
-  volume        = 6,
-  pages         = {141--164}
-}
-
-@Article{         flather_94,
-  author        = {Flather, Roger A.},
-  title         = {A Storm Surge Prediction Model for the Northern Bay of
-                  Bengal with Application to the Cyclone Disaster in April
-                  1991},
-  year          = 1994,
-  volume        = 24,
-  number        = 1,
-  month         = {Jan},
-  pages         = {172–190},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1994)024<0172:asspmf>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1994)024<0172:asspmf>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         fujio_imasato_91,
-  author        = {Fujio, Shinzou and Imasato, Norihisa},
-  title         = {Diagnostic calculation for circulation and water mass
-                  movement in the deep Pacific},
-  year          = 1991,
-  volume        = 96,
-  number        = {C1},
-  month         = {Jan},
-  pages         = {759–774},
-  issn          = {0148-0227},
-  doi           = {10.1029/90jc02130},
-  url           = {http://dx.doi.org/10.1029/90jc02130},
-  journal       = {Journal of Geophysical Research: Oceans},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         galperin_kantha_ea_88,
-  author        = {Galperin, B. and Kantha, L. H. and Hassid, S. and Rosati,
-                  A.},
-  title         = {A Quasi-equilibrium Turbulent Energy Model for Geophysical
-                  Flows},
-  year          = 1988,
-  volume        = 45,
-  number        = 1,
-  month         = {Jan},
-  pages         = {55–62},
-  issn          = {1520-0469},
-  doi           = {10.1175/1520-0469(1988)045<0055:aqetem>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0469(1988)045<0055:aqetem>2.0.co;2},
-  journal       = {Journal of the Atmospheric Sciences},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         gargett_84,
-  author        = {Gargett, A. E.},
-  title         = {Vertical eddy diffusivity in the ocean interior},
-  year          = 1984,
-  volume        = 42,
-  number        = 2,
-  month         = {May},
-  pages         = {359–393},
-  issn          = {1543-9542},
-  doi           = {10.1357/002224084788502756},
-  url           = {http://dx.doi.org/10.1357/002224084788502756},
-  journal       = {Journal of Marine Research},
-  publisher     = {Journal of Marine Research/Yale}
-}
-
-@Article{         gaspar_gregoris_ea_90,
-  author        = {Gaspar, Philippe and Gr\'{e}goris, Yves and Lefevre,
-                  Jean-Michel},
-  title         = {A simple eddy kinetic energy model for simulations of the
-                  oceanic vertical mixing: Tests at station Papa and
-                  long-term upper ocean study site},
-  year          = 1990,
-  volume        = 95,
-  number        = {C9},
-  pages         = 16179,
-  issn          = {0148-0227},
-  doi           = {10.1029/jc095ic09p16179},
-  url           = {http://dx.doi.org/10.1029/jc095ic09p16179},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         gent_mcwilliams_90,
-  author        = {Gent, Peter R. and Mcwilliams, James C.},
-  title         = {Isopycnal Mixing in Ocean Circulation Models},
-  year          = 1990,
-  volume        = 20,
-  number        = 1,
-  month         = {Jan},
-  pages         = {150–155},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1990)020<0150:imiocm>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1990)020<0150:imiocm>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         gentemann_minnett_ea_09,
-  author        = {Gentemann, Chelle L. and Minnett, Peter J. and Ward,
-                  Brian},
-  title         = {Profiles of Ocean Surface Heating (POSH): A new model of
-                  upper ocean diurnal warming},
-  year          = 2009,
-  volume        = 114,
-  number        = {C7},
-  month         = {Jul},
-  pages         = {C07017},
-  issn          = {0148-0227},
-  doi           = {10.1029/2008jc004825},
-  url           = {http://dx.doi.org/10.1029/2008JC004825},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         gerdes_93,
-  author        = {Gerdes, Rüdiger},
-  title         = {A primitive equation ocean circulation model using a
-                  general vertical coordinate transformation: 1. Description
-                  and testing of the model},
-  year          = 1993,
-  volume        = 98,
-  number        = {C8},
-  pages         = 14683,
-  issn          = {0148-0227},
-  doi           = {10.1029/93jc00760},
-  url           = {http://dx.doi.org/10.1029/93jc00760},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         gerdes_93*1,
-  author        = {Gerdes, Rüdiger},
-  title         = {A primitive equation ocean circulation model using a
-                  general vertical coordinate transformation: 2. Application
-                  to an overflow problem},
-  year          = 1993,
-  volume        = 98,
-  number        = {C8},
-  pages         = {14703--14726},
-  issn          = {0148-0227},
-  doi           = {10.1029/93jc00788},
-  url           = {http://dx.doi.org/10.1029/93jc00788},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         gerdes_köberle_ea_91,
-  author        = {Gerdes, R\"{u}diger and K\"{o}berle, Cornelia and
-                  Willebrand, J\"{u}rgen},
-  title         = {The influence of numerical advection schemes on the
-                  results of ocean general circulation models},
-  year          = 1991,
-  volume        = 5,
-  number        = 4,
-  month         = {Jun},
-  pages         = {211–226},
-  issn          = {1432-0894},
-  doi           = {10.1007/bf00210006},
-  url           = {http://dx.doi.org/10.1007/BF00210006},
-  journal       = {Climate Dynamics},
-  publisher     = {Springer Nature}
-}
-
-@TechReport{      gibson_86,
-  author        = {Gibson, J.},
-  title         = {Standards for software development and maintenance},
-  year          = 1986,
-  doi           = {10.21957/gi113q4gn},
-  url           = {https://www.ecmwf.int/node/9565},
-  institution   = {Operational Dep., ECMWF, Reading, UK.},
-}
-
-@Book{            gill_82,
-  title         = {Atmosphere-Ocean Dynamics},
-  author        = {Gill, A.E.},
-  issn	        = {0074-6142},
-  isbn	        = 9780122835223,
-  series        = {International Geophysics},
-  doi	        = {10.1016/s0074-6142(08)x6002-4},
-  url	        = {http://dx.doi.org/10.1016/s0074-6142(08)x6002-4},
-  year          = {1982},
-  publisher     = {Elsevier}
-}
-
-@Article{         goff_10,
-  author        = {Goff, John A.},
-  title         = {Global prediction of abyssal hill root-mean-square heights
-                  from small-scale altimetric gravity variability},
-  year          = 2010,
-  volume        = 115,
-  number        = {B12},
-  month         = {Dec},
-  pages         = {B12104},
-  issn          = {0148-0227},
-  doi           = {10.1029/2010jb007867},
-  url           = {http://dx.doi.org/10.1029/2010JB007867},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         goosse_deleersnijder_ea_99,
-  author        = {Goosse, H. and Deleersnijder, E. and Fichefet, T. and
-                  England, M. H.},
-  title         = {Sensitivity of a global coupled ocean-sea ice model to the
-                  parameterization of vertical mixing},
-  year          = 1999,
-  volume        = 104,
-  number        = {C6},
-  month         = {Jun},
-  pages         = {13681–13695},
-  issn          = {0148-0227},
-  doi           = {10.1029/1999jc900099},
-  url           = {http://dx.doi.org/10.1029/1999jc900099},
-  journal       = {Journal of Geophysical Research: Oceans},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         gorgues_menkes_ea_07,
-  author        = {Gorgues, T. and Menkes, C. and Aumont, O. and Dandonneau,
-                  Y. and Madec, G. and Rodgers, K.},
-  title         = {Indonesian throughflow control of the eastern equatorial
-                  Pacific biogeochemistry},
-  year          = 2007,
-  volume        = 34,
-  number        = 5,
-  pages         = {L05609},
-  month         = {Mar},
-  issn          = {0094-8276},
-  doi           = {10.1029/2006gl028210},
-  url           = {http://dx.doi.org/10.1029/2006GL028210},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         graham_mcdougall_13,
-  author        = {Graham, Felicity S. and McDougall, Trevor J.},
-  title         = {Quantifying the Nonconservative Production of Conservative
-                  Temperature, Potential Temperature, and Entropy},
-  year          = 2013,
-  volume        = 43,
-  number        = 5,
-  month         = {May},
-  pages         = {838–862},
-  issn          = {1520-0485},
-  doi           = {10.1175/jpo-d-11-0188.1},
-  url           = {http://dx.doi.org/10.1175/JPO-D-11-0188.1},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         greatbatch_94,
-  author        = {Greatbatch, Richard J.},
-  title         = {A note on the representation of steric sea level in models
-                  that conserve volume rather than mass},
-  year          = 1994,
-  volume        = 99,
-  number        = {C6},
-  pages         = {12,767--12,771}
-  issn          = {0148-0227},
-  doi           = {10.1029/94jc00847},
-  url           = {http://dx.doi.org/10.1029/94jc00847},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Book{            griffies_05,
-  author        = {Griffies, Stephen},
-  title         = {Fundamentals of Ocean Climate Models},
-  year          = 2005,
-  month         = {Dec},
-  pages         = {434pp},
-  doi           = {10.1515/9780691187129},
-  url           = {http://dx.doi.org/10.1515/9780691187129},
-  isbn          = 9780691187129,
-  publisher     = {Princeton University Press}
-}
-
-@Article{         griffies_98,
-  author        = {Griffies, Stephen M.},
-  title         = {The Gent–McWilliams Skew Flux},
-  year          = 1998,
-  volume        = 28,
-  number        = 5,
-  month         = {May},
-  pages         = {831–841},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1998)028<0831:tgmsf>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1998)028<0831:tgmsf>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         griffies_biastoch_ea_09,
-  author        = {S.M. Griffies and A. Biastoch and C. Boning and F. Bryan
-                  and G. Danabasoglu and E. P. Chassignet and M. H. England
-                  and R. Gerdes and H. Haak and R. W. Hallberg and W.
-                  Hazeleger and J. Jungclaus and W. G. Large and G. Madec and
-                  A. Pirani and B. L. Samuels and M. Scheinert and A. Sen
-                  Gupta and C. A. Severijns and H. L. Simmons and A.-M.
-                  Treguier and M. Winton and S. Yeager and J. Yin},
-  title         = {Coordinated Ocean-ice Reference Experiments (COREs)},
-  year          = 2009,
-  volume        = 26,
-  number        = {1-2},
-  month         = {Jan},
-  pages         = {1–46},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2008.08.007},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2008.08.007},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         griffies_gnanadesikan_ea_05,
-  author        = {Griffies, S. M. and Gnanadesikan, A. and Dixon, K. W. and
-                  Dunne, J. P. and Gerdes, R. and Harrison, M. J. and Rosati,
-                  A. and Russell, J. L. and Samuels, B. L. and Spelman, M. J.
-                  and et al.},
-  title         = {Formulation of an ocean model for global climate
-                  simulations},
-  year          = 2005,
-  volume        = 1,
-  number        = 1,
-  month         = {Sep},
-  pages         = {45–79},
-  issn          = {1812-0792},
-  doi           = {10.5194/os-1-45-2005},
-  url           = {http://dx.doi.org/10.5194/os-1-45-2005},
-  journal       = {Ocean Science},
-  publisher     = {Copernicus GmbH}
-}
-
-@Article{         griffies_gnanadesikan_ea_98,
-  author        = {Griffies, Stephen M. and Gnanadesikan, Anand and
-                  Pacanowski, Ronald C. and Larichev, Vitaly D. and Dukowicz,
-                  John K. and Smith, Richard D.},
-  title         = {Isoneutral Diffusion in az-Coordinate Ocean Model},
-  year          = 1998,
-  volume        = 28,
-  number        = 5,
-  month         = {May},
-  pages         = {805–830},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1998)028<0805:idiazc>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1998)028<0805:idiazc>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         griffies_hallberg_00,
-  author        = {Griffies, Stephen M. and Hallberg, Robert W.},
-  title         = {Biharmonic Friction with a Smagorinsky-Like Viscosity for
-                  Use in Large-Scale Eddy-Permitting Ocean Models},
-  year          = 2000,
-  volume        = 128,
-  number        = 8,
-  month         = {Aug},
-  pages         = {2935–2946},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(2000)128<2935:bfwasl>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(2000)128<2935:bfwasl>2.0.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         griffies_pacanowski_ea_01,
-  author        = {Griffies, Stephen M. and Pacanowski, Ronald C. and
-                  Schmidt, Martin and Balaji, V.},
-  title         = {Tracer Conservation with an Explicit Free Surface Method
-                  for z-Coordinate Ocean Models},
-  year          = 2001,
-  volume        = 129,
-  number        = 5,
-  month         = {May},
-  pages         = {1081–1098},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(2001)129<1081:tcwaef>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(2001)129<1081:tcwaef>2.0.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         guilyardi_gualdi_ea_04,
-  author        = {Guilyardi, E. and Gualdi, S. and Slingo, J. and Navarra,
-                  A. and Delecluse, P. and Cole, J. and Madec, G. and
-                  Roberts, M. and Latif, M. and Terray, L.},
-  title         = {Representing El Ni\~{n}o in Coupled Ocean–Atmosphere GCMs:
-                  The Dominant Role of the Atmospheric Component},
-  year          = 2004,
-  volume        = 17,
-  number        = 24,
-  month         = {Dec},
-  pages         = {4623–4629},
-  issn          = {1520-0442},
-  doi           = {10.1175/jcli-3260.1},
-  url           = {http://dx.doi.org/10.1175/jcli-3260.1},
-  journal       = {Journal of Climate},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         guilyardi_madec_97,
-  author        = {Guilyardi, E. and Madec, G.},
-  title         = {Performance of the OPA-ARPEGE-T21 global ocean-atmosphere
-                  coupled model},
-  year          = 1997,
-  volume        = 13,
-  number        = 2,
-  month         = {Feb},
-  pages         = {149–165},
-  issn          = {1432-0894},
-  doi           = {10.1007/s003820050157},
-  url           = {http://dx.doi.org/10.1007/s003820050157},
-  journal       = {Climate Dynamics},
-  publisher     = {Springer Nature}
-}
-
-@Article{         guilyardi_madec_ea_01,
-  author        = {Guilyardi, E. and Madec, G. and Terray, L.},
-  title         = {The role of lateral ocean physics in the upper ocean
-                  thermal balance of a coupled ocean-atmosphere GCM},
-  year          = 2001,
-  volume        = 17,
-  number        = 8,
-  month         = {May},
-  pages         = {589–599},
-  issn          = {0930-7575},
-  doi           = {10.1007/pl00007930},
-  url           = {http://dx.doi.org/10.1007/pl00007930},
-  journal       = {Climate Dynamics},
-  publisher     = {Springer Science and Business Media LLC}
-}
-
-@Article{         guilyardi_madec_ea_95,
-  author        = {Guilyardi, Eric and Madec, Gurvan and Terray, Laurent and
-                  D\'{e}qu\'{e}, M and Pontaud, M and Imbard, Maurice and B.
-                  Stephenson, D and Filiberti, Marie-Ang\`{e}le and Cariolle, D
-                  and Del\'{e}cluse, Pascale and Thual, Olivier},
-  year          = {1995},
-  month         = {01},
-  title         = {Simulation couplée océan-atmosphère de la variabilité
-                  du climat},
-  url           = {https://gallica.bnf.fr/ark:/12148/bpt6k65676840/f31.item}
-  journal       = {C. R. Acad. Sci Paris},
-  volume        = 320,
-  number        = {s\'{e}rie IIa},
-  pages         = {683--690}
-}
-
-@Article{         guyon_madec_ea_99,
-  author        = {Guyon, Marc and Madec, Gurvan and Imbard, Maurice and
-                  Roux, François-Xavier},
-  title         = {A Parallel Ocean Model for High Resolution Studies},
-  year          = 1999,
-  volume        = {Euro-Par'99},
-  pages         = {603–607},
-  issn          = {0302-9743},
-  doi           = {10.1007/3-540-48311-x_85},
-  url           = {http://dx.doi.org/10.1007/3-540-48311-x_85},
-  isbn          = 9783540483113,
-  journal       = {Lecture Notes in Computer Science},
-  publisher     = {Springer Berlin Heidelberg}
-}
-
-@Article{         guyon_madec_ea_99*1,
-  title         = {{Parallelization of the OPA ocean model}},
-  author        = {Guyon, M. and Madec, Gurvan and Roux, F.-X. and Imbard,
-                  Maurice and Herbaut, Christophe and Fronier, P.},
-  url           = {https://hal.archives-ouvertes.fr/hal-00154209},
-  journal       = {{Calculateurs Paralleles Reseaux et Systemes Repartis}},
-  publisher     = {{La Boucle informatique}},
-  volume        = {11},
-  number        = {4},
-  pages         = {499-517},
-  year          = {1999},
-  hal_id        = {hal-00154209},
-  hal_version   = {v1}
-}
-
-@Book{            haltiner_williams_80,
-  title         = {Numerical prediction and dynamic meteorology (2nd Edition)},
-  author        = {Haltiner, G.J. and Williams, R.T.},
-  year          = 1980,
-  pages         = {477pp}
-  isbn          = {9780471059714},
-  lccn          = {lc79025544},
-  url           = {https://books.google.fr/books?id=YS9RAAAAMAAJ},
-  publisher     = {Wiley}
-}
-
-@Article{         haney_91,
-  author        = {Haney, Robert L.},
-  title         = {On the Pressure Gradient Force over Steep Topography in
-                  Sigma Coordinate Ocean Models},
-  year          = 1991,
-  volume        = 21,
-  number        = 4,
-  month         = {Apr},
-  pages         = {610–619},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1991)021<0610:otpgfo>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1991)021<0610:otpgfo>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         hazeleger_drijfhout_00,
-  author        = {Hazeleger, W. and Drijfhout, S. S.},
-  title         = {A model study on internally generated variability in
-                  subtropical mode water formation},
-  year          = 2000,
-  volume        = 105,
-  number        = {C6},
-  month         = {Jun},
-  pages         = {13965–13979},
-  issn          = {0148-0227},
-  doi           = {10.1029/2000jc900041},
-  url           = {http://dx.doi.org/10.1029/2000jc900041},
-  journal       = {Journal of Geophysical Research: Oceans},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         hazeleger_drijfhout_00*1,
-  author        = {Hazeleger, W. and Drijfhout, S. S.},
-  title         = {Eddy Subduction in a Model of the Subtropical Gyre},
-  year          = 2000,
-  volume        = 30,
-  number        = 4,
-  month         = {Apr},
-  pages         = {677–695},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(2000)030<0677:esiamo>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(2000)030<0677:esiamo>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         hazeleger_drijfhout_98,
-  author        = {Hazeleger, W. and Drijfhout, S. S.},
-  title         = {Mode Water Variability in a Model of the Subtropical Gyre:
-                  Response to Anomalous Forcing},
-  year          = 1998,
-  volume        = 28,
-  number        = 2,
-  month         = {Feb},
-  pages         = {266–288},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1998)028<0266:mwviam>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1998)028<0266:mwviam>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         hazeleger_drijfhout_99,
-  author        = {Hazeleger, W. and Drijfhout, S. S.},
-  title         = {Stochastically Forced Mode Water Variability},
-  year          = 1999,
-  volume        = 29,
-  number        = 8,
-  month         = {Aug},
-  pages         = {1772–1786},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1999)029<1772:sfmwv>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1999)029<1772:sfmwv>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         he_ding_01,
-  author        = {He, Yun and Ding, Chris H. Q.},
-  title         = {Using Accurate Arithmetics to Improve Numerical
-                  Reproducibility and Stability in Parallel Applications},
-  year          = 2001,
-  volume        = 18,
-  number        = 3,
-  pages         = {259–277},
-  issn          = {0920-8542},
-  doi           = {10.1023/a:1008153532043},
-  url           = {http://dx.doi.org/10.1023/A:1008153532043},
-  journal       = {The Journal of Supercomputing},
-  publisher     = {Springer Nature}
-}
-
-@Article{         hellerman_rosenstein_83,
-  author        = {Hellerman, Sol and Rosenstein, Mel},
-  title         = {Normal Monthly Wind Stress Over the World Ocean with Error
-                  Estimates},
-  year          = 1983,
-  volume        = 13,
-  number        = 7,
-  month         = {Jul},
-  pages         = {1093–1104},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1983)013<1093:nmwsot>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1983)013<1093:nmwsot>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         hirt_amsden_ea_74,
-  author        = {Hirt, C.W and Amsden, A.A and Cook, J.L},
-  title         = {An arbitrary Lagrangian-Eulerian computing method for all
-                  flow speeds},
-  year          = 1974,
-  volume        = 14,
-  number        = 3,
-  month         = {Mar},
-  pages         = {227–253},
-  issn          = {0021-9991},
-  doi           = {10.1016/0021-9991(74)90051-5},
-  url           = {http://dx.doi.org/10.1016/0021-9991(74)90051-5},
-  journal       = {Journal of Computational Physics},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         hofmeister_burchard_ea_10,
-  author        = {Hofmeister, Richard and Burchard, Hans and Beckers,
-                  Jean-Marie},
-  title         = {Non-uniform adaptive vertical grids for 3D numerical ocean
-                  models},
-  year          = 2010,
-  volume        = 33,
-  number        = {1-2},
-  month         = {Jan},
-  pages         = {70–86},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2009.12.003},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2009.12.003},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         holland_jenkins_99,
-  author        = {Holland, David M. and Jenkins, Adrian},
-  title         = {Modeling Thermodynamic Ice–Ocean Interactions at the
-                  Base of an Ice Shelf},
-  year          = 1999,
-  volume        = 29,
-  number        = 8,
-  month         = {Aug},
-  pages         = {1787–1800},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1999)029<1787:mtioia>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1999)029<1787:mtioia>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         holloway_86,
-  author        = {Greg Holloway},
-  title         = {A Shelf Wave/Topographic Pump Drives Mean Coastal
-                  Circulation (part I)},
-  journal       = om,
-  year          = 1986,
-  volume        = 68
-}
-
-@Article{         holloway_92,
-  author        = {Holloway, Greg},
-  title         = {Representing Topographic Stress for Large-Scale Ocean
-                  Models},
-  year          = 1992,
-  volume        = 22,
-  number        = 9,
-  month         = {Sep},
-  pages         = {1033–1046},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1992)022<1033:rtsfls>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1992)022<1033:rtsfls>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         holloway_wang_09,
-  author        = {Holloway, Greg and Wang, Zeliang},
-  title         = {Representing eddy stress in an Arctic Ocean model},
-  year          = 2009,
-  volume        = 114,
-  number        = {C6},
-  month         = {Jun},
-  issn          = {0148-0227},
-  doi           = {10.1029/2008jc005169},
-  url           = {http://dx.doi.org/10.1029/2008JC005169},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         hordoir_polcher_ea_08,
-  author        = {Hordoir, R. and Polcher, J. and Brun-Cottan, J.-C. and
-                  Madec, G.},
-  title         = {Towards a parametrization of river discharges into ocean
-                  general circulation models: a closure through energy
-                  conservation},
-  year          = 2008,
-  volume        = 31,
-  number        = {7-8},
-  month         = {May},
-  pages         = {891–908},
-  issn          = {1432-0894},
-  doi           = {10.1007/s00382-008-0416-4},
-  url           = {http://dx.doi.org/10.1007/s00382-008-0416-4},
-  journal       = {Climate Dynamics},
-  publisher     = {Springer Science and Business Media LLC}
-}
-
-@Article{         hsu_arakawa_90,
-  author        = {Hsu, Yueh-Jiuan G. and Arakawa, Akio},
-  title         = {Numerical Modeling of the Atmosphere with an Isentropic
-                  Vertical Coordinate},
-  year          = 1990,
-  volume        = 118,
-  number        = 10,
-  month         = {Oct},
-  pages         = {1933–1959},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(1990)118<1933:nmotaw>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(1990)118<1933:nmotaw>2.0.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         huang_93,
-  author        = {Huang, Rui Xin},
-  title         = {Real Freshwater Flux as a Natural Boundary Condition for
-                  the Salinity Balance and Thermohaline Circulation Forced by
-                  Evaporation and Precipitation},
-  year          = 1993,
-  volume        = 23,
-  number        = 11,
-  month         = {Nov},
-  pages         = {2428–2446},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1993)023<2428:rffaan>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1993)023<2428:rffaan>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@TechReport{      hunter_06,
-  author        = {R Hunter, J},
-  month         = {05},
-  title         = {Specification for Test Models of Ice Shelf Cavities},
-  url           = {http://staff.acecrc.org.au/~bkgalton/ISOMIP/test_cavities.pdf}
-  institution   = {Antarctic Climate \& Ecosystems Cooperative Research
-                  Centre Private Bag 80, Hobart, Tasmania 7001},
-  year          = 2006
-}
-
-@Book{            richtmyer_morton_67,
-  title         = {Difference methods for initial-value problems, Second Edition},
-  author        = {Richtmyer, R.D. and Morton, K.W.},
-  lccn          = {lc67013959},
-  series        = {Interscience tracts in pure and applied mathematics},
-  url           = {https://books.google.fr/books?id=WN5QAAAAMAAJ},
-  year          = {1967},
-  publisher     = {Interscience Publishers},
-  pages         = {405pp}
-}
-
-@Book{            teos_10,
-  title         = {{The international thermodynamic equation of seawater -
-                  2010: Calculation and use of thermodynamic properties}},
-  publisher     = {UNESCO},
-  year          = {2010},
-  pages         = {196pp},
-  author        = {{IOC, SCOR and IAPSO}},
-  series        = {Intergovernmental Oceanographic Commission, Manuals and
-                  Guides No. 56},
-  url           = {http://www.teos-10.org/pubs/TEOS-10_Manual.pdf}
-}
-
-@Article{         iudicone_madec_ea_08,
-  author        = {Iudicone, Daniele and Madec, Gurvan and McDougall, Trevor
-                  J.},
-  title         = {Water-Mass Transformations in a Neutral Density Framework
-                  and the Key Role of Light Penetration},
-  year          = 2008,
-  volume        = 38,
-  number        = 7,
-  month         = {Jul},
-  pages         = {1357–1376},
-  issn          = {1520-0485},
-  doi           = {10.1175/2007jpo3464.1},
-  url           = {http://dx.doi.org/10.1175/2007jpo3464.1},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         iudicone_madec_ea_08*1,
-  author        = {Iudicone, Daniele and Madec, Gurvan and Blanke, Bruno and
-                  Speich, Sabrina},
-  title         = {The Role of Southern Ocean Surface Forcings and Mixing in
-                  the Global Conveyor},
-  year          = 2008,
-  volume        = 38,
-  number        = 7,
-  month         = {Jul},
-  pages         = {1377–1400},
-  issn          = {1520-0485},
-  doi           = {10.1175/2008jpo3519.1},
-  url           = {http://dx.doi.org/10.1175/2008jpo3519.1},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         iudicone_rodgers_ea_07,
-  author        = {Iudicone, Daniele and Rodgers, Keith B. and Schopp,
-                  Richard and Madec, Gurvan},
-  title         = {An Exchange Window for the Injection of Antarctic
-                  Intermediate Water into the South Pacific},
-  year          = 2007,
-  volume        = 37,
-  number        = 1,
-  month         = {Jan},
-  pages         = {31–49},
-  issn          = {1520-0485},
-  doi           = {10.1175/jpo2985.1},
-  url           = {http://dx.doi.org/10.1175/jpo2985.1},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         iudicone_speich_ea_08,
-  author        = {Iudicone, Daniele and Speich, Sabrina and Madec, Gurvan
-                  and Blanke, Bruno},
-  title         = {The Global Conveyor Belt from a Southern Ocean
-                  Perspective},
-  year          = 2008,
-  volume        = 38,
-  number        = 7,
-  month         = {Jul},
-  pages         = {1401–1425},
-  issn          = {1520-0485},
-  doi           = {10.1175/2007jpo3525.1},
-  url           = {http://dx.doi.org/10.1175/2007jpo3525.1},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         izumo_masson_ea_09,
-  author        = {Izumo, Takeshi and Masson, Sébastien and Vialard, Jérome
-                  and de Boyer Montegut, Clément and Behera, Swadhin K. and
-                  Madec, Gurvan and Takahashi, Keiko and Yamagata, Toshio},
-  title         = {Low and high frequency Madden–Julian oscillations in
-                  austral summer: interannual variations},
-  year          = 2009,
-  volume        = 35,
-  number        = 4,
-  month         = {Sep},
-  pages         = {669–683},
-  issn          = {1432-0894},
-  doi           = {10.1007/s00382-009-0655-z},
-  url           = {http://dx.doi.org/10.1007/s00382-009-0655-z},
-  journal       = {Climate Dynamics},
-  publisher     = {Springer Nature}
-}
-
-@Article{         jackett_mcdougall_95,
-  author        = {Jackett, David R. and Mcdougall, Trevor J.},
-  title         = {Minimal Adjustment of Hydrographic Profiles to Achieve
-                  Static Stability},
-  year          = 1995,
-  volume        = 12,
-  number        = 2,
-  month         = {Apr},
-  pages         = {381–389},
-  issn          = {1520-0426},
-  doi           = {10.1175/1520-0426(1995)012<0381:maohpt>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0426(1995)012<0381:maohpt>2.0.co;2},
-  journal       = {Journal of Atmospheric and Oceanic Technology},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         jackson_rehmann_14,
-  author        = {Jackson, P. Ryan and Rehmann, Chris R.},
-  title         = {Experiments on Differential Scalar Mixing in Turbulence in
-                  a Sheared, Stratified Flow},
-  year          = 2014,
-  volume        = 44,
-  number        = 10,
-  month         = {Oct},
-  pages         = {2661–2680},
-  issn          = {1520-0485},
-  doi           = {10.1175/jpo-d-14-0027.1},
-  url           = {http://dx.doi.org/10.1175/JPO-D-14-0027.1},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@TechReport{      janssen_breivik_ea_13,
-  author        = {Janssen, Peter and Breivik, {\O}. and Mogensen, Kristian and
-                  Vitart, Fr\'{e}d\'{e}ric and Alonso-Balmaseda, Magdalena and
-                  Bidlot, Jean-Raymond and Keeley, Sarah and Leutbecher,
-                  Martin and Magnusson, L. and Molteni, Franco},
-  title         = {Air-sea interaction and surface waves},
-  year          = 2013,
-  doi           = {10.21957/0kg73joh},
-  url           = {https://www.ecmwf.int/node/10238},
-  volume        = 712,
-  institution   = {ECMWF}
-}
-
-@Article{         jayne_st-laurent_01,
-  author        = {Jayne, Steven R. and St. Laurent, Louis C.},
-  title         = {Parameterizing tidal dissipation over rough topography},
-  year          = 2001,
-  volume        = 28,
-  number        = 5,
-  month         = {Mar},
-  pages         = {811–814},
-  issn          = {0094-8276},
-  doi           = {10.1029/2000gl012044},
-  url           = {http://dx.doi.org/10.1029/2000gl012044},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         jenkins_hellmer_ea_01,
-  author        = {Jenkins, Adrian and Hellmer, Hartmut H. and Holland, David
-                  M.},
-  title         = {The Role of Meltwater Advection in the Formulation of
-                  Conservative Boundary Conditions at an Ice–Ocean
-                  Interface},
-  year          = 2001,
-  volume        = 31,
-  number        = 1,
-  month         = {Jan},
-  pages         = {285–296},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(2001)031<0285:tromai>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(2001)031<0285:tromai>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         jenkins_nicholls_ea_10,
-  author        = {Jenkins, Adrian and Nicholls, Keith W. and Corr, Hugh F.
-                  J.},
-  title         = {Observation and Parameterization of Ablation at the Base
-                  of Ronne Ice Shelf, Antarctica},
-  year          = 2010,
-  volume        = 40,
-  number        = 10,
-  month         = {Oct},
-  pages         = {2298–2312},
-  issn          = {1520-0485},
-  doi           = {10.1175/2010jpo4317.1},
-  url           = {http://dx.doi.org/10.1175/2010jpo4317.1},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         jenkins_91,
-  author        = {Jenkins, Adrian},
-  title         = {A one-dimensional model of ice shelf-ocean interaction},
-  year          = 1991,
-  volume        = 96,
-  number        = {C11},
-  pages         = 20671,
-  issn          = {0148-0227},
-  doi           = {10.1029/91jc01842},
-  url           = {http://dx.doi.org/10.1029/91jc01842},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Book{            jerlov_68,
-  title        = {Optical Oceanography},
-  author       = {N. G. Jerlov},
-  pages        = {194pp}
-  year	       = 1968,
-  issn	       = {0422-9894},
-  doi	       = {10.1016/s0422-9894(08)x7043-6},
-  url	       = {http://dx.doi.org/10.1016/s0422-9894(08)x7043-6},
-  isbn	       = 9780444403209,
-  journal      = {Elsevier Oceanography Series},
-  publisher    = {Elsevier}
-}
-
-@TechReport{      jones_98,
-  year          = 1998,
-  title         = {A User's Guide for SCRIP: A Spherical Coordinate Remapping
-                  and Interpolation Package. Version 1.4},
-  publisher     = {Los Alamos National Laboratory},
-  author        = {P. W. Jones},
-  pages         = {29pp},
-  url           = {http://dust.ess.uci.edu/ppr/ppr_Jon01.pdf}
-}
-
-@Article{         jones_99,
-  author        = {Jones, Philip W.},
-  title         = {First- and Second-Order Conservative Remapping Schemes for
-                  Grids in Spherical Coordinates},
-  year          = 1999,
-  volume        = 127,
-  number        = 9,
-  month         = {Sep},
-  pages         = {2204–2210},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(1999)127<2204:fasocr>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(1999)127<2204:fasocr>2.0.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         kantha_carniel_03,
-  author        = {Kantha, L. and Carniel, S.},
-  title         = {Comments on “A generic length-scale equation for
-                  geophysical turbulence models” by L. Umlauf and H.
-                  Burchard},
-  year          = 2003,
-  volume        = 61,
-  number        = 5,
-  month         = {Sep},
-  pages         = {693–702},
-  issn          = {1543-9542},
-  doi           = {10.1357/002224003771816007},
-  url           = {http://dx.doi.org/10.1357/002224003771816007},
-  journal       = {Journal of Marine Research},
-  publisher     = {Journal of Marine Research/Yale}
-}
-
-@Article{         kantha_clayson_94,
-  author        = {Kantha, Lakshmi H. and Clayson, Carol Anne},
-  title         = {An improved mixed layer model for geophysical
-                  applications},
-  year          = 1994,
-  volume        = 99,
-  number        = {C12},
-  pages         = {25,235--25,266}
-  issn          = {0148-0227},
-  doi           = {10.1029/94jc02257},
-  url           = {http://dx.doi.org/10.1029/94jc02257},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         kasahara_74,
-  author        = {Kasahara, Akira},
-  title         = {Various Vertical Coordinate Systems Used for Numerical
-                  Weather Prediction},
-  year          = 1974,
-  volume        = 102,
-  number        = 7,
-  month         = {Jul},
-  pages         = {509–522},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(1974)102<0509:vvcsuf>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(1974)102<0509:vvcsuf>2.0.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@InProceedings{   killworth_89,
-  title         = {On the parameterization of deep convection in ocean
-                  models},
-  author        = {Killworth, Peter D},
-  booktitle     = {Parameterizations of Small-Scale Process: Proc.‘Aha
-                  Huliko’a Hawaiian Winter Workshop},
-  pages         = {59--74},
-  year          = {1989},
-  month         = {January 17-20},
-  url           = {https://apps.dtic.mil/dtic/tr/fulltext/u2/a213212.pdf#page=65}
-  organization  = {University of Hawaii at Manoa}
-}
-
-@Article{         killworth_92,
-  author        = {Killworth, Peter D.},
-  title         = {An Equivalent-Barotropic Mode in the Fine Resolution
-                  Antarctic Model},
-  year          = 1992,
-  volume        = 22,
-  number        = 11,
-  month         = {Nov},
-  pages         = {1379–1387},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1992)022<1379:aebmit>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1992)022<1379:aebmit>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         killworth_webb_ea_91,
-  author        = {Killworth, Peter D. and Webb, David J. and Stainforth,
-                  David and Paterson, Stephen M.},
-  title         = {The Development of a Free-Surface Bryan–Cox–Semtner
-                  Ocean Model},
-  year          = 1991,
-  volume        = 21,
-  number        = 9,
-  month         = {Sep},
-  pages         = {1333–1348},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1991)021<1333:tdoafs>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1991)021<1333:tdoafs>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         koch-larrouy_lengaigne_ea_09,
-  author        = {Koch-Larrouy, Ariane and Lengaigne, Matthieu and Terray,
-                  Pascal and Madec, Gurvan and Masson, Sebastien},
-  title         = {Tidal mixing in the Indonesian Seas and its effect on the
-                  tropical climate system},
-  year          = 2009,
-  volume        = 34,
-  number        = 6,
-  month         = {Aug},
-  pages         = {891–904},
-  issn          = {1432-0894},
-  doi           = {10.1007/s00382-009-0642-4},
-  url           = {http://dx.doi.org/10.1007/s00382-009-0642-4},
-  journal       = {Climate Dynamics},
-  publisher     = {Springer Nature}
-}
-
-@Article{         koch-larrouy_madec_ea_07,
-  author        = {Koch-Larrouy, Ariane and Madec, Gurvan and
-                  Bouruet-Aubertot, Pascale and Gerkema, Theo and Bessières,
-                  Laurent and Molcard, Robert},
-  title         = {On the transformation of Pacific Water into Indonesian
-                  Throughflow Water by internal tidal mixing},
-  year          = 2007,
-  volume        = 34,
-  number        = 4,
-  month         = {Feb},
-  pages         = {L04604},
-  issn          = {0094-8276},
-  doi           = {10.1029/2006gl028405},
-  url           = {http://dx.doi.org/10.1029/2006GL028405},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         koch-larrouy_madec_ea_08,
-  author        = {Koch-Larrouy, Ariane and Madec, Gurvan and Blanke, Bruno
-                  and Molcard, Robert},
-  title         = {Water mass transformation along the Indonesian throughflow
-                  in an OGCM},
-  year          = 2008,
-  volume        = 58,
-  number        = {3-4},
-  month         = {Oct},
-  pages         = {289–309},
-  issn          = {1616-7228},
-  doi           = {10.1007/s10236-008-0155-4},
-  url           = {http://dx.doi.org/10.1007/s10236-008-0155-4},
-  journal       = {Ocean Dynamics},
-  publisher     = {Springer Nature}
-}
-
-@Article{         koch-larrouy_madec_ea_08*1,
-  author        = {Koch-Larrouy, Ariane and Madec, Gurvan and Iudicone,
-                  Daniele and Atmadipoera, Agus and Molcard, Robert},
-  title         = {Physical processes contributing to the water mass
-                  transformation of the Indonesian Throughflow},
-  year          = 2008,
-  volume        = 58,
-  number        = {3-4},
-  month         = {Oct},
-  pages         = {275–288},
-  issn          = {1616-7228},
-  doi           = {10.1007/s10236-008-0154-5},
-  url           = {http://dx.doi.org/10.1007/s10236-008-0154-5},
-  journal       = {Ocean Dynamics},
-  publisher     = {Springer Nature}
-}
-
-@Article{         kolmogorov_42,
-  author        = {A. N. Kolmogorov},
-  title         = {The equation of turbulent motion in an incompressible
-                  fluid},
-  journal       = {Izv. Akad. Nauk SSSR, Ser. Fiz.},
-  year          = 1942,
-  volume        = 6,
-  pages         = {56--58}
-}
-
-@Article{         kondo_75,
-  author        = {Kondo, Junsei},
-  title         = {Air-sea bulk transfer coefficients in diabatic
-                  conditions},
-  year          = 1975,
-  volume        = 9,
-  number        = 1,
-  month         = {Aug},
-  pages         = {91–112},
-  issn          = {1573-1472},
-  doi           = {10.1007/bf00232256},
-  url           = {http://dx.doi.org/10.1007/bf00232256},
-  journal       = {Boundary-Layer Meteorology},
-  publisher     = {Springer Nature}
-}
-
-@Article{         large_mcwilliams_ea_94,
-  author        = {Large, W. G. and McWilliams, J. C. and Doney, S. C.},
-  title         = {Oceanic vertical mixing: A review and a model with a
-                  nonlocal boundary layer parameterization},
-  year          = 1994,
-  volume        = 32,
-  number        = 4,
-  pages         = {363--404},
-  issn          = {8755-1209},
-  doi           = {10.1029/94rg01872},
-  url           = {http://dx.doi.org/10.1029/94RG01872},
-  journal       = {Reviews of Geophysics},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Book{            large_yeager_04,
-  author        = {Large, William and Yeager, Stephen},
-  title         = {Diurnal to decadal global forcing for ocean and sea-ice
-                  models: The data sets and flux climatologies},
-  year          = 2004,
-  language      = {en},
-  doi           = {10.5065/d6kk98q6},
-  url           = {http://opensky.ucar.edu/islandora/object/technotes:434},
-  keywords      = {Ocean General Circulation Model, Sea-Ice Model},
-  publisher     = {UCAR/NCAR}
-}
-
-@Article{         latif_böning_ea_06,
-  author        = {Latif, M. and Böning, C. and Willebrand, J. and Biastoch,
-                  A. and Dengg, J. and Keenlyside, N. and Schweckendiek, U.
-                  and Madec, G.},
-  title         = {Is the Thermohaline Circulation Changing?},
-  year          = 2006,
-  volume        = 19,
-  number        = 18,
-  month         = {Sep},
-  pages         = {4631–4637},
-  issn          = {1520-0442},
-  doi           = {10.1175/jcli3876.1},
-  url           = {http://dx.doi.org/10.1175/jcli3876.1},
-  journal       = {Journal of Climate},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         lavergne_madec_ea_16,
-  author        = {De Lavergne, Casimir and Madec, Gurvan and Le Sommer,
-                  Julien and Nurser, A. J. George and Naveira Garabato,
-                  Alberto C.},
-  title         = {On the Consumption of Antarctic Bottom Water in the
-                  Abyssal Ocean},
-  year          = 2016,
-  volume        = 46,
-  number        = 2,
-  month         = {Feb},
-  pages         = {635–661},
-  issn          = {1520-0485},
-  doi           = {10.1175/jpo-d-14-0201.1},
-  url           = {http://dx.doi.org/10.1175/JPO-D-14-0201.1},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         lavergne_madec_ea_16*1,
-  author        = {De Lavergne, Casimir and Madec, Gurvan and Le Sommer,
-                  Julien and Nurser, A. J. George and Naveira Garabato,
-                  Alberto C.},
-  title         = {The Impact of a Variable Mixing Efficiency on the Abyssal
-                  Overturning},
-  year          = 2016,
-  volume        = 46,
-  number        = 2,
-  month         = {Feb},
-  pages         = {663–681},
-  issn          = {1520-0485},
-  doi           = {10.1175/jpo-d-14-0259.1},
-  url           = {http://dx.doi.org/10.1175/JPO-D-14-0259.1},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@PhDThesis{       lazar_97,
-  url           = {http://www.theses.fr/1997PA066680},
-  title         = {La branche froide de la circulation thermohaline -
-                  sensibilit\'{e} \`{a} la diffusion turbulente dans un
-                  mod\`{e}le de circulation g\'{e}n\'{e}rale id\'{e}alis\'{e}e},
-  author        = {Lazar, Alban},
-  school        = {Universit\'{e} Pierre et Marie Curie, Paris, France},
-  year          = {1997},
-  pages         = {269 P.},
-  note          = {1997PA066680}
-}
-
-@Article{         lazar_madec_ea_99,
-  author        = {Lazar, Alban and Madec, Gurvan and Delecluse, Pascale},
-  title         = {The Deep Interior Downwelling, the Veronis Effect, and
-                  Mesoscale Tracer Transport Parameterizations in an OGCM},
-  year          = 1999,
-  volume        = 29,
-  number        = 11,
-  month         = {Nov},
-  pages         = {2945–2961},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1999)029<2945:tdidtv>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1999)029<2945:tdidtv>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         le-quere_orr_ea_00,
-  author        = {Le Qu\'{e}r\'{e}, Corinne and Orr, James C. and Monfray, Patrick
-                  and Aumont, Oliver and Madec, Gurvan},
-  title         = {Interannual variability of the oceanic sink of CO2 from
-                  1979 through 1997},
-  year          = 2000,
-  volume        = 14,
-  number        = 4,
-  month         = {Dec},
-  pages         = {1247–1265},
-  issn          = {0886-6236},
-  doi           = {10.1029/1999gb900049},
-  url           = {http://dx.doi.org/10.1029/1999gb900049},
-  journal       = {Global Biogeochemical Cycles},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         le-sommer_penduff_ea_09,
-  author        = {Le Sommer, Julien and Penduff, Thierry and Theetten,
-                  Sébastien and Madec, Gurvan and Barnier, Bernard},
-  title         = {How momentum advection schemes influence
-                  current-topography interactions at eddy permitting
-                  resolution},
-  year          = 2009,
-  volume        = 29,
-  number        = 1,
-  month         = {Jan},
-  pages         = {1–14},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2008.11.007},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2008.11.007},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@PhDThesis{       leclair_10,
-  url           = {http://www.theses.fr/2010PA066728},
-  title         = {introduction d'une coordonn\'{e}e verticale arbitrairement
-                  Lagrangienne Eul\'{e}rienne dans le code NEMO, 180pp.},
-  school        = {Universit\'{e} Pierre and Marie Curie},
-  author        = {Leclair, Matthieu},
-  year          = {2010},
-  pages         = {1 vol. (II-163 p.)},
-  note          = {2010PA066728}
-}
-
-@Article{         leclair_madec_09,
-  author        = {Leclair, Matthieu and Madec, Gurvan},
-  title         = {A conservative leapfrog time stepping method},
-  year          = 2009,
-  volume        = 30,
-  number        = {2-3},
-  month         = {Jan},
-  pages         = {88–94},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2009.06.006},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2009.06.006},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         leclair_madec_11,
-  author        = {Leclair, Matthieu and Madec, Gurvan},
-  title         = {$\tilde{z}$-Coordinate, an Arbitrary Lagrangian–Eulerian
-                  coordinate separating high and low frequency motions},
-  year          = 2011,
-  volume        = 37,
-  number        = {3-4},
-  pages         = {139–152},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2011.02.001},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2011.02.001},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         lele_92,
-  author        = {Lele, Sanjiva K.},
-  title         = {Compact finite difference schemes with spectral-like
-                  resolution},
-  year          = 1992,
-  volume        = 103,
-  number        = 1,
-  month         = {Nov},
-  pages         = {16–42},
-  issn          = {0021-9991},
-  doi           = {10.1016/0021-9991(92)90324-r},
-  url           = {http://dx.doi.org/10.1016/0021-9991(92)90324-r},
-  journal       = {Journal of Computational Physics},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         lemarie_debreu_ea_12,
-  author        = {Lemari\'{e}, F. and Debreu, L. and Shchepetkin, A.F. and
-                  McWilliams, J.C.},
-  title         = {On the stability and accuracy of the harmonic and
-                  biharmonic isoneutral mixing operators in ocean models},
-  year          = 2012,
-  volume        = {52-53},
-  month         = {Aug},
-  pages         = {9–35},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2012.04.007},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2012.04.007},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         lemarie_debreu_ea_15,
-  author        = {Lemari\'{e}, F. and Debreu, L. and Madec, G. and Demange, J.
-                  and Molines, J.M. and Honnorat, M.},
-  title         = {Stability constraints for oceanic numerical models:
-                  implications for the formulation of time and space
-                  discretizations},
-  year          = 2015,
-  volume        = 92,
-  month         = {Aug},
-  pages         = {124–148},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2015.06.006},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2015.06.006},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         lengaigne_madec_ea_03,
-  author        = {M. Lengaigne and G. Madec and G. Alory and C. Menkes},
-  title         = {Impact of isopycnal mixing on the tropical ocean
-                  circulation},
-  year          = 2003,
-  volume        = 108,
-  number        = {C11},
-  pages         = 3345,
-  issn          = {0148-0227},
-  doi           = {10.1029/2002jc001704},
-  url           = {http://dx.doi.org/10.1029/2002JC001704},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         lengaigne_boulanger_ea_02,
-  author        = {Lengaigne, Matthieu and Boulanger, Jean-Philippe and
-                  Menkes, Christophe and Masson, Sebastien and Madec, Gurvan
-                  and Delecluse, Pascale},
-  title         = {Ocean response to the March 1997 Westerly Wind Event},
-  year          = 2002,
-  volume        = 107,
-  number        = {C12},
-  month         = {Nov},
-  pages         = {SRF 16–1–SRF 16–20},
-  issn          = {0148-0227},
-  doi           = {10.1029/2001jc000841},
-  url           = {http://dx.doi.org/10.1029/2001JC000841},
-  journal       = {Journal of Geophysical Research: Oceans},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         lengaigne_boulanger_ea_03,
-  author        = {Lengaigne, Matthieu and Boulanger, Jean-Philippe and
-                  Menkes, Christophe and Madec, Gurvan and Delecluse, Pascale
-                  and Guilyardi, Eric and Slingo, Julia},
-  title         = {The March 1997 Westerly Wind Event and the Onset of the
-                  1997/98 El Niño: Understanding the Role of the Atmospheric
-                  Response},
-  year          = 2003,
-  volume        = 16,
-  number        = 20,
-  month         = {Oct},
-  pages         = {3330–3343},
-  issn          = {1520-0442},
-  doi           = {10.1175/1520-0442(2003)016<3330:tmwwea>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0442(2003)016<3330:tmwwea>2.0.co;2},
-  journal       = {Journal of Climate},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         lengaigne_madec_ea_09,
-  author        = {Lengaigne, Matthieu and Madec, Gurvan and Bopp, Laurent
-                  and Menkes, Christophe and Aumont, Olivier and Cadule,
-                  Patricia},
-  title         = {Bio-physical feedbacks in the Arctic Ocean using an Earth
-                  system model},
-  year          = 2009,
-  volume        = 36,
-  number        = 21,
-  month         = {Nov},
-  pages         = {L21602},
-  issn          = {0094-8276},
-  doi           = {10.1029/2009gl040145},
-  url           = {http://dx.doi.org/10.1029/2009GL040145},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         lengaigne_menkes_ea_06,
-  author        = {Lengaigne, Matthieu and Menkes, Christophe and Aumont,
-                  Olivier and Gorgues, Thomas and Bopp, Laurent and Andr\'{e},
-                  Jean-Michel and Madec, Gurvan},
-  title         = {Influence of the oceanic biology on the tropical Pacific
-                  climate in a coupled general circulation model},
-  year          = 2006,
-  volume        = 28,
-  number        = 5,
-  month         = {Nov},
-  pages         = {503–516},
-  issn          = {1432-0894},
-  doi           = {10.1007/s00382-006-0200-2},
-  url           = {http://dx.doi.org/10.1007/s00382-006-0200-2},
-  journal       = {Climate Dynamics},
-  publisher     = {Springer Nature}
-}
-
-@Article{         leonard_79,
-  author        = {Leonard, B.P.},
-  title         = {A stable and accurate convective modelling procedure based
-                  on quadratic upstream interpolation},
-  year          = 1979,
-  volume        = 19,
-  number        = 1,
-  month         = {Jun},
-  pages         = {59–98},
-  issn          = {0045-7825},
-  doi           = {10.1016/0045-7825(79)90034-3},
-  url           = {http://dx.doi.org/10.1016/0045-7825(79)90034-3},
-  journal       = {Computer Methods in Applied Mechanics and Engineering},
-  publisher     = {Elsevier BV}
-}
-
-@TechReport{      leonard_88,
-  author        = {Leonard, Brian},
-  year          = {1988},
-  month         = {10},
-  title         = {Universal limiter for transient interpolation modeling of
-                  the advective transport equations: The ULTIMATE
-                  conservative difference scheme},
-  journal       = {NASA Technical Memorandum 100916 ICOMP-88-11}
-}
-
-@Article{         leonard_91,
-  author        = {Leonard, B.P.},
-  title         = {The ULTIMATE conservative difference scheme applied to
-                  unsteady one-dimensional advection},
-  year          = 1991,
-  volume        = 88,
-  number        = 1,
-  month         = {Jun},
-  pages         = {17–74},
-  issn          = {0045-7825},
-  doi           = {10.1016/0045-7825(91)90232-u},
-  url           = {http://dx.doi.org/10.1016/0045-7825(91)90232-u},
-  journal       = {Computer Methods in Applied Mechanics and Engineering},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         lermusiaux_01,
-  author        = {Lermusiaux, P.F.J.},
-  title         = {Evolving the subspace of the three-dimensional multiscale
-                  ocean variability: Massachusetts Bay},
-  year          = 2001,
-  volume        = 29,
-  number        = {1-4},
-  month         = {May},
-  pages         = {385–422},
-  issn          = {0924-7963},
-  doi           = {10.1016/s0924-7963(01)00025-2},
-  url           = {http://dx.doi.org/10.1016/s0924-7963(01)00025-2},
-  journal       = {Journal of Marine Systems},
-  publisher     = {Elsevier BV}
-}
-
-@TechReport{      levier_treguier_ea_07,
-  author        = {B. Levier and A.-M. Tr\'{e}guier and G. Madec and V.
-                  Garnier},
-  title         = {Free surface and variable volume in the NEMO code},
-  institution   = {MERSEA MERSEA IP report WP09-CNRS-STR-03-1A, 47pp,
-                  available on the NEMO web site},
-  year          = 2007
-}
-
-@Book{            levitus_82,
-  title         = {Climatological Atlas of the world ocean},
-  publisher     = {NOAA professional paper No. 13, 174pp},
-  year          = 1982,
-  author        = {S Levitus},
-  pages         = {173 pp}
-  url           = {ftp://ftp.nodc.noaa.gov/pub/data.nodc/woa/PUBLICATIONS/levitus_atlas_1982.pdf}
-}
-
-@PhDThesis{       levy_96,
-  url           = {http://www.theses.fr/1996PA066605},
-  title         = {Mod\'{e}lisation des processus biog\'{e}ochimiques en
-                  M\'{e}diterran\'{e}e nord-occidentale. Cycle saisonnier et
-                  variabilit\'{e} m\'{e}so\'{e}chelle},
-  school        = {Universit\'{e} Pierre et Marie Curie, Paris, France},
-  author        = {L\'{e}vy, Marina},
-  year          = {1996},
-  pages         = {300 P.},
-  note          = {1996PA066605}
-}
-
-@Article{         levy_estublier_ea_01,
-  author        = {L\'{e}vy, Marina and Estublier, Audrey and Madec, Gurvan},
-  title         = {Choice of an advection scheme for biogeochemical models},
-  year          = 2001,
-  volume        = 28,
-  number        = 19,
-  month         = {Oct},
-  pages         = {3725–3728},
-  issn          = {0094-8276},
-  doi           = {10.1029/2001gl012947},
-  url           = {http://dx.doi.org/10.1029/2001gl012947},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         levy_klein_ea_10,
-  author        = {L\'{e}vy, M. and Klein, P. and Tr\'{e}guier, A.-M. and Iovino,
-                  D. and Madec, G. and Masson, S. and Takahashi, K.},
-  title         = {Modifications of gyre circulation by sub-mesoscale
-                  physics},
-  year          = 2010,
-  volume        = 34,
-  number        = {1-2},
-  month         = {Jan},
-  pages         = {1–15},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2010.04.001},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2010.04.001},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         levy_memery_ea_00,
-  author        = {L\'{e}vy, Marina and M\'{e}mery, Laurent and Madec, Gurvan},
-  title         = {Combined effects of mesoscale processes and atmospheric
-                  high-frequency variability on the spring bloom in the MEDOC
-                  area},
-  year          = 2000,
-  volume        = 47,
-  number        = 1,
-  month         = {Jan},
-  pages         = {27–53},
-  issn          = {0967-0637},
-  doi           = {10.1016/s0967-0637(99)00051-5},
-  url           = {http://dx.doi.org/10.1016/s0967-0637(99)00051-5},
-  journal       = {Deep Sea Research Part I: Oceanographic Research Papers},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         levy_memery_ea_99,
-  author        = {Lévy, Marina and Mémery, Laurent and Madec, Gurvan},
-  title         = {The onset of the Spring Bloom in the MEDOC area: mesoscale
-                  spatial variability},
-  year          = 1999,
-  volume        = 46,
-  number        = 7,
-  month         = {Jul},
-  pages         = {1137–1160},
-  issn          = {0967-0637},
-  doi           = {10.1016/s0967-0637(98)00105-8},
-  url           = {http://dx.doi.org/10.1016/s0967-0637(98)00105-8},
-  journal       = {Deep Sea Research Part I: Oceanographic Research Papers},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         levy_memery_ea_98,
-  author        = {L\'{e}vy, Marina and M\'{e}mery, Laurent and Madec, Gurvan},
-  title         = {The onset of a bloom after deep winter convection in the
-                  northwestern Mediterranean sea: mesoscale process study
-                  with a primitive equation model},
-  year          = 1998,
-  volume        = 16,
-  number        = {1-2},
-  month         = {Sep},
-  pages         = {7–21},
-  issn          = {0924-7963},
-  doi           = {10.1016/s0924-7963(97)00097-3},
-  url           = {http://dx.doi.org/10.1016/s0924-7963(97)00097-3},
-  journal       = {Journal of Marine Systems},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         li_fox-kemper_ea_17,
-  author        = {Li, Qing and Fox-Kemper, Baylor and Breivik, {\O}yvind and
-                  Webb, Adrean},
-  title         = {Statistical models of global Langmuir mixing},
-  year          = 2017,
-  volume        = 113,
-  month         = {May},
-  pages         = {95–114},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2017.03.016},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2017.03.016},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         li_garrett_93,
-  author        = {Li, Ming and Garrett, Chris},
-  title         = {Cell merging and the jet/downwelling ratio in Langmuir
-                  circulation},
-  year          = 1993,
-  volume        = 51,
-  number        = 4,
-  month         = {Nov},
-  pages         = {737–769},
-  issn          = {1543-9542},
-  doi           = {10.1357/0022240933223945},
-  url           = {http://dx.doi.org/10.1357/0022240933223945},
-  journal       = {Journal of Marine Research},
-  publisher     = {Journal of Marine Research/Yale}
-}
-
-@Article{         losch_08,
-  author        = {Losch, M.},
-  title         = {Modeling ice shelf cavities in a z-coordinate ocean general
-                  circulation model},
-  year          = 2008,
-  volume        = 113,
-  number        = {C8},
-  month         = {Aug},
-  issn          = {0148-0227},
-  doi           = {10.1029/2007jc004368},
-  url           = {http://dx.doi.org/10.1029/2007jc004368},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@TechReport{      lott_madec_89,
-  author        = {F. Lott and G. Madec},
-  title         = {Implementation of bottom topography in the Ocean General
-                  Circulation Model OPA of the LODYC: formalism and
-                  experiments.},
-  institution   = {LODYC, France, 36pp.},
-  year          = 1989,
-  number        = 3
-}
-
-@Article{         lott_madec_ea_90,
-  author        = {F. Lott and G. Madec and J. Verron},
-  title         = {Topographic experiments in an Ocean General Circulation
-                  Model},
-  journal       = om,
-  year          = 1990,
-  volume        = 88,
-  pages         = {1--4}
-}
-
-@Article{         luo_masson_ea_05,
-  author        = {Luo, Jing-Jia and Masson, Sebastien and Roeckner, Erich
-                  and Madec, Gurvan and Yamagata, Toshio},
-  title         = {Reducing Climatology Bias in an Ocean–Atmosphere CGCM
-                  with Improved Coupling Physics},
-  year          = 2005,
-  volume        = 18,
-  number        = 13,
-  month         = {Jul},
-  pages         = {2344–2360},
-  issn          = {1520-0442},
-  doi           = {10.1175/jcli3404.1},
-  url           = {http://dx.doi.org/10.1175/jcli3404.1},
-  journal       = {Journal of Climate},
-  publisher     = {American Meteorological Society}
-}
-
-@Book{            madec_01,
-  title         = {Le Cycle des Masses d'Eau Oc\'{e}aniqueset sa
-                  variabilit\'{e} dans le Syst\`{e}me Climatique},
-  year          = 2001,
-  author        = {G. Madec},
-  pages         = {63pp.},
-  series        = {Habilitation \`{a} Diriger des Recherches, Universit\'{e}
-                  Pierre et Marie Curie}
-}
-
-@PhDThesis{       madec_90,
-  url           = {http://www.theses.fr/1990PA066219},
-  title         = {La formation d'eau profonde et son impact sur la
-                  circulation r\'{e}gionale en M\'{e}diterran\'{e}e
-                  Occidentale - une approche num\'{e}rique},
-  school        = {Universit\'{e} Pierre et Marie Curie, Paris, France},
-  pages         = {194pp.},
-  author        = {Madec, Gurvan},
-  year          = {1990},
-  note          = {1990PA066219}
-}
-
-@Article{         madec_chartier_ea_91,
-  author        = {Madec, Gurvan and Chartier, Michel and Cr\'{e}pon, Michel},
-  title         = {The effect of thermohaline forcing variability on deep
-                  water formation in the western Mediterranean Sea: a
-                  high-resolution three-dimensional numerical study},
-  year          = 1991,
-  volume        = 15,
-  number        = {3-5},
-  month         = {Apr},
-  pages         = {301–332},
-  issn          = {0377-0265},
-  doi           = {10.1016/0377-0265(91)90024-a},
-  url           = {http://dx.doi.org/10.1016/0377-0265(91)90024-a},
-  journal       = {Dynamics of Atmospheres and Oceans},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         madec_delecluse_ea_91,
-  author        = {Madec, Gurvan and Delecluse, Pascale and Cr\'{e}pon, Michel
-                  and Chartier, Michel},
-  title         = {A Three-Dimensional Numerical Study of Deep-Water
-                  Formation in the Northwestern Mediterranean Sea},
-  year          = 1991,
-  volume        = 21,
-  number        = 9,
-  month         = {Sep},
-  pages         = {1349–1371},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1991)021<1349:atdnso>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1991)021<1349:atdnso>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@InBook{          madec_crepon_91,
-  author        = {Madec, Gurvan and Cr\'{e}pon, Michel},
-  chapter       = {Thermohaline-Driven Deep Water Formation in the
-                  Northwestern Mediterranean Sea},
-  year          = 1991,
-  pages         = {241–265},
-  issn          = {0422-9894},
-  doi           = {10.1016/s0422-9894(08)70071-0},
-  url           = {http://dx.doi.org/10.1016/s0422-9894(08)70071-0},
-  isbn          = 9780444887641,
-  booktitle     = {Deep Convection and Deep Water Formation in the Oceans,
-                  Proceedings of the International Monterey Colloquium on
-                  Deep Convection and Deep Water Formation in the Oceans},
-  editor        = {P.C. Chu and J.C. Gascard},
-  publisher     = {Elsevier Oceanographic Series}
-}
-
-@Article{         madec_delecluse_97,
-  author        = {G. Madec and P. Delecluse},
-  title         = {The OPA/ARPEGE and OPA/LMD Global Ocean-Atmosphere Coupled
-                  Model},
-  journal       = {Int. WOCE Newsletter},
-  year          = 1997,
-  volume        = 26,
-  pages         = {12--15},
-  url           = {https://www.nodc.noaa.gov/woce/woce_v3/wocedata_2/wocedocs/newsltr/news26/news26.pdf}
-}
-
-@Article{         madec_delecluse_ea_96,
-  author        = {Madec, Gurvan and Delecluse, Pascale and Cr\'{e}pon, Michel
-                  and Lott, François},
-  title         = {Large-Scale Preconditioning of Deep-Water Formation in the
-                  Northwestern Mediterranean Sea},
-  year          = 1996,
-  volume        = 26,
-  number        = 8,
-  month         = {Aug},
-  pages         = {1393–1408},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1996)026<1393:lspodw>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1996)026<1393:lspodw>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Manual{          madec_delecluse_ea_98,
-  title         = {{OPA 8.1 Ocean General Circulation Model reference
-                  manual}},
-  author        = {Madec, Gurvan and Del{\'e}cluse, Pascale and Imbard,
-                  Maurice and L{\'e}vy, Claire},
-  url           = {https://hal.archives-ouvertes.fr/hal-00154217},
-  journal       = {{Note du Pole de Mod{\'e}lisation}},
-  publisher     = {{Institut Pierre Simon Laplace des sciences de
-                  l'environnement global}},
-  volume        = {11},
-  pages         = {91p},
-  year          = {1998},
-  hal_id        = {hal-00154217},
-  hal_version   = {v1}
-}
-
-@Article{         madec_imbard_96,
-  author        = {Madec, Gurvan and Imbard, Maurice},
-  title         = {A global ocean mesh to overcome the North Pole
-                  singularity},
-  year          = 1996,
-  volume        = 12,
-  number        = 6,
-  month         = {May},
-  pages         = {381–388},
-  issn          = {1432-0894},
-  doi           = {10.1007/bf00211684},
-  url           = {http://dx.doi.org/10.1007/bf00211684},
-  journal       = {Climate Dynamics},
-  publisher     = {Springer Nature}
-}
-
-@Article{         madec_rahier_ea_88,
-  title         = {A comparison of two-dimensional elliptic solvers for the
-                  barotropic streamfunction in a multilevel OGCM},
-  author        = {Madec, G and Rahier, C and Chartier, M},
-  journal       = {Ocean Modelling},
-  volume        = {78},
-  pages         = {1--6},
-  year          = {1988}
-}
-
-@Article{         maes_delecluse_ea_97,
-  author        = {Maes, C. and Delecluse, P. and Madec, G.},
-  title         = {Impact of westerly wind bursts on the warm pool of the
-                  TOGA-COARE domain in an OGCM},
-  year          = 1997,
-  volume        = 14,
-  number        = 1,
-  month         = {Dec},
-  pages         = {55–70},
-  issn          = {1432-0894},
-  doi           = {10.1007/s003820050208},
-  url           = {http://dx.doi.org/10.1007/s003820050208},
-  journal       = {Climate Dynamics},
-  publisher     = {Springer Nature}
-}
-
-@Article{         maes_madec_ea_97,
-  author        = {Maes, C. and Madec, G. and Delecluse, P.},
-  title         = {Sensitivity of an Equatorial Pacific OGCM to the Lateral
-                  Diffusion},
-  year          = 1997,
-  volume        = 125,
-  number        = 5,
-  month         = {May},
-  pages         = {958–971},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(1997)125<0958:soaepo>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(1997)125<0958:soaepo>2.0.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         maggiore_zavatarelli_ea_98,
-  author        = {Maggiore, A. and Zavatarelli, M. and Angelucci, M.G. and
-                  Pinardi, N.},
-  title         = {Surface heat and water fluxes in the Adriatic Sea:
-                  Seasonal and internanual variability},
-  year          = 1998,
-  volume        = 23,
-  number        = {5-6},
-  month         = {Jan},
-  pages         = {561–567},
-  issn          = {0079-1946},
-  doi           = {10.1016/s0079-1946(98)00070-6},
-  url           = {http://dx.doi.org/10.1016/s0079-1946(98)00070-6},
-  journal       = {Physics and Chemistry of the Earth},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         maltrud_holloway_08,
-  author        = {Maltrud, Mathew and Holloway, Greg},
-  title         = {Implementing biharmonic neptune in a global eddying ocean
-                  model},
-  year          = 2008,
-  volume        = 21,
-  number        = {1-2},
-  month         = {Jan},
-  pages         = {22–34},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2007.11.003},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2007.11.003},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         maltrud_smith_ea_98,
-  author        = {Maltrud, Mathew E. and Smith, Richard D. and Semtner,
-                  Albert J. and Malone, Robert C.},
-  title         = {Global eddy-resolving ocean simulations driven by
-                  1985-1995 atmospheric winds},
-  year          = 1998,
-  volume        = 103,
-  number        = {C13},
-  month         = {Dec},
-  pages         = {30825–30853},
-  issn          = {0148-0227},
-  doi           = {10.1029/1998jc900013},
-  url           = {http://dx.doi.org/10.1029/1998jc900013},
-  journal       = {Journal of Geophysical Research: Oceans},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         marchesiello_mcwilliams_ea_01,
-  author        = {Marchesiello, Patrick and McWilliams, James C. and
-                  Shchepetkin, Alexander},
-  title         = {Open boundary conditions for long-term integration of
-                  regional oceanic models},
-  year          = 2001,
-  volume        = 3,
-  number        = {1-2},
-  month         = {Jan},
-  pages         = {1–20},
-  issn          = {1463-5003},
-  doi           = {10.1016/s1463-5003(00)00013-5},
-  url           = {http://dx.doi.org/10.1016/s1463-5003(00)00013-5},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         marsaleix_auclair_ea_08,
-  author        = {Marsaleix, Patrick and Auclair, Francis and Floor, Jochem
-                  Willem and Herrmann, Marine Julie and Estournel, Claude and
-                  Pairaud, Ivane and Ulses, Caroline},
-  title         = {Energy conservation issues in sigma-coordinate
-                  free-surface ocean models},
-  year          = 2008,
-  volume        = 20,
-  number        = 1,
-  month         = {Jan},
-  pages         = {61–89},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2007.07.005},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2007.07.005},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         marsh_ivchenko_ea_15,
-  author        = {Marsh, R. and Ivchenko, V. O. and Skliris, N. and
-                  Alderson, S. and Bigg, G. R. and Madec, G. and Blaker, A.
-                  T. and Aksenov, Y. and Sinha, B. and Coward, A. C. and et
-                  al.},
-  title         = {NEMO–ICB (v1.0): interactive icebergs in the NEMO ocean
-                  model globally configured at eddy-permitting resolution},
-  year          = 2015,
-  volume        = 8,
-  number        = 5,
-  month         = {May},
-  pages         = {1547–1562},
-  issn          = {1991-9603},
-  doi           = {10.5194/gmd-8-1547-2015},
-  url           = {http://dx.doi.org/10.5194/gmd-8-1547-2015},
-  journal       = {Geoscientific Model Development},
-  publisher     = {Copernicus GmbH}
-}
-
-@Manual{          mitgcm_manual,
-  title         = {MITgcm's User Manual},
-  editor        = {MIT Department of EAPS},
-  author        = {Alistair Adcroft, Jean-Michel Campin, Ed Doddridge,
-                  Stephanie Dutkiewicz, Constantinos Evangelinos, David
-                  Ferreira, Mick Follows, Gael Forget, Baylor Fox-Kemper,
-                  Patrick Heimbach, Chris Hill, Ed Hill, Helen Hill, Oliver
-                  Jahn, Jody Klymak, Martin Losch, John Marshall, Guillaume
-                  Maze, Matt Mazloff, Dimitris Menemenlis, Andrea Molod, and
-                  Jeff Scott},
-  url           = {https://mitgcm.readthedocs.io}
-}
-
-@PhDThesis{       marti_92,
-  url           = {http://www.theses.fr/1992PA066673},
-  title         = {Etude de l'oc\'{e}an mondial : mod\'{e}lisation de la
-                  circulation et du transport de traceurs anthropog\'{e}niques},
-  school        = {Universit\'{e} Pierre et Marie Curie, Paris, France},
-  author        = {Marti, Olivier},
-  year          = {1992},
-  pages         = {203 P.},
-  note          = {1992PA066673}
-}
-
-@Article{         marti_braconnot_ea_09,
-  author        = {Marti, Olivier and Braconnot, P. and Dufresne, J.-L. and
-                  Bellier, J. and Benshila, R. and Bony, S. and Brockmann, P.
-                  and Cadule, P. and Caubel, A. and Codron, F. and et al.},
-  title         = {Key features of the IPSL ocean atmosphere model and its
-                  sensitivity to atmospheric resolution},
-  year          = 2009,
-  volume        = 34,
-  number        = 1,
-  month         = {Aug},
-  pages         = {1–26},
-  issn          = {1432-0894},
-  doi           = {10.1007/s00382-009-0640-6},
-  url           = {http://dx.doi.org/10.1007/s00382-009-0640-6},
-  journal       = {Climate Dynamics},
-  publisher     = {Springer Science and Business Media LLC}
-}
-
-@Article{         marti_madec_ea_92,
-  author        = {Marti, Olivier and Madec, Gurvan and Delecluse, Pascale},
-  title         = {Comment [on “Net diffusivity in ocean general
-                  circulation models with nonuniform grids” by F. L. Yin
-                  and I. Y. Fung]},
-  year          = 1992,
-  volume        = 97,
-  number        = {C8},
-  pages         = {12,763--12,766}
-  issn          = {0148-0227},
-  doi           = {10.1029/92jc00306},
-  url           = {http://dx.doi.org/10.1029/92jc00306},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         martin_adcroft_10,
-  author        = {Martin, T. and Adcroft, A.},
-  title         = {Parameterizing the fresh-water flux from land ice to ocean
-                  with interactive icebergs in a coupled climate model},
-  year          = 2010,
-  volume        = 34,
-  number        = {3-4},
-  month         = {Jan},
-  pages         = {111–124},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2010.05.001},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2010.05.001},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@InBook{          masson_foujols_ea_08,
-  author        = {Masson, S. and Foujols, M. -A. and Klein, P. and Madec, G.
-                  and Hua, L. and Levy, M. and Sasaki, H. and Takahashi, K.
-                  and Svensson, F.},
-  title         = {OPA9 — French Experiments on the Earth Simulator and
-                  Teraflop Workbench Tunings},
-  year          = 2008,
-  pages         = {25–34},
-  doi           = {10.1007/978-3-540-74384-2_3},
-  url           = {http://dx.doi.org/10.1007/978-3-540-74384-2_3},
-  isbn          = 9783540743835,
-  booktitle     = {High Performance Computing on Vector Systems 2007},
-  editor        = {Resch M, Roller S, Lammers P, Furui T, Galle M, Bez W},
-  publisher     = {Springer Berlin Heidelberg}
-}
-
-@Article{         masson_luo_ea_05,
-  author        = {Masson, S. and Luo, J.-J. and Madec, G. and Vialard, J.
-                  and Durand, F. and Gualdi, S. and Guilyardi, E. and Behera,
-                  S. and Delecluse, P. and Navarra, A. and et al.},
-  title         = {Impact of barrier layer on winter-spring variability of
-                  the South-Eastern Arabian Sea},
-  year          = 2005,
-  volume        = 32,
-  number        = 7,
-  month         = {Apr},
-  pages         = {L07703},
-  issn          = {0094-8276},
-  doi           = {10.1029/2004gl021980},
-  url           = {http://dx.doi.org/10.1029/2004GL021980},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         mathiot_jenkins_ea_17,
-  author        = {Mathiot, Pierre and Jenkins, Adrian and Harris,
-                  Christopher and Madec, Gurvan},
-  title         = {Explicit representation and parametrised impacts of under
-                  ice shelf seas in the ${z}^{\ast}$ coordinate
-                  ocean model NEMO 3.6},
-  year          = 2017,
-  volume        = 10,
-  number        = 7,
-  month         = {Jul},
-  pages         = {2849–2874},
-  issn          = {1991-9603},
-  doi           = {10.5194/gmd-10-2849-2017},
-  url           = {http://dx.doi.org/10.5194/gmd-10-2849-2017},
-  journal       = {Geoscientific Model Development},
-  publisher     = {Copernicus GmbH}
-}
-
-@Article{         mcdougall_87,
-  author        = {McDougall, Trevor J.},
-  title         = {Neutral Surfaces},
-  year          = 1987,
-  volume        = 17,
-  number        = 11,
-  month         = {Nov},
-  pages         = {1950–1964},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1987)017<1950:ns>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1987)017<1950:NS>2.0.CO;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         mcdougall_taylor_84,
-  author        = {McDougall, Trevor J. and Taylor, John R.},
-  title         = {Flux measurements across a finger interface at low values
-                  of the stability ratio},
-  year          = 1984,
-  volume        = 42,
-  number        = 1,
-  month         = {Feb},
-  pages         = {1–14},
-  issn          = {1543-9542},
-  doi           = {10.1357/002224084788506095},
-  url           = {http://dx.doi.org/10.1357/002224084788506095},
-  journal       = {Journal of Marine Research},
-  publisher     = {Journal of Marine Research/Yale}
-}
-
-@Article{         mellor_blumberg_04,
-  author        = {Mellor, George and Blumberg, Alan},
-  title         = {Wave Breaking and Ocean Surface Layer Thermal Response},
-  year          = 2004,
-  volume        = 34,
-  number        = 3,
-  month         = {Mar},
-  pages         = {693–698},
-  issn          = {1520-0485},
-  doi           = {10.1175/2517.1},
-  url           = {http://dx.doi.org/10.1175/2517.1},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         mellor_yamada_82,
-  author        = {Mellor, George L. and Yamada, Tetsuji},
-  title         = {Development of a turbulence closure model for geophysical
-                  fluid problems},
-  year          = 1982,
-  volume        = 20,
-  number        = 4,
-  pages         = {851--875}
-  issn          = {8755-1209},
-  doi           = {10.1029/rg020i004p00851},
-  url           = {http://dx.doi.org/10.1029/rg020i004p00851},
-  journal       = {Reviews of Geophysics},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         menkes_vialard_ea_06,
-  author        = {Menkes, Christophe E. R. and Vialard, Jérôme G. and
-                  Kennan, Sean C. and Boulanger, Jean-Philippe and Madec,
-                  Gurvan V.},
-  title         = {A Modeling Study of the Impact of Tropical Instability
-                  Waves on the Heat Budget of the Eastern Equatorial
-                  Pacific},
-  year          = 2006,
-  volume        = 36,
-  number        = 5,
-  month         = {May},
-  pages         = {847–865},
-  issn          = {1520-0485},
-  doi           = {10.1175/jpo2904.1},
-  url           = {http://dx.doi.org/10.1175/jpo2904.1},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         merryfield_holloway_ea_99,
-  author        = {Merryfield, William J. and Holloway, Greg and Gargett, Ann
-                  E.},
-  title         = {A Global Ocean Model with Double-Diffusive Mixing},
-  year          = 1999,
-  volume        = 29,
-  number        = 6,
-  month         = {Jun},
-  pages         = {1124–1142},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1999)029<1124:agomwd>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1999)029<1124:agomwd>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Book{            mesinger_arakawa_76,
-  author        = {Mesinger, Fedor and Arakawa, A},
-  year          = {1976},
-  month         = {08},
-  title         = {Numerical Methods Used In Atmospheric Models},
-  volume        = {17},
-  journal       = {GARP Publication Series},
-  url           = {http://oceanrep.geomar.de/40278/1/Mesinger_ArakawaGARP.pdf}
-}
-
-@Article{         morel_88,
-  author        = {Morel, André},
-  title         = {Optical modeling of the upper ocean in relation to its
-                  biogenous matter content (case I waters)},
-  year          = 1988,
-  volume        = 93,
-  number        = {C9},
-  pages         = {10,749--10,768}
-  issn          = {0148-0227},
-  doi           = {10.1029/jc093ic09p10749},
-  url           = {http://dx.doi.org/10.1029/jc093ic09p10749},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         morel_berthon_89,
-  author        = {Morel, André and Berthon, Jean-François},
-  title         = {Surface pigments, algal biomass profiles, and potential
-                  production of the euphotic layer: Relationships
-                  reinvestigated in view of remote-sensing applications},
-  year          = 1989,
-  volume        = 34,
-  number        = 8,
-  month         = {Dec},
-  pages         = {1545–1562},
-  issn          = {0024-3590},
-  doi           = {10.4319/lo.1989.34.8.1545},
-  url           = {http://dx.doi.org/10.4319/lo.1989.34.8.1545},
-  journal       = {Limnology and Oceanography},
-  publisher     = {Wiley}
-}
-
-@Article{         morel_maritorena_01,
-  author        = {Morel, André and Maritorena, Stéphane},
-  title         = {Bio-optical properties of oceanic waters: A reappraisal},
-  year          = 2001,
-  volume        = 106,
-  number        = {C4},
-  month         = {Apr},
-  pages         = {7163–7180},
-  issn          = {0148-0227},
-  doi           = {10.1029/2000jc000319},
-  url           = {http://dx.doi.org/10.1029/2000jc000319},
-  journal       = {Journal of Geophysical Research: Oceans},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         moum_caldwell_ea_02,
-  author        = {Moum, J. N. and Caldwell, D. R. and Nash, J. D. and
-                  Gunderson, G. D.},
-  title         = {Observations of Boundary Mixing over the Continental
-                  Slope},
-  year          = 2002,
-  volume        = 32,
-  number        = 7,
-  month         = {Jul},
-  pages         = {2113–2130},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(2002)032<2113:oobmot>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(2002)032<2113:oobmot>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         murray_96,
-  author        = {Murray, Ross J.},
-  title         = {Explicit Generation of Orthogonal Grids for Ocean Models},
-  year          = 1996,
-  volume        = 126,
-  number        = 2,
-  month         = {Jul},
-  pages         = {251–273},
-  issn          = {0021-9991},
-  doi           = {10.1006/jcph.1996.0136},
-  url           = {http://dx.doi.org/10.1006/jcph.1996.0136},
-  journal       = {Journal of Computational Physics},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         oddo_adani_ea_09,
-  author        = {Oddo, P. and Adani, M. and Pinardi, N. and Fratianni, C.
-                  and Tonani, M. and Pettenuzzo, D.},
-  title         = {A nested Atlantic-Mediterranean Sea general circulation
-                  model for operational forecasting},
-  year          = 2009,
-  volume        = 5,
-  number        = 4,
-  month         = {Oct},
-  pages         = {461–473},
-  issn          = {1812-0792},
-  doi           = {10.5194/os-5-461-2009},
-  url           = {http://dx.doi.org/10.5194/os-5-461-2009},
-  journal       = {Ocean Science},
-  publisher     = {Copernicus GmbH}
-}
-
-@Article{         oey_06,
-  author        = {Oey, Lie-Yauw},
-  title         = {An OGCM with movable land–sea boundaries},
-  year          = 2006,
-  volume        = 13,
-  number        = 2,
-  month         = {Jan},
-  pages         = {176–195},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2006.01.001},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2006.01.001},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@PhDThesis{       olivier_01,
-  url           = {http://www.theses.fr/2001PA066186},
-  title         = {Etude de l'activit\'{e} biologique et de la circulation
-                  oc\'{e}anique dans un jet g\'{e}ostrophique: le front
-                  Alm\'{e}ria-Oran},
-  school        = {Universit\'{e} Pierre et Marie Curie, Paris, France},
-  author        = {Olivier, Franck},
-  year          = {2001},
-  pages         = {187 p.},
-  note          = {2001PA066186}
-}
-
-@Article{         osborn_80,
-  author        = {Osborn, T. R.},
-  title         = {Estimates of the Local Rate of Vertical Diffusion from
-                  Dissipation Measurements},
-  year          = 1980,
-  volume        = 10,
-  number        = 1,
-  month         = {Jan},
-  pages         = {83–89},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1980)010<0083:eotlro>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1980)010<0083:eotlro>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Book{            unesco_83,
-  author        = {Fofonoff, P N and Millard, R},
-  title         = {Algorithms for computation of fundamental property of sea
-                  water},
-  year          = 1983,
-  volume        = {44},
-  month         = {01},
-  journal       = {UNESCO Tech. Pap. Mar. Sci.},
-  url           = {https://www.jodc.go.jp/info/ioc_doc/UNESCO_tech/059832eb.pdf}
-}
-
-@Article{         pacanowski_gnanadesikan_98,
-  author        = {Pacanowski, Ronald C. and Gnanadesikan, Anand},
-  title         = {Transient Response in a z-Level Ocean Model That Resolves
-                  Topography with Partial Cells},
-  year          = 1998,
-  volume        = 126,
-  number        = 12,
-  month         = {Dec},
-  pages         = {3248–3270},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(1998)126<3248:triazl>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(1998)126<3248:triazl>2.0.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         pacanowski_philander_81,
-  author        = {Pacanowski, R. C. and Philander, S. G. H.},
-  title         = {Parameterization of Vertical Mixing in Numerical Models of
-                  Tropical Oceans},
-  year          = 1981,
-  volume        = 11,
-  number        = 11,
-  month         = {Nov},
-  pages         = {1443–1451},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1981)011<1443:povmin>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1981)011<1443:povmin>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         park_keenlyside_ea_09,
-  author        = {Park, W. and Keenlyside, N. and Latif, M. and Str\¨{o}h, A.
-                  and Redler, R. and Roeckner, E. and Madec, G.},
-  title         = {Tropical Pacific Climate and Its Response to Global
-                  Warming in the Kiel Climate Model},
-  year          = 2009,
-  volume        = 22,
-  number        = 1,
-  month         = {Jan},
-  pages         = {71–92},
-  issn          = {1520-0442},
-  doi           = {10.1175/2008jcli2261.1},
-  url           = {http://dx.doi.org/10.1175/2008JCLI2261.1},
-  journal       = {Journal of Climate},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         paulson_simpson_77,
-  author        = {Paulson, Clayton A. and Simpson, James J.},
-  title         = {Irradiance Measurements in the Upper Ocean},
-  year          = 1977,
-  volume        = 7,
-  number        = 6,
-  month         = {Nov},
-  pages         = {952–956},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1977)007<0952:imituo>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1977)007<0952:imituo>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         payne_72,
-  author        = {Payne, Richard E.},
-  title         = {Albedo of the Sea Surface},
-  year          = 1972,
-  volume        = 29,
-  number        = 5,
-  month         = {Jul},
-  pages         = {959–970},
-  issn          = {1520-0469},
-  doi           = {10.1175/1520-0469(1972)029<0959:aotss>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0469(1972)029<0959:aotss>2.0.co;2},
-  journal       = {Journal of the Atmospheric Sciences},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         penduff_barnier_ea_00,
-  author        = {Penduff, Thierry and Barnier, Bernard and de Verdi\`{e}re,
-                  Alain Colin},
-  title         = {Self-adapting open boundaries for a sigma coordinate model
-                  of the eastern North Atlantic},
-  year          = 2000,
-  volume        = 105,
-  number        = {C5},
-  month         = {May},
-  pages         = {11279–11297},
-  issn          = {0148-0227},
-  doi           = {10.1029/1999jc900335},
-  url           = {http://dx.doi.org/10.1029/1999jc900335},
-  journal       = {Journal of Geophysical Research: Oceans},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         penduff_barnier_ea_06,
-  author        = {Penduff, Thierry and Barnier, Bernard and Molines,
-                  Jean-Marc and Madec, Gurvan},
-  title         = {On the use of current meter data to assess the realism of
-                  ocean model simulations},
-  year          = 2006,
-  volume        = 11,
-  number        = {3-4},
-  month         = {Jan},
-  pages         = {399–416},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2005.02.001},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2005.02.001},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         penduff_le-sommer_ea_07,
-  author        = {Penduff, T. and Le Sommer, J. and Barnier, B. and
-                  Treguier, A.-M. and Molines, J.-M. and Madec, G.},
-  title         = {Influence of numerical schemes on current-topography
-                  interactions in 1/4$^{\circ}$ global ocean simulations},
-  year          = 2007,
-  volume        = 3,
-  number        = 4,
-  month         = {Dec},
-  pages         = {509–524},
-  issn          = {1812-0792},
-  doi           = {10.5194/os-3-509-2007},
-  url           = {http://dx.doi.org/10.5194/os-3-509-2007},
-  journal       = {Ocean Science},
-  publisher     = {Copernicus GmbH}
-}
-
-@Article{         phillips_59,
-  author        = {Phillips, R. S.},
-  title         = {Dissipative operators and hyperbolic systems of partial
-                  differential equations},
-  year          = 1959,
-  volume        = 90,
-  number        = 2,
-  month         = {Feb},
-  pages         = {193–193},
-  issn          = {0002-9947},
-  doi           = {10.1090/s0002-9947-1959-0104919-1},
-  url           = {http://dx.doi.org/10.1090/S0002-9947-1959-0104919-1},
-  journal       = {Transactions of the American Mathematical Society},
-  publisher     = {American Mathematical Society (AMS)}
-}
-
-@Article{         raynaud_speich_ea_00,
-  author        = {Raynaud, S. and Speich, S. and Guilyardi, E. and Madec,
-                  G.},
-  title         = {Impacts of the ocean lateral diffusion on the El
-                  Niño/Southern Oscillation-like variability of a global
-                  coupled general circulation model},
-  year          = 2000,
-  volume        = 27,
-  number        = 19,
-  month         = {Oct},
-  pages         = {3041–3044},
-  issn          = {0094-8276},
-  doi           = {10.1029/1999gl011323},
-  url           = {http://dx.doi.org/10.1029/1999gl011323},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         redi_82,
-  author        = {Redi, Martha H.},
-  title         = {Oceanic Isopycnal Mixing by Coordinate Rotation},
-  year          = 1982,
-  volume        = 12,
-  number        = 10,
-  month         = {Oct},
-  pages         = {1154–1158},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1982)012<1154:oimbcr>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1982)012<1154:oimbcr>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         reed_77,
-  author        = {Reed, R. K.},
-  title         = {On Estimating Insolation over the Ocean},
-  year          = 1977,
-  volume        = 7,
-  number        = 3,
-  month         = {May},
-  pages         = {482–485},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1977)007<0482:oeioto>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1977)007<0482:oeioto>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         reverdin_delecluse_ea_91,
-  author        = {Reverdin, G. and Del\'{e}cluse, P. and L\'{e}vy, C. and Andrich,
-                  P. and Morli\`{e}re, A. and Verstraete, J.M.},
-  title         = {The near surface tropical Atlantic in 1982–1984: Results
-                  from a numerical simulation and a data analysis},
-  year          = 1991,
-  volume        = 27,
-  number        = {3-4},
-  month         = {Jan},
-  pages         = {273–340},
-  issn          = {0079-6611},
-  doi           = {10.1016/0079-6611(91)90027-j},
-  url           = {http://dx.doi.org/10.1016/0079-6611(91)90027-j},
-  journal       = {Progress in Oceanography},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         robert_66,
-  author        = {Robert, Andre J.},
-  title         = {The Integration of a Low Order Spectral Form of the
-                  Primitive Meteorological Equations},
-  year          = 1966,
-  volume        = 44,
-  number        = 5,
-  pages         = {237–245},
-  issn          = {2186-9057},
-  doi           = {10.2151/jmsj1965.44.5_237},
-  url           = {http://dx.doi.org/10.2151/jmsj1965.44.5_237},
-  journal       = {Journal of the Meteorological Society of Japan. Ser. II},
-  publisher     = {Meteorological Society of Japan}
-}
-
-@Article{         rodgers_aumont_ea_04,
-  author        = {Rodgers, Keith B. and Aumont, Olivier and Madec, Gurvan and Menkes, Christophe and Blanke, Bruno and Monfray, Patrick and Orr, James C. and Schrag, Daniel P.},
-  title         = {Radiocarbon as a thermocline proxy for the eastern
-                  equatorial Pacific},
-  year          = 2004,
-  volume        = 31,
-  number        = 14,
-  pages         = {L14314},
-  issn          = {0094-8276},
-  doi           = {10.1029/2004gl019764},
-  url           = {http://dx.doi.org/10.1029/2004GL019764},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         rodgers_aumont_ea_14,
-  author        = {Rodgers, K. B. and Aumont, O. and Mikaloff Fletcher, S. E.
-                  and Plancherel, Y. and Bopp, L. and de Boyer Montégut, C.
-                  and Iudicone, D. and Keeling, R. F. and Madec, G. and
-                  Wanninkhof, R.},
-  title         = {Strong sensitivity of Southern Ocean carbon uptake and
-                  nutrient cycling to wind stirring},
-  year          = 2014,
-  volume        = 11,
-  number        = 15,
-  month         = {Aug},
-  pages         = {4077–4098},
-  issn          = {1726-4189},
-  doi           = {10.5194/bg-11-4077-2014},
-  url           = {http://dx.doi.org/10.5194/bg-11-4077-2014},
-  journal       = {Biogeosciences},
-  publisher     = {Copernicus GmbH}
-}
-
-@Article{         rodgers_blanke_ea_03,
-  author        = {Rodgers, Keith B. and Blanke, Bruno and Madec, Gurvan and
-                  Aumont, Olivier and Ciais, Philippe and Dutay,
-                  Jean-Claude},
-  title         = {Extratropical sources of Equatorial Pacific upwelling in
-                  an OGCM},
-  year          = 2003,
-  volume        = 30,
-  number        = 2,
-  month         = {Jan},
-  issn          = {0094-8276},
-  doi           = {10.1029/2002gl016003},
-  url           = {http://dx.doi.org/10.1029/2002GL016003},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         rodi_87,
-  author        = {Rodi, Wolfgang},
-  title         = {Examples of calculation methods for flow and mixing in
-                  stratified fluids},
-  year          = 1987,
-  volume        = 92,
-  number        = {C5},
-  pages         = {5305--5328}
-  issn          = {0148-0227},
-  doi           = {10.1029/jc092ic05p05305},
-  url           = {http://dx.doi.org/10.1029/jc092ic05p05305},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@InCollection{    roed_cooper_86,
-  author        = {Røed, L. P. and Cooper, C. K.},
-  title         = {Open Boundary Conditions in Numerical Ocean Models},
-  year          = 1986,
-  pages         = {411–436},
-  doi           = {10.1007/978-94-017-0627-8_23},
-  url           = {http://dx.doi.org/10.1007/978-94-017-0627-8_23},
-  isbn          = 9789401706278,
-  booktitle     = {Advanced Physical Oceanographic Numerical Modelling},
-  editor        = {J.J. O'Brien}
-  volume        = {186}
-  publisher     = {NATO ASI Series},
-}
-
-@Article{         roquet_madec_ea_15,
-  author        = {Roquet, F. and Madec, G. and McDougall, Trevor J. and
-                  Barker, Paul M.},
-  title         = {Accurate polynomial expressions for the density and
-                  specific volume of seawater using the TEOS-10 standard},
-  year          = 2015,
-  volume        = 90,
-  month         = {Jun},
-  pages         = {29–43},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2015.04.002},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2015.04.002},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         roquet_madec_ea_15*1,
-  author        = {Roquet, Fabien and Madec, Gurvan and Brodeau, Laurent and
-                  Nycander, J.},
-  title         = {Defining a Simplified Yet “Realistic” Equation of
-                  State for Seawater},
-  year          = 2015,
-  volume        = 45,
-  number        = 10,
-  month         = {Oct},
-  pages         = {2564–2579},
-  issn          = {1520-0485},
-  doi           = {10.1175/jpo-d-15-0080.1},
-  url           = {http://dx.doi.org/10.1175/JPO-D-15-0080.1},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         roullet_madec_00,
-  author        = {Roullet, Guillaume and Madec, Gurvan},
-  title         = {Salt conservation, free surface, and varying levels: A new
-                  formulation for ocean general circulation models},
-  year          = 2000,
-  volume        = 105,
-  number        = {C10},
-  month         = {Oct},
-  pages         = {23927–23942},
-  issn          = {0148-0227},
-  doi           = {10.1029/2000jc900089},
-  url           = {http://dx.doi.org/10.1029/2000jc900089},
-  journal       = {Journal of Geophysical Research: Oceans},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         rousset_vancoppenolle_ea_15,
-  author        = {Rousset, C. and Vancoppenolle, M. and Madec, G. and
-                  Fichefet, T. and Flavoni, S. and Barth\'{e}lemy, A. and
-                  Benshila, R. and Chanut, J. and L\'{e}vy, C. and Masson, S. and
-                  et al.},
-  title         = {The Louvain-La-Neuve sea ice model LIM3.6: global and
-                  regional capabilities},
-  year          = 2015,
-  volume        = 8,
-  number        = 10,
-  month         = {Oct},
-  pages         = {2991–3005},
-  issn          = {1991-9603},
-  doi           = {10.5194/gmd-8-2991-2015},
-  url           = {http://dx.doi.org/10.5194/gmd-8-2991-2015},
-  journal       = {Geoscientific Model Development},
-  publisher     = {Copernicus GmbH}
-}
-
-@Article{         sadourny_75,
-  author        = {Sadourny, Robert},
-  title         = {The Dynamics of Finite-Difference Models of the
-                  Shallow-Water Equations},
-  year          = 1975,
-  volume        = 32,
-  number        = 4,
-  month         = {Apr},
-  pages         = {680–689},
-  issn          = {1520-0469},
-  doi           = {10.1175/1520-0469(1975)032<0680:tdofdm>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0469(1975)032<0680:tdofdm>2.0.co;2},
-  journal       = {Journal of the Atmospheric Sciences},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         sarmiento_bryan_82,
-  author        = {Sarmiento, J. L. and Bryan, K.},
-  title         = {An ocean transport model for the North Atlantic},
-  year          = 1982,
-  volume        = 87,
-  number        = {C1},
-  pages         = {394--409}
-  issn          = {0148-0227},
-  doi           = {10.1029/jc087ic01p00394},
-  url           = {http://dx.doi.org/10.1029/jc087ic01p00394},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         saunders_67,
-  author        = {Saunders, Peter M.},
-  title         = {The Temperature at the Ocean-Air Interface},
-  year          = 1967,
-  volume        = 24,
-  number        = 3,
-  month         = {May},
-  pages         = {269–273},
-  issn          = {1520-0469},
-  doi           = {10.1175/1520-0469(1967)024<0269:ttatoa>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0469(1967)024<0269:TTATOA>2.0.CO;2},
-  journal       = {Journal of the Atmospheric Sciences},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         shchepetkin_mcwilliams_03,
-  author        = {A. F. Shchepetkin and J. C. McWilliams},
-  title         = {A method for computing horizontal pressure-gradient force
-                  in an oceanic model with a nonaligned vertical coordinate},
-  year          = 2003,
-  volume        = 108,
-  number        = {C3},
-  pages         = 3090,
-  issn          = {0148-0227},
-  doi           = {10.1029/2001jc001047},
-  url           = {http://dx.doi.org/10.1029/2001JC001047},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         shchepetkin_mcwilliams_05,
-  author        = {Shchepetkin, Alexander F. and McWilliams, James C.},
-  title         = {The regional oceanic modeling system (ROMS): a
-                  split-explicit, free-surface,
-                  topography-following-coordinate oceanic model},
-  year          = 2005,
-  volume        = 9,
-  number        = 4,
-  month         = {Jan},
-  pages         = {347–404},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2004.08.002},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2004.08.002},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@InCollection{   shchepetkin_mcwilliams_09,
-  author        = {Shchepetkin, Alexander F. and McWilliams, James C.},
-  title         = {Computational Kernel Algorithms for Fine-Scale,
-                  Multiprocess, Longtime Oceanic Simulations},
-  year          = 2009,
-  pages         = {121–183},
-  issn          = {1570-8659},
-  doi           = {10.1016/s1570-8659(08)01202-0},
-  url           = {http://dx.doi.org/10.1016/s1570-8659(08)01202-0},
-  isbn          = 9780444518934,
-  booktitle     = "Special Volume: Computational Methods for the Atmosphere and the Oceans",
-  series        = "Handbook of Numerical Analysis",
-  editor        = "Roger M. Temam and Joseph J. Tribbia",
-  volume        = {14},
-  publisher     = {Elsevier}
-}
-
-@Article{         shchepetkin_obrien_96,
-  author        = {Shchepetkin, Alexander F. and O’Brien, James J.},
-  title         = {A Physically Consistent Formulation of Lateral Friction in
-                  Shallow-Water Equation Ocean Models},
-  year          = 1996,
-  volume        = 124,
-  number        = 6,
-  month         = {Jun},
-  pages         = {1285–1300},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(1996)124<1285:apcfol>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(1996)124<1285:apcfol>2.0.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         siddorn_furner_13,
-  author        = {Siddorn, J.R. and Furner, R.},
-  title         = {An analytical stretching function that combines the best
-                  attributes of geopotential and terrain-following vertical
-                  coordinates},
-  year          = 2013,
-  volume        = 66,
-  month         = {Jun},
-  pages         = {1–13},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2013.02.001},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2013.02.001},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         simmons_jayne_ea_04,
-  author        = {Simmons, Harper L. and Jayne, Steven R. and Laurent, Louis
-                  C.St. and Weaver, Andrew J.},
-  title         = {Tidally driven mixing in a numerical model of the ocean
-                  general circulation},
-  year          = 2004,
-  volume        = 6,
-  number        = {3-4},
-  month         = {Jan},
-  pages         = {245–263},
-  issn          = {1463-5003},
-  doi           = {10.1016/s1463-5003(03)00011-8},
-  url           = {http://dx.doi.org/10.1016/s1463-5003(03)00011-8},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@InBook{          smagorinsky_93,
-  author        = {Smagorinsky, J.},
-  chapter       = {Some historical remarks on the use of non-linear
-                  viscosities},
-  title         = {Large Eddy Simulation of Complex Engineering and
-                  Geophysical Flows},
-  pages         = {3--36},
-  year          = 1993,
-  publisher     = {Cambridge University Press},
-  editor        = {B. Galperin and S. A. Orszag},
-  url           = {https://books.google.fr/books?id=rUuTDLh8nHcC}
-}
-
-@Article{         song_98,
-  author        = {Song, Y. Tony},
-  title         = {A General Pressure Gradient Formulation for Ocean Models.
-                  Part I: Scheme Design and Diagnostic Analysis},
-  year          = 1998,
-  volume        = 126,
-  number        = 12,
-  month         = {Dec},
-  pages         = {3213–3230},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(1998)126<3213:agpgff>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(1998)126<3213:agpgff>2.0.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         song_haidvogel_94,
-  author        = {Song, Yuhe and Haidvogel, Dale},
-  title         = {A Semi-implicit Ocean Circulation Model Using a
-                  Generalized Topography-Following Coordinate System},
-  year          = 1994,
-  volume        = 115,
-  number        = 1,
-  month         = {Nov},
-  pages         = {228–244},
-  issn          = {0021-9991},
-  doi           = {10.1006/jcph.1994.1189},
-  url           = {http://dx.doi.org/10.1006/jcph.1994.1189},
-  journal       = {Journal of Computational Physics},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         song_wright_98,
-  author        = {Song, Y. Tony and Wright, Daniel G.},
-  title         = {A General Pressure Gradient Formulation for Ocean Models.
-                  Part II: Energy, Momentum, and Bottom Torque Consistency},
-  year          = 1998,
-  volume        = 126,
-  number        = 12,
-  month         = {Dec},
-  pages         = {3231–3247},
-  issn          = {1520-0493},
-  doi           = {10.1175/1520-0493(1998)126<3231:agpgff>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0493(1998)126<3231:agpgff>2.0.co;2},
-  journal       = {Monthly Weather Review},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         speer_guilyardi_ea_00,
-  author        = {Speer, Kevin and Guilyardi, \'{E}ric and Madec, Gurvan},
-  title         = {Southern Ocean transformation in a coupled model with and
-                  without eddy mass fluxes},
-  year          = 2000,
-  volume        = 52,
-  number        = 5,
-  month         = {Oct},
-  pages         = {554–565},
-  issn          = {1600-0870},
-  doi           = {10.1034/j.1600-0870.2000.01060.x},
-  url           = {http://dx.doi.org/10.1034/j.1600-0870.2000.01060.x},
-  journal       = {Tellus A},
-  publisher     = {Informa UK Limited}
-}
-
-@PhDThesis{       speich_92,
-  url           = {http://www.theses.fr/1992PA066680},
-  title         = {Etude du for\c{c}age de la circulation g\'{e}n\'{e}rale
-                  oc\'{e}anique par les d\'{e}troits - cas de la mer d'Alboran},
-  school        = {Universit\'{e} Pierre et Marie Curie, Paris, France},
-  author        = {Speich, Sabrina},
-  year          = {1992},
-  pages         = {250 P.},
-  note          = {1992PA066680}
-}
-
-@Article{         speich_blanke_ea_01,
-  author        = {Speich, Sabrina and Blanke, Bruno and Madec, Gurvan},
-  title         = {Warm and cold water routes of an O.G.C.M. thermohaline
-                  conveyor belt},
-  year          = 2001,
-  volume        = 28,
-  number        = 2,
-  month         = {Jan},
-  pages         = {311–314},
-  issn          = {0094-8276},
-  doi           = {10.1029/2000gl011748},
-  url           = {http://dx.doi.org/10.1029/2000gl011748},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         speich_madec_ea_96,
-  author        = {Speich, S. and Madec, G. and Cr\'{e}pon, M.},
-  title         = {A Strait Outflow Circulation Process Study: The Case of
-                  the Alboran Sea},
-  year          = 1996,
-  volume        = 26,
-  number        = 3,
-  month         = {Mar},
-  pages         = {320–340},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1996)026<0320:asocps>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1996)026<0320:asocps>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         st-laurent_garrett_02,
-  author        = {St. Laurent, Louis and Garrett, Chris},
-  title         = {The Role of Internal Tides in Mixing the Deep Ocean},
-  year          = 2002,
-  volume        = 32,
-  number        = 10,
-  month         = {Oct},
-  pages         = {2882–2899},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(2002)032<2882:troiti>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(2002)032<2882:troiti>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         st-laurent_nash_04,
-  author        = {St. Laurent, Louis C. and Nash, Jonathan D.},
-  title         = {An examination of the radiative and dissipative properties
-                  of deep ocean internal tides},
-  year          = 2004,
-  volume        = 51,
-  number        = {25-26},
-  month         = {Dec},
-  pages         = {3029–3042},
-  issn          = {0967-0645},
-  doi           = {10.1016/j.dsr2.2004.09.008},
-  url           = {http://dx.doi.org/10.1016/j.dsr2.2004.09.008},
-  journal       = {Deep Sea Research Part II: Topical Studies in
-                  Oceanography},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         st-laurent_simmons_ea_02,
-  author        = {St. Laurent, L. C. and Simmons, H. L. and Jayne, S. R.},
-  title         = {Estimating tidally driven mixing in the deep ocean},
-  year          = 2002,
-  volume        = 29,
-  number        = 23,
-  month         = {Dec},
-  pages         = {21–1–21–4},
-  issn          = {0094-8276},
-  doi           = {10.1029/2002gl015633},
-  url           = {http://dx.doi.org/10.1029/2002GL015633},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         stacey_99,
-  author        = {Stacey, Michael W.},
-  title         = {Simulation of the Wind-Forced Near-Surface Circulation in
-                  Knight Inlet: A Parameterization of the Roughness Length},
-  year          = 1999,
-  volume        = 29,
-  number        = 6,
-  month         = {Jun},
-  pages         = {1363–1367},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1999)029<1363:sotwfn>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1999)029<1363:sotwfn>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         steele_morley_ea_01,
-  author        = {Steele, Michael and Morley, Rebecca and Ermold, Wendy},
-  title         = {PHC: A Global Ocean Hydrography with a High-Quality Arctic
-                  Ocean},
-  year          = 2001,
-  volume        = 14,
-  number        = 9,
-  month         = {May},
-  pages         = {2079–2087},
-  issn          = {1520-0442},
-  doi           = {10.1175/1520-0442(2001)014<2079:pagohw>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0442(2001)014<2079:pagohw>2.0.co;2},
-  journal       = {Journal of Climate},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         stein_stein_92,
-  author        = {Stein, Carol A. and Stein, Seth},
-  title         = {A model for the global variation in oceanic depth and heat
-                  flow with lithospheric age},
-  year          = 1992,
-  volume        = 359,
-  number        = 6391,
-  month         = {Sep},
-  pages         = {123–129},
-  issn          = {1476-4687},
-  doi           = {10.1038/359123a0},
-  url           = {http://dx.doi.org/10.1038/359123a0},
-  journal       = {Nature},
-  publisher     = {Springer Nature}
-}
-
-@InCollection{    stokes_47,
-  author        = {G.G. Stokes},
-  title         = {On the theory of oscillatory waves},
-  booktitle     = {Transactions of the Cambridge Philosophy Society},
-  year          = 1847,
-  volume        = 8,
-  pages         = {441--455}
-}
-
-@Article{         takaya_bidlot_ea_10,
-  author        = {Takaya, Yuhei and Bidlot, Jean-Raymond and Beljaars, Anton
-                  C. M. and Janssen, Peter A. E. M.},
-  title         = {Refinements to a prognostic scheme of skin sea surface
-                  temperature},
-  year          = 2010,
-  volume        = 115,
-  number        = {C6},
-  month         = {Jun},
-  pages         = {C06009},
-  issn          = {0148-0227},
-  doi           = {10.1029/2009jc005985},
-  url           = {http://dx.doi.org/10.1029/2009JC005985},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         talagrand_72,
-  author        = {Talagrand, Olivier},
-  title         = {On the Damping of High-Frequency Motions in
-                  Four-Dimensional Assimilation of Meteorological Data},
-  year          = 1972,
-  volume        = 29,
-  number        = 8,
-  month         = {Nov},
-  pages         = {1571–1574},
-  issn          = {1520-0469},
-  doi           = {10.1175/1520-0469(1972)029<1571:otdohf>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0469(1972)029<1571:otdohf>2.0.co;2},
-  journal       = {Journal of the Atmospheric Sciences},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         thiem_berntsen_06,
-  author        = {Thiem, Øyvind and Berntsen, Jarle},
-  title         = {Internal pressure errors in sigma-coordinate ocean models
-                  due to anisotropy},
-  year          = 2006,
-  volume        = 12,
-  number        = {1-2},
-  month         = {Jan},
-  pages         = {140–156},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2005.05.001},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2005.05.001},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         timmermann_goosse_ea_05,
-  author        = {Timmermann, Ralph and Goosse, Hugues and Madec, Gurvan and
-                  Fichefet, Thierry and \'{E}the, Christian and Duli\`{e}re,
-                  Valérie},
-  title         = {On the representation of high latitude processes in the
-                  ORCA-LIM global coupled sea ice–ocean model},
-  year          = 2005,
-  volume        = 8,
-  number        = {1-2},
-  month         = {Jan},
-  pages         = {175–201},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2003.12.009},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2003.12.009},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         tonani_pinardi_ea_08,
-  author        = {Tonani, M. and Pinardi, N. and Dobricic, S. and Pujol, I.
-                  and Fratianni, C.},
-  title         = {A high-resolution free-surface model of the Mediterranean
-                  Sea},
-  year          = 2008,
-  volume        = 4,
-  number        = 1,
-  month         = {Jan},
-  pages         = {1–14},
-  issn          = {1812-0792},
-  doi           = {10.5194/os-4-1-2008},
-  url           = {http://dx.doi.org/10.5194/os-4-1-2008},
-  journal       = {Ocean Science},
-  publisher     = {Copernicus GmbH}
-}
-
-@Article{         treguier_92,
-  author        = {Tr\'{e}guier, A. M.},
-  title         = {Kinetic energy analysis of an eddy resolving, primitive
-                  equation model of the North Atlantic},
-  year          = 1992,
-  volume        = 97,
-  number        = {C1},
-  pages         = {687--701}
-  issn          = {0148-0227},
-  doi           = {10.1029/91jc02350},
-  url           = {http://dx.doi.org/10.1029/91jc02350},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         treguier_barnier_ea_01,
-  author        = {Tr\'{e}guier, A. M. and Barnier, B. and de Miranda, A. P. and
-                  Molines, J. M. and Grima, N. and Imbard, M. and Madec, G.
-                  and Messager, C. and Reynaud, T. and Michel, S.},
-  title         = {An eddy-permitting model of the Atlantic circulation:
-                  Evaluating open boundary conditions},
-  year          = 2001,
-  volume        = 106,
-  number        = {C10},
-  month         = {Oct},
-  pages         = {22115–22129},
-  issn          = {0148-0227},
-  doi           = {10.1029/2000jc000376},
-  url           = {http://dx.doi.org/10.1029/2000jc000376},
-  journal       = {Journal of Geophysical Research: Oceans},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         treguier_boebel_ea_03,
-  author        = {Tr\'{e}guier, A.M and Boebel, O and Barnier, B and Madec, G},
-  title         = {Agulhas eddy fluxes in a 1/6$\circ$ Atlantic model},
-  year          = 2003,
-  volume        = 50,
-  number        = 1,
-  month         = {Jan},
-  pages         = {251–280},
-  issn          = {0967-0645},
-  doi           = {10.1016/s0967-0645(02)00396-x},
-  url           = {http://dx.doi.org/10.1016/s0967-0645(02)00396-x},
-  journal       = {Deep Sea Research Part II: Topical Studies in
-                  Oceanography},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         treguier_dukowicz_ea_96,
-  author        = {Tr\'{e}guier, A. M. and Dukowicz, J. K. and Bryan, K.},
-  title         = {Properties of nonuniform grids used in ocean general
-                  circulation models},
-  year          = 1996,
-  volume        = 101,
-  number        = {C9},
-  month         = {Sep},
-  pages         = {20877–20881},
-  issn          = {0148-0227},
-  doi           = {10.1029/96jc01753},
-  url           = {http://dx.doi.org/10.1029/96jc01753},
-  journal       = {Journal of Geophysical Research: Oceans},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         treguier_england_ea_07,
-  author        = {Tr\'{e}guier, A. M. and England, M. H. and Rintoul, S. R. and
-                  Madec, G. and Le Sommer, J. and Molines, J.-M.},
-  title         = {Southern Ocean overturning across streamlines in an
-                  eddying simulation of the Antarctic Circumpolar Current},
-  year          = 2007,
-  volume        = 3,
-  number        = 4,
-  month         = {Dec},
-  pages         = {491–507},
-  issn          = {1812-0792},
-  doi           = {10.5194/os-3-491-2007},
-  url           = {http://dx.doi.org/10.5194/os-3-491-2007},
-  journal       = {Ocean Science},
-  publisher     = {Copernicus GmbH}
-}
-
-@Article{         treguier_gourcuff_ea_06,
-  author        = {Tr\'{e}guier, Anne Marie and Gourcuff, Claire and Lherminier,
-                  Pascale and Mercier, Herle and Barnier, Bernard and Madec,
-                  Gurvan and Molines, Jean-Marc and Penduff, Thierry and
-                  Czeschel, Lars and B\¨{o}ning, Claus},
-  title         = {Internal and forced variability along a section between
-                  Greenland and Portugal in the CLIPPER Atlantic model},
-  year          = 2006,
-  volume        = 56,
-  number        = {5-6},
-  month         = {May},
-  pages         = {568–580},
-  issn          = {1616-7228},
-  doi           = {10.1007/s10236-006-0069-y},
-  url           = {http://dx.doi.org/10.1007/s10236-006-0069-y},
-  journal       = {Ocean Dynamics},
-  publisher     = {Springer Nature}
-}
-
-@Article{         treguier_held_ea_97,
-  author        = {Tr\'{e}guier, A. M. and Held, I. M. and Larichev, V. D.},
-  title         = {Parameterization of Quasigeostrophic Eddies in Primitive
-                  Equation Ocean Models},
-  year          = 1997,
-  volume        = 27,
-  number        = 4,
-  month         = {Apr},
-  pages         = {567–580},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1997)027<0567:poqeip>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1997)027<0567:poqeip>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         tu_tsuang_05,
-  author        = {Tu, Chia-Ying and Tsuang, Ben-Jei},
-  title         = {Cool-skin simulation by a one-column ocean model},
-  year          = 2005,
-  volume        = 32,
-  number        = 22,
-  month         = {Nov},
-  pages         = {L22602},
-  issn          = {0094-8276},
-  doi           = {10.1029/2005gl024252},
-  url           = {http://dx.doi.org/10.1029/2005GL024252},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         umlauf_burchard_03,
-  author        = {Umlauf, L. and Burchard, H.},
-  title         = {A generic length-scale equation for geophysical turbulence
-                  models},
-  year          = 2003,
-  volume        = 61,
-  number        = 2,
-  month         = {Mar},
-  pages         = {235–265},
-  issn          = {0022-2402},
-  doi           = {10.1357/002224003322005087},
-  url           = {http://dx.doi.org/10.1357/002224003322005087},
-  journal       = {Journal of Marine Research},
-  publisher     = {Journal of Marine Research/Yale}
-}
-
-@Article{         umlauf_burchard_05,
-  author        = {Umlauf, Lars and Burchard, Hans},
-  title         = {Second-order turbulence closure models for geophysical
-                  boundary layers. A review of recent work},
-  year          = 2005,
-  volume        = 25,
-  number        = {7-8},
-  month         = {May},
-  pages         = {795–827},
-  issn          = {0278-4343},
-  doi           = {10.1016/j.csr.2004.08.004},
-  url           = {http://dx.doi.org/10.1016/j.csr.2004.08.004},
-  journal       = {Continental Shelf Research},
-  publisher     = {Elsevier BV}
-}
-
-@TechReport{      oasis_guide,
-  author        = {Valcke, Sophie},
-  year          = {2006},
-  month         = {01},
-  pages         = {78 pp.},
-  title         = {OASIS3 User Guide (prism\_2-5)},
-  volume        = {3},
-  institution   = {PRISM Support Initiative Report No 3, CERFACS, Toulouse,
-                  France},
-  url           = {https://www.cerfacs.fr/oa4web/oasis3/oasis3_UserGuide.pdf}
-}
-
-@TechReport{      valcke_terray_ea_00,
-  author        = {S. Valcke and L. Terray and A. Piacentini },
-  title         = {The OASIS Coupled User Guide Version 2.4},
-  institution   = {CERFACS},
-  year          = 2000,
-  number        = {TR/CMGC/00-10}
-}
-
-@Book{            vallis_06,
-  author        = {Vallis, Geoffrey K.},
-  title         = {Atmospheric and Oceanic Fluid Dynamics},
-  address       = {Cambridge, U.K.},
-  year          = 2006,
-  pages         = 745,
-  doi           = {10.1017/cbo9780511790447},
-  url           = {http://dx.doi.org/10.1017/cbo9780511790447},
-  isbn          = 9780511790447,
-  publisher     = {Cambridge University Press},
-}
-
-@Article{         vancoppenolle_fichefet_ea_09,
-  author        = {Vancoppenolle, Martin and Fichefet, Thierry and Goosse,
-                  Hugues and Bouillon, Sylvain and Madec, Gurvan and Maqueda,
-                  Miguel Angel Morales},
-  title         = {Simulating the mass balance and salinity of Arctic and
-                  Antarctic sea ice. 1. Model description and validation},
-  year          = 2009,
-  volume        = 27,
-  number        = {1-2},
-  month         = {Jan},
-  pages         = {33–53},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2008.10.005},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2008.10.005},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-  author        = {M. Vancoppenolle and T. Fichefet and H. Goosse and S.
-                  Bouillon and G. Madec and M. A. Morales Maqueda},
-  title         = {Simulating the mass balance and salinity of Arctic and
-                  Antarctic sea ice. 1. Model description and validation},
-}
-
-@Article{         vancoppenolle_fichefet_ea_09*1,
-  author        = {Vancoppenolle, Martin and Fichefet, Thierry and Goosse,
-                  Hugues},
-  title         = {Simulating the mass balance and salinity of Arctic and
-                  Antarctic sea ice. 2. Importance of sea ice salinity
-                  variations},
-  year          = 2009,
-  volume        = 27,
-  number        = {1-2},
-  month         = {Jan},
-  pages         = {54–69},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2008.11.003},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2008.11.003},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         vialard_menkes_ea_01,
-  author        = {Vialard, Jérôme and Menkes, Christophe and Boulanger,
-                  Jean-Philippe and Delecluse, Pascale and Guilyardi, Eric
-                  and McPhaden, Michael J. and Madec, Gurvan},
-  title         = {A Model Study of Oceanic Mechanisms Affecting Equatorial
-                  Pacific Sea Surface Temperature during the 1997–98 El
-                  Niño},
-  year          = 2001,
-  volume        = 31,
-  number        = 7,
-  month         = {Jul},
-  pages         = {1649–1675},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(2001)031<1649:amsoom>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(2001)031<1649:amsoom>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         warner_defne_ea_13,
-  author        = {Warner, John C. and Defne, Zafer and Haas, Kevin and
-                  Arango, Hernan G.},
-  title         = {A wetting and drying scheme for ROMS},
-  year          = 2013,
-  volume        = 58,
-  month         = {Aug},
-  pages         = {54–61},
-  issn          = {0098-3004},
-  doi           = {10.1016/j.cageo.2013.05.004},
-  url           = {http://dx.doi.org/10.1016/j.cageo.2013.05.004},
-  journal       = {Computers \& Geosciences},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         warner_sherwood_ea_05,
-  author        = {Warner, John C. and Sherwood, Christopher R. and Arango,
-                  Hernan G. and Signell, Richard P.},
-  title         = {Performance of four turbulence closure models implemented
-                  using a generic length scale method},
-  year          = 2005,
-  volume        = 8,
-  number        = {1-2},
-  month         = {Jan},
-  pages         = {81–113},
-  issn          = {1463-5003},
-  doi           = {10.1016/j.ocemod.2003.12.003},
-  url           = {http://dx.doi.org/10.1016/j.ocemod.2003.12.003},
-  journal       = {Ocean Modelling},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         weatherly_84,
-  author        = {Weatherly, Georges L.},
-  title         = {An estimate of bottom frictional dissipation by Gulf
-                  Stream fluctuations},
-  year          = 1984,
-  volume        = 42,
-  number        = 2,
-  month         = {May},
-  pages         = {289–301},
-  issn          = {1543-9542},
-  doi           = {10.1357/002224084788502729},
-  url           = {http://dx.doi.org/10.1357/002224084788502729},
-  journal       = {Journal of Marine Research},
-  publisher     = {Journal of Marine Research/Yale}
-}
-
-@Article{         weaver_eby_97,
-  author        = {Weaver, Andrew J. and Eby, Michael},
-  title         = {On the Numerical Implementation of Advection Schemes for
-                  Use in Conjunction with Various Mixing Parameterizations in
-                  the GFDL Ocean Model},
-  year          = 1997,
-  volume        = 27,
-  number        = 2,
-  month         = {Feb},
-  pages         = {369–377},
-  issn          = {1520-0485},
-  doi           = {10.1175/1520-0485(1997)027<0369:otnioa>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0485(1997)027<0369:otnioa>2.0.co;2},
-  journal       = {Journal of Physical Oceanography},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         webb_cuevas_ea_98,
-  author        = {Webb, David J. and de Cuevas, Beverly A. and Richmond,
-                  Catherine S.},
-  title         = {Improved Advection Schemes for Ocean Models},
-  year          = 1998,
-  volume        = 15,
-  number        = 5,
-  month         = {Oct},
-  pages         = {1171–1187},
-  issn          = {1520-0426},
-  doi           = {10.1175/1520-0426(1998)015<1171:iasfom>2.0.co;2},
-  url           = {http://dx.doi.org/10.1175/1520-0426(1998)015<1171:iasfom>2.0.co;2},
-  journal       = {Journal of Atmospheric and Oceanic Technology},
-  publisher     = {American Meteorological Society}
-}
-
-@Article{         white_adcroft_ea_09,
-  author        = {White, Laurent and Adcroft, Alistair and Hallberg,
-                  Robert},
-  title         = {High-order regridding–remapping schemes for continuous
-                  isopycnal and generalized coordinates in ocean models},
-  year          = 2009,
-  volume        = 228,
-  number        = 23,
-  month         = {Dec},
-  pages         = {8665–8692},
-  issn          = {0021-9991},
-  doi           = {10.1016/j.jcp.2009.08.016},
-  url           = {http://dx.doi.org/10.1016/j.jcp.2009.08.016},
-  journal       = {Journal of Computational Physics},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         wilcox_88,
-  author        = {Wilcox, David C.},
-  title         = {Reassessment of the scale-determining equation for
-                  advanced turbulence models},
-  year          = 1988,
-  volume        = 26,
-  number        = 11,
-  month         = {Nov},
-  pages         = {1299–1310},
-  issn          = {1533-385X},
-  doi           = {10.2514/3.10041},
-  url           = {http://dx.doi.org/10.2514/3.10041},
-  journal       = {AIAA Journal},
-  publisher     = {American Institute of Aeronautics and Astronautics
-                  (AIAA)}
-}
-
-@Article{         willebrand_barnier_ea_01,
-  author        = {Willebrand, Jürgen and Barnier, Bernard and B\¨{o}ning,
-                  Claus and Dieterich, Christian and Killworth, Peter D and
-                  Le Provost, Christian and Jia, Yanli and Molines, Jean-Marc
-                  and New, Adrian L},
-  title         = {Circulation characteristics in three eddy-permitting
-                  models of the North Atlantic},
-  year          = 2001,
-  volume        = 48,
-  number        = {2-3},
-  month         = {Jan},
-  pages         = {123–161},
-  issn          = {0079-6611},
-  doi           = {10.1016/s0079-6611(01)00003-9},
-  url           = {http://dx.doi.org/10.1016/s0079-6611(01)00003-9},
-  journal       = {Progress in Oceanography},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         williams_guilyardi_ea_06,
-  author        = {Williams, P. D. and Guilyardi, E. and Sutton, R. T. and
-                  Gregory, J. M. and Madec, G.},
-  title         = {On the climate response of the low-latitude Pacific Ocean
-                  to changes in the global freshwater cycle},
-  year          = 2006,
-  volume        = 27,
-  number        = 6,
-  month         = {May},
-  pages         = {593–611},
-  issn          = {1432-0894},
-  doi           = {10.1007/s00382-006-0151-7},
-  url           = {http://dx.doi.org/10.1007/s00382-006-0151-7},
-  journal       = {Climate Dynamics},
-  publisher     = {Springer Nature}
-}
-
-@Article{         williams_guilyardi_ea_07,
-  author        = {Williams, Paul D. and Guilyardi, Eric and Sutton, Rowan
-                  and Gregory, Jonathan and Madec, Gurvan},
-  title         = {A new feedback on climate change from the hydrological
-                  cycle},
-  year          = 2007,
-  volume        = 34,
-  number        = 8,
-  month         = {Apr},
-  pages         = {L08706},
-  issn          = {0094-8276},
-  doi           = {10.1029/2007gl029275},
-  url           = {http://dx.doi.org/10.1029/2007GL029275},
-  journal       = {Geophysical Research Letters},
-  publisher     = {American Geophysical Union (AGU)}
-}
-
-@Article{         williams_guilyardi_ea_10,
-  author        = {Williams, Paul D. and Guilyardi, Eric and Madec, Gurvan
-                  and Gualdi, Silvio and Scoccimarro, Enrico},
-  title         = {The role of mean ocean salinity in climate},
-  year          = 2010,
-  volume        = 49,
-  number        = {2-3},
-  month         = {Apr},
-  pages         = {108–123},
-  issn          = {0377-0265},
-  doi           = {10.1016/j.dynatmoce.2009.02.001},
-  url           = {http://dx.doi.org/10.1016/j.dynatmoce.2009.02.001},
-  journal       = {Dynamics of Atmospheres and Oceans},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         zalesak_79,
-  author        = {Zalesak, Steven T},
-  title         = {Fully multidimensional flux-corrected transport algorithms
-                  for fluids},
-  year          = 1979,
-  volume        = 31,
-  number        = 3,
-  month         = {Jun},
-  pages         = {335–362},
-  issn          = {0021-9991},
-  doi           = {10.1016/0021-9991(79)90051-2},
-  url           = {http://dx.doi.org/10.1016/0021-9991(79)90051-2},
-  journal       = {Journal of Computational Physics},
-  publisher     = {Elsevier BV}
-}
-
-@Article{         zhang_endoh_92,
-  author        = {Zhang, R.-H. and Endoh, M.},
-  title         = {A Free Surface General Circulation Model for the Tropical
-                  Pacific Ocean},
-  year          = 1992,
-  volume        = 97,
-  number        = {C7},
-  pages         = {11237–11255},
-  issn          = {0148-0227},
-  doi           = {10.1029/92jc00911},
-  url           = {http://dx.doi.org/10.1029/92jc00911},
-  journal       = {Journal of Geophysical Research},
-  publisher     = {American Geophysical Union (AGU)}
-}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/NEMO_manual.ist
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/NEMO_manual.ist	(revision 11086)
+++ 	(revision )
@@ -1,3 +1,0 @@
-delim_0 "\\dotfill"
-delim_1 "\\dotfill"
-delim_2 "\\dotfill"
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/NEMO_manual.sty
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/NEMO_manual.sty	(revision 11086)
+++ 	(revision )
@@ -1,163 +1,0 @@
-%% ==============================================================================
-%% NEMO_manual.sty: all customizations (packages, styles, cmds)
-%% ==============================================================================
-
-
-%% LaTeX packages
-%% ==============================================================================
-\usepackage{natbib}           %% bib
-\usepackage{caption}          %% caption
-\usepackage{xcolor}           %% color
-\usepackage{times}            %% font
-\usepackage{hyperref}         %% hyper
-\usepackage{idxlayout}        %% index
-\usepackage{enumitem}         %% list
-\usepackage{minted}           %% listing
-\usepackage{amsmath}          %% maths
-\usepackage{fancyhdr}         %% page
-\usepackage{minitoc}          %% toc
-\usepackage{subfiles}         %% subdocs
-\usepackage[utf8]{inputenc}   %% input encoding
-\usepackage{draftwatermark}   %% watermark
-\usepackage{textcomp}         %% Companion fonts
-
-%% Extensions in bundle package
-\usepackage{amssymb, graphicx, makeidx, tabularx}
-
-%% Configuration
-\captionsetup{margin=10pt, font={small}, labelsep=colon, labelfont={bf}}
-\idxlayout{font=footnotesize, columns=3}
-\renewcommand{\bibfont}{\footnotesize}
-\renewcommand{\bibsep}{3pt}
-
-
-%% Styles
-%% ==============================================================================
-\pagestyle{fancy}
-\bibliographystyle{../../NEMO/main/ametsoc}
-
-%% Additionnal fonts
-\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}
-
-
-%% Page layout
-\fancyhf{}
-\fancyhead[LE,RO]{\bfseries\thepage}
-\fancyhead[LO]{\bfseries\hspace{-0em}\rightmark}
-\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
-\fancyhead[RE]{\bfseries\leftmark}
-\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
-\renewcommand{\headrulewidth}{0.5pt}
-\renewcommand{\footrulewidth}{0pt  }
-\addtolength{\headheight}{2.6pt}
-
-
-%% Catcodes
-\makeatletter
-\def\LigneVerticale{\vrule height 5cm depth 2cm\hspace{0.1cm}\relax}
-\def\LignesVerticales{\let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}
-\def\GrosCarreAvecUnChiffre#1{
-	\rlap{\vrule height 0.8cm width 1cm depth 0.2cm}
-	\rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}}
- 	\vrule height 0pt width 1cm depth 0pt
-}
-\def\@makechapterhead#1{
-	\hbox{
-		\huge\LignesVerticales\hspace{-0.5cm}
-		\GrosCarreAvecUnChiffre{\thechapter}\hspace{0.2cm}
-		\hbox{#1}
-	}
-	\par\vskip
-1cm
-}
-\def\@makeschapterhead#1{
-	\hbox{
-		\huge\LignesVerticales
-		\hbox{#1}
-	}
-	\par\vskip
-2cm
-}
-\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
-  \hbox{}
-  \vspace*{\fill}
-  \vspace{\fill}
-  \thispagestyle{empty}
-  \newpage
-  \if@twocolumn\hbox{}\newpage\fi\fi\fi}
-\def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\quad}}
-\makeatother
-
-
-%% Global custom commands: \newcommand{<name>}[<args>][<first argument value>]{<code>}
-%% ==============================================================================
-
-%% NEMO and Fortran in small capitals
-\newcommand{\NEMO}{\textsc{nemo}}
-\newcommand{\fortran}{\textsc{Fortran}}
-\newcommand{\fninety}{\textsc{Fortran 90}}
-
-%% Common aliases
-\renewcommand{\deg}[1][]{\ensuremath{^{\circ}#1}}
-\newcommand{\zstar }{\ensuremath{z^\star}}
-\newcommand{\sstar }{\ensuremath{s^\star}}
-\newcommand{\ztilde}{\ensuremath{\tilde z}}
-\newcommand{\stilde}{\ensuremath{\tilde s}}
-\newcommand{\ie}{\ensuremath{i.e.}}
-\newcommand{\eg}{\ensuremath{e.g.}}
-
-%% Inline maths
-\newcommand{\fractext}[2]{\textstyle \frac{#1}{#2}}
-\newcommand{\rdt}{\Delta t}
-
-%% Text env. for Gurvan
-\newcommand{\gmcomment}[1]{}
-
-%% Index entries (italic font for files, preformat for code)
-\newcommand{\hf}[1]{\textit{#1.h90}            \index{h90 files!#1}}
-\newcommand{\ifile}[1]{\textit{#1.nc}          \index{Input NetCDF files!#1.nc}}
-\newcommand{\jp}[1]{\texttt{#1}                \index{Model parameters!#1}}
-\newcommand{\key}[1]{\texttt{\textbf{key\_#1}} \index{CPP keys!key\_#1}}
-\newcommand{\mdl}[1]{\textit{#1.F90}           \index{Modules!#1}}
-\newcommand{\ngn}[1]{\texttt{#1}               \index{Namelist Group Names!#1}}
-\newcommand{\np}[1]{\texttt{#1}                \index{Namelist parameters!#1}}
-\newcommand{\rou}[1]{\texttt{#1}               \index{Routines!#1}}
-
-%% Maths
-\newcommand{\lt}{\left}
-\newcommand{\rt}{\right}
-\newcommand{\vect}[1]{\ensuremath{\mathbf{#1}}}
-\newcommand{\pd}[2][]{\ensuremath{\frac{\partial #1}{\partial #2}}}
-
-%% Shortened DOI in bibliography
-\newcommand{\doi}[1]{\href{http://dx.doi.org/#1}{doi:#1}}
-
-%% Namelists inclusion
-\newcommand{\nlst}[1]{\forfile{../../../namelists/#1}}
-
-
-%% Minted package: syntax highlighting configuration
-%% ==============================================================================
-
-%% Global highlighting style
-\setminted{style=emacs, fontsize=\scriptsize, breaklines, frame=leftline}
-\setminted[xml]{style=borland} %% Specific per language
-
-%% Oneliner
-\newmint[forline]{fortran}{}   % \forline|...|
-\newmint[xmlline]{xml}{}       % \xmlline|...|
-\newmint[cmd]{console}{}       % \cmd|...|
-
-%% Multi-lines
-\newminted[forlines]{fortran}{}   % \begin{forlines}
-\newminted[xmllines]{xml}{}       % \begin{xmllines}
-\newminted[cmds]{console}{}       % \begin{cmds}
-\newminted[clines]{c}{}           % \begin{clines}
-
-%% File
-\newmintedfile[forfile]{fortran}{}   % \forfile{../namelists/nam...}
-
-%% Inline
-\newmintinline[forcode]{fortran}{fontsize=auto, frame=lines}   % \forcode{...}
-\newmintinline[xmlcode]{xml}{    fontsize=auto, frame=lines}   % \xmlcode{...}
-\newmintinline[snippet]{console}{fontsize=auto, frame=lines}   % \snippet{...}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/NEMO_manual.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/NEMO_manual.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/NEMO_manual.tex	(revision 11831)
@@ -1,127 +1,1 @@
-%% ==============================================================================
-%% NEMO Reference Manual
-%% ==============================================================================
-
-
-%% Preamble
-%% ==============================================================================
-
-%% Document layout
-\documentclass{book}
-
-%% Custom style (.sty)
-\usepackage{../main/NEMO_manual}
-\hypersetup{
-	pdftitle={NEMO ocean engine}, pdfauthor={Gurvan Madec, and NEMO System Team},
-	colorlinks
-}
-
-%% Include references and index for single subfile compilation
-\newcommand{\biblio}{\bibliography{../main/NEMO_manual}}
-\newcommand{\pindex}{\printindex}
-
-\makeindex
-
-%% End of common preamble between main and sub-files
-\begin{document}
-
-%% Override custom cmds for full manual compilation
-\renewcommand{\biblio}{}
-\renewcommand{\pindex}{}
-
-
-%% Frontmatter
-%% ==============================================================================
-
-\graphicspath{{../../figures/logos/}}
-
-%% Frontpage
-\title{
-  \includegraphics[height=0.05\textheight]{CMCC}\hfill
-  \includegraphics[height=0.05\textheight]{CNRS}\hfill
-  \includegraphics[height=0.05\textheight]{MOI} \hfill
-  \includegraphics[height=0.05\textheight]{UKMO}\hfill
-  \includegraphics[height=0.05\textheight]{NERC}       \\
-  \includegraphics[ width=0.8\textwidth  ]{NEMO_grey}  \\
-  {\Huge NEMO ocean engine}                                     \\
-}
-\author{
-  \Large Gurvan Madec and NEMO System Team
-%  \thanks{
-%
-%  }                                                        \\
-  \textit{Issue 27, Notes du P\^{o}le de mod\'{e}lisation} \\
-  \textit{Institut Pierre-Simon Laplace (IPSL)}            \\
-  \textit{ISSN 1288-1619}
-}
-\date{\today}
-
-\maketitle
-\frontmatter
-
-%% ToC i.e. Table of Contents
-\dominitoc
-\tableofcontents
-
-
-%% Mainmatter
-%% ==============================================================================
-
-\mainmatter
-
-\graphicspath{{../../figures/NEMO/}}
-
-%% Foreword
-\subfile{../subfiles/foreword}
-
-%% Introduction
-\subfile{../subfiles/introduction}
-
-%% Chapters
-\subfile{../subfiles/chap_model_basics}
-\subfile{../subfiles/chap_time_domain}   % Time discretisation (time stepping strategy)
-\subfile{../subfiles/chap_DOM}           % Space discretisation
-\subfile{../subfiles/chap_TRA}           % Tracer advection/diffusion equation
-\subfile{../subfiles/chap_DYN}           % Dynamics : momentum equation
-\subfile{../subfiles/chap_SBC}           % Surface Boundary Conditions
-\subfile{../subfiles/chap_LBC}           % Lateral Boundary Conditions
-\subfile{../subfiles/chap_LDF}           % Lateral diffusion
-\subfile{../subfiles/chap_ZDF}           % Vertical diffusion
-\subfile{../subfiles/chap_DIA}           % Outputs and Diagnostics
-\subfile{../subfiles/chap_OBS}           % Observation operator
-\subfile{../subfiles/chap_ASM}           % Assimilation increments
-\subfile{../subfiles/chap_STO}           % Stochastic param.
-\subfile{../subfiles/chap_misc}          % Miscellaneous topics
-\subfile{../subfiles/chap_CONFIG}        % Predefined configurations
-
-%% Appendix
-\appendix
-\subfile{../subfiles/annex_A}					% Generalised vertical coordinate
-\subfile{../subfiles/annex_B}					% Diffusive operator
-\subfile{../subfiles/annex_C}					% Discrete invariants of the eqs.
-\subfile{../subfiles/annex_iso}				% Isoneutral diffusion using triads
-\subfile{../subfiles/annex_D}					% Coding rules
-
-%% Not included
-%\subfile{../subfiles/chap_conservation}	%
-%\subfile{../subfiles/annex_E}				% Notes on some on going staff
-
-
-%% Backmatter
-%% ==============================================================================
-
-\backmatter
-
-%% Bibliography
-\cleardoublepage
-\phantomsection
-\addcontentsline{toc}{chapter}{Bibliography}
-\bibliography{../main/NEMO_manual}
-
-%% Index
-\cleardoublepage
-\phantomsection
-\addcontentsline{toc}{chapter}{Index}
-\printindex
-
-\end{document}
+link ../../global/document.tex
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/abstract.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/abstract.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/abstract.tex	(revision 11831)
@@ -0,0 +1,27 @@
+%% ================================================================
+%% Abstract
+%% ================================================================
+
+%% Common part between NEMO-SI3-TOP
+\NEMO\ (``Nucleus for European Modelling of the Ocean'') is a framework of ocean-related engines.
+It is intended to be a flexible tool for studying the ocean dynamics and thermodynamics (``blue ocean''),
+as well as its interactions with the components of the Earth climate system over
+a wide range of space and time scales.
+Within \NEMO, the ocean engine is interfaced with a sea-ice model (\SIcube\ or
+\href{http://github.com/CICE-Consortium/CICE}{CICE}),
+passive tracers and biogeochemical models (\TOP) and,
+via the \href{http://portal.enes.org/oasis}{OASIS} coupler,
+with several atmospheric general circulation models.
+It also supports two-way grid embedding by means of the \href{http://agrif.imag.fr}{AGRIF} software.
+
+%% Specific part
+The primitive equation model is adapted to regional and global ocean circulation problems down to
+kilometric scale.
+Prognostic variables are the three-dimensional velocity field, a non-linear sea surface height,
+the \textit{Conservative} Temperature and the \textit{Absolute} Salinity.
+In the horizontal direction, the model uses a curvilinear orthogonal grid and
+in the vertical direction, a full or partial step $z$-coordinate, or $s$-coordinate, or
+a mixture of the two.
+The distribution of variables is a three-dimensional Arakawa C-type grid.
+Various physical choices are available to describe ocean physics,
+so as various HPC functionalities to improve performances.
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/ametsoc.bst
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/ametsoc.bst	(revision 11086)
+++ 	(revision )
@@ -1,1662 +1,0 @@
-%%
-%% This is file `ametsoc7.bst',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% merlin.mbs  (with options: `ay,nat,nm-rev1,ed-rev,jnrlst,nmdash,nmd-3,dt-beg,yr-com,yrp-col,thtit-a,vol-2bf,vnum-sp,volp-com,pgsep-s,num-xser,numser,ser-vol,bkpg-x,pg-bk,pre-edn,agu-doi,doi,edparc,bkedcap,edby,edbyy,blk-tit,in-x,pp,ed,abr,ednx,ord,jabr,eprint,url,url-nt,em-it,nfss,')
-%% ----------------------------------------
-%% *** Bibliography style file for ALL AMS Journals...version 1.0  ***
-%% *** Brian Papa - American Meteorological Society ***
-%% 
-%% Copyright 1994-2004 Patrick W Daly
- % ===============================================================
- % IMPORTANT NOTICE:
- % This bibliographic style (bst) file has been generated from one or
- % more master bibliographic style (mbs) files, listed above.
- %
- % This generated file can be redistributed and/or modified under the terms
- % of the LaTeX Project Public License Distributed from CTAN
- % archives in directory macros/latex/base/lppl.txt; either
- % version 1 of the License, or any later version.
- % ===============================================================
- % Name and version information of the main mbs file:
- % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
- %   For use with BibTeX version 0.99a or later
- %-------------------------------------------------------------------
- % This bibliography style file is intended for texts in ENGLISH
- % This is an author-year citation style bibliography. As such, it is
- % non-standard LaTeX, and requires a special package file to function properly.
- % Such a package is    natbib.sty   by Patrick W. Daly
- % The form of the \bibitem entries is
- %   \bibitem[Jones et al.(1990)]{key}...
- %   \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
- % The essential feature is that the label (the part in brackets) consists
- % of the author names, as they should appear in the citation, with the year
- % in parentheses following. There must be no space before the opening
- % parenthesis!
- % With natbib v5.3, a full list of authors may also follow the year.
- % In natbib.sty, it is possible to define the type of enclosures that is
- % really wanted (brackets or parentheses), but in either case, there must
- % be parentheses in the label.
- % The \cite command functions as follows:
- %   \citet{key} ==>>                Jones et al. (1990)
- %   \citet*{key} ==>>               Jones, Baker, and Smith (1990)
- %   \citep{key} ==>>                (Jones et al., 1990)
- %   \citep*{key} ==>>               (Jones, Baker, and Smith, 1990)
- %   \citep[chap. 2]{key} ==>>       (Jones et al., 1990, chap. 2)
- %   \citep[e.g.][]{key} ==>>        (e.g. Jones et al., 1990)
- %   \citep[e.g.][p. 32]{key} ==>>   (e.g. Jones et al., p. 32)
- %   \citeauthor{key} ==>>           Jones et al.
- %   \citeauthor*{key} ==>>          Jones, Baker, and Smith
- %   \citeyear{key} ==>>             1990
- %---------------------------------------------------------------------
-
-ENTRY
-  { address
-    archive
-    author
-    booktitle
-    chapter
-    doi
-    edition
-    editor
-    eid
-    eprint
-    howpublished
-    department
-    institution
-    journal
-    key
-    month
-    note
-    number
-    organization
-    pages
-    publisher
-    school
-    series
-    title
-    type
-    url
-    volume
-    year
-  }
-  {}
-  { label extra.label sort.label short.list }
-INTEGERS { output.state before.all mid.sentence after.sentence after.block }
-FUNCTION {init.state.consts}
-{ #0 'before.all :=
-  #1 'mid.sentence :=
-  #2 'after.sentence :=
-  #3 'after.block :=
-}
-STRINGS { s t}
-FUNCTION {output.nonnull}
-{ 's :=
-  output.state mid.sentence =
-    { ", " * write$ }
-    { output.state after.block =
-        { add.period$ write$
-          newline$
-          "\newblock " write$
-        }
-        { output.state before.all =
-            'write$
-            { add.period$ " " * write$ }
-          if$
-        }
-      if$
-      mid.sentence 'output.state :=
-    }
-  if$
-  s
-}
-FUNCTION {output}
-{ duplicate$ empty$
-    'pop$
-    'output.nonnull
-  if$
-}
-FUNCTION {output.check}
-{ 't :=
-  duplicate$ empty$
-    { pop$ "empty " t * " in " * cite$ * warning$ }
-    'output.nonnull
-  if$
-}
-FUNCTION {fin.entry}
-{ add.period$
-  write$
-  newline$
-}
-
-FUNCTION {new.block}
-{ output.state before.all =
-    'skip$
-    { after.block 'output.state := }
-  if$
-}
-FUNCTION {new.sentence}
-{ output.state after.block =
-    'skip$
-    { output.state before.all =
-        'skip$
-        { after.sentence 'output.state := }
-      if$
-    }
-  if$
-}
-FUNCTION {add.blank}
-{  " " * before.all 'output.state :=
-}
-
-FUNCTION {date.block}
-{
-  ":" *
-  add.blank
-}
-
-FUNCTION {not}
-{   { #0 }
-    { #1 }
-  if$
-}
-FUNCTION {and}
-{   'skip$
-    { pop$ #0 }
-  if$
-}
-FUNCTION {or}
-{   { pop$ #1 }
-    'skip$
-  if$
-}
-FUNCTION {new.block.checkb}
-{ empty$
-  swap$ empty$
-  and
-    'skip$
-    'new.block
-  if$
-}
-FUNCTION {field.or.null}
-{ duplicate$ empty$
-    { pop$ "" }
-    'skip$
-  if$
-}
-FUNCTION {emphasize}
-{ duplicate$ empty$
-    { pop$ "" }
-    { "\textit{" swap$ * "}" * }
-  if$
-}
-FUNCTION {bolden}
-{ duplicate$ empty$
-    { pop$ "" }
-    { "\textbf{" swap$ * "}" * }
-  if$
-}
-FUNCTION {tie.or.space.prefix}
-{ duplicate$ text.length$ #3 <
-    { "~" }
-    { " " }
-  if$
-  swap$
-}
-
-FUNCTION {capitalize}
-{ "u" change.case$ "t" change.case$ }
-
-FUNCTION {space.word}
-{ " " swap$ * " " * }
- % Here are the language-specific definitions for explicit words.
- % Each function has a name bbl.xxx where xxx is the English word.
- % The language selected here is ENGLISH
-FUNCTION {bbl.and}
-{ "and"}
-
-FUNCTION {bbl.etal}
-{ "et~al." }
-
-FUNCTION {bbl.editors}
-{ "Eds." }
-
-FUNCTION {bbl.editor}
-{ "Ed." }
-
-FUNCTION {bbl.edby}
-{ "edited by" }
-
-FUNCTION {bbl.edition}
-{ "ed." }
-
-FUNCTION {bbl.volume}
-{ "Vol." }
-
-FUNCTION {bbl.of}
-{ "of" }
-
-FUNCTION {bbl.number}
-{ "No." }
-
-FUNCTION {bbl.nr}
-{ "No." }
-
-FUNCTION {bbl.in}
-{ "in" }
-
-FUNCTION {bbl.pages}
-{ "pp." }
-
-FUNCTION {bbl.page}
-{ "p." }
-
-FUNCTION {bbl.chapter}
-{ "chap." }
-
-FUNCTION {bbl.techrep}
-{ "Tech. Rep." }
-
-FUNCTION {bbl.mthesis}
-{ "Master's thesis" }
-
-FUNCTION {bbl.phdthesis}
-{ "Ph.D. thesis" }
-
-FUNCTION {bbl.first}
-{ "1st" }
-
-FUNCTION {bbl.second}
-{ "2d" }
-
-FUNCTION {bbl.third}
-{ "3d" }
-
-FUNCTION {bbl.fourth}
-{ "4th" }
-
-FUNCTION {bbl.fifth}
-{ "5th" }
-
-FUNCTION {bbl.st}
-{ "st" }
-
-FUNCTION {bbl.nd}
-{ "d" }
-
-FUNCTION {bbl.rd}
-{ "d" }
-
-FUNCTION {bbl.th}
-{ "th" }
-
-MACRO {jan} {"Jan."}
-
-MACRO {feb} {"Feb."}
-
-MACRO {mar} {"Mar."}
-
-MACRO {apr} {"Apr."}
-
-MACRO {may} {"May"}
-
-MACRO {jun} {"Jun."}
-
-MACRO {jul} {"Jul."}
-
-MACRO {aug} {"Aug."}
-
-MACRO {sep} {"Sep."}
-
-MACRO {oct} {"Oct."}
-
-MACRO {nov} {"Nov."}
-
-MACRO {dec} {"Dec."}
-
-FUNCTION {eng.ord}
-{ duplicate$ "1" swap$ *
-  #-2 #1 substring$ "1" =
-     { bbl.th * }
-     { duplicate$ #-1 #1 substring$
-       duplicate$ "1" =
-         { pop$ bbl.st * }
-         { duplicate$ "2" =
-             { pop$ bbl.nd * }
-             { "3" =
-                 { bbl.rd * }
-                 { bbl.th * }
-               if$
-             }
-           if$
-          }
-       if$
-     }
-   if$
-}
-
-MACRO {acmcs} {"ACM Comput. Surv."}
-
-MACRO {acta} {"Acta Inf."}
-
-MACRO {cacm} {"Commun. ACM"}
-
-MACRO {ibmjrd} {"IBM J. Res. Dev."}
-
-MACRO {ibmsj} {"IBM Syst.~J."}
-
-MACRO {ieeese} {"IEEE Trans. Software Eng."}
-
-MACRO {ieeetc} {"IEEE Trans. Comput."}
-
-MACRO {ieeetcad}
- {"IEEE Trans. Comput. Aid. Des."}
-
-MACRO {ipl} {"Inf. Process. Lett."}
-
-MACRO {jacm} {"J.~ACM"}
-
-MACRO {jcss} {"J.~Comput. Syst. Sci."}
-
-MACRO {scp} {"Sci. Comput. Program."}
-
-MACRO {sicomp} {"SIAM J. Comput."}
-
-MACRO {tocs} {"ACM Trans. Comput. Syst."}
-
-MACRO {tods} {"ACM Trans. Database Syst."}
-
-MACRO {tog} {"ACM Trans. Graphic."}
-
-MACRO {toms} {"ACM Trans. Math. Software"}
-
-MACRO {toois} {"ACM Trans. Office Inf. Syst."}
-
-MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
-
-MACRO {tcs} {"Theor. Comput. Sci."}
-
-FUNCTION {bibinfo.check}
-{ swap$
-  duplicate$ missing$
-    {
-      pop$ pop$
-      ""
-    }
-    { duplicate$ empty$
-        {
-          swap$ pop$
-        }
-        { swap$
-          pop$
-        }
-      if$
-    }
-  if$
-}
-FUNCTION {bibinfo.warn}
-{ swap$
-  duplicate$ missing$
-    {
-      swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
-      ""
-    }
-    { duplicate$ empty$
-        {
-          swap$ "empty " swap$ * " in " * cite$ * warning$
-        }
-        { swap$
-          pop$
-        }
-      if$
-    }
-  if$
-}
-FUNCTION {format.eprint}
-{ eprint duplicate$ empty$
-    'skip$
-    { "\eprint"
-      archive empty$
-        'skip$
-        { "[" * archive * "]" * }
-      if$
-      "{" * swap$ * "}" *
-    }
-  if$
-}
-STRINGS  { bibinfo}
-INTEGERS { nameptr namesleft numnames }
-
-FUNCTION {format.names}
-{ 'bibinfo :=
-  duplicate$ empty$ 'skip$ {
-  's :=
-  "" 't :=
-  #1 'nameptr :=
-  s num.names$ 'numnames :=
-  numnames 'namesleft :=
-    { namesleft #0 > }
-    { s nameptr
-      duplicate$ #1 >
-        { "{f.~}{vv~}{ll}{, jj}" }
-        { "{vv~}{ll}{, f.}{, jj}" }
-      if$
-      format.name$
-      bibinfo bibinfo.check
-      't :=
-      nameptr #1 >
-        {
-          namesleft #1 >
-            { ", " * t * }
-            {
-              numnames #2 >
-                { "," * }
-                'skip$
-              if$
-              s nameptr "{ll}" format.name$ duplicate$ "others" =
-                { 't := }
-                { pop$ }
-              if$
-              t "others" =
-                {
-                  " " * bbl.etal *
-                }
-                {
-                  bbl.and
-                  space.word * t *
-                }
-              if$
-            }
-          if$
-        }
-        't
-      if$
-      nameptr #1 + 'nameptr :=
-      namesleft #1 - 'namesleft :=
-    }
-  while$
-  } if$
-}
-FUNCTION {format.names.ed}
-{
-  format.names
-}
-FUNCTION {format.key}
-{ empty$
-    { key field.or.null }
-    { "" }
-  if$
-}
-
-FUNCTION {format.authors}
-{ author "author" format.names
-}
-FUNCTION {get.bbl.editor}
-{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
-
-FUNCTION {format.editors}
-{ editor "editor" format.names duplicate$ empty$ 'skip$
-    {
-      "," *
-      " " *
-      get.bbl.editor
-      capitalize
-   "(" swap$ * ")" *
-      *
-    }
-  if$
-}
-FUNCTION {format.book.pages}
-{ pages "pages" bibinfo.check
-  duplicate$ empty$ 'skip$
-    { " " * bbl.pages * }
-  if$
-}
-FUNCTION {format.doi}
-{ doi "doi" bibinfo.check
-  duplicate$ empty$ 'skip$
-    {
-      "\doi{" swap$ * "}" *
-    }
-  if$
-}
-FUNCTION {format.note}
-{
-  url empty$
-    'skip$
-    { "\urlprefix\url{" url * "}" * output }
-  if$
- note empty$
-    { "" }
-    { note #1 #1 substring$
-      duplicate$ "{" =
-        'skip$
-        { output.state mid.sentence =
-          { "l" }
-          { "u" }
-        if$
-        change.case$
-        }
-      if$
-      note #2 global.max$ substring$ * "note" bibinfo.check
-    }
-  if$
-}
-
-FUNCTION {format.title}
-{ title
-  duplicate$ empty$ 'skip$
-    { "t" change.case$ }
-  if$
-  "title" bibinfo.check
-}
-FUNCTION {format.full.names}
-{'s :=
- "" 't :=
-  #1 'nameptr :=
-  s num.names$ 'numnames :=
-  numnames 'namesleft :=
-    { namesleft #0 > }
-    { s nameptr
-      "{vv~}{ll}" format.name$
-      't :=
-      nameptr #1 >
-        {
-          namesleft #1 >
-            { ", " * t * }
-            {
-              s nameptr "{ll}" format.name$ duplicate$ "others" =
-                { 't := }
-                { pop$ }
-              if$
-              t "others" =
-                {
-                  " " * bbl.etal *
-                }
-                {
-                  numnames #2 >
-                    { "," * }
-                    'skip$
-                  if$
-                  bbl.and
-                  space.word * t *
-                }
-              if$
-            }
-          if$
-        }
-        't
-      if$
-      nameptr #1 + 'nameptr :=
-      namesleft #1 - 'namesleft :=
-    }
-  while$
-}
-
-FUNCTION {author.editor.key.full}
-{ author empty$
-    { editor empty$
-        { key empty$
-            { cite$ #1 #3 substring$ }
-            'key
-          if$
-        }
-        { editor format.full.names }
-      if$
-    }
-    { author format.full.names }
-  if$
-}
-
-FUNCTION {author.key.full}
-{ author empty$
-    { key empty$
-         { cite$ #1 #3 substring$ }
-          'key
-      if$
-    }
-    { author format.full.names }
-  if$
-}
-
-FUNCTION {editor.key.full}
-{ editor empty$
-    { key empty$
-         { cite$ #1 #3 substring$ }
-          'key
-      if$
-    }
-    { editor format.full.names }
-  if$
-}
-
-FUNCTION {make.full.names}
-{ type$ "book" =
-  type$ "inbook" =
-  or
-    'author.editor.key.full
-    { type$ "proceedings" =
-        'editor.key.full
-        'author.key.full
-      if$
-    }
-  if$
-}
-
-FUNCTION {output.bibitem}
-{ newline$
-  "\bibitem[{" write$
-  label write$
-  ")" make.full.names duplicate$ short.list =
-     { pop$ }
-     { * }
-   if$
-  "}]{" * write$
-  cite$ write$
-  "}" write$
-  newline$
-  ""
-  before.all 'output.state :=
-}
-
-FUNCTION {if.digit}
-{ duplicate$ "0" =
-  swap$ duplicate$ "1" =
-  swap$ duplicate$ "2" =
-  swap$ duplicate$ "3" =
-  swap$ duplicate$ "4" =
-  swap$ duplicate$ "5" =
-  swap$ duplicate$ "6" =
-  swap$ duplicate$ "7" =
-  swap$ duplicate$ "8" =
-  swap$ "9" = or or or or or or or or or
-}
-FUNCTION {n.separate}
-{ 't :=
-  ""
-  #0 'numnames :=
-  { t empty$ not }
-  { t #-1 #1 substring$ if.digit
-      { numnames #1 + 'numnames := }
-      { #0 'numnames := }
-    if$
-    t #-1 #1 substring$ swap$ *
-    t #-2 global.max$ substring$ 't :=
-    numnames #5 =
-      { duplicate$ #1 #2 substring$ swap$
-        #3 global.max$ substring$
-        "\," swap$ * *
-      }
-      'skip$
-    if$
-  }
-  while$
-}
-FUNCTION {n.dashify}
-{
-  n.separate
-  't :=
-  ""
-    { t empty$ not }
-    { t #1 #1 substring$ "-" =
-        { t #1 #2 substring$ "--" = not
-            { "--" *
-              t #2 global.max$ substring$ 't :=
-            }
-            {   { t #1 #1 substring$ "-" = }
-                { "-" *
-                  t #2 global.max$ substring$ 't :=
-                }
-              while$
-            }
-          if$
-        }
-        { t #1 #1 substring$ *
-          t #2 global.max$ substring$ 't :=
-        }
-      if$
-    }
-  while$
-}
-
-FUNCTION {word.in}
-{ "" }
-
-FUNCTION {format.date}
-{ year "year" bibinfo.check duplicate$ empty$
-    {
-      "empty year in " cite$ * "; set to ????" * warning$
-       pop$ "????"
-    }
-    'skip$
-  if$
-  extra.label *
-  before.all 'output.state :=
-  ", " swap$ *
-}
-FUNCTION {format.btitle}
-{ title "title" bibinfo.check
-  duplicate$ empty$ 'skip$
-    {
-      emphasize
-    }
-  if$
-}
-FUNCTION {either.or.check}
-{ empty$
-    'pop$
-    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
-  if$
-}
-FUNCTION {format.bvolume}
-{ volume empty$
-    { "" }
-    { bbl.volume volume tie.or.space.prefix
-      "volume" bibinfo.check * *
-      series "series" bibinfo.check
-      duplicate$ empty$ 'pop$
-%%% NO ITALIC SERIES        { emphasize ", " * swap$ * }
-      {", " * swap$ * }
-      if$
-      "volume and number" number either.or.check
-    }
-  if$
-}
-FUNCTION {format.number.series}
-{ volume empty$
-    { number empty$
-        { series field.or.null }
-        { series empty$
-            { number "number" bibinfo.check }
-            { output.state mid.sentence =
-                { bbl.number }
-                { bbl.number capitalize }
-              if$
-              number tie.or.space.prefix "number" bibinfo.check * *
-              bbl.in space.word *
-              series "series" bibinfo.check *
-            }
-          if$
-        }
-      if$
-    }
-    { "" }
-  if$
-}
-FUNCTION {is.num}
-{ chr.to.int$
-  duplicate$ "0" chr.to.int$ < not
-  swap$ "9" chr.to.int$ > not and
-}
-
-FUNCTION {extract.num}
-{ duplicate$ 't :=
-  "" 's :=
-  { t empty$ not }
-  { t #1 #1 substring$
-    t #2 global.max$ substring$ 't :=
-    duplicate$ is.num
-      { s swap$ * 's := }
-      { pop$ "" 't := }
-    if$
-  }
-  while$
-  s empty$
-    'skip$
-    { pop$ s }
-  if$
-}
-
-FUNCTION {convert.edition}
-{ extract.num "l" change.case$ 's :=
-  s "first" = s "1" = or
-    { bbl.first 't := }
-    { s "second" = s "2" = or
-        { bbl.second 't := }
-        { s "third" = s "3" = or
-            { bbl.third 't := }
-            { s "fourth" = s "4" = or
-                { bbl.fourth 't := }
-                { s "fifth" = s "5" = or
-                    { bbl.fifth 't := }
-                    { s #1 #1 substring$ is.num
-                        { s eng.ord 't := }
-                        { edition 't := }
-                      if$
-                    }
-                  if$
-                }
-              if$
-            }
-          if$
-        }
-      if$
-    }
-  if$
-  t
-}
-
-FUNCTION {format.edition}
-{ edition duplicate$ empty$ 'skip$
-    {
-      convert.edition
-      output.state mid.sentence =
-        { "l" }
-        { "t" }
-      if$ change.case$
-      "edition" bibinfo.check
-      " " * bbl.edition *
-    }
-  if$
-}
-INTEGERS { multiresult }
-FUNCTION {multi.page.check}
-{ 't :=
-  #0 'multiresult :=
-    { multiresult not
-      t empty$ not
-      and
-    }
-    { t #1 #1 substring$
-      duplicate$ "-" =
-      swap$ duplicate$ "," =
-      swap$ "+" =
-      or or
-        { #1 'multiresult := }
-        { t #2 global.max$ substring$ 't := }
-      if$
-    }
-  while$
-  multiresult
-}
-FUNCTION {format.pages}
-{ pages duplicate$ empty$ 'skip$
-    { duplicate$ multi.page.check
-        {
-          n.dashify
-        }
-        {
-        }
-      if$
-      "pages" bibinfo.check
-    }
-  if$
-}
-FUNCTION {format.journal.pages}
-{ pages duplicate$ empty$ 'pop$
-    { swap$ duplicate$ empty$
-        { pop$ pop$ format.pages }
-        {
-          ", " *
-          swap$
-          n.dashify
-          "pages" bibinfo.check
-          *
-        }
-      if$
-    }
-  if$
-}
-FUNCTION {format.journal.eid}
-{ eid "eid" bibinfo.check
-  duplicate$ empty$ 'pop$
-    { swap$ duplicate$ empty$ 'skip$
-      {
-          ", " *
-      }
-      if$
-      swap$ *
-    }
-  if$
-}
-FUNCTION {format.vol.num.pages}
-{ volume field.or.null
-  duplicate$ empty$ 'skip$
-    {
-      "volume" bibinfo.check
-    }
-  if$
-  number "number" bibinfo.check duplicate$ empty$ 'skip$
-    {
-      swap$ duplicate$ empty$
-        { "there's a number but no volume in " cite$ * warning$ }
-        'skip$
-      if$
-      swap$
-      "~(" swap$ * ")" *
-    }
-  if$ *
-  bolden
-  eid empty$
-    { format.journal.pages }
-    { format.journal.eid }
-  if$
-}
-
-FUNCTION {format.chapter.pages}
-{ chapter empty$
-    'format.pages
-    { type empty$
-        { bbl.chapter }
-        { type "l" change.case$
-          "type" bibinfo.check
-        }
-      if$
-      chapter tie.or.space.prefix
-      "chapter" bibinfo.check
-      * *
-      pages empty$
-        'skip$
-        { ", " * format.pages * }
-      if$
-    }
-  if$
-}
-
-FUNCTION {format.booktitle}
-{
-  booktitle "booktitle" bibinfo.check
-  emphasize
-}
-FUNCTION {format.in.ed.booktitle}
-{ format.booktitle duplicate$ empty$ 'skip$
-    {
-      editor "editor" format.names.ed duplicate$ empty$ 'pop$
-        {
-          get.bbl.editor
-          swap$ "," *
-          " " * swap$ *
-          swap$
-          "," *
-          " " * swap$
-          * }
-      if$
-      word.in swap$ *
-    }
-  if$
-}
-FUNCTION {format.thesis.type}
-{ type duplicate$ empty$
-    'pop$
-    { swap$ pop$
-      "t" change.case$ "type" bibinfo.check
-    }
-  if$
-}
-FUNCTION {format.tr.number}
-{ number "number" bibinfo.check
-  type duplicate$ empty$
-    { pop$ bbl.techrep }
-    'skip$
-  if$
-  "type" bibinfo.check
-  swap$ duplicate$ empty$
-    { pop$ "t" change.case$ }
-    { tie.or.space.prefix * * }
-  if$
-}
-FUNCTION {format.article.crossref}
-{
-  word.in
-  " \cite{" * crossref * "}" *
-}
-FUNCTION {format.book.crossref}
-{ volume duplicate$ empty$
-    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
-      pop$ word.in
-    }
-    { bbl.volume
-      capitalize
-      swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
-    }
-  if$
-  " \cite{" * crossref * "}" *
-}
-FUNCTION {format.incoll.inproc.crossref}
-{
-  word.in
-  " \cite{" * crossref * "}" *
-}
-FUNCTION {format.org.or.pub}
-{ 't :=
-  ""
-  address empty$ t empty$ and
-    'skip$
-    {
-      t empty$
-        { address "address" bibinfo.check *
-        }
-        { t *
-          address empty$
-            'skip$
-            { ", " * address "address" bibinfo.check * }
-          if$
-        }
-      if$
-    }
-  if$
-}
-FUNCTION {format.publisher.address}
-{ publisher "publisher" bibinfo.warn format.org.or.pub
-}
-
-FUNCTION {format.organization.address}
-{ organization "organization" bibinfo.check format.org.or.pub
-}
-
-STRINGS {oldname}
-
-FUNCTION {name.or.dash}
-{ 's :=
-   oldname empty$
-     { s 'oldname := s }
-     { s oldname =
-         { "---{}---{}---" }
-         { s 'oldname := s }
-       if$
-     }
-   if$
-}
-
-FUNCTION {article}
-{ output.bibitem
-  format.authors "author" output.check
-  author format.key output
-  name.or.dash
-  format.date "year" output.check
-  date.block
-  format.title "title" output.check
-  new.sentence
-  crossref missing$
-    {
-      journal
-      "journal" bibinfo.check
-      emphasize
-      "journal" output.check
-      format.vol.num.pages output
-  format.doi output
-    }
-    { format.article.crossref output.nonnull
-      format.pages output
-    }
-  if$
-  format.note output
-  format.eprint output
-  fin.entry
-}
-FUNCTION {book}
-{ output.bibitem
-  author empty$
-    { format.editors "author and editor" output.check
-      editor format.key output
-      add.blank
-      name.or.dash
-    }
-    { format.authors output.nonnull
-      name.or.dash
-      crossref missing$
-        { "author and editor" editor either.or.check }
-        'skip$
-      if$
-    }
-  if$
-  format.date "year" output.check
-  date.block
-  format.btitle "title" output.check
-  crossref missing$
-    { format.bvolume output
-  new.sentence
-      format.edition output
-      format.number.series output
-      format.publisher.address output
-    }
-    {
-  new.sentence
-      format.book.crossref output.nonnull
-    }
-  if$
-  format.book.pages output
-  format.doi output
-  format.note output
-  format.eprint output
-  fin.entry
-}
-FUNCTION {booklet}
-{ output.bibitem
-  format.authors output
-  author format.key output
-  name.or.dash
-  format.date "year" output.check
-  date.block
-  format.title "title" output.check
-  new.sentence
-  howpublished "howpublished" bibinfo.check output
-  address "address" bibinfo.check output
-  format.book.pages output
-  format.doi output
-  format.note output
-  format.eprint output
-  fin.entry
-}
-
-FUNCTION {inbook}
-{ output.bibitem
-  author empty$
-    { format.editors "author and editor" output.check
-      editor format.key output
-      name.or.dash
-    }
-    { format.authors output.nonnull
-      name.or.dash
-      crossref missing$
-        { "author and editor" editor either.or.check }
-        'skip$
-      if$
-    }
-  if$
-  format.date "year" output.check
-  date.block
-  format.btitle "title" output.check
-  crossref missing$
-    {
-      format.bvolume output
-      format.chapter.pages "chapter and pages" output.check
-  new.sentence
-      format.edition output
-      format.number.series output
-      format.publisher.address output
-    }
-    {
-      format.chapter.pages "chapter and pages" output.check
-  new.sentence
-      format.book.crossref output.nonnull
-    }
-  if$
-  format.doi output
-  format.note output
-  format.eprint output
-  fin.entry
-}
-
-FUNCTION {incollection}
-{ output.bibitem
-  format.authors "author" output.check
-  author format.key output
-  name.or.dash
-  format.date "year" output.check
-  date.block
-  format.title "title" output.check
-  new.sentence
-  crossref missing$
-    { format.in.ed.booktitle "booktitle" output.check
-      format.publisher.address output      
-      format.bvolume output
-      format.number.series output
-      format.edition output
-      format.chapter.pages output
-    }
-    { format.incoll.inproc.crossref output.nonnull
-      format.chapter.pages output
-    }
-  if$
-  format.doi output
-  format.note output
-  format.eprint output
-  fin.entry
-}
-FUNCTION {inproceedings}
-{ output.bibitem
-  format.authors "author" output.check
-  author format.key output
-  name.or.dash
-  format.date "year" output.check
-  date.block
-  format.title "title" output.check
-  new.sentence
-  crossref missing$
-    { format.in.ed.booktitle "booktitle" output.check
-      publisher empty$
-        { format.organization.address output }
-        { organization "organization" bibinfo.check output
-          format.publisher.address output
-        }
-      if$
-      format.bvolume output
-      format.pages output
-      format.number.series output
-      howpublished "howpublished" bibinfo.check output
-    }
-    { format.incoll.inproc.crossref output.nonnull
-      format.pages output
-    }
-  if$
-  format.doi output
-  format.note output
-  format.eprint output
-  fin.entry
-}
-FUNCTION {conference} { inproceedings }
-FUNCTION {manual}
-{ output.bibitem
-  format.authors output
-  author format.key output
-  name.or.dash
-  format.date "year" output.check
-  date.block
-  format.btitle "title" output.check
-  new.sentence
-  organization "organization" bibinfo.check output
-  address "address" bibinfo.check output
-  format.edition output
-  format.doi output
-  format.note output
-  format.eprint output
-  fin.entry
-}
-
-FUNCTION {mastersthesis}
-{ output.bibitem
-  format.authors "author" output.check
-  author format.key output
-  name.or.dash
-  format.date "year" output.check
-  date.block
-  format.title
-  "title" output.check
-  new.sentence
-  bbl.mthesis format.thesis.type output.nonnull
-  department "department" bibinfo.warn output
-  school "school" bibinfo.warn output
-  address "address" bibinfo.check output
-  format.doi output
-  format.note output
-  format.eprint output
-  fin.entry
-}
-
-FUNCTION {misc}
-{ output.bibitem
-  format.authors output
-  author format.key output
-  name.or.dash
-  format.date "year" output.check
-  date.block
-  format.title output
-  new.sentence
-  howpublished "howpublished" bibinfo.check output
-  format.doi output
-  format.note output
-  format.eprint output
-  fin.entry
-}
-FUNCTION {phdthesis}
-{ output.bibitem
-  format.authors "author" output.check
-  author format.key output
-  name.or.dash
-  format.date "year" output.check
-  date.block
-  format.title
-  "title" output.check
-  new.sentence
-  bbl.phdthesis format.thesis.type output.nonnull
-  school "school" bibinfo.warn output
-  address "address" bibinfo.check output
-  format.doi output
-  format.note output
-  format.eprint output
-  fin.entry
-}
-
-FUNCTION {proceedings}
-{ output.bibitem
-  format.editors output
-  editor format.key output
-  name.or.dash
-  format.date "year" output.check
-  date.block
-  format.btitle "title" output.check
-  format.bvolume output
-  format.number.series output
-  publisher empty$
-    { format.organization.address output }
-    { organization "organization" bibinfo.check output
-      format.publisher.address output
-    }
-  if$
-  format.doi output
-  format.note output
-  format.eprint output
-  fin.entry
-}
-
-FUNCTION {techreport}
-{ output.bibitem
-  format.authors "author" output.check
-  author format.key output
-  name.or.dash
-  format.date "year" output.check
-  date.block
-  format.title
-  "title" output.check
-  new.sentence
-  format.tr.number output.nonnull
-  institution "institution" bibinfo.warn output
-  address "address" bibinfo.check output
-  format.doi output
-  format.note output
-  format.eprint output
-  fin.entry
-}
-
-FUNCTION {unpublished}
-{ output.bibitem
-  format.authors "author" output.check
-  author format.key output
-  name.or.dash
-  format.date "year" output.check
-  date.block
-  format.title "title" output.check
-  format.doi output
-  format.note "note" output.check
-  format.eprint output
-  fin.entry
-}
-
-FUNCTION {default.type} { misc }
-READ
-FUNCTION {sortify}
-{ purify$
-  "l" change.case$
-}
-INTEGERS { len }
-FUNCTION {chop.word}
-{ 's :=
-  'len :=
-  s #1 len substring$ =
-    { s len #1 + global.max$ substring$ }
-    's
-  if$
-}
-FUNCTION {format.lab.names}
-{ 's :=
-  "" 't :=
-  s #1 "{vv~}{ll}" format.name$
-  s num.names$ duplicate$
-  #2 >
-    { pop$
-      " " * bbl.etal *
-    }
-    { #2 <
-        'skip$
-        { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
-            {
-              " " * bbl.etal *
-            }
-            { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
-              * }
-          if$
-        }
-      if$
-    }
-  if$
-}
-
-FUNCTION {author.key.label}
-{ author empty$
-    { key empty$
-        { cite$ #1 #3 substring$ }
-        'key
-      if$
-    }
-    { author format.lab.names }
-  if$
-}
-
-FUNCTION {author.editor.key.label}
-{ author empty$
-    { editor empty$
-        { key empty$
-            { cite$ #1 #3 substring$ }
-            'key
-          if$
-        }
-        { editor format.lab.names }
-      if$
-    }
-    { author format.lab.names }
-  if$
-}
-
-FUNCTION {editor.key.label}
-{ editor empty$
-    { key empty$
-        { cite$ #1 #3 substring$ }
-        'key
-      if$
-    }
-    { editor format.lab.names }
-  if$
-}
-
-FUNCTION {calc.short.authors}
-{ type$ "book" =
-  type$ "inbook" =
-  or
-    'author.editor.key.label
-    { type$ "proceedings" =
-        'editor.key.label
-        'author.key.label
-      if$
-    }
-  if$
-  'short.list :=
-}
-
-FUNCTION {calc.label}
-{ calc.short.authors
-  short.list
-  "("
-  *
-  year duplicate$ empty$
-     { pop$ "????" }
-     { purify$ #-1 #4 substring$ }
-  if$
-  *
-  'label :=
-}
-
-FUNCTION {sort.format.names}
-{ 's :=
-  #1 'nameptr :=
-  ""
-  s num.names$ 'numnames :=
-  numnames 'namesleft :=
-    { namesleft #0 > }
-    { s nameptr
-      "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}"
-      format.name$ 't :=
-      nameptr #1 >
-        {
-          "   "  *
-          namesleft #1 = t "others" = and
-            { "zzzzz" * }
-            { t sortify * }
-          if$
-        }
-        { t sortify * }
-      if$
-      nameptr #1 + 'nameptr :=
-      namesleft #1 - 'namesleft :=
-    }
-  while$
-}
-
-FUNCTION {sort.format.title}
-{ 't :=
-  "A " #2
-    "An " #3
-      "The " #4 t chop.word
-    chop.word
-  chop.word
-  sortify
-  #1 global.max$ substring$
-}
-FUNCTION {author.sort}
-{ author empty$
-    { key empty$
-        { "to sort, need author or key in " cite$ * warning$
-          ""
-        }
-        { key sortify }
-      if$
-    }
-    { author sort.format.names }
-  if$
-}
-FUNCTION {author.editor.sort}
-{ author empty$
-    { editor empty$
-        { key empty$
-            { "to sort, need author, editor, or key in " cite$ * warning$
-              ""
-            }
-            { key sortify }
-          if$
-        }
-        { editor sort.format.names }
-      if$
-    }
-    { author sort.format.names }
-  if$
-}
-FUNCTION {editor.sort}
-{ editor empty$
-    { key empty$
-        { "to sort, need editor or key in " cite$ * warning$
-          ""
-        }
-        { key sortify }
-      if$
-    }
-    { editor sort.format.names }
-  if$
-}
-FUNCTION {presort}
-{ calc.label
-  label sortify
-  "    "
-  *
-  type$ "book" =
-  type$ "inbook" =
-  or
-    'author.editor.sort
-    { type$ "proceedings" =
-        'editor.sort
-        'author.sort
-      if$
-    }
-  if$
-  #1 entry.max$ substring$
-  'sort.label :=
-  sort.label
-  *
-  "    "
-  *
-  title field.or.null
-  sort.format.title
-  *
-  #1 entry.max$ substring$
-  'sort.key$ :=
-}
-
-ITERATE {presort}
-SORT
-STRINGS { last.label next.extra }
-INTEGERS { last.extra.num number.label }
-FUNCTION {initialize.extra.label.stuff}
-{ #0 int.to.chr$ 'last.label :=
-  "" 'next.extra :=
-  #0 'last.extra.num :=
-  #0 'number.label :=
-}
-FUNCTION {forward.pass}
-{ last.label label =
-    { last.extra.num #1 + 'last.extra.num :=
-      last.extra.num int.to.chr$ 'extra.label :=
-    }
-    { "a" chr.to.int$ 'last.extra.num :=
-      "" 'extra.label :=
-      label 'last.label :=
-    }
-  if$
-  number.label #1 + 'number.label :=
-}
-FUNCTION {reverse.pass}
-{ next.extra "b" =
-    { "a" 'extra.label := }
-    'skip$
-  if$
-  extra.label 'next.extra :=
-  extra.label
-  duplicate$ empty$
-    'skip$
-    { "{\natexlab{" swap$ * "}}" * }
-  if$
-  'extra.label :=
-  label extra.label * 'label :=
-}
-EXECUTE {initialize.extra.label.stuff}
-ITERATE {forward.pass}
-REVERSE {reverse.pass}
-FUNCTION {bib.sort.order}
-{ sort.label
-  "    "
-  *
-  year field.or.null sortify
-  *
-  "    "
-  *
-  title field.or.null
-  sort.format.title
-  *
-  #1 entry.max$ substring$
-  'sort.key$ :=
-}
-ITERATE {bib.sort.order}
-SORT
-FUNCTION {begin.bib}
-{ preamble$ empty$
-    'skip$
-    { preamble$ write$ newline$ }
-  if$
-  "\begin{thebibliography}{" number.label int.to.str$ * "}" *
-  write$ newline$
-  "\providecommand{\natexlab}[1]{#1}"
-  write$ newline$
-  "\providecommand{\url}[1]{\texttt{#1}}"
-  write$ newline$
-  "\providecommand{\urlprefix}{URL }"
-  write$ newline$
-  "\expandafter\ifx\csname urlstyle\endcsname\relax"
-  write$ newline$
-  "  \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
-  write$ newline$
-  "  \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
-  write$ newline$
-  "\providecommand{\eprint}[2][]{\url{#2}}"
-  write$ newline$
-}
-EXECUTE {begin.bib}
-EXECUTE {init.state.consts}
-ITERATE {call.type$}
-FUNCTION {end.bib}
-{ newline$
-  "\end{thebibliography}" write$ newline$
-}
-EXECUTE {end.bib}
-%% End of customized bst file
-%%
-%% End of file `ametsoc7.bst'.
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/appendices.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/appendices.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/appendices.tex	(revision 11831)
@@ -0,0 +1,12 @@
+
+\subfile{../subfiles/apdx_s_coord}      %% A. Generalised vertical coordinate
+\subfile{../subfiles/apdx_diff_opers}   %% B. Diffusive operators
+\subfile{../subfiles/apdx_invariants}   %% C. Discrete invariants of the eqs.
+\subfile{../subfiles/apdx_triads}       %% D. Isoneutral diffusion using triads
+\subfile{../subfiles/apdx_DOMAINcfg}    %% E. Brief notes on DOMAINcfg
+
+%% Not included
+%\subfile{../subfiles/chap_model_basics_zstar}
+%\subfile{../subfiles/chap_DIU}
+%\subfile{../subfiles/chap_conservation}
+%\subfile{../subfiles/apdx_algos}   %% Notes on some on going staff
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/authors.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/authors.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/authors.tex	(revision 11831)
@@ -0,0 +1,50 @@
+%Romain Bourdall\'{e}-Badie
+%\orcid{0000-0002-8742-3289} \\
+%Mike Bell                   \\
+%J\'{e}r\^{o}me Chanut       \\
+%Emanuela Clementi
+%\orcid{0000-0002-5752-1849} \\
+%Andrew Coward
+%\orcid{0000-0002-0456-129X} \\
+%Massimiliano Drudi
+%\orcid{0000-0002-9951-740X} \\
+%Christian \'{E}th\'{e}      \\
+%Doroteaciro Iovino
+%\orcid{0000-0001-5132-7255} \\
+%Dan Lea                     \\
+%Claire L\'{e}vy
+%\orcid{0000-0003-2518-6692} \\
+%Gurvan Madec
+%\orcid{0000-0002-6447-4198} \\
+%Nicolas Martin              \\
+%S\'{e}bastien Masson
+%\orcid{0000-0002-1694-8117} \\
+%Pierre Mathiot              \\
+%Silvia Mocavero
+%\orcid{0000-0002-6309-8282} \\
+%Simon M\"{u}ller            \\
+%George Nurser               \\
+%Guillaume Samson
+%\orcid{0000-0001-7481-6369} \\
+%Dave Storkey
+
+\orcid{0000-0002-8742-3289} Romain Bourdall\'{e}-Badie  \\
+                            Mike Bell                   \\
+                            J\'{e}r\^{o}me Chanut       \\
+\orcid{0000-0002-5752-1849} Emanuela Clementi           \\
+\orcid{0000-0002-0456-129X} Andrew Coward               \\
+\orcid{0000-0002-9951-740X} Massimiliano Drudi          \\
+                            Christian \'{E}th\'{e}      \\
+\orcid{0000-0001-5132-7255} Doroteaciro Iovino          \\
+                            Dan Lea                     \\
+\orcid{0000-0003-2518-6692} Claire L\'{e}vy             \\
+\orcid{0000-0002-6447-4198} Gurvan Madec                \\
+                            Nicolas Martin              \\
+\orcid{0000-0002-1694-8117} S\'{e}bastien Masson        \\
+                            Pierre Mathiot              \\
+\orcid{0000-0002-6309-8282} Silvia Mocavero             \\
+                            Simon M\"{u}ller            \\
+                            George Nurser               \\
+\orcid{0000-0001-7481-6369} Guillaume Samson            \\
+                            Dave Storkey                \\
+%% Don't forget the last break for the right alignment
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/bibliography.bib
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/bibliography.bib	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/bibliography.bib	(revision 11831)
@@ -0,0 +1,3135 @@
+
+@article{         adcroft.campin_OM04,
+  title         = "Rescaled height coordinates for accurate representation of
+                  free-surface flows in ocean circulation models",
+  pages         = "269--284",
+  journal       = "Ocean Modelling",
+  volume        = "7",
+  number        = "3-4",
+  author        = "A. Adcroft and J.-M. Campin",
+  year          = "2004",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2003.09.003"
+}
+
+@article{         arakawa.hsu_MWR90,
+  title         = "Energy Conserving and Potential-Enstrophy Dissipating
+                  Schemes for the Shallow Water Equations",
+  pages         = "1960--1969",
+  journal       = "Monthly Weather Review",
+  volume        = "118",
+  number        = "10",
+  author        = "A. Arakawa and Y.-J. G. Hsu",
+  year          = "1990",
+  month         = "oct",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0493",
+  doi           = "10.1175/1520-0493(1990)118<1960:ecaped>2.0.co;2"
+}
+
+@article{         arakawa.lamb_MWR81,
+  title         = "A Potential Enstrophy and Energy Conserving Scheme for the
+                  Shallow Water Equations",
+  pages         = "18--36",
+  journal       = "Monthly Weather Review",
+  volume        = "109",
+  number        = "1",
+  author        = "A. Arakawa and V. R. Lamb",
+  year          = "1981",
+  month         = "jan",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0493",
+  doi           = "10.1175/1520-0493(1981)109<0018:apeaec>2.0.co;2"
+}
+
+@article{         arakawa_JCP66,
+  title         = "Computational design for long-term numerical integration
+                  of the equations of fluid motion: Two-dimensional
+                  incompressible flow. Part {I}",
+  pages         = "119--143",
+  journal       = "Journal of Computational Physics",
+  volume        = "1",
+  number        = "1",
+  author        = "A. Arakawa",
+  year          = "1966",
+  month         = "Aug",
+  publisher     = "Elsevier BV",
+  issn          = "0021-9991",
+  doi           = "10.1016/0021-9991(66)90015-5"
+}
+
+@article{         arbic.garner.ea_DSR04,
+  title         = "The accuracy of surface elevations in forward global
+                  barotropic and baroclinic tide models",
+  pages         = "3069--3101",
+  journal       = "Deep Sea Research",
+  volume        = "51",
+  number        = "25-26",
+  author        = "B. K. Arbic and S. T. Garner and R. W. Hallberg and H. L.
+                  Simmons",
+  year          = "2004",
+  month         = "dec",
+  publisher     = "Elsevier BV",
+  issn          = "0967-0645",
+  doi           = "10.1016/j.dsr2.2004.09.014"
+}
+
+@article{         artale.iudicone.ea_JGR02,
+  title         = "Role of surface fluxes in Ocean General Circulation Models
+                  using satellite sea surface temperature: Validation of and
+                  sensitivity to the forcing frequency of the Mediterranean
+                  thermohaline circulation",
+  pages         = "2901--2924",
+  journal       = "Journal of Geophysical Research",
+  volume        = "107",
+  number        = "C8",
+  author        = "V. Artale and D. Iudicone and R. Santoleri and V. Rupolo
+                  and S. Marullo and F. {D'O}rtenzio",
+  year          = "2002",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/2000jc000452"
+}
+
+@article{         asselin_MWR72,
+  title         = "Frequency Filter for Time Integrations",
+  pages         = "487--490",
+  journal       = "Monthly Weather Review",
+  volume        = "100",
+  number        = "6",
+  author        = "R. Asselin",
+  year          = "1972",
+  month         = "jun",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0493",
+  doi           = "10.1175/1520-0493(1972)100<0487:fffti>2.3.co;2"
+}
+
+@article{         axell_JGR02,
+  title         = "Wind-driven internal waves and Langmuir circulations in a
+                  numerical ocean model of the southern Baltic Sea",
+  journal       = "Journal of Geophysical Research",
+  volume        = "107",
+  number        = "C11",
+  author        = "L. B. Axell",
+  year          = "2002",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/2001jc000922"
+}
+
+@article{         barnier.madec.ea_OD06,
+  title         = "Impact of partial steps and momentum advection schemes in
+                  a global ocean circulation model at eddy-permitting
+                  resolution",
+  pages         = "543--567",
+  journal       = "Ocean Dynamics",
+  volume        = "56",
+  number        = "5-6",
+  author        = "B. Barnier and G. Madec and T. Penduff and J.-M. Molines
+                  and A.-M. Tr\'{e}guier and J. {Le Sommer} and A. Beckmann
+                  and A. Biastoch and C. B{\"{o}}ning and J. Dengg and C.
+                  Derval and E. Durand and S. Gulev and E. Remy and C.
+                  Talandier and S. Theetten and M. Maltrud and J. McClean and
+                  B. {de Cuevas}",
+  year          = "2006",
+  month         = "jun",
+  publisher     = "Springer Nature",
+  issn          = "1616-7228",
+  doi           = "10.1007/s10236-006-0082-1"
+}
+
+@article{         beckmann.doscher_JPO97,
+  title         = "A method for improved representation of dense water
+                  spreading over topography in geopotential-coordinate
+                  models",
+  pages         = "581--591",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "27",
+  number        = "4",
+  author        = "A. Beckmann and R. D{\"{o}}scher",
+  year          = "1997",
+  month         = "apr",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1997)027<0581:amfiro>2.0.co;2"
+}
+
+@article{         beckmann.goosse_OM03,
+  title         = "A parameterization of ice shelf-ocean interaction for
+                  climate models",
+  pages         = "157--170",
+  journal       = "Ocean Modelling",
+  volume        = "5",
+  number        = "2",
+  author        = "A. Beckmann and H. Goosse",
+  year          = "2003",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/s1463-5003(02)00019-7"
+}
+
+@article{         beckmann.haidvogel_JPO93,
+  title         = "Numerical Simulation of Flow around a Tall Isolated
+                  Seamount. Part {I}: Problem Formulation and Model Accuracy",
+  pages         = "1736--1753",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "23",
+  number        = "8",
+  author        = "A. Beckmann and D. B. Haidvogel",
+  year          = "1993",
+  month         = "aug",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1993)023<1736:nsofaa>2.0.co;2"
+}
+
+@article{ beljaars_QJRMS95,
+title = "The parametrization of surface fluxes in large-scale models under free convection",
+pages = "255--270",
+journal = "Quarterly Journal of the Royal Meteorological Society",
+volume = "121",
+number = "522",
+author = "Beljaars, Anton C. M.",
+year = "1995",
+month = "jan",
+ publisher     = "Wiley",
+issn = "00359009",
+doi = "10.1002/qj.49712152203"
+}
+
+@article{         bernie.guilyardi.ea_CD07,
+  title         = "Impact of resolving the diurnal cycle in an
+                  ocean-atmosphere {GCM}. Part 1: a diurnally forced {OGCM}",
+  pages         = "575--590",
+  journal       = "Climate Dynamics",
+  volume        = "29",
+  number        = "6",
+  author        = "D. J. Bernie and E. Guilyardi and G. Madec and J. M.
+                  Slingo and S. J. Woolnough",
+  year          = "2007",
+  month         = "may",
+  publisher     = "Springer Nature",
+  issn          = "1432-0894",
+  doi           = "10.1007/s00382-007-0249-6"
+}
+
+@article{         bernie.woolnough.ea_JC05,
+  title         = "Modeling diurnal and intraseasonal variability of the
+                  ocean mixed layer",
+  pages         = "1190--1202",
+  journal       = "Journal of Climate",
+  volume        = "18",
+  number        = "8",
+  author        = "D. J. Bernie and S. J. Woolnough and J. M. Slingo and E.
+                  Guilyardi",
+  year          = "2005",
+  month         = "apr",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0442",
+  doi           = "10.1175/jcli3319.1"
+}
+
+@article{         blanke.delecluse_JPO93,
+  title         = "Variability of the tropical Atlantic Ocean simulated by a
+                  General Circulation Model with two different mixed-layer
+                  physics",
+  pages         = "1363--1388",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "23",
+  number        = "7",
+  author        = "B. Blanke and P. Del\'{e}cluse",
+  year          = "1993",
+  month         = "jul",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1993)023<1363:vottao>2.0.co;2"
+}
+
+@article{         blanke.raynaud_JPO97,
+  title         = "Kinematics of the Pacific Equatorial Undercurrent: An
+                  Eulerian and Lagrangian Approach from {GCM} Results",
+  pages         = "1038--1053",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "27",
+  number        = "6",
+  author        = "B. Blanke and S. Raynaud",
+  year          = "1997",
+  month         = "jun",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1997)027<1038:kotpeu>2.0.co;2"
+}
+
+@article{         bloom.takacs.ea_MWR96,
+  title         = "Data assimilation using incremental analysis updates",
+  pages         = "1256--1271",
+  journal       = "Monthly Weather Review",
+  volume        = "124",
+  number        = "6",
+  author        = "S. C. Bloom and L. L. Takacs and A. M. Da Silva and D.
+                  Ledvina",
+  year          = "1996",
+  month         = "jun",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0493",
+  doi           = "10.1175/1520-0493(1996)124<1256:dauiau>2.0.co;2"
+}
+
+@article{         bouffard.boegman_DAO13,
+  title         = "A diapycnal diffusivity model for stratified environmental
+                  flows",
+  pages         = "14--34",
+  journal       = "Dynamics of Atmospheres and Oceans",
+  volume        = "61-62",
+  author        = "D. Bouffard and L. Boegman",
+  year          = "2013",
+  month         = "jun",
+  publisher     = "Elsevier BV",
+  issn          = "0377-0265",
+  doi           = "10.1016/j.dynatmoce.2013.02.002"
+}
+
+@article{         bougeault.lacarrere_MWR89,
+  title         = "Parameterization of Orography-Induced Turbulence in a
+                  Mesobeta--Scale Model",
+  pages         = "1872--1890",
+  journal       = "Monthly Weather Review",
+  volume        = "117",
+  number        = "8",
+  author        = "P. Bougeault and P. Lacarrere",
+  year          = "1989",
+  month         = "aug",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0493",
+  doi           = "10.1175/1520-0493(1989)117<1872:pooiti>2.0.co;2"
+}
+
+@article{         bouillon.maqueda.ea_OM09,
+  title         = "An elastic-viscous-plastic sea ice model formulated on
+                  Arakawa {B} and {C} grids",
+  pages         = "174--184",
+  journal       = "Ocean Modelling",
+  volume        = "27",
+  number        = "3-4",
+  author        = "S. Bouillon and M. A. Morales Maqueda and V. Legat and T.
+                  Fichefet",
+  year          = "2009",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2009.01.004"
+}
+
+@article{         brankart.candille.ea_GMD15,
+  title         = "A generic approach to explicit simulation of uncertainty
+                  in the {NEMO} ocean model",
+  pages         = "1285--1297",
+  journal       = "Geoscientific Model Development",
+  volume        = "8",
+  number        = "5",
+  author        = "J.-M. Brankart and G. Candille and F. Garnier and C.
+                  Calone and A. Melet and P.-A. Bouttier and P. Brasseur and
+                  J. Verron",
+  year          = "2015",
+  month         = "may",
+  publisher     = "Copernicus GmbH",
+  issn          = "1991-9603",
+  doi           = "10.5194/gmd-8-1285-2015"
+}
+
+@article{         brankart_OM13,
+  title         = "Impact of uncertainties in the horizontal density gradient
+                  upon low resolution global ocean modelling",
+  pages         = "64--76",
+  journal       = "Ocean Modelling",
+  volume        = "66",
+  author        = "J.-M. Brankart",
+  year          = "2013",
+  month         = "jun",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2013.02.004"
+}
+
+@article{         breivik.bidlot.ea_OM16,
+  title         = "A Stokes drift approximation based on the Phillips
+                  spectrum",
+  pages         = "49--56",
+  journal       = "Ocean Modelling",
+  volume        = "100",
+  author        = "{\O}. Breivik and J.-R. Bidlot and P. A. E. M. Janssen",
+  year          = "2016",
+  month         = "apr",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2016.01.005"
+}
+
+@article{         breivik.janssen.ea_JPO14,
+  title         = "Approximate Stokes Drift Profiles in Deep Water",
+  pages         = "2433--2445",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "44",
+  number        = "9",
+  author        = "{\O}. Breivik and P. A. E. M. Janssen and J.-R. Bidlot",
+  year          = "2014",
+  month         = "sep",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/jpo-d-14-0020.1"
+}
+
+@article{         brodeau.barnier.ea_OM10,
+  title         = "An {ERA40}-based atmospheric forcing for global ocean
+                  circulation models",
+  pages         = "88--104",
+  journal       = "Ocean Modelling",
+  volume        = "31",
+  number        = "3-4",
+  author        = "L. Brodeau and B. Barnier and A.-M. Tr\'{e}guier and T.
+                  Penduff and S. Gulev",
+  year          = "2010",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2009.10.005"
+}
+
+@article{         brodeau.barnier.ea_JPO16,
+  title         = "Climatologically Significant Effects of Some Approximations in the Bulk Parameterizations of Turbulent Air–Sea Fluxes",
+  pages         = "5--28",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "47",
+  number        = "1",
+  author        = "Brodeau, Laurent and Barnier, Bernard and Gulev, Sergey K. and Woods, Cian",
+  year          = "2016",
+  month         = "jan",
+  publisher     = "American Meteorological Society",
+  issn          = "0022-3670",
+  doi           = "10.1175/jpo-d-16-0169.1",
+}
+
+@article{         brown.campana_MWR78,
+  title         = "An economical time-differencing system for numerical
+                  weather prediction",
+  pages         = "1125--1136",
+  journal       = "Monthly Weather Review",
+  volume        = "106",
+  number        = "8",
+  author        = "J. A. Brown and K. A. Campana",
+  year          = "1978",
+  month         = "aug",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0493",
+  doi           = "10.1175/1520-0493(1978)106<1125:aetsfn>2.0.co;2"
+}
+
+@article{         bryan_JCP97,
+  title         = "A numerical method for the study of the circulation of the
+                  world ocean",
+  pages         = "154--169",
+  journal       = "Journal of Computational Physics",
+  volume        = "135",
+  number        = "2",
+  author        = "K. Bryan",
+  year          = "1997",
+  month         = "Aug",
+  publisher     = "Elsevier BV",
+  issn          = "0021-9991",
+  doi           = "10.1006/jcph.1997.5699"
+}
+
+@article{         burchard_OM02,
+  title         = "Energy-conserving discretisation of turbulent shear and
+                  buoyancy production",
+  pages         = "347--361",
+  journal       = "Ocean Modelling",
+  volume        = "4",
+  number        = "3-4",
+  author        = "H. Burchard",
+  year          = "2002",
+  month         = "jun",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/s1463-5003(02)00009-4"
+}
+
+@article{         campin.adcroft.ea_OM04,
+  title         = "Conservation of properties in a free-surface model",
+  pages         = "221--244",
+  journal       = "Ocean Modelling",
+  volume        = "6",
+  number        = "3-4",
+  author        = "J.-M. Campin and A. Adcroft and C. Hill and J. Marshall",
+  year          = "2004",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/s1463-5003(03)00009-x"
+}
+
+@article{         campin.goosse_T99,
+  title         = "Parameterization of density-driven downsloping flow for a
+                  coarse-resolution ocean model in z-coordinate",
+  pages         = "412--430",
+  journal       = "Tellus A",
+  volume        = "51",
+  number        = "3",
+  author        = "J.-M. Campin and H. Goosse",
+  year          = "1999",
+  month         = "may",
+  publisher     = "Informa UK Limited",
+  issn          = "1600-0870",
+  doi           = "10.1034/j.1600-0870.1999.t01-3-00006.x"
+}
+
+@article{         campin.marshall.ea_OM08,
+  title         = "Sea ice-ocean coupling using a rescaled vertical
+                  coordinate \zstar",
+  pages         = "1--14",
+  journal       = "Ocean Modelling",
+  volume        = "24",
+  number        = "1-2",
+  author        = "J.-M. Campin and J. Marshall and D. Ferreira",
+  year          = "2008",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2008.05.005"
+}
+
+@article{         canuto.howard.ea_JPO01,
+  title         = "Ocean turbulence. Part {I}: One-point closure
+                  model-momentum and heat vertical diffusivities",
+  pages         = "1413--1426",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "31",
+  number        = "6",
+  author        = "V. M. Canuto and A. Howard and Y. Cheng and M. S.
+                  Dubovikov",
+  year          = "2001",
+  month         = "jun",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(2001)031<1413:otpiop>2.0.co;2"
+}
+
+@article{         carrere.lyard_GRL03,
+  title         = "Modeling the barotropic response of the global ocean to
+                  atmospheric wind and pressure forcing - comparisons with
+                  observations",
+  journal       = "Geophysical Research Letters",
+  volume        = "30",
+  number        = "6",
+  author        = "L. Carr\`{e}re and F. Lyard",
+  year          = "2003",
+  month         = "mar",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0094-8276",
+  doi           = "10.1029/2002gl016473"
+}
+
+@techreport{      chanut_rpt05,
+  title         = "Nesting code for {NEMO}",
+  pages         = "25",
+  author        = "J. Chanut",
+  institution   = "European Union: Marine Environment and Security for the
+                  European Area (MERSEA) Integrated Project",
+  year          = "2005",
+  month         = "may",
+  doi           = "10.5281/zenodo.3243409"
+}
+
+@article{         chassignet.smith.ea_JPO03,
+  title         = "North Atlantic Simulations with the Hybrid Coordinate
+                  Ocean Model ({HYCOM}): Impact of the Vertical Coordinate
+                  Choice, Reference Pressure, and Thermobaricity",
+  pages         = "2504--2526",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "33",
+  number        = "12",
+  author        = "E. P. Chassignet and L. T. Smith and G. R. Halliwell and
+                  R. Bleck",
+  year          = "2003",
+  month         = "dec",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(2003)033<2504:naswth>2.0.co;2"
+}
+
+@article{         cox_OM87,
+  title         = "Isopycnal diffusion in a z-coordinate ocean model",
+  pages         = "1--9",
+  journal       = "Ocean Modelling",
+  volume        = "74",
+  author        = "M. D. Cox",
+  year          = "1987",
+  month         = "jan",
+  url           = "https://www.researchgate.net/publication/243768762_Isopycnal_diffusion_in_a_z-coordinate_ocean_model"
+}
+
+@article{         craig.banner_JPO94,
+  title         = "Modeling wave-enhanced turbulence in the ocean surface
+                  layer",
+  pages         = "2546--2559",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "24",
+  number        = "12",
+  author        = "P. D. Craig and M. L. Banner",
+  year          = "1994",
+  month         = "dec",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1994)024<2546:mwetit>2.0.co;2"
+}
+
+@article{         craik.leibovich_JFM76,
+  title         = "A rational model for Langmuir circulations",
+  pages         = "401--426",
+  journal       = "Journal of Fluid Mechanics",
+  volume        = "73",
+  number        = "3",
+  author        = "A. D. D. Craik and S. Leibovich",
+  year          = "1976",
+  month         = "feb",
+  publisher     = "Cambridge University Press (CUP)",
+  issn          = "1469-7645",
+  doi           = "10.1017/s0022112076001420"
+}
+
+@article{         dalessio.abdella.ea_JPO98,
+  title         = "A new second-order turbulence closure scheme for modeling
+                  the oceanic mixed layer",
+  pages         = "1624--1641",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "28",
+  number        = "8",
+  author        = "S. J. D. D'Alessio and K. Abdella and N. A. McFarlane",
+  year          = "1998",
+  month         = "aug",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1998)028<1624:ansotc>2.0.co;2"
+}
+
+@book{            daley.barker_bk01,
+  pages         = "163",
+  booktitle     = "{NAVDAS} Source Book 2001: {NRL} Atmospheric Variational
+                  Data Assimilation System",
+  editor        = "Naval Research Laboratory, Marine Meteorology Division",
+  author        = "R. Daley and E. Barker",
+  year          = "2001",
+  month         = "jul",
+  publisher     = "Defense Technical Information Center",
+  doi           = "10.21236/ada396883"
+}
+
+@article{         danabasoglu.ferrari.ea_JC08,
+  title         = "Sensitivity of an Ocean General Circulation Model to a
+                  parameterization of near-surface eddy fluxes",
+  pages         = "1192--1208",
+  journal       = "Journal of Climate",
+  volume        = "21",
+  number        = "6",
+  author        = "G. Danabasoglu and R. Ferrari and J. C. McWilliams",
+  year          = "2008",
+  month         = "mar",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0442",
+  doi           = "10.1175/2007jcli1508.1"
+}
+
+@article{         davies_QJRMS76,
+  title         = "A lateral boundary formulation for multi-level prediction
+                  models",
+  pages         = "405--418",
+  journal       = "Quarterly Journal of the Royal Meteorological Society",
+  volume        = "102",
+  number        = "432",
+  author        = "H. C. Davies",
+  year          = "1976",
+  month         = "apr",
+  publisher     = "Wiley",
+  issn          = "0035-9009",
+  doi           = "10.1002/qj.49710243210"
+}
+
+@article{         de-boyer-montegut.madec.ea_JGR04,
+  title         = "Mixed layer depth over the global ocean: An examination of
+                  profile data and a profile-based climatology",
+  pages         = "C12003",
+  journal       = "Journal of Geophysical Research",
+  volume        = "109",
+  number        = "C12",
+  author        = "C. {de Boyer Mont\'{e}gut} and G. Madec and A. S. Fischer
+                  and A. Lazar and D. Iudicone",
+  year          = "2004",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/2004jc002378"
+}
+
+@article{         de-lavergne.madec.ea_JPO16,
+  title         = "The impact of a variable mixing efficiency on the abyssal
+                  overturning",
+  pages         = "663--681",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "46",
+  number        = "2",
+  author        = "C. {de Lavergne} and G. Madec and J. {Le Sommer} and A. J.
+                  G. Nurser and A. C. Naveira Garabato",
+  year          = "2016",
+  month         = "feb",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/jpo-d-14-0259.1"
+}
+
+@article{         debreu.vouland.ea_CG08,
+  title         = "{AGRIF}: Adaptive Grid Refinement In Fortran",
+  pages         = "8--13",
+  journal       = "Computers \& Geosciences",
+  volume        = "34",
+  number        = "1",
+  author        = "L. Debreu and C. Vouland and E. Blayo",
+  year          = "2008",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "0098-3004",
+  doi           = "10.1016/j.cageo.2007.01.009"
+}
+
+@incollection{    delecluse.madec_icol99,
+  title         = "Ocean modelling and the role of the ocean in the climate
+                  system",
+  pages         = "237--313",
+  booktitle     = "Modeling the Earth's Climate and its Variability",
+  editor        = "W. R. Holland and S. Joussaume and F. David",
+  series        = "Les Houches",
+  volume        = "67",
+  author        = "P. Del\'{e}cluse and G. Madec",
+  year          = "1999",
+  publisher     = "North Holland",
+  isbn          = "978-0-444-50338-1"
+}
+
+@phdthesis{       demange_phd14,
+  title         = "Advection and gravity waves propagation numerical schemes
+                  for oceanic circulation models",
+  pages         = "138",
+  author        = "J. Demange",
+  school        = "Grenoble University, France",
+  year          = "2014",
+  url           = "https://tel.archives-ouvertes.fr/tel-01104703/file/DEMANGE_2014_archivage.pdf"
+}
+
+@article{         dobricic.pinardi.ea_OS07,
+  title         = "Daily oceanographic analyses by Mediterranean Forecasting
+                  System at the basin scale",
+  pages         = "149--157",
+  journal       = "Ocean Science",
+  volume        = "3",
+  number        = "1",
+  author        = "S. Dobricic and N. Pinardi and M. Adani and M. Tonani and
+                  C. Fratianni and A. Bonazzi and V. Fernandez",
+  year          = "2007",
+  month         = "mar",
+  publisher     = "Copernicus GmbH",
+  issn          = "1812-0792",
+  doi           = "10.5194/os-3-149-2007"
+}
+
+@article{         drijfhout_JPO94,
+  title         = "Heat transport by mesoscale eddies in an ocean circulation
+                  Model",
+  pages         = "353--369",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "24",
+  number        = "2",
+  author        = "S. S. Drijfhout",
+  year          = "1994",
+  month         = "feb",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1994)024<0353:htbmei>2.0.co;2"
+}
+
+@article{         dukowicz.smith_JGR94,
+  title         = "Implicit free-surface method for the Bryan-Cox-Semtner
+                  ocean model",
+  pages         = "7991--8014",
+  journal       = "Journal of Geophysical Research",
+  volume        = "99",
+  number        = "C4",
+  author        = "J. K. Dukowicz and R. D. Smith",
+  year          = "1994",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/93jc03455"
+}
+
+@article{ edson.jampana.ea_JPO13,
+title = "On the Exchange of Momentum over the Open Ocean",
+pages = "1589--1610",
+journal = "Journal of Physical Oceanography",
+volume = "43",
+number = "8",
+author = "Edson, James B. and Jampana, Venkata and Weller, Robert A. and Bigorre, Sebastien P. and Plueddemann, Albert J. and Fairall, Christopher W. and Miller, Scott D. and Mahrt, Larry and Vickers, Dean and Hersbach, Hans",
+year = "2013",
+month = "aug",
+publisher = "American Meteorological Society",
+issn = "0022-3670",
+doi = "10.1175/JPO-D-12-0173.1"
+}
+
+@article{         egbert.ray_JGR01,
+  title         = "Estimates of {M2} tidal energy dissipation from
+                  {TOPEX}/Poseidon altimeter data",
+  pages         = "22475--22502",
+  journal       = "Journal of Geophysical Research",
+  volume        = "106",
+  number        = "C10",
+  author        = "G. D. Egbert and R. D. Ray",
+  year          = "2001",
+  month         = "oct",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/2000jc000699"
+}
+
+@article{         egbert.ray_N00,
+  title         = "Significant dissipation of tidal energy in the deep ocean
+                  inferred from satellite altimeter data",
+  pages         = "775--778",
+  journal       = "Nature",
+  volume        = "405",
+  number        = "6788",
+  author        = "G. D. Egbert and R. D. Ray",
+  year          = "2000",
+  month         = "jun",
+  publisher     = "Springer Nature",
+  issn          = "1476-4687",
+  doi           = "10.1038/35015531"
+}
+
+@article{         eiseman.stone_SR80,
+  title         = "Conservation laws of fluid dynamics - {A} survey",
+  pages         = "12--27",
+  journal       = "SIAM Review",
+  volume        = "22",
+  number        = "1",
+  author        = "P. R. Eiseman and A. P. Stone",
+  year          = "1980",
+  month         = "jan",
+  publisher     = "Society for Industrial & Applied Mathematics (SIAM)",
+  issn          = "1095-7200",
+  doi           = "10.1137/1022002"
+}
+
+@article{         emile-geay.madec_OS09,
+  title         = "Geothermal heating, diapycnal mixing and the abyssal
+                  circulation",
+  pages         = "203--217",
+  journal       = "Ocean Science",
+  volume        = "5",
+  number        = "2",
+  author        = "J. Emile-Geay and G. Madec",
+  year          = "2009",
+  month         = "jun",
+  publisher     = "Copernicus GmbH",
+  issn          = "1812-0792",
+  doi           = "10.5194/os-5-203-2009"
+}
+
+@article{         engedahl_T95,
+  title         = "Use of the flow relaxation scheme in a three-dimensional
+                  baroclinic ocean model with realistic topography",
+  pages         = "365--382",
+  journal       = "Tellus A",
+  volume        = "47",
+  number        = "3",
+  author        = "H. Engedahl",
+  year          = "1995",
+  month         = "jan",
+  publisher     = "Informa UK Limited",
+  issn          = "1600-0870",
+  doi           = "10.3402/tellusa.v47i3.11523"
+}
+
+@article{ fairall.bradley.ea_JC03,
+title = "Bulk parameterization of air-sea fluxes: Updates and verification for the COARE algorithm",
+pages = "571--591",
+journal = "Journal of Climate",
+volume = "16",
+number = "4",
+author = "Fairall, C. W. and Bradley, E. F. and Hare, J. E. and Grachev, A. A. and Edson, J. B.",
+year = "2003",
+publisher = "American Meteorological Society",
+issn = "08948755",
+doi = "10.1175/1520-0442(2003)016<0571:BPOASF>2.0.CO;2"
+}
+
+@phdthesis{       farge-coulombier_phd87,
+  title         = "Dynamique non-lin\'{e}aire des ondes et des tourbillons
+                  dans les \'{e}quations de Saint-Venant",
+  pages         = "353",
+  author        = "M. {Farge Coulombier}",
+  school        = "Paris VI University, France",
+  year          = "1987",
+  url           = "http://www.theses.fr/1987PA066365"
+}
+
+@article{         farrow.stevens_JPO95,
+  title         = "A new tracer advection scheme for Bryan and Cox type Ocean
+                  General Circulation Models",
+  pages         = "1731--1741",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "25",
+  number        = "7",
+  author        = "D. E. Farrow and D. P. Stevens",
+  year          = "1995",
+  month         = "jul",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1995)025<1731:antasf>2.0.co;2"
+}
+
+@article{         flather_JPO94,
+  title         = "A storm surge prediction model for the northern Bay of
+                  Bengal with application to the cyclone disaster in April
+                  1991",
+  pages         = "172--190",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "24",
+  number        = "1",
+  author        = "R. A. Flather",
+  year          = "1994",
+  month         = "jan",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1994)024<0172:asspmf>2.0.co;2"
+}
+
+@book{            fofonoff.millard_bk83,
+  pages         = "53",
+  booktitle     = "Algorithms for computation of fundamental properties of
+                  seawater",
+  editor        = "UNESCO/ICES/SCOR/IAPSO",
+  series        = "Technical Paper in Marine Science",
+  volume        = "44",
+  author        = "N P. Fofonoff and R. C. Millard",
+  year          = "1983",
+  publisher     = "UNESCO",
+  url           = "https://unesdoc.unesco.org/ark:/48223/pf0000059832.locale=en"
+}
+
+@article{         foxkemper.ferrari_JPO08,
+  title         = "Parameterization of Mixed Layer Eddies. Part I: Theory and Diagnosis",
+  pages         = "1145--1165",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "38",
+  number        = "6",
+  author        = "B. Fox-Kemper and R. Ferrari and B. Hallberg",
+  year          = "2008",
+  month         = "jun",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/2007JPO3792.1"
+}
+
+@article{         galperin.kantha.ea_JAS88,
+  title         = "A quasi-equilibrium turbulent energy model for geophysical
+                  flows",
+  pages         = "55--62",
+  journal       = "Journal of the Atmospheric Sciences",
+  volume        = "45",
+  number        = "1",
+  author        = "B. Galperin and L. H. Kantha and S. Hassid and A. Rosati",
+  year          = "1988",
+  month         = "jan",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0469",
+  doi           = "10.1175/1520-0469(1988)045<0055:aqetem>2.0.co;2"
+}
+
+@article{         gargett_JMR84,
+  title         = "Vertical eddy diffusivity in the ocean interior",
+  pages         = "359--393",
+  journal       = "Journal of Marine Research",
+  volume        = "42",
+  number        = "2",
+  author        = "A. E. Gargett",
+  year          = "1984",
+  month         = "may",
+  publisher     = "Journal of Marine Research/Yale",
+  issn          = "1543-9542",
+  doi           = "10.1357/002224084788502756"
+}
+
+@article{         gaspar.gregoris.ea_JGR90,
+  title         = "A simple eddy kinetic energy model for simulations of the
+                  oceanic vertical mixing: Tests at station Papa and
+                  long-term upper ocean study site",
+  pages         = "16179",
+  journal       = "Journal of Geophysical Research",
+  volume        = "95",
+  number        = "C9",
+  author        = "P. Gaspar and Y. Gr{\'e}goris and J.-M. Lefevre",
+  year          = "1990",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/jc095ic09p16179"
+}
+
+@article{         gent.mcwilliams_JPO90,
+  title         = "Isopycnal Mixing in Ocean Circulation Models",
+  pages         = "150--155",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "20",
+  number        = "1",
+  author        = "P. R. Gent and J. C. McWilliams",
+  year          = "1990",
+  month         = "jan",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1990)020<0150:imiocm>2.0.co;2"
+}
+
+@article{         gentemann.minnett.ea_JGR09,
+  title         = "Profiles of Ocean Surface Heating ({POSH}): {A} new model
+                  of upper ocean diurnal warming",
+  pages         = "C07017",
+  journal       = "Journal of Geophysical Research",
+  volume        = "114",
+  number        = "C7",
+  author        = "C. L. Gentemann and P. J. Minnett and B. Ward",
+  year          = "2009",
+  month         = "jul",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/2008jc004825"
+}
+
+@article{         gerdes.koberle.ea_CD91,
+  title         = "The influence of numerical advection schemes on the
+                  results of Ocean General Circulation Models",
+  pages         = "211--226",
+  journal       = "Climate Dynamics",
+  volume        = "5",
+  number        = "4",
+  author        = "R. Gerdes and C. K{\"{o}}berle and J. Willebrand",
+  year          = "1991",
+  month         = "jun",
+  publisher     = "Springer Nature",
+  issn          = "1432-0894",
+  doi           = "10.1007/bf00210006"
+}
+
+@article{         gerdes_JGR93*a,
+  title         = "A primitive equation ocean circulation model using a
+                  general vertical coordinate transformation: 1. Description
+                  and testing of the model",
+  pages         = "14683--14701",
+  journal       = "Journal of Geophysical Research",
+  volume        = "98",
+  number        = "C8",
+  author        = "R. Gerdes",
+  year          = "1993",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/93jc00760"
+}
+
+@article{         gerdes_JGR93*b,
+  title         = "A primitive equation ocean circulation model using a
+                  general vertical coordinate transformation: 2. Application
+                  to an overflow problem",
+  pages         = "14703--14726",
+  journal       = "Journal of Geophysical Research",
+  volume        = "98",
+  number        = "C8",
+  author        = "R. Gerdes",
+  year          = "1993",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/93jc00788"
+}
+
+@techreport{      gibson_rpt86,
+  title         = "Standards for software development and maintenance",
+  pages         = "21",
+  series        = "ECMWF Technical Memoranda",
+  number        = "120",
+  author        = "J. K. Gibson",
+  institution   = "ECMWF Operations Department; Reading, United Kingdom",
+  year          = "1986",
+  month         = "aug",
+  doi           = "10.21957/gi113q4gn"
+}
+
+@book{            gill_bk82,
+  pages         = "662",
+  booktitle     = "Atmosphere-Ocean Dynamics",
+  series        = "International Geophysics",
+  volume        = "30",
+  author        = "A. E. Gill",
+  year          = "1982",
+  month         = "nov",
+  publisher     = "Elsevier",
+  issn          = "0074-6142",
+  isbn          = "978-0-12-283522-3",
+  doi           = "10.1016/s0074-6142(08)x6002-4"
+}
+
+@article{         goff_JGR10,
+  title         = "Global prediction of abyssal hill root-mean-square heights
+                  from small-scale altimetric gravity variability",
+  pages         = "B12104",
+  journal       = "Journal of Geophysical Research",
+  volume        = "115",
+  number        = "B12",
+  author        = "J. A. Goff",
+  year          = "2010",
+  month         = "dec",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/2010jb007867"
+}
+
+@article{         goosse.deleersnijder.ea_JGR99,
+  title         = "Sensitivity of a global coupled ocean-sea ice model to the
+                  parameterization of vertical mixing",
+  pages         = "13681--13695",
+  journal       = "Journal of Geophysical Research",
+  volume        = "104",
+  number        = "C6",
+  author        = "H. Goosse and E. Deleersnijder and T. Fichefet and M. H.
+                  England",
+  year          = "1999",
+  month         = "jun",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/1999jc900099"
+}
+
+@article{         graham.mcdougall_JPO13,
+  title         = "Quantifying the nonconservative production of conservative
+                  temperature, potential temperature, and entropy",
+  pages         = "838--862",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "43",
+  number        = "5",
+  author        = "F. S. Graham and T. J. McDougall",
+  year          = "2013",
+  month         = "may",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/jpo-d-11-0188.1"
+}
+
+@article{         greatbatch_JGR94,
+  title         = "A note on the representation of steric sea level in models
+                  that conserve volume rather than mass",
+  pages         = "12767--12771",
+  journal       = "Journal of Geophysical Research",
+  volume        = "99",
+  number        = "C6",
+  author        = "R. J. Greatbatch",
+  year          = "1994",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/94jc00847"
+}
+
+@article{         griffies.biastoch.ea_OM09,
+  title         = "Coordinated Ocean-ice Reference Experiments ({CORE}s)",
+  pages         = "1--46",
+  journal       = "Ocean Modelling",
+  volume        = "26",
+  number        = "1-2",
+  author        = "S. M. Griffies and A. Biastoch and C. B{\"{o}}ning and F.
+                  Bryan and G. Danabasoglu and E. P. Chassignet and M. H.
+                  England and R. Gerdes and H. Haak and R. W. Hallberg and W.
+                  Hazeleger and J. Jungclaus and W. G. Large and G. Madec and
+                  A. Pirani and B. L. Samuels and M. Scheinert and A. Sen
+                  Gupta and C. A. Severijns and H. L. Simmons and A.-M.
+                  Tr\'{e}guier and M. Winton and S. Yeager and J. Yin",
+  year          = "2009",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2008.08.007"
+}
+
+@article{         griffies.gnanadesikan.ea_JPO98,
+  title         = "Isoneutral Diffusion in a z-coordinate Ocean Model",
+  pages         = "805--830",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "28",
+  number        = "5",
+  author        = "S. M. Griffies and A. Gnanadesikan and R. C. Pacanowski
+                  and V. D. Larichev and J. K. Dukowicz and R. D. Smith",
+  year          = "1998",
+  month         = "may",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1998)028<0805:idiazc>2.0.co;2"
+}
+
+@article{         griffies.pacanowski.ea_MWR01,
+  title         = "Tracer Conservation with an Explicit Free Surface Method
+                  for z-coordinate Ocean Models",
+  pages         = "1081--1098",
+  journal       = "Monthly Weather Review",
+  volume        = "129",
+  number        = "5",
+  author        = "S. M. Griffies and R. C. Pacanowski and M. Schmidt and V.
+                  Balaji",
+  year          = "2001",
+  month         = "may",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0493",
+  doi           = "10.1175/1520-0493(2001)129<1081:tcwaef>2.0.co;2"
+}
+
+@article{         griffies_JPO98,
+  title         = "The Gent-McWilliams skew-flux",
+  pages         = "831--841",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "28",
+  number        = "5",
+  author        = "S. M. Griffies",
+  year          = "1998",
+  month         = "may",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1998)028<0831:tgmsf>2.0.co;2"
+}
+
+@book{            griffies_bk04,
+  pages         = "434",
+  booktitle     = "Fundamentals of ocean climate models",
+  author        = "S. M. Griffies",
+  year          = "2004",
+  month         = "dec",
+  publisher     = "Princeton University Press",
+  isbn          = "978-0-691-18712-9",
+  doi           = "10.2307/j.ctv301gzg"
+}
+
+@article{         guilyardi.madec.ea_CD01,
+  title         = "The role of lateral ocean physics in the upper ocean
+                  thermal balance of a coupled ocean-atmosphere {GCM}",
+  pages         = "589--599",
+  journal       = "Climate Dynamics",
+  volume        = "17",
+  number        = "8",
+  author        = "E. Guilyardi and G. Madec and L. Terray",
+  year          = "2001",
+  month         = "may",
+  publisher     = "Springer Science and Business Media LLC",
+  issn          = "0930-7575",
+  doi           = "10.1007/pl00007930"
+}
+
+@article{         haney_JPO91,
+  title         = "On the Pressure Gradient Force over Steep Topography in
+                  Sigma Coordinate Ocean Models",
+  pages         = "610--619",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "21",
+  number        = "4",
+  author        = "R. L. Haney",
+  year          = "1991",
+  month         = "apr",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1991)021<0610:otpgfo>2.0.co;2"
+}
+
+@article{         hazeleger.drijfhout_JGR00,
+  title         = "A model study on internally generated variability in
+                  subtropical mode water formation",
+  pages         = "13965--13979",
+  journal       = "Journal of Geophysical Research",
+  volume        = "105",
+  number        = "C6",
+  author        = "W. Hazeleger and S. S. Drijfhout",
+  year          = "2000",
+  month         = "jun",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/2000jc900041"
+}
+
+@article{         hazeleger.drijfhout_JPO00,
+  title         = "Eddy subduction in a model of the subtropical gyre",
+  pages         = "677--695",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "30",
+  number        = "4",
+  author        = "W. Hazeleger and S. S. Drijfhout",
+  year          = "2000",
+  month         = "apr",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(2000)030<0677:esiamo>2.0.co;2"
+}
+
+@article{         hazeleger.drijfhout_JPO98,
+  title         = "Mode water variability in a model of the subtropical gyre:
+                  response to anomalous forcing",
+  pages         = "266--288",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "28",
+  number        = "2",
+  author        = "W. Hazeleger and S. S. Drijfhout",
+  year          = "1998",
+  month         = "feb",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1998)028<0266:mwviam>2.0.co;2"
+}
+
+@article{         hazeleger.drijfhout_JPO99,
+  title         = "Stochastically forced mode water variability",
+  pages         = "1772--1786",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "29",
+  number        = "8",
+  author        = "W. Hazeleger and S. S. Drijfhout",
+  year          = "1999",
+  month         = "aug",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1999)029<1772:sfmwv>2.0.co;2"
+}
+
+@article{         he.ding_JS01,
+  title         = "Using accurate arithmetics to improve numerical
+                  reproducibility and stability in parallel applications",
+  pages         = "259--277",
+  journal       = "The Journal of Supercomputing",
+  volume        = "18",
+  number        = "3",
+  author        = "Y. He and C. H. Q. Ding",
+  year          = "2001",
+  publisher     = "Springer Nature",
+  issn          = "0920-8542",
+  doi           = "10.1023/a:1008153532043"
+}
+
+@article{         hirt.amsden.ea_JCP74,
+  title         = "An arbitrary Lagrangian-Eulerian computing method for all
+                  flow speeds",
+  pages         = "227--253",
+  journal       = "Journal of Computational Physics",
+  volume        = "14",
+  number        = "3",
+  author        = "C. W. Hirt and A. A. Amsden and J. L. Cook",
+  year          = "1974",
+  month         = "mar",
+  publisher     = "Elsevier BV",
+  issn          = "0021-9991",
+  doi           = "10.1016/0021-9991(74)90051-5"
+}
+
+@article{         hofmeister.burchard.ea_OM10,
+  title         = "Non-uniform adaptive vertical grids for 3{D} numerical
+                  ocean models",
+  pages         = "70--86",
+  journal       = "Ocean Modelling",
+  volume        = "33",
+  number        = "1-2",
+  author        = "R. Hofmeister and H. Burchard and J.-M. Beckers",
+  year          = "2010",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2009.12.003"
+}
+
+@article{         holland.jenkins_JPO99,
+  title         = "Modeling thermodynamic ice-ocean interactions at the base
+                  of an ice shelf",
+  pages         = "1787--1800",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "29",
+  number        = "8",
+  author        = "D. M. Holland and A. Jenkins",
+  year          = "1999",
+  month         = "aug",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1999)029<1787:mtioia>2.0.co;2"
+}
+
+@techreport{      hunter_rpt06,
+  title         = "Specification for Test Models of Ice Shelf Cavities",
+  pages         = "17",
+  number        = "7",
+  author        = "J. R. Hunter",
+  institution   = "Antarctic Climate \& Ecosystems Cooperative Research
+                  Centre",
+  year          = "2006",
+  month         = "jun",
+  url           = "http://staff.acecrc.org.au/~bkgalton/ISOMIP/test_cavities.pdf"
+}
+
+@book{            ioc.iapso_bk10,
+  title         = "The international thermodynamic equation of seawater -
+                  2010: Calculation and use of thermodynamic properties",
+  pages         = "196",
+  editor        = "Intergovernmental Oceanographic Commission",
+  series        = "Manuals and Guides",
+  volume        = "56",
+  author        = "IOC, SCOR and IAPSO",
+  year          = "2010",
+  month         = "mar",
+  publisher     = "UNESCO",
+  url           = "https://unesdoc.unesco.org/ark:/48223/pf0000188170.locale=en"
+}
+
+@article{         jackson.rehmann_JPO14,
+  title         = "Experiments on differential scalar mixing in turbulence in
+                  a sheared, stratified flow",
+  pages         = "2661--2680",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "44",
+  number        = "10",
+  author        = "P. R. Jackson and C. R. Rehmann",
+  year          = "2014",
+  month         = "oct",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/jpo-d-14-0027.1"
+}
+
+@techreport{      janssen.breivik.ea_rpt13,
+  title         = "Air-sea interaction and surface waves",
+  pages         = "36",
+  series        = "ECMWF Technical Memoranda",
+  volume        = "712",
+  author        = "P. A. E. M. Janssen and {\O}. Breivik and K. Mogensen and
+                  F. Vitart and M. Alonso-Balmaseda and J.-R. Bidlot and S.
+                  Keeley and M. Leutbecher and L. Magnusson and F. Molteni",
+  institution   = "ECMWF Research Departement; Reading, United Kingdom",
+  year          = "2013",
+  month         = "nov",
+  doi           = "10.21957/0kg73joh"
+}
+
+@article{         jenkins.nicholls.ea_JPO10,
+  title         = "Observation and parameterization of ablation at the base
+                  of Ronne Ice Shelf, Antarctica",
+  pages         = "2298--2312",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "40",
+  number        = "10",
+  author        = "A. Jenkins and K. W. Nicholls and H. F. J. Corr",
+  year          = "2010",
+  month         = "oct",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/2010jpo4317.1"
+}
+
+@article{         jenkins_JGR91,
+  title         = "A one-dimensional model of ice shelf-ocean interaction",
+  pages         = "20671--20677",
+  journal       = "Journal of Geophysical Research",
+  volume        = "96",
+  number        = "C11",
+  author        = "A. Jenkins",
+  year          = "1991",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/91jc01842"
+}
+
+@article{         kantha.carniel_JMR03,
+  title         = "Comments on ``{A} generic length-scale equation for
+                  geophysical turbulence models'' by {L}. Umlauf and {H}.
+                  Burchard",
+  pages         = "693--702",
+  journal       = "Journal of Marine Research",
+  volume        = "61",
+  number        = "5",
+  author        = "L. Kantha and S. Carniel",
+  year          = "2003",
+  month         = "sep",
+  publisher     = "Journal of Marine Research/Yale",
+  issn          = "1543-9542",
+  doi           = "10.1357/002224003771816007"
+}
+
+@article{         kantha.clayson_JGR94,
+  title         = "An improved mixed layer model for geophysical
+                  applications",
+  pages         = "25235--25266",
+  journal       = "Journal of Geophysical Research",
+  volume        = "99",
+  number        = "C12",
+  author        = "L. H. Kantha and C. A. Clayson",
+  year          = "1994",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/94jc02257"
+}
+
+@article{         kasahara_MWR74,
+  title         = "Various vertical coordinate systems used for numerical
+                  weather prediction",
+  pages         = "509--522",
+  journal       = "Monthly Weather Review",
+  volume        = "102",
+  number        = "7",
+  author        = "A. Kasahara",
+  year          = "1974",
+  month         = "jul",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0493",
+  doi           = "10.1175/1520-0493(1974)102<0509:vvcsuf>2.0.co;2"
+}
+
+@article{         killworth.webb.ea_JPO91,
+  title         = "The development of a free-surface Bryan-Cox-Semtner ocean
+                  model",
+  pages         = "1333--1348",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "21",
+  number        = "9",
+  author        = "P. D. Killworth and D. J. Webb and D. Stainforth and S. M.
+                  Paterson",
+  year          = "1991",
+  month         = "sep",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1991)021<1333:tdoafs>2.0.co;2"
+}
+
+@article{         killworth_JPO92,
+  title         = "An equivalent-barotropic mode in the fine resolution
+                  Antarctic model",
+  pages         = "1379--1387",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "22",
+  number        = "11",
+  author        = "P. D. Killworth",
+  year          = "1992",
+  month         = "nov",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1992)022<1379:aebmit>2.0.co;2"
+}
+
+@inproceedings{   killworth_iprc89,
+  title         = "On the parameterization of deep convection in ocean
+                  models",
+  pages         = "59--74",
+  booktitle     = "Parameterization of small-scale processes",
+  editor        = "P. Muller and D. Henderson",
+  author        = "P. D. Killworth",
+  year          = "1989",
+  month         = "jan",
+  publisher     = "Hawaii Institute of Geophysics",
+  url           = "http://www.soest.hawaii.edu/PubServices/1989pdfs/Killworth.pdf"
+}
+
+@article{         koch-larrouy.lengaigne.ea_CD10,
+  title         = "Tidal mixing in the Indonesian Seas and its effect on the
+                  tropical climate system",
+  pages         = "891--904",
+  journal       = "Climate Dynamics",
+  volume        = "34",
+  number        = "6",
+  author        = "A. Koch-Larrouy and M. Lengaigne and P. Terray and G.
+                  Madec and S. Masson",
+  year          = "2010",
+  month         = "aug",
+  publisher     = "Springer Nature",
+  issn          = "1432-0894",
+  doi           = "10.1007/s00382-009-0642-4"
+}
+
+@article{         koch-larrouy.madec.ea_GRL07,
+  title         = "On the transformation of Pacific water into Indonesian
+                  ThroughFlow water by internal tidal mixing",
+  pages         = "L04604",
+  journal       = "Geophysical Research Letters",
+  volume        = "34",
+  number        = "4",
+  author        = "A. Koch-Larrouy and G. Madec and P. Bouruet-Aubertot and
+                  T. Gerkema and L. Bessi\`{e}res and R. Molcard",
+  year          = "2007",
+  month         = "feb",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0094-8276",
+  doi           = "10.1029/2006gl028405"
+}
+
+@article{         koch-larrouy.madec.ea_OD08*a,
+  title         = "Water mass transformation along the Indonesian ThroughFlow
+                  in an {OGCM}",
+  pages         = "289--309",
+  journal       = "Ocean Dynamics",
+  volume        = "58",
+  number        = "3-4",
+  author        = "A. Koch-Larrouy and G. Madec and B. Blanke and R. Molcard",
+  year          = "2008",
+  month         = "oct",
+  publisher     = "Springer Nature",
+  issn          = "1616-7228",
+  doi           = "10.1007/s10236-008-0155-4"
+}
+
+@article{         koch-larrouy.madec.ea_OD08*b,
+  title         = "Physical processes contributing to the water mass
+                  transformation of the Indonesian ThroughFlow",
+  pages         = "275--288",
+  journal       = "Ocean Dynamics",
+  volume        = "58",
+  number        = "3-4",
+  author        = "A. Koch-Larrouy and G. Madec and D. Iudicone and A.
+                  Atmadipoera and R. Molcard",
+  year          = "2008",
+  month         = "oct",
+  publisher     = "Springer Nature",
+  issn          = "1616-7228",
+  doi           = "10.1007/s10236-008-0154-5"
+}
+
+@article{         kolmogorov_IANS42,
+  title         = "Equations of turbulent motion in an incompressible fluid",
+  pages         = "56--58",
+  journal       = "Izvestiya Akademiya Nauk SSSR",
+  series        = "Fizika",
+  volume        = "6",
+  author        = "A. N. Kolmogorov",
+  year          = "1942"
+}
+
+@article{         kraus.turner_tellus67,
+  author = {Kraus, E.B. and Turner, J.},
+  journal = {Tellus},
+  pages = {98--106},
+  title = {A one dimensional model of the seasonal thermocline {II}. {T}he general theory and its consequences},
+  volume = {19},
+  year = {1967}
+}
+
+@article{        large.ea_RG97,
+  author        = "Large, W. G. and McWilliams, J. C. and Doney, S. C.",
+  doi           = "10.1029/94RG01872",
+  journal       = "Reviews of Geophysics",
+  number        = {4},
+  pages         = {363--403},
+  publisher     = {AGU},
+  title         = "Oceanic vertical mixing: {A} review and a model with a nonlocal boundary layer parameterization",
+  year          = "1994"
+}
+
+@techreport{      large.yeager_rpt04,
+  title         = "Diurnal to decadal global forcing for ocean and sea-ice
+                  models: the data sets and flux climatologies",
+  author        = "W. G. Large and S. G. Yeager",
+  institution   = "{NCAR} Climate and global dynamics division; Boulder, CO,
+                  United States",
+  year          = "2004",
+  month         = "may",
+  doi           = "10.5065/d6kk98q6"
+}
+
+@article{         lazar.madec.ea_JPO99,
+  title         = "The Deep Interior Downwelling, the Veronis Effect, and
+                  Mesoscale Tracer Transport Parameterizations in an {OGCM}",
+  pages         = "2945--2961",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "29",
+  number        = "11",
+  author        = "A. Lazar and G. Madec and P. Del\'{e}cluse",
+  year          = "1999",
+  month         = "nov",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1999)029<2945:tdidtv>2.0.co;2"
+}
+
+@phdthesis{       lazar_phd97,
+  title         = "La branche froide de la circulation thermohaline -
+                  sensibilit\'{e} \`{a} la diffusion turbulente dans un
+                  mod\`{e}le de circulation g\'{e}n\'{e}rale
+                  id\'{e}alis\'{e}e",
+  pages         = "269",
+  author        = "A. Lazar",
+  school        = "Universit\'{e} Pierre et Marie Curie, Paris, France",
+  year          = "1997",
+  url           = "http://www.theses.fr/1997PA066680"
+}
+
+@article{         le-sommer.penduff.ea_OM09,
+  title         = "How momentum advection schemes influence
+                  current-topography interactions at eddy permitting
+                  resolution",
+  pages         = "1--14",
+  journal       = "Ocean Modelling",
+  volume        = "29",
+  number        = "1",
+  author        = "J. {Le Sommer} and T. Penduff and S. Theetten and G. Madec
+                  and B. Barnier",
+  year          = "2009",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2008.11.007"
+}
+
+@article{         leclair.madec_OM09,
+  title         = "A conservative leapfrog time stepping method",
+  pages         = "88--94",
+  journal       = "Ocean Modelling",
+  volume        = "30",
+  number        = "2-3",
+  author        = "M. Leclair and G. Madec",
+  year          = "2009",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2009.06.006"
+}
+
+@article{         leclair.madec_OM11,
+  title         = "$\tilde{z}$-coordinate, an arbitrary Lagrangian-Eulerian
+                  coordinate separating high and low frequency motions",
+  pages         = "139--152",
+  journal       = "Ocean Modelling",
+  volume        = "37",
+  number        = "3-4",
+  author        = "M. Leclair and G. Madec",
+  year          = "2011",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2011.02.001"
+}
+
+@phdthesis{       leclair_phd10,
+  title         = "Introduction d'une coordonn\'{e}e verticale arbitrairement
+                  Lagrangienne Eul\'{e}rienne dans le code d'oc\'{e}an
+                  {NEMO}",
+  pages         = "163",
+  author        = "M. Leclair",
+  school        = "Universit\'{e} Pierre and Marie Curie, Paris, France",
+  year          = "2010",
+  url           = "http://www.theses.fr/2010PA066728"
+}
+
+@article{         lele_JCP92,
+  title         = "Compact finite difference schemes with spectral-like
+                  resolution",
+  pages         = "16--42",
+  journal       = "Journal of Computational Physics",
+  volume        = "103",
+  number        = "1",
+  author        = "S. K. Lele",
+  year          = "1992",
+  month         = "nov",
+  publisher     = "Elsevier BV",
+  issn          = "0021-9991",
+  doi           = "10.1016/0021-9991(92)90324-r"
+}
+
+@article{         lemarie.debreu.ea_OM12,
+  title         = "On the stability and accuracy of the harmonic and
+                  biharmonic isoneutral mixing operators in ocean models",
+  pages         = "9--35",
+  journal       = "Ocean Modelling",
+  volume        = "52-53",
+  author        = "F. Lemari\'{e} and L. Debreu and A. F. Shchepetkin and J.
+                  C. McWilliams",
+  year          = "2012",
+  month         = "aug",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2012.04.007"
+}
+
+@article{         lemarie.debreu.ea_OM15,
+  title         = "Stability constraints for oceanic numerical models:
+                  implications for the formulation of time and space
+                  discretizations",
+  pages         = "124--148",
+  journal       = "Ocean Modelling",
+  volume        = "92",
+  author        = "F. Lemari\'{e} and L. Debreu and G. Madec and J. Demange
+                  and J. M. Molines and M. Honnorat",
+  year          = "2015",
+  month         = "aug",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2015.06.006"
+}
+
+@article{         lengaigne.madec.ea_JGR03,
+  title         = "Impact of isopycnal mixing on the tropical ocean
+                  circulation",
+  pages         = "3345",
+  journal       = "Journal of Geophysical Research",
+  volume        = "108",
+  number        = "C11",
+  author        = "M. Lengaigne and G. Madec and G. Alory and C. Menkes",
+  year          = "2003",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/2002jc001704"
+}
+
+@article{         lengaigne.menkes.ea_CD07,
+  title         = "Influence of the oceanic biology on the tropical Pacific
+                  climate in a Coupled General Circulation Model",
+  pages         = "503--516",
+  journal       = "Climate Dynamics",
+  volume        = "28",
+  number        = "5",
+  author        = "M. Lengaigne and C. Menkes and O. Aumont and T. Gorgues
+                  and L. Bopp and J.-M. Andr\'{e} and G. Madec",
+  year          = "2007",
+  month         = "nov",
+  publisher     = "Springer Nature",
+  issn          = "1432-0894",
+  doi           = "10.1007/s00382-006-0200-2"
+}
+
+@article{         leonard_CMAME79,
+  title         = "A stable and accurate convective modelling procedure based
+                  on quadratic upstream interpolation",
+  pages         = "59--98",
+  journal       = "Computer Methods in Applied Mechanics and Engineering",
+  volume        = "19",
+  number        = "1",
+  author        = "B. P. Leonard",
+  year          = "1979",
+  month         = "jun",
+  publisher     = "Elsevier BV",
+  issn          = "0045-7825",
+  doi           = "10.1016/0045-7825(79)90034-3"
+}
+
+@article{         leonard_CMAME91,
+  title         = "The {ULTIMATE} conservative difference scheme applied to
+                  unsteady one-dimensional advection",
+  pages         = "17--74",
+  journal       = "Computer Methods in Applied Mechanics and Engineering",
+  volume        = "88",
+  number        = "1",
+  author        = "B. P. Leonard",
+  year          = "1991",
+  month         = "jun",
+  publisher     = "Elsevier BV",
+  issn          = "0045-7825",
+  doi           = "10.1016/0045-7825(91)90232-u"
+}
+
+@article{         lermusiaux_JMS01,
+  title         = "Evolving the subspace of the three-dimensional multiscale
+                  ocean variability: Massachusetts Bay",
+  pages         = "385--422",
+  journal       = "Journal of Marine Systems",
+  volume        = "29",
+  number        = "1-4",
+  author        = "P. F. J. Lermusiaux",
+  year          = "2001",
+  month         = "may",
+  publisher     = "Elsevier BV",
+  issn          = "0924-7963",
+  doi           = "10.1016/s0924-7963(01)00025-2"
+}
+
+@techreport{      levier.treguier.ea_rpt07,
+  title         = "Free surface and variable volume in the {NEMO} code",
+  pages         = "47",
+  author        = "B. Levier and A.-M. Tr\'{e}guier and G. Madec and V.
+                  Garnier",
+  institution   = "European Union: Marine Environment and Security for the
+                  European Area (MERSEA) Integrated Project",
+  year          = "2007",
+  month         = "may",
+  doi           = "10.5281/zenodo.3244182"
+}
+
+@article{         levy.estublier.ea_GRL01,
+  title         = "Choice of an advection scheme for biogeochemical models",
+  pages         = "3725--3728",
+  journal       = "Geophysical Research Letters",
+  volume        = "28",
+  number        = "19",
+  author        = "M. L\'{e}vy and A. Estublier and G Madec",
+  year          = "2001",
+  month         = "oct",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0094-8276",
+  doi           = "10.1029/2001gl012947"
+}
+
+@article{         levy.klein.ea_OM10,
+  title         = "Modifications of gyre circulation by sub-mesoscale
+                  physics",
+  pages         = "1--15",
+  journal       = "Ocean Modelling",
+  volume        = "34",
+  number        = "1-2",
+  author        = "M. L\'{e}vy and P. Klein and A.-M. Tr\'{e}guier and D.
+                  Iovino and G. Madec and S. Masson and K. Takahashi",
+  year          = "2010",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2010.04.001"
+}
+
+@article{         li.garrett_JMR93,
+  title         = "Cell merging and the jet/downwelling ratio in Langmuir
+                  circulation",
+  pages         = "737--769",
+  journal       = "Journal of Marine Research",
+  volume        = "51",
+  number        = "4",
+  author        = "M. Li and C. Garrett",
+  year          = "1993",
+  month         = "nov",
+  publisher     = "Journal of Marine Research/Yale",
+  issn          = "1543-9542",
+  doi           = "10.1357/0022240933223945"
+}
+
+@article{         losch_JGR08,
+  title         = "Modeling ice shelf cavities in a z coordinate Ocean
+                  General Circulation Model",
+  journal       = "Journal of Geophysical Research",
+  volume        = "113",
+  number        = "C8",
+  author        = "M. Losch",
+  year          = "2008",
+  month         = "aug",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/2007jc004368"
+}
+
+@article{         lott.madec.ea_OM90,
+  title         = "Topographic experiments in an Ocean General Circulation
+                  Model",
+  pages         = "1--4",
+  journal       = "Ocean Modelling",
+  volume        = "88",
+  author        = "F. Lott and G. Madec and J. Verron",
+  year          = "1990"
+}
+
+@article{	  lupkes.gryanik.ea_JGR12,
+  author 	= "L{\"{u}}pkes, Christof and Gryanik, Vladimir M. and Hartmann, J{\"{o}}rg and Andreas, Edgar L.",
+  doi 		= "10.1029/2012JD017630",
+  issn 		= "01480227",
+  journal 	= "Journal of Geophysical Research Atmospheres",
+  number 	= "13",
+  pages 	= "1--18",
+  title 	= "A parametrization, based on sea ice morphology, of the neutral atmospheric drag coefficients for weather prediction and climate models",
+  volume 	= "117",
+  year 		= "2012"
+}
+
+@article{	  lupkes.gryanik_JGR15,
+  author 	= "L{\"{u}}pkes, Christof and Gryanik, Vladimir M.",
+  doi 		= "10.1002/2014JD022418",
+  issn 		= "21562202",
+  journal 	= "Journal of Geophysical Research",
+  number 	= "2",
+  pages 	= "552--581",
+  title 	= "A stability-dependent parametrization of transfer coefficients formomentum and heat over polar sea ice to be used in climate models",
+  volume 	= "120",
+  year 		= "2015"
+}
+
+@article{         madec.chartier.ea_DAO91,
+  title         = "The effect of thermohaline forcing variability on deep
+                  water formation in the western Mediterranean Sea: a
+                  high-resolution three-dimensional numerical study",
+  pages         = "301--332",
+  journal       = "Dynamics of Atmospheres and Oceans",
+  volume        = "15",
+  number        = "3-5",
+  author        = "G. Madec and M. Chartier and M. Cr\'{e}pon",
+  year          = "1991",
+  month         = "apr",
+  publisher     = "Elsevier BV",
+  issn          = "0377-0265",
+  doi           = "10.1016/0377-0265(91)90024-a"
+}
+
+@inproceedings{   madec.crepon_iprc91,
+  title         = "Thermohaline-driven deep water formation in the
+                  northwestern Mediterranean Sea",
+  chapter       = "15",
+  pages         = "241--265",
+  booktitle     = "Deep convection and deep water formation in the oceans,
+                  Proceedings of the international Monterey colloquium on
+                  deep convection and deep water formation in the oceans",
+  editor        = "P.C. Chu and J.C. Gascard",
+  series        = "Elsevier Oceanography",
+  volume        = "57",
+  author        = "G. Madec and M. Cr\'{e}pon",
+  year          = "1991",
+  publisher     = "Elsevier",
+  issn          = "0422-9894",
+  isbn          = "978-0-444-88764-1",
+  doi           = "10.1016/s0422-9894(08)70071-0"
+}
+
+@article{         madec.delecluse.ea_JPO91,
+  title         = "A three-dimensional numerical study of deep-water
+                  formation in the northwestern Mediterranean Sea",
+  pages         = "1349--1371",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "21",
+  number        = "9",
+  author        = "G. Madec and P. Del\'{e}cluse and M. Cr\'{e}pon and M.
+                  Chartier",
+  year          = "1991",
+  month         = "sep",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1991)021<1349:atdnso>2.0.co;2"
+}
+
+@article{         madec.delecluse.ea_JPO96,
+  title         = "Large-Scale Preconditioning of Deep-Water Formation in the
+                  northwestern Mediterranean Sea",
+  pages         = "1393--1408",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "26",
+  number        = "8",
+  author        = "G. Madec and P. Del\'{e}cluse and M. Cr\'{e}pon and F.
+                  Lott",
+  year          = "1996",
+  month         = "aug",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1996)026<1393:lspodw>2.0.co;2"
+}
+
+@book{            madec.delecluse.ea_NPM98,
+  title         = "{OPA} 8.1 Ocean General Circulation Model reference
+                  manual",
+  pages         = "91",
+  journal       = "Note du Pole de Mod\'{e}lisation",
+  volume        = "11",
+  author        = "G. Madec and P. Del\'{e}cluse and M. Imbard and C.
+                  L\'{e}vy",
+  year          = "1998",
+  publisher     = "Institut Pierre Simon Laplace ({IPSL})",
+  issn          = "1288-1619",
+  url           = "http://cmc.ipsl.fr/images/publications/scientific_notes/note11.pdf"
+}
+
+@article{         madec.delecluse_IWN97,
+  title         = "The {OPA}/{ARPEGE} and {OPA}/{LMD} Global Ocean-Atmosphere
+                  Coupled Model",
+  pages         = "12--15",
+  journal       = "International WOCE Newsletter",
+  volume        = "26",
+  author        = "G. Madec and P. Del\'{e}cluse",
+  year          = "1997",
+  month         = "apr",
+  publisher     = "University of Southampton",
+  url           = "https://www.nodc.noaa.gov/woce/wdiu/wocedocs/newsltr/news26/news26.pdf"
+}
+
+@article{         madec.imbard_CD96,
+  title         = "A global ocean mesh to overcome the North Pole
+                  singularity",
+  pages         = "381--388",
+  journal       = "Climate Dynamics",
+  volume        = "12",
+  number        = "6",
+  author        = "G. Madec and M. Imbard",
+  year          = "1996",
+  month         = "may",
+  publisher     = "Springer Nature",
+  issn          = "1432-0894",
+  doi           = "10.1007/bf00211684"
+}
+
+@article{         maltrud.smith.ea_JGR98,
+  title         = "Global eddy-resolving ocean simulations driven by
+                  1985-1995 atmospheric winds",
+  pages         = "30825--30853",
+  journal       = "Journal of Geophysical Research",
+  volume        = "103",
+  number        = "C13",
+  author        = "M. E. Maltrud and R. D. Smith and A. J. Semtner and R. C.
+                  Malone",
+  year          = "1998",
+  month         = "dec",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/1998jc900013"
+}
+
+@article{         marchesiello.mcwilliams.ea_OM01,
+  title         = "Open boundary conditions for long-term integration of
+                  regional oceanic models",
+  pages         = "1--20",
+  journal       = "Ocean Modelling",
+  volume        = "3",
+  number        = "1-2",
+  author        = "P. Marchesiello and J. C. McWilliams and A. Shchepetkin",
+  year          = "2001",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/s1463-5003(00)00013-5"
+}
+
+@article{         marsaleix.auclair.ea_OM08,
+  title         = "Energy conservation issues in sigma-coordinate
+                  free-surface ocean models",
+  pages         = "61--89",
+  journal       = "Ocean Modelling",
+  volume        = "20",
+  number        = "1",
+  author        = "P. Marsaleix and F. Auclair and J. W. Floor and M. J.
+                  Herrmann and C. Estournel and I. Pairaud and C. Ulses",
+  year          = "2008",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2007.07.005"
+}
+
+@article{         marsh.ivchenko.ea_GMD15,
+  title         = "{NEMO}-{ICB} (v1.0): interactive icebergs in the {NEMO}
+                  ocean model globally configured at eddy-permitting
+                  resolution",
+  pages         = "1547--1562",
+  journal       = "Geoscientific Model Development",
+  volume        = "8",
+  number        = "5",
+  author        = "R. Marsh and V. O. Ivchenko and N. Skliris and S. Alderson
+                  and G. R. Bigg and G. Madec and A. T. Blaker and Y. Aksenov
+                  and B. Sinha and A. C. Coward and J. {Le Sommer} and N.
+                  Merino and V. B. Zalesny",
+  year          = "2015",
+  month         = "may",
+  publisher     = "Copernicus GmbH",
+  issn          = "1991-9603",
+  doi           = "10.5194/gmd-8-1547-2015"
+}
+
+@article{         marti.madec.ea_JGR92,
+  title         = "Comment on ``{N}et diffusivity in ocean general
+                  circulation models with nonuniform grids'' by {F}. {L}. Yin
+                  and {I}. {Y}. Fung",
+  pages         = "12763--12766",
+  journal       = "Journal of Geophysical Research",
+  volume        = "97",
+  number        = "C8",
+  author        = "O. Marti and G. Madec and P. Del\'{e}cluse",
+  year          = "1992",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/92jc00306"
+}
+
+@article{         martin.adcroft_OM10,
+  title         = "Parameterizing the fresh-water flux from land ice to ocean
+                  with interactive icebergs in a coupled climate model",
+  pages         = "111--124",
+  journal       = "Ocean Modelling",
+  volume        = "34",
+  number        = "3-4",
+  author        = "T. Martin and A. Adcroft",
+  year          = "2010",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2010.05.001"
+}
+
+@article{         mathiot.jenkins.ea_GMD17,
+  title         = "Explicit representation and parametrised impacts of under
+                  ice shelf seas in the \zstar coordinate ocean model {NEMO}
+                  3.6",
+  pages         = "2849--2874",
+  journal       = "Geoscientific Model Development",
+  volume        = "10",
+  number        = "7",
+  author        = "P. Mathiot and A. Jenkins and C. Harris and G. Madec",
+  year          = "2017",
+  month         = "jul",
+  publisher     = "Copernicus GmbH",
+  issn          = "1991-9603",
+  doi           = "10.5194/gmd-10-2849-2017"
+}
+
+@article{         mcdougall.taylor_JMR84,
+  title         = "Flux measurements across a finger interface at low values
+                  of the stability ratio",
+  pages         = "1--14",
+  journal       = "Journal of Marine Research",
+  volume        = "42",
+  number        = "1",
+  author        = "T. J. McDougall and J. R. Taylor",
+  year          = "1984",
+  month         = "feb",
+  publisher     = "Journal of Marine Research/Yale",
+  issn          = "1543-9542",
+  doi           = "10.1357/002224084788506095"
+}
+
+@article{         mcdougall_JPO87,
+  title         = "Neutral Surfaces",
+  pages         = "1950--1964",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "17",
+  number        = "11",
+  author        = "T. J. McDougall",
+  year          = "1987",
+  month         = "nov",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1987)017<1950:ns>2.0.co;2"
+}
+
+@article{mcwilliams.ea_JFM97,
+	author = {McWilliams, James C. and Sullivan, Peter P. and Moeng, Chin-Hoh},
+	doi = {10.1017/S0022112096004375},
+	journal = {Journal of Fluid Mechanics},
+	pages = {1--30},
+	title = {Langmuir turbulence in the ocean},
+	volume = {334},
+	year = {1997},
+}
+@article{         mellor.blumberg_JPO04,
+  title         = "Wave Breaking and Ocean Surface Layer Thermal Response",
+  pages         = "693--698",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "34",
+  number        = "3",
+  author        = "G. Mellor and A. Blumberg",
+  year          = "2004",
+  month         = "mar",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/2517.1"
+}
+
+@article{         mellor.yamada_RG82,
+  title         = "Development of a turbulence closure model for geophysical
+                  fluid problems",
+  pages         = "851--875",
+  journal       = "Reviews of Geophysics",
+  volume        = "20",
+  number        = "4",
+  author        = "G. L. Mellor and T. Yamada",
+  year          = "1982",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "8755-1209",
+  doi           = "10.1029/rg020i004p00851"
+}
+
+@article{         merryfield.holloway.ea_JPO99,
+  title         = "A Global Ocean Model with Double-Diffusive Mixing",
+  pages         = "1124--1142",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "29",
+  number        = "6",
+  author        = "W. J. Merryfield and G. Holloway and A. E. Gargett",
+  year          = "1999",
+  month         = "jun",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1999)029<1124:agomwd>2.0.co;2"
+}
+
+@book{            mesinger.arakawa_bk76,
+  booktitle     = "Numerical methods used in atmospheric models",
+  series        = "GARP Publication",
+  volume        = "1",
+  number        = "17",
+  author        = "F. Mesinger and A. Arakawa",
+  year          = "1976",
+  month         = "aug",
+  url           = "https://www.researchgate.net/publication/234333726_Numerical_Methods_Used_In_Atmospheric_Models"
+}
+
+@article{         morel.berthon_LO89,
+  title         = "Surface pigments, algal biomass profiles, and potential
+                  production of the euphotic layer: Relationships
+                  reinvestigated in view of remote-sensing applications",
+  pages         = "1545--1562",
+  journal       = "Limnology and Oceanography",
+  volume        = "34",
+  number        = "8",
+  author        = "A. Morel and J.-F. Berthon",
+  year          = "1989",
+  month         = "dec",
+  publisher     = "Wiley",
+  issn          = "0024-3590",
+  doi           = "10.4319/lo.1989.34.8.1545"
+}
+
+@article{         morel.maritorena_JGR01,
+  title         = "Bio-optical properties of oceanic waters: {A} reappraisal",
+  pages         = "7163--7180",
+  journal       = "Journal of Geophysical Research",
+  volume        = "106",
+  number        = "C4",
+  author        = "A. Morel and S. Maritorena",
+  year          = "2001",
+  month         = "apr",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/2000jc000319"
+}
+
+@article{         morel_JGR88,
+  title         = "Optical modeling of the upper ocean in relation to its
+                  biogenous matter content (case {I} waters)",
+  pages         = "10749--10768",
+  journal       = "Journal of Geophysical Research",
+  volume        = "93",
+  number        = "C9",
+  author        = "A. Morel",
+  year          = "1988",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/jc093ic09p10749"
+}
+
+@article{         murray_JCP96,
+  title         = "Explicit Generation of Orthogonal Grids for Ocean Models",
+  pages         = "251--273",
+  journal       = "Journal of Computational Physics",
+  volume        = "126",
+  number        = "2",
+  author        = "R. J. Murray",
+  year          = "1996",
+  month         = "jul",
+  publisher     = "Elsevier BV",
+  issn          = "0021-9991",
+  doi           = "10.1006/jcph.1996.0136"
+}
+
+@article{         oey_OM06,
+  title         = "An {OGCM} with movable land-sea boundaries",
+  pages         = "176--195",
+  journal       = "Ocean Modelling",
+  volume        = "13",
+  number        = "2",
+  author        = "L.-Y. Oey",
+  year          = "2006",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2006.01.001"
+}
+
+@article{         osborn_JPO80,
+  title         = "Estimates of the local rate of vertical diffusion from
+                  dissipation measurements",
+  pages         = "83--89",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "10",
+  number        = "1",
+  author        = "T. R. Osborn",
+  year          = "1980",
+  month         = "jan",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1980)010<0083:eotlro>2.0.co;2"
+}
+
+@article{         pacanowski.gnanadesikan_MWR98,
+  title         = "Transient response in a z-level ocean model that resolves
+                  topography with partial-cells",
+  pages         = "3248--3270",
+  journal       = "Monthly Weather Review",
+  volume        = "126",
+  number        = "12",
+  author        = "R. C. Pacanowski and A. Gnanadesikan",
+  year          = "1998",
+  month         = "dec",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0493",
+  doi           = "10.1175/1520-0493(1998)126<3248:triazl>2.0.co;2"
+}
+
+@article{         pacanowski.philander_JPO81,
+  title         = "Parameterization of Vertical Mixing in Numerical Models of
+                  Tropical Oceans",
+  pages         = "1443--1451",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "11",
+  number        = "11",
+  author        = "R. C. Pacanowski and S. G. H. Philander",
+  year          = "1981",
+  month         = "nov",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1981)011<1443:povmin>2.0.co;2"
+}
+
+@article{         paulson.simpson_JPO77,
+  title         = "Irradiance Measurements in the Upper Ocean",
+  pages         = "952--956",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "7",
+  number        = "6",
+  author        = "C. A. Paulson and J. J. Simpson",
+  year          = "1977",
+  month         = "nov",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1977)007<0952:imituo>2.0.co;2"
+}
+
+@article{         penduff.le-sommer.ea_OS07,
+  title         = "Influence of numerical schemes on current-topography
+                  interactions in 1/4\deg global ocean simulations",
+  pages         = "509--524",
+  journal       = "Ocean Science",
+  volume        = "3",
+  number        = "4",
+  author        = "T. Penduff and J. {Le Sommer} and B. Barnier and A.-M.
+                  Tr\'{e}guier and J.-M. Molines and G. Madec",
+  year          = "2007",
+  month         = "dec",
+  publisher     = "Copernicus GmbH",
+  issn          = "1812-0792",
+  doi           = "10.5194/os-3-509-2007"
+}
+
+@article{         phillips_TAMS59,
+  title         = "Dissipative operators and hyperbolic systems of partial
+                  differential equations",
+  pages         = "193--254",
+  journal       = "Transactions of the American Mathematical Society",
+  volume        = "90",
+  number        = "2",
+  author        = "R. S. Phillips",
+  year          = "1959",
+  month         = "feb",
+  publisher     = "American Mathematical Society (AMS)",
+  issn          = "0002-9947",
+  doi           = "10.1090/s0002-9947-1959-0104919-1"
+}
+
+@article{         qiao.yuan.ea_OD10,
+  title         = "A three-dimensional surface wave–ocean circulation coupled 
+                  model and its initial testing",
+  pages         = "1339--1335",
+  journal       = "Ocean Dynamics",
+  volume        = "60",
+  number        = "5",
+  author        = "F. Qiao and Y. Yuan and T. Ezer and C. Xia and 
+                   Y. Yang and X. Lu and Z. Song ",
+  year          = "2010",
+  month         = "oct",
+  publisher     = "Springer-Verlag",
+  issn          = "1616-7341",
+  doi           = "10.1007/s10236-010-0326-y"
+}
+
+@article{         redi_JPO82,
+  title         = "Oceanic isopycnal mixing by coordinate rotation",
+  pages         = "1154--1158",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "12",
+  number        = "10",
+  author        = "M. H. Redi",
+  year          = "1982",
+  month         = "oct",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1982)012<1154:oimbcr>2.0.co;2"
+}
+
+@article{         reffray.guillaume.ea_GMD15,
+  title         = "Modelling turbulent vertical mixing sensitivity using
+                   a 1-D version of NEMO",
+  pages         = "69--86",
+  journal       = "Geoscientific Model Development",
+  volume        = "8",
+  number        = "1",
+  author        = "G. Reffray. and R. Bourdalle-Badie and C. Calone",
+  year          = "2015",
+  month         = "jan",
+  publisher     = "Copernicus GmbH",
+  issn          = "1991-9603",
+  doi           = "10.5194/gmd-8-69-2015"
+}
+
+@book{            richtmyer.morton_bk67,
+  pages         = "405",
+  booktitle     = "Difference methods for initial-value problems",
+  edition       = "2",
+  series        = "Interscience tracts in pure and applied mathematics",
+  author        = "R. D. Richtmyer and K. W. Morton",
+  year          = "1967",
+  publisher     = "Interscience",
+  issn          = "0074-994X",
+  isbn          = "9780470720400",
+  url           = "https://books.google.fr/books?id=nd1QAAAAMAAJ"
+}
+
+@article{         robert_JMSJ66,
+  title         = "The integration of a low order spectral form of the
+                  primitive meteorological equations",
+  pages         = "237--245",
+  journal       = "Journal of the Meteorological Society of Japan",
+  volume        = "44",
+  number        = "5",
+  author        = "A. J. Robert",
+  year          = "1966",
+  publisher     = "Meteorological Society of Japan",
+  issn          = "2186-9057",
+  doi           = "10.2151/jmsj1965.44.5\_237"
+}
+
+@article{         rodgers.aumont.ea_B14,
+  title         = "Strong sensitivity of Southern Ocean carbon uptake and
+                  nutrient cycling to wind stirring",
+  pages         = "4077--4098",
+  journal       = "Biogeosciences",
+  volume        = "11",
+  number        = "15",
+  author        = "K. B. Rodgers and O. Aumont and S. E. Mikaloff Fletcher
+                  and Y. Plancherel and L. Bopp and C. {de Boyer
+                  Mont\'{e}gut} and D. Iudicone and R. F. Keeling and G.
+                  Madec and R. Wanninkhof",
+  year          = "2014",
+  month         = "aug",
+  publisher     = "Copernicus GmbH",
+  issn          = "1726-4189",
+  doi           = "10.5194/bg-11-4077-2014"
+}
+
+@article{         rodi_JGR87,
+  title         = "Examples of calculation methods for flow and mixing in
+                  stratified fluids",
+  pages         = "5305--5328",
+  journal       = "Journal of Geophysical Research",
+  volume        = "92",
+  number        = "C5",
+  author        = "W. Rodi",
+  year          = "1987",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/jc092ic05p05305"
+}
+
+@article{         roquet.madec.ea_JPO15,
+  title         = "Defining a simplified yet ``realistic'' equation of state
+                  for seawater",
+  pages         = "2564--2579",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "45",
+  number        = "10",
+  author        = "F. Roquet and G. Madec and L. Brodeau and J. Nycander",
+  year          = "2015",
+  month         = "oct",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/jpo-d-15-0080.1"
+}
+
+@article{         roquet.madec.ea_OM15,
+  title         = "Accurate polynomial expressions for the density and
+                  specific volume of seawater using the {TEOS}-10 standard",
+  pages         = "29--43",
+  journal       = "Ocean Modelling",
+  volume        = "90",
+  author        = "F. Roquet and G. Madec and T. J. McDougall and P. M.
+                  Barker",
+  year          = "2015",
+  month         = "jun",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2015.04.002"
+}
+
+@article{         roullet.madec_JGR00,
+  title         = "Salt conservation, free surface, and varying levels: {A}
+                  new formulation for Ocean General Circulation Models",
+  pages         = "23927--23942",
+  journal       = "Journal of Geophysical Research",
+  volume        = "105",
+  number        = "C10",
+  author        = "G. Roullet and G. Madec",
+  year          = "2000",
+  month         = "oct",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/2000jc900089"
+}
+
+@article{         sarmiento.bryan_JGR82,
+  title         = "An ocean transport model for the North Atlantic",
+  pages         = "394--409",
+  journal       = "Journal of Geophysical Research",
+  volume        = "87",
+  number        = "C1",
+  author        = "J. L. Sarmiento and K. Bryan",
+  year          = "1982",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/jc087ic01p00394"
+}
+
+@article{         saunders_JAS67,
+  title         = "The temperature at the ocean-air interface",
+  pages         = "269--273",
+  journal       = "Journal of the Atmospheric Sciences",
+  volume        = "24",
+  number        = "3",
+  author        = "P. M. Saunders",
+  year          = "1967",
+  month         = "may",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0469",
+  doi           = "10.1175/1520-0469(1967)024<0269:ttatoa>2.0.co;2"
+}
+
+@article{         shchepetkin.mcwilliams_OM05,
+  title         = "The regional oceanic modeling system ({ROMS}): a
+                  split-explicit, free-surface,
+                  topography-following-coordinate oceanic model",
+  pages         = "347--404",
+  journal       = "Ocean Modelling",
+  volume        = "9",
+  number        = "4",
+  author        = "A. F. Shchepetkin and J. C. McWilliams",
+  year          = "2005",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2004.08.002"
+}
+
+@inbook{          shchepetkin.mcwilliams_ibk09,
+  title         = "Computational kernel algorithms for fine-scale,
+                  multiprocess, longtime oceanic simulations",
+  chapter       = "2",
+  pages         = "121--183",
+  booktitle     = "Computational Methods for the Atmosphere and the Oceans",
+  editor        = "R. M. Temam and J. J. Tribbia",
+  series        = "Handbook of Numerical Analysis",
+  volume        = "14",
+  author        = "A. F. Shchepetkin and J. C. McWilliams",
+  year          = "2009",
+  publisher     = "Elsevier",
+  issn          = "1570-8659",
+  isbn          = "9780444518934",
+  doi           = "10.1016/s1570-8659(08)01202-0"
+}
+
+@article{         shchepetkin_OM15,
+  title         = "An Adaptive, Courant-number-dependent implicit
+  		 scheme for vertical advection in oceanic modeling",
+  pages         = "38--69",
+  journal       = "Ocean Modelling",
+  volume        = "91",
+  author        = "A. F. Shchepetkin",
+  year          = "2015",
+  month         = "july",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2015.03.006"
+}
+
+@article{         siddorn.furner_OM13,
+  title         = "An analytical stretching function that combines the best
+                  attributes of geopotential and terrain-following vertical
+                  coordinates",
+  pages         = "1--13",
+  journal       = "Ocean Modelling",
+  volume        = "66",
+  author        = "J. R. Siddorn and R. Furner",
+  year          = "2013",
+  month         = "jun",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2013.02.001"
+}
+
+@article{         simmons.jayne.ea_OM04,
+  title         = "Tidally driven mixing in a numerical model of the ocean
+                  general circulation",
+  pages         = "245--263",
+  journal       = "Ocean Modelling",
+  volume        = "6",
+  number        = "3-4",
+  author        = "H. L. Simmons and S. R. Jayne and L. C. {St Laurent} and
+                  A. J. Weaver",
+  year          = "2004",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/s1463-5003(03)00011-8"
+}
+
+@article{         smagorinsky_MW63,
+  title         = "General circulation experiments with the primitive equations: I. The basic experiment ",
+  pages         = "99--164",
+  journal       = "Monthly Weather Review",
+  volume        = "91",
+  number        = "3",
+  author        = "J. Smagorinsky",
+  year          = "1963",
+  month         = "mar",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0493",
+  doi           = "10.1175/1520-0493(1963)091<0099:GCEWTP>2.3.CO;2"
+}
+
+@article{         song.haidvogel_JCP94,
+  title         = "A semi-implicit ocean circulation model using a
+                  generalized topography-following coordinate system",
+  pages         = "228--244",
+  journal       = "Journal of Computational Physics",
+  volume        = "115",
+  number        = "1",
+  author        = "Y. Song and D. Haidvogel",
+  year          = "1994",
+  month         = "nov",
+  publisher     = "Elsevier BV",
+  issn          = "0021-9991",
+  doi           = "10.1006/jcph.1994.1189"
+}
+
+@article{         song_MWR98,
+  title         = "A General Pressure Gradient Formulation for Ocean Models.
+                  Part {I}: Scheme Design and Diagnostic Analysis",
+  pages         = "3213--3230",
+  journal       = "Monthly Weather Review",
+  volume        = "126",
+  number        = "12",
+  author        = "Y. T. Song",
+  year          = "1998",
+  month         = "dec",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0493",
+  doi           = "10.1175/1520-0493(1998)126<3213:agpgff>2.0.co;2"
+}
+
+@article{         st-laurent.nash_DSR04,
+  title         = "An examination of the radiative and dissipative properties
+                  of deep ocean internal tides",
+  pages         = "3029--3042",
+  journal       = "Deep Sea Research",
+  volume        = "51",
+  number        = "25-26",
+  author        = "L. C. {St Laurent} and J. D. Nash",
+  year          = "2004",
+  month         = "dec",
+  publisher     = "Elsevier BV",
+  issn          = "0967-0645",
+  doi           = "10.1016/j.dsr2.2004.09.008"
+}
+
+@article{         st-laurent.simmons.ea_GRL02,
+  title         = "Estimating tidally driven mixing in the deep ocean",
+  pages         = "2101--2104",
+  journal       = "Geophysical Research Letters",
+  volume        = "29",
+  number        = "23",
+  author        = "L. C. {St Laurent} and H. L. Simmons and S. R. Jayne",
+  year          = "2002",
+  month         = "dec",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0094-8276",
+  doi           = "10.1029/2002gl015633"
+}
+
+@article{         stacey_JPO99,
+  title         = "Simulations of the wind-forced near-surface circulation in
+                  Knight Inlet: {A} parameterization of the roughness length",
+  pages         = "1363--1367",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "29",
+  number        = "6",
+  author        = "M. W. Stacey",
+  year          = "1999",
+  month         = "jun",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1999)029<1363:sotwfn>2.0.co;2"
+}
+
+@article{         steele.morley.ea_JC01,
+  title         = "{PHC}: {A} global ocean hydrography with a high-quality
+                  Arctic Ocean",
+  pages         = "2079--2087",
+  journal       = "Journal of Climate",
+  volume        = "14",
+  number        = "9",
+  author        = "M. Steele and R. Morley and W. Ermold",
+  year          = "2001",
+  month         = "may",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0442",
+  doi           = "10.1175/1520-0442(2001)014<2079:pagohw>2.0.co;2"
+}
+
+@article{         stein.stein_N92,
+  title         = "A model for the global variation in oceanic depth and heat
+                  flow with lithospheric age",
+  pages         = "123--129",
+  journal       = "Nature",
+  volume        = "359",
+  number        = "6391",
+  author        = "C. A. Stein and S. Stein",
+  year          = "1992",
+  month         = "sep",
+  publisher     = "Springer Nature",
+  issn          = "1476-4687",
+  doi           = "10.1038/359123a0"
+}
+
+@inbook{          stokes_ibk09,
+  title         = "On the theory of oscillatory waves",
+  chapter       = "12",
+  pages         = "197--229",
+  booktitle     = "Mathematical and Physical Papers",
+  series        = "Cambridge Library Collection - Mathematics",
+  volume        = "1",
+  author        = "G. G. Stokes",
+  year          = "2009",
+  publisher     = "Cambridge University Press",
+  isbn          = "9780511702242",
+  doi           = "10.1017/cbo9780511702242.013"
+}
+
+@article{         takaya.bidlot.ea_JGR10,
+  title         = "Refinements to a prognostic scheme of skin sea surface
+                  temperature",
+  pages         = "C06009",
+  journal       = "Journal of Geophysical Research",
+  volume        = "115",
+  number        = "C6",
+  author        = "Y. Takaya and J-R. Bidlot and A. C. M. Beljaars and P. A.
+                  E. M. Janssen",
+  year          = "2010",
+  month         = "jun",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/2009jc005985"
+}
+
+@article{         talagrand_JAS72,
+  title         = "On the damping of high-frequency motions in
+                  four-dimensional assimilation of meteorological data",
+  pages         = "1571--1574",
+  journal       = "Journal of the Atmospheric Sciences",
+  volume        = "29",
+  number        = "8",
+  author        = "O. Talagrand",
+  year          = "1972",
+  month         = "nov",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0469",
+  doi           = "10.1175/1520-0469(1972)029<1571:otdohf>2.0.co;2"
+}
+
+@article{         treguier.dukowicz.ea_JGR96,
+  title         = "Properties of nonuniform grids used in ocean general
+                  circulation models",
+  pages         = "20877--20881",
+  journal       = "Journal of Geophysical Research",
+  volume        = "101",
+  number        = "C9",
+  author        = "A.-M. Tr\'{e}guier and J. K. Dukowicz and K. Bryan",
+  year          = "1996",
+  month         = "sep",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/96jc01753"
+}
+
+@article{         treguier.held.ea_JPO97,
+  title         = "Parameterization of Quasigeostrophic Eddies in Primitive
+                  Equation Ocean Models",
+  pages         = "567--580",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "27",
+  number        = "4",
+  author        = "A. M. Tr\'{e}guier and I. M. Held and V. D. Larichev",
+  year          = "1997",
+  month         = "apr",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1997)027<0567:poqeip>2.0.co;2"
+}
+
+@article{         treguier_JGR92,
+  title         = "Kinetic energy analysis of an eddy resolving, primitive
+                  equation model of the North Atlantic",
+  pages         = "687--701",
+  journal       = "Journal of Geophysical Research",
+  volume        = "97",
+  number        = "C1",
+  author        = "A. M. Tr\'{e}guier",
+  year          = "1992",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/91jc02350"
+}
+
+@article{         tu.tsuang_GRL05,
+  title         = "Cool-skin simulation by a one-column ocean model",
+  pages         = "L22602",
+  journal       = "Geophysical Research Letters",
+  volume        = "32",
+  number        = "22",
+  author        = "C.-Y. Tu and B.-J. Tsuang",
+  year          = "2005",
+  month         = "nov",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0094-8276",
+  doi           = "10.1029/2005gl024252"
+}
+
+@article{         umlauf.burchard_CSR05,
+  title         = "Second-order turbulence closure models for geophysical
+                  boundary layers. {A} review of recent work",
+  pages         = "795--827",
+  journal       = "Continental Shelf Research",
+  volume        = "25",
+  number        = "7-8",
+  author        = "L. Umlauf and H. Burchard",
+  year          = "2005",
+  month         = "may",
+  publisher     = "Elsevier BV",
+  issn          = "0278-4343",
+  doi           = "10.1016/j.csr.2004.08.004"
+}
+
+@article{         umlauf.burchard_JMR03,
+  title         = "A generic length-scale equation for geophysical turbulence
+                  models",
+  pages         = "235--265",
+  journal       = "Journal of Marine Research",
+  volume        = "61",
+  number        = "2",
+  author        = "L. Umlauf and H. Burchard",
+  year          = "2003",
+  month         = "mar",
+  publisher     = "Journal of Marine Research/Yale",
+  issn          = "0022-2402",
+  doi           = "10.1357/002224003322005087"
+}
+
+@book{            vallis_bk06,
+  booktitle     = "Atmospheric and Oceanic Fluid Dynamics",
+  author        = "G. K. Vallis",
+  year          = "2006",
+  publisher     = "Cambridge University Press",
+  isbn          = "9780511790447",
+  doi           = "10.1017/cbo9780511790447"
+}
+
+@article{         vancoppenolle.fichefet.ea_OM09*a,
+  title         = "Simulating the mass balance and salinity of Arctic and
+                  Antarctic sea ice. 1. Model description and validation",
+  pages         = "33--53",
+  journal       = "Ocean Modelling",
+  volume        = "27",
+  number        = "1-2",
+  author        = "M. Vancoppenolle and T. Fichefet and H. Goosse and S.
+                  Bouillon and G. Madec and M. A. Morales Maqueda",
+  year          = "2009",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2008.10.005"
+}
+
+@article{         vancoppenolle.fichefet.ea_OM09*b,
+  title         = "Simulating the mass balance and salinity of Arctic and
+                  Antarctic sea ice. 2. Importance of sea ice salinity
+                  variations",
+  pages         = "54--69",
+  journal       = "Ocean Modelling",
+  volume        = "27",
+  number        = "1-2",
+  author        = "M. Vancoppenolle and T. Fichefet and H. Goosse",
+  year          = "2009",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2008.11.003"
+}
+
+@article{         warner.defne.ea_CG13,
+  title         = "A wetting and drying scheme for {ROMS}",
+  pages         = "54--61",
+  journal       = "Computers \& Geosciences",
+  volume        = "58",
+  author        = "J. C. Warner and Z. Defne and K. Haas and H. G. Arango",
+  year          = "2013",
+  month         = "aug",
+  publisher     = "Elsevier BV",
+  issn          = "0098-3004",
+  doi           = "10.1016/j.cageo.2013.05.004"
+}
+
+@article{         warner.sherwood.ea_OM05,
+  title         = "Performance of four turbulence closure models implemented
+                  using a generic length scale method",
+  pages         = "81--113",
+  journal       = "Ocean Modelling",
+  volume        = "8",
+  number        = "1-2",
+  author        = "J. C. Warner and C. R. Sherwood and H. G. Arango and R. P.
+                  Signell",
+  year          = "2005",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "1463-5003",
+  doi           = "10.1016/j.ocemod.2003.12.003"
+}
+
+@article{         weatherly_JMR84,
+  title         = "An estimate of bottom frictional dissipation by Gulf
+                  Stream fluctuations",
+  pages         = "289--301",
+  journal       = "Journal of Marine Research",
+  volume        = "42",
+  number        = "2",
+  author        = "G. L. Weatherly",
+  year          = "1984",
+  month         = "may",
+  publisher     = "Journal of Marine Research/Yale",
+  issn          = "1543-9542",
+  doi           = "10.1357/002224084788502729"
+}
+
+@article{         weaver.eby_JPO97,
+  title         = "On the numerical implementation of advection schemes for
+                  use in conjuction with various mixing parameterizations in
+                  the {GFDL} ocean model",
+  pages         = "369--377",
+  journal       = "Journal of Physical Oceanography",
+  volume        = "27",
+  number        = "2",
+  author        = "A. J. Weaver and M. Eby",
+  year          = "1997",
+  month         = "feb",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0485",
+  doi           = "10.1175/1520-0485(1997)027<0369:otnioa>2.0.co;2"
+}
+
+@article{         webb.de-cuevas.ea_JAOT98,
+  title         = "Improved Advection Schemes for Ocean Models",
+  pages         = "1171--1187",
+  journal       = "Journal of Atmospheric and Oceanic Technology",
+  volume        = "15",
+  number        = "5",
+  author        = "D. J. Webb and B. A. {de Cuevas} and C. S. Richmond",
+  year          = "1998",
+  month         = "oct",
+  publisher     = "American Meteorological Society",
+  issn          = "1520-0426",
+  doi           = "10.1175/1520-0426(1998)015<1171:iasfom>2.0.co;2"
+}
+
+@article{         white.hoskins.ea_QJRMS05,
+  title         = "Consistent approximate models of the global atmosphere: shallow, deep,
+                  hydrostatic, quasi-hydrostatic and non-hydrostatic",
+  pages         = "2081--2107",
+  journal       = "Quarterly Journal of the Royal Meteorological Society",
+  volume        = "131",
+  author        = "A. A. White and B. J. Hoskins and I. Roulstone and A. Staniforth",
+  year          = "2005",
+  doi           = "10.1256/qj.04.49"
+}
+
+@article{         white.adcroft.ea_JCP09,
+  title         = "High-order regridding-remapping schemes for continuous
+                  isopycnal and generalized coordinates in ocean models",
+  pages         = "8665--8692",
+  journal       = "Journal of Computational Physics",
+  volume        = "228",
+  number        = "23",
+  author        = "L. White and A. Adcroft and R. Hallberg",
+  year          = "2009",
+  month         = "dec",
+  publisher     = "Elsevier BV",
+  issn          = "0021-9991",
+  doi           = "10.1016/j.jcp.2009.08.016"
+}
+
+@article{         wilcox_AJ88,
+  title         = "Reassessment of the scale-determining equation for
+                  advanced turbulence models",
+  pages         = "1299--1310",
+  journal       = "AIAA Journal",
+  volume        = "26",
+  number        = "11",
+  author        = "D. C. Wilcox",
+  year          = "1988",
+  month         = "nov",
+  publisher     = "American Institute of Aeronautics and Astronautics (AIAA)",
+  issn          = "1533-385X",
+  doi           = "10.2514/3.10041"
+}
+
+@article{         willebrand.barnier.ea_PO01,
+  title         = "Circulation characteristics in three eddy-permitting
+                  models of the North Atlantic",
+  pages         = "123--161",
+  journal       = "Progress in Oceanography",
+  volume        = "48",
+  number        = "2-3",
+  author        = "J. Willebrand and B. Barnier and C. B{\"{o}}ning and C.
+                  Dieterich and P. D. Killworth and C. Le Provost and Y. Jia
+                  and J.-M. Molines and A. L. New",
+  year          = "2001",
+  month         = "jan",
+  publisher     = "Elsevier BV",
+  issn          = "0079-6611",
+  doi           = "10.1016/s0079-6611(01)00003-9"
+}
+
+@article{         zalesak_JCP79,
+  title         = "Fully multidimensional flux-corrected transport algorithms
+                  for fluids",
+  pages         = "335--362",
+  journal       = "Journal of Computational Physics",
+  volume        = "31",
+  number        = "3",
+  author        = "S. T. Zalesak",
+  year          = "1979",
+  month         = "jun",
+  publisher     = "Elsevier BV",
+  issn          = "0021-9991",
+  doi           = "10.1016/0021-9991(79)90051-2"
+}
+
+@article{         zhang.endoh_JGR92,
+  title         = "A free surface General Circulation Model for the tropical
+                  Pacific Ocean",
+  pages         = "11237--11255",
+  journal       = "Journal of Geophysical Research",
+  volume        = "97",
+  number        = "C7",
+  author        = "R.-H. Zhang and M. Endoh",
+  year          = "1992",
+  publisher     = "American Geophysical Union (AGU)",
+  issn          = "0148-0227",
+  doi           = "10.1029/92jc00911"
+}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/bibtool.rsc
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/bibtool.rsc	(revision 11086)
+++ 	(revision )
@@ -1,46 +1,0 @@
-fmt.name.name = "_"
-fmt.et.al     = "_ea"
-
-## Switch of tab indentation for readability under terminal, Trac, ...
-print.use.tab = off
-
-## Make brace the only delimiter
-rewrite.rule = {"^\"\([^#]*\)\"$" "{\1}"}
-
-## Remove void fields
-#rewrite.rule = { "^\" *\"$" }
-rewrite.rule = { "^{ *}$" }
-
-#print { Remove unnecessary fields }
-#delete.field = { address      }
-#delete.field = { chapter      }
-#delete.field = { institution  }
-#delete.field = { isbn         }
-#delete.field = { issn         }
-#delete.field = { issue        }
-#delete.field = { keywords     }
-#delete.field = { language     }
-#delete.field = { note         }
-#delete.field = { number       }
-#delete.field = { organisation }
-#delete.field = { pages        }
-#delete.field = { pdf          }
-#delete.field = { series       }
-#delete.field = { school       }
-#delete.field = { type         }
-#delete.field = { url if field = "doi" }
-#delete.field = { volume       }
-
-## default order for 1st fields
-#sort.order = { * = author # title # booktitle # journal # publisher # editor # year # month # doi # url }
-
-#print { Generate new citation keys }
-ignored.word = "of"
-ignored.word = "and"
-ignored.word = "in"
-## To check duplicates, prevent the key generation by commenting the next lines
-#key.format = { %-2n(author)_%-5.1W(journal)%2d(year) }
-#key.format = { %-2n(author)_%2d(year) }
-
-print { Sort entries by key }
-sort = on
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/blocks.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/blocks.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/blocks.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/blocks.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/chapters.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/chapters.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/chapters.tex	(revision 11831)
@@ -0,0 +1,20 @@
+\subfile{../subfiles/chap_model_basics}   %% 1.
+\subfile{../subfiles/chap_time_domain}    %% 2.  Time discretisation (time stepping strategy)
+\subfile{../subfiles/chap_DOM}            %% 3.  Space discretisation
+\subfile{../subfiles/chap_TRA}            %% 4.  Tracer advection/diffusion equation
+\subfile{../subfiles/chap_DYN}            %% 5.  Dynamics : momentum equation
+\subfile{../subfiles/chap_SBC}            %% 6.  Surface Boundary Conditions
+\subfile{../subfiles/chap_LBC}            %% 7.  Lateral Boundary Conditions
+\subfile{../subfiles/chap_LDF}            %% 8.  Lateral diffusion
+\subfile{../subfiles/chap_ZDF}            %% 9.  Vertical diffusion
+\subfile{../subfiles/chap_DIA}            %% 10. Outputs and Diagnostics
+\subfile{../subfiles/chap_OBS}            %% 11. Observation operator
+\subfile{../subfiles/chap_ASM}            %% 12. Assimilation increments
+\subfile{../subfiles/chap_STO}            %% 13. Stochastic param.
+\subfile{../subfiles/chap_misc}           %% 14. Miscellaneous topics
+\subfile{../subfiles/chap_cfgs}           %% 15. Predefined configurations
+
+%% Not included
+%\subfile{../subfiles/chap_model_basics_zstar}
+%\subfile{../subfiles/chap_DIU}
+%\subfile{../subfiles/chap_conservation}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/introduction.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/introduction.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/introduction.tex	(revision 11831)
@@ -0,0 +1,142 @@
+
+\chapter*{Introduction}
+
+%\chaptertoc
+
+%\paragraph{Changes record} ~\\
+
+%\thispagestyle{plain}
+
+%{\footnotesize
+%  \begin{tabularx}{\textwidth}{l||X|X}
+%    Release & Author(s) & Modifications \\
+%    \hline
+%    {\em x.x} & {\em ...} & {\em ...}   \\
+%    {\em ...} & {\em ...} & {\em ...}   \\
+%  \end{tabularx}
+%}
+
+%\clearpage
+
+The \textbf{N}ucleus for \textbf{E}uropean \textbf{M}odelling of the \textbf{O}cean (\NEMO) is
+a framework of ocean related engines, namely the aforementioned for
+the ocean dynamics and thermodynamics,
+\SIcube \footnote{\textbf{S}ea-\textbf{I}ce modelling \textbf{I}ntegrated \textbf{I}nitiative}
+for the sea-ice dynamics and thermodynamics,
+\TOP \footnote{\textbf{T}racer in the \textbf{O}cean \textbf{P}aradigm} for
+the biogeochemistry (both transport and sources minus sinks
+(\PISCES \footnote{
+  \textbf{P}elagic \textbf{I}nteractions \textbf{S}cheme for
+  \textbf{C}arbon and \textbf{E}cosystem \textbf{S}tudies
+}
+)).
+The ocean component has been developed from the legacy of
+the \OPA \footnote{\textbf{O}c\'{e}an \textbf{PA}rall\'{e}lis\'{e} (French)}
+model, 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 as a model coupled with the sea-ice and/or the atmosphere.
+
+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
+exported in a web or printable format (see \path{./doc/rst}).
+Also a online copy is available on the \href{http://forge.ipsl.jussieu.fr/nemo}{forge platform}.
+
+%% =================================================================================================
+\section*{Manual outline}
+
+\subsection*{Chapters}
+
+The manual mirrors the organization of the model and it is organised in as follows:
+after the presentation of the continuous equations
+(primitive equations with temperature and salinity, and an equation of seawater) in the next chapter,
+the following chapters refer to specific terms of the equations each associated with
+a group of modules.
+
+\begin{description}
+\item [\nameref{chap:MB}] presents the equations and their assumptions, the vertical coordinates used,
+and the subgrid scale physics.
+The equations are written in a curvilinear coordinate system, with a choice of vertical coordinates
+($z$, $s$, \zstar, \sstar, \ztilde, \stilde, and a mix of them).
+Momentum equations are formulated in vector invariant or flux form.
+Dimensional units in the meter, kilogram, second (MKS) international system are used throughout.
+The following chapters deal with the discrete equations.
+\item [\nameref{chap:TD}] presents the model time stepping environment.
+it 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.
+\item [\nameref{chap:DOM}] presents the model \textbf{DOM}ain.
+It 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
+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 (level position are then fixed in time).
+In non-linear free surface, the corresponding rescaled height coordinate formulation
+(\zstar or \sstar) is used
+(the level position then vary in time as a function of the sea surface heigh).
+\item [\nameref{chap:TRA} and \nameref{chap:DYN}] describe the discretisation of
+the prognostic equations for the active \textbf{TRA}cers (potential temperature and salinity) and
+the momentum (\textbf{DYN}amic).
+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
+(second or higher order advection schemes, including positive ones).
+\item [\nameref{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 (\SIcube) and a biogeochemistry model (\PISCES).
+Interactive coupling to Atmospheric models is possible via the \OASIS\ coupler.
+Two-way nesting is also available through an interface to the \AGRIF\ package,
+\ie\ \textbf{A}daptative \textbf{G}rid \textbf{R}efinement in \textbf{F}ortran
+\citep{debreu.vouland.ea_CG08}.
+The interface code for coupling to an alternative sea ice model (\CICE) has now been upgraded so that
+it works for both global and regional domains.
+\item [\nameref{chap:LBC}] presents the \textbf{L}ateral
+\textbf{B}oun\textbf{D}ar\textbf{Y} \textbf{C}onditions.
+Global configurations of the model make use of the ORCA tripolar grid,
+with special north fold boundary condition.
+Free-slip or no-slip boundary conditions are allowed at land boundaries.
+Closed basin geometries as well as periodic domains and open boundary conditions are possible.
+\item [\nameref{chap:LDF} and \nameref{chap:ZDF}] describe the physical parameterisations
+(\textbf{L}ateral \textbf{D}i\textbf{F}fusion and vertical \textbf{Z} \textbf{D}i\textbf{F}fusion)
+The model includes an implicit treatment of vertical viscosity and diffusivity.
+The lateral Laplacian and biharmonic viscosity and diffusion can be rotated following
+a geopotential or neutral direction.
+There is an optional eddy induced velocity \citep{gent.mcwilliams_JPO90} with
+a space and time variable coefficient \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 \citet{umlauf.burchard_JMR03} mixing schemes.
+\item [\nameref{chap:DIA}] describes model \textbf{I}n-\textbf{O}utputs \textbf{M}anagement and
+specific online \textbf{DIA}gnostics.
+The diagnostics includes the output of all the tendencies of the momentum and tracers equations,
+the output of tracers \textbf{TR}en\textbf{D}s averaged over the time evolving mixed layer,
+the output of the tendencies of the barotropic vorticity equation,
+the computation of on-line \textbf{FLO}ats trajectories...
+\item [\nameref{chap:OBS}] describes a tool which reads in \textbf{OBS}ervation files
+(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.
+\item [\nameref{chap:ASM}] describes how increments produced by
+data \textbf{A}s\textbf{S}i\textbf{M}ilation may be applied to the model equations.
+\item [\nameref{chap:STO}]
+\item [\nameref{chap:MISC}] (including solvers)
+\item [\nameref{chap:CFGS}] provides finally a brief introduction to
+the pre-defined model configurations
+(water column model \texttt{C1D}, ORCA and GYRE families of configurations).
+\end{description}
+
+%% =================================================================================================
+\subsection*{Appendices}
+
+\begin{description}
+\item [\nameref{apdx:SCOORD}]
+\item [\nameref{apdx:DIFFOPERS}]
+\item [\nameref{apdx:INVARIANTS}]
+\item [\nameref{apdx:TRIADS}]
+\item [\nameref{apdx:DOMCFG}]
+\item [\nameref{apdx:CODING}]
+\end{description}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/keys.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/keys.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/keys.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/keys.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/modules.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/modules.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/modules.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/modules.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/parameters.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/parameters.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/parameters.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/parameters.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/settings.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/settings.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/settings.tex	(revision 11831)
@@ -0,0 +1,20 @@
+%% Engine (subfolder name)
+\def \engine{NEMO}
+
+%% Cover page settings
+\def \spacetop{  \vspace*{1.85cm} }
+\def \heading{NEMO ocean engine}
+%\def \subheading{}
+\def \spacedown{ \vspace*{0.75cm } }
+\def \authorswidth{ 0.3\linewidth}
+\def \rulelenght{270pt}
+\def \abstractwidth{0.6\linewidth}
+
+%% Manual color (frontpage banner, links  and chapter boxes)
+\def \setmanualcolor{ \definecolor{manualcolor}{cmyk}{1, .60, 0, .4} }
+
+%% IPSL publication number
+\def \ipslnum{27}
+
+%% Zenodo ID, i.e. doi:10.5281/zenodo.\([0-9]*\)
+\def \zid{1464816}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/subroutines.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/subroutines.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/main/subroutines.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/subroutines.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/annex_A.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/annex_A.tex	(revision 11086)
+++ 	(revision )
@@ -1,544 +1,0 @@
-\documentclass[../main/NEMO_manual]{subfiles}
-
-\begin{document}
-
-% ================================================================
-% Chapter Appendix A : Curvilinear s-Coordinate Equations
-% ================================================================
-\chapter{Curvilinear $s-$Coordinate Equations}
-\label{apdx:A}
-
-\minitoc
-
-\newpage
-
-% ================================================================
-% Chain rule
-% ================================================================
-\section{Chain rule for $s-$coordinates}
-\label{sec:A_chain}
-
-In order to establish the set of Primitive Equation in curvilinear $s$-coordinates
-(\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
-the special case $k = z$ and thus $e_3 = 1$,
-and we introduce an arbitrary vertical coordinate $a = a(i,j,z,t)$.
-Let us define a new vertical scale factor by $e_3 = \partial z / \partial s$ (which now depends on $(i,j,z,t)$) and
-the horizontal slope of $s-$surfaces by:
-\begin{equation}
-  \label{apdx:A_s_slope}
-  \sigma_1 =\frac{1}{e_1 }\;\left. {\frac{\partial z}{\partial i}} \right|_s
-  \quad \text{and} \quad
-  \sigma_2 =\frac{1}{e_2 }\;\left. {\frac{\partial z}{\partial j}} \right|_s
-\end{equation}
-
-The chain rule to establish the model equations in the curvilinear $s-$coordinate system is:
-\begin{equation}
-  \label{apdx:A_s_chain_rule}
-  \begin{aligned}
-    &\left. {\frac{\partial \bullet }{\partial t}} \right|_z  =
-    \left. {\frac{\partial \bullet }{\partial t}} \right|_s
-	 -\frac{\partial \bullet }{\partial s}\;\frac{\partial s}{\partial t} \\
-    &\left. {\frac{\partial \bullet }{\partial i}} \right|_z  =
-    \left. {\frac{\partial \bullet }{\partial i}} \right|_s
-    -\frac{\partial \bullet }{\partial s}\;\frac{\partial s}{\partial i}=
-    \left. {\frac{\partial \bullet }{\partial i}} \right|_s
-    -\frac{e_1 }{e_3 }\sigma_1 \frac{\partial \bullet }{\partial s} \\
-    &\left. {\frac{\partial \bullet }{\partial j}} \right|_z  =
-    \left. {\frac{\partial \bullet }{\partial j}} \right|_s
-    - \frac{\partial \bullet }{\partial s}\;\frac{\partial s}{\partial j}=
-    \left. {\frac{\partial \bullet }{\partial j}} \right|_s
-    - \frac{e_2 }{e_3 }\sigma_2 \frac{\partial \bullet }{\partial s} \\
-    &\;\frac{\partial \bullet }{\partial z}  \;\; = \frac{1}{e_3 }\frac{\partial \bullet }{\partial s}
-  \end{aligned}
-\end{equation}
-
-In particular applying the time derivative chain rule to $z$ provides the expression for $w_s$,
-the vertical velocity of the $s-$surfaces referenced to a fix z-coordinate:
-\begin{equation}
-  \label{apdx:A_w_in_s}
-  w_s   =  \left.   \frac{\partial z }{\partial t}   \right|_s
-  = \frac{\partial z}{\partial s} \; \frac{\partial s}{\partial t}
-  = e_3 \, \frac{\partial s}{\partial t}
-\end{equation}
-
-% ================================================================
-% continuity equation
-% ================================================================
-\section{Continuity equation in $s-$coordinates}
-\label{sec:A_continuity}
-
-Using (\autoref{apdx:A_s_chain_rule}) and
-the fact that the horizontal scale factors $e_1$ and $e_2$ do not depend on the vertical coordinate,
-the divergence of the velocity relative to the ($i$,$j$,$z$) coordinate system is transformed as follows in order to
-obtain its expression in the curvilinear $s-$coordinate system:
-
-\begin{subequations}
-  \begin{align*}
-    {
-    \begin{array}{*{20}l}
-      \nabla \cdot {\rm {\bf U}}
-      &= \frac{1}{e_1 \,e_2 }  \left[ \left. {\frac{\partial (e_2 \,u)}{\partial i}} \right|_z
-        +\left. {\frac{\partial(e_1 \,v)}{\partial j}} \right|_z  \right]
-        + \frac{\partial w}{\partial z} \\ \\
-      &     = \frac{1}{e_1 \,e_2 }  \left[
-		  \left.   \frac{\partial (e_2 \,u)}{\partial i}    \right|_s
-		  - \frac{e_1 }{e_3 } \sigma_1 \frac{\partial (e_2 \,u)}{\partial s}
-        + \left.   \frac{\partial (e_1 \,v)}{\partial j}    \right|_s
-		  - \frac{e_2 }{e_3 } \sigma_2 \frac{\partial (e_1 \,v)}{\partial s}	\right]
-        + \frac{\partial w}{\partial s} \; \frac{\partial s}{\partial z} \\ \\
-      &     = \frac{1}{e_1 \,e_2 }   \left[
-		  \left.   \frac{\partial (e_2 \,u)}{\partial i}    \right|_s
-        + \left.   \frac{\partial (e_1 \,v)}{\partial j}    \right|_s       	\right]
-        + \frac{1}{e_3 }\left[        \frac{\partial w}{\partial s}
-        -  \sigma_1 \frac{\partial u}{\partial s}
-        -  \sigma_2 \frac{\partial v}{\partial s}      \right] \\ \\
-      &     = \frac{1}{e_1 \,e_2 \,e_3 }   \left[
-		  \left.   \frac{\partial (e_2 \,e_3 \,u)}{\partial i}    \right|_s
-		  -\left.    e_2 \,u    \frac{\partial e_3 }{\partial i}     \right|_s
-        + \left.  \frac{\partial (e_1 \,e_3 \,v)}{\partial j}    \right|_s
-		  - \left.    e_1 v      \frac{\partial e_3 }{\partial j}    \right|_s   \right] \\
-      & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad
-        + \frac{1}{e_3 } \left[        \frac{\partial w}{\partial s}
-        -  \sigma_1 \frac{\partial u}{\partial s}
-        -  \sigma_2 \frac{\partial v}{\partial s}      \right]      \\
-      %
-      \intertext{Noting that $
-      \frac{1}{e_1} \left.{ \frac{\partial e_3}{\partial i}} \right|_s
-      =\frac{1}{e_1} \left.{ \frac{\partial^2 z}{\partial i\,\partial s}} \right|_s
-      =\frac{\partial}{\partial s} \left( {\frac{1}{e_1 } \left.{ \frac{\partial z}{\partial i} }\right|_s } \right)
-      =\frac{\partial \sigma_1}{\partial s}
-      $ and $
-      \frac{1}{e_2 }\left. {\frac{\partial e_3 }{\partial j}} \right|_s
-      =\frac{\partial \sigma_2}{\partial s}
-      $, it becomes:}
-    %
-      \nabla \cdot {\rm {\bf U}}
-      & = \frac{1}{e_1 \,e_2 \,e_3 }  \left[
-		  \left.  \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s
-        +\left.  \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s        \right] \\
-      & \qquad \qquad \qquad \qquad \quad
-        +\frac{1}{e_3 }\left[ {\frac{\partial w}{\partial s}-u\frac{\partial \sigma_1 }{\partial s}-v\frac{\partial \sigma_2 }{\partial s}-\sigma_1 \frac{\partial u}{\partial s}-\sigma_2 \frac{\partial v}{\partial s}} \right] \\
-      \\
-      & = \frac{1}{e_1 \,e_2 \,e_3 }  \left[
-		  \left.  \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s
-        +\left.  \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s        \right]
-        + \frac{1}{e_3 } \; \frac{\partial}{\partial s}   \left[  w -  u\;\sigma_1  - v\;\sigma_2  \right]
-    \end{array}
-        }
-  \end{align*}
-\end{subequations}
-
-Here, $w$ is the vertical velocity relative to the $z-$coordinate system.
-Introducing the dia-surface velocity component,
-$\omega $, defined as the volume flux across the moving $s$-surfaces per unit horizontal area:
-\begin{equation}
-  \label{apdx:A_w_s}
-  \omega  = w - w_s - \sigma_1 \,u - \sigma_2 \,v    \\
-\end{equation}
-with $w_s$ given by \autoref{apdx:A_w_in_s},
-we obtain the expression for the divergence of the velocity in the curvilinear $s-$coordinate system:
-\begin{subequations}
-  \begin{align*}
-    {
-    \begin{array}{*{20}l}
-      \nabla \cdot {\rm {\bf U}}
-      &= \frac{1}{e_1 \,e_2 \,e_3 }    \left[
-		  \left.  \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s
-        +\left.  \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s        \right]
-        + \frac{1}{e_3 } \frac{\partial \omega }{\partial s}
-        + \frac{1}{e_3 } \frac{\partial w_s       }{\partial s} \\ \\
-      &= \frac{1}{e_1 \,e_2 \,e_3 }    \left[
-		  \left.  \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s
-        +\left.  \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s        \right]
-        + \frac{1}{e_3 } \frac{\partial \omega }{\partial s}
-        + \frac{1}{e_3 } \frac{\partial}{\partial s}  \left(  e_3 \; \frac{\partial s}{\partial t}   \right) \\ \\
-      &= \frac{1}{e_1 \,e_2 \,e_3 }    \left[
-		  \left.  \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s
-        +\left.  \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s        \right]
-        + \frac{1}{e_3 } \frac{\partial \omega }{\partial s}
-        + \frac{\partial}{\partial s} \frac{\partial s}{\partial t}
-        + \frac{1}{e_3 } \frac{\partial s}{\partial t} \frac{\partial e_3}{\partial s} \\ \\
-      &= \frac{1}{e_1 \,e_2 \,e_3 }    \left[
-		  \left.  \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s
-        +\left.  \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s        \right]
-        + \frac{1}{e_3 } \frac{\partial \omega }{\partial s}
-        + \frac{1}{e_3 } \frac{\partial e_3}{\partial t}
-    \end{array}
-        }
-  \end{align*}
-\end{subequations}
-
-As a result, the continuity equation \autoref{eq:PE_continuity} in the $s-$coordinates is:
-\begin{equation}
-  \label{apdx:A_sco_Continuity}
-  \frac{1}{e_3 } \frac{\partial e_3}{\partial t}
-  + \frac{1}{e_1 \,e_2 \,e_3 }\left[
-    {\left. {\frac{\partial (e_2 \,e_3 \,u)}{\partial i}} \right|_s
-      +  \left. {\frac{\partial (e_1 \,e_3 \,v)}{\partial j}} \right|_s } \right]
-  +\frac{1}{e_3 }\frac{\partial \omega }{\partial s} = 0
-\end{equation}
-A additional term has appeared that take into account
-the contribution of the time variation of the vertical coordinate to the volume budget.
-
-
-% ================================================================
-% momentum equation
-% ================================================================
-\section{Momentum equation in $s-$coordinate}
-\label{sec:A_momentum}
-
-Here we only consider the first component of the momentum equation,
-the generalization to the second one being straightforward.
-
-$\bullet$ \textbf{Total derivative in vector invariant form}
-
-Let us consider \autoref{eq:PE_dyn_vect}, the first component of the momentum equation in the vector invariant form.
-Its total $z-$coordinate time derivative,
-$\left. \frac{D u}{D t} \right|_z$ can be transformed as follows in order to obtain
-its expression in the curvilinear $s-$coordinate system:
-
-\begin{subequations}
-  \begin{align*}
-    {
-    \begin{array}{*{20}l}
-      \left. \frac{D u}{D t} \right|_z
-      &= \left. {\frac{\partial u }{\partial t}} \right|_z
-        - \left. \zeta \right|_z v
-        + \frac{1}{2e_1} \left.{ \frac{\partial (u^2+v^2)}{\partial i}} \right|_z
-        + w \;\frac{\partial u}{\partial z} \\ \\
-      &= \left. {\frac{\partial u }{\partial t}} \right|_z
-        - \left. \zeta \right|_z v
-        +  \frac{1}{e_1 \,e_2 }\left[ { \left.{ \frac{\partial (e_2 \,v)}{\partial i} }\right|_z
-        -\left.{ \frac{\partial (e_1 \,u)}{\partial j} }\right|_z } \right] \; v
-        +  \frac{1}{2e_1} \left.{ \frac{\partial (u^2+v^2)}{\partial i} } \right|_z
-        +  w \;\frac{\partial u}{\partial z}      \\
-        %
-      \intertext{introducing the chain rule (\autoref{apdx:A_s_chain_rule}) }
-      %
-      &= \left. {\frac{\partial u }{\partial t}} \right|_z
-        - \frac{1}{e_1\,e_2}\left[ { \left.{ \frac{\partial (e_2 \,v)}{\partial i} } \right|_s
-        -\left.{ \frac{\partial (e_1 \,u)}{\partial j} } \right|_s } \right.
-        \left. {-\frac{e_1}{e_3}\sigma_1 \frac{\partial (e_2 \,v)}{\partial s}
-        +\frac{e_2}{e_3}\sigma_2 \frac{\partial (e_1 \,u)}{\partial s}} \right] \; v  \\
-      & \qquad \qquad \qquad \qquad
-        {
-        + \frac{1}{2e_1} \left(                                  \left.  \frac{\partial (u^2+v^2)}{\partial i} \right|_s
-        - \frac{e_1}{e_3}\sigma_1 \frac{\partial (u^2+v^2)}{\partial s}               \right)
-        + \frac{w}{e_3 } \;\frac{\partial u}{\partial s}
-        } \\ \\
-      &= \left. {\frac{\partial u }{\partial t}} \right|_z
-        + \left. \zeta \right|_s \;v
-        + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s \\
-      &\qquad \qquad \qquad \quad
-        + \frac{w}{e_3 } \;\frac{\partial u}{\partial s}
-        - \left[   {\frac{\sigma_1 }{e_3 }\frac{\partial v}{\partial s}
-        - \frac{\sigma_2 }{e_3 }\frac{\partial u}{\partial s}}   \right]\;v
-        - \frac{\sigma_1 }{2e_3 }\frac{\partial (u^2+v^2)}{\partial s} \\ \\
-      &= \left. {\frac{\partial u }{\partial t}} \right|_z
-        + \left. \zeta \right|_s \;v
-        + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s \\
-      &\qquad \qquad \qquad \quad
-        + \frac{1}{e_3} \left[    {w\frac{\partial u}{\partial s}
-        +\sigma_1 v\frac{\partial v}{\partial s} - \sigma_2 v\frac{\partial u}{\partial s}
-        - \sigma_1 u\frac{\partial u}{\partial s} - \sigma_1 v\frac{\partial v}{\partial s}} \right] \\ \\
-      &= \left. {\frac{\partial u }{\partial t}} \right|_z
-        + \left. \zeta \right|_s \;v
-        + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s
-        + \frac{1}{e_3} \left[  w - \sigma_2 v - \sigma_1 u  \right]
-        \; \frac{\partial u}{\partial s}   \\
-        %
-      \intertext{Introducing $\omega$, the dia-a-surface velocity given by (\autoref{apdx:A_w_s}) }
-      %
-      &= \left. {\frac{\partial u }{\partial t}} \right|_z
-        + \left. \zeta \right|_s \;v
-        + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s
-        + \frac{1}{e_3 } \left( \omega - w_s \right) \frac{\partial u}{\partial s}   \\
-    \end{array}
-    }
-  \end{align*}
-\end{subequations}
-%
-Applying the time derivative chain rule (first equation of (\autoref{apdx:A_s_chain_rule})) to $u$ and
-using (\autoref{apdx:A_w_in_s}) provides the expression of the last term of the right hand side,
-\[
-  {
-    \begin{array}{*{20}l}
-      w_s  \;\frac{\partial u}{\partial s}
-      = \frac{\partial s}{\partial t} \;  \frac{\partial u }{\partial s}
-      = \left. {\frac{\partial u }{\partial t}} \right|_s  - \left. {\frac{\partial u }{\partial t}} \right|_z \quad ,
-    \end{array}
-  }
-\]
-leads to the $s-$coordinate formulation of the total $z-$coordinate time derivative,
-\ie the total $s-$coordinate time derivative :
-\begin{align}
-  \label{apdx:A_sco_Dt_vect}
-  \left. \frac{D u}{D t} \right|_s
-  = \left. {\frac{\partial u }{\partial t}} \right|_s
-  + \left. \zeta \right|_s \;v
-  + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s
-  + \frac{1}{e_3 } \omega \;\frac{\partial u}{\partial s}
-\end{align}
-Therefore, the vector invariant form of the total time derivative has exactly the same mathematical form in
-$z-$ and $s-$coordinates.
-This is not the case for the flux form as shown in next paragraph.
-
-$\bullet$ \textbf{Total derivative in flux form}
-
-Let us start from the total time derivative in the curvilinear $s-$coordinate system we have just establish.
-Following the procedure used to establish (\autoref{eq:PE_flux_form}), it can be transformed into :
-% \begin{subequations}
-\begin{align*}
-  {
-  \begin{array}{*{20}l}
-    \left. \frac{D u}{D t} \right|_s  &= \left. {\frac{\partial u }{\partial t}} \right|_s
-    & -  \zeta \;v
-      + \frac{1}{2\;e_1 } \frac{\partial \left( {u^2+v^2} \right)}{\partial i}
-      + \frac{1}{e_3} \omega \;\frac{\partial u}{\partial s} \\ \\
-                                      &= \left. {\frac{\partial u }{\partial t}} \right|_s
-    &+\frac{1}{e_1\;e_2}  \left(    \frac{\partial \left( {e_2 \,u\,u } \right)}{\partial i}
-      + \frac{\partial \left( {e_1 \,u\,v } \right)}{\partial j}     \right)
-      + \frac{1}{e_3 } \frac{\partial \left( {\omega\,u} \right)}{\partial s} \\ \\
-                                      &&- \,u \left[     \frac{1}{e_1 e_2 } \left(    \frac{\partial(e_2 u)}{\partial i}
-                                         + \frac{\partial(e_1 v)}{\partial j}    \right)
-                                         + \frac{1}{e_3}        \frac{\partial \omega}{\partial s}                       \right] \\ \\
-                                      &&- \frac{v}{e_1 e_2 }\left(    v	\;\frac{\partial e_2 }{\partial i}
-                                         -u	\;\frac{\partial e_1 }{\partial j} 	\right) \\
-  \end{array}
-  }
-\end{align*}
-%
-Introducing the vertical scale factor inside the horizontal derivative of the first two terms 
-(\ie the horizontal divergence), it becomes :
-\begin{align*}
-  {
-  \begin{array}{*{20}l}
-    % \begin{align*} {\begin{array}{*{20}l}
-    %     {\begin{array}{*{20}l} \left. \frac{D u}{D t} \right|_s  
-    &= \left. {\frac{\partial u }{\partial t}} \right|_s
-    &+ \frac{1}{e_1\,e_2\,e_3}  \left(  \frac{\partial( e_2 e_3 \,u^2 )}{\partial i}
-      + \frac{\partial( e_1 e_3 \,u v )}{\partial j}
-      -  e_2 u u \frac{\partial e_3}{\partial i}
-      -  e_1 u v \frac{\partial e_3 }{\partial j}    \right)
-      + \frac{1}{e_3} \frac{\partial \left( {\omega\,u} \right)}{\partial s} \\ \\
-    && - \,u \left[  \frac{1}{e_1 e_2 e_3} \left(   \frac{\partial(e_2 e_3 \, u)}{\partial i}
-       + \frac{\partial(e_1 e_3 \, v)}{\partial j}
-       -  e_2 u \;\frac{\partial e_3 }{\partial i}
-       -  e_1 v \;\frac{\partial e_3 }{\partial j}   \right)
-       -\frac{1}{e_3}        \frac{\partial \omega}{\partial s}                       \right] \\ \\
-    && - \frac{v}{e_1 e_2 }\left( 	v  \;\frac{\partial e_2 }{\partial i}
-       -u  \;\frac{\partial e_1 }{\partial j} 	\right) \\ \\
-    &= \left. {\frac{\partial u }{\partial t}} \right|_s
-    &+ \frac{1}{e_1\,e_2\,e_3}  \left(  \frac{\partial( e_2 e_3 \,u\,u )}{\partial i}
-      + \frac{\partial( e_1 e_3 \,u\,v )}{\partial j}    \right)
-      + \frac{1}{e_3 } \frac{\partial \left( {\omega\,u} \right)}{\partial s} \\ \\
-    && - \,u \left[  \frac{1}{e_1 e_2 e_3} \left(   \frac{\partial(e_2 e_3 \, u)}{\partial i}
-       + \frac{\partial(e_1 e_3 \, v)}{\partial j}  \right)
-       -\frac{1}{e_3}        \frac{\partial \omega}{\partial s}                       \right]
-       - \frac{v}{e_1 e_2 }\left( 	v   \;\frac{\partial e_2 }{\partial i}
-       -u   \;\frac{\partial e_1 }{\partial j} 	\right)                  \\
-     %
-    \intertext {Introducing a more compact form for the divergence of the momentum fluxes,
-    and using (\autoref{apdx:A_sco_Continuity}), the $s-$coordinate continuity equation,
-    it becomes : }
-  %
-    &= \left. {\frac{\partial u }{\partial t}} \right|_s
-    &+ \left.  \nabla \cdot \left(   {{\rm {\bf U}}\,u}   \right)    \right|_s
-      + \,u \frac{1}{e_3 } \frac{\partial e_3}{\partial t}
-      - \frac{v}{e_1 e_2 }\left(    v  \;\frac{\partial e_2 }{\partial i}
-      -u  \;\frac{\partial e_1 }{\partial j} 	\right)
-    \\
-  \end{array}
-  }
-\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:
-\begin{flalign}
-  \label{apdx:A_sco_Dt_flux}
-  \left. \frac{D u}{D t} \right|_s   = \frac{1}{e_3}  \left. \frac{\partial ( e_3\,u)}{\partial t} \right|_s
-  + \left.  \nabla \cdot \left(   {{\rm {\bf U}}\,u}   \right)    \right|_s
-  - \frac{v}{e_1 e_2 }\left(    v  \;\frac{\partial e_2 }{\partial i}
-    -u  \;\frac{\partial e_1 }{\partial j}            \right)
-\end{flalign}
-which is the total time derivative expressed in the curvilinear $s-$coordinate system.
-It has the same form as in the $z-$coordinate but for
-the vertical scale factor that has appeared inside the time derivative which
-comes from the modification of (\autoref{apdx:A_sco_Continuity}),
-the continuity equation.
-
-$\bullet$ \textbf{horizontal pressure gradient}
-
-The horizontal pressure gradient term can be transformed as follows:
-\[
-  \begin{split}
-    -\frac{1}{\rho_o \, e_1 }\left. {\frac{\partial p}{\partial i}} \right|_z
-    & =-\frac{1}{\rho_o e_1 }\left[ {\left. {\frac{\partial p}{\partial i}} \right|_s -\frac{e_1 }{e_3 }\sigma_1 \frac{\partial p}{\partial s}} \right] \\
-    & =-\frac{1}{\rho_o \,e_1 }\left. {\frac{\partial p}{\partial i}} \right|_s +\frac{\sigma_1 }{\rho_o \,e_3 }\left( {-g\;\rho \;e_3 } \right) \\
-    &=-\frac{1}{\rho_o \,e_1 }\left. {\frac{\partial p}{\partial i}} \right|_s -\frac{g\;\rho }{\rho_o }\sigma_1
-  \end{split}
-\]
-Applying similar manipulation to the second component and
-replacing $\sigma_1$ and $\sigma_2$ by their expression \autoref{apdx:A_s_slope}, it comes:
-\begin{equation}
-  \label{apdx:A_grad_p_1}
-  \begin{split}
-    -\frac{1}{\rho_o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z
-    &=-\frac{1}{\rho_o \,e_1 } \left(     \left.              {\frac{\partial p}{\partial i}} \right|_s
-      + g\;\rho  \;\left. {\frac{\partial z}{\partial i}} \right|_s    \right) \\
-             %
-    -\frac{1}{\rho_o \, e_2 }\left. {\frac{\partial p}{\partial j}} \right|_z
-    &=-\frac{1}{\rho_o \,e_2 } \left(    \left.               {\frac{\partial p}{\partial j}} \right|_s
-      + g\;\rho \;\left. {\frac{\partial z}{\partial j}} \right|_s   \right) \\
-  \end{split}
-\end{equation}
-
-An additional term appears in (\autoref{apdx:A_grad_p_1}) which accounts for
-the tilt of $s-$surfaces with respect to geopotential $z-$surfaces.
-
-As in $z$-coordinate,
-the horizontal pressure gradient can be split in two parts following \citet{Marsaleix_al_OM08}.
-Let defined a density anomaly, $d$, by $d=(\rho - \rho_o)/ \rho_o$,
-and a hydrostatic pressure anomaly, $p_h'$, by $p_h'= g \; \int_z^\eta d \; e_3 \; dk$.
-The pressure is then given by:
-\[
-  \begin{split}
-    p &= g\; \int_z^\eta \rho \; e_3 \; dk = g\; \int_z^\eta \left(  \rho_o \, d + 1 \right) \; e_3 \; dk   \\
-    &= g \, \rho_o \; \int_z^\eta d \; e_3 \; dk + g \, \int_z^\eta e_3 \; dk
-  \end{split}
-\]
-Therefore, $p$ and $p_h'$ are linked through:
-\begin{equation}
-  \label{apdx:A_pressure}
-  p = \rho_o \; p_h' + g \, ( z + \eta )
-\end{equation}
-and the hydrostatic pressure balance expressed in terms of $p_h'$ and $d$ is:
-\[
-  \frac{\partial p_h'}{\partial k} = - d \, g \, e_3
-\]
-
-Substituing \autoref{apdx:A_pressure} in \autoref{apdx:A_grad_p_1} and
-using the definition of the density anomaly it comes the expression in two parts:
-\begin{equation}
-  \label{apdx:A_grad_p_2}
-  \begin{split}
-    -\frac{1}{\rho_o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z
-    &=-\frac{1}{e_1 } \left(     \left.              {\frac{\partial p_h'}{\partial i}} \right|_s
-      + g\; d  \;\left. {\frac{\partial z}{\partial i}} \right|_s    \right)  - \frac{g}{e_1 } \frac{\partial \eta}{\partial i} \\
-             %
-    -\frac{1}{\rho_o \, e_2 }\left. {\frac{\partial p}{\partial j}} \right|_z
-    &=-\frac{1}{e_2 } \left(    \left.               {\frac{\partial p_h'}{\partial j}} \right|_s
-      + g\; d \;\left. {\frac{\partial z}{\partial j}} \right|_s   \right)  - \frac{g}{e_2 } \frac{\partial \eta}{\partial j}\\
-  \end{split}
-\end{equation}
-This formulation of the pressure gradient is characterised by the appearance of
-a term depending on the sea surface height only
-(last term on the right hand side of expression \autoref{apdx:A_grad_p_2}).
-This term will be loosely termed \textit{surface pressure gradient} whereas
-the first term will be termed the \textit{hydrostatic pressure gradient} by analogy to
-the $z$-coordinate formulation.
-In fact, the true surface pressure gradient is $1/\rho_o \nabla (\rho \eta)$,
-and $\eta$ is implicitly included in the computation of $p_h'$ through the upper bound of the vertical integration.
-
-$\bullet$ \textbf{The other terms of the momentum equation}
-
-The coriolis and forcing terms as well as the the vertical physics remain unchanged as
-they involve neither time nor space derivatives.
-The form of the lateral physics is discussed in \autoref{apdx:B}.
-
-$\bullet$ \textbf{Full momentum equation}
-
-To sum up, in a curvilinear $s$-coordinate system,
-the vector invariant momentum equation solved by the model has the same mathematical expression as
-the one in a curvilinear $z-$coordinate, except for the pressure gradient term:
-\begin{subequations}
-  \label{apdx:A_dyn_vect}
-  \begin{multline}
-    \label{apdx:A_PE_dyn_vect_u}
-    \frac{\partial u}{\partial t}=
-    +   \left( {\zeta +f} \right)\,v
-    -   \frac{1}{2\,e_1} \frac{\partial}{\partial i} \left(  u^2+v^2   \right)
-    -   \frac{1}{e_3} \omega \frac{\partial u}{\partial k}       \\
-    -   \frac{1}{e_1 } \left(    \frac{\partial p_h'}{\partial i} + g\; d  \; \frac{\partial z}{\partial i}    \right)
-    -   \frac{g}{e_1 } \frac{\partial \eta}{\partial i}
-    +   D_u^{\vect{U}}  +   F_u^{\vect{U}}
-  \end{multline}
-  \begin{multline}
-    \label{apdx:A_dyn_vect_v}
-    \frac{\partial v}{\partial t}=
-    -   \left( {\zeta +f} \right)\,u
-    -   \frac{1}{2\,e_2 }\frac{\partial }{\partial j}\left(  u^2+v^2  \right)
-    -   \frac{1}{e_3 } \omega \frac{\partial v}{\partial k}         \\
-    -   \frac{1}{e_2 } \left(    \frac{\partial p_h'}{\partial j} + g\; d  \; \frac{\partial z}{\partial j}    \right)
-    -   \frac{g}{e_2 } \frac{\partial \eta}{\partial j}
-    +  D_v^{\vect{U}}  +   F_v^{\vect{U}}
-  \end{multline}
-\end{subequations}
-whereas the flux form momentum equation differs from it by
-the formulation of both the time derivative and the pressure gradient term:
-\begin{subequations}
-  \label{apdx:A_dyn_flux}
-  \begin{multline}
-    \label{apdx:A_PE_dyn_flux_u}
-    \frac{1}{e_3} \frac{\partial \left(  e_3\,u  \right) }{\partial t} =
-    \nabla \cdot \left(   {{\rm {\bf U}}\,u}   \right)
-    +   \left\{ {f + \frac{1}{e_1 e_2 }\left(    v  \;\frac{\partial e_2 }{\partial i}
-          -u  \;\frac{\partial e_1 }{\partial j}            \right)} \right\} \,v     \\
-    -   \frac{1}{e_1 } \left(    \frac{\partial p_h'}{\partial i} + g\; d  \; \frac{\partial z}{\partial i}    \right)
-    -   \frac{g}{e_1 } \frac{\partial \eta}{\partial i}
-    +   D_u^{\vect{U}}  +   F_u^{\vect{U}}
-  \end{multline}
-  \begin{multline}
-    \label{apdx:A_dyn_flux_v}
-    \frac{1}{e_3}\frac{\partial \left(  e_3\,v  \right) }{\partial t}=
-    -  \nabla \cdot \left(   {{\rm {\bf U}}\,v}   \right)
-    +   \left\{ {f + \frac{1}{e_1 e_2 }\left(    v  \;\frac{\partial e_2 }{\partial i}
-          -u  \;\frac{\partial e_1 }{\partial j}            \right)} \right\} \,u     \\
-    -   \frac{1}{e_2 } \left(    \frac{\partial p_h'}{\partial j} + g\; d  \; \frac{\partial z}{\partial j}    \right)
-    -   \frac{g}{e_2 } \frac{\partial \eta}{\partial j}
-    +  D_v^{\vect{U}}  +   F_v^{\vect{U}}
-  \end{multline}
-\end{subequations}
-Both formulation share the same hydrostatic pressure balance expressed in terms of
-hydrostatic pressure and density anomalies, $p_h'$ and $d=( \frac{\rho}{\rho_o}-1 )$:
-\begin{equation}
-  \label{apdx:A_dyn_zph}
-  \frac{\partial p_h'}{\partial k} = - d \, g \, e_3
-\end{equation}
-
-It is important to realize that the change in coordinate system has only concerned the position on the vertical.
-It has not affected (\textbf{i},\textbf{j},\textbf{k}), the orthogonal curvilinear set of unit vectors.
-($u$,$v$) are always horizontal velocities so that their evolution is driven by \emph{horizontal} forces,
-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. 
-
-
-% ================================================================
-% Tracer equation
-% ================================================================
-\section{Tracer equation}
-\label{sec:A_tracer}
-
-The tracer equation is obtained using the same calculation as for the continuity equation and then
-regrouping the time derivative terms in the left hand side :
-
-\begin{multline}
-  \label{apdx:A_tracer}
-  \frac{1}{e_3} \frac{\partial \left(  e_3 T  \right)}{\partial t}
-  = -\frac{1}{e_1 \,e_2 \,e_3}
-  \left[           \frac{\partial }{\partial i} \left( {e_2 \,e_3 \;Tu} \right)
-    +   \frac{\partial }{\partial j} \left( {e_1 \,e_3 \;Tv} \right)               \right]       \\
-  +  \frac{1}{e_3}  \frac{\partial }{\partial k} \left(                   Tw  \right)
-  +  D^{T} +F^{T}
-\end{multline}
-
-The expression for the advection term is a straight consequence of (A.4),
-the expression of the 3D divergence in the $s-$coordinates established above. 
-
-\biblio
-
-\pindex
-
-\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/annex_B.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/annex_B.tex	(revision 11086)
+++ 	(revision )
@@ -1,406 +1,0 @@
-\documentclass[../main/NEMO_manual]{subfiles}
-
-\begin{document}
-% ================================================================
-% Chapter Appendix B : Diffusive Operators
-% ================================================================
-\chapter{Appendix B : Diffusive Operators}
-\label{apdx:B}
-
-\minitoc
-
-\newpage
-
-% ================================================================
-% Horizontal/Vertical 2nd Order Tracer Diffusive Operators
-% ================================================================
-\section{Horizontal/Vertical $2^{nd}$ order tracer diffusive operators}
-\label{sec:B_1}
-
-\subsubsection*{In z-coordinates}
-
-In $z$-coordinates, the horizontal/vertical second order tracer diffusion operator is given by:
-\begin{align}
-  \label{apdx:B1}
-  &D^T = \frac{1}{e_1 \, e_2}      \left[
-    \left. \frac{\partial}{\partial i} \left( 	\frac{e_2}{e_1}A^{lT} \;\left. \frac{\partial T}{\partial i} \right|_z   \right)   \right|_z      \right.
-    \left.
-    + \left. \frac{\partial}{\partial j} \left(  \frac{e_1}{e_2}A^{lT} \;\left. \frac{\partial T}{\partial j} \right|_z   \right)   \right|_z      \right]
-    + \frac{\partial }{\partial z}\left( {A^{vT} \;\frac{\partial T}{\partial z}} \right)
-\end{align}
-
-\subsubsection*{In generalized vertical coordinates}
-
-In $s$-coordinates, we defined the slopes of $s$-surfaces, $\sigma_1$ and $\sigma_2$ by \autoref{apdx:A_s_slope} and
-the vertical/horizontal ratio of diffusion coefficient by $\epsilon = A^{vT} / A^{lT}$.
-The diffusion operator is given by:
-
-\begin{equation}
-  \label{apdx:B2}
-  D^T = \left. \nabla \right|_s \cdot
-  \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_s T  \right] \\
-  \;\;\text{where} \;\Re =\left( {{
-        \begin{array}{*{20}c}
-          1 \hfill & 0 \hfill & {-\sigma_1 } \hfill \\
-          0 \hfill & 1 \hfill & {-\sigma_2 } \hfill \\
-          {-\sigma_1 } \hfill & {-\sigma_2 } \hfill & {\varepsilon +\sigma_1
-                                                      ^2+\sigma_2 ^2} \hfill \\
-        \end{array}
-      }} \right)
-\end{equation}
-or in expanded form:
-\begin{align*}
-  {
-  \begin{array}{*{20}l}
-    D^T=& \frac{1}{e_1\,e_2\,e_3 }\;\left[ {\ \ \ \ e_2\,e_3\,A^{lT} \;\left.
-          {\frac{\partial }{\partial i}\left( {\frac{1}{e_1}\;\left. {\frac{\partial T}{\partial i}} \right|_s -\frac{\sigma_1 }{e_3 }\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right.  \\
-        &\qquad \quad \ \ \ +e_1\,e_3\,A^{lT} \;\left. {\frac{\partial }{\partial j}\left( {\frac{1}{e_2 }\;\left. {\frac{\partial T}{\partial j}} \right|_s -\frac{\sigma_2 }{e_3 }\;\frac{\partial T}{\partial s}} \right)} \right|_s \\
-        &\qquad \quad \ \ \ + e_1\,e_2\,A^{lT} \;\frac{\partial }{\partial s}\left( {-\frac{\sigma_1 }{e_1 }\;\left. {\frac{\partial T}{\partial i}} \right|_s -\frac{\sigma_2 }{e_2 }\;\left. {\frac{\partial T}{\partial j}} \right|_s } \right.
-          \left. {\left. {+\left( {\varepsilon +\sigma_1^2+\sigma_2 ^2} \right)\;\frac{1}{e_3 }\;\frac{\partial T}{\partial s}} \right)\;\;} \right]
-  \end{array}
-          }
-\end{align*}
-
-Equation \autoref{apdx:B2} is obtained from \autoref{apdx:B1} without any additional assumption.
-Indeed, for the special case $k=z$ and thus $e_3 =1$,
-we introduce an arbitrary vertical coordinate $s = s (i,j,z)$ as in \autoref{apdx:A} and
-use \autoref{apdx:A_s_slope} and \autoref{apdx:A_s_chain_rule}.
-Since no cross horizontal derivative $\partial _i \partial _j $ appears in \autoref{apdx:B1},
-the ($i$,$z$) and ($j$,$z$) planes are independent.
-The derivation can then be demonstrated for the ($i$,$z$)~$\to$~($j$,$s$) transformation without
-any loss of generality:
-
-\begin{align*}
-  {
-  \begin{array}{*{20}l}
-    D^T&=\frac{1}{e_1\,e_2} \left. {\frac{\partial }{\partial i}\left( {\frac{e_2}{e_1}A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_z } \right)} \right|_z
-         +\frac{\partial }{\partial z}\left( {A^{vT}\;\frac{\partial T}{\partial z}} \right) \\ \\
-         %
-       &=\frac{1}{e_1\,e_2 }\left[ {\left. {\;\frac{\partial }{\partial i}\left( {\frac{e_2}{e_1}A^{lT}\;\left( {\left. {\frac{\partial T}{\partial i}} \right|_s
-         -\frac{e_1\,\sigma_1 }{e_3 }\frac{\partial T}{\partial s}} \right)} \right)} \right|_s } \right. \\
-       & \qquad \qquad \left. { -\frac{e_1\,\sigma_1 }{e_3 }\frac{\partial }{\partial s}\left( {\frac{e_2 }{e_1 }A^{lT}\;\left. {\left( {\left. {\frac{\partial T}{\partial i}} \right|_s -\frac{e_1 \,\sigma_1 }{e_3 }\frac{\partial T}{\partial s}} \right)} \right|_s } \right)\;} \right]
-         \shoveright{ +\frac{1}{e_3 }\frac{\partial }{\partial s}\left[ {\frac{A^{vT}}{e_3 }\;\frac{\partial T}{\partial s}} \right]}  \qquad \qquad \qquad \\ \\
-         %
-       &=\frac{1}{e_1 \,e_2 \,e_3 }\left[ {\left. {\;\;\frac{\partial }{\partial i}\left( {\frac{e_2 \,e_3 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right)} \right|_s -\left. {\frac{e_2 }{e_1}A^{lT}\;\frac{\partial e_3 }{\partial i}} \right|_s \left. {\frac{\partial T}{\partial i}} \right|_s } \right. \\
-       &  \qquad \qquad \quad \left. {-e_3 \frac{\partial }{\partial i}\left( {\frac{e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s -e_1 \,\sigma_1 \frac{\partial }{\partial s}\left( {\frac{e_2 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right) \\
-       &  \qquad \qquad \quad \shoveright{ -e_1 \,\sigma_1 \frac{\partial }{\partial s}\left( {-\frac{e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right)\;\,\left. {+\frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 }{e_3 }A^{vT}\;\frac{\partial T}{\partial s}} \right)\quad} \right] }\\
-  \end{array}
-  } 		\\
-  %
-  {
-  \begin{array}{*{20}l}
-    \intertext{Noting that $\frac{1}{e_1} \left. \frac{\partial e_3 }{\partial i} \right|_s = \frac{\partial \sigma_1 }{\partial s}$, it becomes:}
-    %
-    & =\frac{1}{e_1\,e_2\,e_3 }\left[ {\left. {\;\;\;\frac{\partial }{\partial i}\left( {\frac{e_2\,e_3 }{e_1}\,A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right)} \right|_s \left. -\, {e_3 \frac{\partial }{\partial i}\left( {\frac{e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right. \\
-    & \qquad \qquad \quad -e_2 A^{lT}\;\frac{\partial \sigma_1 }{\partial s}\left. {\frac{\partial T}{\partial i}} \right|_s -e_1 \,\sigma_1 \frac{\partial }{\partial s}\left( {\frac{e_2 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right) \\
-    & \qquad \qquad \quad\shoveright{ \left. { +e_1 \,\sigma_1 \frac{\partial }{\partial s}\left( {\frac{e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right)+\frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 }{e_3 }A^{vT}\;\frac{\partial T}{\partial z}} \right)\;\;\;} \right] }\\
-    \\
-    &=\frac{1}{e_1 \,e_2 \,e_3 } \left[ {\left. {\;\;\;\frac{\partial }{\partial i} \left( {\frac{e_2 \,e_3 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right)} \right|_s \left. {-\frac{\partial }{\partial i}\left( {e_2 \,\sigma_1 A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right. \\
-    & \qquad \qquad \quad \left. {+\frac{e_2 \,\sigma_1 }{e_3}A^{lT}\;\frac{\partial T}{\partial s} \;\frac{\partial e_3 }{\partial i}}  \right|_s -e_2 A^{lT}\;\frac{\partial \sigma_1 }{\partial s}\left. {\frac{\partial T}{\partial i}} \right|_s \\
-    & \qquad \qquad \quad-e_2 \,\sigma_1 \frac{\partial}{\partial s}\left( {A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right)+\frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 \,\sigma_1 ^2}{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right) \\
-    & \qquad \qquad \quad\shoveright{ \left. {-\frac{\partial \left( {e_1 \,e_2 \,\sigma_1 } \right)}{\partial s} \left( {\frac{\sigma_1 }{e_3}A^{lT}\;\frac{\partial T}{\partial s}} \right) + \frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 }{e_3 }A^{vT}\;\frac{\partial T}{\partial s}} \right)\;\;\;} \right]}
-  \end{array}
-      } \\
-  {
-  \begin{array}{*{20}l}
-    %
-    \intertext{using the same remark as just above, it becomes:}
-    %
-    &= \frac{1}{e_1 \,e_2 \,e_3 } \left[ {\left. {\;\;\;\frac{\partial }{\partial i} \left( {\frac{e_2 \,e_3 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s -e_2 \,\sigma_1 A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right.\;\;\; \\
-    & \qquad \qquad \quad+\frac{e_1 \,e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}\;\frac{\partial \sigma_1 }{\partial s} - \frac {\sigma_1 }{e_3} A^{lT} \;\frac{\partial \left( {e_1 \,e_2 \,\sigma_1 } \right)}{\partial s}\;\frac{\partial T}{\partial s} \\
-    & \qquad \qquad \quad-e_2 \left( {A^{lT}\;\frac{\partial \sigma_1 }{\partial s}\left. {\frac{\partial T}{\partial i}} \right|_s +\frac{\partial }{\partial s}\left( {\sigma_1 A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right)-\frac{\partial \sigma_1 }{\partial s}\;A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right) \\
-    & \qquad \qquad \quad\shoveright{\left. {+\frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 \,\sigma_1 ^2}{e_3 }A^{lT}\;\frac{\partial T}{\partial s}+\frac{e_1 \,e_2}{e_3 }A^{vT}\;\frac{\partial T}{\partial s}} \right)\;\;\;} \right] }
-  \end{array}
-      } \\
-  {
-  \begin{array}{*{20}l}
-    %
-    \intertext{Since the horizontal scale factors do not depend on the vertical coordinate,
-    the last term of the first line and the first term of the last line cancel, while
-    the second line reduces to a single vertical derivative, so it becomes:}
-  %
-    & =\frac{1}{e_1 \,e_2 \,e_3 }\left[ {\left. {\;\;\;\frac{\partial }{\partial i}\left( {\frac{e_2 \,e_3 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s -e_2 \,\sigma_1 \,A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right. \\
-    & \qquad \qquad \quad \shoveright{ \left. {+\frac{\partial }{\partial s}\left( {-e_2 \,\sigma_1 \,A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s +A^{lT}\frac{e_1 \,e_2 }{e_3 }\;\left( {\varepsilon +\sigma_1 ^2} \right)\frac{\partial T}{\partial s}} \right)\;\;\;} \right]} \\
-    %
-    \intertext{in other words, the horizontal/vertical Laplacian operator in the ($i$,$s$) plane takes the following form:}
-  \end{array}
-  } \\
-  %
-  {\frac{1}{e_1\,e_2\,e_3}}
-  \left( {{
-  \begin{array}{*{30}c}
-    {\left. {\frac{\partial \left( {e_2 e_3 \bullet } \right)}{\partial i}} \right|_s } \hfill \\
-    {\frac{\partial \left( {e_1 e_2 \bullet } \right)}{\partial s}} \hfill \\
-  \end{array}}}
-  \right)
-  \cdot \left[ {A^{lT}
-  \left( {{
-  \begin{array}{*{30}c}
-    {1} \hfill & {-\sigma_1 } \hfill \\
-    {-\sigma_1} \hfill & {\varepsilon + \sigma_1^2} \hfill \\
-  \end{array}
-  }} \right)
-  \cdot
-  \left( {{
-  \begin{array}{*{30}c}
-    {\frac{1}{e_1 }\;\left. {\frac{\partial \bullet }{\partial i}} \right|_s } \hfill \\
-    {\frac{1}{e_3 }\;\frac{\partial \bullet }{\partial s}} \hfill \\
-  \end{array}
-  }}       \right) \left( T \right)} \right]
-\end{align*}
-%\addtocounter{equation}{-2}
-
-% ================================================================
-% Isopycnal/Vertical 2nd Order Tracer Diffusive Operators
-% ================================================================
-\section{Iso/Diapycnal $2^{nd}$ order tracer diffusive operators}
-\label{sec:B_2}
-
-\subsubsection*{In z-coordinates}
-
-The iso/diapycnal diffusive tensor $\textbf {A}_{\textbf I}$ expressed in
-the ($i$,$j$,$k$) curvilinear coordinate system in which
-the equations of the ocean circulation model are formulated,
-takes the following form \citep{Redi_JPO82}:
-
-\begin{equation}
-  \label{apdx:B3}
-  \textbf {A}_{\textbf I} = \frac{A^{lT}}{\left( {1+a_1 ^2+a_2 ^2} \right)}
-  \left[ {{
-        \begin{array}{*{20}c}
-          {1+a_1 ^2} \hfill & {-a_1 a_2 } \hfill & {-a_1 } \hfill \\
-          {-a_1 a_2 } \hfill & {1+a_2 ^2} \hfill & {-a_2 } \hfill \\
-          {-a_1 } \hfill & {-a_2 } \hfill & {\varepsilon +a_1 ^2+a_2 ^2} \hfill \\
-        \end{array}
-      }} \right]
-\end{equation}
-where ($a_1$, $a_2$) are the isopycnal slopes in ($\textbf{i}$, $\textbf{j}$) directions, relative to geopotentials:
-\[
-  a_1 =\frac{e_3 }{e_1 }\left( {\frac{\partial \rho }{\partial i}} \right)\left( {\frac{\partial \rho }{\partial k}} \right)^{-1}
-  \qquad , \qquad
-  a_2 =\frac{e_3 }{e_2 }\left( {\frac{\partial \rho }{\partial j}}
-  \right)\left( {\frac{\partial \rho }{\partial k}} \right)^{-1}
-\]
-
-In practice, isopycnal slopes are generally less than $10^{-2}$ in the ocean,
-so $\textbf {A}_{\textbf I}$ can be simplified appreciably \citep{Cox1987}:
-\begin{subequations}
-  \label{apdx:B4}
-  \begin{equation}
-    \label{apdx:B4a}
-    {\textbf{A}_{\textbf{I}}} \approx A^{lT}\;\Re\;\text{where} \;\Re =
-    \left[ {{
-          \begin{array}{*{20}c}
-            1 \hfill & 0 \hfill & {-a_1 } \hfill \\
-            0 \hfill & 1 \hfill & {-a_2 } \hfill \\
-            {-a_1 } \hfill & {-a_2 } \hfill & {\varepsilon +a_1 ^2+a_2 ^2} \hfill \\
-          \end{array}
-        }} \right],
-  \end{equation}
-  and the iso/dianeutral diffusive operator in $z$-coordinates is then
-  \begin{equation}
-    \label{apdx:B4b}
-    D^T = \left. \nabla \right|_z \cdot
-    \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_z T  \right]. \\
-  \end{equation}
-\end{subequations}
-
-Physically, the full tensor \autoref{apdx:B3} represents strong isoneutral diffusion on a plane parallel to
-the isoneutral surface and weak dianeutral diffusion perpendicular to this plane.
-However,
-the approximate `weak-slope' tensor \autoref{apdx:B4a} represents strong diffusion along the isoneutral surface,
-with weak \emph{vertical} diffusion -- the principal axes of the tensor are no longer orthogonal.
-This simplification also decouples the ($i$,$z$) and ($j$,$z$) planes of the tensor.
-The weak-slope operator therefore takes the same form, \autoref{apdx:B4}, as \autoref{apdx:B2},
-the diffusion operator for geopotential diffusion written in non-orthogonal $i,j,s$-coordinates.
-Written out explicitly,
-
-\begin{multline}
-  \label{apdx:B_ldfiso}
-  D^T=\frac{1}{e_1 e_2 }\left\{
-    {\;\frac{\partial }{\partial i}\left[ {A_h \left( {\frac{e_2}{e_1}\frac{\partial T}{\partial i}-a_1 \frac{e_2}{e_3}\frac{\partial T}{\partial k}} \right)} \right]}
-    {+\frac{\partial}{\partial j}\left[ {A_h \left( {\frac{e_1}{e_2}\frac{\partial T}{\partial j}-a_2 \frac{e_1}{e_3}\frac{\partial T}{\partial k}} \right)} \right]\;} \right\} \\
-  \shoveright{+\frac{1}{e_3 }\frac{\partial }{\partial k}\left[ {A_h \left( {-\frac{a_1 }{e_1 }\frac{\partial T}{\partial i}-\frac{a_2 }{e_2 }\frac{\partial T}{\partial j}+\frac{\left( {a_1 ^2+a_2 ^2+\varepsilon} \right)}{e_3 }\frac{\partial T}{\partial k}} \right)} \right]}. \\
-\end{multline}
-
-The isopycnal diffusion operator \autoref{apdx:B4},
-\autoref{apdx:B_ldfiso} conserves tracer quantity and dissipates its square.
-The demonstration of the first property is trivial as \autoref{apdx:B4} is the divergence of fluxes.
-Let us demonstrate the second one:
-\[
-  \iiint\limits_D T\;\nabla .\left( {\textbf{A}}_{\textbf{I}} \nabla T \right)\,dv
-  = -\iiint\limits_D \nabla T\;.\left( {\textbf{A}}_{\textbf{I}} \nabla T \right)\,dv,
-\]
-and since
-\begin{align*}
-  {
-  \begin{array}{*{20}l}
-    \nabla T\;.\left( {{\rm {\bf A}}_{\rm {\bf I}} \nabla T}
-    \right)&=A^{lT}\left[ {\left( {\frac{\partial T}{\partial i}} \right)^2-2a_1
-             \frac{\partial T}{\partial i}\frac{\partial T}{\partial k}+\left(
-             {\frac{\partial T}{\partial j}} \right)^2} \right. \\
-           &\qquad \qquad \qquad
-             { \left. -\,{2a_2 \frac{\partial T}{\partial j}\frac{\partial T}{\partial k}+\left( {a_1 ^2+a_2 ^2+\varepsilon} \right)\left( {\frac{\partial T}{\partial k}} \right)^2} \right]} \\
-           &=A_h \left[ {\left( {\frac{\partial T}{\partial i}-a_1 \frac{\partial
-             T}{\partial k}} \right)^2+\left( {\frac{\partial T}{\partial
-             j}-a_2 \frac{\partial T}{\partial k}} \right)^2}
-             +\varepsilon \left(\frac{\partial T}{\partial k}\right) ^2\right]      \\
-           & \geq 0
-  \end{array}
-             }
-\end{align*}
-%\addtocounter{equation}{-1}
-the property becomes obvious.
-
-\subsubsection*{In generalized vertical coordinates}
-
-Because the weak-slope operator \autoref{apdx:B4},
-\autoref{apdx:B_ldfiso} is decoupled in the ($i$,$z$) and ($j$,$z$) planes,
-it may be transformed into generalized $s$-coordinates in the same way as
-\autoref{sec:B_1} was transformed into \autoref{sec:B_2}.
-The resulting operator then takes the simple form
-
-\begin{equation}
-  \label{apdx:B_ldfiso_s}
-  D^T = \left. \nabla \right|_s \cdot
-  \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_s T  \right] \\
-  \;\;\text{where} \;\Re =\left( {{
-        \begin{array}{*{20}c}
-          1 \hfill & 0 \hfill & {-r _1 } \hfill \\
-          0 \hfill & 1 \hfill & {-r _2 } \hfill \\
-          {-r _1 } \hfill & {-r _2 } \hfill & {\varepsilon +r _1
-                                              ^2+r _2 ^2} \hfill \\
-        \end{array}
-      }} \right),
-\end{equation}
-
-where ($r_1$, $r_2$) are the isopycnal slopes in ($\textbf{i}$, $\textbf{j}$) directions,
-relative to $s$-coordinate surfaces:
-\[
-  r_1 =\frac{e_3 }{e_1 }\left( {\frac{\partial \rho }{\partial i}} \right)\left( {\frac{\partial \rho }{\partial s}} \right)^{-1}
-  \qquad , \qquad
-  r_2 =\frac{e_3 }{e_2 }\left( {\frac{\partial \rho }{\partial j}}
-  \right)\left( {\frac{\partial \rho }{\partial s}} \right)^{-1}.
-\]
-
-To prove \autoref{apdx:B5} by direct re-expression of \autoref{apdx:B_ldfiso} is straightforward, but laborious.
-An easier way is first to note (by reversing the derivation of \autoref{sec:B_2} from \autoref{sec:B_1} ) that
-the weak-slope operator may be \emph{exactly} reexpressed in non-orthogonal $i,j,\rho$-coordinates as
-
-\begin{equation}
-  \label{apdx:B5}
-  D^T = \left. \nabla \right|_\rho \cdot
-  \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_\rho T  \right] \\
-  \;\;\text{where} \;\Re =\left( {{
-        \begin{array}{*{20}c}
-          1 \hfill & 0 \hfill &0 \hfill \\
-          0 \hfill & 1 \hfill & 0 \hfill \\
-          0 \hfill & 0 \hfill & \varepsilon \hfill \\
-        \end{array}
-      }} \right).
-\end{equation}
-Then direct transformation from $i,j,\rho$-coordinates to $i,j,s$-coordinates gives
-\autoref{apdx:B_ldfiso_s} immediately.
-
-Note that the weak-slope approximation is only made in transforming from
-the (rotated,orthogonal) isoneutral axes to the non-orthogonal $i,j,\rho$-coordinates.
-The further transformation into $i,j,s$-coordinates is exact, whatever the steepness of the $s$-surfaces,
-in the same way as the transformation of horizontal/vertical Laplacian diffusion in $z$-coordinates,
-\autoref{sec:B_1} onto $s$-coordinates is exact, however steep the $s$-surfaces.
-
-
-% ================================================================
-% Lateral/Vertical Momentum Diffusive Operators
-% ================================================================
-\section{Lateral/Vertical momentum diffusive operators}
-\label{sec:B_3}
-
-The second order momentum diffusion operator (Laplacian) in the $z$-coordinate is found by
-applying \autoref{eq:PE_lap_vector}, the expression for the Laplacian of a vector,
-to the horizontal velocity vector:
-\begin{align*}
-  \Delta {\textbf{U}}_h
-  &=\nabla \left( {\nabla \cdot {\textbf{U}}_h } \right)-
-    \nabla \times \left( {\nabla \times {\textbf{U}}_h } \right) \\ \\
-  &=\left( {{
-    \begin{array}{*{20}c}
-      {\frac{1}{e_1 }\frac{\partial \chi }{\partial i}} \hfill \\
-      {\frac{1}{e_2 }\frac{\partial \chi }{\partial j}} \hfill \\
-      {\frac{1}{e_3 }\frac{\partial \chi }{\partial k}} \hfill \\
-    \end{array}
-  }} \right)
-  -\left( {{
-  \begin{array}{*{20}c}
-    {\frac{1}{e_2 }\frac{\partial \zeta }{\partial j}-\frac{1}{e_3
-    }\frac{\partial }{\partial k}\left( {\frac{1}{e_3 }\frac{\partial
-    u}{\partial k}} \right)} \hfill \\
-    {\frac{1}{e_3 }\frac{\partial }{\partial k}\left( {-\frac{1}{e_3
-    }\frac{\partial v}{\partial k}} \right)-\frac{1}{e_1 }\frac{\partial \zeta
-    }{\partial i}} \hfill \\
-    {\frac{1}{e_1 e_2 }\left[ {\frac{\partial }{\partial i}\left( {\frac{e_2
-    }{e_3 }\frac{\partial u}{\partial k}} \right)-\frac{\partial }{\partial
-    j}\left( {-\frac{e_1 }{e_3 }\frac{\partial v}{\partial k}} \right)} \right]}
-    \hfill \\
-  \end{array}
-  }} \right) \\ \\
-  &=\left( {{
-    \begin{array}{*{20}c}
-      {\frac{1}{e_1 }\frac{\partial \chi }{\partial i}-\frac{1}{e_2 }\frac{\partial \zeta }{\partial j}} \\
-      {\frac{1}{e_2 }\frac{\partial \chi }{\partial j}+\frac{1}{e_1 }\frac{\partial \zeta }{\partial i}} \\
-      0 \\
-    \end{array}
-  }} \right)
-  +\frac{1}{e_3 }
-  \left( {{
-  \begin{array}{*{20}c}
-    {\frac{\partial }{\partial k}\left( {\frac{1}{e_3 }\frac{\partial u}{\partial k}} \right)} \\
-    {\frac{\partial }{\partial k}\left( {\frac{1}{e_3 }\frac{\partial v}{\partial k}} \right)} \\
-    {\frac{\partial \chi }{\partial k}-\frac{1}{e_1 e_2 }\left( {\frac{\partial ^2\left( {e_2 \,u} \right)}{\partial i\partial k}+\frac{\partial ^2\left( {e_1 \,v} \right)}{\partial j\partial k}} \right)} \\
-  \end{array}
-  }} \right)
-\end{align*}
-Using \autoref{eq:PE_div}, the definition of the horizontal divergence,
-the third componant of the second vector is obviously zero and thus :
-\[
-  \Delta {\textbf{U}}_h = \nabla _h \left( \chi \right) - \nabla _h \times \left( \zeta \right) + \frac {1}{e_3 } \frac {\partial }{\partial k} \left( {\frac {1}{e_3 } \frac{\partial {\textbf{ U}}_h }{\partial k}} \right)
-\]
-
-Note that this operator ensures a full separation between
-the vorticity and horizontal divergence fields (see \autoref{apdx:C}).
-It is only equal to a Laplacian applied to each component in Cartesian coordinates, not on the sphere.
-
-The horizontal/vertical second order (Laplacian type) operator used to diffuse horizontal momentum in
-the $z$-coordinate therefore takes the following form:
-\begin{equation}
-  \label{apdx:B_Lap_U}
-  {
-    \textbf{D}}^{\textbf{U}} =
-  \nabla _h \left( {A^{lm}\;\chi } \right)
-  - \nabla _h \times \left( {A^{lm}\;\zeta \;{\textbf{k}}} \right)
-  + \frac{1}{e_3 }\frac{\partial }{\partial k}\left( {\frac{A^{vm}\;}{e_3 }
-      \frac{\partial {\rm {\bf U}}_h }{\partial k}} \right) \\
-\end{equation}
-that is, in expanded form:
-\begin{align*}
-  D^{\textbf{U}}_u
-  & = \frac{1}{e_1} \frac{\partial \left( {A^{lm}\chi   } \right)}{\partial i}
-    -\frac{1}{e_2} \frac{\partial \left( {A^{lm}\zeta } \right)}{\partial j}
-    +\frac{1}{e_3} \frac{\partial u}{\partial k}      \\
-  D^{\textbf{U}}_v
-  & = \frac{1}{e_2 }\frac{\partial \left( {A^{lm}\chi   } \right)}{\partial j}
-    +\frac{1}{e_1 }\frac{\partial \left( {A^{lm}\zeta } \right)}{\partial i}
-    +\frac{1}{e_3} \frac{\partial v}{\partial k}
-\end{align*}
-
-Note Bene: introducing a rotation in \autoref{apdx:B_Lap_U} does not lead to
-a useful expression for the iso/diapycnal Laplacian operator in the $z$-coordinate.
-Similarly, we did not found an expression of practical use for
-the geopotential horizontal/vertical Laplacian operator in the $s$-coordinate.
-Generally, \autoref{apdx:B_Lap_U} is used in both $z$- and $s$-coordinate systems,
-that is a Laplacian diffusion is applied on momentum along the coordinate directions.
-
-\biblio
-
-\pindex
-
-\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/annex_C.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/annex_C.tex	(revision 11086)
+++ 	(revision )
@@ -1,1534 +1,0 @@
-\documentclass[../main/NEMO_manual]{subfiles}
-
-\begin{document}
-% ================================================================
-% Chapter Ñ Appendix C : Discrete Invariants of the Equations
-% ================================================================
-\chapter{Discrete Invariants of the Equations}
-\label{apdx:C}
-
-\minitoc
-
-%%%  Appendix put in gmcomment as it has not been updated for \zstar and s coordinate
-%I'm writting this appendix. It will be available in a forthcoming release of the documentation
-
-%\gmcomment{
-
-\newpage
-
-% ================================================================
-% Introduction / Notations
-% ================================================================
-\section{Introduction / Notations}
-\label{sec:C.0}
-
-Notation used in this appendix in the demonstations:
-
-fluxes at the faces of a $T$-box:
-\[
-  U = e_{2u}\,e_{3u}\; u  \qquad  V = e_{1v}\,e_{3v}\; v  \qquad W = e_{1w}\,e_{2w}\; \omega
-\]
-
-volume of cells at $u$-, $v$-, and $T$-points:
-\[
-  b_u = e_{1u}\,e_{2u}\,e_{3u}  \qquad  b_v = e_{1v}\,e_{2v}\,e_{3v}  \qquad b_t = e_{1t}\,e_{2t}\,e_{3t}
-\]
-
-partial derivative notation: $\partial_\bullet = \frac{\partial}{\partial \bullet}$
-
-$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$).
-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).
-\begin{flalign*}
-  z(k) = \eta - \int\limits_{\tilde{k}=k}^{\tilde{k}=k_s}  e_3(\tilde{k}) \;d\tilde{k}
-  = \eta - \int\limits_k^{k_s}  e_3 \;d\tilde{k}
-\end{flalign*}
-
-Continuity equation with the above notation:
-\[
-  \frac{1}{e_{3t}} \partial_t (e_{3t})+ \frac{1}{b_t}  \biggl\{  \delta_i [U] + \delta_j [V] + \delta_k [W] \biggr\} = 0
-\]
-
-A quantity, $Q$ is conserved when its domain averaged time change is zero, that is when:
-\[
-  \partial_t \left( \int_D{ Q\;dv } \right) =0
-\]
-Noting that the coordinate system used ....  blah blah
-\[
-  \partial_t \left( \int_D {Q\;dv} \right) =  \int_D { \partial_t \left( e_3 \, Q \right) e_1e_2\;di\,dj\,dk }
-  =  \int_D { \frac{1}{e_3} \partial_t \left( e_3 \, Q \right) dv } =0
-\]
-equation of evolution of $Q$ written as
-the time evolution of the vertical content of $Q$ like for tracers, or momentum in flux form,
-the quadratic quantity $\frac{1}{2}Q^2$ is conserved when:
-\begin{flalign*}
-  \partial_t \left(   \int_D{ \frac{1}{2} \,Q^2\;dv }   \right)
-  =&  \int_D{ \frac{1}{2} \partial_t \left( \frac{1}{e_3}\left( e_3 \, Q \right)^2 \right) e_1e_2\;di\,dj\,dk } \\
-  =&  \int_D {         Q   \;\partial_t\left( e_3 \, Q \right) e_1e_2\;di\,dj\,dk }
-  -  \int_D { \frac{1}{2} Q^2 \,\partial_t  (e_3) \;e_1e_2\;di\,dj\,dk } \\
-\end{flalign*}
-that is in a more compact form :
-\begin{flalign}
-  \label{eq:Q2_flux}
-  \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right)
-  =&                   \int_D { \frac{Q}{e_3}  \partial_t \left( e_3 \, Q \right) dv }
-  -   \frac{1}{2} \int_D {  \frac{Q^2}{e_3} \partial_t (e_3) \;dv }
-\end{flalign}
-equation of evolution of $Q$ written as the time evolution of $Q$ like for momentum in vector invariant form,
-the quadratic quantity $\frac{1}{2}Q^2$ is conserved when:
-\begin{flalign*}
-  \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right)
-  =&  \int_D { \frac{1}{2} \partial_t \left( e_3 \, Q^2 \right) \;e_1e_2\;di\,dj\,dk } \\
-  =& \int_D {         Q      \partial_t Q  \;e_1e_2e_3\;di\,dj\,dk }
-  +  \int_D { \frac{1}{2} Q^2 \, \partial_t e_3  \;e_1e_2\;di\,dj\,dk } \\
-\end{flalign*}
-that is in a more compact form:
-\begin{flalign}
-  \label{eq:Q2_vect}
-  \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right)
-  =& \int_D {         Q   \,\partial_t Q  \;dv }
-  +   \frac{1}{2} \int_D { \frac{1}{e_3} Q^2 \partial_t e_3 \;dv }
-\end{flalign}
-
-% ================================================================
-% Continuous Total energy Conservation
-% ================================================================
-\section{Continuous conservation}
-\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. 
-
-Let us first establish those constraint in the continuous world.
-The total energy (\ie kinetic plus potential energies) is conserved:
-\begin{flalign}
-  \label{eq:Tot_Energy}
-  \partial_t \left( \int_D \left( \frac{1}{2} {\textbf{U}_h}^2 +  \rho \, g \, z \right) \;dv \right)  = & 0
-\end{flalign}
-under the following assumptions: no dissipation, no forcing (wind, buoyancy flux, atmospheric pressure variations),
-mass conservation, and closed domain. 
-
-This equation can be transformed to obtain several sub-equalities.
-The transformation for the advection term depends on whether the vector invariant form or
-the flux form is used for the momentum equation.
-Using \autoref{eq:Q2_vect} and introducing \autoref{apdx:A_dyn_vect} in
-\autoref{eq:Tot_Energy} for the former form and
-using \autoref{eq:Q2_flux} and introducing \autoref{apdx:A_dyn_flux} in
-\autoref{eq:Tot_Energy} for the latter form leads to:
-
-% \label{eq:E_tot}
-advection term (vector invariant form):
-\[
-  % \label{eq:E_tot_vect_vor_1}
-  \int\limits_D  \zeta \; \left( \textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv   = 0   \\
-\]
-%
-\[
-  % \label{eq:E_tot_vect_adv_1}
-  \int\limits_D  \textbf{U}_h \cdot \nabla_h \left( \frac{{\textbf{U}_h}^2}{2} \right)     dv
-  + \int\limits_D  \textbf{U}_h \cdot \nabla_z \textbf{U}_h  \;dv
-  -  \int\limits_D { \frac{{\textbf{U}_h}^2}{2} \frac{1}{e_3} \partial_t e_3 \;dv }   = 0
-\]
-advection term (flux form):
-\[
-  % \label{eq:E_tot_flux_metric}
-  \int\limits_D  \frac{1} {e_1 e_2 } \left( v \,\partial_i e_2 - u \,\partial_j e_1  \right)\;
-  \left(  \textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv   = 0
-\]
-\[
-  % \label{eq:E_tot_flux_adv}
-  \int\limits_D \textbf{U}_h \cdot     \left(                 {{
-        \begin{array} {*{20}c}
-          \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\
-          \nabla \cdot \left( \textbf{U}\,v \right) \hfill
-        \end{array}}
-    }           \right)   \;dv
-  +   \frac{1}{2} \int\limits_D {  {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t e_3 \;dv } =\;0
-\]
-coriolis term
-\[
-  % \label{eq:E_tot_cor}
-  \int\limits_D  f   \; \left( \textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv   = 0
-\]
-pressure gradient:
-\[
-  % \label{eq:E_tot_pg_1}
-  - \int\limits_D  \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv
-  = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
-  + \int\limits_D g\, \rho \; \partial_t z  \;dv
-\]
-
-where $\nabla_h = \left. \nabla \right|_k$ is the gradient along the $s$-surfaces.
-
-blah blah....
-
-The prognostic ocean dynamics equation can be summarized as follows:
-\[
-  \text{NXT} = \dbinom	{\text{VOR} + \text{KEG} + \text {ZAD} }
-  {\text{COR} + \text{ADV}                       }
-  + \text{HPG} + \text{SPG} + \text{LDF} + \text{ZDF}
-\]
-
-Vector invariant form:
-% \label{eq:E_tot_vect}
-\[
-  % \label{eq:E_tot_vect_vor_2}
-  \int\limits_D   \textbf{U}_h \cdot \text{VOR} \;dv   = 0
-\]
-\[
-  % \label{eq:E_tot_vect_adv_2}
-  \int\limits_D  \textbf{U}_h \cdot \text{KEG}  \;dv
-  + \int\limits_D  \textbf{U}_h \cdot \text{ZAD}  \;dv
-  -  \int\limits_D { \frac{{\textbf{U}_h}^2}{2} \frac{1}{e_3} \partial_t e_3 \;dv }   = 0
-\]
-\[
-  % \label{eq:E_tot_pg_2}
-  - \int\limits_D  \textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv
-  = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
-  + \int\limits_D g\, \rho \; \partial_t z  \;dv
-\]
-
-Flux form:
-\begin{subequations}
-  \label{eq:E_tot_flux}
-  \[
-    % \label{eq:E_tot_flux_metric_2}
-    \int\limits_D  \textbf{U}_h \cdot \text {COR} \;  dv   = 0
-  \]
-  \[
-    % \label{eq:E_tot_flux_adv_2}
-    \int\limits_D \textbf{U}_h \cdot \text{ADV}   \;dv
-    +   \frac{1}{2} \int\limits_D {  {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t e_3  \;dv } =\;0
-  \]
-  \begin{equation}
-    \label{eq:E_tot_pg_3}
-    - \int\limits_D  \textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv
-    = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
-    + \int\limits_D g\, \rho \; \partial_t  z  \;dv
-  \end{equation}
-\end{subequations}
-
-\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*}
-  \partial_t  \left( \int\limits_D { \rho \, g \, z  \;dv} \right)
-  &= + \int\limits_D \frac{1}{e_3} \partial_t (e_3\,\rho) \;g\;z\;\;dv
-  +  \int\limits_D g\, \rho \; \partial_t z  \;dv   &&&\\
-  &= - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
-  + \int\limits_D g\, \rho \; \partial_t z \;dv   &&&\\
-  &= + \int\limits_D  \rho \,g \left( \textbf {U}_h \cdot \nabla_h z + \omega \frac{1}{e_3} \partial_k z \right)  \;dv
-  + \int\limits_D g\, \rho \; \partial_t z \;dv   &&&\\
-  &= + \int\limits_D  \rho \,g \left( \omega + \partial_t z + \textbf {U}_h \cdot \nabla_h z  \right)  \;dv  &&&\\
-  &=+  \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}). 
- 
-The left hand side of \autoref{eq:E_tot_pg_3} can be transformed as follows:
-\begin{flalign*}
-  - \int\limits_D  \left. \nabla p \right|_z & \cdot \textbf{U}_h \;dv
-  = - \int\limits_D  \left( \nabla_h p + \rho \, g \nabla_h z \right) \cdot \textbf{U}_h \;dv   &&&\\
-  \allowdisplaybreaks
-  &= - \int\limits_D  \nabla_h  p \cdot \textbf{U}_h \;dv   - \int\limits_D  \rho \, g \, \nabla_h z \cdot \textbf{U}_h \;dv   &&&\\
-  \allowdisplaybreaks
-  &= +\int\limits_D p \,\nabla_h \cdot \textbf{U}_h \;dv   + \int\limits_D  \rho \, g \left( \omega - w + \partial_t z \right) \;dv   &&&\\
-  \allowdisplaybreaks
-  &= -\int\limits_D p \left( \frac{1}{e_3} \partial_t e_3 + \frac{1}{e_3} \partial_k \omega  \right) \;dv
-  +\int\limits_D  \rho \, g \left( \omega - w + \partial_t z \right) \;dv   &&&\\
-  \allowdisplaybreaks
-  &= -\int\limits_D \frac{p}{e_3} \partial_t e_3  \;dv
-  +\int\limits_D \frac{1}{e_3} \partial_k p\; \omega \;dv
-  +\int\limits_D  \rho \, g \left( \omega - w + \partial_t z \right) \;dv   &&&\\
-  &= -\int\limits_D \frac{p}{e_3} \partial_t e_3  \;dv
-  -\int\limits_D \rho \, g \, \omega \;dv
-  +\int\limits_D  \rho \, g \left( \omega - w + \partial_t z \right) \;dv   &&&\\
-  &= - \int\limits_D \frac{p}{e_3} \partial_t e_3 \; \;dv
-  - \int\limits_D  \rho \, g \, w \;dv
-  + \int\limits_D   \rho \, g \, \partial_t z \;dv   &&&\\
-  \allowdisplaybreaks
-  \intertext{introducing the hydrostatic balance $\partial_k p=-\rho \,g\,e_3$ in the last term,
-    it becomes:}
-  &= - \int\limits_D \frac{p}{e_3} \partial_t e_3 \;dv
-  - \int\limits_D  \rho \, g \, w \;dv
-  - \int\limits_D  \frac{1}{e_3} \partial_k p\, \partial_t z \;dv   &&&\\
-  &= - \int\limits_D \frac{p}{e_3} \partial_t e_3 \;dv
-  - \int\limits_D  \rho \, g \, w \;dv
-  + \int\limits_D \,\frac{p}{e_3}\partial_t ( \partial_k z )  dv   &&&\\
-  %
-  &= - \int\limits_D  \rho \, g \, w \;dv   &&&\\
-\end{flalign*}
-
-%gm comment
-\gmcomment{
-%
-The last equality comes from the following equation,
-\begin{flalign*}
-  \int\limits_D p \frac{1}{e_3} \frac{\partial e_3}{\partial t}\; \;dv
-  = \int\limits_D   \rho \, g \, \frac{\partial z }{\partial t} \;dv \quad,
-\end{flalign*}
-that can be demonstrated as follows:
-
-\begin{flalign*}
-  \int\limits_D   \rho \, g \, \frac{\partial z }{\partial t} \;dv
-  &= \int\limits_D    \rho \, g \, \frac{\partial \eta}{\partial t} \;dv
-  -  \int\limits_D    \rho \, g \, \frac{\partial}{\partial t} \left(  \int\limits_k^{k_s}  e_3 \;d\tilde{k} \right) \;dv   &&&\\
-  &= \int\limits_D    \rho \, g \, \frac{\partial \eta}{\partial t} \;dv
-  -  \int\limits_D    \rho \, g    \left(  \int\limits_k^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k} \right) \;dv   &&&\\
-  %
-  \allowdisplaybreaks
-  \intertext{The second term of the right hand side can be transformed by applying the integration by part rule:
-    $\left[ a\,b \right]_{k_b}^{k_s} = \int_{k_b}^{k_s}  a\,\frac{\partial b}{\partial k}       \;dk
-    + \int_{k_b}^{k_s}      \frac{\partial a}{\partial k} \,b \;dk $
-    to the following function: $a=  \int_k^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k}$
-    and $b=  \int_k^{k_s}  \rho \, e_3 \;d\tilde{k}$
-    (note that $\frac{\partial}{\partial k} \left(  \int_k^{k_s}  a \;d\tilde{k}  \right) = - a$ as $k$ is the lower bound of the integral).
-    This leads to:  }
-\end{flalign*}
-\begin{flalign*}
-  &\left[ \int\limits_{k}^{k_s}  \frac{\partial e_3}{\partial t} \,dk \cdot \int\limits_{k}^{k_s}  \rho \, e_3 \,dk   \right]_{k_b}^{k_s}
-  =-\int\limits_{k_b}^{k_s} \left(  \int\limits_k^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k} \right)  \rho \,e_3 \;dk
-  -\int\limits_{k_b}^{k_s}  \frac{\partial e_3}{\partial t}  \left(  \int\limits_k^{k_s}  \rho \, e_3 \;d\tilde{k} \right)   dk  &&&\\
-  \allowdisplaybreaks
-  \intertext{Noting that $\frac{\partial \eta}{\partial t}
-    = \frac{\partial}{\partial t}  \left( \int_{k_b}^{k_s}   e_3  \;d\tilde{k}  \right)
-    = \int_{k_b}^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k}$
-    and
-    $p(k) = \int_k^{k_s}  \rho \,g \, e_3 \;d\tilde{k} $,
-    but also that $\frac{\partial \eta}{\partial t}$ does not depends on $k$, it comes:
-  }
-  & - \int\limits_{k_b}^{k_s}  \rho \, \frac{\partial \eta}{\partial t} \, e_3 \;dk
-  = - \int\limits_{k_b}^{k_s} \left(  \int\limits_k^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k} \right)   \, \rho \, g   e_3\;dk
-  - \int\limits_{k_b}^{k_s}  \frac{\partial e_3}{\partial t} \frac{p}{g}         \;dk       &&&\\
-\end{flalign*}
-Mutliplying by $g$ and integrating over the $(i,j)$ domain it becomes:
-\begin{flalign*}
-  \int\limits_D  \rho \, g \, \left(  \int\limits_k^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k} \right)    \;dv
-  =  \int\limits_D  \rho \, g \, \frac{\partial \eta}{\partial t} dv
-  - \int\limits_D  \frac{p}{e_3}\frac{\partial e_3}{\partial t}         \;dv
-\end{flalign*}
-Using this property, we therefore have:
-\begin{flalign*}
-  \int\limits_D   \rho \, g \, \frac{\partial z }{\partial t} \;dv
-  &= \int\limits_D    \rho \, g \, \frac{\partial \eta}{\partial t}   \;dv
-  - \left(  \int\limits_D  \rho \, g \, \frac{\partial \eta}{\partial t} dv
-    - \int\limits_D  \frac{p}{e_3}\frac{\partial e_3}{\partial t}   \;dv  \right)    &&&\\
-  %
-  &=\int\limits_D \frac{p}{e_3} \frac{\partial (e_3\,\rho)}{\partial t}\; \;dv
-\end{flalign*}
-% end gm comment
-}
-%
-
-% ================================================================
-% Discrete Total energy Conservation : vector invariant form
-% ================================================================
-\section{Discrete total energy conservation: vector invariant form}
-\label{sec:C.2}
-
-% -------------------------------------------------------------------------------------------------------------
-%       Total energy conservation
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Total energy conservation}
-\label{subsec:C_KE+PE_vect}
-
-The discrete form of the total energy conservation, \autoref{eq:Tot_Energy}, is given by:
-\begin{flalign*}
-  \partial_t  \left(  \sum\limits_{i,j,k} \biggl\{ \frac{u^2}{2} \,b_u + \frac{v^2}{2}\, b_v +  \rho \, g \, z_t \,b_t  \biggr\} \right) &=0
-\end{flalign*}
-which in vector invariant forms, it leads to:
-\begin{equation}
-  \label{eq:KE+PE_vect_discrete}
-  \begin{split}
-    \sum\limits_{i,j,k} \biggl\{   u\,                        \partial_t u         \;b_u
-    + v\,                        \partial_t v          \;b_v  \biggr\}
-    + \frac{1}{2} \sum\limits_{i,j,k} \biggl\{  \frac{u^2}{e_{3u}}\partial_t e_{3u} \;b_u
-    +  \frac{v^2}{e_{3v}}\partial_t e_{3v} \;b_v   \biggr\}      \\
-    = - \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_{3t}}\partial_t (e_{3t} \rho) \, g \, z_t \;b_t  \biggr\}
-    - \sum\limits_{i,j,k} \biggl\{ \rho \,g\,\partial_t (z_t) \,b_t  \biggr\}
-  \end{split}
-\end{equation}
-
-Substituting the discrete expression of the time derivative of the velocity either in vector invariant,
-leads to the discrete equivalent of the four equations \autoref{eq:E_tot_flux}.
-
-% -------------------------------------------------------------------------------------------------------------
-%       Vorticity term (coriolis + vorticity part of the advection)
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Vorticity term (coriolis + vorticity part of the advection)}
-\label{subsec:C_vor}
-
-Let $q$, located at $f$-points, be either the relative ($q=\zeta / e_{3f}$),
-or the planetary ($q=f/e_{3f}$), or the total potential vorticity ($q=(\zeta +f) /e_{3f}$).
-Two discretisation of the vorticity term (ENE and EEN) allows the conservation of the kinetic energy.
-% -------------------------------------------------------------------------------------------------------------
-%       Vorticity Term with ENE scheme
-% -------------------------------------------------------------------------------------------------------------
-\subsubsection{Vorticity term with ENE scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})}
-\label{subsec:C_vorENE} 
-
-For the ENE scheme, the two components of the vorticity term are given by:
-\[
-  - e_3 \, q \;{\textbf{k}}\times {\textbf {U}}_h    \equiv
-  \left( {{
-        \begin{array} {*{20}c}
-          + \frac{1} {e_{1u}} \;
-          \overline {\, q \ \overline {\left( e_{1v}\,e_{3v}\,v \right)}^{\,i+1/2}} ^{\,j}        \hfill \\
-          - \frac{1} {e_{2v}} \;
-          \overline {\, q \ \overline {\left( e_{2u}\,e_{3u}\,u \right)}^{\,j+1/2}} ^{\,i}       \hfill
-        \end{array}
-      } }    \right)
-\]
-
-This formulation does not conserve the enstrophy but it does conserve the total kinetic energy.
-Indeed, the kinetic energy tendency associated to the vorticity term and
-averaged over the ocean domain can be transformed as follows:
-\begin{flalign*}
-  &\int\limits_D -  \left(  e_3 \, q \;\textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv &&  \\
-  & \qquad \qquad
-  {
-    \begin{array}{*{20}l}
-      &\equiv \sum\limits_{i,j,k} 	\biggl\{
-        \frac{1} {e_{1u}} \overline { \,q\ \overline{ V }^{\,i+1/2}} ^{\,j} \, u \; b_u
-        - \frac{1} {e_{2v}}\overline { \, q\ \overline{ U }^{\,j+1/2}} ^{\,i} \, v \; b_v \; \biggr\}    \\
-      &\equiv  \sum\limits_{i,j,k} 	\biggl\{
-        \overline { \,q\ \overline{ V }^{\,i+1/2}}^{\,j} \; U
-        - \overline { \,q\ \overline{ U }^{\,j+1/2}}^{\,i} \; V  \; \biggr\}     \\
-      &\equiv \sum\limits_{i,j,k} q \  \biggl\{  \overline{ V }^{\,i+1/2}\; \overline{ U }^{\,j+1/2}
-        - \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.
-
-% -------------------------------------------------------------------------------------------------------------
-%       Vorticity Term with EEN scheme
-% -------------------------------------------------------------------------------------------------------------
-\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: 
-\begin{equation}
-  \tag{\ref{eq:dynvor_een}}
-  \left\{ {
-      \begin{aligned}
-        +q\,e_3 \, v 	&\equiv +\frac{1}{e_{1u} }   \sum_{\substack{i_p,\,k_p}}
-        {^{i+1/2-i_p}_j}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{1v} e_{3v} \ v  \right)^{i+i_p-1/2}_{j+j_p}   \\
-        - q\,e_3 \, u     &\equiv -\frac{1}{e_{2v} }    \sum_{\substack{i_p,\,k_p}}
-        {^i_{j+1/2-j_p}}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{2u} e_{3u} \ u  \right)^{i+i_p}_{j+j_p-1/2}
-      \end{aligned}
-    } \right.
-\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: 
-\begin{equation}
-  \tag{\ref{eq:Q_triads}}
-  _i^j \mathbb{Q}^{i_p}_{j_p}
-  = \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}
-
-This formulation does conserve the total kinetic energy.
-Indeed,
-\begin{flalign*}
-  &\int\limits_D - \textbf{U}_h \cdot   \left(  \zeta \;\textbf{k} \times \textbf{U}_h  \right)  \;  dv &&  \\
-  \equiv \sum\limits_{i,j,k} &	\biggl\{
-  \left[  \sum_{\substack{i_p,\,k_p}}
-    {^{i+1/2-i_p}_j}\mathbb{Q}^{i_p}_{j_p} \; V^{i+1/2-i_p}_{j+j_p} \right] U^{i+1/2}_{j}    %   &&\\
-  - \left[  \sum_{\substack{i_p,\,k_p}}
-    {^i_{j+1/2-j_p}}\mathbb{Q}^{i_p}_{j_p} \; U^{i+i_p}_{j+1/2-j_p}  \right] V^{i}_{j+1/2}    \biggr\}     && \\ \\
-  \equiv \sum\limits_{i,j,k} &  \sum_{\substack{i_p,\,k_p}} \biggl\{  \ \
-  {^{i+1/2-i_p}_j}\mathbb{Q}^{i_p}_{j_p} \; V^{i+1/2-i_p}_{j+j_p}  \, U^{i+1/2}_{j}     %  &&\\
-  - {^i_{j+1/2-j_p}}\mathbb{Q}^{i_p}_{j_p} \; U^{i+i_p}_{j+1/2-j_p} \, V^{i}_{j+1/2}     \ \;     \biggr\}     &&  \\
-  %
-  \allowdisplaybreaks
-  \intertext{ Expending the summation on $i_p$ and $k_p$, it becomes:}
-  %
-  \equiv \sum\limits_{i,j,k} & \biggl\{  \ \
-  {^{i+1}_j     }\mathbb{Q}^{-1/2}_{+1/2} \;V^{i+1}_{j+1/2} \; U^{\,i+1/2}_{j}
-  -  {^i_{j}\quad}\mathbb{Q}^{-1/2}_{+1/2} \; U^{i-1/2}_{j}    \; V^{\,i}_{j+1/2}         &&  \\
-  &       + {^{i+1}_j     }\mathbb{Q}^{-1/2}_{-1/2} \; V^{i+1}_{j-1/2} \; U^{\,i+1/2}_{j}
-  - {^i_{j+1}     }\mathbb{Q}^{-1/2}_{-1/2} \; U^{i-1/2}_{j+1} \; V^{\,i}_{j+1/2}        \biggr.     &&  \\
-  &       + {^{i}_j\quad}\mathbb{Q}^{+1/2}_{+1/2} \; V^{i}_{j+1/2}   \; U^{\,i+1/2}_{j}
-  - {^i_{j}\quad}\mathbb{Q}^{+1/2}_{+1/2} \; U^{i+1/2}_{j}   \; V^{\,i}_{j+1/2}          \biggr.        &&  \\
-  &       + {^{i}_j\quad}\mathbb{Q}^{+1/2}_{-1/2} \; V^{i}_{j-1/2}     \; U^{\,i+1/2}_{j}
-  -  {^i_{j+1}     }\mathbb{Q}^{+1/2}_{-1/2} \; U^{i+1/2}_{j+1}\; V^{\,i}_{j+1/2}  \ \;     \biggr\}     &&  \\
-  %
-  \allowdisplaybreaks
-  \intertext{The summation is done over all $i$ and $j$ indices, it is therefore possible to introduce
-    a shift of $-1$ either in $i$ or $j$ direction in some of the term of the summation (first term of the
-    first and second lines, second term of the second and fourth lines). By doning so, we can regroup
-    all the terms of the summation by triad at a ($i$,$j$) point. In other words, we regroup all the terms
-    in the neighbourhood  that contain a triad at the same ($i$,$j$) indices. It becomes: }
-  \allowdisplaybreaks
-  %
-  \equiv \sum\limits_{i,j,k} & \biggl\{  \ \
-  {^{i}_j}\mathbb{Q}^{-1/2}_{+1/2}  \left[  V^{i}_{j+1/2}\, U^{\,i-1/2}_{j}
-    -  U^{i-1/2}_{j} \, V^{\,i}_{j+1/2}      \right]    &&  \\
-  &       + {^{i}_j}\mathbb{Q}^{-1/2}_{-1/2}  \left[  V^{i}_{j-1/2} \, U^{\,i-1/2}_{j}
-    -    U^{i-1/2}_{j} \, V^{\,i}_{j-1/2}      \right]    \biggr.   &&  \\
-  &      + {^{i}_j}\mathbb{Q}^{+1/2}_{+1/2}  \left[  V^{i}_{j+1/2} \, U^{\,i+1/2}_{j}
-    -    U^{i+1/2}_{j} \, V^{\,i}_{j+1/2}     \right]  \biggr.  &&  \\
-  &     + {^{i}_j}\mathbb{Q}^{+1/2}_{-1/2}  \left[   V^{i}_{j-1/2} \, U^{\,i+1/2}_{j}
-    -    U^{i+1/2}_{j-1} \, V^{\,i}_{j-1/2}  \right]  \ \;   \biggr\}   \qquad
-  \equiv \ 0   &&
-\end{flalign*}
-
-% -------------------------------------------------------------------------------------------------------------
-%       Gradient of Kinetic Energy / Vertical Advection
-% -------------------------------------------------------------------------------------------------------------
-\subsubsection{Gradient of kinetic energy / Vertical advection}
-\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~:
-\[
-  \int_D \textbf{U}_h \cdot \frac{1}{e_3 } \omega \partial_k \textbf{U}_h \;dv
-  =  -   \int_D \textbf{U}_h \cdot \nabla_h \left( \frac{1}{2}\;{\textbf{U}_h}^2 \right)\;dv
-  +   \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)
-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)
-applied in the horizontal and vertical directions, it becomes:
-\begin{flalign*}
-  & - \int_D \textbf{U}_h \cdot \text{KEG}\;dv
-  = - \int_D \textbf{U}_h \cdot \nabla_h \left( \frac{1}{2}\;{\textbf{U}_h}^2 \right)\;dv    &&&\\
-  %
-  \equiv  & -  \sum\limits_{i,j,k} \frac{1}{2}  \biggl\{
-  \frac{1} {e_{1u}}  \delta_{i+1/2}   \left[   \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right]  u \ b_u
-  + \frac{1} {e_{2v}}  \delta_{j+1/2}   \left[   \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right]  v \ b_v   \biggr\}  	&&&  \\
-  %
-  \equiv & + \sum\limits_{i,j,k} \frac{1}{2}  \left(   \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right)\;
-  \biggl\{ \delta_{i} \left[  U   \right] +  \delta_{j} \left[  V  \right]    \biggr\}       &&&  \\
-  \allowdisplaybreaks
-  %
-  \equiv   & - \sum\limits_{i,j,k}  \frac{1}{2}
-  \left(       \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right)  \;
-  \biggl\{   \frac{b_t}{e_{3t}} \partial_t (e_{3t})  +  \delta_k \left[  W   \right]    \biggr\}    &&&\\
-  \allowdisplaybreaks
-  %
-  \equiv & +  \sum\limits_{i,j,k} \frac{1}{2} \delta_{k+1/2}   \left[ \overline{ u^2}^{\,i} + \overline{ v^2}^{\,j}   \right] \;  W
-  -  \sum\limits_{i,j,k} \frac{1}{2} \left(   \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right) \;\partial_t b_t   &&& \\
-  \allowdisplaybreaks
-  %
-  \equiv   & + \sum\limits_{i,j,k} \frac{1} {2} \left(    \overline{\delta_{k+1/2} \left[ u^2 \right]}^{\,i}
-    + \overline{\delta_{k+1/2} \left[ v^2 \right]}^{\,j}    \right) \; W
-  -  \sum\limits_{i,j,k}  \left(  \frac{u^2}{2}\,\partial_t \overline{b_t}^{\,{i+1/2}}
-    + \frac{v^2}{2}\,\partial_t \overline{b_t}^{\,{j+1/2}}   \right)    &&& \\
-  \allowdisplaybreaks
-  \intertext{Assuming that $b_u= \overline{b_t}^{\,i+1/2}$ and $b_v= \overline{b_t}^{\,j+1/2}$, or at least that the time
-    derivative of these two equations is satisfied, it becomes:}
-  %
-  \equiv &     \sum\limits_{i,j,k} \frac{1} {2}
-  \biggl\{ \; \overline{W}^{\,i+1/2}\;\delta_{k+1/2} \left[ u^2 \right]
-  + \overline{W}^{\,j+1/2}\;\delta_{k+1/2} \left[ v^2 \right]  \;  \biggr\}
-  -  \sum\limits_{i,j,k}  \left(  \frac{u^2}{2}\,\partial_t b_u
-    + \frac{v^2}{2}\,\partial_t b_v   \right)    &&& \\
-  \allowdisplaybreaks
-  %
-  \equiv &     \sum\limits_{i,j,k}
-  \biggl\{ \; \overline{W}^{\,i+1/2}\; \overline {u}^{\,k+1/2}\; \delta_{k+1/2}[ u ]
-  + \overline{W}^{\,j+1/2}\; \overline {v}^{\,k+1/2}\; \delta_{k+1/2}[ v ]  \;  \biggr\}
-  -  \sum\limits_{i,j,k}  \left(  \frac{u^2}{2}\,\partial_t b_u
-    + \frac{v^2}{2}\,\partial_t b_v   \right)    &&& \\
-  %
-  \allowdisplaybreaks
-  \equiv  &  \sum\limits_{i,j,k}
-  \biggl\{ \; \frac{1} {b_u } \; \overline { \overline{W}^{\,i+1/2}\,\delta_{k+1/2}  \left[ u \right] }^{\,k} \;u\;b_u
-  + \frac{1} {b_v } \; \overline { \overline{W}^{\,j+1/2} \delta_{k+1/2}  \left[ v \right]  }^{\,k} \;v\;b_v  \; \biggr\}
-  -  \sum\limits_{i,j,k}  \left(  \frac{u^2}{2}\,\partial_t b_u
-    + \frac{v^2}{2}\,\partial_t b_v   \right)    &&& \\
-  %
-  \intertext{The first term provides the discrete expression for the vertical advection of momentum (ZAD),
-    while the second term corresponds exactly to \autoref{eq:KE+PE_vect_discrete}, therefore:}
-  \equiv&                   \int\limits_D \textbf{U}_h \cdot \text{ZAD} \;dv
-  + \frac{1}{2} \int_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t  (e_3)  \;dv }    &&&\\
-  \equiv&                   \int\limits_D \textbf{U}_h \cdot w \partial_k \textbf{U}_h \;dv
-  + \frac{1}{2} \int_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t  (e_3)  \;dv }    &&&\\
-\end{flalign*}
-
-There is two main points here.
-First, the satisfaction of this property links the choice of the discrete formulation of the vertical advection and
-of the horizontal gradient of KE.
-Choosing one imposes the other.
-For example KE can also be discretized as $1/2\,({\overline u^{\,i}}^2 + {\overline v^{\,j}}^2)$.
-This leads to the following expression for the vertical advection:
-\[
-  \frac{1} {e_3 }\; \omega\; \partial_k \textbf{U}_h
-  \equiv \left( {{
-        \begin{array} {*{20}c}
-          \frac{1} {e_{1u}\,e_{2u}\,e_{3u}} \;  \overline{\overline {e_{1t}\,e_{2t} \,\omega\;\delta_{k+1/2}
-          \left[ \overline u^{\,i+1/2} \right]}}^{\,i+1/2,k}  \hfill \\
-          \frac{1} {e_{1v}\,e_{2v}\,e_{3v}} \;   \overline{\overline {e_{1t}\,e_{2t} \,\omega \;\delta_{k+1/2}
-          \left[ \overline v^{\,j+1/2} \right]}}^{\,j+1/2,k} \hfill
-        \end{array}
-      } } \right)
-\]
-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.
-
-Second, as soon as the chosen $s$-coordinate depends on time,
-an extra constraint arises on the time derivative of the volume at $u$- and $v$-points:
-\begin{flalign*}
-  e_{1u}\,e_{2u}\,\partial_t (e_{3u}) =\overline{ e_{1t}\,e_{2t}\;\partial_t (e_{3t}) }^{\,i+1/2}    \\
-  e_{1v}\,e_{2v}\,\partial_t (e_{3v})  =\overline{ e_{1t}\,e_{2t}\;\partial_t (e_{3t}) }^{\,j+1/2}
-\end{flalign*}
-which is (over-)satified by defining the vertical scale factor as follows:
-\begin{flalign*}
-  % \label{eq:e3u-e3v}
-  e_{3u} = \frac{1}{e_{1u}\,e_{2u}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,i+1/2}    \\
-  e_{3v} = \frac{1}{e_{1v}\,e_{2v}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,j+1/2}
-\end{flalign*}
-
-Blah blah required on the the step representation of bottom topography.....
-
-
-% -------------------------------------------------------------------------------------------------------------
-%       Pressure Gradient Term
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Pressure gradient term}
-\label{subsec:C.2.6}
-
-\gmcomment{
-  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}). 
-}
-
-When the equation of state is linear
-(\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: 
-\[
-  - \int_D  \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv
-  = - \int_D \nabla \cdot \left( \rho \,\textbf {U} \right) \,g\,z \;dv
-  + \int_D g\, \rho \; \partial_t (z)  \;dv
-\]
-
-This property can be satisfied in a discrete sense for both $z$- and $s$-coordinates.
-Indeed, defining the depth of a $T$-point, $z_t$,
-as the sum of the vertical scale factors at $w$-points starting from the surface,
-the work of pressure forces can be written as:
-\begin{flalign*}
-  &- \int_D  \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv
-  \equiv \sum\limits_{i,j,k} \biggl\{ \;  - \frac{1} {e_{1u}}   \Bigl(
-  \delta_{i+1/2} [p_t] - g\;\overline \rho^{\,i+1/2}\;\delta_{i+1/2} [z_t]     \Bigr)  \; u\;b_u && \\
-  & \qquad \qquad  \qquad \qquad  \qquad \quad \ \,
-  - \frac{1} {e_{2v}}    \Bigl(
-  \delta_{j+1/2} [p_t] - g\;\overline \rho^{\,j+1/2}\delta_{j+1/2} [z_t]      \Bigr)  \; v\;b_v \;  \biggr\}   && \\
-  %
-  \allowdisplaybreaks
-  \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} $,
-    which comes from the definition of $z_t$, it becomes: }
-  \allowdisplaybreaks
-  %
-  \equiv& +  \sum\limits_{i,j,k}   g  \biggl\{
-  \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t]
-  +  	\overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t]
-  +\Bigl(  \delta_i[U] + \delta_j [V]  \Bigr)\;\frac{p_t}{g} \biggr\}  &&\\
-  %
-  \equiv& +  \sum\limits_{i,j,k}   g   \biggl\{
-  \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t]
-  +  	\overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t]
-  -       \left(   \frac{b_t}{e_{3t}} \partial_t (e_{3t})  +  \delta_k \left[ W \right]    \right) \frac{p_t}{g}    \biggr\}   &&&\\
-  %
-  \equiv& +  \sum\limits_{i,j,k}  g   \biggl\{
-  \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t]
-  +  	\overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t]
-  +	\frac{W}{g}\;\delta_{k+1/2} [p_t]
-  -        \frac{p_t}{g}\,\partial_t b_t    \biggr\}    &&&\\
-  %
-  \equiv& +  \sum\limits_{i,j,k}  g   \biggl\{
-  \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t]
-  +  	\overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t]
-  - 	W\;e_{3w} \overline \rho^{\,k+1/2}
-  -        \frac{p_t}{g}\,\partial_t b_t    \biggr\}    &&&\\
-  %
-  \equiv& +  \sum\limits_{i,j,k}    g   \biggl\{
-  \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t]
-  +  	\overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t]
-  + 	W\; \overline \rho^{\,k+1/2}\;\delta_{k+1/2} [z_t]
-  -        \frac{p_t}{g}\,\partial_t b_t    \biggr\}    &&&\\
-  %
-  \allowdisplaybreaks
-  %
-  \equiv& - \sum\limits_{i,j,k}   g \; z_t      \biggl\{
-  \delta_i 	\left[ U\;	\overline \rho^{\,i+1/2} 	\right]
-  + 	\delta_j 	\left[ V\;	\overline \rho^{\,j+1/2} 	\right]
-  + 	\delta_k 	\left[ W\;	\overline \rho^{\,k+1/2} 	\right]       \biggr\}
-  - \sum\limits_{i,j,k}       \biggl\{ p_t\;\partial_t b_t    \biggr\}   &&&\\
-  %
-  \equiv& + \sum\limits_{i,j,k}   g \; z_t    \biggl\{      \partial_t ( e_{3t} \,\rho)    \biggr\}  \; b_t
-  -  \sum\limits_{i,j,k}                 \biggl\{  p_t\;\partial_t b_t                     \biggr\}              &&&\\
-  %
-\end{flalign*}
-The first term is exactly the first term of the right-hand-side of \autoref{eq:KE+PE_vect_discrete}.
-It remains to demonstrate that the last term,
-which is obviously a discrete analogue of $\int_D \frac{p}{e_3} \partial_t (e_3)\;dv$ is equal to
-the last term of \autoref{eq:KE+PE_vect_discrete}.
-In other words, the following property must be satisfied:
-\begin{flalign*}
-  \sum\limits_{i,j,k}  \biggl\{  p_t\;\partial_t b_t                  \biggr\}
-  \equiv  \sum\limits_{i,j,k}  \biggl\{ \rho \,g\,\partial_t (z_t) \,b_t  \biggr\}
-\end{flalign*}
-
-Let introduce $p_w$ the pressure at $w$-point such that $\delta_k [p_w] = - \rho \,g\,e_{3t}$.
-The right-hand-side of the above equation can be transformed as follows:
-
-\begin{flalign*}
-  \sum\limits_{i,j,k}  \biggl\{ \rho \,g\,\partial_t (z_t) \,b_t  \biggr\}
-  &\equiv   - \sum\limits_{i,j,k}  \biggl\{ \delta_k [p_w]\,\partial_t (z_t) \,e_{1t}\,e_{2t}  \biggr\}        &&&\\
-  %
-  &\equiv  + \sum\limits_{i,j,k}  \biggl\{  p_w\, \delta_{k+1/2} [\partial_t (z_t)] \,e_{1t}\,e_{2t}  \biggr\}
-  \equiv  + \sum\limits_{i,j,k}  \biggl\{  p_w\, \partial_t (e_{3w}) \,e_{1t}\,e_{2t}  \biggr\}        &&&\\
-  &\equiv  + \sum\limits_{i,j,k}  \biggl\{  p_w\, \partial_t (b_w) \biggr\}
-  %
-  % & \equiv     \sum\limits_{i,j,k} \biggl\{  \frac{1}{e_{3t}} \delta_k [p_w]\;\partial_t (z_t) \,b_w   \right)   \biggr\}           &&&\\
-  % & \equiv     \sum\limits_{i,j,k} \biggl\{   p_w\;\partial_t \left(    \delta_k [z_t]   \right)  e_{1w}\,e_{2w}   \biggr\}           &&&\\
-  % & \equiv     \sum\limits_{i,j,k} \biggl\{   p_w\;\partial_t b_w   \biggr\}
-\end{flalign*}
-therefore, the balance to be satisfied is:
-\begin{flalign*}
-  \sum\limits_{i,j,k}  \biggl\{  p_t\;\partial_t (b_t) \biggr\}  \equiv  \sum\limits_{i,j,k}  \biggl\{  p_w\, \partial_t (b_w) \biggr\}
-\end{flalign*}
-which is a purely vertical balance:
-\begin{flalign*}
-  \sum\limits_{k}  \biggl\{  p_t\;\partial_t (e_{3t}) \biggr\}  \equiv  \sum\limits_{k}  \biggl\{  p_w\, \partial_t (e_{3w}) \biggr\}
-\end{flalign*}
-Defining $p_w = \overline{p_t}^{\,k+1/2}$
-
-%gm comment
-\gmcomment{
-  \begin{flalign*}
-    \sum\limits_{i,j,k} \biggl\{   p_t\;\partial_t b_t   \biggr\}                                &&&\\
-    %
-    & \equiv     \sum\limits_{i,j,k} \biggl\{  \frac{1}{e_{3t}} \delta_k [p_w]\;\partial_t (z_t) \,b_w    \biggr\}           &&&\\
-    & \equiv     \sum\limits_{i,j,k} \biggl\{   p_w\;\partial_t \left(    \delta_{k+1/2} [z_t]   \right)  e_{1w}\,e_{2w}   \biggr\}           &&&\\
-    & \equiv     \sum\limits_{i,j,k} \biggl\{   p_w\;\partial_t b_w   \biggr\}
-  \end{flalign*}
-
-  \begin{flalign*}
-    \int\limits_D   \rho \, g \, \frac{\partial z }{\partial t} \;dv
-    \equiv&  \sum\limits_{i,j,k}   \biggl\{  \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t} p   \biggr\} \; b_t   &&&\\
-    \equiv&  \sum\limits_{i,j,k}   \biggl\{      \biggr\} \; b_t   &&&\\
-  \end{flalign*}
-
-  %
-  \begin{flalign*}
-    \equiv& - \int_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
-    + \int\limits_D g\, \rho \; \frac{\partial z}{\partial t}  \;dv     &&& \\
-  \end{flalign*}
-  %
-}
-%end gm comment
-
-Note that this property strongly constrains the discrete expression of both the depth of $T-$points and
-of the term added to the pressure gradient in the $s$-coordinate.
-Nevertheless, it is almost never satisfied since a linear equation of state is rarely used.
-
-% ================================================================
-% Discrete Total energy Conservation : flux form
-% ================================================================
-\section{Discrete total energy conservation: flux form}
-\label{sec:C.3}
-
-% -------------------------------------------------------------------------------------------------------------
-%       Total energy conservation
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Total energy conservation}
-\label{subsec:C_KE+PE_flux}
-
-The discrete form of the total energy conservation, \autoref{eq:Tot_Energy}, is given by:
-\begin{flalign*}
-  \partial_t \left(  \sum\limits_{i,j,k} \biggl\{ \frac{u^2}{2} \,b_u + \frac{v^2}{2}\, b_v +  \rho \, g \, z_t \,b_t  \biggr\} \right) &=0  \\
-\end{flalign*}
-which in flux form, it leads to:
-\begin{flalign*}
-  \sum\limits_{i,j,k} \biggl\{  \frac{u    }{e_{3u}}\,\frac{\partial (e_{3u}u)}{\partial t} \,b_u
-  +  \frac{v    }{e_{3v}}\,\frac{\partial (e_{3v}v)}{\partial t} \,b_v  \biggr\}
-  &  -  \frac{1}{2} \sum\limits_{i,j,k} \biggl\{  \frac{u^2}{e_{3u}}\frac{\partial    e_{3u}    }{\partial t} \,b_u
-  +  \frac{v^2}{e_{3v}}\frac{\partial    e_{3v}    }{\partial t} \,b_v   \biggr\} \\
-  &= - \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_3t}\frac{\partial e_{3t} \rho}{\partial t} \, g \, z_t \,b_t  \biggr\}
-  - \sum\limits_{i,j,k} \biggl\{ \rho \,g\,\frac{\partial z_t}{\partial t} \,b_t  \biggr\} \\
-\end{flalign*}
-
-Substituting the discrete expression of the time derivative of the velocity either in
-vector invariant or in flux form, leads to the discrete equivalent of the ????
-
-
-% -------------------------------------------------------------------------------------------------------------
-%       Coriolis and advection terms: flux form
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Coriolis and advection terms: flux form}
-\label{subsec:C.3.2}
-
-% -------------------------------------------------------------------------------------------------------------
-%       Coriolis plus ``metric'' Term
-% -------------------------------------------------------------------------------------------------------------
-\subsubsection{Coriolis plus ``metric'' term}
-\label{subsec:C.3.3} 
-
-In flux from 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 discretised at an f-point.
-It is given by:
-\[
-  f+\frac{1} {e_1 e_2 } \left( v \frac{\partial e_2 } {\partial i} - u \frac{\partial e_1 } {\partial j}\right)\;
-  \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)
-\]
-
-Either the ENE or EEN scheme is then applied to obtain the vorticity term in flux form.
-It therefore conserves the total KE.
-The derivation is the same as for the vorticity term in the vector invariant form (\autoref{subsec:C_vor}).
-
-% -------------------------------------------------------------------------------------------------------------
-%       Flux form advection
-% -------------------------------------------------------------------------------------------------------------
-\subsubsection{Flux form advection}
-\label{subsec:C.3.4} 
-
-The flux form operator of the momentum advection is evaluated using
-a centered second order finite difference scheme.
-Because of the flux form, the discrete operator does not contribute to the global budget of linear momentum.
-Because of the centered second order scheme, it conserves the horizontal kinetic energy, that is:
-
-\begin{equation}
-  \label{eq:C_ADV_KE_flux}
-  -  \int_D \textbf{U}_h \cdot     \left(                 {{
-        \begin{array} {*{20}c}
-          \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\
-          \nabla \cdot \left( \textbf{U}\,v \right) \hfill \\
-        \end{array}
-      } }           \right)   \;dv
-  -   \frac{1}{2} \int_D {  {\textbf{U}_h}^2 \frac{1}{e_3} \frac{\partial  e_3 }{\partial t} \;dv } =\;0
-\end{equation}
-
-Let us first consider the first term of the scalar product
-(\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   \\
-  %
-  \equiv& - \sum\limits_{i,j,k} \biggl\{    \frac{1} {b_u}    \biggl(
-  \delta_{i+1/2}  \left[   \overline {U}^{\,i}      \;\overline u^{\,i}          \right]
-  + \delta_j           \left[   \overline {V}^{\,i+1/2}\;\overline u^{\,j+1/2}   \right]
-  + \delta_k          \left[   \overline {W}^{\,i+1/2}\;\overline u^{\,k+1/2} \right]  \biggr)   \;   \biggr\} \, b_u \;u &&&  \\
-  %
-  \equiv& - \sum\limits_{i,j,k}
-  \biggl\{
-  \delta_{i+1/2} \left[   \overline {U}^{\,i}\;  \overline u^{\,i}  \right]
-  + \delta_j          \left[   \overline {V}^{\,i+1/2}\;\overline u^{\,j+1/2}   \right]
-  + \delta_k         \left[   \overline {W}^{\,i+12}\;\overline u^{\,k+1/2}  \right]
-  \; \biggr\} \; u     \\
-  %
-  \equiv& + \sum\limits_{i,j,k}
-  \biggl\{
-  \overline {U}^{\,i}\;	\overline u^{\,i} 	\delta_i \left[ u \right]
-  + \overline {V}^{\,i+1/2}\;	\overline u^{\,j+1/2} 	\delta_{j+1/2} \left[ u \right]
-  + \overline {W}^{\,i+1/2}\;	\overline u^{\,k+1/2}	\delta_{k+1/2} 	\left[ u \right]     \biggr\}     && \\
-  %
-  \equiv& + \frac{1}{2} \sum\limits_{i,j,k}    \biggl\{
-  \overline{U}^{\,i} 		\delta_i 		\left[ u^2 \right]
-  + \overline{V}^{\,i+1/2} 	\delta_{j+/2} 	\left[ u^2 \right]
-  + \overline{W}^{\,i+1/2} 	\delta_{k+1/2} 	\left[ u^2 \right]      \biggr\} && \\
-  %
-  \equiv& -  \sum\limits_{i,j,k}    \frac{1}{2}   \bigg\{
-  U  \; \delta_{i+1/2}    \left[ \overline {u^2}^{\,i} \right]
-  + V  \; \delta_{j+1/2}    \left[ \overline {u^2}^{\,i} \right]
-  + W \; \delta_{k+1/2}   \left[ \overline {u^2}^{\,i} \right]     \biggr\}    &&& \\
-  %
-  \equiv& - \sum\limits_{i,j,k}  \frac{1}{2}  \overline {u^2}^{\,i}     \biggl\{
-  \delta_{i+1/2} 	\left[ U  \right]
-  + \delta_{j+1/2} 	\left[ V  \right]
-  + \delta_{k+1/2} 	\left[ W \right]     \biggr\}    &&& \\
-  %
-  \equiv& + \sum\limits_{i,j,k}  \frac{1}{2}  \overline {u^2}^{\,i}
-  \biggl\{     \left(   \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t}   \right) \; b_t     \biggr\}    &&& \\
-\end{flalign*}
-Applying similar manipulation applied to the second term of the scalar product leads to:
-\[
-  -  \int_D \textbf{U}_h \cdot     \left(                 {{
-        \begin{array} {*{20}c}
-          \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\
-          \nabla \cdot \left( \textbf{U}\,v \right) \hfill \\
-        \end{array}
-      } }           \right)   \;dv
-  \equiv + \sum\limits_{i,j,k}  \frac{1}{2}  \left( \overline {u^2}^{\,i} + \overline {v^2}^{\,j} \right)
-  \biggl\{     \left(   \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t}   \right) \; b_t     \biggr\}
-\]
-which is the discrete form of $ \frac{1}{2} \int_D u \cdot \nabla \cdot \left(   \textbf{U}\,u   \right) \; dv $.
-\autoref{eq:C_ADV_KE_flux} is thus satisfied.
-
-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). 
-
-% ================================================================
-% Discrete Enstrophy Conservation
-% ================================================================
-\section{Discrete enstrophy conservation}
-\label{sec:C.4}
-
-% -------------------------------------------------------------------------------------------------------------
-%       Vorticity Term with ENS scheme
-% -------------------------------------------------------------------------------------------------------------
-\subsubsection{Vorticity term with ENS scheme  (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})}
-\label{subsec:C_vorENS} 
-
-In the ENS scheme, the vorticity term is descretized as follows:
-\begin{equation}
-  \tag{\ref{eq:dynvor_ens}}
-  \left\{
-    \begin{aligned}
-      +\frac{1}{e_{1u}} & \overline{q}^{\,i}  & {\overline{ \overline{\left( e_{1v}\,e_{3v}\;  v \right) } } }^{\,i, j+1/2}    \\
-      - \frac{1}{e_{2v}} & \overline{q}^{\,j}  & {\overline{ \overline{\left( e_{2u}\,e_{3u}\; u \right) } } }^{\,i+1/2, j}
-    \end{aligned}
-  \right.
-\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$).
-Indeed, using the symmetry or skew symmetry properties of the operators
-( \autoref{eq:DOM_mi_adj} and \autoref{eq:DOM_di_adj}),
-it can be shown that:
-\begin{equation}
-  \label{eq:C_1.1}
-  \int_D {q\,\;{\textbf{k}}\cdot \frac{1} {e_3} \nabla \times \left( {e_3 \, q \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} \equiv 0
-\end{equation}
-where $dv=e_1\,e_2\,e_3 \; di\,dj\,dk$ is the volume element.
-Indeed, using \autoref{eq:dynvor_ens},
-the discrete form of the right hand side of \autoref{eq:C_1.1} can be transformed as follow:
-\begin{flalign*}
-  &\int_D q \,\; \textbf{k} \cdot \frac{1} {e_3 } \nabla \times
-  \left(  e_3 \, q \; \textbf{k} \times  \textbf{U}_h   \right)\;   dv \\
-  %
-  & \qquad
-  {
-    \begin{array}{*{20}l}
-      &\equiv \sum\limits_{i,j,k}
-        q \ \left\{  \delta_{i+1/2}  \left[ - \,\overline {q}^{\,i}\;  \overline{\overline  U }^{\,i,j+1/ 2} \right]
-        - \delta_{j+1/2} \left[	 \overline {q}^{\,j}\;  \overline{\overline  V }^{\,i+1/2, j} \right]     \right\}    \\
-      %
-      &\equiv \sum\limits_{i,j,k}
-        \left\{   \delta_i [q] \; \overline{q}^{\,i} \; \overline{  \overline U  }^{\,i,j+1/2}
-        + \delta_j [q] \; \overline{q}^{\,j} \; \overline{\overline V }^{\,i+1/2,j}        \right\}       &&  \\
-      %
-      &\equiv \,\frac{1} {2} \sum\limits_{i,j,k}
-        \left\{         \delta_i  \left[ q^2 \right] \; \overline{\overline U }^{\,i,j+1/2}
-        + \delta_j  \left[ q^2 \right] \; \overline{\overline V }^{\,i+1/2,j}      \right\}    &&  \\
-      %
-      &\equiv - \frac{1} {2} \sum\limits_{i,j,k} 	q^2 \;
-        \left\{    \delta_{i+1/2}   \left[   \overline{\overline{ U }}^{\,i,j+1/2}    \right]
-        + \delta_{j+1/2}  \left[   \overline{\overline{ V }}^{\,i+1/2,j}     \right]    \right\}    && \\
-    \end{array}
-  }
-  %
-  \allowdisplaybreaks
-  \intertext{ Since $\overline {\;\cdot \;} $ and $\delta $ operators commute: $\delta_{i+1/2}
-    \left[ {\overline a^{\,i}} \right] = \overline {\delta_i \left[ a \right]}^{\,i+1/2}$,
-    and introducing the horizontal divergence $\chi $, it becomes: }
-  \allowdisplaybreaks
-  %
-  & \qquad {
-    \begin{array}{*{20}l}
-      &\equiv \sum\limits_{i,j,k} - \frac{1} {2} q^2 \; \overline{\overline{ e_{1t}\,e_{2t}\,e_{3t}^{}\, \chi}}^{\,i+1/2,j+1/2}
-        \quad \equiv 0 &&
-    \end{array}
-  }
-\end{flalign*}
-The later equality is obtain only when the flow is horizontally non-divergent, \ie $\chi$=$0$. 
-
-% -------------------------------------------------------------------------------------------------------------
-%       Vorticity Term with EEN scheme
-% -------------------------------------------------------------------------------------------------------------
-\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: 
-\begin{equation}
-  \tag{\ref{eq:dynvor_een}}
-  \left\{ {
-      \begin{aligned}
-        +q\,e_3 \, v 	&\equiv +\frac{1}{e_{1u} }   \sum_{\substack{i_p,\,k_p}}
-        {^{i+1/2-i_p}_j}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{1v} e_{3v} \ v  \right)^{i+i_p-1/2}_{j+j_p}   \\
-        - q\,e_3 \, u     &\equiv -\frac{1}{e_{2v} }    \sum_{\substack{i_p,\,k_p}}
-        {^i_{j+1/2-j_p}}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{2u} e_{3u} \ u  \right)^{i+i_p}_{j+j_p-1/2}   \\
-      \end{aligned}
-    } \right.
-\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: 
-\begin{equation}
-  \tag{\ref{eq:Q_triads}}
-  _i^j \mathbb{Q}^{i_p}_{j_p}
-  = \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}
-
-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} $,
-similar manipulation can be done for the 3 others.
-The discrete form of the right hand side of \autoref{eq:C_1.1} applied to
-this triad only can be transformed as follow:
-
-\begin{flalign*}
-  &\int_D {q\,\;{\textbf{k}}\cdot \frac{1} {e_3} \nabla \times \left( {e_3 \, q \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} \\
-  %
-  \equiv& \sum\limits_{i,j,k}
-  {q} \    \biggl\{ \;\;
-  \delta_{i+1/2} \left[   -\, {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}  \; U^{i+1/2}_{j}}    \right]
-  - \delta_{j+1/2} \left[       {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}  \; V^{i}_{j+1/2}}    \right]
-  \;\;\biggr\}        &&  \\
-  %
-  \equiv& \sum\limits_{i,j,k}
-  \biggl\{   \delta_i [q] \  {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}  \; U^{i+1/2}_{j}}
-  + \delta_j [q] \  {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}  \; V^{i}_{j+1/2}}   \biggr\}
-  && \\
-  %
-  ... & &&\\
-  &Demonstation \ to \ be \ done... &&\\
-  ... & &&\\
-  %
-  \equiv& \frac{1} {2} \sum\limits_{i,j,k}
-  \biggl\{	\delta_i    \Bigl[    \left(  {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2   \Bigr]\;
-  \overline{\overline {U}}^{\,i,j+1/2}
-  + \delta_j 	\Bigl[    \left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2     \Bigr]\;
-  \overline{\overline {V}}^{\,i+1/2,j}
-  \biggr\}
-  &&  \\
-  %
-  \equiv& - \frac{1} {2} \sum\limits_{i,j,k} 	\left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2\;
-  \biggl\{    \delta_{i+1/2}
-  \left[   \overline{\overline {U}}^{\,i,j+1/2}    \right]
-  + \delta_{j+1/2}
-  \left[   \overline{\overline {V}}^{\,i+1/2,j}     \right]
-  \biggr\}    && \\
-  %
-  \equiv& \sum\limits_{i,j,k} - \frac{1} {2} \left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2
-  \; \overline{\overline{ b_t^{}\, \chi}}^{\,i+1/2,\,j+1/2}  &&\\
-  %
-  \ \ \equiv& \ 0     &&\\
-\end{flalign*}
-
-% ================================================================
-% Conservation Properties on Tracers
-% ================================================================
-\section{Conservation properties on tracers}
-\label{sec:C.5}
-
-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.
-Nevertheless the other schemes ensure that the global variance decreases
-(\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. 
-% -------------------------------------------------------------------------------------------------------------
-%       Advection Term
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Advection term}
-\label{subsec:C.5.1}
-
-conservation of a tracer, $T$:
-\[
-  \frac{\partial }{\partial t} \left(   \int_D {T\;dv}   \right)
-  =  \int_D { \frac{1}{e_3}\frac{\partial \left( e_3 \, T \right)}{\partial t} \;dv }=0
-\]
-
-conservation of its variance:
-\begin{flalign*}
-  \frac{\partial }{\partial t} \left( \int_D {\frac{1}{2} T^2\;dv} \right)
-  =&  \int_D { \frac{1}{e_3} Q      \frac{\partial \left( e_3 \, T \right) }{\partial t} \;dv }
-  -   \frac{1}{2} \int_D {  T^2 \frac{1}{e_3} \frac{\partial  e_3 }{\partial t} \;dv }
-\end{flalign*}
-
-Whatever the advection scheme considered it conserves of the tracer content as
-all the scheme are written in flux form.
-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: 
-\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    &&&\\
-  &\equiv - \sum\limits_{i,j,k}    \biggl\{
-  \frac{1} {b_t}  \left(  \delta_i    \left[   U \;\tau_u   \right]
-    + \delta_j    \left[   V  \;\tau_v   \right] \right)
-  + \frac{1} {e_{3t}} \delta_k \left[ w\;\tau_w \right]    \biggl\}  b_t   &&&\\
-  %
-  &\equiv - \sum\limits_{i,j,k}     \left\{
-    \delta_i  \left[   U \;\tau_u   \right]
-    + \delta_j  \left[   V  \;\tau_v   \right]
- 	 + \delta_k \left[ W \;\tau_w \right] \right\}   && \\
-  &\equiv 0 &&&
-\end{flalign*}
-
-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}$. 
-It can be demonstarted as follows:
-\begin{flalign*}
-  &\int_D { \frac{1}{e_3} Q      \frac{\partial \left( e_3 \, T \right) }{\partial t} \;dv }
-  = - \int\limits_D \tau\;\nabla \cdot \left( T\; \textbf{U} \right)\;dv &&&\\
-  \equiv& - \sum\limits_{i,j,k} T\;
-  \left\{
-    \delta_i  \left[ U  \overline T^{\,i+1/2}  \right]
-    + \delta_j  \left[ V  \overline T^{\,j+1/2}  \right]
-    + \delta_k \left[ W \overline T^{\,k+1/2} \right]          \right\} && \\
-  \equiv& + \sum\limits_{i,j,k}
-  \left\{     U  \overline T^{\,i+1/2} \,\delta_{i+1/2}  \left[ T \right]
-    +  V  \overline T^{\,j+1/2} \;\delta_{j+1/2}  \left[ T \right]
-    +  W \overline T^{\,k+1/2}\;\delta_{k+1/2} \left[ T \right]     \right\}      &&\\
-  \equiv&  + \frac{1} {2}  \sum\limits_{i,j,k}
-  \Bigl\{   U  \;\delta_{i+1/2} \left[ T^2 \right]
-  + V  \;\delta_{j+1/2}  \left[ T^2 \right]
-  + W \;\delta_{k+1/2} \left[ T^2 \right]   \Bigr\}     && \\
-  \equiv& - \frac{1} {2}  \sum\limits_{i,j,k} T^2
-  \Bigl\{    \delta_i  \left[ U  \right]
-  + \delta_j  \left[ V  \right]
-  + \delta_k \left[ W \right]     \Bigr\}      &&&  \\
-  \equiv& + \frac{1} {2}  \sum\limits_{i,j,k} T^2
-  \Bigl\{   \frac{1}{e_{3t}} \frac{\partial e_{3t}\,T }{\partial t}     \Bigr\}      &&& \\
-\end{flalign*}
-which is the discrete form of $ \frac{1}{2} \int_D {  T^2 \frac{1}{e_3} \frac{\partial  e_3 }{\partial t} \;dv }$.
-
-% ================================================================
-% Conservation Properties on Lateral Momentum Physics
-% ================================================================
-\section{Conservation properties on lateral momentum physics}
-\label{sec:dynldf_properties}
-
-The discrete formulation of the horizontal diffusion of momentum ensures
-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
-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}. 
-
-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. 
-
-% -------------------------------------------------------------------------------------------------------------
-%       Conservation of Potential Vorticity
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Conservation of potential vorticity}
-\label{subsec:C.6.1}
-
-The lateral momentum diffusion term conserves the potential vorticity:
-\begin{flalign*}
-  &\int \limits_D \frac{1} {e_3 } \textbf{k} \cdot \nabla \times
-  \Bigl[    \nabla_h  \left( A^{\,lm}\;\chi  \right)
-  - \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right)    \Bigr]\;dv   \\
-  % \end{flalign*}
-  %%%%%%%%%% recheck here....  (gm)
-  % \begin{flalign*}
-  =& \int \limits_D  -\frac{1} {e_3 } \textbf{k} \cdot \nabla \times
-  \Bigl[ \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right)  \Bigr]\;dv  \\
-  % \end{flalign*}
-  % \begin{flalign*}
-  \equiv& \sum\limits_{i,j}
-  \left\{
-    \delta_{i+1/2} \left[  \frac {e_{2v}} {e_{1v}\,e_{3v}}  \delta_i \left[ A_f^{\,lm} e_{3f} \zeta  \right]  \right]
-    + \delta_{j+1/2} \left[  \frac {e_{1u}} {e_{2u}\,e_{3u}}  \delta_j \left[ A_f^{\,lm} e_{3f} \zeta  \right]  \right]
-  \right\} 	 \\
-  %
-  \intertext{Using \autoref{eq:DOM_di_adj}, it follows:}
-  %
-  \equiv& \sum\limits_{i,j,k}
-  -\,\left\{
-    \frac{e_{2v}} {e_{1v}\,e_{3v}}  \delta_i	\left[ A_f^{\,lm} e_{3f} \zeta  \right]\;\delta_i \left[ 1\right]
-	 + \frac{e_{1u}} {e_{2u}\,e_{3u}}  \delta_j 	\left[ A_f^{\,lm} e_{3f} \zeta  \right]\;\delta_j \left[ 1\right]
-  \right\} \quad \equiv 0
-  \\
-\end{flalign*}
-
-% -------------------------------------------------------------------------------------------------------------
-%       Dissipation of Horizontal Kinetic Energy
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Dissipation of horizontal kinetic energy}
-\label{subsec:C.6.2}
-
-The lateral momentum diffusion term dissipates the horizontal kinetic energy:
-%\begin{flalign*}
-\[
-  \begin{split}
-    \int_D \textbf{U}_h \cdot
-    \left[ \nabla_h 		\right.   &     \left.       \left( A^{\,lm}\;\chi \right)
-      - \nabla_h \times  \left( A^{\,lm}\;\zeta \;\textbf{k} \right)     \right] \; dv    \\
-    \\  %%%
-    \equiv& \sum\limits_{i,j,k}
-    \left\{
-      \frac{1} {e_{1u}}               \delta_{i+1/2} \left[  A_T^{\,lm}          \chi     \right]
-      - \frac{1} {e_{2u}\,e_{3u}}  \delta_j           \left[ A_f^{\,lm} e_{3f} \zeta   \right]
-    \right\} \; e_{1u}\,e_{2u}\,e_{3u} \;u     \\
-    &\;\; + 	\left\{
-	   \frac{1} {e_{2u}}             \delta_{j+1/2}	\left[ A_T^{\,lm}          \chi    \right]
-      + \frac{1} {e_{1v}\,e_{3v}} \delta_i            \left[ A_f^{\,lm} e_{3f} \zeta  \right]
-    \right\} \; e_{1v}\,e_{2u}\,e_{3v} \;v     \qquad \\
-    \\  %%%
-    \equiv& \sum\limits_{i,j,k}
-    \Bigl\{
-    e_{2u}\,e_{3u} \;u\;  \delta_{i+1/2} \left[ A_T^{\,lm}           \chi    \right]
-    - e_{1u}             \;u\;  \delta_j           \left[ A_f^{\,lm} e_{3f} \zeta  \right]
-	 \Bigl\}
-	 \\
-    &\;\; + \Bigl\{
-    e_{1v}\,e_{3v} \;v\;  \delta_{j+1/2}  \left[ A_T^{\,lm}           \chi    \right]
-    + e_{2v}             \;v\;  \delta_i            \left[ A_f^{\,lm} e_{3f} \zeta  \right]
-    \Bigl\}      \\
-    \\  %%%
-    \equiv& \sum\limits_{i,j,k}
-    - \Bigl(
-    \delta_i   \left[  e_{2u}\,e_{3u} \;u  \right]
-    + \delta_j  \left[  e_{1v}\,e_{3v}  \;v  \right]
-    \Bigr) \;  A_T^{\,lm} \chi   \\
-    &\;\; - \Bigl(
-    \delta_{i+1/2}  \left[  e_{2v}  \;v  \right]
-    - \delta_{j+1/2}  \left[  e_{1u} \;u  \right]
-    \Bigr)\;  A_f^{\,lm} e_{3f} \zeta      \\
-    \\  %%%
-    \equiv& \sum\limits_{i,j,k}
-    - A_T^{\,lm}  \,\chi^2   \;e_{1t}\,e_{2t}\,e_{3t}
-    - A_f ^{\,lm}  \,\zeta^2 \;e_{1f }\,e_{2f }\,e_{3f}
-    \quad \leq 0       \\
-  \end{split}
-\]
-
-% -------------------------------------------------------------------------------------------------------------
-%       Dissipation of Enstrophy
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Dissipation of enstrophy}
-\label{subsec:C.6.3}
-
-The lateral momentum diffusion term dissipates the enstrophy when the eddy coefficients are horizontally uniform:
-\begin{flalign*}
-  &\int\limits_D  \zeta \; \textbf{k} \cdot \nabla \times
-  \left[   \nabla_h \left( A^{\,lm}\;\chi  \right)
-    - \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right)   \right]\;dv &&&\\
-  &\quad = A^{\,lm} \int \limits_D \zeta \textbf{k} \cdot \nabla \times
-  \left[    \nabla_h \times \left( \zeta \; \textbf{k} \right)   \right]\;dv &&&\\
-  &\quad \equiv A^{\,lm} \sum\limits_{i,j,k}  \zeta \;e_{3f}
-  \left\{     \delta_{i+1/2} \left[  \frac{e_{2v}} {e_{1v}\,e_{3v}} \delta_i \left[ e_{3f} \zeta  \right]   \right]
-    + \delta_{j+1/2} \left[  \frac{e_{1u}} {e_{2u}\,e_{3u}} \delta_j \left[ e_{3f} \zeta  \right]   \right]      \right\}   &&&\\
-  %
-  \intertext{Using \autoref{eq:DOM_di_adj}, it follows:}
-  %
-  &\quad \equiv  - A^{\,lm} \sum\limits_{i,j,k}
-  \left\{    \left(  \frac{1} {e_{1v}\,e_{3v}}  \delta_i \left[ e_{3f} \zeta  \right]  \right)^2   b_v
-    + \left(  \frac{1} {e_{2u}\,e_{3u}}  \delta_j \left[ e_{3f} \zeta  \right] \right)^2   b_u  \right\}  \quad \leq \;0    &&&\\
-\end{flalign*}
-
-% -------------------------------------------------------------------------------------------------------------
-%       Conservation of Horizontal Divergence
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Conservation of horizontal divergence}
-\label{subsec:C.6.4}
-
-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 resulting term conserves the $\chi$ and dissipates $\chi^2$ when the eddy coefficients are horizontally uniform.
-\begin{flalign*}
-  & \int\limits_D  \nabla_h \cdot
-  \Bigl[     \nabla_h \left( A^{\,lm}\;\chi \right)
-  - \nabla_h \times \left( A^{\,lm}\;\zeta \;\textbf{k} \right)    \Bigr]  dv
-  = \int\limits_D  \nabla_h \cdot \nabla_h \left( A^{\,lm}\;\chi  \right)   dv   \\
-  %
-  &\equiv \sum\limits_{i,j,k}
-  \left\{   \delta_i \left[ A_u^{\,lm} \frac{e_{2u}\,e_{3u}} {e_{1u}}  \delta_{i+1/2} \left[ \chi \right]  \right]
-    + \delta_j \left[ A_v^{\,lm} \frac{e_{1v}\,e_{3v}} {e_{2v}}  \delta_{j+1/2} \left[ \chi \right]  \right]    \right\}    \\
-  %
-  \intertext{Using \autoref{eq:DOM_di_adj}, it follows:}
-  %
-  &\equiv \sum\limits_{i,j,k}
-  - \left\{   \frac{e_{2u}\,e_{3u}} {e_{1u}}  A_u^{\,lm} \delta_{i+1/2} \left[ \chi \right] \delta_{i+1/2} \left[ 1 \right]
-    + \frac{e_{1v}\,e_{3v}} {e_{2v}}  A_v^{\,lm} \delta_{j+1/2} \left[ \chi \right] \delta_{j+1/2} \left[ 1 \right]    \right\}
-  \quad \equiv 0
-\end{flalign*}
-
-% -------------------------------------------------------------------------------------------------------------
-%       Dissipation of Horizontal Divergence Variance
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Dissipation of horizontal divergence variance}
-\label{subsec:C.6.5}
-
-\begin{flalign*}
-  &\int\limits_D \chi \;\nabla_h \cdot
-  \left[    \nabla_h              \left( A^{\,lm}\;\chi                    \right)
-    - \nabla_h   \times  \left( A^{\,lm}\;\zeta \;\textbf{k} \right)    \right]\;  dv
-  = A^{\,lm}   \int\limits_D \chi \;\nabla_h \cdot \nabla_h \left( \chi \right)\;  dv    \\
-  %
-  &\equiv A^{\,lm}  \sum\limits_{i,j,k}  \frac{1} {e_{1t}\,e_{2t}\,e_{3t}}  \chi
-  \left\{
-    \delta_i  \left[   \frac{e_{2u}\,e_{3u}} {e_{1u}}  \delta_{i+1/2} \left[ \chi \right]   \right]
-    + \delta_j  \left[   \frac{e_{1v}\,e_{3v}} {e_{2v}}   \delta_{j+1/2} \left[ \chi \right]   \right]
-  \right\} \;   e_{1t}\,e_{2t}\,e_{3t}    \\
-  %
-  \intertext{Using \autoref{eq:DOM_di_adj}, it turns out to be:}
-  %
-  &\equiv - A^{\,lm} \sum\limits_{i,j,k}
-  \left\{    \left(  \frac{1} {e_{1u}}  \delta_{i+1/2}  \left[ \chi \right]  \right)^2  b_u
-    + \left(  \frac{1} {e_{2v}}  \delta_{j+1/2}  \left[ \chi \right]  \right)^2  b_v    \right\}
-  \quad \leq 0
-\end{flalign*}
-
-% ================================================================
-% Conservation Properties on Vertical Momentum Physics
-% ================================================================
-\section{Conservation properties on vertical momentum physics}
-\label{sec:C.7}
-
-As for the lateral momentum physics,
-the continuous form of the vertical diffusion of momentum satisfies several integral constraints.
-The first two are associated with the conservation of momentum and the dissipation of horizontal kinetic energy:
-\begin{align*}
-  \int\limits_D   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
-  \left(   \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}   \right)\;  dv
-  \qquad \quad &= \vec{\textbf{0}}
-  %
-  \intertext{and}
-  %
-                 \int\limits_D
-                 \textbf{U}_h \cdot   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
-                 \left(   \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}   \right)\; dv    \quad &\leq 0
-\end{align*}
-
-The first property is obvious.
-The second results from:
-\begin{flalign*}
-  \int\limits_D
-  \textbf{U}_h \cdot   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
-  \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}   \right)\;dv    &&&\\
-\end{flalign*}
-\begin{flalign*}
-  &\equiv \sum\limits_{i,j,k}
-  \left(
-    u\; \delta_k \left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2}  \left[ u \right]  \right]\;  e_{1u}\,e_{2u}
-    + v\; \delta_k \left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2}   \left[ v \right]  \right]\;  e_{1v}\,e_{2v} \right)   &&&
-  %
-  \intertext{since the horizontal scale factor does not depend on $k$, it follows:}
-  %
-  &\equiv - \sum\limits_{i,j,k}
-  \left(  \frac{A_u^{\,vm}} {e_{3uw}} \left( \delta_{k+1/2} \left[ u \right] \right)^2\; e_{1u}\,e_{2u}
-    + \frac{A_v^{\,vm}} {e_{3vw}}  \left( \delta_{k+1/2} \left[ v \right] \right)^2\; e_{1v}\,e_{2v}  \right)
-  \quad \leq 0   &&&
-\end{flalign*}
-
-The vorticity is also conserved.
-Indeed:
-\begin{flalign*}
-  \int \limits_D
-  \frac{1} {e_3 } \textbf{k} \cdot \nabla \times
-  \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k}  \left(
-      \frac{A^{\,vm}} {e_3}\; \frac{\partial \textbf{U}_h } {\partial k}
-    \right)  \right)\; dv   &&&
-\end{flalign*}
-\begin{flalign*}
-  \equiv \sum\limits_{i,j,k}  \frac{1} {e_{3f}}\; \frac{1} {e_{1f}\,e_{2f}}
-  \bigg\{    \biggr.   \quad
-  \delta_{i+1/2}
-  &\left(   \frac{e_{2v}} {e_{3v}} \delta_k  \left[  \frac{1} {e_{3vw}} \delta_{k+1/2} \left[ v \right]  \right]  \right)   &&\\
-  \biggl.
-  - \delta_{j+1/2}
-  &\left(   \frac{e_{1u}} {e_{3u}} \delta_k \left[  \frac{1} {e_{3uw}}\delta_{k+1/2} \left[ u \right]  \right]   \right)
-  \biggr\} \;
-  e_{1f}\,e_{2f}\,e_{3f} \; \equiv 0   &&
-\end{flalign*}
-
-If the vertical diffusion coefficient is uniform over the whole domain, the enstrophy is dissipated, \ie
-\begin{flalign*}
-  \int\limits_D \zeta \, \textbf{k} \cdot \nabla \times
-  \left(   \frac{1} {e_3}\; \frac{\partial } {\partial k}
-    \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}   \right)   \right)\; dv = 0   &&&
-\end{flalign*}
-
-This property is only satisfied in $z$-coordinates:
-\begin{flalign*}
-  \int\limits_D \zeta \, \textbf{k} \cdot \nabla \times
-  \left(  \frac{1} {e_3}\; \frac{\partial } {\partial k}
-    \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}  \right)   \right)\; dv   &&&
-\end{flalign*}
-\begin{flalign*}
-  \equiv \sum\limits_{i,j,k} \zeta \;e_{3f} \;
-  \biggl\{ 	\biggr.	\quad
-  \delta_{i+1/2}
-  &\left(   \frac{e_{2v}} {e_{3v}} \delta_k \left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2}[v]  \right]   \right)   &&\\
-  - \delta_{j+1/2}
-  &\biggl.
-  \left(   \frac{e_{1u}} {e_{3u}} \delta_k \left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} [u]  \right]    \right) \biggr\}   &&
-\end{flalign*}
-\begin{flalign*}
-  \equiv \sum\limits_{i,j,k} \zeta \;e_{3f}
-  \biggl\{		\biggr.	\quad
-  \frac{1} {e_{3v}} \delta_k
-  &\left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} \left[ \delta_{i+1/2} \left[ e_{2v}\,v \right] \right]   \right]    &&\\
-  \biggl.
-  - \frac{1} {e_{3u}} \delta_k
-  &\left[  \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} \left[ \delta_{j+1/2} \left[ e_{1u}\,u \right] \right]  \right]  \biggr\}  &&
-\end{flalign*}
-Using the fact that the vertical diffusion coefficients are uniform,
-and that in $z$-coordinate, the vertical scale factors do not depend on $i$ and $j$ so that:
-$e_{3f} =e_{3u} =e_{3v} =e_{3t} $ and $e_{3w} =e_{3uw} =e_{3vw} $, it follows:
-\begin{flalign*}
-  \equiv A^{\,vm} \sum\limits_{i,j,k} \zeta \;\delta_k
-  \left[   \frac{1} {e_{3w}} \delta_{k+1/2} \Bigl[   \delta_{i+1/2} \left[ e_{2v}\,v \right]
-    - \delta_{j+1/ 2} \left[ e_{1u}\,u \right]   \Bigr]    \right]    &&&
-\end{flalign*}
-\begin{flalign*}
-  \equiv - A^{\,vm} \sum\limits_{i,j,k} \frac{1} {e_{3w}}
-  \left( \delta_{k+1/2} \left[ \zeta  \right] \right)^2 \; e_{1f}\,e_{2f}  \; \leq 0    &&&
-\end{flalign*}
-Similarly, the horizontal divergence is obviously conserved:
-
-\begin{flalign*}
-  \int\limits_D \nabla \cdot
-  \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k}
-    \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
-the vertical diffusion coefficient is uniform over the whole domain:
-
-\begin{flalign*}
-  \int\limits_D \chi \;\nabla \cdot
-  \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k}
-    \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}  \right) \right)\;  dv = 0  &&&
-\end{flalign*}
-This property is only satisfied in the $z$-coordinate:
-\begin{flalign*}
-  \int\limits_D \chi \;\nabla \cdot
-  \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k}
-    \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right)  \right)\; dv    &&&
-\end{flalign*}
-\begin{flalign*}
-  \equiv \sum\limits_{i,j,k} \frac{\chi } {e_{1t}\,e_{2t}}
-  \biggl\{ 	\Biggr.	\quad
-  \delta_{i+1/2}
-  &\left(   \frac{e_{2u}} {e_{3u}} \delta_k
-    \left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} [u] \right] \right)    &&\\
-  \Biggl.
-  + \delta_{j+1/2}
-  &\left( \frac{e_{1v}} {e_{3v}} \delta_k
-    \left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} [v] \right]   \right)
-  \Biggr\} \;  e_{1t}\,e_{2t}\,e_{3t}   &&
-\end{flalign*}
-
-\begin{flalign*}
-  \equiv A^{\,vm} \sum\limits_{i,j,k}  \chi \,
-  \biggl\{	\biggr.	\quad
-  \delta_{i+1/2}
-  &\left(
-    \delta_k \left[
-      \frac{1} {e_{3uw}} \delta_{k+1/2} \left[ e_{2u}\,u \right] \right]   \right)    && \\
-  \biggl.
-  + \delta_{j+1/2}
-  &\left(    \delta_k \left[
-      \frac{1} {e_{3vw}} \delta_{k+1/2} \left[ e_{1v}\,v \right] \right]   \right)   \biggr\}    &&
-\end{flalign*}
-
-\begin{flalign*}
-  \equiv -A^{\,vm} \sum\limits_{i,j,k}
-  \frac{\delta_{k+1/2} \left[ \chi \right]} {e_{3w}}\; \biggl\{
-  \delta_{k+1/2} \Bigl[
-  \delta_{i+1/2} \left[ e_{2u}\,u \right]
-  + \delta_{j+1/2} \left[ e_{1v}\,v \right]  \Bigr]    \biggr\}    &&&
-\end{flalign*}
-
-\begin{flalign*}
-  \equiv -A^{\,vm} \sum\limits_{i,j,k}
-  \frac{1} {e_{3w}} \delta_{k+1/2} \left[ \chi \right]\; \delta_{k+1/2} \left[ e_{1t}\,e_{2t} \;\chi \right]   &&&
-\end{flalign*}
-
-\begin{flalign*}
-  \equiv -A^{\,vm} \sum\limits_{i,j,k}
-  \frac{e_{1t}\,e_{2t}} {e_{3w}}\; \left( \delta_{k+1/2} \left[ \chi \right]  \right)^2     \quad  \equiv 0    &&&
-\end{flalign*}
-
-% ================================================================
-% Conservation Properties on Tracer Physics
-% ================================================================
-\section{Conservation properties on tracer physics}
-\label{sec:C.8}
-
-The numerical schemes used for tracer subgridscale physics are written such that
-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. 
-
-% -------------------------------------------------------------------------------------------------------------
-%       Conservation of Tracers
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Conservation of tracers}
-\label{subsec:C.8.1}
-
-constraint of conservation of tracers:
-\begin{flalign*}
-  &\int\limits_D  \nabla  \cdot \left( A\;\nabla T \right)\;dv  &&& \\ \\
-  &\equiv \sum\limits_{i,j,k}
-  \biggl\{ 	\biggr.
-  \delta_i
-  \left[
-    A_u^{\,lT} \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2}
-    \left[ T \right]
-  \right]
-  + \delta_j
-  \left[
-    A_v^{\,lT} \frac{e_{1v}\,e_{3v}} {e_{2v}} \delta_{j+1/2}
-    \left[ T \right]
-  \right] && \\
-  & \qquad \qquad \qquad \qquad \qquad \qquad \quad \;\;\;
-  + \delta_k
-  \left[
-    A_w^{\,vT} \frac{e_{1t}\,e_{2t}} {e_{3t}} \delta_{k+1/2}
-    \left[ T \right]
-  \right]
-  \biggr\}   \quad  \equiv 0
-  &&
-\end{flalign*}
-
-In fact, this property simply results from the flux form of the operator. 
-
-% -------------------------------------------------------------------------------------------------------------
-%       Dissipation of Tracer Variance
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Dissipation of tracer variance}
-\label{subsec:C.8.2}
-
-constraint on the dissipation of tracer variance:
-\begin{flalign*}
-  \int\limits_D T\;\nabla & \cdot \left( A\;\nabla T \right)\;dv	&&&\\
-  &\equiv   \sum\limits_{i,j,k} \; T
-  \biggl\{  \biggr.
-  \delta_i \left[ A_u^{\,lT} \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2} \left[T\right] \right]
-  & + \delta_j \left[ A_v^{\,lT} \frac{e_{1v} \,e_{3v}} {e_{2v}} \delta_{j+1/2} \left[T\right] \right]
-  \quad&& \\
-  \biggl.
-  &&+ \delta_k \left[A_w^{\,vT}\frac{e_{1t}\,e_{2t}} {e_{3t}}\delta_{k+1/2}\left[T\right]\right]
-  \biggr\} &&
-\end{flalign*}
-\begin{flalign*}
-  \equiv - \sum\limits_{i,j,k}
-  \biggl\{ 	\biggr.	\quad
-  &    A_u^{\,lT} \left( \frac{1} {e_{1u}} \delta_{i+1/2} \left[ T \right]  \right)^2   e_{1u}\,e_{2u}\,e_{3u}    && \\
-  & + A_v^{\,lT} \left( \frac{1} {e_{2v}} \delta_{j+1/2} \left[ T \right]  \right)^2   e_{1v}\,e_{2v}\,e_{3v}     && \\ \biggl.
-  & + A_w^{\,vT} \left( \frac{1} {e_{3w}} \delta_{k+1/2} \left[ T \right]   \right)^2    e_{1w}\,e_{2w}\,e_{3w}   \biggr\}
-  \quad      \leq 0      &&
-\end{flalign*}
-
-%%%%  end of appendix in gm comment
-%}
-\biblio
-
-\pindex
-
-\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/annex_D.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/annex_D.tex	(revision 11086)
+++ 	(revision )
@@ -1,207 +1,0 @@
-\documentclass[../main/NEMO_manual]{subfiles}
-
-\begin{document}
-% ================================================================
-% Appendix D Coding Rules
-% ================================================================
-\chapter{Coding Rules}
-\label{apdx:D}
-
-\minitoc
-
-\newpage
-
-A "model life" is more than ten years.
-Its software, composed of a few hundred modules, is used by many people who are scientists or students and
-do not necessarily know every aspect of computing very well.
-Moreover, a well thought-out program is easier to read and understand, less difficult to modify,
-produces fewer bugs and is easier to maintain.
-Therefore, it is essential that the model development follows some rules:
-
-- well planned and designed
-
-- well written
-
-- well documented (both on- and off-line)
-
-- maintainable
-
-- easily portable
-
-- flexible.
-
-To satisfy part of these aims, \NEMO is written with a coding standard which is close to the ECMWF rules,
-named DOCTOR \citep{Gibson_TR86}. 
-These rules present some advantages like:
-
-- to provide a well presented program
-
-- to use rules for variable names which allow recognition of their type
-(integer, real, parameter, local or shared variables, etc. ). 
-
-This facilitates both the understanding and the debugging of an algorithm.
-
-% ================================================================
-% The program structure
-% ================================================================
-\section{Program structure}
-\label{sec:D_structure}
-
-Each program begins with a set of headline comments containing:
-
-- the program title
-
-- the purpose of the routine
-
-- the method and algorithms used
-
-- the detail of input and output interfaces
-
-- the external routines and functions used (if they exist)
-
-- references (if they exist)
-
-- the author name(s), the date of creation and any updates.
-
-- Each program is split into several well separated sections and
-sub-sections with an underlined title and specific labelled statements.
-
-- A program has not more than 200 to 300 lines.
-
-A template of a module style can be found on the NEMO depository in the following file:
-NEMO/OPA\_SRC/module\_example.
-% ================================================================
-% Coding conventions
-% ================================================================
-\section{Coding conventions}
-\label{sec:D_coding}
-
-- Use of the universal language \fninety, and try to avoid obsolescent features like statement functions,
-do not use GO TO and EQUIVALENCE statements.
-
-- A continuation line begins with the character {\&} indented by three spaces compared to the previous line,
-while the previous line ended with the character {\&}.
-
-- All the variables must be declared.
-The code is usually compiled with implicit none.
- 
-- Never use continuation lines in the declaration of a variable.
-When searching a variable in the code through a \textit{grep} command, the declaration line will be found.
-
-- In the declaration of a PUBLIC variable, the comment part at the end of the line should start with
-the two characters "\verb?!:?".
-The following UNIX command, \\
-\verb?grep var_name *90 \ grep \!: ? \\
-will display the module name and the line where the var\_name declaration is.
-
-- Always use a three spaces indentation in DO loop, CASE, or IF-ELSEIF-ELSE-ENDIF statements.
-
-- use a space after a comma, except when it appears to separate the indices of an array.
-
-- use call to ctl\_stop routine instead of just a STOP.
-
-\newpage
-
-% ================================================================
-% Naming Conventions
-% ================================================================
-\section{Naming conventions}
-\label{sec:D_naming}
-
-The purpose of the naming conventions is to use prefix letters to classify model variables.
-These conventions allow the variable type to be easily known and rapidly identified.
-The naming conventions are summarised in the Table below:
-
-
-%--------------------------------------------------TABLE--------------------------------------------------
-\begin{table}[htbp]
-  \label{tab:VarName}
-  \begin{center}
-    \begin{tabular}{|p{45pt}|p{35pt}|p{45pt}|p{40pt}|p{40pt}|p{40pt}|p{40pt}|p{40pt}|}
-      \hline
-      Type \par / Status
-      & integer
-      & real
-      & logical
-      & character
-      & structure
-      & double \par precision
-      & complex \\
-      \hline
-      public  \par or  \par module variable
-      & \textbf{m n} \par \textit{but not} \par \textbf{nn\_ np\_}
-      & \textbf{a b e f g h o q r} \par \textbf{t} \textit{to} \textbf{x} \par but not \par \textbf{fs rn\_}
-      & \textbf{l} \par \textit{but not} \par \textbf{lp ld} \par \textbf{ ll ln\_}
-      & \textbf{c} \par \textit{but not} \par \textbf{cp cd} \par \textbf{cl cn\_}
-      & \textbf{s} \par \textit{but not} \par \textbf{sd sd} \par \textbf{sl sn\_}
-      & \textbf{d} \par \textit{but not} \par \textbf{dp dd} \par \textbf{dl dn\_}
-      & \textbf{y} \par \textit{but not} \par \textbf{yp yd} \par \textbf{yl yn} \\
-      \hline
-      dummy \par argument
-      & \textbf{k} \par \textit{but not} \par \textbf{kf}
-      & \textbf{p} \par \textit{but not} \par \textbf{pp pf}
-      & \textbf{ld}
-      & \textbf{cd}
-      & \textbf{sd}
-      & \textbf{dd}
-      & \textbf{yd} \\
-      \hline
-      local \par variable
-      & \textbf{i}
-      & \textbf{z}
-      & \textbf{ll}
-      & \textbf{cl}
-      & \textbf{sl}
-      & \textbf{dl}
-      & \textbf{yl} \\
-      \hline
-      loop \par control
-      & \textbf{j} \par \textit{but not} \par \textbf{jp} &&&&&& \\
-      \hline
-      parameter
-      & \textbf{jp np\_}
-      & \textbf{pp}
-      & \textbf{lp}
-      & \textbf{cp}
-      & \textbf{sp}
-      & \textbf{dp}
-      & \textbf{yp} \\
-      \hline
-      namelist
-      & \textbf{nn\_}
-      & \textbf{rn\_}
-      & \textbf{ln\_}
-      & \textbf{cn\_}
-      & \textbf{sn\_}
-      & \textbf{dn\_}
-      & \textbf{yn\_}
-      \\
-      \hline
-      CPP \par macro
-      & \textbf{kf}
-      & \textbf{fs} \par &&&&& \\
-      \hline
-    \end{tabular}
-    \label{tab:tab1}
-  \end{center}
-\end{table}
-%--------------------------------------------------------------------------------------------------------------
-
-N.B. Parameter here, in not only parameter in the \fortran acceptation,
-it is also used for code variables that are read in namelist and should never been modified during a simulation. 
-It is the case, for example, for the size of a domain (jpi,jpj,jpk).
-
-\newpage
-
-% ================================================================
-% The program structure
-% ================================================================
-%\section{Program structure}
-%\label{sec:Apdx_D_structure}
-
-%To be done....
-\biblio
-
-\pindex
-
-\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/annex_E.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/annex_E.tex	(revision 11086)
+++ 	(revision )
@@ -1,848 +1,0 @@
-\documentclass[../main/NEMO_manual]{subfiles}
-
-\begin{document}
-% ================================================================
-% Appendix E : Note on some algorithms
-% ================================================================
-\chapter{Note on some algorithms}
-\label{apdx:E}
-
-\minitoc
-
-\newpage
-
-This appendix some on going consideration on algorithms used or planned to be used in \NEMO. 
-
-% -------------------------------------------------------------------------------------------------------------
-%        UBS scheme  
-% -------------------------------------------------------------------------------------------------------------
-\section{Upstream Biased Scheme (UBS) (\protect\np{ln\_traadv\_ubs}\forcode{ = .true.})}
-\label{sec:TRA_adv_ubs}
-
-The UBS advection scheme is an upstream biased third order scheme based on
-an upstream-biased parabolic interpolation.
-It is also known as Cell Averaged QUICK scheme (Quadratic Upstream Interpolation for Convective Kinematics).
-For example, in the $i$-direction:
-\begin{equation}
-  \label{eq:tra_adv_ubs2}
-  \tau_u^{ubs} = \left\{
-	 \begin{aligned}
-      & \tau_u^{cen4} + \frac{1}{12} \,\tau"_i	   & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\
-      & \tau_u^{cen4} - \frac{1}{12} \,\tau"_{i+1} & \quad \text{if }\ u_{i+1/2}       <       0
-    \end{aligned}
-  \right.
-\end{equation}
-or equivalently, the advective flux is
-\begin{equation}
-  \label{eq:tra_adv_ubs2}
-  U_{i+1/2} \ \tau_u^{ubs}
-  =U_{i+1/2} \ \overline{ T_i - \frac{1}{6}\,\tau"_i }^{\,i+1/2}
-  - \frac{1}{2}\, |U|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i]
-\end{equation}
-where $U_{i+1/2} = e_{1u}\,e_{3u}\,u_{i+1/2}$ and
-$\tau "_i =\delta_i \left[ {\delta_{i+1/2} \left[ \tau \right]} \right]$.
-By choosing this expression for $\tau "$ we consider a fourth order approximation of $\partial_i^2$ with
-a constant i-grid spacing ($\Delta i=1$).
-
-Alternative choice: introduce the scale factors:  
-$\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
-\citep{Shchepetkin_McWilliams_OM05}.
-The overall performance of the advection scheme is similar to that reported in \cite{Farrow1995}.
-It is a relatively good compromise between accuracy and smoothness.
-It is not a \emph{positive} scheme meaning false extrema are permitted but
-the amplitude of such are significantly reduced over the centred second order method.
-Nevertheless it is not recommended to apply it to a passive tracer that requires positivity. 
-
-The intrinsic diffusion of UBS makes its use risky in the vertical direction where
-the control of artificial diapycnal fluxes is of paramount importance.
-It has therefore been preferred to evaluate the vertical flux using the TVD scheme when
-\np{ln\_traadv\_ubs}\forcode{ = .true.}.
-
-For stability reasons, in \autoref{eq:tra_adv_ubs}, the first term which corresponds to
-a second order centred scheme is evaluated using the \textit{now} velocity (centred in time) while
-the second term which is the diffusive part of the scheme, is evaluated using the \textit{before} velocity
-(forward in time).
-This is discussed by \citet{Webb_al_JAOT98} in the context of the Quick advection scheme.
-UBS and QUICK schemes only differ by one coefficient.
-Substituting 1/6 with 1/8 in (\autoref{eq:tra_adv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}.
-This option is not available through a namelist parameter, since the 1/6 coefficient is hard coded.
-Nevertheless it is quite easy to make the substitution in \mdl{traadv\_ubs} module and obtain a QUICK scheme.
-
-NB 1: When a high vertical resolution $O(1m)$ is used, the model stability can be controlled by vertical advection
-(not vertical diffusion which is usually solved using an implicit scheme).
-Computer time can be saved by using a time-splitting technique on vertical advection.
-This possibility have been implemented and validated in ORCA05-L301.
-It is not currently offered in the current reference version. 
-
-NB 2: In a forthcoming release four options will be proposed for the vertical component used in the UBS scheme.
-$\tau_w^{ubs}$ will be evaluated using either \textit{(a)} a centered $2^{nd}$ order scheme,
-or \textit{(b)} a TVD scheme, or \textit{(c)} an interpolation based on conservative parabolic splines following
-\citet{Shchepetkin_McWilliams_OM05} implementation of UBS in ROMS, or \textit{(d)} an UBS.
-The $3^{rd}$ case has dispersion properties similar to an eight-order accurate conventional scheme.
-
-NB 3: It is straight forward to rewrite \autoref{eq:tra_adv_ubs} as follows:
-\begin{equation}
-  \label{eq:tra_adv_ubs2}
-  \tau_u^{ubs} = \left\{
-	 \begin{aligned}
-      & \tau_u^{cen4} + \frac{1}{12} \tau"_i		& \quad \text{if }\ u_{i+1/2} \geqslant 0 \\
-      & \tau_u^{cen4} - \frac{1}{12} \tau"_{i+1}	& \quad \text{if }\ u_{i+1/2}       <       0
-    \end{aligned}
-  \right.
-\end{equation}
-or equivalently 
-\begin{equation}
-  \label{eq:tra_adv_ubs2}
-  \begin{split}
-    e_{2u} e_{3u}\,u_{i+1/2} \ \tau_u^{ubs}
-    &= e_{2u} e_{3u}\,u_{i+1/2} \ \overline{ T - \frac{1}{6}\,\tau"_i }^{\,i+1/2} \\
-    & - \frac{1}{2} e_{2u} e_{3u}\,|u|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i]
-  \end{split}
-\end{equation}
-\autoref{eq:tra_adv_ubs2} has several advantages.
-First it clearly evidences that the UBS scheme is based on the fourth order scheme to which
-is added an upstream biased diffusive term.
-Second, this emphasises that the $4^{th}$ order part have to be evaluated at \emph{now} time step,
-not only the $2^{th}$ order part as stated above using \autoref{eq:tra_adv_ubs}.
-Third, the diffusive term is in fact a biharmonic operator with a eddy coefficient which
-is simply proportional to the velocity.
-
-laplacian diffusion:
-\begin{equation}
-  \label{eq:tra_ldf_lap}
-  \begin{split}
-    D_T^{lT} =\frac{1}{e_{1T} \; e_{2T}\;  e_{3T} } &\left[ {\quad \delta_i
-        \left[ {A_u^{lT} \frac{e_{2u} e_{3u} }{e_{1u} }\;\delta_{i+1/2}
-            \left[ T \right]} \right]} \right. \\
-    &\ \left. {+\; \delta_j \left[
-          {A_v^{lT} \left( {\frac{e_{1v} e_{3v} }{e_{2v} }\;\delta_{j+1/2} \left[ T
-                \right]} \right)} \right]\quad } \right]
-  \end{split}
-\end{equation}
-
-bilaplacian:
-\begin{equation}
-  \label{eq:tra_ldf_lap}
-  \begin{split}
-    D_T^{lT} =&-\frac{1}{e_{1T} \; e_{2T}\;  e_{3T}} \\
-    & \delta_i \left[  \sqrt{A_u^{lT}}\ \frac{e_{2u}\,e_{3u}}{e_{1u}}\;\delta_{i+1/2}
-      \left[ \frac{1}{e_{1T}\,e_{2T}\, e_{3T}}
-        \delta_i \left[ \sqrt{A_u^{lT}}\ \frac{e_{2u}\,e_{3u}}{e_{1u}}\;\delta_{i+1/2}
-          [T] \right] \right] \right]
-  \end{split}
-\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|\,}$
-it comes:
-\begin{equation}
-  \label{eq:tra_ldf_lap}
-  \begin{split}
-    D_T^{lT} =&-\frac{1}{12}\,\frac{1}{e_{1T} \; e_{2T}\;  e_{3T}} \\
-    & \delta_i \left[ e_{2u}\,e_{3u}\,\sqrt{ e_{1u}\,|u|\,}\;\delta_{i+1/2}
-      \left[ \frac{1}{e_{1T}\,e_{2T}\, e_{3T}}
-        \delta_i \left[ e_{2u}\,e_{3u}\,\sqrt{ e_{1u}\,|u|\,}\;\delta_{i+1/2}
-          [T] \right] \right] \right]
-  \end{split}
-\end{equation}
-if the velocity is uniform (\ie $|u|=cst$) then the diffusive flux is
-\begin{equation}
-  \label{eq:tra_ldf_lap}
-  \begin{split}
-    F_u^{lT} = - \frac{1}{12}
-    e_{2u}\,e_{3u}\,|u| \;\sqrt{ e_{1u}}\,\delta_{i+1/2}
-    \left[ \frac{1}{e_{1T}\,e_{2T}\, e_{3T}}
-      \delta_i \left[ e_{2u}\,e_{3u}\,\sqrt{ e_{1u}}\:\delta_{i+1/2}
-        [T] \right] \right]
-  \end{split}
-\end{equation}
-beurk....  reverte the logic: starting from the diffusive part of the advective flux it comes:
-
-\begin{equation}
-  \label{eq:tra_adv_ubs2}
-  \begin{split}
-    F_u^{lT} &= - \frac{1}{2} e_{2u} e_{3u}\,|u|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i]
-  \end{split}
-\end{equation}
-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]$
-
-sol 1 coefficient at T-point ( add $e_{1u}$ and $e_{1T}$ on both side of first $\delta$):
-\begin{equation}
-  \label{eq:tra_adv_ubs2}
-  \begin{split}
-    F_u^{lT} &= - \frac{1}{12} \frac{e_{2u} e_{3u}}{e_{1u}}\;\delta_{i+1/2}\left[ \frac{e_{1T}^3\,|u|}{e_{1T}e_{2T}\,e_{3T}}\,\delta_i \left[ \frac{e_{2u} e_{3u} }{e_{1u} } \delta_{i+1/2}[\tau] \right] \right]
-  \end{split}
-\end{equation}
-which leads to ${A_T^{lT}}^2 = \frac{1}{12} {e_{1T}}^3\ \overline{|u|}^{\,i+1/2}$
-
-sol 2 coefficient at u-point: split $|u|$ into $\sqrt{|u|}$ and $e_{1T}$ into $\sqrt{e_{1u}}$
-\begin{equation}
-  \label{eq:tra_adv_ubs2}
-  \begin{split}
-    F_u^{lT} &= - \frac{1}{12} {e_{1u}}^1 \sqrt{e_{1u}|u|} \frac{e_{2u} e_{3u}}{e_{1u}}\;\delta_{i+1/2}\left[ \frac{1}{e_{2T}\,e_{3T}}\,\delta_i \left[ \sqrt{e_{1u}|u|} \frac{e_{2u} e_{3u} }{e_{1u} } \delta_{i+1/2}[\tau] \right] \right] \\
-    &= - \frac{1}{12} e_{1u} \sqrt{e_{1u}|u|\,} \frac{e_{2u} e_{3u}}{e_{1u}}\;\delta_{i+1/2}\left[ \frac{1}{e_{1T}\,e_{2T}\,e_{3T}}\,\delta_i \left[ e_{1u} \sqrt{e_{1u}|u|\,} \frac{e_{2u} e_{3u} }{e_{1u}} \delta_{i+1/2}[\tau] \right] \right]
-  \end{split}
-\end{equation}
-which leads to ${A_u^{lT}} = \frac{1}{12} {e_{1u}}^3\ |u|$
-
-% -------------------------------------------------------------------------------------------------------------
-%        Leap-Frog energetic  
-% -------------------------------------------------------------------------------------------------------------
-\section{Leapfrog energetic}
-\label{sec:LF}
-
-We adopt the following semi-discrete notation for time derivative.
-Given the values of a variable $q$ at successive time step,
-the time derivation and averaging operators at the mid time step are:
-\[
-  % \label{eq:dt_mt}
-  \begin{split}
-    \delta_{t+\rdt/2} [q]     &=  \  \ \,   q^{t+\rdt}  - q^{t}		\\
-    \overline q^{\,t+\rdt/2} &= \left\{ q^{t+\rdt} + q^{t} \right\} \; / \; 2
-  \end{split}
-\]
-As for space operator,
-the adjoint of the derivation and averaging time operators are $\delta_t^*=\delta_{t+\rdt/2}$ and
-$\overline{\cdot}^{\,t\,*}= \overline{\cdot}^{\,t+\Delta/2}$, respectively.
-
-The Leap-frog time stepping given by \autoref{eq:DOM_nxt} can be defined as:
-\[
-  % \label{eq:LF}
-  \frac{\partial q}{\partial t}
-  \equiv \frac{1}{\rdt} \overline{ \delta_{t+\rdt/2}[q]}^{\,t}
-  =         \frac{q^{t+\rdt}-q^{t-\rdt}}{2\rdt}
-\] 
-Note that \autoref{chap:LF} shows that the leapfrog time step is $\rdt$,
-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,
-\[
-  % \label{eq:Energy}
-  \int_{t_0}^{t_1} {q\, \frac{\partial q}{\partial t} \;dt}
-  =\int_{t_0}^{t_1} {\frac{1}{2}\, \frac{\partial q^2}{\partial t} \;dt}
-  =  \frac{1}{2} \left( {q_{t_1}}^2 - {q_{t_0}}^2 \right) ,
-\]
-is satisfied in discrete form.
-Indeed, 
-\[
-  \begin{split}
-    \int_{t_0}^{t_1} {q\, \frac{\partial q}{\partial t} \;dt}
-    &\equiv \sum\limits_{0}^{N}
-    {\frac{1}{\rdt} q^t \ \overline{ \delta_{t+\rdt/2}[q]}^{\,t} \ \rdt}
-    \equiv \sum\limits_{0}^{N}  { q^t \ \overline{ \delta_{t+\rdt/2}[q]}^{\,t} } \\
-    &\equiv \sum\limits_{0}^{N}  { \overline{q}^{\,t+\Delta/2}{ \delta_{t+\rdt/2}[q]}}
-    \equiv \sum\limits_{0}^{N}  { \frac{1}{2} \delta_{t+\rdt/2}[q^2] }\\
-    &\equiv \sum\limits_{0}^{N}  { \frac{1}{2} \delta_{t+\rdt/2}[q^2] }
-    \equiv \frac{1}{2} \left( {q_{t_1}}^2 - {q_{t_0}}^2 \right)
-  \end{split}
-\]
-NB here pb of boundary condition when applying the adjoint!
-In space, setting to 0 the quantity in land area is sufficient to get rid of the boundary condition 
-(equivalently of the boundary value of the integration by part).
-In time this boundary condition is not physical and \textbf{add something here!!!}
-
-% ================================================================
-% Iso-neutral diffusion : 
-% ================================================================
-
-\section{Lateral diffusion operator}
-
-% ================================================================
-% Griffies' iso-neutral diffusion operator : 
-% ================================================================
-\subsection{Griffies iso-neutral diffusion operator}
-
-Let try to define a scheme that get its inspiration from the \citet{Griffies_al_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
-is not necessary in the middle of vertical velocity points, see \autoref{fig:zgr_e3}).
-
-In the formulation \autoref{eq:tra_ldf_iso} introduced in 1995 in OPA, the ancestor of \NEMO,
-the off-diagonal terms of the small angle diffusion tensor contain several double spatial averages of a gradient,
-for example $\overline{\overline{\delta_k \cdot}}^{\,i,k}$.
-It is apparent that the combination of a $k$ average and a $k$ derivative of the tracer allows for
-the presence of grid point oscillation structures that will be invisible to the operator.
-These structures are \textit{computational modes}.
-They will not be damped by the iso-neutral operator, and even possibly amplified by it.
-In other word, the operator applied to a tracer does not warranties the decrease of its global average variance.
-To circumvent this, we have introduced a smoothing of the slopes of the iso-neutral surfaces
-(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.
-\citep{Griffies_al_JPO98} introduce a different way to discretise the off-diagonal terms that
-nicely solve the problem.
-The idea is to get rid of combinations of an averaged in one direction combined with
-a derivative in the same direction by considering triads.
-For example in the (\textbf{i},\textbf{k}) plane, the four triads are defined at the $(i,k)$ $T$-point as follows:
-\begin{equation}
-  \label{eq:Gf_triads}
-  _i^k \mathbb{T}_{i_p}^{k_p} (T)
-  = \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k}  \  A_i^k  	\left(
-    \frac{ \delta_{i + i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
-    -\ {_i^k \mathbb{R}_{i_p}^{k_p}} \ \frac{ \delta_{k+k_p} [T^i] }{ {e_{3w}}_{\,i}^{\,k+k_p} }
-  \right)
-\end{equation}
-where the indices $i_p$ and $k_p$ define the four triads and take the following value:
-$i_p = -1/2$ or $1/2$ and $k_p = -1/2$ or $1/2$,
-$b_u= e_{1u}\,e_{2u}\,e_{3u}$ is the volume of $u$-cells,
-$A_i^k$ is the lateral eddy diffusivity coefficient defined at $T$-point,
-and $_i^k \mathbb{R}_{i_p}^{k_p}$ is the slope associated with each triad:
-\begin{equation}
-  \label{eq:Gf_slopes}
-  _i^k \mathbb{R}_{i_p}^{k_p}
-  =\frac{ {e_{3w}}_{\,i}^{\,k+k_p}} { {e_{1u}}_{\,i+i_p}^{\,k}} \ \frac
-  {\left(\alpha / \beta \right)_i^k  \ \delta_{i + i_p}[T^k] - \delta_{i + i_p}[S^k] }
-  {\left(\alpha / \beta \right)_i^k  \ \delta_{k+k_p}[T^i ] - \delta_{k+k_p}[S^i ] }
-\end{equation}
-Note that in \autoref{eq:Gf_slopes} we use the ratio $\alpha / \beta$ instead of
-multiplying the temperature derivative by $\alpha$ and the salinity derivative by $\beta$.
-This is more efficient as the ratio $\alpha / \beta$ can to be evaluated directly.
-
-Note that in \autoref{eq:Gf_triads}, we chose to use ${b_u}_{\,i+i_p}^{\,k}$ instead of ${b_{uw}}_{\,i+i_p}^{\,k+k_p}$.
-This choice has been motivated by the decrease of tracer variance and
-the presence of partial cell at the ocean bottom (see \autoref{apdx:Gf_operator}).
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!ht]
-  \begin{center}
-    \includegraphics[width=0.70\textwidth]{Fig_ISO_triad}
-    \caption{
-      \protect\label{fig:ISO_triad}
-      Triads used in the Griffies's like iso-neutral diffision scheme for
-      $u$-component (upper panel) and $w$-component (lower panel).
-    }
-  \end{center}
-\end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-The four iso-neutral fluxes associated with the triads are defined at $T$-point. 
-They take the following expression:
-\begin{flalign*}
-  % \label{eq:Gf_fluxes}
-  \begin{split}
-    {_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (T)
-    &= \ \; \qquad  \quad    { _i^k \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{1u}}_{\,i+i_p}^{\,k}}    \\
-    {_i^k {\mathbb{F}_w}_{i_p}^{k_p} } (T)
-    &=  -\; { _i^k \mathbb{R}_{i_p}^{k_p} }
-    \ \; { _i^k \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{3w}}_{\,i}^{\,k+k_p}}
-  \end{split}
-\end{flalign*}
-
-The resulting iso-neutral fluxes at $u$- and $w$-points are then given by
-the sum of the fluxes that cross the $u$- and $w$-face (\autoref{fig:ISO_triad}):
-\begin{flalign}
-  \label{eq:iso_flux}
-  \textbf{F}_{iso}(T)
-  &\equiv  \sum_{\substack{i_p,\,k_p}}
-  \begin{pmatrix}
-    {_{i+1/2-i_p}^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) \\ \\
-    {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p} } (T)
-  \end{pmatrix}
-  \notag \\
-  &  \notag \\
-  &\equiv  \sum_{\substack{i_p,\,k_p}}
-  \begin{pmatrix}
-    && { _{i+1/2-i_p}^k \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{1u}}_{\,i+1/2}^{\,k} } \\ \\
-    & -\; { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} }
-    & {_i^{k+1/2-k_p} \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{3w}}_{\,i}^{\,k+1/2} }
-  \end{pmatrix}      % \\
-  % &\\
-  % &\equiv  \sum_{\substack{i_p,\,k_p}}
-  % \begin{pmatrix}
-  %   \qquad  \qquad  \qquad
-  %   \frac{1}{ {e_{1u}}_{\,i+1/2}^{\,k} }  \ \;
-  %   { _{i+1/2-i_p}^k \mathbb{T}_{i_p}^{k_p} }(T)\\
-  %   \\
-  %   -\frac{1}{ {e_{3w}}_{\,i}^{\,k+1/2} }  \ \;
-  %   { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} } \ \;
-  %   {_i^{k+1/2-k_p} \mathbb{T}_{i_p}^{k_p} }(T)\\
-  % \end{pmatrix}
-\end{flalign}
-resulting in a iso-neutral diffusion tendency on temperature given by
-the divergence of the sum of all the four triad fluxes:
-\begin{equation}
-  \label{eq:Gf_operator}
-  D_l^T = \frac{1}{b_T}  \sum_{\substack{i_p,\,k_p}} \left\{
-    \delta_{i} \left[{_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \right]
-    + \delta_{k} \left[ {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right]   \right\}
-\end{equation}
-where $b_T= e_{1T}\,e_{2T}\,e_{3T}$ is the volume of $T$-cells. 
-
-This expression of the iso-neutral diffusion has been chosen in order to satisfy the following six properties:
-\begin{description}
-\item[$\bullet$ horizontal diffusion]
-  The discretization of the diffusion operator recovers the traditional five-point Laplacian in
-  the limit of flat iso-neutral direction:
-  \[
-    % \label{eq:Gf_property1a}
-    D_l^T = \frac{1}{b_T}  \ \delta_{i}
-    \left[ \frac{e_{2u}\,e_{3u}}{e_{1u}} \; \overline{A}^{\,i} \; \delta_{i+1/2}[T] \right]
-    \qquad  \text{when} \quad
-    { _i^k \mathbb{R}_{i_p}^{k_p} }=0
-  \]
-
-\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)
-  appears only tracer values associated with a single water column.
-  This is of paramount importance since it means that
-  the implicit in time algorithm for solving the vertical diffusion equation can be used to evaluate this term.
-  It is a necessity since the vertical eddy diffusivity associated with this term,
-  \[
-	 \sum_{\substack{i_p, \,k_p}} \left\{
-		A_i^k \; \left(_i^k \mathbb{R}_{i_p}^{k_p}\right)^2
-    \right\}
-  \]
-  can be quite large.
-
-\item[$\bullet$ pure iso-neutral operator]
-  The iso-neutral flux of locally referenced potential density is zero, \ie
-  \begin{align*}
-    % \label{eq:Gf_property2}
-    \begin{matrix}
-      &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} (\rho)}
-      &=    &\alpha_i^k   &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (T)
-      &- \ \;  \beta _i^k    &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (S) & = \ 0   \\
-      &{_i^k {\mathbb{F}_w}_{i_p}^{k_p} (\rho)}
-      &=    &\alpha_i^k   &{_i^k {\mathbb{F}_w}_{i_p}^{k_p} } (T)
-      &- \  \; \beta _i^k    &{_i^k {\mathbb{F}_w}_{i_p}^{k_p} } (S)  &= \ 0
-    \end{matrix}
-  \end{align*}
-  This result is trivially obtained using the \autoref{eq:Gf_triads} applied to $T$ and $S$ and
-  the definition of the triads' slopes \autoref{eq:Gf_slopes}.
-
-\item[$\bullet$ conservation of tracer]
-  The iso-neutral diffusion term conserve the total tracer content, \ie
-  \[
-    % \label{eq:Gf_property1}
-    \sum_{i,j,k} \left\{ D_l^T \ b_T \right\} = 0
-  \]
-This property is trivially satisfied since the iso-neutral diffusive operator is written in flux form.
-
-\item[$\bullet$ decrease of tracer variance]
-  The iso-neutral diffusion term does not increase the total tracer variance, \ie
-  \[
-    % \label{eq:Gf_property1}
-    \sum_{i,j,k} \left\{ T \ D_l^T \ b_T \right\} \leq 0
-  \]
-The property is demonstrated in the \autoref{apdx:Gf_operator}.
-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.
-It therfore ensures that, when the diffusivity coefficient is large enough,
-the field on which it is applied become free of grid-point noise.
-
-\item[$\bullet$ self-adjoint operator]
-  The iso-neutral diffusion operator is self-adjoint, \ie
-  \[
-    % \label{eq:Gf_property1}
-    \sum_{i,j,k} \left\{ S \ D_l^T \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\}
-  \]
-In other word, there is no needs to develop a specific routine from the adjoint of this operator.
-We just have to apply the same routine.
-This properties can be demonstrated quite easily in a similar way the "non increase of tracer variance" property
-has been proved (see \autoref{apdx:Gf_operator}).
-\end{description}
-
-% ================================================================
-% Skew flux formulation for Eddy Induced Velocity : 
-% ================================================================
-\subsection{Eddy induced velocity and skew flux formulation}
-
-When Gent and McWilliams [1990] diffusion is used (\key{traldf\_eiv} defined),
-an additional advection term is added.
-The associated velocity is the so called eddy induced velocity,
-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,
-and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates. 
-
-The eddy induced velocity is given by: 
-\begin{equation}
-  \label{eq:eiv_v}
-  \begin{split}
-    u^* & = - \frac{1}{e_2\,e_{3}}          \;\partial_k \left( e_2 \, A_e \; r_i  \right)
-    = - \frac{1}{e_3}                     \;\partial_k \left(           A_e \; r_i  \right)            \\
-    v^* & = - \frac{1}{e_1\,e_3}\;             \partial_k \left( e_1 \, A_e \; r_j  \right)
-    = - \frac{1}{e_3}                     \;\partial_k \left(           A_e \; r_j  \right)             \\
-    w^* & =    \frac{1}{e_1\,e_2}\; \left\{   \partial_i  \left( e_2 \, A_e \; r_i  \right)
-      + \partial_j  \left( e_1 \, A_e \;r_j   \right) \right\}
-  \end{split}
-\end{equation}
-where $A_{e}$ is the eddy induced velocity coefficient,
-and $r_i$ and $r_j$ the slopes between the iso-neutral and the geopotential surfaces.
-%%gm wrong: to be modified with 2 2D streamfunctions
-In other words, the eddy induced velocity can be derived from a vector streamfuntion, $\phi$,
-which is given by $\phi = A_e\,\textbf{r}$ as $\textbf{U}^*  = \textbf{k} \times \nabla \phi$.
-%%end gm
-
-A traditional way to implement this additional advection is to add it to the eulerian velocity prior to
-compute the tracer advection.
-This allows us to take advantage of all the advection schemes offered for the tracers
-(see \autoref{sec:TRA_adv}) and not just a $2^{nd}$ order advection scheme.
-This is particularly useful for passive tracers where
-\emph{positivity} of the advection scheme is of paramount importance. 
-% give here the expression using the triads. It is different from the one given in \autoref{eq:ldfeiv}
-% see just below a copy of this equation:
-%\begin{equation} \label{eq:ldfeiv}
-%\begin{split}
-% u^* & = \frac{1}{e_{2u}e_{3u}}\; \delta_k \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right]\\
-% v^* & = \frac{1}{e_{1u}e_{3v}}\; \delta_k \left[e_{1v} \, A_{vw}^{eiv} \; \overline{r_{2w}}^{\,j+1/2} \right]\\
-%w^* & = \frac{1}{e_{1w}e_{2w}}\; \left\{ \delta_i \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right] + %\delta_j \left[e_{1v} \, A_{vw}^{eiv} \; \overline{r_{2w}}^{\,j+1/2} \right] \right\} \\
-%\end{split}
-%\end{equation}
-\[
-  % \label{eq:eiv_vd}
-  \textbf{F}_{eiv}^T   \equiv   \left(
-    \begin{aligned}
-      \sum_{\substack{i_p,\,k_p}} &
-      +{e_{2u}}_{i+1/2-i_p}^{k}                                  \ \ {A_{e}}_{i+1/2-i_p}^{k}
-      \ \ \ { _{i+1/2-i_p}^k \mathbb{R}_{i_p}^{k_p} }    \ \ \delta_{k+k_p}[T_{i+1/2-i_p}] \\ \\
-      \sum_{\substack{i_p,\,k_p}} &
-      - {e_{2u}}_i^{k+1/2-k_p}                                      \ {A_{e}}_i^{k+1/2-k_p}
-      \ \ { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} }    \ \delta_{i+i_p}[T^{k+1/2-k_p}]
-    \end{aligned}
-  \right)
-\]
-
-\citep{Griffies_JPO98} introduces another way to implement the eddy induced advection, the so-called skew form.
-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, the tracer advective fluxes can be transformed as follows:
-\begin{flalign*}
-  \begin{split}
-    \textbf{F}_{eiv}^T =
-    \begin{pmatrix}
-      {e_{2}\,e_{3}\;  u^*} 	 	\\
- 		{e_{1}\,e_{2}\; w^*}
-    \end{pmatrix}
-    \;   T
-    &=
-    \begin{pmatrix}
-      { - \partial_k \left( e_{2} \, A_{e} \; r_i \right) \; T \;} 	 	\\
- 		{+ \partial_i  \left( e_{2} \, A_{e} \; r_i \right) \; T \;}
-    \end{pmatrix}
-    \\
-    &=
-    \begin{pmatrix}
-      { - \partial_k \left( e_{2} \, A_{e} \; r_i  \; T \right) \;}  \\
- 		{+ \partial_i  \left( e_{2} \, A_{e} \; r_i  \; T \right) \;}
-    \end{pmatrix}
-    +
-    \begin{pmatrix}
-      {+ e_{2} \, A_{e} \; r_i  \; \partial_k T}  \\
- 		{ - e_{2} \, A_{e} \; r_i  \; \partial_i  T}
-    \end{pmatrix}
-  \end{split}
-\end{flalign*}
-and since the eddy induces velocity field is no-divergent,
-we end up with the skew form of the eddy induced advective fluxes:
-\begin{equation}
-  \label{eq:eiv_skew_continuous}
-  \textbf{F}_{eiv}^T =
-  \begin{pmatrix}
-    {+ e_{2} \, A_{e} \; r_i  \; \partial_k T}   \\
-    { - e_{2} \, A_{e} \; r_i  \; \partial_i  T}
-  \end{pmatrix}
-\end{equation}
-The tendency associated with eddy induced velocity is then simply the divergence of
-the \autoref{eq:eiv_skew_continuous} fluxes.
-It naturally conserves the tracer content, as it is expressed in flux form and,
-as the advective form, it preserves the tracer variance.
-Another interesting property of \autoref{eq:eiv_skew_continuous} form is that when $A=A_e$,
-a simplification occurs in the sum of the iso-neutral diffusion and eddy induced velocity terms:
-\begin{flalign*}
-  % \label{eq:eiv_skew+eiv_continuous}
-  \textbf{F}_{iso}^T + \textbf{F}_{eiv}^T &=
-  \begin{pmatrix}
-    + \frac{e_2\,e_3\,}{e_1} A \;\partial_i T -  e_2 \, A \; r_i                              \;\partial_k T   \\
-    -  e_2 \, A_{e} \; r_i           \;\partial_i T + \frac{e_1\,e_2}{e_3} \, A \; r_i^2 \;\partial_k T
-  \end{pmatrix}
-  +
-  \begin{pmatrix}
-    {+ e_{2} \, A_{e} \; r_i  \; \partial_k T}   \\
-    { - e_{2} \, A_{e} \; r_i  \; \partial_i  T}
-  \end{pmatrix}
-  \\
-  &=
-  \begin{pmatrix}
-    + \frac{e_2\,e_3\,}{e_1} A \;\partial_i T    \\
-    -  2\; e_2 \, A_{e} \; r_i      \;\partial_i T + \frac{e_1\,e_2}{e_3} \, A \; r_i^2 \;\partial_k T
-  \end{pmatrix}
-\end{flalign*}
-The horizontal component reduces to the one use for an horizontal laplacian operator and
-the vertical one keeps the same complexity, but not more.
-This property has been used to reduce the computational time \citep{Griffies_JPO98},
-but it is not of practical use as usually $A \neq A_e$.
-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$,
-the eddy diffusivity coefficient), the resulting discret form is given by:
-\begin{equation}
-  \label{eq:eiv_skew}
-  \textbf{F}_{eiv}^T   \equiv   \frac{1}{4} \left(
-    \begin{aligned}
-      \sum_{\substack{i_p,\,k_p}} &
-      +{e_{2u}}_{i+1/2-i_p}^{k}                                  \ \ {A_{e}}_{i+1/2-i_p}^{k}
-      \ \ \ { _{i+1/2-i_p}^k \mathbb{R}_{i_p}^{k_p} }    \ \ \delta_{k+k_p}[T_{i+1/2-i_p}] \\ \\
-      \sum_{\substack{i_p,\,k_p}} &
-      - {e_{2u}}_i^{k+1/2-k_p}                                      \ {A_{e}}_i^{k+1/2-k_p}
-      \ \ { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} }    \ \delta_{i+i_p}[T^{k+1/2-k_p}]
-    \end{aligned}
-  \right)
-\end{equation}
-Note that \autoref{eq:eiv_skew} is valid in $z$-coordinate with or without partial cells. 
-In $z^*$ or $s$-coordinate, the slope between the level and the geopotential surfaces must be added to
-$\mathbb{R}$ for the discret form to be exact. 
-
-Such a choice of discretisation is consistent with the iso-neutral operator as
-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.
-
-$\ $\newpage      %force an empty line
-% ================================================================
-% Discrete Invariants of the iso-neutral diffrusion 
-% ================================================================
-\subsection{Discrete invariants of the iso-neutral diffrusion}
-\label{subsec:Gf_operator}
-
-Demonstration of the decrease of the tracer variance in the (\textbf{i},\textbf{j}) plane. 
-
-This part will be moved in an Appendix.
-
-The continuous property to be demonstrated is:
-\[
-  \int_D  D_l^T \; T \;dv   \leq 0
-\]
-The discrete form of its left hand side is obtained using \autoref{eq:iso_flux}
-
-\begin{align*}
-  &\int_D  D_l^T \; T \;dv \equiv  \sum_{i,k} \left\{ T \ D_l^T \ b_T \right\}    \\
-  &\equiv + \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
-    \delta_{i} \left[{_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \right]
-    + \delta_{k} \left[ {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right]  \ T \right\}    \\
-  &\equiv  - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
-    {_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \ \delta_{i+1/2} [T]
-    + {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}}  \ \delta_{k+1/2} [T]   \right\}      \\
-  &\equiv -\sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
-    \frac{ _{i+1/2-i_p}^k \mathbb{T}_{i_p}^{k_p} (T) }{ {e_{1u}}_{\,i+1/2}^{\,k} }  \ \delta_{i+1/2} [T]
-    - { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} } \ \;
-    \frac{ _i^{k+1/2-k_p} \mathbb{T}_{i_p}^{k_p} (T) }{ {e_{3w}}_{\,i}^{\,k+1/2}  } \ \delta_{k+1/2} [T]
-    \right\}      \\
-    %
-  \allowdisplaybreaks
-  \intertext{ Expending the summation on $i_p$ and $k_p$, it becomes:}
-  %
-  &\equiv -\sum_{i,k}
-    \begin{Bmatrix}
-      &\ \ \Bigl(  { _{i+1}^{k} \mathbb{T}_{-1/2}^{-1/2} (T) }
-      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
-      & -\ \ {_{i}^{k+1} \mathbb{R}_{-1/2}^{-1/2}}
-      &      {_{i}^{k+1} \mathbb{T}_{-1/2}^{-1/2} (T) }
-      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)
-      & \\
-      &+\Bigl( \ \;\; { _i^k \mathbb{T}_{+1/2}^{-1/2} (T) }
-      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
-      & -\ \ {_i^{k+1} \mathbb{R}_{+1/2}^{-1/2}}
-      & { _i^{k+1} \mathbb{T}_{+1/2}^{-1/2} (T) }
-      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}      \Bigr)
-      & \\
-      &+\Bigl(  { _{i+1}^{k} \mathbb{T}_{-1/2}^{+1/2} (T) }
-      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
-      & -\ \ \ \;\;{_{i}^{k} \mathbb{R}_{-1/2}^{+1/2}}
-      &      \ \;\;{_{i}^{k} \mathbb{T}_{-1/2}^{+1/2} (T) }
-      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)
-      & \\
-      &+\Bigl( \ \;\; { _{i}^{k} \mathbb{T}_{+1/2}^{+1/2} (T) }
-      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
-      & -\ \ \ \;\;{_{i}^{k} \mathbb{R}_{+1/2}^{+1/2}}
-      &      \ \;\;{_{i}^{k} \mathbb{T}_{+1/2}^{+1/2} (T) }
-      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)   \\
-    \end{Bmatrix}
-    %
-  \allowdisplaybreaks
-  \intertext{
-  The summation is done over all $i$ and $k$ indices,
-  it is therefore possible to introduce a shift of $-1$ either in $i$ or $k$ direction in order to
-  regroup all the terms of the summation by triad at a ($i$,$k$) point.
-  In other words, we regroup all the terms in the neighbourhood that contain a triad at the same ($i$,$k$) indices.
-  It becomes:
-  }
-  %
-  &\equiv -\sum_{i,k}
-    \begin{Bmatrix}
-      &\ \ \Bigl(  {_i^k \mathbb{T}_{-1/2}^{-1/2} (T) }
-      &\frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}}
-      & -\ \ {_i^k \mathbb{R}_{-1/2}^{-1/2}}
-      &      {_i^k \mathbb{T}_{-1/2}^{-1/2} (T) }
-      &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}}     \Bigr)
-      & \\
-      &+\Bigl(  { _i^k \mathbb{T}_{+1/2}^{-1/2} (T) }
-      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
-      & -\ \ {_i^k \mathbb{R}_{+1/2}^{-1/2}}
-      &      { _i^k \mathbb{T}_{+1/2}^{-1/2} (T) }
-      &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}}      \Bigr)
-      & \\
-      &+\Bigl(  {_i^k \mathbb{T}_{-1/2}^{+1/2} (T) }
-      &\frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}}
-      & -\ \ {_i^k \mathbb{R}_{-1/2}^{+1/2}}
-      &      {_i^k \mathbb{T}_{-1/2}^{+1/2} (T) }
-      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)
-      & \\
-      &+\Bigl( { _i^k \mathbb{T}_{+1/2}^{+1/2} (T) }
-      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
-      & -\ \ {_i^k \mathbb{R}_{+1/2}^{+1/2}}
-      &      {_i^k \mathbb{T}_{+1/2}^{+1/2} (T) }
-      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)   \\
-    \end{Bmatrix}   \\
-    %
-  \allowdisplaybreaks
-  \intertext{
-  Then outing in factor the triad in each of the four terms of the summation and
-  substituting the triads by their expression given in \autoref{eq:Gf_triads}.
-  It becomes:
-  }
-  %
-  &\equiv -\sum_{i,k}
-    \begin{Bmatrix}
-      &\ \ \Bigl(  \frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}}
-      & -\ \ {_i^k \mathbb{R}_{-1/2}^{-1/2}}
-      &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}}     \Bigr)^2
-      & \frac{1}{4} \ {b_u}_{\,i-1/2}^{\,k}  \  A_i^k
-      & \\
-      &+\Bigl(  \frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
-      & -\ \ {_i^k \mathbb{R}_{+1/2}^{-1/2}}
-      &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}}      \Bigr)^2
-      & \frac{1}{4} \ {b_u}_{\,i+1/2}^{\,k}  \  A_i^k
-      & \\
-      &+\Bigl(  \frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}}
-      & -\ \ {_i^k \mathbb{R}_{-1/2}^{+1/2}}
-      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)^2
-      & \frac{1}{4} \ {b_u}_{\,i-1/2}^{\,k}  \  A_i^k
-      & \\
-      &+\Bigl( \frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
-      & -\ \ {_i^k \mathbb{R}_{+1/2}^{+1/2}}
-      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)^2
-      & \frac{1}{4} \ {b_u}_{\,i+1/2}^{\,k}  \  A_i^k      \\
-    \end{Bmatrix}
-  \\
-  & \\
-  %
-  &\equiv - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
-    \begin{matrix}
-      &\Bigl( \frac{ \delta_{i +i_p} [T] }{{e_{1u} }_{\,i+i_p}^{\,k}}
-      & -\ \ {_i^k \mathbb{R}_{i_p}^{k_p}}
-      &\frac{ \delta_{k+k_p} [T] }{{e_{3w}}_{\,i}^{\,k+k_p}}     \Bigr)^2
-      & \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k}  \  A_i^k   \ \
-    \end{matrix}
-        \right\}
-        \quad   \leq 0
-\end{align*} 
-The last inequality is obviously obtained as we succeed in obtaining a negative summation of square quantities.
-
-Note that, if instead of multiplying $D_l^T$ by $T$, we were using another tracer field, let say $S$,
-then the previous demonstration would have let to:
-\begin{align*}
-  \int_D  S \; D_l^T  \;dv &\equiv  \sum_{i,k} \left\{ S \ D_l^T \ b_T \right\}    \\
-                           &\equiv - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
-                             \left( \frac{ \delta_{i +i_p} [S] }{{e_{1u} }_{\,i+i_p}^{\,k}}
-                             - {_i^k \mathbb{R}_{i_p}^{k_p}}
-                             \frac{ \delta_{k+k_p} [S] }{{e_{3w}}_{\,i}^{\,k+k_p}}     \right)  \right. \\
-                           & \qquad \qquad \qquad \ \left.
-                             \left( \frac{ \delta_{i +i_p} [T] }{{e_{1u} }_{\,i+i_p}^{\,k}}
-                             - {_i^k \mathbb{R}_{i_p}^{k_p}}
-                             \frac{ \delta_{k+k_p} [T] }{{e_{3w}}_{\,i}^{\,k+k_p}}     \right)
-                             \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k}  \  A_i^k   \
-                             \right\}
-                             %
-                             \allowdisplaybreaks
-                             \intertext{
-                             which, by applying the same operation as before but in reverse order, leads to:
-                             }
-                             %
-                           &\equiv  \sum_{i,k} \left\{ D_l^S \ T \ b_T \right\}
-\end{align*} 
-This means that the iso-neutral operator is self-adjoint.
-There is no need to develop a specific to obtain it.
-
-\newpage
-
-% ================================================================
-% Discrete Invariants of the skew flux formulation
-% ================================================================
-\subsection{Discrete invariants of the skew flux formulation}
-\label{subsec:eiv_skew}
-
-Demonstration for the conservation of the tracer variance in the (\textbf{i},\textbf{j}) plane. 
-
-This have to be moved in an Appendix.
-
-The continuous property to be demonstrated is:
-\begin{align*}
-  \int_D \nabla \cdot \textbf{F}_{eiv}(T) \; T \;dv  \equiv 0
-\end{align*}
-The discrete form of its left hand side is obtained using \autoref{eq:eiv_skew}
-\begin{align*}
-  \sum\limits_{i,k} \sum_{\substack{i_p,\,k_p}}  \Biggl\{   \;\;
-  \delta_i  &\left[
-              {e_{2u}}_{i+i_p+1/2}^{k}                                  \;\ \ {A_{e}}_{i+i_p+1/2}^{k}
-              \ \ \ { _{i+i_p+1/2}^k \mathbb{R}_{-i_p}^{k_p} }   \quad \delta_{k+k_p}[T_{i+i_p+1/2}]
-              \right] \; T_i^k      \\
-  - \delta_k &\left[
-               {e_{2u}}_i^{k+k_p+1/2}                                     \ \ {A_{e}}_i^{k+k_p+1/2}
-               \ \ { _i^{k+k_p+1/2} \mathbb{R}_{i_p}^{-k_p} }   \ \ \delta_{i+i_p}[T^{k+k_p+1/2}]
-               \right] \; T_i^k      \         \Biggr\}
-\end{align*}
-apply the adjoint of delta operator, it becomes
-\begin{align*}
-  \sum\limits_{i,k} \sum_{\substack{i_p,\,k_p}}  \Biggl\{   \;\;
-  &\left(
-    {e_{2u}}_{i+i_p+1/2}^{k}                                  \;\ \ {A_{e}}_{i+i_p+1/2}^{k}
-    \ \ \ { _{i+i_p+1/2}^k \mathbb{R}_{-i_p}^{k_p} }   \quad \delta_{k+k_p}[T_{i+i_p+1/2}]
-    \right) \; \delta_{i+1/2}[T^{k}]      \\
-  - &\left(
-      {e_{2u}}_i^{k+k_p+1/2}                                     \ \ {A_{e}}_i^{k+k_p+1/2}
-      \ \ { _i^{k+k_p+1/2} \mathbb{R}_{i_p}^{-k_p} }   \ \ \delta_{i+i_p}[T^{k+k_p+1/2}]
-      \right) \; \delta_{k+1/2}[T_{i}]       \         \Biggr\}
-\end{align*}
-Expending the summation on $i_p$ and $k_p$, it becomes:
-\begin{align*}
-  \begin{matrix}
-    &\sum\limits_{i,k}   \Bigl\{
-    &+{e_{2u}}_{i+1}^{k}                             &{A_{e}}_{i+1    }^{k}
-    &\ {_{i+1}^k \mathbb{R}_{- 1/2}^{-1/2}} &\delta_{k-1/2}[T_{i+1}]    &\delta_{i+1/2}[T^{k}]   &\\
-    &&+{e_{2u}}_i^{k\ \ \ \:}                            &{A_{e}}_{i}^{k\ \ \ \:}
-    &\ {\ \ \;_i^k \mathbb{R}_{+1/2}^{-1/2}}  &\delta_{k-1/2}[T_{i\ \ \ \;}]  &\delta_{i+1/2}[T^{k}] &\\
-    &&+{e_{2u}}_{i+1}^{k}                             &{A_{e}}_{i+1    }^{k}
-    &\ {_{i+1}^k \mathbb{R}_{- 1/2}^{+1/2}} &\delta_{k+1/2}[T_{i+1}]     &\delta_{i+1/2}[T^{k}] &\\
-    &&+{e_{2u}}_i^{k\ \ \ \:}                            &{A_{e}}_{i}^{k\ \ \ \:}
-    &\ {\ \ \;_i^k \mathbb{R}_{+1/2}^{+1/2}} &\delta_{k+1/2}[T_{i\ \ \ \;}] &\delta_{i+1/2}[T^{k}] &\\
-    %
-    &&-{e_{2u}}_i^{k+1}                                &{A_{e}}_i^{k+1}
-    &{_i^{k+1} \mathbb{R}_{-1/2}^{- 1/2}}   &\delta_{i-1/2}[T^{k+1}]      &\delta_{k+1/2}[T_{i}] &\\
-    &&-{e_{2u}}_i^{k\ \ \ \:}                             &{A_{e}}_i^{k\ \ \ \:}
-    &{\ \ \;_i^k  \mathbb{R}_{-1/2}^{+1/2}}   &\delta_{i-1/2}[T^{k\ \ \ \:}]  &\delta_{k+1/2}[T_{i}] &\\
-    &&-{e_{2u}}_i^{k+1    }                             &{A_{e}}_i^{k+1}
-    &{_i^{k+1} \mathbb{R}_{+1/2}^{- 1/2}}   &\delta_{i+1/2}[T^{k+1}]      &\delta_{k+1/2}[T_{i}] &\\
-    &&-{e_{2u}}_i^{k\ \ \ \:}                             &{A_{e}}_i^{k\ \ \ \:}
-    &{\ \ \;_i^k  \mathbb{R}_{+1/2}^{+1/2}}   &\delta_{i+1/2}[T^{k\ \ \ \:}]  &\delta_{k+1/2}[T_{i}]
-    &\Bigr\}  \\
-  \end{matrix}   
-\end{align*}
-The two terms associated with the triad ${_i^k \mathbb{R}_{+1/2}^{+1/2}}$ are the same but of opposite signs,
-they cancel out. 
-Exactly the same thing occurs for the triad ${_i^k \mathbb{R}_{-1/2}^{-1/2}}$.
-The two terms associated with the triad ${_i^k \mathbb{R}_{+1/2}^{-1/2}}$ are the same but both of opposite signs and
-shifted by 1 in $k$ direction.
-When summing over $k$ they cancel out with the neighbouring grid points.
-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.
-
-\biblio
-
-\pindex
-
-\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/annex_iso.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/annex_iso.tex	(revision 11086)
+++ 	(revision )
@@ -1,1180 +1,0 @@
-\documentclass[../main/NEMO_manual]{subfiles}
-
-%% Local cmds
-\newcommand{\rML}[1][i]{\ensuremath{_{\mathrm{ML}\,#1}}}
-\newcommand{\rMLt}[1][i]{\tilde{r}_{\mathrm{ML}\,#1}}
-\newcommand{\triad}[6][]{\ensuremath{{}_{#2}^{#3}{\mathbb{#4}_{#1}}_{#5}^{\,#6}}}
-\newcommand{\triadd}[5]{\ensuremath{{}_{#1}^{#2}{\mathbb{#3}}_{#4}^{\,#5}}}
-\newcommand{\triadt}[5]{\ensuremath{{}_{#1}^{#2}{\tilde{\mathbb{#3}}}_{#4}^{\,#5}}}
-\newcommand{\rtriad}[2][]{\ensuremath{\triad[#1]{i}{k}{#2}{i_p}{k_p}}}
-\newcommand{\rtriadt}[1]{\ensuremath{\triadt{i}{k}{#1}{i_p}{k_p}}}
-
-\begin{document}
-% ================================================================
-% Iso-neutral diffusion :
-% ================================================================
-\chapter{Iso-Neutral Diffusion and Eddy Advection using Triads}
-\label{apdx:triad}
-
-\minitoc
-
-\newpage
-
-\section{Choice of \protect\ngn{namtra\_ldf} namelist parameters}
-%-----------------------------------------nam_traldf------------------------------------------------------
-
-\nlst{namtra_ldf}
-%---------------------------------------------------------------------------------------------------------
-
-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
-the eddy-induced advective skew (GM) fluxes.
-If the namelist logical \np{ln\_traldf\_iso} is set true,
-the filtered version of Cox's original scheme (the Standard scheme) is employed (\autoref{sec:LDF_slp}).
-In the present implementation of the Griffies scheme,
-the advective skew fluxes are implemented even if \np{ln\_traldf\_eiv} is false.
-
-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,
-even though the eddy advection is accomplished by means of the skew fluxes.
-
-The options specific to the Griffies scheme include:
-\begin{description}
-\item[\np{ln\_triad\_iso}]
-  See \autoref{sec:taper}.
-  If this is set false (the default),
-  then `iso-neutral' mixing is accomplished within the surface mixed-layer along slopes linearly decreasing with
-  depth from the value immediately below the mixed-layer to zero (flat) at the surface (\autoref{sec:lintaper}).
-  This is the same treatment as used in the default implementation
-  \autoref{subsec:LDF_slp_iso}; \autoref{fig:eiv_slp}.
-  Where \np{ln\_triad\_iso} is set true,
-  the vertical skew flux is further reduced to ensure no vertical buoyancy flux,
-  giving an almost pure horizontal diffusive tracer flux within the mixed layer.
-  This is similar to the tapering suggested by \citet{Gerdes1991}. See \autoref{subsec:Gerdes-taper}
-\item[\np{ln\_botmix\_triad}]
-  See \autoref{sec:iso_bdry}. 
-  If this is set false (the default) then the lateral diffusive fluxes
-  associated with triads partly masked by topography are neglected. 
-  If it is set true, however, then these lateral diffusive fluxes are applied, 
-  giving smoother bottom tracer fields at the cost of introducing diapycnal mixing.
-\item[\np{rn\_sw\_triad}]
-  blah blah to be added....
-\end{description}
-The options shared with the Standard scheme include:
-\begin{description}
-\item[\np{ln\_traldf\_msc}]   blah blah to be added
-\item[\np{rn\_slpmax}]  blah blah to be added
-\end{description}
-
-\section{Triad formulation of iso-neutral diffusion}
-\label{sec:iso}
-
-We have implemented into \NEMO a scheme inspired by \citet{Griffies_al_JPO98},
-but formulated within the \NEMO framework, using scale factors rather than grid-sizes.
-
-\subsection{Iso-neutral diffusion operator}
-
-The iso-neutral second order tracer diffusive operator for small angles between
-iso-neutral surfaces and geopotentials is given by \autoref{eq:iso_tensor_1}:
-\begin{subequations}
-  \label{eq:iso_tensor_1}
-  \begin{equation}
-    D^{lT}=-\nabla \cdot\vect{f}^{lT}\equiv
-    -\frac{1}{e_1e_2e_3}\left[\pd{i}\left (f_1^{lT}e_2e_3\right) +
-      \pd{j}\left (f_2^{lT}e_2e_3\right) + \pd{k}\left (f_3^{lT}e_1e_2\right)\right],
-  \end{equation}
-  where the diffusive flux per unit area of physical space
-  \begin{equation}
-    \vect{f}^{lT}=-{A^{lT}}\Re\cdot\nabla T,
-  \end{equation}
-  \begin{equation}
-    \label{eq:iso_tensor_2}
-    \mbox{with}\quad \;\;\Re =
-    \begin{pmatrix}
-      1   &  0   & -r_1           \rule[-.9 em]{0pt}{1.79 em} \\
-      0   &  1   & -r_2           \rule[-.9 em]{0pt}{1.79 em} \\
-      -r_1 & -r_2 &  r_1 ^2+r_2 ^2 \rule[-.9 em]{0pt}{1.79 em}
-    \end{pmatrix}
-    \quad \text{and} \quad\nabla T=
-    \begin{pmatrix}
-      \frac{1}{e_1} \pd[T]{i} \rule[-.9 em]{0pt}{1.79 em} \\
-      \frac{1}{e_2} \pd[T]{j} \rule[-.9 em]{0pt}{1.79 em} \\
-      \frac{1}{e_3} \pd[T]{k} \rule[-.9 em]{0pt}{1.79 em}
-    \end{pmatrix}
-    .
-  \end{equation}
-\end{subequations}
-% \left( {{\begin{array}{*{20}c}
-%  1 \hfill & 0 \hfill & {-r_1 } \hfill \\
-%  0 \hfill & 1 \hfill & {-r_2 } \hfill \\
-%  {-r_1 } \hfill & {-r_2 } \hfill & {r_1 ^2+r_2 ^2} \hfill \\
-% \end{array} }} \right)
-Here \autoref{eq:PE_iso_slopes} 
-\begin{align*}
-  r_1 &=-\frac{e_3 }{e_1 } \left( \frac{\partial \rho }{\partial i}
-        \right)
-        \left( {\frac{\partial \rho }{\partial k}} \right)^{-1} \\
-      &=-\frac{e_3 }{e_1 } \left( -\alpha\frac{\partial T }{\partial i} +
-        \beta\frac{\partial S }{\partial i} \right) \left(
-        -\alpha\frac{\partial T }{\partial k} + \beta\frac{\partial S
-        }{\partial k} \right)^{-1}
-\end{align*}
-is the $i$-component of the slope of the iso-neutral surface relative to the computational surface,
-and $r_2$ is the $j$-component.
-
-We will find it useful to consider the fluxes per unit area in $i,j,k$ space; we write
-\[
-  % \label{eq:Fijk}
-  \vect{F}_{\mathrm{iso}}=\left(f_1^{lT}e_2e_3, f_2^{lT}e_1e_3, f_3^{lT}e_1e_2\right).
-\]
-Additionally, we will sometimes write the contributions towards the fluxes $\vect{f}$ and
-$\vect{F}_{\mathrm{iso}}$ from the component $R_{ij}$ of $\Re$ as $f_{ij}$, $F_{\mathrm{iso}\: ij}$,
-with $f_{ij}=R_{ij}e_i^{-1}\partial T/\partial x_i$ (no summation) etc.
-
-The off-diagonal terms of the small angle diffusion tensor
-\autoref{eq:iso_tensor_1}, \autoref{eq:iso_tensor_2} produce skew-fluxes along
-the $i$- and $j$-directions resulting from the vertical tracer gradient:
-\begin{align}
-  \label{eq:i13c}
-  f_{13}=&+{A^{lT}} r_1\frac{1}{e_3}\frac{\partial T}{\partial k},\qquad f_{23}=+{A^{lT}} r_2\frac{1}{e_3}\frac{\partial T}{\partial k}\\
-  \intertext{and in the k-direction resulting from the lateral tracer gradients}
-  \label{eq:i31c}
-  f_{31}+f_{32}=& {A^{lT}} r_1\frac{1}{e_1}\frac{\partial T}{\partial i}+{A^{lT}} r_2\frac{1}{e_1}\frac{\partial T}{\partial i}
-\end{align}
-
-The vertical diffusive flux associated with the $_{33}$ component of the small angle diffusion tensor is
-\begin{equation}
-  \label{eq:i33c}
-  f_{33}=-{A^{lT}}(r_1^2 +r_2^2) \frac{1}{e_3}\frac{\partial T}{\partial k}.
-\end{equation}
-
-Since there are no cross terms involving $r_1$ and $r_2$ in the above,
-we can consider the iso-neutral diffusive fluxes separately in the $i$-$k$ and $j$-$k$ planes,
-just adding together the vertical components from each plane.
-The following description will describe the fluxes on the $i$-$k$ plane.
-
-There is no natural discretization for the $i$-component of the skew-flux, \autoref{eq:i13c},
-as although it must be evaluated at $u$-points,
-it involves vertical gradients (both for the tracer and the slope $r_1$), defined at $w$-points.
-Similarly, the vertical skew flux, \autoref{eq:i31c},
-is evaluated at $w$-points but involves horizontal gradients defined at $u$-points.
-
-\subsection{Standard discretization}
-
-The straightforward approach to discretize the lateral skew flux
-\autoref{eq:i13c} from tracer cell $i,k$ to $i+1,k$, introduced in 1995 into OPA,
-\autoref{eq:tra_ldf_iso}, is to calculate a mean vertical gradient at the $u$-point from
-the average of the four surrounding vertical tracer gradients, and multiply this by a mean slope at the $u$-point,
-calculated from the averaged surrounding vertical density gradients.
-The total area-integrated skew-flux (flux per unit area in $ijk$ space) from tracer cell $i,k$ to $i+1,k$,
-noting that the $e_{{3}_{i+1/2}^k}$ in the area $e{_{3}}_{i+1/2}^k{e_{2}}_{i+1/2}i^k$ at the $u$-point cancels out with
-the $1/{e_{3}}_{i+1/2}^k$ associated with the vertical tracer gradient, is then \autoref{eq:tra_ldf_iso}
-\[
-  \left(F_u^{13} \right)_{i+\frac{1}{2}}^k = {A}_{i+\frac{1}{2}}^k
-  {e_{2}}_{i+1/2}^k \overline{\overline
-    r_1} ^{\,i,k}\,\overline{\overline{\delta_k T}}^{\,i,k},
-\]
-where
-\[
-  \overline{\overline
-    r_1} ^{\,i,k} = -\frac{{e_{3u}}_{i+1/2}^k}{{e_{1u}}_{i+1/2}^k}
-  \frac{\delta_{i+1/2} [\rho]}{\overline{\overline{\delta_k \rho}}^{\,i,k}},
-\]
-and here and in the following we drop the $^{lT}$ superscript from ${A^{lT}}$ for simplicity.
-Unfortunately the resulting combination $\overline{\overline{\delta_k\bullet}}^{\,i,k}$ of a $k$ average and
-a $k$ difference of the tracer reduces to $\bullet_{k+1}-\bullet_{k-1}$,
-so two-grid-point oscillations are invisible to this discretization of the iso-neutral operator.
-These \emph{computational modes} will not be damped by this operator, and may even possibly be amplified by it.
-Consequently, applying this operator to a tracer does not guarantee the decrease of its global-average variance.
-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.
-
-\subsection{Expression of the skew-flux in terms of triad slopes}
-
-\citep{Griffies_al_JPO98} introduce a different discretization of the off-diagonal terms that
-nicely solves the problem.
-% Instead of multiplying the mean slope calculated at the $u$-point by
-% the mean vertical gradient at the $u$-point,
-% >>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[tb]
-  \begin{center}
-    \includegraphics[width=1.05\textwidth]{Fig_GRIFF_triad_fluxes}
-    \caption{
-      \protect\label{fig:ISO_triad}
-      (a) Arrangement of triads $S_i$ and tracer gradients to
-      give lateral tracer flux from box $i,k$ to $i+1,k$
-      (b) Triads $S'_i$ and tracer gradients to give vertical tracer flux from
-      box $i,k$ to $i,k+1$.
-    }
-  \end{center}
-\end{figure}
-% >>>>>>>>>>>>>>>>>>>>>>>>>>>>
-They get the skew flux from the products of the vertical gradients at each $w$-point surrounding the $u$-point with
-the corresponding `triad' slope calculated from the lateral density gradient across the $u$-point divided by
-the vertical density gradient at the same $w$-point as the tracer gradient.
-See \autoref{fig:ISO_triad}a, where the thick lines denote the tracer gradients,
-and the thin lines the corresponding triads, with slopes $s_1, \dotsc s_4$.
-The total area-integrated skew-flux from tracer cell $i,k$ to $i+1,k$
-\begin{multline}
-  \label{eq:i13}
-  \left( F_u^{13}  \right)_{i+\frac{1}{2}}^k = {A}_{i+1}^k a_1 s_1
-  \delta_{k+\frac{1}{2}} \left[ T^{i+1}
-  \right]/e_{{3w}_{i+1}}^{k+\frac{1}{2}}  + {A} _i^k a_2 s_2 \delta
-  _{k+\frac{1}{2}} \left[ T^i
-  \right]/e_{{3w}_{i+1}}^{k+\frac{1}{2}} \\
-  +{A} _{i+1}^k a_3 s_3 \delta_{k-\frac{1}{2}} \left[ T^{i+1}
-  \right]/e_{{3w}_{i+1}}^{k+\frac{1}{2}}  +{A} _i^k a_4 s_4 \delta
-  _{k-\frac{1}{2}} \left[ T^i \right]/e_{{3w}_{i+1}}^{k+\frac{1}{2}},
-\end{multline}
-where the contributions of the triad fluxes are weighted by areas $a_1, \dotsc a_4$,
-and ${A}$ is now defined at the tracer points rather than the $u$-points.
-This discretization gives a much closer stencil, and disallows the two-point computational modes.
-
-The vertical skew flux \autoref{eq:i31c} from tracer cell $i,k$ to $i,k+1$ at
-the $w$-point $i,k+\frac{1}{2}$ is constructed similarly (\autoref{fig:ISO_triad}b) by
-multiplying lateral tracer gradients from each of the four surrounding $u$-points by the appropriate triad slope:
-\begin{multline}
-  \label{eq:i31}
-  \left( F_w^{31} \right) _i ^{k+\frac{1}{2}} =  {A}_i^{k+1} a_{1}'
-  s_{1}' \delta_{i-\frac{1}{2}} \left[ T^{k+1} \right]/{e_{3u}}_{i-\frac{1}{2}}^{k+1}
-  +{A}_i^{k+1} a_{2}' s_{2}' \delta_{i+\frac{1}{2}} \left[ T^{k+1} \right]/{e_{3u}}_{i+\frac{1}{2}}^{k+1} \\
-  + {A}_i^k a_{3}' s_{3}' \delta_{i-\frac{1}{2}} \left[ T^k\right]/{e_{3u}}_{i-\frac{1}{2}}^k
-  +{A}_i^k a_{4}' s_{4}' \delta_{i+\frac{1}{2}} \left[ T^k \right]/{e_{3u}}_{i+\frac{1}{2}}^k.
-\end{multline}
-
-We notate the triad slopes $s_i$ and $s'_i$ in terms of the `anchor point' $i,k$
-(appearing in both the vertical and lateral gradient),
-and the $u$- and $w$-points $(i+i_p,k)$, $(i,k+k_p)$ at the centres of the `arms' of the triad as follows
-(see also \autoref{fig:ISO_triad}):
-\begin{equation}
-  \label{eq:R}
-  _i^k \mathbb{R}_{i_p}^{k_p}
-  =-\frac{ {e_{3w}}_{\,i}^{\,k+k_p}} { {e_{1u}}_{\,i+i_p}^{\,k}}
-  \
-  \frac
-  { \alpha_i^k  \ \delta_{i+i_p}[T^k] - \beta_i^k \ \delta_{i+i_p}[S^k] }
-  { \alpha_i^k  \ \delta_{k+k_p}[T^i] - \beta_i^k \ \delta_{k+k_p}[S^i] }.
-\end{equation}
-In calculating the slopes of the local neutral surfaces,
-the expansion coefficients $\alpha$ and $\beta$ are evaluated at the anchor points of the triad,
-while the metrics are calculated at the $u$- and $w$-points on the arms.
-
-% >>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[tb]
-  \begin{center}
-    \includegraphics[width=0.80\textwidth]{Fig_GRIFF_qcells}
-    \caption{
-      \protect\label{fig:qcells}
-      Triad notation for quarter cells. $T$-cells are inside boxes,
-      while the  $i+\fractext{1}{2},k$ $u$-cell is shaded in green and
-      the $i,k+\fractext{1}{2}$ $w$-cell is shaded in pink.
-    }
-  \end{center}
-\end{figure}
-% >>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-Each triad $\{_i^{k}\:_{i_p}^{k_p}\}$ is associated (\autoref{fig:qcells}) with the quarter cell that is
-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}$.
-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)$,
-and then again as an $s'$ to calculate the vertical flux along its $w$-arm at $(i,k+k_p)$.
-Each vertical area $a_i$ used to calculate the lateral flux and horizontal area $a'_i$ used to
-calculate the vertical flux can also be identified as the area across the $u$- and $w$-arms of a unique triad,
-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}$,
-and in \autoref{eq:i31} $a'_{1}={\:}_i^k{\mathbb{A}_w}_{1/2}^{1/2}$.
-
-\subsection{Full triad fluxes}
-
-A key property of iso-neutral diffusion is that it should not affect the (locally referenced) density.
-In particular there should be no lateral or vertical density flux.
-The lateral density flux disappears so long as the area-integrated lateral diffusive flux from
-tracer cell $i,k$ to $i+1,k$ coming from the $_{11}$ term of the diffusion tensor takes the form
-\begin{equation}
-  \label{eq:i11}
-  \left( F_u^{11} \right) _{i+\frac{1}{2}} ^{k} =
-  - \left( {A}_i^{k+1} a_{1} + {A}_i^{k+1} a_{2} + {A}_i^k
-    a_{3} + {A}_i^k a_{4} \right)
-  \frac{\delta_{i+1/2} \left[ T^k\right]}{{e_{1u}}_{\,i+1/2}^{\,k}},
-\end{equation}
-where the areas $a_i$ are as in \autoref{eq:i13}.
-In this case, separating the total lateral flux, the sum of \autoref{eq:i13} and \autoref{eq:i11},
-into triad components, a lateral tracer flux
-\begin{equation}
-  \label{eq:latflux-triad}
-  _i^k {\mathbb{F}_u}_{i_p}^{k_p} (T) = - {A}_i^k{ \:}_i^k{\mathbb{A}_u}_{i_p}^{k_p}
-  \left(
-    \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
-    -\ {_i^k\mathbb{R}_{i_p}^{k_p}} \
-    \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
-  \right)
-\end{equation}
-can be identified with each triad.
-Then, because the same metric factors ${e_{3w}}_{\,i}^{\,k+k_p}$ and ${e_{1u}}_{\,i+i_p}^{\,k}$ are employed for both
-the density gradients in $ _i^k \mathbb{R}_{i_p}^{k_p}$ and the tracer gradients,
-the lateral density flux associated with each triad separately disappears.
-\begin{equation}
-  \label{eq:latflux-rho}
-  {\mathbb{F}_u}_{i_p}^{k_p} (\rho)=-\alpha _i^k {\:}_i^k {\mathbb{F}_u}_{i_p}^{k_p} (T) + \beta_i^k {\:}_i^k {\mathbb{F}_u}_{i_p}^{k_p} (S)=0
-\end{equation}
-Thus the total flux $\left( F_u^{31} \right) ^i _{i,k+\frac{1}{2}} + \left( F_u^{11} \right) ^i _{i,k+\frac{1}{2}}$ from
-tracer cell $i,k$ to $i+1,k$ must also vanish since it is a sum of four such triad fluxes.
-
-The squared slope $r_1^2$ in the expression \autoref{eq:i33c} for the $_{33}$ component is also expressed in
-terms of area-weighted squared triad slopes,
-so the area-integrated vertical flux from tracer cell $i,k$ to $i,k+1$ resulting from the $r_1^2$ term is
-\begin{equation}
-  \label{eq:i33}
-  \left( F_w^{33} \right) _i^{k+\frac{1}{2}} =
-  - \left( {A}_i^{k+1} a_{1}' s_{1}'^2
-    + {A}_i^{k+1} a_{2}' s_{2}'^2
-    + {A}_i^k a_{3}' s_{3}'^2
-    + {A}_i^k a_{4}' s_{4}'^2 \right)\delta_{k+\frac{1}{2}} \left[ T^{i+1} \right],
-\end{equation}
-where the areas $a'$ and slopes $s'$ are the same as in \autoref{eq:i31}.
-Then, separating the total vertical flux, the sum of \autoref{eq:i31} and \autoref{eq:i33},
-into triad components, a vertical flux
-\begin{align}
-  \label{eq:vertflux-triad}
-  _i^k {\mathbb{F}_w}_{i_p}^{k_p} (T)
-  &= {A}_i^k{\: }_i^k{\mathbb{A}_w}_{i_p}^{k_p}
-    \left(
-    {_i^k\mathbb{R}_{i_p}^{k_p}}\frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
-    -\ \left({_i^k\mathbb{R}_{i_p}^{k_p}}\right)^2 \
-    \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
-    \right) \\
-  &= - \left(\left.{ }_i^k{\mathbb{A}_w}_{i_p}^{k_p}\right/{ }_i^k{\mathbb{A}_u}_{i_p}^{k_p}\right)
-    {_i^k\mathbb{R}_{i_p}^{k_p}}{\: }_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \label{eq:vertflux-triad2}
-\end{align}
-may be associated with each triad.
-Each vertical density flux $_i^k {\mathbb{F}_w}_{i_p}^{k_p} (\rho)$ associated with a triad then
-separately disappears (because the lateral flux $_i^k{\mathbb{F}_u}_{i_p}^{k_p} (\rho)$ disappears).
-Consequently the total vertical density flux
-$\left( F_w^{31} \right)_i ^{k+\frac{1}{2}} + \left( F_w^{33} \right)_i^{k+\frac{1}{2}}$ from
-tracer cell $i,k$ to $i,k+1$ must also vanish since it is a sum of four such triad fluxes.
-
-We can explicitly identify (\autoref{fig:qcells}) the triads associated with the $s_i$, $a_i$,
-and $s'_i$, $a'_i$ used in the definition of the $u$-fluxes and $w$-fluxes in \autoref{eq:i31},
-\autoref{eq:i13}, \autoref{eq:i11} \autoref{eq:i33} and \autoref{fig:ISO_triad} to write out
-the iso-neutral fluxes at $u$- and $w$-points as sums of the triad fluxes that cross the $u$- and $w$-faces:
-%(\autoref{fig:ISO_triad}):
-\begin{flalign}
-  \label{eq:iso_flux} \vect{F}_{\mathrm{iso}}(T) &\equiv
-  \sum_{\substack{i_p,\,k_p}}
-  \begin{pmatrix}
-    {_{i+1/2-i_p}^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) \\ \\
-    {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p} } (T) \\
-  \end{pmatrix}.
-\end{flalign}
-
-\subsection{Ensuring the scheme does not increase tracer variance}
-\label{subsec:variance}
-
-We now require that this operator should not increase the globally-integrated tracer variance.
-%This changes according to
-% \begin{align*}
-% &\int_D  D_l^T \; T \;dv \equiv  \sum_{i,k} \left\{ T \ D_l^T \ b_T \right\}    \\
-% &\equiv + \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
-% 		\delta_{i} \left[{_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \right]
-% 	     + \delta_{k} \left[ {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right]  \ T \right\}    \\
-% &\equiv  - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
-%                 {_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \ \delta_{i+1/2} [T]
-%              + {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}}  \ \delta_{k+1/2} [T]   \right\}      \\
-% \end{align*}
-Each triad slope $_i^k\mathbb{R}_{i_p}^{k_p}$ drives a lateral flux $_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)$ across
-the $u$-point $i+i_p,k$ and a vertical flux $_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)$ across the $w$-point $i,k+k_p$.
-The lateral flux drives a net rate of change of variance,
-summed over the two $T$-points $i+i_p-\fractext{1}{2},k$ and $i+i_p+\fractext{1}{2},k$, of
-\begin{multline}
-  {b_T}_{i+i_p-1/2}^k\left(\frac{\partial T}{\partial t}T\right)_{i+i_p-1/2}^k+
-  \quad {b_T}_{i+i_p+1/2}^k\left(\frac{\partial T}{\partial
-      t}T\right)_{i+i_p+1/2}^k \\
-  \begin{aligned}
-    &= -T_{i+i_p-1/2}^k{\;} _i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \quad + \quad  T_{i+i_p+1/2}^k
-    {\;}_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \\
-    &={\;} _i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)\,\delta_{i+ i_p}[T^k], \label{eq:dvar_iso_i}
-  \end{aligned}
-\end{multline}
-while the vertical flux similarly drives a net rate of change of variance summed over
-the $T$-points $i,k+k_p-\fractext{1}{2}$ (above) and $i,k+k_p+\fractext{1}{2}$ (below) of
-\begin{equation}
-  \label{eq:dvar_iso_k}
-  _i^k{\mathbb{F}_w}_{i_p}^{k_p} (T) \,\delta_{k+ k_p}[T^i].
-\end{equation}
-The total variance tendency driven by the triad is the sum of these two.
-Expanding $_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)$ and $_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)$ with
-\autoref{eq:latflux-triad} and \autoref{eq:vertflux-triad}, it is
-\begin{multline*}
-  -{A}_i^k\left \{
-    { } _i^k{\mathbb{A}_u}_{i_p}^{k_p}
-    \left(
-      \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
-      - {_i^k\mathbb{R}_{i_p}^{k_p}} \
-      \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }\right)\,\delta_{i+ i_p}[T^k] \right.\\
-  - \left. { } _i^k{\mathbb{A}_w}_{i_p}^{k_p}
-    \left(
-      \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
-      -{\:}_i^k\mathbb{R}_{i_p}^{k_p}
-      \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
-    \right) {\,}_i^k\mathbb{R}_{i_p}^{k_p}\delta_{k+ k_p}[T^i]
-  \right \}.
-\end{multline*}
-The key point is then that if we require $_i^k{\mathbb{A}_u}_{i_p}^{k_p}$ and $_i^k{\mathbb{A}_w}_{i_p}^{k_p}$ to
-be related to a triad volume $_i^k\mathbb{V}_{i_p}^{k_p}$ by
-\begin{equation}
-  \label{eq:V-A}
-  _i^k\mathbb{V}_{i_p}^{k_p}
-  ={\;}_i^k{\mathbb{A}_u}_{i_p}^{k_p}\,{e_{1u}}_{\,i + i_p}^{\,k}
-  ={\;}_i^k{\mathbb{A}_w}_{i_p}^{k_p}\,{e_{3w}}_{\,i}^{\,k + k_p},
-\end{equation}
-the variance tendency reduces to the perfect square
-\begin{equation}
-  \label{eq:perfect-square}
-  -{A}_i^k{\:} _i^k\mathbb{V}_{i_p}^{k_p}
-  \left(
-    \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
-    -{\:}_i^k\mathbb{R}_{i_p}^{k_p}
-    \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
-  \right)^2\leq 0.
-\end{equation}
-Thus, the constraint \autoref{eq:V-A} ensures that the fluxes
-(\autoref{eq:latflux-triad}, \autoref{eq:vertflux-triad}) associated with
-a given slope triad $_i^k\mathbb{R}_{i_p}^{k_p}$ do not increase the net variance.
-Since the total fluxes are sums of such fluxes from the various triads, this constraint, applied to all triads,
-is sufficient to ensure that the globally integrated variance does not increase.
-
-The expression \autoref{eq:V-A} can be interpreted as a discretization of the global integral
-\begin{equation}
-  \label{eq:cts-var}
-  \frac{\partial}{\partial t}\int\!\fractext{1}{2} T^2\, dV =
-  \int\!\mathbf{F}\cdot\nabla T\, dV,
-\end{equation}
-where, within each triad volume $_i^k\mathbb{V}_{i_p}^{k_p}$, the lateral and vertical fluxes/unit area
-\[
-  \mathbf{F}=\left(
-    \left.{}_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)\right/{}_i^k{\mathbb{A}_u}_{i_p}^{k_p},
-    \left.{\:}_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)\right/{}_i^k{\mathbb{A}_w}_{i_p}^{k_p}
-  \right)
-\]
-and the gradient
-\[
-  \nabla T = \left(
-    \left.\delta_{i+ i_p}[T^k] \right/ {e_{1u}}_{\,i + i_p}^{\,k},
-    \left.\delta_{k+ k_p}[T^i] \right/ {e_{3w}}_{\,i}^{\,k + k_p}
-  \right)
-\]
-
-\subsection{Triad volumes in Griffes's scheme and in \NEMO}
-
-To complete the discretization we now need only specify the triad volumes $_i^k\mathbb{V}_{i_p}^{k_p}$.
-\citet{Griffies_al_JPO98} identifies these $_i^k\mathbb{V}_{i_p}^{k_p}$ as the volumes of the quarter cells,
-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,
-and scale factors for the quarter cells are not defined.
-Instead, therefore we simply choose
-\begin{equation}
-  \label{eq:V-NEMO}
-  _i^k\mathbb{V}_{i_p}^{k_p}=\fractext{1}{4} {b_u}_{i+i_p}^k,
-\end{equation}
-as a quarter of the volume of the $u$-cell inside which the triad quarter-cell lies.
-This has the nice property that when the slopes $\mathbb{R}$ vanish,
-the lateral flux from tracer cell $i,k$ to $i+1,k$ reduces to the classical form
-\begin{equation}
-  \label{eq:lat-normal}
-  -\overline{A}_{\,i+1/2}^k\;
-  \frac{{b_u}_{i+1/2}^k}{{e_{1u}}_{\,i + i_p}^{\,k}}
-  \;\frac{\delta_{i+ 1/2}[T^k] }{{e_{1u}}_{\,i + i_p}^{\,k}}
-  = -\overline{A}_{\,i+1/2}^k\;\frac{{e_{1w}}_{\,i + 1/2}^{\,k}\:{e_{1v}}_{\,i + 1/2}^{\,k}\;\delta_{i+ 1/2}[T^k]}{{e_{1u}}_{\,i + 1/2}^{\,k}}.
-\end{equation}
-In fact if the diffusive coefficient is defined at $u$-points,
-so that we employ ${A}_{i+i_p}^k$ instead of  ${A}_i^k$ in the definitions of the triad fluxes
-\autoref{eq:latflux-triad} and \autoref{eq:vertflux-triad},
-we can replace $\overline{A}_{\,i+1/2}^k$ by $A_{i+1/2}^k$ in the above.
-
-\subsection{Summary of the scheme}
-
-The iso-neutral fluxes at $u$- and $w$-points are the sums of the triad fluxes that
-cross the $u$- and $w$-faces \autoref{eq:iso_flux}:
-\begin{subequations}
-  % \label{eq:alltriadflux}
-  \begin{flalign*}
-    % \label{eq:vect_isoflux}
-    \vect{F}_{\mathrm{iso}}(T) &\equiv
-    \sum_{\substack{i_p,\,k_p}}
-    \begin{pmatrix}
-      {_{i+1/2-i_p}^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) \\ \\
-      {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p} } (T)
-    \end{pmatrix},
-  \end{flalign*}
-  where \autoref{eq:latflux-triad}:
-  \begin{align}
-    \label{eq:triadfluxu}
-    _i^k {\mathbb{F}_u}_{i_p}^{k_p} (T) &= - {A}_i^k{
-                                          \:}\frac{{{}_i^k\mathbb{V}}_{i_p}^{k_p}}{{e_{1u}}_{\,i + i_p}^{\,k}}
-                                          \left(
-                                          \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
-                                          -\ {_i^k\mathbb{R}_{i_p}^{k_p}} \
-                                          \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
-                                          \right),\\
-    \intertext{and}
-    _i^k {\mathbb{F}_w}_{i_p}^{k_p} (T)
-                                        &= {A}_i^k{\: }\frac{{{}_i^k\mathbb{V}}_{i_p}^{k_p}}{{e_{3w}}_{\,i}^{\,k+k_p}}
-                                          \left(
-                                          {_i^k\mathbb{R}_{i_p}^{k_p}}\frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
-                                          -\ \left({_i^k\mathbb{R}_{i_p}^{k_p}}\right)^2 \
-                                          \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
-                                          \right),\label{eq:triadfluxw}
-  \end{align}
-  with \autoref{eq:V-NEMO}
-  \[
-    % \label{eq:V-NEMO2}
-    _i^k{\mathbb{V}}_{i_p}^{k_p}=\fractext{1}{4} {b_u}_{i+i_p}^k.
-  \]
-\end{subequations}
-
-The divergence of the expression \autoref{eq:iso_flux} for the fluxes gives the iso-neutral diffusion tendency at
-each tracer point:
-\[
-  % \label{eq:iso_operator}
-  D_l^T = \frac{1}{b_T}
-  \sum_{\substack{i_p,\,k_p}} \left\{ \delta_{i} \left[{_{i+1/2-i_p}^k
-        {\mathbb{F}_u }_{i_p}^{k_p}} \right] + \delta_{k} \left[
-      {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right] \right\}
-\]
-where $b_T= e_{1T}\,e_{2T}\,e_{3T}$ is the volume of $T$-cells.
-The diffusion scheme satisfies the following six properties:
-\begin{description}
-\item[$\bullet$ horizontal diffusion]
-  The discretization of the diffusion operator recovers the traditional five-point Laplacian
-  \autoref{eq:lat-normal} in the limit of flat iso-neutral direction:
-  \[
-    % \label{eq:iso_property0}
-    D_l^T = \frac{1}{b_T} \
-    \delta_{i} \left[ \frac{e_{2u}\,e_{3u}}{e_{1u}} \;
-      \overline{A}^{\,i} \; \delta_{i+1/2}[T] \right] \qquad
-    \text{when} \quad { _i^k \mathbb{R}_{i_p}^{k_p} }=0
-  \]
-
-\item[$\bullet$ implicit treatment in the vertical]
-  Only tracer values associated with a single water column appear in the expression \autoref{eq:i33} for
-  the $_{33}$ fluxes, vertical fluxes driven by vertical gradients.
-  This is of paramount importance since it means that a time-implicit algorithm can be used to
-  solve the vertical diffusion equation.
-  This is necessary since the vertical eddy diffusivity associated with this term,
-  \[
-    \frac{1}{b_w}\sum_{\substack{i_p, \,k_p}} \left\{
-      {\:}_i^k\mathbb{V}_{i_p}^{k_p} \: {A}_i^k \: \left(_i^k \mathbb{R}_{i_p}^{k_p}\right)^2
-    \right\}  =
-    \frac{1}{4b_w}\sum_{\substack{i_p, \,k_p}} \left\{
-      {b_u}_{i+i_p}^k\: {A}_i^k \: \left(_i^k \mathbb{R}_{i_p}^{k_p}\right)^2
-    \right\},
-  \]
-  (where $b_w= e_{1w}\,e_{2w}\,e_{3w}$ is the volume of $w$-cells) can be quite large.
-
-\item[$\bullet$ pure iso-neutral operator]
-  The iso-neutral flux of locally referenced potential density is zero.
-  See \autoref{eq:latflux-rho} and \autoref{eq:vertflux-triad2}.
-
-\item[$\bullet$ conservation of tracer]
-  The iso-neutral diffusion conserves tracer content, \ie
-  \[
-    % \label{eq:iso_property1}
-    \sum_{i,j,k} \left\{ D_l^T \      b_T \right\} = 0
-  \]
-  This property is trivially satisfied since the iso-neutral diffusive operator is written in flux form.
-
-\item[$\bullet$ no increase of tracer variance]
-  The iso-neutral diffusion does not increase the tracer variance, \ie
-  \[
-    % \label{eq:iso_property2}
-    \sum_{i,j,k} \left\{ T \ D_l^T      \ b_T \right\} \leq 0
-  \]
-  The property is demonstrated in \autoref{subsec:variance} above.
-  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.
-  It therefore ensures that, when the diffusivity coefficient is large enough,
-  the field on which it is applied becomes free of grid-point noise.
-
-\item[$\bullet$ self-adjoint operator]
-  The iso-neutral diffusion operator is self-adjoint, \ie
-  \begin{equation}
-    \label{eq:iso_property3}
-    \sum_{i,j,k} \left\{ S \ D_l^T \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\}
-  \end{equation}
-  In other word, there is no need to develop a specific routine from the adjoint of this operator.
-  We just have to apply the same routine.
-  This property can be demonstrated similarly to the proof of the `no increase of tracer variance' property.
-  The contribution by a single triad towards the left hand side of \autoref{eq:iso_property3},
-  can be found by replacing $\delta[T]$ by $\delta[S]$ in \autoref{eq:dvar_iso_i} and \autoref{eq:dvar_iso_k}.
-  This results in a term similar to \autoref{eq:perfect-square},
-  \[
-    % \label{eq:TScovar}
-    - {A}_i^k{\:} _i^k\mathbb{V}_{i_p}^{k_p}
-    \left(
-      \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
-      -{\:}_i^k\mathbb{R}_{i_p}^{k_p}
-      \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
-    \right)
-    \left(
-      \frac{ \delta_{i+ i_p}[S^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
-      -{\:}_i^k\mathbb{R}_{i_p}^{k_p}
-      \frac{ \delta_{k+k_p} [S^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
-    \right).
-  \]
-This is symmetrical in $T $ and $S$, so exactly the same term arises from
-the discretization of this triad's contribution towards the RHS of \autoref{eq:iso_property3}.
-\end{description}
-
-\subsection{Treatment of the triads at the boundaries}
-\label{sec:iso_bdry}
-
-The triad slope can only be defined where both the grid boxes centred at the end of the arms exist.
-Triads that would poke up through the upper ocean surface into the atmosphere,
-or down into the ocean floor, must be masked out.
-See \autoref{fig:bdry_triads}.
-Surface layer triads \triad{i}{1}{R}{1/2}{-1/2} (magenta) and \triad{i+1}{1}{R}{-1/2}{-1/2} (blue) that
-require density to be specified above the ocean surface are masked (\autoref{fig:bdry_triads}a):
-this ensures that lateral tracer gradients produce no flux through the ocean surface.
-However, to prevent surface noise, it is customary to retain the $_{11}$ contributions towards
-the lateral triad fluxes \triad[u]{i}{1}{F}{1/2}{-1/2} and \triad[u]{i+1}{1}{F}{-1/2}{-1/2};
-this drives diapycnal tracer fluxes.
-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.
-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.
-For setups with topography without bbl mixing, \np{ln\_botmix\_triad}\forcode{ = .true.} may be necessary.
-% >>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[h]
-  \begin{center}
-    \includegraphics[width=0.60\textwidth]{Fig_GRIFF_bdry_triads}
-    \caption{
-      \protect\label{fig:bdry_triads}
-      (a) Uppermost model layer $k=1$ with $i,1$ and $i+1,1$ tracer points (black dots),
-      and $i+1/2,1$ $u$-point (blue square).
-      Triad slopes \triad{i}{1}{R}{1/2}{-1/2} (magenta) and \triad{i+1}{1}{R}{-1/2}{-1/2} (blue) poking through
-      the ocean surface are masked (faded in figure).
-      However, the lateral $_{11}$ contributions towards \triad[u]{i}{1}{F}{1/2}{-1/2} and
-      \triad[u]{i+1}{1}{F}{-1/2}{-1/2} (yellow line) are still applied,
-      giving diapycnal diffusive fluxes.
-      \newline
-      (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.
-      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.}
-    }
-  \end{center}
-\end{figure}
-% >>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-\subsection{ Limiting of the slopes within the interior}
-\label{sec:limit}
-
-As discussed in \autoref{subsec:LDF_slp_iso},
-iso-neutral slopes relative to geopotentials must be bounded everywhere,
-both for consistency with the small-slope approximation and for numerical stability \citep{Cox1987, Griffies_Bk04}.
-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
-It is of course relevant to the iso-neutral slopes $\tilde{r}_i=r_i+\sigma_i$ relative to geopotentials
-(here the $\sigma_i$ are the slopes of the coordinate surfaces relative to geopotentials)
-\autoref{eq:PE_slopes_eiv} rather than the slope $r_i$ relative to coordinate surfaces, so we require
-\[
-  |\tilde{r}_i|\leq \tilde{r}_\mathrm{max}=0.01.
-\]
-and then recalculate the slopes $r_i$ relative to coordinates.
-Each individual triad slope
-\begin{equation}
-  \label{eq:Rtilde}
-  _i^k\tilde{\mathbb{R}}_{i_p}^{k_p} = {}_i^k\mathbb{R}_{i_p}^{k_p}  + \frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}}
-\end{equation}
-is limited like this and then the corresponding $_i^k\mathbb{R}_{i_p}^{k_p} $ are recalculated and
-combined to form the fluxes.
-Note that where the slopes have been limited, there is now a non-zero iso-neutral density flux that
-drives dianeutral mixing.
-In particular this iso-neutral density flux is always downwards,
-and so acts to reduce gravitational potential energy.
-
-\subsection{Tapering within the surface mixed layer}
-\label{sec:taper}
-
-Additional tapering of the iso-neutral fluxes is necessary within the surface mixed layer.
-When the Griffies triads are used, we offer two options for this.
-
-\subsubsection{Linear slope tapering within the surface mixed layer}
-\label{sec:lintaper}
-
-This is the option activated by the default choice \np{ln\_triad\_iso}\forcode{ = .false.}.
-Slopes $\tilde{r}_i$ relative to geopotentials are tapered linearly from their value immediately below
-the mixed layer to zero at the surface, as described in option (c) of \autoref{fig:eiv_slp}, to values
-\begin{equation}
-  \label{eq:rmtilde}
-  \rMLt = -\frac{z}{h}\left.\tilde{r}_i\right|_{z=-h}\quad \text{ for  } z>-h,
-\end{equation}
-and then the $r_i$ relative to vertical coordinate surfaces are appropriately adjusted to
-\[
-  % \label{eq:rm}
-  \rML =\rMLt -\sigma_i \quad \text{ for  } z>-h.
-\]
-Thus the diffusion operator within the mixed layer is given by:
-\[
-  % \label{eq:iso_tensor_ML}
-  D^{lT}=\nabla {\rm {\bf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad
-  \mbox{with}\quad \;\;\Re =\left( {{
-        \begin{array}{*{20}c}
-          1 \hfill & 0 \hfill & {-\rML[1]}\hfill \\
-          0 \hfill & 1 \hfill & {-\rML[2]} \hfill \\
-          {-\rML[1]}\hfill &   {-\rML[2]} \hfill & {\rML[1]^2+\rML[2]^2} \hfill
-        \end{array}
-      }} \right)
-\]
-
-This slope tapering gives a natural connection between tracer in the mixed-layer and
-in isopycnal layers immediately below, in the thermocline.
-It is consistent with the way the $\tilde{r}_i$ are tapered within the mixed layer
-(see \autoref{sec:taperskew} below) so as to ensure a uniform GM eddy-induced velocity throughout the mixed layer.
-However, it gives a downwards density flux and so acts so as to reduce potential energy in the same way as
-does the slope limiting discussed above in \autoref{sec:limit}.
- 
-As in \autoref{sec:limit} above, the tapering \autoref{eq:rmtilde} is applied separately to
-each triad $_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}$, and the $_i^k\mathbb{R}_{i_p}^{k_p}$ adjusted.
-For clarity, we assume $z$-coordinates in the following;
-the conversion from $\mathbb{R}$ to $\tilde{\mathbb{R}}$ and back to $\mathbb{R}$ follows exactly as
-described above by \autoref{eq:Rtilde}.
-\begin{enumerate}
-\item
-  Mixed-layer depth is defined so as to avoid including regions of weak vertical stratification in
-  the slope definition.
-  At each $i,j$ (simplified to $i$ in \autoref{fig:MLB_triad}),
-  we define the mixed-layer by setting the vertical index of the tracer point immediately below the mixed layer,
-  $k_{\mathrm{ML}}$, as the maximum $k$ (shallowest tracer point) such that
-  the potential density ${\rho_0}_{i,k}>{\rho_0}_{i,k_{10}}+\Delta\rho_c$,
-  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.
-  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}$,
-  the depth of the $w$-point above the $i,k_{\mathrm{ML}}$ tracer point.
-\item
-  We define `basal' triad slopes ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ as
-  the slopes of those triads whose vertical `arms' go down from the $i,k_{\mathrm{ML}}$ tracer point to
-  the $i,k_{\mathrm{ML}}-1$ tracer point below.
-  This is to ensure that the vertical density gradients associated with
-  these basal triad slopes ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ are representative of the thermocline.
-  The four basal triads defined in the bottom part of \autoref{fig:MLB_triad} are then
-  \begin{align*}
-    {\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p} &=
-                                                       {\:}^{k_{\mathrm{ML}}-k_p-1/2}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p},
-                                                       % \label{eq:Rbase}
-    \\
-    \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}.
-  \end{align*}
-The vertical flux associated with each of these triads passes through
-the $w$-point $i,k_{\mathrm{ML}}-1/2$ lying \emph{below} the $i,k_{\mathrm{ML}}$ tracer point, so it is this depth
-\[
-  % \label{eq:zbase}
-  {z_\mathrm{base}}_{\,i}={z_{w}}_{k_\mathrm{ML}-1/2}
-\]
-one gridbox deeper than the diagnosed ML depth $z_{\mathrm{ML}})$ that sets the $h$ used to taper the slopes in
-\autoref{eq:rmtilde}.
-\item
-  Finally, we calculate the adjusted triads ${\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,i_p}^{k_p}$ within
-  the mixed layer, by multiplying the appropriate ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ by
-  the ratio of the depth of the $w$-point ${z_w}_{k+k_p}$ to ${z_{\mathrm{base}}}_{\,i}$.
-  For instance the green triad centred on $i,k$
-  \begin{align*}
-    {\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,1/2}^{-1/2} &=
-                                                        \frac{{z_w}_{k-1/2}}{{z_{\mathrm{base}}}_{\,i}}{\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,1/2}^{-1/2} \\
-    \intertext{and more generally}
-    {\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,i_p}^{k_p} &=
-                                                       \frac{{z_w}_{k+k_p}}{{z_{\mathrm{base}}}_{\,i}}{\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}.
-                                                       % \label{eq:RML}
-  \end{align*}
-\end{enumerate}
-
-% >>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[h]
-%  \fcapside {
-  \caption{
-    \protect\label{fig:MLB_triad}
-    Definition of mixed-layer depth and calculation of linearly tapered triads.
-    The figure shows a water column at a given $i,j$ (simplified to $i$), with the ocean surface at the top.
-    Tracer points are denoted by bullets, and black lines the edges of the tracer cells;
-    $k$ increases upwards.
-    \newline
-    \hspace{5 em}
-    We define the mixed-layer by setting the vertical index of the tracer point immediately below the mixed layer,
-    $k_{\mathrm{ML}}$, as the maximum $k$ (shallowest tracer point) such that
-    ${\rho_0}_{i,k}>{\rho_0}_{i,k_{10}}+\Delta\rho_c$,
-    where $i,k_{10}$ is the tracer gridbox within which the depth reaches 10~m.
-    We calculate the triad slopes within the mixed layer by linearly tapering them from zero
-    (at the surface) to the `basal' slopes,
-    the slopes of the four triads passing through the $w$-point $i,k_{\mathrm{ML}}-1/2$ (blue square),
-    ${\:}_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.}
-  % }
-  \includegraphics[width=0.60\textwidth]{Fig_GRIFF_MLB_triads}
-\end{figure}
-% >>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-\subsubsection{Additional truncation of skew iso-neutral flux components}
-\label{subsec:Gerdes-taper}
-
-The alternative option is activated by setting \np{ln\_triad\_iso} = true.
-This retains the same tapered slope $\rML$  described above for the calculation of the $_{33}$ term of
-the iso-neutral diffusion tensor (the vertical tracer flux driven by vertical tracer gradients),
-but replaces the $\rML$ in the skew term by
-\begin{equation}
-  \label{eq:rm*}
-  \rML^*=\left.\rMLt^2\right/\tilde{r}_i-\sigma_i,
-\end{equation}
-giving a ML diffusive operator
-\[
-  % \label{eq:iso_tensor_ML2}
-  D^{lT}=\nabla {\rm {\bf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad
-  \mbox{with}\quad \;\;\Re =\left( {{
-        \begin{array}{*{20}c}
-          1 \hfill & 0 \hfill & {-\rML[1]^*}\hfill \\
-          0 \hfill & 1 \hfill & {-\rML[2]^*} \hfill \\
-          {-\rML[1]^*}\hfill &   {-\rML[2]^*} \hfill & {\rML[1]^2+\rML[2]^2} \hfill \\
-        \end{array}
-      }} \right).
-\]
-This operator
-\footnote{
-  To ensure good behaviour where horizontal density gradients are weak,
-  we in fact follow \citet{Gerdes1991} and
-  set $\rML^*=\mathrm{sgn}(\tilde{r}_i)\min(|\rMLt^2/\tilde{r}_i|,|\tilde{r}_i|)-\sigma_i$.
-}
-then has the property it gives no vertical density flux, and so does not change the potential energy.
-This approach is similar to multiplying the iso-neutral diffusion coefficient by
-$\tilde{r}_{\mathrm{max}}^{-2}\tilde{r}_i^{-2}$ for steep slopes,
-as suggested by \citet{Gerdes1991} (see also \citet{Griffies_Bk04}).
-Again it is applied separately to each triad $_i^k\mathbb{R}_{i_p}^{k_p}$
-
-In practice, this approach gives weak vertical tracer fluxes through the mixed-layer,
-as well as vanishing density fluxes.
-While it is theoretically advantageous that it does not change the potential energy,
-it may give a discontinuity between the fluxes within the mixed-layer (purely horizontal) and
-just below (along iso-neutral surfaces).
-% This may give strange looking results,
-% particularly where the mixed-layer depth varies strongly laterally.
-% ================================================================
-% Skew flux formulation for Eddy Induced Velocity :
-% ================================================================
-\section{Eddy induced advection formulated as a skew flux}
-\label{sec:skew-flux}
-
-\subsection{Continuous skew flux formulation}
-\label{sec:continuous-skew-flux}
-
-When Gent and McWilliams's [1990] diffusion is used, an additional advection term is added.
-The associated velocity is the so called eddy induced velocity,
-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,
-and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates.
-
-The eddy induced velocity is given by:
-\begin{subequations}
-  % \label{eq:eiv}
-  \begin{equation}
-    \label{eq:eiv_v}
-    \begin{split}
-      u^* & = - \frac{1}{e_{3}}\;          \partial_i\psi_1,  \\
-      v^* & = - \frac{1}{e_{3}}\;          \partial_j\psi_2,    \\
-      w^* & =    \frac{1}{e_{1}e_{2}}\; \left\{ \partial_i  \left( e_{2} \, \psi_1\right)
-        + \partial_j  \left( e_{1} \, \psi_2\right) \right\},
-    \end{split}
-  \end{equation}
-  where the streamfunctions $\psi_i$ are given by
-  \begin{equation}
-    \label{eq:eiv_psi}
-    \begin{split}
-      \psi_1 & = A_{e} \; \tilde{r}_1,   \\
-      \psi_2 & = A_{e} \; \tilde{r}_2,
-    \end{split}
-  \end{equation}
-\end{subequations}
-with $A_{e}$ the eddy induced velocity coefficient,
-and $\tilde{r}_1$ and $\tilde{r}_2$ the slopes between the iso-neutral and the geopotential surfaces.
-
-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,
-where \np{ln\_traldf\_triad} is set false.
-This allows us to take advantage of all the advection schemes offered for the tracers
-(see \autoref{sec:TRA_adv}) and not just a $2^{nd}$ order advection scheme.
-This is particularly useful for passive tracers where
-\emph{positivity} of the advection scheme is of paramount importance.
-
-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}.
-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,
-the tracer advective fluxes per unit area in $ijk$ space can be transformed as follows:
-\begin{flalign*}
-  \begin{split}
-    \textbf{F}_{\mathrm{eiv}}^T =
-    \begin{pmatrix}
-      {e_{2}\,e_{3}\;  u^*} \\
- 		{e_{1}\,e_{2}\; w^*}
-    \end{pmatrix}   \;   T
-    &=
-    \begin{pmatrix}
-      { - \partial_k \left( e_{2} \,\psi_1 \right) \; T \;} \\
- 		{+ \partial_i  \left( e_{2} \, \psi_1 \right) \; T \;}
-    \end{pmatrix} 			\\
-    &=
-    \begin{pmatrix}
-      { - \partial_k \left( e_{2} \, \psi_1  \; T \right) \;} \\
- 		{+ \partial_i  \left( e_{2} \,\psi_1 \; T \right) \;}
-    \end{pmatrix}
-    +
-    \begin{pmatrix}
-      {+ e_{2} \, \psi_1  \; \partial_k T} \\
- 		{ - e_{2} \, \psi_1  \; \partial_i  T}
-    \end{pmatrix}
-  \end{split}
-\end{flalign*}
-and since the eddy induced velocity field is non-divergent,
-we end up with the skew form of the eddy induced advective fluxes per unit area in $ijk$ space:
-\begin{equation}
-  \label{eq:eiv_skew_ijk}
-  \textbf{F}_\mathrm{eiv}^T =
-  \begin{pmatrix}
-    {+ e_{2} \, \psi_1  \; \partial_k T}   \\
-    { - e_{2} \, \psi_1  \; \partial_i  T}
-  \end{pmatrix}
-\end{equation}
-The total fluxes per unit physical area are then
-\begin{equation}
-  \label{eq:eiv_skew_physical}
-  \begin{split}
-    f^*_1 & = \frac{1}{e_{3}}\; \psi_1 \partial_k T   \\
-    f^*_2 & = \frac{1}{e_{3}}\; \psi_2 \partial_k T   \\
-    f^*_3 & =  -\frac{1}{e_{1}e_{2}}\; \left\{ e_{2} \psi_1 \partial_i T + e_{1} \psi_2 \partial_j T \right\}.
-\end{split}
-\end{equation}
-Note that \autoref{eq:eiv_skew_physical} takes the same form whatever the vertical coordinate,
-though of course the slopes $\tilde{r}_i$ which define the $\psi_i$ in \autoref{eq:eiv_psi} are relative to
-geopotentials.
-The tendency associated with eddy induced velocity is then simply the convergence of the fluxes
-(\autoref{eq:eiv_skew_ijk}, \autoref{eq:eiv_skew_physical}), so
-\[
-  % \label{eq:skew_eiv_conv}
-  \frac{\partial T}{\partial t}= -\frac{1}{e_1 \, e_2 \, e_3 }      \left[
-    \frac{\partial}{\partial i} \left( e_2 \psi_1 \partial_k T\right)
-    + \frac{\partial}{\partial j} \left( e_1  \;
-      \psi_2 \partial_k T\right)
-    -  \frac{\partial}{\partial k} \left( e_{2} \psi_1 \partial_i T
-      + e_{1} \psi_2 \partial_j T \right)  \right]
-\]
-It naturally conserves the tracer content, as it is expressed in flux form.
-Since it has the same divergence as the advective form it also preserves the tracer variance.
-
-\subsection{Discrete skew flux formulation}
-
-The skew fluxes in (\autoref{eq:eiv_skew_physical}, \autoref{eq:eiv_skew_ijk}),
-like the off-diagonal terms (\autoref{eq:i13c}, \autoref{eq:i31c}) of the small angle diffusion tensor,
-are best expressed in terms of the triad slopes, as in \autoref{fig:ISO_triad} and
-(\autoref{eq:i13}, \autoref{eq:i31});
-but now in terms of the triad slopes $\tilde{\mathbb{R}}$ relative to geopotentials instead of
-the $\mathbb{R}$ relative to coordinate surfaces.
-The discrete form of \autoref{eq:eiv_skew_ijk} using the slopes \autoref{eq:R} and
-defining $A_e$ at $T$-points is then given by:
-
-\begin{subequations}
-  % \label{eq:allskewflux}
-  \begin{flalign*}
-    % \label{eq:vect_skew_flux}
-    \vect{F}_{\mathrm{eiv}}(T) &\equiv    \sum_{\substack{i_p,\,k_p}}
-    \begin{pmatrix}
-      {_{i+1/2-i_p}^k {\mathbb{S}_u}_{i_p}^{k_p} } (T)      \\      \\
-      {_i^{k+1/2-k_p} {\mathbb{S}_w}_{i_p}^{k_p} } (T)      \\
-    \end{pmatrix},
-  \end{flalign*}
-  where the skew flux in the $i$-direction associated with a given triad is (\autoref{eq:latflux-triad},
-  \autoref{eq:triadfluxu}):
-  \begin{align}
-    \label{eq:skewfluxu}
-    _i^k {\mathbb{S}_u}_{i_p}^{k_p} (T) &= + \fractext{1}{4} {A_e}_i^k{
-                                          \:}\frac{{b_u}_{i+i_p}^k}{{e_{1u}}_{\,i + i_p}^{\,k}}
-                                          \ {_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}} \
-                                          \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }, \\
-    \intertext{
-    and \autoref{eq:triadfluxw} in the $k$-direction, changing the sign
-    to be consistent with \autoref{eq:eiv_skew_ijk}:
-    }
-    _i^k {\mathbb{S}_w}_{i_p}^{k_p} (T)
-                                        &= -\fractext{1}{4} {A_e}_i^k{\: }\frac{{b_u}_{i+i_p}^k}{{e_{3w}}_{\,i}^{\,k+k_p}}
-                                          {_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}}\frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }.\label{eq:skewfluxw}
-  \end{align}
-\end{subequations}
-
-Such a discretisation is consistent with the iso-neutral operator as it uses the same definition for the slopes.
-It also ensures the following two key properties.
-
-\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.
-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)$.
-For, following \autoref{subsec:variance} and \autoref{eq:dvar_iso_i},
-the associated horizontal skew-flux $_i^k{\mathbb{S}_u}_{i_p}^{k_p} (T)$ drives a net rate of change of variance,
-summed over the two $T$-points $i+i_p-\fractext{1}{2},k$ and $i+i_p+\fractext{1}{2},k$, of
-\begin{equation}
-  \label{eq:dvar_eiv_i}
-  _i^k{\mathbb{S}_u}_{i_p}^{k_p} (T)\,\delta_{i+ i_p}[T^k],
-\end{equation}
-while the associated vertical skew-flux gives a variance change summed over
-the $T$-points $i,k+k_p-\fractext{1}{2}$ (above) and $i,k+k_p+\fractext{1}{2}$ (below) of
-\begin{equation}
-  \label{eq:dvar_eiv_k}
-  _i^k{\mathbb{S}_w}_{i_p}^{k_p} (T) \,\delta_{k+ k_p}[T^i].
-\end{equation}
-Inspection of the definitions (\autoref{eq:skewfluxu}, \autoref{eq:skewfluxw}) shows that
-these two variance changes (\autoref{eq:dvar_eiv_i}, \autoref{eq:dvar_eiv_k}) sum to zero.
-Hence the two fluxes associated with each triad make no net contribution to the variance budget.
-
-\subsubsection{Reduction in gravitational PE}
-
-The vertical density flux associated with the vertical skew-flux always has the same sign as
-the vertical density gradient;
-thus, so long as the fluid is stable (the vertical density gradient is negative)
-the vertical density flux is negative (downward) and hence reduces the gravitational PE.
-
-For the change in gravitational PE driven by the $k$-flux is
-\begin{align}
-  \label{eq:vert_densityPE}
-  g {e_{3w}}_{\,i}^{\,k+k_p}{\mathbb{S}_w}_{i_p}^{k_p} (\rho)
-  &=g {e_{3w}}_{\,i}^{\,k+k_p}\left[-\alpha _i^k {\:}_i^k
-    {\mathbb{S}_w}_{i_p}^{k_p} (T) + \beta_i^k {\:}_i^k
-    {\mathbb{S}_w}_{i_p}^{k_p} (S) \right]. \notag \\
-  \intertext{Substituting  ${\:}_i^k {\mathbb{S}_w}_{i_p}^{k_p}$ from \autoref{eq:skewfluxw}, gives}
-  % and separating out
-  % $\rtriadt{R}=\rtriad{R} + \delta_{i+i_p}[z_T^k]$,
-  % gives two terms. The
-  % first $\rtriad{R}$ term (the only term for $z$-coordinates) is:
-  &=-\fractext{1}{4} g{A_e}_i^k{\: }{b_u}_{i+i_p}^k {_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}}
-    \frac{ -\alpha _i^k\delta_{i+ i_p}[T^k]+ \beta_i^k\delta_{i+ i_p}[S^k]} { {e_{1u}}_{\,i + i_p}^{\,k} } \notag \\
-  &=+\fractext{1}{4} g{A_e}_i^k{\: }{b_u}_{i+i_p}^k
-    \left({_i^k\mathbb{R}_{i_p}^{k_p}}+\frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}}\right) {_i^k\mathbb{R}_{i_p}^{k_p}}
-    \frac{-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]} {{e_{3w}}_{\,i}^{\,k+k_p}},
-\end{align}
-using the definition of the triad slope $\rtriad{R}$, \autoref{eq:R} to
-express $-\alpha _i^k\delta_{i+ i_p}[T^k]+\beta_i^k\delta_{i+ i_p}[S^k]$ in terms of
-$-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]$.
-
-Where the coordinates slope, the $i$-flux gives a PE change
-\begin{multline}
-  \label{eq:lat_densityPE}
-  g \delta_{i+i_p}[z_T^k]
-  \left[
-    -\alpha _i^k {\:}_i^k {\mathbb{S}_u}_{i_p}^{k_p} (T) + \beta_i^k {\:}_i^k {\mathbb{S}_u}_{i_p}^{k_p} (S)
-  \right] \\
-  = +\fractext{1}{4} g{A_e}_i^k{\: }{b_u}_{i+i_p}^k
-  \frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}}
-  \left({_i^k\mathbb{R}_{i_p}^{k_p}}+\frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}}\right)
-  \frac{-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]} {{e_{3w}}_{\,i}^{\,k+k_p}},
-\end{multline}
-(using \autoref{eq:skewfluxu}) and so the total PE change \autoref{eq:vert_densityPE} +
-\autoref{eq:lat_densityPE} associated with the triad fluxes is
-\begin{multline*}
-  % \label{eq:tot_densityPE}
-  g{e_{3w}}_{\,i}^{\,k+k_p}{\mathbb{S}_w}_{i_p}^{k_p} (\rho) +
-  g\delta_{i+i_p}[z_T^k] {\:}_i^k {\mathbb{S}_u}_{i_p}^{k_p} (\rho) \\
-  = +\fractext{1}{4} g{A_e}_i^k{\: }{b_u}_{i+i_p}^k
-  \left({_i^k\mathbb{R}_{i_p}^{k_p}}+\frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}}\right)^2
-  \frac{-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]} {{e_{3w}}_{\,i}^{\,k+k_p}}.
-\end{multline*}
-Where the fluid is stable, with $-\alpha_i^k \delta_{k+ k_p}[T^i]+
-\beta_i^k\delta_{k+ k_p}[S^i]<0$, this PE change is negative.
-
-\subsection{Treatment of the triads at the boundaries}
-\label{sec:skew_bdry}
-
-Triad slopes \rtriadt{R} used for the calculation of the eddy-induced skew-fluxes are masked at the boundaries 
-in exactly the same way as are the triad slopes \rtriad{R} used for the iso-neutral diffusive fluxes, 
-as described in \autoref{sec:iso_bdry} and \autoref{fig:bdry_triads}. 
-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. 
-The namelist parameter \np{ln\_botmix\_triad} has no effect on the eddy-induced skew-fluxes.
-
-\subsection{Limiting of the slopes within the interior}
-\label{sec:limitskew}
-
-Presently, the iso-neutral slopes $\tilde{r}_i$ relative to geopotentials are limited to be less than $1/100$, 
-exactly as in calculating the iso-neutral diffusion, \S \autoref{sec:limit}. 
-Each individual triad \rtriadt{R} is so limited.
-
-\subsection{Tapering within the surface mixed layer}
-\label{sec:taperskew}
-
-The slopes $\tilde{r}_i$ relative to geopotentials (and thus the individual triads \rtriadt{R}) 
-are always tapered linearly from their value immediately below the mixed layer to zero at the surface 
-\autoref{eq:rmtilde}, as described in \autoref{sec:lintaper}. 
-This is option (c) of \autoref{fig:eiv_slp}. 
-This linear tapering for the slopes used to calculate the eddy-induced fluxes is unaffected by 
-the value of \np{ln\_triad\_iso}.
-
-The justification for this linear slope tapering is that, for $A_e$ that is constant or varies only in
-the horizontal (the most commonly used options in \NEMO: see \autoref{sec:LDF_coef}),
-it is equivalent to a horizontal eiv (eddy-induced velocity) that is uniform within the mixed layer
-\autoref{eq:eiv_v}.
-This ensures that the eiv velocities do not restratify the mixed layer \citep{Treguier1997,Danabasoglu_al_2008}.
-Equivantly, in terms of the skew-flux formulation we use here,
-the linear slope tapering within the mixed-layer gives a linearly varying vertical flux,
-and so a tracer convergence uniform in depth
-(the horizontal flux convergence is relatively insignificant within the mixed-layer).
-
-\subsection{Streamfunction diagnostics}
-\label{sec:sfdiag}
-
-Where the namelist parameter \np{ln\_traldf\_gdia}\forcode{ = .true.},
-diagnosed mean eddy-induced velocities are output.
-Each time step, streamfunctions are calculated in the $i$-$k$ and $j$-$k$ planes at
-$uw$ (integer +1/2 $i$, integer $j$, integer +1/2 $k$) and $vw$ (integer $i$, integer +1/2 $j$, integer +1/2 $k$)
-points (see Table \autoref{tab:cell}) respectively.
-We follow \citep{Griffies_Bk04} and calculate the streamfunction at a given $uw$-point from
-the surrounding four triads according to:
-\[
-  % \label{eq:sfdiagi}
-  {\psi_1}_{i+1/2}^{k+1/2}={\fractext{1}{4}}\sum_{\substack{i_p,\,k_p}}
-  {A_e}_{i+1/2-i_p}^{k+1/2-k_p}\:\triadd{i+1/2-i_p}{k+1/2-k_p}{R}{i_p}{k_p}.
-\]
-The streamfunction $\psi_1$ is calculated similarly at $vw$ points.
-The eddy-induced velocities are then calculated from the straightforward discretisation of \autoref{eq:eiv_v}:
-\[
-  % \label{eq:eiv_v_discrete}
-  \begin{split}
-    {u^*}_{i+1/2}^{k} & = - \frac{1}{{e_{3u}}_{i}^{k}}\left({\psi_1}_{i+1/2}^{k+1/2}-{\psi_1}_{i+1/2}^{k+1/2}\right),   \\
-    {v^*}_{j+1/2}^{k} & = - \frac{1}{{e_{3v}}_{j}^{k}}\left({\psi_2}_{j+1/2}^{k+1/2}-{\psi_2}_{j+1/2}^{k+1/2}\right),   \\
-    {w^*}_{i,j}^{k+1/2} & =    \frac{1}{e_{1t}e_{2t}}\; \left\{
-      {e_{2u}}_{i+1/2}^{k+1/2} \,{\psi_1}_{i+1/2}^{k+1/2} -
-      {e_{2u}}_{i-1/2}^{k+1/2} \,{\psi_1}_{i-1/2}^{k+1/2} \right. + \\
-    \phantom{=} & \qquad\qquad\left. {e_{2v}}_{j+1/2}^{k+1/2} \,{\psi_2}_{j+1/2}^{k+1/2} - {e_{2v}}_{j-1/2}^{k+1/2} \,{\psi_2}_{j-1/2}^{k+1/2} \right\},
-  \end{split}
-\]
-
-\biblio
-
-\pindex
-
-\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_DOMAINcfg.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_DOMAINcfg.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_DOMAINcfg.tex	(revision 11831)
@@ -0,0 +1,534 @@
+\documentclass[../main/NEMO_manual]{subfiles}
+
+\begin{document}
+
+\chapter{A brief guide to the DOMAINcfg tool}
+\label{apdx:DOMCFG}
+
+%    {\em 4.0} & {\em Andrew Coward} & {\em Created at v4.0 from materials removed from chap\_DOM that are still relevant to the \forcode{DOMAINcfg} tool and which illustrate and explain the choices to be made by the user when setting up new domains }  \\
+
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
+
+This appendix briefly describes some of the options available in the
+\forcode{DOMAINcfg} tool mentioned in \autoref{chap:DOM}.
+
+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
+horizontal and vertical grids through additional namelist parameters. Explanations of
+these parameters are retained here for reference pending better documentation for
+\forcode{DOMAINcfg}. Please note that the namelist blocks named in this appendix refer to
+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
+of those described elsewhere in this manual.
+
+%% =================================================================================================
+\section{Choice of horizontal grid}
+\label{sec:DOMCFG_hor}
+
+\begin{listing}
+  \nlst{namdom_domcfg}
+  \caption{\forcode{&namdom_domcfg}}
+  \label{lst:namdom_domcfg}
+\end{listing}
+
+The user has three options available in defining a horizontal grid, which involve the
+namelist variable \np{jphgr_mesh}{jphgr\_mesh} of the \nam{dom}{dom} (\texttt{DOMAINcfg} variant only)
+namelist.
+
+\begin{description}
+ \item [{\np{jphgr_mesh}{jphgr\_mesh}=0}]  The most general curvilinear orthogonal grids.
+  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}{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}{jphgr\_mesh}=1, the grid (expressed in degrees) is regular in space,
+with grid sizes specified by parameters \np{ppe1_deg}{ppe1\_deg} and \np{ppe2_deg}{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}{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}{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}{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}{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}{jphgr\_mesh} = 2, 3, 5. The domain is either an $f$-plane (\np{jphgr_mesh}{jphgr\_mesh} = 2,
+Coriolis factor is constant) or a beta-plane (\np{jphgr_mesh}{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}{ppe1\_m} and \np{ppe2_m}{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}{ppglam0} is ignored. \np{ppgphi0}{ppgphi0} is used to set the reference
+latitude for computation of the Coriolis parameter. In the case of the beta plane,
+\np{ppgphi0}{ppgphi0} corresponds to the center of the domain. Finally, the special case
+\np{jphgr_mesh}{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).
+
+%% =================================================================================================
+\section{Vertical grid}
+\label{sec:DOMCFG_vert}
+
+%% =================================================================================================
+\subsection{Vertical reference coordinate}
+\label{sec:DOMCFG_zref}
+
+\begin{figure}[!tb]
+  \centering
+  \includegraphics[width=0.66\textwidth]{DOMCFG_zgr}
+  \caption[DOMAINcfg: default vertical mesh for ORCA2]{
+    Default vertical mesh for ORCA2: 30 ocean levels (L30).
+    Vertical level functions for (a) T-point depth and (b) the associated scale factor for
+    the $z$-coordinate case.}
+  \label{fig:DOMCFG_zgr}
+\end{figure}
+
+The reference coordinate transformation $z_0(k)$ defines the arrays $gdept_0$ and
+$gdepw_0$ for $t$- and $w$-points, respectively. See \autoref{sec:DOMCFG_sco} for the
+S-coordinate options.  As indicated on \autoref{fig:DOM_index_vert} \jp{jpk} is the number of
+$w$-levels.  $gdepw_0(1)$ is the ocean surface.  There are at most \jp{jpk}-1 $t$-points
+inside the ocean, the additional $t$-point at $jk = jpk$ is below the sea floor and is not
+used.  The vertical location of $w$- and $t$-levels is defined from the analytic
+expression of the depth $z_0(k)$ whose analytical derivative with respect to $k$ provides
+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 \nam{dom}{dom} namelist
+(\texttt{DOMAINcfg} variant).
+
+It is possible to define a simple regular vertical grid by giving zero stretching
+(\np[=0]{ppacr}{ppacr}).  In that case, the parameters \jp{jpk} (number of $w$-levels)
+and \np{pphmax}{pphmax} (total ocean depth in meters) fully define the grid.
+
+For climate-related studies it is often desirable to concentrate the vertical resolution
+near the ocean surface.  The following function is proposed as a standard for a
+$z$-coordinate (with either full or partial steps):
+\begin{gather}
+  \label{eq:DOMCFG_zgr_ana_1}
+    z_0  (k) = h_{sur} - h_0 \; k - \; h_1 \; \log  \big[ \cosh ((k - h_{th}) / h_{cr}) \big] \\
+    e_3^0(k) = \lt|    - h_0      -    h_1 \; \tanh \big[        (k - h_{th}) / h_{cr}  \big] \rt|
+\end{gather}
+
+where $k = 1$ to \jp{jpk} for $w$-levels and $k = 1$ to $k = 1$ for $t-$levels.  Such an
+expression allows us to define a nearly uniform vertical location of levels at the ocean
+top and bottom with a smooth hyperbolic tangent transition in between (\autoref{fig:DOMCFG_zgr}).
+
+A double hyperbolic tangent version (\np[=.true.]{ldbletanh}{ldbletanh}) is also available
+which permits finer control and is used, typically, to obtain a well resolved upper ocean
+without compromising on resolution at depth using a moderate number of levels.
+
+\begin{gather}
+  \label{eq:DOMCFG_zgr_ana_1b}
+    \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]
+    \end{split}
+\end{gather}
+\begin{gather}
+    \begin{split}
+    e_3^0(k) = \big|    - h_0    &-   h_1 \; \tanh \big[       (k - h_{th})  / h_{cr}   \big]  \\
+                                 &-  h2_1 \; \tanh \big[       (k - h2_{th}) / h2_{cr}  \big] \big|
+    \end{split}
+\end{gather}
+
+If the ice shelf cavities are opened (\np[=.true.]{ln_isfcav}{ln\_isfcav}), the definition
+of $z_0$ is the same.  However, definition of $e_3^0$ at $t$- and $w$-points is
+respectively changed to:
+\begin{equation}
+  \label{eq:DOMCFG_zgr_ana_2}
+  \begin{split}
+    e_3^T(k) &= z_W (k + 1) - z_W (k    ) \\
+    e_3^W(k) &= z_T (k    ) - z_T (k - 1)
+  \end{split}
+\end{equation}
+
+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.
+
+The most used vertical grid for ORCA2 has $10~m$ ($500~m$) resolution in the surface
+(bottom) layers and a depth which varies from 0 at the sea surface to a minimum of
+$-5000~m$.  This leads to the following conditions:
+
+\begin{equation}
+  \label{eq:DOMCFG_zgr_coef}
+  \begin{array}{ll}
+    e_3 (1   + 1/2) =  10. & z(1  ) =     0. \\
+    e_3 (jpk - 1/2) = 500. & z(jpk) = -5000.
+  \end{array}
+\end{equation}
+
+With the choice of the stretching $h_{cr} = 3$ and the number of levels \jp{jpk}~$= 31$,
+the four coefficients $h_{sur}$, $h_0$, $h_1$, and $h_{th}$ in
+\autoref{eq:DOMCFG_zgr_ana_2} have been determined such that \autoref{eq:DOMCFG_zgr_coef}
+is satisfied, through an optimisation procedure using a bisection method.
+For the first standard ORCA2 vertical grid this led to the following values:
+$h_{sur} = 4762.96$, $h_0 = 255.58, h_1 = 245.5813$, and $h_{th} = 21.43336$.
+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}{ppsur}, \np{ppa0}{ppa0}, \np{ppa1}{ppa1}, \np{ppkth}{ppkth} in \nam{cfg}{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}{ppsur}~$=$~\np{ppa0}{ppa0}~$=$~\np{ppa1}{ppa1}~$=
+999999$., in \nam{cfg}{cfg} namelist, and specifies instead the four following parameters:
+\begin{itemize}
+\item \np{ppacr}{ppacr}~$= h_{cr}$: stretching factor (nondimensional).
+  The larger \np{ppacr}{ppacr}, the smaller the stretching.
+  Values from $3$ to $10$ are usual.
+\item \np{ppkth}{ppkth}~$= h_{th}$: is approximately the model level at which maximum stretching occurs
+  (nondimensional, usually of order 1/2 or 2/3 of \jp{jpk})
+\item \np{ppdzmin}{ppdzmin}: minimum thickness for the top layer (in meters).
+\item \np{pphmax}{pphmax}: total depth of the ocean (meters).
+\end{itemize}
+
+As an example, for the $45$ layers used in the DRAKKAR configuration those parameters are:
+\jp{jpk}~$= 46$, \np{ppacr}{ppacr}~$= 9$, \np{ppkth}{ppkth}~$= 23.563$, \np{ppdzmin}{ppdzmin}~$= 6~m$,
+\np{pphmax}{pphmax}~$= 5750~m$.
+
+\begin{table}
+  \centering
+  \begin{tabular}{c||r|r|r|r}
+    \hline
+    \textbf{LEVEL} & \textbf{gdept\_1d} & \textbf{gdepw\_1d} & \textbf{e3t\_1d } & \textbf{e3w\_1d} \\
+    \hline
+    1              & \textbf{     5.00} &               0.00 & \textbf{   10.00} &            10.00 \\
+    \hline
+    2              & \textbf{    15.00} &              10.00 & \textbf{   10.00} &            10.00 \\
+    \hline
+    3              & \textbf{    25.00} &              20.00 & \textbf{   10.00} &            10.00 \\
+    \hline
+    4              & \textbf{    35.01} &              30.00 & \textbf{   10.01} &            10.00 \\
+    \hline
+    5              & \textbf{    45.01} &              40.01 & \textbf{   10.01} &            10.01 \\
+    \hline
+    6              & \textbf{    55.03} &              50.02 & \textbf{   10.02} &            10.02 \\
+    \hline
+    7              & \textbf{    65.06} &              60.04 & \textbf{   10.04} &            10.03 \\
+    \hline
+    8              & \textbf{    75.13} &              70.09 & \textbf{   10.09} &            10.06 \\
+    \hline
+    9              & \textbf{    85.25} &              80.18 & \textbf{   10.17} &            10.12 \\
+    \hline
+    10             & \textbf{    95.49} &              90.35 & \textbf{   10.33} &            10.24 \\
+    \hline
+    11             & \textbf{   105.97} &             100.69 & \textbf{   10.65} &            10.47 \\
+    \hline
+    12             & \textbf{   116.90} &             111.36 & \textbf{   11.27} &            10.91 \\
+    \hline
+    13             & \textbf{   128.70} &             122.65 & \textbf{   12.47} &            11.77 \\
+    \hline
+    14             & \textbf{   142.20} &             135.16 & \textbf{   14.78} &            13.43 \\
+    \hline
+    15             & \textbf{   158.96} &             150.03 & \textbf{   19.23} &            16.65 \\
+    \hline
+    16             & \textbf{   181.96} &             169.42 & \textbf{   27.66} &            22.78 \\
+    \hline
+    17             & \textbf{   216.65} &             197.37 & \textbf{   43.26} &            34.30 \\
+    \hline
+    18             & \textbf{   272.48} &             241.13 & \textbf{   70.88} &            55.21 \\
+    \hline
+    19             & \textbf{   364.30} &             312.74 & \textbf{  116.11} &            90.99 \\
+    \hline
+    20             & \textbf{   511.53} &             429.72 & \textbf{  181.55} &           146.43 \\
+    \hline
+    21             & \textbf{   732.20} &             611.89 & \textbf{  261.03} &           220.35 \\
+    \hline
+    22             & \textbf{  1033.22} &             872.87 & \textbf{  339.39} &           301.42 \\
+    \hline
+    23             & \textbf{  1405.70} &            1211.59 & \textbf{  402.26} &           373.31 \\
+    \hline
+    24             & \textbf{  1830.89} &            1612.98 & \textbf{  444.87} &           426.00 \\
+    \hline
+    25             & \textbf{  2289.77} &            2057.13 & \textbf{  470.55} &           459.47 \\
+    \hline
+    26             & \textbf{  2768.24} &            2527.22 & \textbf{  484.95} &           478.83 \\
+    \hline
+    27             & \textbf{  3257.48} &            3011.90 & \textbf{  492.70} &           489.44 \\
+    \hline
+    28             & \textbf{  3752.44} &            3504.46 & \textbf{  496.78} &           495.07 \\
+    \hline
+    29             & \textbf{  4250.40} &            4001.16 & \textbf{  498.90} &           498.02 \\
+    \hline
+    30             & \textbf{  4749.91} &            4500.02 & \textbf{  500.00} &           499.54 \\
+    \hline
+    31             & \textbf{  5250.23} &            5000.00 & \textbf{  500.56} &           500.33 \\
+    \hline
+  \end{tabular}
+  \caption[Default vertical mesh in $z$-coordinate for 30 layers ORCA2 configuration]{
+    Default vertical mesh in $z$-coordinate for 30 layers ORCA2 configuration as
+    computed from \autoref{eq:DOMCFG_zgr_ana_2} using
+    the coefficients given in \autoref{eq:DOMCFG_zgr_coef}}
+  \label{tab:DOMCFG_orca_zgr}
+\end{table}
+%%%YY
+%% % -------------------------------------------------------------------------------------------------------------
+%% %        Meter Bathymetry
+%% % -------------------------------------------------------------------------------------------------------------
+%% =================================================================================================
+\subsection{Model bathymetry}
+\label{subsec:DOMCFG_bathy}
+
+Three options are possible for defining the bathymetry, according to the namelist variable
+\np{nn_bathy}{nn\_bathy} (found in \nam{dom}{dom} namelist (\texttt{DOMAINCFG} variant) ):
+\begin{description}
+\item [{\np[=0]{nn_bathy}{nn\_bathy}}]: a flat-bottom domain is defined.
+  The total depth $z_w (jpk)$ is given by the coordinate transformation.
+  The domain can either be a closed basin or a periodic channel depending on the parameter \np{jperio}{jperio}.
+\item [{\np[=-1]{nn_bathy}{nn\_bathy}}]: a domain with a bump of topography one third of the domain width at the central latitude.
+  This is meant for the "EEL-R5" configuration, a periodic or open boundary channel with a seamount.
+\item [{\np[=1]{nn_bathy}{nn\_bathy}}]: read a bathymetry and ice shelf draft (if needed).
+  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 horizontal ocean mesh.
+  Defining the bathymetry also defines the coastline: where the bathymetry is zero,
+  no wet levels are defined (all levels are masked).
+
+  The \ifile{isfdraft\_meter} file (Netcdf format) provides the ice shelf draft (positive, in meters) at
+  each grid point of the model grid.
+  This file is only needed if \np[=.true.]{ln_isfcav}{ln\_isfcav}.
+  Defining the ice shelf draft will also define the ice shelf edge and the grounding line position.
+\end{description}
+
+%% =================================================================================================
+\subsection{Choice of vertical grid}
+\label{sec:DOMCFG_vgrd}
+
+After reading the bathymetry, the algorithm for vertical grid definition differs between the different options:
+\begin{description}
+\item [\forcode{ln_zco = .true.}] set a reference coordinate transformation $z_0(k)$, and set $z(i,j,k,t) = z_0(k)$ where $z_0(k)$ is the closest match to the depth at $(i,j)$.
+\item [\forcode{ln_zps = .true.}] set a reference coordinate transformation $z_0(k)$, and calculate the thickness of the deepest level at
+  each $(i,j)$ point using the bathymetry, to obtain the final three-dimensional depth and scale factor arrays.
+\item [\forcode{ln_sco = .true.}] smooth the bathymetry to fulfill the hydrostatic consistency criteria and
+  set the three-dimensional transformation.
+\item [\forcode{s-z and s-zps}] smooth the bathymetry to fulfill the hydrostatic consistency criteria and
+  set the three-dimensional transformation $z(i,j,k)$,
+  and possibly introduce masking of extra land points to better fit the original bathymetry file.
+\end{description}
+
+%% =================================================================================================
+\subsubsection[$Z$-coordinate with uniform thickness levels (\forcode{ln_zco})]{$Z$-coordinate with uniform thickness levels (\protect\np{ln_zco}{ln\_zco})}
+\label{subsec:DOMCFG_zco}
+
+With this option the model topography can be fully described by the reference vertical
+coordinate and a 2D integer field giving the number of wet levels at each location
+(\forcode{bathy_level}). The resulting match to the real topography is likely to be poor
+though (especially with thick, deep levels) and slopes poorly represented. This option is
+rarely used in modern simulations but it can be useful for testing purposes.
+
+%% =================================================================================================
+\subsubsection[$Z$-coordinate with partial step (\forcode{ln_zps})]{$Z$-coordinate with partial step (\protect\np{ln_zps}{ln\_zps})}
+\label{subsec:DOMCFG_zps}
+
+In $z$-coordinate partial step, the depths of the model levels are defined by the
+reference analytical function $z_0(k)$ as described in \autoref{sec:DOMCFG_zref},
+\textit{except} in the bottom layer.  The thickness of the bottom layer is allowed to vary
+as a function of geographical location $(\lambda,\varphi)$ to allow a better
+representation of the bathymetry, especially in the case of small slopes (where the
+bathymetry varies by less than one level thickness from one grid point to the next).  The
+reference layer thicknesses $e_{3t}^0$ have been defined in the absence of bathymetry.
+With partial steps, layers from 1 to \jp{jpk}-2 can have a thickness smaller than
+$e_{3t}(jk)$.
+
+The model deepest layer (\jp{jpk}-1) is allowed to have either a smaller or larger
+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 \nam{dom}{dom} namelist
+(\texttt{DOMAINCFG} variant), such as the maximum depth \np{pphmax}{pphmax} in partial steps.
+
+For example, with \np{pphmax}{pphmax}~$= 5750~m$ for the DRAKKAR 45 layer grid, the maximum ocean
+depth allowed is actually $6000~m$ (the default thickness $e_{3t}(jpk - 1)$ being
+$250~m$).  Two variables in the namdom namelist are used to define the partial step
+vertical grid.  The mimimum water thickness (in meters) allowed for a cell partially
+filled with bathymetry at level jk is the minimum of \np{rn_e3zps_min}{rn\_e3zps\_min} (thickness in
+meters, usually $20~m$) or $e_{3t}(jk)*$\np{rn_e3zps_rat}{rn\_e3zps\_rat} (a fraction, usually 10\%, of
+the default thickness $e_{3t}(jk)$).
+
+%% =================================================================================================
+\subsubsection[$S$-coordinate (\forcode{ln_sco})]{$S$-coordinate (\protect\np{ln_sco}{ln\_sco})}
+\label{sec:DOMCFG_sco}
+\begin{listing}
+  \nlst{namzgr_sco_domcfg}
+  \caption{\forcode{&namzgr_sco_domcfg}}
+  \label{lst:namzgr_sco_domcfg}
+\end{listing}
+Options are defined in \nam{zgr_sco}{zgr\_sco} (\texttt{DOMAINcfg} only).
+In $s$-coordinate (\np[=.true.]{ln_sco}{ln\_sco}), 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:
+
+\begin{align*}
+  % \label{eq:DOMCFG_sco_ana}
+  z(k)   &= h(i,j) \; z_0 (k) \\
+  e_3(k) &= h(i,j) \; z_0'(k)
+\end{align*}
+
+where $h$ is the depth of the last $w$-level ($z_0(k)$) defined at the $t$-point location in the horizontal and
+$z_0(k)$ is a function which varies from $0$ at the sea surface to $1$ at the ocean bottom.
+The depth field $h$ is not necessary the ocean depth,
+since a mixed step-like and bottom-following representation of the topography can be used
+(\autoref{fig:DOM_z_zps_s_sps}) or an envelop bathymetry can be defined (\autoref{fig:DOM_z_zps_s_sps}).
+The namelist parameter \np{rn_rmax}{rn\_rmax} determines the slope at which
+the terrain-following coordinate intersects the sea bed and becomes a pseudo z-coordinate.
+The coordinate can also be hybridised by specifying \np{rn_sbot_min}{rn\_sbot\_min} and \np{rn_sbot_max}{rn\_sbot\_max} as
+the minimum and maximum depths at which the terrain-following vertical coordinate is calculated.
+
+Options for stretching the coordinate are provided as examples,
+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
+(\np[=.false.]{ln_s_SH94}{ln\_s\_SH94} and \np[=.false.]{ln_s_SF12}{ln\_s\_SF12}).
+This uses a depth independent $\tanh$ function for the stretching \citep{madec.delecluse.ea_JPO96}:
+
+\[
+  z = s_{min} + C (s) (H - s_{min})
+  % \label{eq:DOMCFG_SH94_1}
+\]
+
+where $s_{min}$ is the depth at which the $s$-coordinate stretching starts and
+allows a $z$-coordinate to placed on top of the stretched coordinate,
+and $z$ is the depth (negative down from the asea surface).
+\begin{gather*}
+  s = - \frac{k}{n - 1} \quad \text{and} \quad 0 \leq k \leq n - 1
+  % \label{eq:DOMCFG_s}
+ \\
+ \label{eq:DOMCFG_sco_function}
+  C(s) = \frac{[\tanh(\theta \, (s + b)) - \tanh(\theta \, b)]}{2 \; \sinh(\theta)}
+\end{gather*}
+
+A stretching function,
+modified from the commonly used \citet{song.haidvogel_JCP94} stretching (\np[=.true.]{ln_s_SH94}{ln\_s\_SH94}),
+is also available and is more commonly used for shelf seas modelling:
+
+\[
+  C(s) =   (1 - b) \frac{\sinh(\theta s)}{\sinh(\theta)}
+         + b       \frac{\tanh \lt[ \theta \lt(s + \frac{1}{2} \rt) \rt] -   \tanh \lt( \frac{\theta}{2} \rt)}
+                        {                                                  2 \tanh \lt( \frac{\theta}{2} \rt)}
+ \label{eq:DOMCFG_SH94_2}
+\]
+
+\begin{figure}[!ht]
+  \centering
+  \includegraphics[width=0.66\textwidth]{DOMCFG_sco_function}
+  \caption[DOMAINcfg: examples of the stretching function applied to a seamount]{
+    Examples of the stretching function applied to a seamount;
+    from left to right: surface, surface and bottom, and bottom intensified resolutions}
+  \label{fig:DOMCFG_sco_function}
+\end{figure}
+
+where $H_c$ is the critical depth (\np{rn_hc}{rn\_hc}) at which the coordinate transitions from pure $\sigma$ to
+the stretched coordinate, and $\theta$ (\np{rn_theta}{rn\_theta}) and $b$ (\np{rn_bb}{rn\_bb}) are the surface and
+bottom control parameters such that $0 \leqslant \theta \leqslant 20$, and $0 \leqslant b \leqslant 1$.
+$b$ has been designed to allow surface and/or bottom increase of the vertical resolution
+(\autoref{fig:DOMCFG_sco_function}).
+
+Another example has been provided at version 3.5 (\np{ln_s_SF12}{ln\_s\_SF12}) that allows a fixed surface resolution in
+an analytical terrain-following stretching \citet{siddorn.furner_OM13}.
+In this case the a stretching function $\gamma$ is defined such that:
+
+\begin{equation}
+  z = - \gamma h \quad \text{with} \quad 0 \leq \gamma \leq 1
+  % \label{eq:DOMCFG_z}
+\end{equation}
+
+The function is defined with respect to $\sigma$, the unstretched terrain-following coordinate:
+
+\begin{gather*}
+  % \label{eq:DOMCFG_gamma_deriv}
+  \gamma =   A \lt( \sigma   - \frac{1}{2} (\sigma^2     + f (\sigma)) \rt)
+           + B \lt( \sigma^3 - f           (\sigma) \rt) + f (\sigma)       \\
+  \intertext{Where:}
+ \label{eq:DOMCFG_gamma}
+  f(\sigma) = (\alpha + 2) \sigma^{\alpha + 1} - (\alpha + 1) \sigma^{\alpha + 2}
+  \quad \text{and} \quad \sigma = \frac{k}{n - 1}
+\end{gather*}
+
+This gives an analytical stretching of $\sigma$ that is solvable in $A$ and $B$ as a function of
+the user prescribed stretching parameter $\alpha$ (\np{rn_alpha}{rn\_alpha}) that stretches towards
+the surface ($\alpha > 1.0$) or the bottom ($\alpha < 1.0$) and
+user prescribed surface (\np{rn_zs}{rn\_zs}) and bottom depths.
+The bottom cell depth in this example is given as a function of water depth:
+
+\[
+  % \label{eq:DOMCFG_zb}
+  Z_b = h a + b
+\]
+
+where the namelist parameters \np{rn_zb_a}{rn\_zb\_a} and \np{rn_zb_b}{rn\_zb\_b} are $a$ and $b$ respectively.
+
+\begin{figure}[!ht]
+  \centering
+  \includegraphics[width=0.66\textwidth]{DOMCFG_compare_coordinates_surface}
+  \caption[DOMAINcfg: comparison of $s$- and $z$-coordinate]{
+    A comparison of the \citet{song.haidvogel_JCP94} $S$-coordinate (solid lines),
+    a 50 level $Z$-coordinate (contoured surfaces) and
+    the \citet{siddorn.furner_OM13} $S$-coordinate (dashed lines) in the surface $100~m$ for
+    a idealised bathymetry that goes from $50~m$ to $5500~m$ depth.
+    For clarity every third coordinate surface is shown.}
+  \label{fig:DOMCFG_fig_compare_coordinates_surface}
+\end{figure}
+ % >>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+This gives a smooth analytical stretching in computational space that is constrained to
+given specified surface and bottom grid cell thicknesses in real space.
+This is not to be confused with the hybrid schemes that
+superimpose geopotential coordinates on terrain following coordinates thus
+creating a non-analytical vertical coordinate that
+therefore may suffer from large gradients in the vertical resolutions.
+This stretching is less straightforward to implement than the \citet{song.haidvogel_JCP94} stretching,
+but has the advantage of resolving diurnal processes in deep water and has generally flatter slopes.
+
+As with the \citet{song.haidvogel_JCP94} stretching the stretch is only applied at depths greater than
+the critical depth $h_c$.
+In this example two options are available in depths shallower than $h_c$,
+with pure sigma being applied if the \np{ln_sigcrit}{ln\_sigcrit} is true and pure z-coordinates if it is false
+(the z-coordinate being equal to the depths of the stretched coordinate at $h_c$).
+
+Minimising the horizontal slope of the vertical coordinate is important in terrain-following systems as
+large slopes lead to hydrostatic consistency.
+A hydrostatic consistency parameter diagnostic following \citet{haney_JPO91} has been implemented,
+and is output as part of the model mesh file at the start of the run.
+
+%% =================================================================================================
+\subsubsection[\zstar- or \sstar-coordinate (\forcode{ln_linssh})]{\zstar- or \sstar-coordinate (\protect\np{ln_linssh}{ln\_linssh})}
+\label{subsec:DOMCFG_zgr_star}
+
+This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO\ web site.
+
+\subinc{\input{../../global/epilogue}}
+
+\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_algos.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_algos.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_algos.tex	(revision 11831)
@@ -0,0 +1,825 @@
+\documentclass[../main/NEMO_manual]{subfiles}
+
+\begin{document}
+
+\chapter{Note on some algorithms}
+\label{apdx:ALGOS}
+
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
+
+This appendix some on going consideration on algorithms used or planned to be used in \NEMO.
+
+%% =================================================================================================
+\section{Upstream Biased Scheme (UBS) (\protect\np[=.true.]{ln_traadv_ubs}{ln\_traadv\_ubs})}
+\label{sec:ALGOS_tra_adv_ubs}
+
+The UBS advection scheme is an upstream biased third order scheme based on
+an upstream-biased parabolic interpolation.
+It is also known as Cell Averaged QUICK scheme (Quadratic Upstream Interpolation for Convective Kinematics).
+For example, in the $i$-direction:
+\begin{equation}
+  \label{eq:ALGOS_tra_adv_ubs2}
+  \tau_u^{ubs} = \left\{
+	 \begin{aligned}
+      & \tau_u^{cen4} + \frac{1}{12} \,\tau"_i	   & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\
+      & \tau_u^{cen4} - \frac{1}{12} \,\tau"_{i+1} & \quad \text{if }\ u_{i+1/2}       <       0
+    \end{aligned}
+  \right.
+\end{equation}
+or equivalently, the advective flux is
+\begin{equation}
+  \label{eq:ALGOS_tra_adv_ubs2}
+  U_{i+1/2} \ \tau_u^{ubs}
+  =U_{i+1/2} \ \overline{ T_i - \frac{1}{6}\,\tau"_i }^{\,i+1/2}
+  - \frac{1}{2}\, |U|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i]
+\end{equation}
+where $U_{i+1/2} = e_{1u}\,e_{3u}\,u_{i+1/2}$ and
+$\tau "_i =\delta_i \left[ {\delta_{i+1/2} \left[ \tau \right]} \right]$.
+By choosing this expression for $\tau "$ we consider a fourth order approximation of $\partial_i^2$ with
+a constant i-grid spacing ($\Delta i=1$).
+
+Alternative choice: introduce the scale factors:
+$\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
+\citep{shchepetkin.mcwilliams_OM05}.
+The overall performance of the advection scheme is similar to that reported in \cite{farrow.stevens_JPO95}.
+It is a relatively good compromise between accuracy and smoothness.
+It is not a \emph{positive} scheme meaning false extrema are permitted but
+the amplitude of such are significantly reduced over the centred second order method.
+Nevertheless it is not recommended to apply it to a passive tracer that requires positivity.
+
+The intrinsic diffusion of UBS makes its use risky in the vertical direction where
+the control of artificial diapycnal fluxes is of paramount importance.
+It has therefore been preferred to evaluate the vertical flux using the TVD scheme when
+\np[=.true.]{ln_traadv_ubs}{ln\_traadv\_ubs}.
+
+For stability reasons, in \autoref{eq:TRA_adv_ubs}, the first term which corresponds to
+a second order centred scheme is evaluated using the \textit{now} velocity (centred in time) while
+the second term which is the diffusive part of the scheme, is evaluated using the \textit{before} velocity
+(forward in time).
+This is discussed by \citet{webb.de-cuevas.ea_JAOT98} in the context of the Quick advection scheme.
+UBS and QUICK schemes only differ by one coefficient.
+Substituting 1/6 with 1/8 in (\autoref{eq:TRA_adv_ubs}) leads to the QUICK advection scheme \citep{webb.de-cuevas.ea_JAOT98}.
+This option is not available through a namelist parameter, since the 1/6 coefficient is hard coded.
+Nevertheless it is quite easy to make the substitution in \mdl{traadv\_ubs} module and obtain a QUICK scheme.
+
+NB 1: When a high vertical resolution $O(1m)$ is used, the model stability can be controlled by vertical advection
+(not vertical diffusion which is usually solved using an implicit scheme).
+Computer time can be saved by using a time-splitting technique on vertical advection.
+This possibility have been implemented and validated in ORCA05-L301.
+It is not currently offered in the current reference version.
+
+NB 2: In a forthcoming release four options will be proposed for the vertical component used in the UBS scheme.
+$\tau_w^{ubs}$ will be evaluated using either \textit{(a)} a centered $2^{nd}$ order scheme,
+or \textit{(b)} a TVD scheme, or \textit{(c)} an interpolation based on conservative parabolic splines following
+\citet{shchepetkin.mcwilliams_OM05} implementation of UBS in ROMS, or \textit{(d)} an UBS.
+The $3^{rd}$ case has dispersion properties similar to an eight-order accurate conventional scheme.
+
+NB 3: It is straight forward to rewrite \autoref{eq:TRA_adv_ubs} as follows:
+\begin{equation}
+  \label{eq:ALGOS_tra_adv_ubs2}
+  \tau_u^{ubs} = \left\{
+	 \begin{aligned}
+      & \tau_u^{cen4} + \frac{1}{12} \tau"_i		& \quad \text{if }\ u_{i+1/2} \geqslant 0 \\
+      & \tau_u^{cen4} - \frac{1}{12} \tau"_{i+1}	& \quad \text{if }\ u_{i+1/2}       <       0
+    \end{aligned}
+  \right.
+\end{equation}
+or equivalently
+\begin{equation}
+  \label{eq:ALGOS_tra_adv_ubs2}
+  \begin{split}
+    e_{2u} e_{3u}\,u_{i+1/2} \ \tau_u^{ubs}
+    &= e_{2u} e_{3u}\,u_{i+1/2} \ \overline{ T - \frac{1}{6}\,\tau"_i }^{\,i+1/2} \\
+    & - \frac{1}{2} e_{2u} e_{3u}\,|u|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i]
+  \end{split}
+\end{equation}
+\autoref{eq:TRA_adv_ubs2} has several advantages.
+First it clearly evidences that the UBS scheme is based on the fourth order scheme to which
+is added an upstream biased diffusive term.
+Second, this emphasises that the $4^{th}$ order part have to be evaluated at \emph{now} time step,
+not only the $2^{th}$ order part as stated above using \autoref{eq:TRA_adv_ubs}.
+Third, the diffusive term is in fact a biharmonic operator with a eddy coefficient which
+is simply proportional to the velocity.
+
+laplacian diffusion:
+\begin{equation}
+  \label{eq:ALGOS_tra_ldf_lap}
+  \begin{split}
+    D_T^{lT} =\frac{1}{e_{1T} \; e_{2T}\;  e_{3T} } &\left[ {\quad \delta_i
+        \left[ {A_u^{lT} \frac{e_{2u} e_{3u} }{e_{1u} }\;\delta_{i+1/2}
+            \left[ T \right]} \right]} \right. \\
+    &\ \left. {+\; \delta_j \left[
+          {A_v^{lT} \left( {\frac{e_{1v} e_{3v} }{e_{2v} }\;\delta_{j+1/2} \left[ T
+                \right]} \right)} \right]\quad } \right]
+  \end{split}
+\end{equation}
+
+bilaplacian:
+\begin{equation}
+  \label{eq:ALGOS_tra_ldf_lap}
+  \begin{split}
+    D_T^{lT} =&-\frac{1}{e_{1T} \; e_{2T}\;  e_{3T}} \\
+    & \delta_i \left[  \sqrt{A_u^{lT}}\ \frac{e_{2u}\,e_{3u}}{e_{1u}}\;\delta_{i+1/2}
+      \left[ \frac{1}{e_{1T}\,e_{2T}\, e_{3T}}
+        \delta_i \left[ \sqrt{A_u^{lT}}\ \frac{e_{2u}\,e_{3u}}{e_{1u}}\;\delta_{i+1/2}
+          [T] \right] \right] \right]
+  \end{split}
+\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|\,}$
+it comes:
+\begin{equation}
+  \label{eq:ALGOS_tra_ldf_lap}
+  \begin{split}
+    D_T^{lT} =&-\frac{1}{12}\,\frac{1}{e_{1T} \; e_{2T}\;  e_{3T}} \\
+    & \delta_i \left[ e_{2u}\,e_{3u}\,\sqrt{ e_{1u}\,|u|\,}\;\delta_{i+1/2}
+      \left[ \frac{1}{e_{1T}\,e_{2T}\, e_{3T}}
+        \delta_i \left[ e_{2u}\,e_{3u}\,\sqrt{ e_{1u}\,|u|\,}\;\delta_{i+1/2}
+          [T] \right] \right] \right]
+  \end{split}
+\end{equation}
+if the velocity is uniform (\ie\ $|u|=cst$) then the diffusive flux is
+\begin{equation}
+  \label{eq:ALGOS_tra_ldf_lap}
+  \begin{split}
+    F_u^{lT} = - \frac{1}{12}
+    e_{2u}\,e_{3u}\,|u| \;\sqrt{ e_{1u}}\,\delta_{i+1/2}
+    \left[ \frac{1}{e_{1T}\,e_{2T}\, e_{3T}}
+      \delta_i \left[ e_{2u}\,e_{3u}\,\sqrt{ e_{1u}}\:\delta_{i+1/2}
+        [T] \right] \right]
+  \end{split}
+\end{equation}
+beurk....  reverte the logic: starting from the diffusive part of the advective flux it comes:
+
+\begin{equation}
+  \label{eq:ALGOS_tra_adv_ubs2}
+  \begin{split}
+    F_u^{lT} &= - \frac{1}{2} e_{2u} e_{3u}\,|u|_{i+1/2} \;\frac{1}{6} \;\delta_{i+1/2}[\tau"_i]
+  \end{split}
+\end{equation}
+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]$
+
+sol 1 coefficient at T-point ( add $e_{1u}$ and $e_{1T}$ on both side of first $\delta$):
+\begin{equation}
+  \label{eq:ALGOS_tra_adv_ubs2}
+  \begin{split}
+    F_u^{lT} &= - \frac{1}{12} \frac{e_{2u} e_{3u}}{e_{1u}}\;\delta_{i+1/2}\left[ \frac{e_{1T}^3\,|u|}{e_{1T}e_{2T}\,e_{3T}}\,\delta_i \left[ \frac{e_{2u} e_{3u} }{e_{1u} } \delta_{i+1/2}[\tau] \right] \right]
+  \end{split}
+\end{equation}
+which leads to ${A_T^{lT}}^2 = \frac{1}{12} {e_{1T}}^3\ \overline{|u|}^{\,i+1/2}$
+
+sol 2 coefficient at u-point: split $|u|$ into $\sqrt{|u|}$ and $e_{1T}$ into $\sqrt{e_{1u}}$
+\begin{equation}
+  \label{eq:ALGOS_tra_adv_ubs2}
+  \begin{split}
+    F_u^{lT} &= - \frac{1}{12} {e_{1u}}^1 \sqrt{e_{1u}|u|} \frac{e_{2u} e_{3u}}{e_{1u}}\;\delta_{i+1/2}\left[ \frac{1}{e_{2T}\,e_{3T}}\,\delta_i \left[ \sqrt{e_{1u}|u|} \frac{e_{2u} e_{3u} }{e_{1u} } \delta_{i+1/2}[\tau] \right] \right] \\
+    &= - \frac{1}{12} e_{1u} \sqrt{e_{1u}|u|\,} \frac{e_{2u} e_{3u}}{e_{1u}}\;\delta_{i+1/2}\left[ \frac{1}{e_{1T}\,e_{2T}\,e_{3T}}\,\delta_i \left[ e_{1u} \sqrt{e_{1u}|u|\,} \frac{e_{2u} e_{3u} }{e_{1u}} \delta_{i+1/2}[\tau] \right] \right]
+  \end{split}
+\end{equation}
+which leads to ${A_u^{lT}} = \frac{1}{12} {e_{1u}}^3\ |u|$
+
+%% =================================================================================================
+\section{Leapfrog energetic}
+\label{sec:ALGOS_LF}
+
+We adopt the following semi-discrete notation for time derivative.
+Given the values of a variable $q$ at successive time step,
+the time derivation and averaging operators at the mid time step are:
+\[
+  % \label{eq:ALGOS_dt_mt}
+  \begin{split}
+    \delta_{t+\rdt/2} [q]     &=  \  \ \,   q^{t+\rdt}  - q^{t}		\\
+    \overline q^{\,t+\rdt/2} &= \left\{ q^{t+\rdt} + q^{t} \right\} \; / \; 2
+  \end{split}
+\]
+As for space operator,
+the adjoint of the derivation and averaging time operators are $\delta_t^*=\delta_{t+\rdt/2}$ and
+$\overline{\cdot}^{\,t\,*}= \overline{\cdot}^{\,t+\Delta/2}$, respectively.
+
+The Leap-frog time stepping given by \autoref{eq:DOM_nxt} can be defined as:
+\[
+  % \label{eq:ALGOS_LF}
+  \frac{\partial q}{\partial t}
+  \equiv \frac{1}{\rdt} \overline{ \delta_{t+\rdt/2}[q]}^{\,t}
+  =         \frac{q^{t+\rdt}-q^{t-\rdt}}{2\rdt}
+\]
+Note that \autoref{chap:LF} shows that the leapfrog time step is $\rdt$,
+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,
+\[
+  % \label{eq:ALGOS_Energy}
+  \int_{t_0}^{t_1} {q\, \frac{\partial q}{\partial t} \;dt}
+  =\int_{t_0}^{t_1} {\frac{1}{2}\, \frac{\partial q^2}{\partial t} \;dt}
+  =  \frac{1}{2} \left( {q_{t_1}}^2 - {q_{t_0}}^2 \right) ,
+\]
+is satisfied in discrete form.
+Indeed,
+\[
+  \begin{split}
+    \int_{t_0}^{t_1} {q\, \frac{\partial q}{\partial t} \;dt}
+    &\equiv \sum\limits_{0}^{N}
+    {\frac{1}{\rdt} q^t \ \overline{ \delta_{t+\rdt/2}[q]}^{\,t} \ \rdt}
+    \equiv \sum\limits_{0}^{N}  { q^t \ \overline{ \delta_{t+\rdt/2}[q]}^{\,t} } \\
+    &\equiv \sum\limits_{0}^{N}  { \overline{q}^{\,t+\Delta/2}{ \delta_{t+\rdt/2}[q]}}
+    \equiv \sum\limits_{0}^{N}  { \frac{1}{2} \delta_{t+\rdt/2}[q^2] }\\
+    &\equiv \sum\limits_{0}^{N}  { \frac{1}{2} \delta_{t+\rdt/2}[q^2] }
+    \equiv \frac{1}{2} \left( {q_{t_1}}^2 - {q_{t_0}}^2 \right)
+  \end{split}
+\]
+NB here pb of boundary condition when applying the adjoint!
+In space, setting to 0 the quantity in land area is sufficient to get rid of the boundary condition
+(equivalently of the boundary value of the integration by part).
+In time this boundary condition is not physical and \textbf{add something here!!!}
+
+%% =================================================================================================
+\section{Lateral diffusion operator}
+
+%% =================================================================================================
+\subsection{Griffies iso-neutral diffusion operator}
+
+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
+is not necessary in the middle of vertical velocity points, see \autoref{fig:DOM_zgr_e3}).
+
+In the formulation \autoref{eq:TRA_ldf_iso} introduced in 1995 in OPA, the ancestor of \NEMO,
+the off-diagonal terms of the small angle diffusion tensor contain several double spatial averages of a gradient,
+for example $\overline{\overline{\delta_k \cdot}}^{\,i,k}$.
+It is apparent that the combination of a $k$ average and a $k$ derivative of the tracer allows for
+the presence of grid point oscillation structures that will be invisible to the operator.
+These structures are \textit{computational modes}.
+They will not be damped by the iso-neutral operator, and even possibly amplified by it.
+In other word, the operator applied to a tracer does not warranties the decrease of its global average variance.
+To circumvent this, we have introduced a smoothing of the slopes of the iso-neutral surfaces
+(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.
+\citep{griffies.gnanadesikan.ea_JPO98} introduce a different way to discretise the off-diagonal terms that
+nicely solve the problem.
+The idea is to get rid of combinations of an averaged in one direction combined with
+a derivative in the same direction by considering triads.
+For example in the (\textbf{i},\textbf{k}) plane, the four triads are defined at the $(i,k)$ $T$-point as follows:
+\begin{equation}
+  \label{eq:ALGOS_Gf_triads}
+  _i^k \mathbb{T}_{i_p}^{k_p} (T)
+  = \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k}  \  A_i^k  	\left(
+    \frac{ \delta_{i + i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
+    -\ {_i^k \mathbb{R}_{i_p}^{k_p}} \ \frac{ \delta_{k+k_p} [T^i] }{ {e_{3w}}_{\,i}^{\,k+k_p} }
+  \right)
+\end{equation}
+where the indices $i_p$ and $k_p$ define the four triads and take the following value:
+$i_p = -1/2$ or $1/2$ and $k_p = -1/2$ or $1/2$,
+$b_u= e_{1u}\,e_{2u}\,e_{3u}$ is the volume of $u$-cells,
+$A_i^k$ is the lateral eddy diffusivity coefficient defined at $T$-point,
+and $_i^k \mathbb{R}_{i_p}^{k_p}$ is the slope associated with each triad:
+\begin{equation}
+  \label{eq:ALGOS_Gf_slopes}
+  _i^k \mathbb{R}_{i_p}^{k_p}
+  =\frac{ {e_{3w}}_{\,i}^{\,k+k_p}} { {e_{1u}}_{\,i+i_p}^{\,k}} \ \frac
+  {\left(\alpha / \beta \right)_i^k  \ \delta_{i + i_p}[T^k] - \delta_{i + i_p}[S^k] }
+  {\left(\alpha / \beta \right)_i^k  \ \delta_{k+k_p}[T^i ] - \delta_{k+k_p}[S^i ] }
+\end{equation}
+Note that in \autoref{eq:ALGOS_Gf_slopes} we use the ratio $\alpha / \beta$ instead of
+multiplying the temperature derivative by $\alpha$ and the salinity derivative by $\beta$.
+This is more efficient as the ratio $\alpha / \beta$ can to be evaluated directly.
+
+Note that in \autoref{eq:ALGOS_Gf_triads}, we chose to use ${b_u}_{\,i+i_p}^{\,k}$ instead of ${b_{uw}}_{\,i+i_p}^{\,k+k_p}$.
+This choice has been motivated by the decrease of tracer variance and
+the presence of partial cell at the ocean bottom (see \autoref{subsec:ALGOS_Gf_operator}).
+
+\begin{figure}[!ht]
+  \centering
+  %\includegraphics[width=0.66\textwidth]{ALGOS_ISO_triad}
+  \caption[Triads used in the Griffies's like iso-neutral diffision scheme for
+    $u$- and $w$-components)]{
+    Triads used in the Griffies's like iso-neutral diffision scheme for
+    $u$-component (upper panel) and $w$-component (lower panel).}
+  \label{fig:ALGOS_ISO_triad}
+\end{figure}
+
+The four iso-neutral fluxes associated with the triads are defined at $T$-point.
+They take the following expression:
+\begin{flalign*}
+  % \label{eq:ALGOS_Gf_fluxes}
+  \begin{split}
+    {_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (T)
+    &= \ \; \qquad  \quad    { _i^k \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{1u}}_{\,i+i_p}^{\,k}}    \\
+    {_i^k {\mathbb{F}_w}_{i_p}^{k_p} } (T)
+    &=  -\; { _i^k \mathbb{R}_{i_p}^{k_p} }
+    \ \; { _i^k \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{3w}}_{\,i}^{\,k+k_p}}
+  \end{split}
+\end{flalign*}
+
+The resulting iso-neutral fluxes at $u$- and $w$-points are then given by
+the sum of the fluxes that cross the $u$- and $w$-face (\autoref{fig:TRIADS_ISO_triad}):
+\begin{flalign}
+  \label{eq:ALGOS_iso_flux}
+  \textbf{F}_{iso}(T)
+  &\equiv  \sum_{\substack{i_p,\,k_p}}
+  \begin{pmatrix}
+    {_{i+1/2-i_p}^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) \\ \\
+    {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p} } (T)
+  \end{pmatrix}
+  \notag \\
+  &  \notag \\
+  &\equiv  \sum_{\substack{i_p,\,k_p}}
+  \begin{pmatrix}
+    && { _{i+1/2-i_p}^k \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{1u}}_{\,i+1/2}^{\,k} } \\ \\
+    & -\; { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} }
+    & {_i^{k+1/2-k_p} \mathbb{T}_{i_p}^{k_p} }(T) \;\ / \ { {e_{3w}}_{\,i}^{\,k+1/2} }
+  \end{pmatrix}      % \\
+  % &\\
+  % &\equiv  \sum_{\substack{i_p,\,k_p}}
+  % \begin{pmatrix}
+  %   \qquad  \qquad  \qquad
+  %   \frac{1}{ {e_{1u}}_{\,i+1/2}^{\,k} }  \ \;
+  %   { _{i+1/2-i_p}^k \mathbb{T}_{i_p}^{k_p} }(T)\\
+  %   \\
+  %   -\frac{1}{ {e_{3w}}_{\,i}^{\,k+1/2} }  \ \;
+  %   { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} } \ \;
+  %   {_i^{k+1/2-k_p} \mathbb{T}_{i_p}^{k_p} }(T)\\
+  % \end{pmatrix}
+\end{flalign}
+resulting in a iso-neutral diffusion tendency on temperature given by
+the divergence of the sum of all the four triad fluxes:
+\begin{equation}
+  \label{eq:ALGOS_Gf_operator}
+  D_l^T = \frac{1}{b_T}  \sum_{\substack{i_p,\,k_p}} \left\{
+    \delta_{i} \left[{_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \right]
+    + \delta_{k} \left[ {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right]   \right\}
+\end{equation}
+where $b_T= e_{1T}\,e_{2T}\,e_{3T}$ is the volume of $T$-cells.
+
+This expression of the iso-neutral diffusion has been chosen in order to satisfy the following six properties:
+\begin{description}
+\item [Horizontal diffusion] The discretization of the diffusion operator recovers the traditional five-point Laplacian in the limit of flat iso-neutral direction:
+  \[
+    % \label{eq:ALGOS_Gf_property1a}
+    D_l^T = \frac{1}{b_T}  \ \delta_{i}
+    \left[ \frac{e_{2u}\,e_{3u}}{e_{1u}} \; \overline{A}^{\,i} \; \delta_{i+1/2}[T] \right]
+    \qquad  \text{when} \quad
+    { _i^k \mathbb{R}_{i_p}^{k_p} }=0
+  \]
+\item [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)
+  appears only tracer values associated with a single water column.
+  This is of paramount importance since it means that
+  the implicit in time algorithm for solving the vertical diffusion equation can be used to evaluate this term.
+  It is a necessity since the vertical eddy diffusivity associated with this term,
+  \[
+	 \sum_{\substack{i_p, \,k_p}} \left\{
+		A_i^k \; \left(_i^k \mathbb{R}_{i_p}^{k_p}\right)^2
+    \right\}
+  \]
+  can be quite large.
+\item [Pure iso-neutral operator] The iso-neutral flux of locally referenced potential density is zero, \ie
+  \begin{align*}
+    % \label{eq:ALGOS_Gf_property2}
+    \begin{matrix}
+      &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} (\rho)}
+      &=    &\alpha_i^k   &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (T)
+      &- \ \;  \beta _i^k    &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (S) & = \ 0   \\
+      &{_i^k {\mathbb{F}_w}_{i_p}^{k_p} (\rho)}
+      &=    &\alpha_i^k   &{_i^k {\mathbb{F}_w}_{i_p}^{k_p} } (T)
+      &- \  \; \beta _i^k    &{_i^k {\mathbb{F}_w}_{i_p}^{k_p} } (S)  &= \ 0
+    \end{matrix}
+  \end{align*}
+  This result is trivially obtained using the \autoref{eq:ALGOS_Gf_triads} applied to $T$ and $S$ and
+  the definition of the triads' slopes \autoref{eq:ALGOS_Gf_slopes}.
+\item [Conservation of tracer] The iso-neutral diffusion term conserve the total tracer content, \ie
+  \[
+    % \label{eq:ALGOS_Gf_property1}
+    \sum_{i,j,k} \left\{ D_l^T \ b_T \right\} = 0
+  \]
+This property is trivially satisfied since the iso-neutral diffusive operator is written in flux form.
+\item [Decrease of tracer variance] The iso-neutral diffusion term does not increase the total tracer variance, \ie
+  \[
+    % \label{eq:ALGOS_Gf_property1}
+    \sum_{i,j,k} \left\{ T \ D_l^T \ b_T \right\} \leq 0
+  \]
+The property is demonstrated in the \autoref{subsec:ALGOS_Gf_operator}.
+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.
+It therfore ensures that, when the diffusivity coefficient is large enough,
+the field on which it is applied become free of grid-point noise.
+\item [Self-adjoint operator] The iso-neutral diffusion operator is self-adjoint, \ie
+  \[
+    % \label{eq:ALGOS_Gf_property1}
+    \sum_{i,j,k} \left\{ S \ D_l^T \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\}
+  \]
+In other word, there is no needs to develop a specific routine from the adjoint of this operator.
+We just have to apply the same routine.
+This properties can be demonstrated quite easily in a similar way the "non increase of tracer variance" property
+has been proved (see \autoref{apdx:ALGOS_Gf_operator}).
+\end{description}
+
+%% =================================================================================================
+\subsection{Eddy induced velocity and skew flux formulation}
+
+When Gent and McWilliams [1990] diffusion is used (\key{traldf\_eiv} defined),
+an additional advection term is added.
+The associated velocity is the so called eddy induced velocity,
+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:LDF_slp_geo} is used in $z$-coordinate,
+and the sum \autoref{eq:LDF_slp_geo} + \autoref{eq:LDF_slp_iso} in $z^*$ or $s$-coordinates.
+
+The eddy induced velocity is given by:
+\begin{equation}
+  \label{eq:ALGOS_eiv_v}
+  \begin{split}
+    u^* & = - \frac{1}{e_2\,e_{3}}          \;\partial_k \left( e_2 \, A_e \; r_i  \right)
+    = - \frac{1}{e_3}                     \;\partial_k \left(           A_e \; r_i  \right)            \\
+    v^* & = - \frac{1}{e_1\,e_3}\;             \partial_k \left( e_1 \, A_e \; r_j  \right)
+    = - \frac{1}{e_3}                     \;\partial_k \left(           A_e \; r_j  \right)             \\
+    w^* & =    \frac{1}{e_1\,e_2}\; \left\{   \partial_i  \left( e_2 \, A_e \; r_i  \right)
+      + \partial_j  \left( e_1 \, A_e \;r_j   \right) \right\}
+  \end{split}
+\end{equation}
+where $A_{e}$ is the eddy induced velocity coefficient,
+and $r_i$ and $r_j$ the slopes between the iso-neutral and the geopotential surfaces.
+\cmtgm{Wrong: to be modified with 2 2D streamfunctions}
+In other words, the eddy induced velocity can be derived from a vector streamfuntion, $\phi$,
+which is given by $\phi = A_e\,\textbf{r}$ as $\textbf{U}^*  = \textbf{k} \times \nabla \phi$.
+
+A traditional way to implement this additional advection is to add it to the eulerian velocity prior to
+compute the tracer advection.
+This allows us to take advantage of all the advection schemes offered for the tracers
+(see \autoref{sec:TRA_adv}) and not just a $2^{nd}$ order advection scheme.
+This is particularly useful for passive tracers where
+\emph{positivity} of the advection scheme is of paramount importance.
+% give here the expression using the triads. It is different from the one given in \autoref{eq:LDF_eiv}
+% see just below a copy of this equation:
+%\begin{equation} \label{eq:ALGOS_ldfeiv}
+%\begin{split}
+% u^* & = \frac{1}{e_{2u}e_{3u}}\; \delta_k \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right]\\
+% v^* & = \frac{1}{e_{1u}e_{3v}}\; \delta_k \left[e_{1v} \, A_{vw}^{eiv} \; \overline{r_{2w}}^{\,j+1/2} \right]\\
+%w^* & = \frac{1}{e_{1w}e_{2w}}\; \left\{ \delta_i \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right] + %\delta_j \left[e_{1v} \, A_{vw}^{eiv} \; \overline{r_{2w}}^{\,j+1/2} \right] \right\} \\
+%\end{split}
+%\end{equation}
+\[
+  % \label{eq:ALGOS_eiv_vd}
+  \textbf{F}_{eiv}^T   \equiv   \left(
+    \begin{aligned}
+      \sum_{\substack{i_p,\,k_p}} &
+      +{e_{2u}}_{i+1/2-i_p}^{k}                                  \ \ {A_{e}}_{i+1/2-i_p}^{k}
+      \ \ \ { _{i+1/2-i_p}^k \mathbb{R}_{i_p}^{k_p} }    \ \ \delta_{k+k_p}[T_{i+1/2-i_p}] \\ \\
+      \sum_{\substack{i_p,\,k_p}} &
+      - {e_{2u}}_i^{k+1/2-k_p}                                      \ {A_{e}}_i^{k+1/2-k_p}
+      \ \ { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} }    \ \delta_{i+i_p}[T^{k+1/2-k_p}]
+    \end{aligned}
+  \right)
+\]
+
+\citep{griffies_JPO98} introduces another way to implement the eddy induced advection, the so-called skew form.
+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, the tracer advective fluxes can be transformed as follows:
+\begin{flalign*}
+  \begin{split}
+    \textbf{F}_{eiv}^T =
+    \begin{pmatrix}
+      {e_{2}\,e_{3}\;  u^*} 	 	\\
+ 		{e_{1}\,e_{2}\; w^*}
+    \end{pmatrix}
+    \;   T
+    &=
+    \begin{pmatrix}
+      { - \partial_k \left( e_{2} \, A_{e} \; r_i \right) \; T \;} 	 	\\
+ 		{+ \partial_i  \left( e_{2} \, A_{e} \; r_i \right) \; T \;}
+    \end{pmatrix}
+    \\
+    &=
+    \begin{pmatrix}
+      { - \partial_k \left( e_{2} \, A_{e} \; r_i  \; T \right) \;}  \\
+ 		{+ \partial_i  \left( e_{2} \, A_{e} \; r_i  \; T \right) \;}
+    \end{pmatrix}
+    +
+    \begin{pmatrix}
+      {+ e_{2} \, A_{e} \; r_i  \; \partial_k T}  \\
+ 		{ - e_{2} \, A_{e} \; r_i  \; \partial_i  T}
+    \end{pmatrix}
+  \end{split}
+\end{flalign*}
+and since the eddy induces velocity field is no-divergent,
+we end up with the skew form of the eddy induced advective fluxes:
+\begin{equation}
+  \label{eq:ALGOS_eiv_skew_continuous}
+  \textbf{F}_{eiv}^T =
+  \begin{pmatrix}
+    {+ e_{2} \, A_{e} \; r_i  \; \partial_k T}   \\
+    { - e_{2} \, A_{e} \; r_i  \; \partial_i  T}
+  \end{pmatrix}
+\end{equation}
+The tendency associated with eddy induced velocity is then simply the divergence of
+the \autoref{eq:ALGOS_eiv_skew_continuous} fluxes.
+It naturally conserves the tracer content, as it is expressed in flux form and,
+as the advective form, it preserves the tracer variance.
+Another interesting property of \autoref{eq:ALGOS_eiv_skew_continuous} form is that when $A=A_e$,
+a simplification occurs in the sum of the iso-neutral diffusion and eddy induced velocity terms:
+\begin{flalign*}
+  % \label{eq:ALGOS_eiv_skew+eiv_continuous}
+  \textbf{F}_{iso}^T + \textbf{F}_{eiv}^T &=
+  \begin{pmatrix}
+    + \frac{e_2\,e_3\,}{e_1} A \;\partial_i T -  e_2 \, A \; r_i                              \;\partial_k T   \\
+    -  e_2 \, A_{e} \; r_i           \;\partial_i T + \frac{e_1\,e_2}{e_3} \, A \; r_i^2 \;\partial_k T
+  \end{pmatrix}
+  +
+  \begin{pmatrix}
+    {+ e_{2} \, A_{e} \; r_i  \; \partial_k T}   \\
+    { - e_{2} \, A_{e} \; r_i  \; \partial_i  T}
+  \end{pmatrix}
+  \\
+  &=
+  \begin{pmatrix}
+    + \frac{e_2\,e_3\,}{e_1} A \;\partial_i T    \\
+    -  2\; e_2 \, A_{e} \; r_i      \;\partial_i T + \frac{e_1\,e_2}{e_3} \, A \; r_i^2 \;\partial_k T
+  \end{pmatrix}
+\end{flalign*}
+The horizontal component reduces to the one use for an horizontal laplacian operator and
+the vertical one keeps the same complexity, but not more.
+This property has been used to reduce the computational time \citep{griffies_JPO98},
+but it is not of practical use as usually $A \neq A_e$.
+Nevertheless this property can be used to choose a discret form of \autoref{eq:ALGOS_eiv_skew_continuous} which
+is consistent with the iso-neutral operator \autoref{eq:ALGOS_Gf_operator}.
+Using the slopes \autoref{eq:ALGOS_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}
+  \label{eq:ALGOS_eiv_skew}
+  \textbf{F}_{eiv}^T   \equiv   \frac{1}{4} \left(
+    \begin{aligned}
+      \sum_{\substack{i_p,\,k_p}} &
+      +{e_{2u}}_{i+1/2-i_p}^{k}                                  \ \ {A_{e}}_{i+1/2-i_p}^{k}
+      \ \ \ { _{i+1/2-i_p}^k \mathbb{R}_{i_p}^{k_p} }    \ \ \delta_{k+k_p}[T_{i+1/2-i_p}] \\ \\
+      \sum_{\substack{i_p,\,k_p}} &
+      - {e_{2u}}_i^{k+1/2-k_p}                                      \ {A_{e}}_i^{k+1/2-k_p}
+      \ \ { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} }    \ \delta_{i+i_p}[T^{k+1/2-k_p}]
+    \end{aligned}
+  \right)
+\end{equation}
+Note that \autoref{eq:ALGOS_eiv_skew} is valid in $z$-coordinate with or without partial cells.
+In $z^*$ or $s$-coordinate, the slope between the level and the geopotential surfaces must be added to
+$\mathbb{R}$ for the discret form to be exact.
+
+Such a choice of discretisation is consistent with the iso-neutral operator as
+it uses the same definition for the slopes.
+It also ensures the conservation of the tracer variance (see \autoref{subsec:ALGOS_eiv_skew}),
+\ie\ it does not include a diffusive component but is a "pure" advection term.
+
+%% =================================================================================================
+\subsection{Discrete invariants of the iso-neutral diffrusion}
+\label{subsec:ALGOS_Gf_operator}
+
+Demonstration of the decrease of the tracer variance in the (\textbf{i},\textbf{j}) plane.
+
+This part will be moved in an Appendix.
+
+The continuous property to be demonstrated is:
+\[
+  \int_D  D_l^T \; T \;dv   \leq 0
+\]
+The discrete form of its left hand side is obtained using \autoref{eq:TRIADS_iso_flux}
+
+\begin{align*}
+  &\int_D  D_l^T \; T \;dv \equiv  \sum_{i,k} \left\{ T \ D_l^T \ b_T \right\}    \\
+  &\equiv + \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
+    \delta_{i} \left[{_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \right]
+    + \delta_{k} \left[ {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right]  \ T \right\}    \\
+  &\equiv  - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
+    {_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \ \delta_{i+1/2} [T]
+    + {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}}  \ \delta_{k+1/2} [T]   \right\}      \\
+  &\equiv -\sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
+    \frac{ _{i+1/2-i_p}^k \mathbb{T}_{i_p}^{k_p} (T) }{ {e_{1u}}_{\,i+1/2}^{\,k} }  \ \delta_{i+1/2} [T]
+    - { _i^{k+1/2-k_p} \mathbb{R}_{i_p}^{k_p} } \ \;
+    \frac{ _i^{k+1/2-k_p} \mathbb{T}_{i_p}^{k_p} (T) }{ {e_{3w}}_{\,i}^{\,k+1/2}  } \ \delta_{k+1/2} [T]
+    \right\}      \\
+    %
+  \allowdisplaybreaks
+  \intertext{ Expending the summation on $i_p$ and $k_p$, it becomes:}
+  %
+  &\equiv -\sum_{i,k}
+    \begin{Bmatrix}
+      &\ \ \Bigl(  { _{i+1}^{k} \mathbb{T}_{-1/2}^{-1/2} (T) }
+      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
+      & -\ \ {_{i}^{k+1} \mathbb{R}_{-1/2}^{-1/2}}
+      &      {_{i}^{k+1} \mathbb{T}_{-1/2}^{-1/2} (T) }
+      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)
+      & \\
+      &+\Bigl( \ \;\; { _i^k \mathbb{T}_{+1/2}^{-1/2} (T) }
+      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
+      & -\ \ {_i^{k+1} \mathbb{R}_{+1/2}^{-1/2}}
+      & { _i^{k+1} \mathbb{T}_{+1/2}^{-1/2} (T) }
+      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}      \Bigr)
+      & \\
+      &+\Bigl(  { _{i+1}^{k} \mathbb{T}_{-1/2}^{+1/2} (T) }
+      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
+      & -\ \ \ \;\;{_{i}^{k} \mathbb{R}_{-1/2}^{+1/2}}
+      &      \ \;\;{_{i}^{k} \mathbb{T}_{-1/2}^{+1/2} (T) }
+      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)
+      & \\
+      &+\Bigl( \ \;\; { _{i}^{k} \mathbb{T}_{+1/2}^{+1/2} (T) }
+      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
+      & -\ \ \ \;\;{_{i}^{k} \mathbb{R}_{+1/2}^{+1/2}}
+      &      \ \;\;{_{i}^{k} \mathbb{T}_{+1/2}^{+1/2} (T) }
+      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)   \\
+    \end{Bmatrix}
+    %
+  \allowdisplaybreaks
+  \intertext{
+  The summation is done over all $i$ and $k$ indices,
+  it is therefore possible to introduce a shift of $-1$ either in $i$ or $k$ direction in order to
+  regroup all the terms of the summation by triad at a ($i$,$k$) point.
+  In other words, we regroup all the terms in the neighbourhood that contain a triad at the same ($i$,$k$) indices.
+  It becomes:
+  }
+  %
+  &\equiv -\sum_{i,k}
+    \begin{Bmatrix}
+      &\ \ \Bigl(  {_i^k \mathbb{T}_{-1/2}^{-1/2} (T) }
+      &\frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}}
+      & -\ \ {_i^k \mathbb{R}_{-1/2}^{-1/2}}
+      &      {_i^k \mathbb{T}_{-1/2}^{-1/2} (T) }
+      &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}}     \Bigr)
+      & \\
+      &+\Bigl(  { _i^k \mathbb{T}_{+1/2}^{-1/2} (T) }
+      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
+      & -\ \ {_i^k \mathbb{R}_{+1/2}^{-1/2}}
+      &      { _i^k \mathbb{T}_{+1/2}^{-1/2} (T) }
+      &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}}      \Bigr)
+      & \\
+      &+\Bigl(  {_i^k \mathbb{T}_{-1/2}^{+1/2} (T) }
+      &\frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}}
+      & -\ \ {_i^k \mathbb{R}_{-1/2}^{+1/2}}
+      &      {_i^k \mathbb{T}_{-1/2}^{+1/2} (T) }
+      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)
+      & \\
+      &+\Bigl( { _i^k \mathbb{T}_{+1/2}^{+1/2} (T) }
+      &\frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
+      & -\ \ {_i^k \mathbb{R}_{+1/2}^{+1/2}}
+      &      {_i^k \mathbb{T}_{+1/2}^{+1/2} (T) }
+      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)   \\
+    \end{Bmatrix}   \\
+    %
+  \allowdisplaybreaks
+  \intertext{
+  Then outing in factor the triad in each of the four terms of the summation and
+  substituting the triads by their expression given in \autoref{eq:ALGOS_Gf_triads}.
+  It becomes:
+  }
+  %
+  &\equiv -\sum_{i,k}
+    \begin{Bmatrix}
+      &\ \ \Bigl(  \frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}}
+      & -\ \ {_i^k \mathbb{R}_{-1/2}^{-1/2}}
+      &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}}     \Bigr)^2
+      & \frac{1}{4} \ {b_u}_{\,i-1/2}^{\,k}  \  A_i^k
+      & \\
+      &+\Bigl(  \frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
+      & -\ \ {_i^k \mathbb{R}_{+1/2}^{-1/2}}
+      &\frac{ \delta_{k-1/2} [T] }{{e_{3w}}_{\,i}^{\,k-1/2}}      \Bigr)^2
+      & \frac{1}{4} \ {b_u}_{\,i+1/2}^{\,k}  \  A_i^k
+      & \\
+      &+\Bigl(  \frac{ \delta_{i -1/2} [T] }{{e_{1u} }_{\,i-1/2}^{\,k}}
+      & -\ \ {_i^k \mathbb{R}_{-1/2}^{+1/2}}
+      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)^2
+      & \frac{1}{4} \ {b_u}_{\,i-1/2}^{\,k}  \  A_i^k
+      & \\
+      &+\Bigl( \frac{ \delta_{i +1/2} [T] }{{e_{1u} }_{\,i+1/2}^{\,k}}
+      & -\ \ {_i^k \mathbb{R}_{+1/2}^{+1/2}}
+      &\frac{ \delta_{k+1/2} [T] }{{e_{3w}}_{\,i}^{\,k+1/2}}     \Bigr)^2
+      & \frac{1}{4} \ {b_u}_{\,i+1/2}^{\,k}  \  A_i^k      \\
+    \end{Bmatrix}
+  \\
+  & \\
+  %
+  &\equiv - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
+    \begin{matrix}
+      &\Bigl( \frac{ \delta_{i +i_p} [T] }{{e_{1u} }_{\,i+i_p}^{\,k}}
+      & -\ \ {_i^k \mathbb{R}_{i_p}^{k_p}}
+      &\frac{ \delta_{k+k_p} [T] }{{e_{3w}}_{\,i}^{\,k+k_p}}     \Bigr)^2
+      & \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k}  \  A_i^k   \ \
+    \end{matrix}
+        \right\}
+        \quad   \leq 0
+\end{align*}
+The last inequality is obviously obtained as we succeed in obtaining a negative summation of square quantities.
+
+Note that, if instead of multiplying $D_l^T$ by $T$, we were using another tracer field, let say $S$,
+then the previous demonstration would have let to:
+\begin{align*}
+  \int_D  S \; D_l^T  \;dv &\equiv  \sum_{i,k} \left\{ S \ D_l^T \ b_T \right\}    \\
+                           &\equiv - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
+                             \left( \frac{ \delta_{i +i_p} [S] }{{e_{1u} }_{\,i+i_p}^{\,k}}
+                             - {_i^k \mathbb{R}_{i_p}^{k_p}}
+                             \frac{ \delta_{k+k_p} [S] }{{e_{3w}}_{\,i}^{\,k+k_p}}     \right)  \right. \\
+                           & \qquad \qquad \qquad \ \left.
+                             \left( \frac{ \delta_{i +i_p} [T] }{{e_{1u} }_{\,i+i_p}^{\,k}}
+                             - {_i^k \mathbb{R}_{i_p}^{k_p}}
+                             \frac{ \delta_{k+k_p} [T] }{{e_{3w}}_{\,i}^{\,k+k_p}}     \right)
+                             \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k}  \  A_i^k   \
+                             \right\}
+                             %
+                             \allowdisplaybreaks
+                             \intertext{
+                             which, by applying the same operation as before but in reverse order, leads to:
+                             }
+                             %
+                           &\equiv  \sum_{i,k} \left\{ D_l^S \ T \ b_T \right\}
+\end{align*}
+This means that the iso-neutral operator is self-adjoint.
+There is no need to develop a specific to obtain it.
+
+%% =================================================================================================
+\subsection{Discrete invariants of the skew flux formulation}
+\label{subsec:ALGOS_eiv_skew}
+
+Demonstration for the conservation of the tracer variance in the (\textbf{i},\textbf{j}) plane.
+
+This have to be moved in an Appendix.
+
+The continuous property to be demonstrated is:
+\begin{align*}
+  \int_D \nabla \cdot \textbf{F}_{eiv}(T) \; T \;dv  \equiv 0
+\end{align*}
+The discrete form of its left hand side is obtained using \autoref{eq:ALGOS_eiv_skew}
+\begin{align*}
+  \sum\limits_{i,k} \sum_{\substack{i_p,\,k_p}}  \Biggl\{   \;\;
+  \delta_i  &\left[
+              {e_{2u}}_{i+i_p+1/2}^{k}                                  \;\ \ {A_{e}}_{i+i_p+1/2}^{k}
+              \ \ \ { _{i+i_p+1/2}^k \mathbb{R}_{-i_p}^{k_p} }   \quad \delta_{k+k_p}[T_{i+i_p+1/2}]
+              \right] \; T_i^k      \\
+  - \delta_k &\left[
+               {e_{2u}}_i^{k+k_p+1/2}                                     \ \ {A_{e}}_i^{k+k_p+1/2}
+               \ \ { _i^{k+k_p+1/2} \mathbb{R}_{i_p}^{-k_p} }   \ \ \delta_{i+i_p}[T^{k+k_p+1/2}]
+               \right] \; T_i^k      \         \Biggr\}
+\end{align*}
+apply the adjoint of delta operator, it becomes
+\begin{align*}
+  \sum\limits_{i,k} \sum_{\substack{i_p,\,k_p}}  \Biggl\{   \;\;
+  &\left(
+    {e_{2u}}_{i+i_p+1/2}^{k}                                  \;\ \ {A_{e}}_{i+i_p+1/2}^{k}
+    \ \ \ { _{i+i_p+1/2}^k \mathbb{R}_{-i_p}^{k_p} }   \quad \delta_{k+k_p}[T_{i+i_p+1/2}]
+    \right) \; \delta_{i+1/2}[T^{k}]      \\
+  - &\left(
+      {e_{2u}}_i^{k+k_p+1/2}                                     \ \ {A_{e}}_i^{k+k_p+1/2}
+      \ \ { _i^{k+k_p+1/2} \mathbb{R}_{i_p}^{-k_p} }   \ \ \delta_{i+i_p}[T^{k+k_p+1/2}]
+      \right) \; \delta_{k+1/2}[T_{i}]       \         \Biggr\}
+\end{align*}
+Expending the summation on $i_p$ and $k_p$, it becomes:
+\begin{align*}
+  \begin{matrix}
+    &\sum\limits_{i,k}   \Bigl\{
+    &+{e_{2u}}_{i+1}^{k}                             &{A_{e}}_{i+1    }^{k}
+    &\ {_{i+1}^k \mathbb{R}_{- 1/2}^{-1/2}} &\delta_{k-1/2}[T_{i+1}]    &\delta_{i+1/2}[T^{k}]   &\\
+    &&+{e_{2u}}_i^{k\ \ \ \:}                            &{A_{e}}_{i}^{k\ \ \ \:}
+    &\ {\ \ \;_i^k \mathbb{R}_{+1/2}^{-1/2}}  &\delta_{k-1/2}[T_{i\ \ \ \;}]  &\delta_{i+1/2}[T^{k}] &\\
+    &&+{e_{2u}}_{i+1}^{k}                             &{A_{e}}_{i+1    }^{k}
+    &\ {_{i+1}^k \mathbb{R}_{- 1/2}^{+1/2}} &\delta_{k+1/2}[T_{i+1}]     &\delta_{i+1/2}[T^{k}] &\\
+    &&+{e_{2u}}_i^{k\ \ \ \:}                            &{A_{e}}_{i}^{k\ \ \ \:}
+    &\ {\ \ \;_i^k \mathbb{R}_{+1/2}^{+1/2}} &\delta_{k+1/2}[T_{i\ \ \ \;}] &\delta_{i+1/2}[T^{k}] &\\
+    %
+    &&-{e_{2u}}_i^{k+1}                                &{A_{e}}_i^{k+1}
+    &{_i^{k+1} \mathbb{R}_{-1/2}^{- 1/2}}   &\delta_{i-1/2}[T^{k+1}]      &\delta_{k+1/2}[T_{i}] &\\
+    &&-{e_{2u}}_i^{k\ \ \ \:}                             &{A_{e}}_i^{k\ \ \ \:}
+    &{\ \ \;_i^k  \mathbb{R}_{-1/2}^{+1/2}}   &\delta_{i-1/2}[T^{k\ \ \ \:}]  &\delta_{k+1/2}[T_{i}] &\\
+    &&-{e_{2u}}_i^{k+1    }                             &{A_{e}}_i^{k+1}
+    &{_i^{k+1} \mathbb{R}_{+1/2}^{- 1/2}}   &\delta_{i+1/2}[T^{k+1}]      &\delta_{k+1/2}[T_{i}] &\\
+    &&-{e_{2u}}_i^{k\ \ \ \:}                             &{A_{e}}_i^{k\ \ \ \:}
+    &{\ \ \;_i^k  \mathbb{R}_{+1/2}^{+1/2}}   &\delta_{i+1/2}[T^{k\ \ \ \:}]  &\delta_{k+1/2}[T_{i}]
+    &\Bigr\}  \\
+  \end{matrix}
+\end{align*}
+The two terms associated with the triad ${_i^k \mathbb{R}_{+1/2}^{+1/2}}$ are the same but of opposite signs,
+they cancel out.
+Exactly the same thing occurs for the triad ${_i^k \mathbb{R}_{-1/2}^{-1/2}}$.
+The two terms associated with the triad ${_i^k \mathbb{R}_{+1/2}^{-1/2}}$ are the same but both of opposite signs and
+shifted by 1 in $k$ direction.
+When summing over $k$ they cancel out with the neighbouring grid points.
+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.
+
+\subinc{\input{../../global/epilogue}}
+
+\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_diff_opers.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_diff_opers.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_diff_opers.tex	(revision 11831)
@@ -0,0 +1,425 @@
+\documentclass[../main/NEMO_manual]{subfiles}
+
+\begin{document}
+
+\chapter{Diffusive Operators}
+\label{apdx:DIFFOPERS}
+
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
+
+%% =================================================================================================
+\section{Horizontal/Vertical $2^{nd}$ order tracer diffusive operators}
+\label{sec:DIFFOPERS_1}
+
+%% =================================================================================================
+\subsubsection*{In z-coordinates}
+
+In $z$-coordinates, the horizontal/vertical second order tracer diffusion operator is given by:
+\begin{align}
+  \label{eq:DIFFOPERS_1}
+  &D^T = \frac{1}{e_1 \, e_2}      \left[
+    \left. \frac{\partial}{\partial i} \left( 	\frac{e_2}{e_1}A^{lT} \;\left. \frac{\partial T}{\partial i} \right|_z   \right)   \right|_z      \right.
+    \left.
+    + \left. \frac{\partial}{\partial j} \left(  \frac{e_1}{e_2}A^{lT} \;\left. \frac{\partial T}{\partial j} \right|_z   \right)   \right|_z      \right]
+    + \frac{\partial }{\partial z}\left( {A^{vT} \;\frac{\partial T}{\partial z}} \right)
+\end{align}
+
+%% =================================================================================================
+\subsubsection*{In generalized vertical coordinates}
+
+In $s$-coordinates, we defined the slopes of $s$-surfaces, $\sigma_1$ and $\sigma_2$ by \autoref{eq:SCOORD_s_slope} and
+the vertical/horizontal ratio of diffusion coefficient by $\epsilon = A^{vT} / A^{lT}$.
+The diffusion operator is given by:
+
+\begin{equation}
+  \label{eq:DIFFOPERS_2}
+  D^T = \left. \nabla \right|_s \cdot
+  \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_s T  \right] \\
+  \;\;\text{where} \;\Re =\left( {{
+        \begin{array}{*{20}c}
+          1 \hfill & 0 \hfill & {-\sigma_1 } \hfill \\
+          0 \hfill & 1 \hfill & {-\sigma_2 } \hfill \\
+          {-\sigma_1 } \hfill & {-\sigma_2 } \hfill & {\varepsilon +\sigma_1
+                                                      ^2+\sigma_2 ^2} \hfill \\
+        \end{array}
+      }} \right)
+\end{equation}
+or in expanded form:
+\begin{align*}
+  {
+  \begin{array}{*{20}l}
+    D^T= \frac{1}{e_1\,e_2\,e_3 } & \left\{ \quad \quad \frac{\partial }{\partial i}  \left. \left[  e_2\,e_3 \, A^{lT}
+                               \left( \  \frac{1}{e_1}\; \left. \frac{\partial T}{\partial i} \right|_s
+                                       -\frac{\sigma_1 }{e_3 } \; \frac{\partial T}{\partial s} \right) \right]  \right|_s  \right. \\
+        &  \quad \  +   \            \left.   \frac{\partial }{\partial j}  \left. \left[  e_1\,e_3 \, A^{lT}
+                               \left( \ \frac{1}{e_2 }\; \left. \frac{\partial T}{\partial j} \right|_s
+                                       -\frac{\sigma_2 }{e_3 } \; \frac{\partial T}{\partial s} \right) \right]  \right|_s  \right. \\
+        &  \quad \  +   \           \left.  e_1\,e_2\, \frac{\partial }{\partial s}  \left[ A^{lT} \; \left(
+	                  -\frac{\sigma_1 }{e_1 } \; \left. \frac{\partial T}{\partial i} \right|_s
+	                  -\frac{\sigma_2 }{e_2 } \; \left. \frac{\partial T}{\partial j} \right|_s
+                          +\left( \varepsilon +\sigma_1^2+\sigma_2 ^2 \right) \; \frac{1}{e_3 } \; \frac{\partial T}{\partial s} \right) \; \right] \;  \right\} .
+  \end{array}
+          }
+\end{align*}
+
+\autoref{eq:DIFFOPERS_2} is obtained from \autoref{eq:DIFFOPERS_1} without any additional assumption.
+Indeed, for the special case $k=z$ and thus $e_3 =1$,
+we introduce an arbitrary vertical coordinate $s = s (i,j,z)$ as in \autoref{apdx:SCOORD} and
+use \autoref{eq:SCOORD_s_slope} and \autoref{eq:SCOORD_s_chain_rule1}.
+Since no cross horizontal derivative $\partial _i \partial _j $ appears in \autoref{eq:DIFFOPERS_1},
+the ($i$,$z$) and ($j$,$z$) planes are independent.
+The derivation can then be demonstrated for the ($i$,$z$)~$\to$~($j$,$s$) transformation without
+any loss of generality:
+
+\begin{align*}
+  {
+  \begin{array}{*{20}l}
+    D^T&=\frac{1}{e_1\,e_2} \left. {\frac{\partial }{\partial i}\left( {\frac{e_2}{e_1}A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_z } \right)} \right|_z
+         +\frac{\partial }{\partial z}\left( {A^{vT}\;\frac{\partial T}{\partial z}} \right) \\ \\
+         %
+       &=\frac{1}{e_1\,e_2 }\left[ {\left. {\;\frac{\partial }{\partial i}\left( {\frac{e_2}{e_1}A^{lT}\;\left( {\left. {\frac{\partial T}{\partial i}} \right|_s
+         -\frac{e_1\,\sigma_1 }{e_3 }\frac{\partial T}{\partial s}} \right)} \right)} \right|_s } \right. \\
+       & \qquad \qquad \left. { -\frac{e_1\,\sigma_1 }{e_3 }\frac{\partial }{\partial s}\left( {\frac{e_2 }{e_1 }A^{lT}\;\left. {\left( {\left. {\frac{\partial T}{\partial i}} \right|_s -\frac{e_1 \,\sigma_1 }{e_3 }\frac{\partial T}{\partial s}} \right)} \right|_s } \right)\;} \right]
+         \shoveright{ +\frac{1}{e_3 }\frac{\partial }{\partial s}\left[ {\frac{A^{vT}}{e_3 }\;\frac{\partial T}{\partial s}} \right]}  \qquad \qquad \qquad \\ \\
+         %
+       &=\frac{1}{e_1 \,e_2 \,e_3 }\left[ {\left. {\;\;\frac{\partial }{\partial i}\left( {\frac{e_2 \,e_3 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right)} \right|_s -\left. {\frac{e_2 }{e_1}A^{lT}\;\frac{\partial e_3 }{\partial i}} \right|_s \left. {\frac{\partial T}{\partial i}} \right|_s } \right. \\
+       &  \qquad \qquad \quad \left. {-e_3 \frac{\partial }{\partial i}\left( {\frac{e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s -e_1 \,\sigma_1 \frac{\partial }{\partial s}\left( {\frac{e_2 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right) \\
+       &  \qquad \qquad \quad \shoveright{ -e_1 \,\sigma_1 \frac{\partial }{\partial s}\left( {-\frac{e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right)\;\,\left. {+\frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 }{e_3 }A^{vT}\;\frac{\partial T}{\partial s}} \right)\quad} \right] }\\
+  \end{array}
+  } 		\\
+  %
+  {
+  \begin{array}{*{20}l}
+    \intertext{Noting that $\frac{1}{e_1} \left. \frac{\partial e_3 }{\partial i} \right|_s = \frac{\partial \sigma_1 }{\partial s}$, this becomes:}
+    %
+    D^T & =\frac{1}{e_1\,e_2\,e_3 }\left[ {\left. {\;\;\;\frac{\partial }{\partial i}\left( {\frac{e_2\,e_3 }{e_1}\,A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right)} \right|_s \left. -\, {e_3 \frac{\partial }{\partial i}\left( {\frac{e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right. \\
+    & \qquad \qquad \quad -e_2 A^{lT}\;\frac{\partial \sigma_1 }{\partial s}\left. {\frac{\partial T}{\partial i}} \right|_s -e_1 \,\sigma_1 \frac{\partial }{\partial s}\left( {\frac{e_2 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right) \\
+    & \qquad \qquad \quad\shoveright{ \left. { +e_1 \,\sigma_1 \frac{\partial }{\partial s}\left( {\frac{e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right)+\frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 }{e_3 }A^{vT}\;\frac{\partial T}{\partial s}} \right)\;\;\;} \right] }\\
+    \\
+    &=\frac{1}{e_1 \,e_2 \,e_3 } \left[ {\left. {\;\;\;\frac{\partial }{\partial i} \left( {\frac{e_2 \,e_3 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right)} \right|_s \left. {-\frac{\partial }{\partial i}\left( {e_2 \,\sigma_1 A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right. \\
+    & \qquad \qquad \quad \left. {+\frac{e_2 \,\sigma_1 }{e_3}A^{lT}\;\frac{\partial T}{\partial s} \;\frac{\partial e_3 }{\partial i}}  \right|_s -e_2 A^{lT}\;\frac{\partial \sigma_1 }{\partial s}\left. {\frac{\partial T}{\partial i}} \right|_s \\
+    & \qquad \qquad \quad-e_2 \,\sigma_1 \frac{\partial}{\partial s}\left( {A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right)+\frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 \,\sigma_1 ^2}{e_3 }A^{lT}\;\frac{\partial T}{\partial s}} \right) \\
+    & \qquad \qquad \quad\shoveright{ \left. {-\frac{\partial \left( {e_1 \,e_2 \,\sigma_1 } \right)}{\partial s} \left( {\frac{\sigma_1 }{e_3}A^{lT}\;\frac{\partial T}{\partial s}} \right) + \frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 }{e_3 }A^{vT}\;\frac{\partial T}{\partial s}} \right)\;\;\;} \right]} .
+  \end{array}
+      } \\
+  {
+  \begin{array}{*{20}l}
+    %
+    \intertext{Using the same remark as just above, $D^T$ becomes:}
+    %
+   D^T &= \frac{1}{e_1 \,e_2 \,e_3 } \left[ {\left. {\;\;\;\frac{\partial }{\partial i} \left( {\frac{e_2 \,e_3 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s -e_2 \,\sigma_1 A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right.\;\;\; \\
+    & \qquad \qquad \quad+\frac{e_1 \,e_2 \,\sigma_1 }{e_3 }A^{lT}\;\frac{\partial T}{\partial s}\;\frac{\partial \sigma_1 }{\partial s} - \frac {\sigma_1 }{e_3} A^{lT} \;\frac{\partial \left( {e_1 \,e_2 \,\sigma_1 } \right)}{\partial s}\;\frac{\partial T}{\partial s} \\
+    & \qquad \qquad \quad-e_2 \left( {A^{lT}\;\frac{\partial \sigma_1 }{\partial s}\left. {\frac{\partial T}{\partial i}} \right|_s +\frac{\partial }{\partial s}\left( {\sigma_1 A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right)-\frac{\partial \sigma_1 }{\partial s}\;A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s } \right) \\
+    & \qquad \qquad \quad\shoveright{\left. {+\frac{\partial }{\partial s}\left( {\frac{e_1 \,e_2 \,\sigma_1 ^2}{e_3 }A^{lT}\;\frac{\partial T}{\partial s}+\frac{e_1 \,e_2}{e_3 }A^{vT}\;\frac{\partial T}{\partial s}} \right)\;\;\;} \right] . }
+  \end{array}
+      } \\
+  {
+  \begin{array}{*{20}l}
+    %
+    \intertext{Since the horizontal scale factors do not depend on the vertical coordinate,
+    the two terms on the second line cancel, while
+    the third line reduces to a single vertical derivative, so it becomes:}
+  %
+    D^T & =\frac{1}{e_1 \,e_2 \,e_3 }\left[ {\left. {\;\;\;\frac{\partial }{\partial i}\left( {\frac{e_2 \,e_3 }{e_1 }A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s -e_2 \,\sigma_1 \,A^{lT}\;\frac{\partial T}{\partial s}} \right)} \right|_s } \right. \\
+    & \qquad \qquad \quad \shoveright{ \left. {+\frac{\partial }{\partial s}\left( {-e_2 \,\sigma_1 \,A^{lT}\;\left. {\frac{\partial T}{\partial i}} \right|_s +A^{lT}\frac{e_1 \,e_2 }{e_3 }\;\left( {\varepsilon +\sigma_1 ^2} \right)\frac{\partial T}{\partial s}} \right)\;\;\;} \right]} \\
+    %
+    \intertext{In other words, the horizontal/vertical Laplacian operator in the ($i$,$s$) plane takes the following form:}
+  \end{array}
+  } \\
+  %
+  {\frac{1}{e_1\,e_2\,e_3}}
+  \left( {{
+  \begin{array}{*{30}c}
+    {\left. {\frac{\partial \left( {e_2 e_3 \bullet } \right)}{\partial i}} \right|_s } \hfill \\
+    {\frac{\partial \left( {e_1 e_2 \bullet } \right)}{\partial s}} \hfill \\
+  \end{array}}}
+  \right)
+  \cdot \left[ {A^{lT}
+  \left( {{
+  \begin{array}{*{30}c}
+    {1} \hfill & {-\sigma_1 } \hfill \\
+    {-\sigma_1} \hfill & {\varepsilon + \sigma_1^2} \hfill \\
+  \end{array}
+  }} \right)
+  \cdot
+  \left( {{
+  \begin{array}{*{30}c}
+    {\frac{1}{e_1 }\;\left. {\frac{\partial \bullet }{\partial i}} \right|_s } \hfill \\
+    {\frac{1}{e_3 }\;\frac{\partial \bullet }{\partial s}} \hfill \\
+  \end{array}
+  }}       \right) \left( T \right)} \right]
+\end{align*}
+%\addtocounter{equation}{-2}
+
+%% =================================================================================================
+\section{Iso/Diapycnal $2^{nd}$ order tracer diffusive operators}
+\label{sec:DIFFOPERS_2}
+
+%% =================================================================================================
+\subsubsection*{In z-coordinates}
+
+The iso/diapycnal diffusive tensor $\textbf {A}_{\textbf I}$ expressed in
+the ($i$,$j$,$k$) curvilinear coordinate system in which
+the equations of the ocean circulation model are formulated,
+takes the following form \citep{redi_JPO82}:
+
+\begin{equation}
+  \label{eq:DIFFOPERS_3}
+  \textbf {A}_{\textbf I} = \frac{A^{lT}}{\left( {1+a_1 ^2+a_2 ^2} \right)}
+  \left[ {{
+        \begin{array}{*{20}c}
+          {1+a_2 ^2 +\varepsilon a_1 ^2} \hfill & {-a_1 a_2 (1-\varepsilon)} \hfill & {-a_1 (1-\varepsilon) } \hfill \\
+          {-a_1 a_2 (1-\varepsilon) } \hfill & {1+a_1 ^2 +\varepsilon a_2 ^2} \hfill & {-a_2 (1-\varepsilon)} \hfill \\
+          {-a_1 (1-\varepsilon)} \hfill & {-a_2 (1-\varepsilon)} \hfill & {\varepsilon +a_1 ^2+a_2 ^2} \hfill \\
+        \end{array}
+      }} \right]
+\end{equation}
+where ($a_1$, $a_2$) are $(-1) \times$ the isopycnal slopes in
+($\textbf{i}$, $\textbf{j}$) directions, relative to geopotentials (or
+equivalently the slopes of the geopotential surfaces in the isopycnal
+coordinate framework):
+\[
+  a_1 =\frac{e_3 }{e_1 }\left( {\frac{\partial \rho }{\partial i}} \right)\left( {\frac{\partial \rho }{\partial k}} \right)^{-1}
+  \qquad , \qquad
+  a_2 =\frac{e_3 }{e_2 }\left( {\frac{\partial \rho }{\partial j}}
+  \right)\left( {\frac{\partial \rho }{\partial k}} \right)^{-1}
+\]
+and, as before, $\epsilon = A^{vT} / A^{lT}$.
+
+In practice, $\epsilon$ is small and isopycnal slopes are generally less than $10^{-2}$ in the ocean,
+so $\textbf {A}_{\textbf I}$ can be simplified appreciably \citep{cox_OM87}. Keeping leading order terms\footnote{Apart from the (1,0)
+and (0,1) elements which are set to zero. See \citet{griffies_bk04}, section 14.1.4.1 for a discussion of this point.}:
+\begin{subequations}
+  \label{eq:DIFFOPERS_4}
+  \begin{equation}
+    \label{eq:DIFFOPERS_4a}
+    {\textbf{A}_{\textbf{I}}} \approx A^{lT}\;\Re\;\text{where} \;\Re =
+    \left[ {{
+          \begin{array}{*{20}c}
+            1 \hfill & 0 \hfill & {-a_1 } \hfill \\
+            0 \hfill & 1 \hfill & {-a_2 } \hfill \\
+            {-a_1 } \hfill & {-a_2 } \hfill & {\varepsilon +a_1 ^2+a_2 ^2} \hfill \\
+          \end{array}
+        }} \right],
+  \end{equation}
+  and the iso/dianeutral diffusive operator in $z$-coordinates is then
+  \begin{equation}
+    \label{eq:DIFFOPERS_4b}
+    D^T = \left. \nabla \right|_z \cdot
+    \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_z T  \right]. \\
+  \end{equation}
+\end{subequations}
+
+Physically, the full tensor \autoref{eq:DIFFOPERS_3} represents strong isoneutral diffusion on a plane parallel to
+the isoneutral surface and weak dianeutral diffusion perpendicular to this plane.
+However,
+the approximate `weak-slope' tensor \autoref{eq:DIFFOPERS_4a} represents strong diffusion along the isoneutral surface,
+with weak \emph{vertical} diffusion -- the principal axes of the tensor are no longer orthogonal.
+This simplification also decouples the ($i$,$z$) and ($j$,$z$) planes of the tensor.
+The weak-slope operator therefore takes the same form, \autoref{eq:DIFFOPERS_4}, as \autoref{eq:DIFFOPERS_2},
+the diffusion operator for geopotential diffusion written in non-orthogonal $i,j,s$-coordinates.
+Written out explicitly,
+
+\begin{multline}
+  \label{eq:DIFFOPERS_ldfiso}
+  D^T=\frac{1}{e_1 e_2 }\left\{
+    {\;\frac{\partial }{\partial i}\left[ {A_h \left( {\frac{e_2}{e_1}\frac{\partial T}{\partial i}-a_1 \frac{e_2}{e_3}\frac{\partial T}{\partial k}} \right)} \right]}
+    {+\frac{\partial}{\partial j}\left[ {A_h \left( {\frac{e_1}{e_2}\frac{\partial T}{\partial j}-a_2 \frac{e_1}{e_3}\frac{\partial T}{\partial k}} \right)} \right]\;} \right\} \\
+  \shoveright{+\frac{1}{e_3 }\frac{\partial }{\partial k}\left[ {A_h \left( {-\frac{a_1 }{e_1 }\frac{\partial T}{\partial i}-\frac{a_2 }{e_2 }\frac{\partial T}{\partial j}+\frac{\left( {a_1 ^2+a_2 ^2+\varepsilon} \right)}{e_3 }\frac{\partial T}{\partial k}} \right)} \right]}. \\
+\end{multline}
+
+The isopycnal diffusion operator \autoref{eq:DIFFOPERS_4},
+\autoref{eq:DIFFOPERS_ldfiso} conserves tracer quantity and dissipates its square.
+As \autoref{eq:DIFFOPERS_4} is the divergence of a flux, the demonstration of the first property is trivial, providing that the flux normal to the boundary is zero
+(as it is when $A_h$ is zero at the boundary). Let us demonstrate the second one:
+\[
+  \iiint\limits_D T\;\nabla .\left( {\textbf{A}}_{\textbf{I}} \nabla T \right)\,dv
+  = -\iiint\limits_D \nabla T\;.\left( {\textbf{A}}_{\textbf{I}} \nabla T \right)\,dv,
+\]
+and since
+\begin{align*}
+  {
+  \begin{array}{*{20}l}
+    \nabla T\;.\left( {{\mathrm {\mathbf A}}_{\mathrm {\mathbf I}} \nabla T}
+    \right)&=A^{lT}\left[ {\left( {\frac{\partial T}{\partial i}} \right)^2-2a_1
+             \frac{\partial T}{\partial i}\frac{\partial T}{\partial k}+\left(
+             {\frac{\partial T}{\partial j}} \right)^2} \right. \\
+           &\qquad \qquad \qquad
+             { \left. -\,{2a_2 \frac{\partial T}{\partial j}\frac{\partial T}{\partial k}+\left( {a_1 ^2+a_2 ^2+\varepsilon} \right)\left( {\frac{\partial T}{\partial k}} \right)^2} \right]} \\
+           &=A_h \left[ {\left( {\frac{\partial T}{\partial i}-a_1 \frac{\partial
+             T}{\partial k}} \right)^2+\left( {\frac{\partial T}{\partial
+             j}-a_2 \frac{\partial T}{\partial k}} \right)^2}
+             +\varepsilon \left(\frac{\partial T}{\partial k}\right) ^2\right]      \\
+           & \geq 0 .
+  \end{array}
+             }
+\end{align*}
+%\addtocounter{equation}{-1}
+the property becomes obvious.
+
+%% =================================================================================================
+\subsubsection*{In generalized vertical coordinates}
+
+Because the weak-slope operator \autoref{eq:DIFFOPERS_4},
+\autoref{eq:DIFFOPERS_ldfiso} is decoupled in the ($i$,$z$) and ($j$,$z$) planes,
+it may be transformed into generalized $s$-coordinates in the same way as
+\autoref{sec:DIFFOPERS_1} was transformed into \autoref{sec:DIFFOPERS_2}.
+The resulting operator then takes the simple form
+
+\begin{equation}
+  \label{eq:DIFFOPERS_ldfiso_s}
+  D^T = \left. \nabla \right|_s \cdot
+  \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_s T  \right] \\
+  \;\;\text{where} \;\Re =\left( {{
+        \begin{array}{*{20}c}
+          1 \hfill & 0 \hfill & {-r _1 } \hfill \\
+          0 \hfill & 1 \hfill & {-r _2 } \hfill \\
+          {-r _1 } \hfill & {-r _2 } \hfill & {\varepsilon +r _1
+                                              ^2+r _2 ^2} \hfill \\
+        \end{array}
+      }} \right),
+\end{equation}
+
+where ($r_1$, $r_2$) are $(-1)\times$ the isopycnal slopes in ($\textbf{i}$, $\textbf{j}$) directions,
+relative to $s$-coordinate surfaces (or equivalently the slopes of the
+$s$-coordinate surfaces in the isopycnal coordinate framework):
+\[
+  r_1 =\frac{e_3 }{e_1 }\left( {\frac{\partial \rho }{\partial i}} \right)\left( {\frac{\partial \rho }{\partial s}} \right)^{-1}
+  \qquad , \qquad
+  r_2 =\frac{e_3 }{e_2 }\left( {\frac{\partial \rho }{\partial j}}
+  \right)\left( {\frac{\partial \rho }{\partial s}} \right)^{-1}.
+\]
+
+To prove \autoref{eq:DIFFOPERS_ldfiso_s} by direct re-expression of \autoref{eq:DIFFOPERS_ldfiso} is straightforward, but laborious.
+An easier way is first to note (by reversing the derivation of \autoref{sec:DIFFOPERS_2} from \autoref{sec:DIFFOPERS_1} ) that
+the weak-slope operator may be \emph{exactly} reexpressed in non-orthogonal $i,j,\rho$-coordinates as
+
+\begin{equation}
+  \label{eq:DIFFOPERS_5}
+  D^T = \left. \nabla \right|_\rho \cdot
+  \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_\rho T  \right] \\
+  \;\;\text{where} \;\Re =\left( {{
+        \begin{array}{*{20}c}
+          1 \hfill & 0 \hfill &0 \hfill \\
+          0 \hfill & 1 \hfill & 0 \hfill \\
+          0 \hfill & 0 \hfill & \varepsilon \hfill \\
+        \end{array}
+      }} \right).
+\end{equation}
+Then direct transformation from $i,j,\rho$-coordinates to $i,j,s$-coordinates gives
+\autoref{eq:DIFFOPERS_ldfiso_s} immediately.
+
+Note that the weak-slope approximation is only made in transforming from
+the (rotated,orthogonal) isoneutral axes to the non-orthogonal $i,j,\rho$-coordinates.
+The further transformation into $i,j,s$-coordinates is exact, whatever the steepness of the $s$-surfaces,
+in the same way as the transformation of horizontal/vertical Laplacian diffusion in $z$-coordinates in
+\autoref{sec:DIFFOPERS_1} onto $s$-coordinates is exact, however steep the $s$-surfaces.
+
+%% =================================================================================================
+\section{Lateral/Vertical momentum diffusive operators}
+\label{sec:DIFFOPERS_3}
+
+The second order momentum diffusion operator (Laplacian) in $z$-coordinates is found by
+applying \autoref{eq:MB_lap_vector}, the expression for the Laplacian of a vector,
+to the horizontal velocity vector:
+\begin{align*}
+  \Delta {\textbf{U}}_h
+  &=\nabla \left( {\nabla \cdot {\textbf{U}}_h } \right)-
+    \nabla \times \left( {\nabla \times {\textbf{U}}_h } \right) \\ \\
+  &=\left( {{
+    \begin{array}{*{20}c}
+      {\frac{1}{e_1 }\frac{\partial \chi }{\partial i}} \hfill \\
+      {\frac{1}{e_2 }\frac{\partial \chi }{\partial j}} \hfill \\
+      {\frac{1}{e_3 }\frac{\partial \chi }{\partial k}} \hfill \\
+    \end{array}
+  }} \right)
+  -\left( {{
+  \begin{array}{*{20}c}
+    {\frac{1}{e_2 }\frac{\partial \zeta }{\partial j}-\frac{1}{e_3
+    }\frac{\partial }{\partial k}\left( {\frac{1}{e_3 }\frac{\partial
+    u}{\partial k}} \right)} \hfill \\
+    {\frac{1}{e_3 }\frac{\partial }{\partial k}\left( {-\frac{1}{e_3
+    }\frac{\partial v}{\partial k}} \right)-\frac{1}{e_1 }\frac{\partial \zeta
+    }{\partial i}} \hfill \\
+    {\frac{1}{e_1 e_2 }\left[ {\frac{\partial }{\partial i}\left( {\frac{e_2
+    }{e_3 }\frac{\partial u}{\partial k}} \right)-\frac{\partial }{\partial
+    j}\left( {-\frac{e_1 }{e_3 }\frac{\partial v}{\partial k}} \right)} \right]}
+    \hfill \\
+  \end{array}
+  }} \right) \\ \\
+  &=\left( {{
+    \begin{array}{*{20}c}
+      {\frac{1}{e_1 }\frac{\partial \chi }{\partial i}-\frac{1}{e_2 }\frac{\partial \zeta }{\partial j}} \\
+      {\frac{1}{e_2 }\frac{\partial \chi }{\partial j}+\frac{1}{e_1 }\frac{\partial \zeta }{\partial i}} \\
+      0 \\
+    \end{array}
+  }} \right)
+  +\frac{1}{e_3 }
+  \left( {{
+  \begin{array}{*{20}c}
+    {\frac{\partial }{\partial k}\left( {\frac{1}{e_3 }\frac{\partial u}{\partial k}} \right)} \\
+    {\frac{\partial }{\partial k}\left( {\frac{1}{e_3 }\frac{\partial v}{\partial k}} \right)} \\
+    {\frac{\partial \chi }{\partial k}-\frac{1}{e_1 e_2 }\left( {\frac{\partial ^2\left( {e_2 \,u} \right)}{\partial i\partial k}+\frac{\partial ^2\left( {e_1 \,v} \right)}{\partial j\partial k}} \right)} \\
+  \end{array}
+  }} \right)
+\end{align*}
+Using \autoref{eq:MB_div}, the definition of the horizontal divergence,
+the third component of the second vector is obviously zero and thus :
+\[
+  \Delta {\textbf{U}}_h = \nabla _h \left( \chi \right) - \nabla _h \times \left( \zeta \textbf{k} \right) + \frac {1}{e_3 } \frac {\partial }{\partial k} \left( {\frac {1}{e_3 } \frac{\partial {\textbf{ U}}_h }{\partial k}} \right) .
+\]
+
+Note that this operator ensures a full separation between
+the vorticity and horizontal divergence fields (see \autoref{apdx:INVARIANTS}).
+It is only equal to a Laplacian applied to each component in Cartesian coordinates, not on the sphere.
+
+The horizontal/vertical second order (Laplacian type) operator used to diffuse horizontal momentum in
+the $z$-coordinate therefore takes the following form:
+\begin{equation}
+  \label{eq:DIFFOPERS_Lap_U}
+  {
+    \textbf{D}}^{\textbf{U}} =
+  \nabla _h \left( {A^{lm}\;\chi } \right)
+  - \nabla _h \times \left( {A^{lm}\;\zeta \;{\textbf{k}}} \right)
+  + \frac{1}{e_3 }\frac{\partial }{\partial k}\left( {\frac{A^{vm}\;}{e_3 }
+      \frac{\partial {\mathrm {\mathbf U}}_h }{\partial k}} \right) , \\
+\end{equation}
+that is, in expanded form:
+\begin{align*}
+  D^{\textbf{U}}_u
+  & = \frac{1}{e_1} \frac{\partial \left( {A^{lm}\chi   } \right)}{\partial i}
+    -\frac{1}{e_2} \frac{\partial \left( {A^{lm}\zeta } \right)}{\partial j}
+    +\frac{1}{e_3} \frac{\partial }{\partial k} \left( \frac{A^{vm}}{e_3} \frac{\partial u}{\partial k} \right)   ,   \\
+  D^{\textbf{U}}_v
+  & = \frac{1}{e_2 }\frac{\partial \left( {A^{lm}\chi   } \right)}{\partial j}
+    +\frac{1}{e_1 }\frac{\partial \left( {A^{lm}\zeta } \right)}{\partial i}
+    +\frac{1}{e_3} \frac{\partial }{\partial k} \left( \frac{A^{vm}}{e_3} \frac{\partial v}{\partial k} \right) .
+\end{align*}
+
+Note Bene: introducing a rotation in \autoref{eq:DIFFOPERS_Lap_U} does not lead to
+a useful expression for the iso/diapycnal Laplacian operator in the $z$-coordinate.
+Similarly, we did not found an expression of practical use for
+the geopotential horizontal/vertical Laplacian operator in the $s$-coordinate.
+Generally, \autoref{eq:DIFFOPERS_Lap_U} is used in both $z$- and $s$-coordinate systems,
+that is a Laplacian diffusion is applied on momentum along the coordinate directions.
+
+\subinc{\input{../../global/epilogue}}
+
+\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_invariants.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_invariants.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_invariants.tex	(revision 11831)
@@ -0,0 +1,1483 @@
+\documentclass[../main/NEMO_manual]{subfiles}
+
+\begin{document}
+
+\chapter{Discrete Invariants of the Equations}
+\label{apdx:INVARIANTS}
+
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
+
+%%%  Appendix put in cmtgm as it has not been updated for \zstar and s coordinate
+%I'm writting this appendix. It will be available in a forthcoming release of the documentation
+
+%\cmtgm{
+
+%% =================================================================================================
+\section{Introduction / Notations}
+\label{sec:INVARIANTS_0}
+
+Notation used in this appendix in the demonstations:
+
+fluxes at the faces of a $T$-box:
+\[
+  U = e_{2u}\,e_{3u}\; u  \qquad  V = e_{1v}\,e_{3v}\; v  \qquad W = e_{1w}\,e_{2w}\; \omega
+\]
+
+volume of cells at $u$-, $v$-, and $T$-points:
+\[
+  b_u = e_{1u}\,e_{2u}\,e_{3u}  \qquad  b_v = e_{1v}\,e_{2v}\,e_{3v}  \qquad b_t = e_{1t}\,e_{2t}\,e_{3t}
+\]
+
+partial derivative notation: $\partial_\bullet = \frac{\partial}{\partial \bullet}$
+
+$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$).
+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).
+\begin{flalign*}
+  z(k) = \eta - \int\limits_{\tilde{k}=k}^{\tilde{k}=k_s}  e_3(\tilde{k}) \;d\tilde{k}
+  = \eta - \int\limits_k^{k_s}  e_3 \;d\tilde{k}
+\end{flalign*}
+
+Continuity equation with the above notation:
+\[
+  \frac{1}{e_{3t}} \partial_t (e_{3t})+ \frac{1}{b_t}  \biggl\{  \delta_i [U] + \delta_j [V] + \delta_k [W] \biggr\} = 0
+\]
+
+A quantity, $Q$ is conserved when its domain averaged time change is zero, that is when:
+\[
+  \partial_t \left( \int_D{ Q\;dv } \right) =0
+\]
+Noting that the coordinate system used ....  blah blah
+\[
+  \partial_t \left( \int_D {Q\;dv} \right) =  \int_D { \partial_t \left( e_3 \, Q \right) e_1e_2\;di\,dj\,dk }
+  =  \int_D { \frac{1}{e_3} \partial_t \left( e_3 \, Q \right) dv } =0
+\]
+equation of evolution of $Q$ written as
+the time evolution of the vertical content of $Q$ like for tracers, or momentum in flux form,
+the quadratic quantity $\frac{1}{2}Q^2$ is conserved when:
+\begin{flalign*}
+  \partial_t \left(   \int_D{ \frac{1}{2} \,Q^2\;dv }   \right)
+  =&  \int_D{ \frac{1}{2} \partial_t \left( \frac{1}{e_3}\left( e_3 \, Q \right)^2 \right) e_1e_2\;di\,dj\,dk } \\
+  =&  \int_D {         Q   \;\partial_t\left( e_3 \, Q \right) e_1e_2\;di\,dj\,dk }
+  -  \int_D { \frac{1}{2} Q^2 \,\partial_t  (e_3) \;e_1e_2\;di\,dj\,dk } \\
+\end{flalign*}
+that is in a more compact form :
+\begin{flalign}
+  \label{eq:INVARIANTS_Q2_flux}
+  \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right)
+  =&                   \int_D { \frac{Q}{e_3}  \partial_t \left( e_3 \, Q \right) dv }
+  -   \frac{1}{2} \int_D {  \frac{Q^2}{e_3} \partial_t (e_3) \;dv }
+\end{flalign}
+equation of evolution of $Q$ written as the time evolution of $Q$ like for momentum in vector invariant form,
+the quadratic quantity $\frac{1}{2}Q^2$ is conserved when:
+\begin{flalign*}
+  \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right)
+  =&  \int_D { \frac{1}{2} \partial_t \left( e_3 \, Q^2 \right) \;e_1e_2\;di\,dj\,dk } \\
+  =& \int_D {         Q      \partial_t Q  \;e_1e_2e_3\;di\,dj\,dk }
+  +  \int_D { \frac{1}{2} Q^2 \, \partial_t e_3  \;e_1e_2\;di\,dj\,dk } \\
+\end{flalign*}
+that is in a more compact form:
+\begin{flalign}
+  \label{eq:INVARIANTS_Q2_vect}
+  \partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right)
+  =& \int_D {         Q   \,\partial_t Q  \;dv }
+  +   \frac{1}{2} \int_D { \frac{1}{e_3} Q^2 \partial_t e_3 \;dv }
+\end{flalign}
+
+%% =================================================================================================
+\section{Continuous conservation}
+\label{sec:INVARIANTS_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.
+
+Let us first establish those constraint in the continuous world.
+The total energy (\ie\ kinetic plus potential energies) is conserved:
+\begin{flalign}
+  \label{eq:INVARIANTS_Tot_Energy}
+  \partial_t \left( \int_D \left( \frac{1}{2} {\textbf{U}_h}^2 +  \rho \, g \, z \right) \;dv \right)  = & 0
+\end{flalign}
+under the following assumptions: no dissipation, no forcing (wind, buoyancy flux, atmospheric pressure variations),
+mass conservation, and closed domain.
+
+This equation can be transformed to obtain several sub-equalities.
+The transformation for the advection term depends on whether the vector invariant form or
+the flux form is used for the momentum equation.
+Using \autoref{eq:INVARIANTS_Q2_vect} and introducing \autoref{eq:SCOORD_dyn_vect} in
+\autoref{eq:INVARIANTS_Tot_Energy} for the former form and
+using \autoref{eq:INVARIANTS_Q2_flux} and introducing \autoref{eq:SCOORD_dyn_flux} in
+\autoref{eq:INVARIANTS_Tot_Energy} for the latter form leads to:
+
+% \label{eq:INVARIANTS_E_tot}
+advection term (vector invariant form):
+\[
+  % \label{eq:INVARIANTS_E_tot_vect_vor_1}
+  \int\limits_D  \zeta \; \left( \textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv   = 0   \\
+\]
+\[
+  % \label{eq:INVARIANTS_E_tot_vect_adv_1}
+  \int\limits_D  \textbf{U}_h \cdot \nabla_h \left( \frac{{\textbf{U}_h}^2}{2} \right)     dv
+  + \int\limits_D  \textbf{U}_h \cdot \nabla_z \textbf{U}_h  \;dv
+  -  \int\limits_D { \frac{{\textbf{U}_h}^2}{2} \frac{1}{e_3} \partial_t e_3 \;dv }   = 0
+\]
+advection term (flux form):
+\[
+  % \label{eq:INVARIANTS_E_tot_flux_metric}
+  \int\limits_D  \frac{1} {e_1 e_2 } \left( v \,\partial_i e_2 - u \,\partial_j e_1  \right)\;
+  \left(  \textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv   = 0
+\]
+\[
+  % \label{eq:INVARIANTS_E_tot_flux_adv}
+  \int\limits_D \textbf{U}_h \cdot     \left(                 {{
+        \begin{array} {*{20}c}
+          \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\
+          \nabla \cdot \left( \textbf{U}\,v \right) \hfill
+        \end{array}}
+    }           \right)   \;dv
+  +   \frac{1}{2} \int\limits_D {  {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t e_3 \;dv } =\;0
+\]
+coriolis term
+\[
+  % \label{eq:INVARIANTS_E_tot_cor}
+  \int\limits_D  f   \; \left( \textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv   = 0
+\]
+pressure gradient:
+\[
+  % \label{eq:INVARIANTS_E_tot_pg_1}
+  - \int\limits_D  \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv
+  = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
+  + \int\limits_D g\, \rho \; \partial_t z  \;dv
+\]
+
+where $\nabla_h = \left. \nabla \right|_k$ is the gradient along the $s$-surfaces.
+
+blah blah....
+
+The prognostic ocean dynamics equation can be summarized as follows:
+\[
+  \text{NXT} = \dbinom	{\text{VOR} + \text{KEG} + \text {ZAD} }
+  {\text{COR} + \text{ADV}                       }
+  + \text{HPG} + \text{SPG} + \text{LDF} + \text{ZDF}
+\]
+
+Vector invariant form:
+% \label{eq:INVARIANTS_E_tot_vect}
+\[
+  % \label{eq:INVARIANTS_E_tot_vect_vor_2}
+  \int\limits_D   \textbf{U}_h \cdot \text{VOR} \;dv   = 0
+\]
+\[
+  % \label{eq:INVARIANTS_E_tot_vect_adv_2}
+  \int\limits_D  \textbf{U}_h \cdot \text{KEG}  \;dv
+  + \int\limits_D  \textbf{U}_h \cdot \text{ZAD}  \;dv
+  -  \int\limits_D { \frac{{\textbf{U}_h}^2}{2} \frac{1}{e_3} \partial_t e_3 \;dv }   = 0
+\]
+\[
+  % \label{eq:INVARIANTS_E_tot_pg_2}
+  - \int\limits_D  \textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv
+  = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
+  + \int\limits_D g\, \rho \; \partial_t z  \;dv
+\]
+
+Flux form:
+\begin{subequations}
+  \label{eq:INVARIANTS_E_tot_flux}
+  \[
+    % \label{eq:INVARIANTS_E_tot_flux_metric_2}
+    \int\limits_D  \textbf{U}_h \cdot \text {COR} \;  dv   = 0
+  \]
+  \[
+    % \label{eq:INVARIANTS_E_tot_flux_adv_2}
+    \int\limits_D \textbf{U}_h \cdot \text{ADV}   \;dv
+    +   \frac{1}{2} \int\limits_D {  {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t e_3  \;dv } =\;0
+  \]
+  \begin{equation}
+    \label{eq:INVARIANTS_E_tot_pg_3}
+    - \int\limits_D  \textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv
+    = - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
+    + \int\limits_D g\, \rho \; \partial_t  z  \;dv
+  \end{equation}
+\end{subequations}
+
+\autoref{eq:INVARIANTS_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:INVARIANTS_E_tot_pg_3} can be transformed as follows:
+\begin{flalign*}
+  \partial_t  \left( \int\limits_D { \rho \, g \, z  \;dv} \right)
+  &= + \int\limits_D \frac{1}{e_3} \partial_t (e_3\,\rho) \;g\;z\;\;dv
+  +  \int\limits_D g\, \rho \; \partial_t z  \;dv   &&&\\
+  &= - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
+  + \int\limits_D g\, \rho \; \partial_t z \;dv   &&&\\
+  &= + \int\limits_D  \rho \,g \left( \textbf {U}_h \cdot \nabla_h z + \omega \frac{1}{e_3} \partial_k z \right)  \;dv
+  + \int\limits_D g\, \rho \; \partial_t z \;dv   &&&\\
+  &= + \int\limits_D  \rho \,g \left( \omega + \partial_t z + \textbf {U}_h \cdot \nabla_h z  \right)  \;dv  &&&\\
+  &=+  \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{eq:SCOORD_w_s}).
+
+The left hand side of \autoref{eq:INVARIANTS_E_tot_pg_3} can be transformed as follows:
+\begin{flalign*}
+  - \int\limits_D  \left. \nabla p \right|_z & \cdot \textbf{U}_h \;dv
+  = - \int\limits_D  \left( \nabla_h p + \rho \, g \nabla_h z \right) \cdot \textbf{U}_h \;dv   &&&\\
+  \allowdisplaybreaks
+  &= - \int\limits_D  \nabla_h  p \cdot \textbf{U}_h \;dv   - \int\limits_D  \rho \, g \, \nabla_h z \cdot \textbf{U}_h \;dv   &&&\\
+  \allowdisplaybreaks
+  &= +\int\limits_D p \,\nabla_h \cdot \textbf{U}_h \;dv   + \int\limits_D  \rho \, g \left( \omega - w + \partial_t z \right) \;dv   &&&\\
+  \allowdisplaybreaks
+  &= -\int\limits_D p \left( \frac{1}{e_3} \partial_t e_3 + \frac{1}{e_3} \partial_k \omega  \right) \;dv
+  +\int\limits_D  \rho \, g \left( \omega - w + \partial_t z \right) \;dv   &&&\\
+  \allowdisplaybreaks
+  &= -\int\limits_D \frac{p}{e_3} \partial_t e_3  \;dv
+  +\int\limits_D \frac{1}{e_3} \partial_k p\; \omega \;dv
+  +\int\limits_D  \rho \, g \left( \omega - w + \partial_t z \right) \;dv   &&&\\
+  &= -\int\limits_D \frac{p}{e_3} \partial_t e_3  \;dv
+  -\int\limits_D \rho \, g \, \omega \;dv
+  +\int\limits_D  \rho \, g \left( \omega - w + \partial_t z \right) \;dv   &&&\\
+  &= - \int\limits_D \frac{p}{e_3} \partial_t e_3 \; \;dv
+  - \int\limits_D  \rho \, g \, w \;dv
+  + \int\limits_D   \rho \, g \, \partial_t z \;dv   &&&\\
+  \allowdisplaybreaks
+  \intertext{introducing the hydrostatic balance $\partial_k p=-\rho \,g\,e_3$ in the last term,
+    it becomes:}
+  &= - \int\limits_D \frac{p}{e_3} \partial_t e_3 \;dv
+  - \int\limits_D  \rho \, g \, w \;dv
+  - \int\limits_D  \frac{1}{e_3} \partial_k p\, \partial_t z \;dv   &&&\\
+  &= - \int\limits_D \frac{p}{e_3} \partial_t e_3 \;dv
+  - \int\limits_D  \rho \, g \, w \;dv
+  + \int\limits_D \,\frac{p}{e_3}\partial_t ( \partial_k z )  dv   &&&\\
+  %
+  &= - \int\limits_D  \rho \, g \, w \;dv   &&&\\
+\end{flalign*}
+
+%gm comment
+\cmtgm{
+The last equality comes from the following equation,
+\begin{flalign*}
+  \int\limits_D p \frac{1}{e_3} \frac{\partial e_3}{\partial t}\; \;dv
+  = \int\limits_D   \rho \, g \, \frac{\partial z }{\partial t} \;dv \quad,
+\end{flalign*}
+that can be demonstrated as follows:
+
+\begin{flalign*}
+  \int\limits_D   \rho \, g \, \frac{\partial z }{\partial t} \;dv
+  &= \int\limits_D    \rho \, g \, \frac{\partial \eta}{\partial t} \;dv
+  -  \int\limits_D    \rho \, g \, \frac{\partial}{\partial t} \left(  \int\limits_k^{k_s}  e_3 \;d\tilde{k} \right) \;dv   &&&\\
+  &= \int\limits_D    \rho \, g \, \frac{\partial \eta}{\partial t} \;dv
+  -  \int\limits_D    \rho \, g    \left(  \int\limits_k^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k} \right) \;dv   &&&\\
+  %
+  \allowdisplaybreaks
+  \intertext{The second term of the right hand side can be transformed by applying the integration by part rule:
+    $\left[ a\,b \right]_{k_b}^{k_s} = \int_{k_b}^{k_s}  a\,\frac{\partial b}{\partial k}       \;dk
+    + \int_{k_b}^{k_s}      \frac{\partial a}{\partial k} \,b \;dk $
+    to the following function: $a=  \int_k^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k}$
+    and $b=  \int_k^{k_s}  \rho \, e_3 \;d\tilde{k}$
+    (note that $\frac{\partial}{\partial k} \left(  \int_k^{k_s}  a \;d\tilde{k}  \right) = - a$ as $k$ is the lower bound of the integral).
+    This leads to:  }
+\end{flalign*}
+\begin{flalign*}
+  &\left[ \int\limits_{k}^{k_s}  \frac{\partial e_3}{\partial t} \,dk \cdot \int\limits_{k}^{k_s}  \rho \, e_3 \,dk   \right]_{k_b}^{k_s}
+  =-\int\limits_{k_b}^{k_s} \left(  \int\limits_k^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k} \right)  \rho \,e_3 \;dk
+  -\int\limits_{k_b}^{k_s}  \frac{\partial e_3}{\partial t}  \left(  \int\limits_k^{k_s}  \rho \, e_3 \;d\tilde{k} \right)   dk  &&&\\
+  \allowdisplaybreaks
+  \intertext{Noting that $\frac{\partial \eta}{\partial t}
+    = \frac{\partial}{\partial t}  \left( \int_{k_b}^{k_s}   e_3  \;d\tilde{k}  \right)
+    = \int_{k_b}^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k}$
+    and
+    $p(k) = \int_k^{k_s}  \rho \,g \, e_3 \;d\tilde{k} $,
+    but also that $\frac{\partial \eta}{\partial t}$ does not depends on $k$, it comes:
+  }
+  & - \int\limits_{k_b}^{k_s}  \rho \, \frac{\partial \eta}{\partial t} \, e_3 \;dk
+  = - \int\limits_{k_b}^{k_s} \left(  \int\limits_k^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k} \right)   \, \rho \, g   e_3\;dk
+  - \int\limits_{k_b}^{k_s}  \frac{\partial e_3}{\partial t} \frac{p}{g}         \;dk       &&&\\
+\end{flalign*}
+Mutliplying by $g$ and integrating over the $(i,j)$ domain it becomes:
+\begin{flalign*}
+  \int\limits_D  \rho \, g \, \left(  \int\limits_k^{k_s}  \frac{\partial e_3}{\partial t} \;d\tilde{k} \right)    \;dv
+  =  \int\limits_D  \rho \, g \, \frac{\partial \eta}{\partial t} dv
+  - \int\limits_D  \frac{p}{e_3}\frac{\partial e_3}{\partial t}         \;dv
+\end{flalign*}
+Using this property, we therefore have:
+\begin{flalign*}
+  \int\limits_D   \rho \, g \, \frac{\partial z }{\partial t} \;dv
+  &= \int\limits_D    \rho \, g \, \frac{\partial \eta}{\partial t}   \;dv
+  - \left(  \int\limits_D  \rho \, g \, \frac{\partial \eta}{\partial t} dv
+    - \int\limits_D  \frac{p}{e_3}\frac{\partial e_3}{\partial t}   \;dv  \right)    &&&\\
+  %
+  &=\int\limits_D \frac{p}{e_3} \frac{\partial (e_3\,\rho)}{\partial t}\; \;dv
+\end{flalign*}
+% end gm comment
+}
+
+%% =================================================================================================
+\section{Discrete total energy conservation: vector invariant form}
+\label{sec:INVARIANTS_2}
+
+%% =================================================================================================
+\subsection{Total energy conservation}
+\label{subsec:INVARIANTS_KE+PE_vect}
+
+The discrete form of the total energy conservation, \autoref{eq:INVARIANTS_Tot_Energy}, is given by:
+\begin{flalign*}
+  \partial_t  \left(  \sum\limits_{i,j,k} \biggl\{ \frac{u^2}{2} \,b_u + \frac{v^2}{2}\, b_v +  \rho \, g \, z_t \,b_t  \biggr\} \right) &=0
+\end{flalign*}
+which in vector invariant forms, it leads to:
+\begin{equation}
+  \label{eq:INVARIANTS_KE+PE_vect_discrete}
+  \begin{split}
+    \sum\limits_{i,j,k} \biggl\{   u\,                        \partial_t u         \;b_u
+    + v\,                        \partial_t v          \;b_v  \biggr\}
+    + \frac{1}{2} \sum\limits_{i,j,k} \biggl\{  \frac{u^2}{e_{3u}}\partial_t e_{3u} \;b_u
+    +  \frac{v^2}{e_{3v}}\partial_t e_{3v} \;b_v   \biggr\}      \\
+    = - \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_{3t}}\partial_t (e_{3t} \rho) \, g \, z_t \;b_t  \biggr\}
+    - \sum\limits_{i,j,k} \biggl\{ \rho \,g\,\partial_t (z_t) \,b_t  \biggr\}
+  \end{split}
+\end{equation}
+
+Substituting the discrete expression of the time derivative of the velocity either in vector invariant,
+leads to the discrete equivalent of the four equations \autoref{eq:INVARIANTS_E_tot_flux}.
+
+%% =================================================================================================
+\subsection{Vorticity term (coriolis + vorticity part of the advection)}
+\label{subsec:INVARIANTS_vor}
+
+Let $q$, located at $f$-points, be either the relative ($q=\zeta / e_{3f}$),
+or the planetary ($q=f/e_{3f}$), or the total potential vorticity ($q=(\zeta +f) /e_{3f}$).
+Two discretisation of the vorticity term (ENE and EEN) allows the conservation of the kinetic energy.
+%% =================================================================================================
+\subsubsection{Vorticity term with ENE scheme (\protect\np[=.true.]{ln_dynvor_ene}{ln\_dynvor\_ene})}
+\label{subsec:INVARIANTS_vorENE}
+
+For the ENE scheme, the two components of the vorticity term are given by:
+\[
+  - e_3 \, q \;{\textbf{k}}\times {\textbf {U}}_h    \equiv
+  \left( {{
+        \begin{array} {*{20}c}
+          + \frac{1} {e_{1u}} \;
+          \overline {\, q \ \overline {\left( e_{1v}\,e_{3v}\,v \right)}^{\,i+1/2}} ^{\,j}        \hfill \\
+          - \frac{1} {e_{2v}} \;
+          \overline {\, q \ \overline {\left( e_{2u}\,e_{3u}\,u \right)}^{\,j+1/2}} ^{\,i}       \hfill
+        \end{array}
+      } }    \right)
+\]
+
+This formulation does not conserve the enstrophy but it does conserve the total kinetic energy.
+Indeed, the kinetic energy tendency associated to the vorticity term and
+averaged over the ocean domain can be transformed as follows:
+\begin{flalign*}
+  &\int\limits_D -  \left(  e_3 \, q \;\textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv &&  \\
+  & \qquad \qquad
+  {
+    \begin{array}{*{20}l}
+      &\equiv \sum\limits_{i,j,k} 	\biggl\{
+        \frac{1} {e_{1u}} \overline { \,q\ \overline{ V }^{\,i+1/2}} ^{\,j} \, u \; b_u
+        - \frac{1} {e_{2v}}\overline { \, q\ \overline{ U }^{\,j+1/2}} ^{\,i} \, v \; b_v \; \biggr\}    \\
+      &\equiv  \sum\limits_{i,j,k} 	\biggl\{
+        \overline { \,q\ \overline{ V }^{\,i+1/2}}^{\,j} \; U
+        - \overline { \,q\ \overline{ U }^{\,j+1/2}}^{\,i} \; V  \; \biggr\}     \\
+      &\equiv \sum\limits_{i,j,k} q \  \biggl\{  \overline{ V }^{\,i+1/2}\; \overline{ U }^{\,j+1/2}
+        - \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.
+
+%% =================================================================================================
+\subsubsection{Vorticity term with EEN scheme (\protect\np[=.true.]{ln_dynvor_een}{ln\_dynvor\_een})}
+\label{subsec:INVARIANTS_vorEEN_vect}
+
+With the EEN scheme, the vorticity terms are represented as:
+\begin{equation}
+  \label{eq:INVARIANTS_dynvor_een1}
+  \left\{ {
+      \begin{aligned}
+        +q\,e_3 \, v 	&\equiv +\frac{1}{e_{1u} }   \sum_{\substack{i_p,\,k_p}}
+        {^{i+1/2-i_p}_j}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{1v} e_{3v} \ v  \right)^{i+i_p-1/2}_{j+j_p}   \\
+        - q\,e_3 \, u     &\equiv -\frac{1}{e_{2v} }    \sum_{\substack{i_p,\,k_p}}
+        {^i_{j+1/2-j_p}}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{2u} e_{3u} \ u  \right)^{i+i_p}_{j+j_p-1/2}
+      \end{aligned}
+    } \right.
+\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:
+\begin{equation}
+  \label{eq:INVARIANTS_Q_triads}
+  _i^j \mathbb{Q}^{i_p}_{j_p}
+  = \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}
+
+This formulation does conserve the total kinetic energy.
+Indeed,
+\begin{flalign*}
+  &\int\limits_D - \textbf{U}_h \cdot   \left(  \zeta \;\textbf{k} \times \textbf{U}_h  \right)  \;  dv &&  \\
+  \equiv \sum\limits_{i,j,k} &	\biggl\{
+  \left[  \sum_{\substack{i_p,\,k_p}}
+    {^{i+1/2-i_p}_j}\mathbb{Q}^{i_p}_{j_p} \; V^{i+1/2-i_p}_{j+j_p} \right] U^{i+1/2}_{j}    %   &&\\
+  - \left[  \sum_{\substack{i_p,\,k_p}}
+    {^i_{j+1/2-j_p}}\mathbb{Q}^{i_p}_{j_p} \; U^{i+i_p}_{j+1/2-j_p}  \right] V^{i}_{j+1/2}    \biggr\}     && \\ \\
+  \equiv \sum\limits_{i,j,k} &  \sum_{\substack{i_p,\,k_p}} \biggl\{  \ \
+  {^{i+1/2-i_p}_j}\mathbb{Q}^{i_p}_{j_p} \; V^{i+1/2-i_p}_{j+j_p}  \, U^{i+1/2}_{j}     %  &&\\
+  - {^i_{j+1/2-j_p}}\mathbb{Q}^{i_p}_{j_p} \; U^{i+i_p}_{j+1/2-j_p} \, V^{i}_{j+1/2}     \ \;     \biggr\}     &&  \\
+  %
+  \allowdisplaybreaks
+  \intertext{ Expending the summation on $i_p$ and $k_p$, it becomes:}
+  %
+  \equiv \sum\limits_{i,j,k} & \biggl\{  \ \
+  {^{i+1}_j     }\mathbb{Q}^{-1/2}_{+1/2} \;V^{i+1}_{j+1/2} \; U^{\,i+1/2}_{j}
+  -  {^i_{j}\quad}\mathbb{Q}^{-1/2}_{+1/2} \; U^{i-1/2}_{j}    \; V^{\,i}_{j+1/2}         &&  \\
+  &       + {^{i+1}_j     }\mathbb{Q}^{-1/2}_{-1/2} \; V^{i+1}_{j-1/2} \; U^{\,i+1/2}_{j}
+  - {^i_{j+1}     }\mathbb{Q}^{-1/2}_{-1/2} \; U^{i-1/2}_{j+1} \; V^{\,i}_{j+1/2}        \biggr.     &&  \\
+  &       + {^{i}_j\quad}\mathbb{Q}^{+1/2}_{+1/2} \; V^{i}_{j+1/2}   \; U^{\,i+1/2}_{j}
+  - {^i_{j}\quad}\mathbb{Q}^{+1/2}_{+1/2} \; U^{i+1/2}_{j}   \; V^{\,i}_{j+1/2}          \biggr.        &&  \\
+  &       + {^{i}_j\quad}\mathbb{Q}^{+1/2}_{-1/2} \; V^{i}_{j-1/2}     \; U^{\,i+1/2}_{j}
+  -  {^i_{j+1}     }\mathbb{Q}^{+1/2}_{-1/2} \; U^{i+1/2}_{j+1}\; V^{\,i}_{j+1/2}  \ \;     \biggr\}     &&  \\
+  %
+  \allowdisplaybreaks
+  \intertext{The summation is done over all $i$ and $j$ indices, it is therefore possible to introduce
+    a shift of $-1$ either in $i$ or $j$ direction in some of the term of the summation (first term of the
+    first and second lines, second term of the second and fourth lines). By doning so, we can regroup
+    all the terms of the summation by triad at a ($i$,$j$) point. In other words, we regroup all the terms
+    in the neighbourhood  that contain a triad at the same ($i$,$j$) indices. It becomes: }
+  \allowdisplaybreaks
+  %
+  \equiv \sum\limits_{i,j,k} & \biggl\{  \ \
+  {^{i}_j}\mathbb{Q}^{-1/2}_{+1/2}  \left[  V^{i}_{j+1/2}\, U^{\,i-1/2}_{j}
+    -  U^{i-1/2}_{j} \, V^{\,i}_{j+1/2}      \right]    &&  \\
+  &       + {^{i}_j}\mathbb{Q}^{-1/2}_{-1/2}  \left[  V^{i}_{j-1/2} \, U^{\,i-1/2}_{j}
+    -    U^{i-1/2}_{j} \, V^{\,i}_{j-1/2}      \right]    \biggr.   &&  \\
+  &      + {^{i}_j}\mathbb{Q}^{+1/2}_{+1/2}  \left[  V^{i}_{j+1/2} \, U^{\,i+1/2}_{j}
+    -    U^{i+1/2}_{j} \, V^{\,i}_{j+1/2}     \right]  \biggr.  &&  \\
+  &     + {^{i}_j}\mathbb{Q}^{+1/2}_{-1/2}  \left[   V^{i}_{j-1/2} \, U^{\,i+1/2}_{j}
+    -    U^{i+1/2}_{j-1} \, V^{\,i}_{j-1/2}  \right]  \ \;   \biggr\}   \qquad
+  \equiv \ 0   &&
+\end{flalign*}
+
+%% =================================================================================================
+\subsubsection{Gradient of kinetic energy / Vertical advection}
+\label{subsec:INVARIANTS_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~:
+\[
+  \int_D \textbf{U}_h \cdot \frac{1}{e_3 } \omega \partial_k \textbf{U}_h \;dv
+  =  -   \int_D \textbf{U}_h \cdot \nabla_h \left( \frac{1}{2}\;{\textbf{U}_h}^2 \right)\;dv
+  +   \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)
+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)
+applied in the horizontal and vertical directions, it becomes:
+\begin{flalign*}
+  & - \int_D \textbf{U}_h \cdot \text{KEG}\;dv
+  = - \int_D \textbf{U}_h \cdot \nabla_h \left( \frac{1}{2}\;{\textbf{U}_h}^2 \right)\;dv    &&&\\
+  %
+  \equiv  & -  \sum\limits_{i,j,k} \frac{1}{2}  \biggl\{
+  \frac{1} {e_{1u}}  \delta_{i+1/2}   \left[   \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right]  u \ b_u
+  + \frac{1} {e_{2v}}  \delta_{j+1/2}   \left[   \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right]  v \ b_v   \biggr\}  	&&&  \\
+  %
+  \equiv & + \sum\limits_{i,j,k} \frac{1}{2}  \left(   \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right)\;
+  \biggl\{ \delta_{i} \left[  U   \right] +  \delta_{j} \left[  V  \right]    \biggr\}       &&&  \\
+  \allowdisplaybreaks
+  %
+  \equiv   & - \sum\limits_{i,j,k}  \frac{1}{2}
+  \left(       \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right)  \;
+  \biggl\{   \frac{b_t}{e_{3t}} \partial_t (e_{3t})  +  \delta_k \left[  W   \right]    \biggr\}    &&&\\
+  \allowdisplaybreaks
+  %
+  \equiv & +  \sum\limits_{i,j,k} \frac{1}{2} \delta_{k+1/2}   \left[ \overline{ u^2}^{\,i} + \overline{ v^2}^{\,j}   \right] \;  W
+  -  \sum\limits_{i,j,k} \frac{1}{2} \left(   \overline {u^2}^{\,i} + \overline {v^2}^{\,j}   \right) \;\partial_t b_t   &&& \\
+  \allowdisplaybreaks
+  %
+  \equiv   & + \sum\limits_{i,j,k} \frac{1} {2} \left(    \overline{\delta_{k+1/2} \left[ u^2 \right]}^{\,i}
+    + \overline{\delta_{k+1/2} \left[ v^2 \right]}^{\,j}    \right) \; W
+  -  \sum\limits_{i,j,k}  \left(  \frac{u^2}{2}\,\partial_t \overline{b_t}^{\,{i+1/2}}
+    + \frac{v^2}{2}\,\partial_t \overline{b_t}^{\,{j+1/2}}   \right)    &&& \\
+  \allowdisplaybreaks
+  \intertext{Assuming that $b_u= \overline{b_t}^{\,i+1/2}$ and $b_v= \overline{b_t}^{\,j+1/2}$, or at least that the time
+    derivative of these two equations is satisfied, it becomes:}
+  %
+  \equiv &     \sum\limits_{i,j,k} \frac{1} {2}
+  \biggl\{ \; \overline{W}^{\,i+1/2}\;\delta_{k+1/2} \left[ u^2 \right]
+  + \overline{W}^{\,j+1/2}\;\delta_{k+1/2} \left[ v^2 \right]  \;  \biggr\}
+  -  \sum\limits_{i,j,k}  \left(  \frac{u^2}{2}\,\partial_t b_u
+    + \frac{v^2}{2}\,\partial_t b_v   \right)    &&& \\
+  \allowdisplaybreaks
+  %
+  \equiv &     \sum\limits_{i,j,k}
+  \biggl\{ \; \overline{W}^{\,i+1/2}\; \overline {u}^{\,k+1/2}\; \delta_{k+1/2}[ u ]
+  + \overline{W}^{\,j+1/2}\; \overline {v}^{\,k+1/2}\; \delta_{k+1/2}[ v ]  \;  \biggr\}
+  -  \sum\limits_{i,j,k}  \left(  \frac{u^2}{2}\,\partial_t b_u
+    + \frac{v^2}{2}\,\partial_t b_v   \right)    &&& \\
+  %
+  \allowdisplaybreaks
+  \equiv  &  \sum\limits_{i,j,k}
+  \biggl\{ \; \frac{1} {b_u } \; \overline { \overline{W}^{\,i+1/2}\,\delta_{k+1/2}  \left[ u \right] }^{\,k} \;u\;b_u
+  + \frac{1} {b_v } \; \overline { \overline{W}^{\,j+1/2} \delta_{k+1/2}  \left[ v \right]  }^{\,k} \;v\;b_v  \; \biggr\}
+  -  \sum\limits_{i,j,k}  \left(  \frac{u^2}{2}\,\partial_t b_u
+    + \frac{v^2}{2}\,\partial_t b_v   \right)    &&& \\
+  %
+  \intertext{The first term provides the discrete expression for the vertical advection of momentum (ZAD),
+    while the second term corresponds exactly to \autoref{eq:INVARIANTS_KE+PE_vect_discrete}, therefore:}
+  \equiv&                   \int\limits_D \textbf{U}_h \cdot \text{ZAD} \;dv
+  + \frac{1}{2} \int_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t  (e_3)  \;dv }    &&&\\
+  \equiv&                   \int\limits_D \textbf{U}_h \cdot w \partial_k \textbf{U}_h \;dv
+  + \frac{1}{2} \int_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t  (e_3)  \;dv }    &&&\\
+\end{flalign*}
+
+There is two main points here.
+First, the satisfaction of this property links the choice of the discrete formulation of the vertical advection and
+of the horizontal gradient of KE.
+Choosing one imposes the other.
+For example KE can also be discretized as $1/2\,({\overline u^{\,i}}^2 + {\overline v^{\,j}}^2)$.
+This leads to the following expression for the vertical advection:
+\[
+  \frac{1} {e_3 }\; \omega\; \partial_k \textbf{U}_h
+  \equiv \left( {{
+        \begin{array} {*{20}c}
+          \frac{1} {e_{1u}\,e_{2u}\,e_{3u}} \;  \overline{\overline {e_{1t}\,e_{2t} \,\omega\;\delta_{k+1/2}
+          \left[ \overline u^{\,i+1/2} \right]}}^{\,i+1/2,k}  \hfill \\
+          \frac{1} {e_{1v}\,e_{2v}\,e_{3v}} \;   \overline{\overline {e_{1t}\,e_{2t} \,\omega \;\delta_{k+1/2}
+          \left[ \overline v^{\,j+1/2} \right]}}^{\,j+1/2,k} \hfill
+        \end{array}
+      } } \right)
+\]
+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.
+
+Second, as soon as the chosen $s$-coordinate depends on time,
+an extra constraint arises on the time derivative of the volume at $u$- and $v$-points:
+\begin{flalign*}
+  e_{1u}\,e_{2u}\,\partial_t (e_{3u}) =\overline{ e_{1t}\,e_{2t}\;\partial_t (e_{3t}) }^{\,i+1/2}    \\
+  e_{1v}\,e_{2v}\,\partial_t (e_{3v})  =\overline{ e_{1t}\,e_{2t}\;\partial_t (e_{3t}) }^{\,j+1/2}
+\end{flalign*}
+which is (over-)satified by defining the vertical scale factor as follows:
+\begin{flalign*}
+  % \label{eq:INVARIANTS_e3u-e3v}
+  e_{3u} = \frac{1}{e_{1u}\,e_{2u}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,i+1/2}    \\
+  e_{3v} = \frac{1}{e_{1v}\,e_{2v}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,j+1/2}
+\end{flalign*}
+
+Blah blah required on the the step representation of bottom topography.....
+
+%% =================================================================================================
+\subsection{Pressure gradient term}
+\label{subsec:INVARIANTS_2.6}
+
+\cmtgm{
+  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}).
+}
+
+When the equation of state is linear
+(\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:
+\[
+  - \int_D  \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv
+  = - \int_D \nabla \cdot \left( \rho \,\textbf {U} \right) \,g\,z \;dv
+  + \int_D g\, \rho \; \partial_t (z)  \;dv
+\]
+
+This property can be satisfied in a discrete sense for both $z$- and $s$-coordinates.
+Indeed, defining the depth of a $T$-point, $z_t$,
+as the sum of the vertical scale factors at $w$-points starting from the surface,
+the work of pressure forces can be written as:
+\begin{flalign*}
+  &- \int_D  \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv
+  \equiv \sum\limits_{i,j,k} \biggl\{ \;  - \frac{1} {e_{1u}}   \Bigl(
+  \delta_{i+1/2} [p_t] - g\;\overline \rho^{\,i+1/2}\;\delta_{i+1/2} [z_t]     \Bigr)  \; u\;b_u && \\
+  & \qquad \qquad  \qquad \qquad  \qquad \quad \ \,
+  - \frac{1} {e_{2v}}    \Bigl(
+  \delta_{j+1/2} [p_t] - g\;\overline \rho^{\,j+1/2}\delta_{j+1/2} [z_t]      \Bigr)  \; v\;b_v \;  \biggr\}   && \\
+  %
+  \allowdisplaybreaks
+  \intertext{Using successively \autoref{eq:DOM_di_adj}, \ie\ the skew symmetry property of
+    the $\delta$ operator, \autoref{eq:DYN_wzv}, the continuity equation, \autoref{eq:DYN_hpg_sco},
+    the hydrostatic equation in the $s$-coordinate, and $\delta_{k+1/2} \left[ z_t \right] \equiv e_{3w} $,
+    which comes from the definition of $z_t$, it becomes: }
+  \allowdisplaybreaks
+  %
+  \equiv& +  \sum\limits_{i,j,k}   g  \biggl\{
+  \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t]
+  +  	\overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t]
+  +\Bigl(  \delta_i[U] + \delta_j [V]  \Bigr)\;\frac{p_t}{g} \biggr\}  &&\\
+  %
+  \equiv& +  \sum\limits_{i,j,k}   g   \biggl\{
+  \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t]
+  +  	\overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t]
+  -       \left(   \frac{b_t}{e_{3t}} \partial_t (e_{3t})  +  \delta_k \left[ W \right]    \right) \frac{p_t}{g}    \biggr\}   &&&\\
+  %
+  \equiv& +  \sum\limits_{i,j,k}  g   \biggl\{
+  \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t]
+  +  	\overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t]
+  +	\frac{W}{g}\;\delta_{k+1/2} [p_t]
+  -        \frac{p_t}{g}\,\partial_t b_t    \biggr\}    &&&\\
+  %
+  \equiv& +  \sum\limits_{i,j,k}  g   \biggl\{
+  \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t]
+  +  	\overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t]
+  - 	W\;e_{3w} \overline \rho^{\,k+1/2}
+  -        \frac{p_t}{g}\,\partial_t b_t    \biggr\}    &&&\\
+  %
+  \equiv& +  \sum\limits_{i,j,k}    g   \biggl\{
+  \overline\rho^{\,i+1/2}\,U\,\delta_{i+1/2}[z_t]
+  +  	\overline\rho^{\,j+1/2}\,V\,\delta_{j+1/2}[z_t]
+  + 	W\; \overline \rho^{\,k+1/2}\;\delta_{k+1/2} [z_t]
+  -        \frac{p_t}{g}\,\partial_t b_t    \biggr\}    &&&\\
+  %
+  \allowdisplaybreaks
+  %
+  \equiv& - \sum\limits_{i,j,k}   g \; z_t      \biggl\{
+  \delta_i 	\left[ U\;	\overline \rho^{\,i+1/2} 	\right]
+  + 	\delta_j 	\left[ V\;	\overline \rho^{\,j+1/2} 	\right]
+  + 	\delta_k 	\left[ W\;	\overline \rho^{\,k+1/2} 	\right]       \biggr\}
+  - \sum\limits_{i,j,k}       \biggl\{ p_t\;\partial_t b_t    \biggr\}   &&&\\
+  %
+  \equiv& + \sum\limits_{i,j,k}   g \; z_t    \biggl\{      \partial_t ( e_{3t} \,\rho)    \biggr\}  \; b_t
+  -  \sum\limits_{i,j,k}                 \biggl\{  p_t\;\partial_t b_t                     \biggr\}              &&&\\
+  %
+\end{flalign*}
+The first term is exactly the first term of the right-hand-side of \autoref{eq:INVARIANTS_KE+PE_vect_discrete}.
+It remains to demonstrate that the last term,
+which is obviously a discrete analogue of $\int_D \frac{p}{e_3} \partial_t (e_3)\;dv$ is equal to
+the last term of \autoref{eq:INVARIANTS_KE+PE_vect_discrete}.
+In other words, the following property must be satisfied:
+\begin{flalign*}
+  \sum\limits_{i,j,k}  \biggl\{  p_t\;\partial_t b_t                  \biggr\}
+  \equiv  \sum\limits_{i,j,k}  \biggl\{ \rho \,g\,\partial_t (z_t) \,b_t  \biggr\}
+\end{flalign*}
+
+Let introduce $p_w$ the pressure at $w$-point such that $\delta_k [p_w] = - \rho \,g\,e_{3t}$.
+The right-hand-side of the above equation can be transformed as follows:
+
+\begin{flalign*}
+  \sum\limits_{i,j,k}  \biggl\{ \rho \,g\,\partial_t (z_t) \,b_t  \biggr\}
+  &\equiv   - \sum\limits_{i,j,k}  \biggl\{ \delta_k [p_w]\,\partial_t (z_t) \,e_{1t}\,e_{2t}  \biggr\}        &&&\\
+  %
+  &\equiv  + \sum\limits_{i,j,k}  \biggl\{  p_w\, \delta_{k+1/2} [\partial_t (z_t)] \,e_{1t}\,e_{2t}  \biggr\}
+  \equiv  + \sum\limits_{i,j,k}  \biggl\{  p_w\, \partial_t (e_{3w}) \,e_{1t}\,e_{2t}  \biggr\}        &&&\\
+  &\equiv  + \sum\limits_{i,j,k}  \biggl\{  p_w\, \partial_t (b_w) \biggr\}
+  %
+  % & \equiv     \sum\limits_{i,j,k} \biggl\{  \frac{1}{e_{3t}} \delta_k [p_w]\;\partial_t (z_t) \,b_w   \right)   \biggr\}           &&&\\
+  % & \equiv     \sum\limits_{i,j,k} \biggl\{   p_w\;\partial_t \left(    \delta_k [z_t]   \right)  e_{1w}\,e_{2w}   \biggr\}           &&&\\
+  % & \equiv     \sum\limits_{i,j,k} \biggl\{   p_w\;\partial_t b_w   \biggr\}
+\end{flalign*}
+therefore, the balance to be satisfied is:
+\begin{flalign*}
+  \sum\limits_{i,j,k}  \biggl\{  p_t\;\partial_t (b_t) \biggr\}  \equiv  \sum\limits_{i,j,k}  \biggl\{  p_w\, \partial_t (b_w) \biggr\}
+\end{flalign*}
+which is a purely vertical balance:
+\begin{flalign*}
+  \sum\limits_{k}  \biggl\{  p_t\;\partial_t (e_{3t}) \biggr\}  \equiv  \sum\limits_{k}  \biggl\{  p_w\, \partial_t (e_{3w}) \biggr\}
+\end{flalign*}
+Defining $p_w = \overline{p_t}^{\,k+1/2}$
+
+%gm comment
+\cmtgm{
+  \begin{flalign*}
+    \sum\limits_{i,j,k} \biggl\{   p_t\;\partial_t b_t   \biggr\}                                &&&\\
+    %
+    & \equiv     \sum\limits_{i,j,k} \biggl\{  \frac{1}{e_{3t}} \delta_k [p_w]\;\partial_t (z_t) \,b_w    \biggr\}           &&&\\
+    & \equiv     \sum\limits_{i,j,k} \biggl\{   p_w\;\partial_t \left(    \delta_{k+1/2} [z_t]   \right)  e_{1w}\,e_{2w}   \biggr\}           &&&\\
+    & \equiv     \sum\limits_{i,j,k} \biggl\{   p_w\;\partial_t b_w   \biggr\}
+  \end{flalign*}
+
+  \begin{flalign*}
+    \int\limits_D   \rho \, g \, \frac{\partial z }{\partial t} \;dv
+    \equiv&  \sum\limits_{i,j,k}   \biggl\{  \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t} p   \biggr\} \; b_t   &&&\\
+    \equiv&  \sum\limits_{i,j,k}   \biggl\{      \biggr\} \; b_t   &&&\\
+  \end{flalign*}
+
+  %
+  \begin{flalign*}
+    \equiv& - \int_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv
+    + \int\limits_D g\, \rho \; \frac{\partial z}{\partial t}  \;dv     &&& \\
+  \end{flalign*}
+  %
+}
+%end gm comment
+
+Note that this property strongly constrains the discrete expression of both the depth of $T-$points and
+of the term added to the pressure gradient in the $s$-coordinate.
+Nevertheless, it is almost never satisfied since a linear equation of state is rarely used.
+
+%% =================================================================================================
+\section{Discrete total energy conservation: flux form}
+\label{sec:INVARIANTS_3}
+
+%% =================================================================================================
+\subsection{Total energy conservation}
+\label{subsec:INVARIANTS_KE+PE_flux}
+
+The discrete form of the total energy conservation, \autoref{eq:INVARIANTS_Tot_Energy}, is given by:
+\begin{flalign*}
+  \partial_t \left(  \sum\limits_{i,j,k} \biggl\{ \frac{u^2}{2} \,b_u + \frac{v^2}{2}\, b_v +  \rho \, g \, z_t \,b_t  \biggr\} \right) &=0  \\
+\end{flalign*}
+which in flux form, it leads to:
+\begin{flalign*}
+  \sum\limits_{i,j,k} \biggl\{  \frac{u    }{e_{3u}}\,\frac{\partial (e_{3u}u)}{\partial t} \,b_u
+  +  \frac{v    }{e_{3v}}\,\frac{\partial (e_{3v}v)}{\partial t} \,b_v  \biggr\}
+  &  -  \frac{1}{2} \sum\limits_{i,j,k} \biggl\{  \frac{u^2}{e_{3u}}\frac{\partial    e_{3u}    }{\partial t} \,b_u
+  +  \frac{v^2}{e_{3v}}\frac{\partial    e_{3v}    }{\partial t} \,b_v   \biggr\} \\
+  &= - \sum\limits_{i,j,k} \biggl\{ \frac{1}{e_3t}\frac{\partial e_{3t} \rho}{\partial t} \, g \, z_t \,b_t  \biggr\}
+  - \sum\limits_{i,j,k} \biggl\{ \rho \,g\,\frac{\partial z_t}{\partial t} \,b_t  \biggr\} \\
+\end{flalign*}
+
+Substituting the discrete expression of the time derivative of the velocity either in
+vector invariant or in flux form, leads to the discrete equivalent of the ????
+
+%% =================================================================================================
+\subsection{Coriolis and advection terms: flux form}
+\label{subsec:INVARIANTS_3.2}
+
+%% =================================================================================================
+\subsubsection{Coriolis plus ``metric'' term}
+\label{subsec:INVARIANTS_3.3}
+
+In flux from 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 discretised at an f-point.
+It is given by:
+\[
+  f+\frac{1} {e_1 e_2 } \left( v \frac{\partial e_2 } {\partial i} - u \frac{\partial e_1 } {\partial j}\right)\;
+  \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)
+\]
+
+Either the ENE or EEN scheme is then applied to obtain the vorticity term in flux form.
+It therefore conserves the total KE.
+The derivation is the same as for the vorticity term in the vector invariant form (\autoref{subsec:INVARIANTS_vor}).
+
+%% =================================================================================================
+\subsubsection{Flux form advection}
+\label{subsec:INVARIANTS_3.4}
+
+The flux form operator of the momentum advection is evaluated using
+a centered second order finite difference scheme.
+Because of the flux form, the discrete operator does not contribute to the global budget of linear momentum.
+Because of the centered second order scheme, it conserves the horizontal kinetic energy, that is:
+
+\begin{equation}
+  \label{eq:INVARIANTS_ADV_KE_flux}
+  -  \int_D \textbf{U}_h \cdot     \left(                 {{
+        \begin{array} {*{20}c}
+          \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\
+          \nabla \cdot \left( \textbf{U}\,v \right) \hfill \\
+        \end{array}
+      } }           \right)   \;dv
+  -   \frac{1}{2} \int_D {  {\textbf{U}_h}^2 \frac{1}{e_3} \frac{\partial  e_3 }{\partial t} \;dv } =\;0
+\end{equation}
+
+Let us first consider the first term of the scalar product
+(\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   \\
+  %
+  \equiv& - \sum\limits_{i,j,k} \biggl\{    \frac{1} {b_u}    \biggl(
+  \delta_{i+1/2}  \left[   \overline {U}^{\,i}      \;\overline u^{\,i}          \right]
+  + \delta_j           \left[   \overline {V}^{\,i+1/2}\;\overline u^{\,j+1/2}   \right]
+  + \delta_k          \left[   \overline {W}^{\,i+1/2}\;\overline u^{\,k+1/2} \right]  \biggr)   \;   \biggr\} \, b_u \;u &&&  \\
+  %
+  \equiv& - \sum\limits_{i,j,k}
+  \biggl\{
+  \delta_{i+1/2} \left[   \overline {U}^{\,i}\;  \overline u^{\,i}  \right]
+  + \delta_j          \left[   \overline {V}^{\,i+1/2}\;\overline u^{\,j+1/2}   \right]
+  + \delta_k         \left[   \overline {W}^{\,i+12}\;\overline u^{\,k+1/2}  \right]
+  \; \biggr\} \; u     \\
+  %
+  \equiv& + \sum\limits_{i,j,k}
+  \biggl\{
+  \overline {U}^{\,i}\;	\overline u^{\,i} 	\delta_i \left[ u \right]
+  + \overline {V}^{\,i+1/2}\;	\overline u^{\,j+1/2} 	\delta_{j+1/2} \left[ u \right]
+  + \overline {W}^{\,i+1/2}\;	\overline u^{\,k+1/2}	\delta_{k+1/2} 	\left[ u \right]     \biggr\}     && \\
+  %
+  \equiv& + \frac{1}{2} \sum\limits_{i,j,k}    \biggl\{
+  \overline{U}^{\,i} 		\delta_i 		\left[ u^2 \right]
+  + \overline{V}^{\,i+1/2} 	\delta_{j+/2} 	\left[ u^2 \right]
+  + \overline{W}^{\,i+1/2} 	\delta_{k+1/2} 	\left[ u^2 \right]      \biggr\} && \\
+  %
+  \equiv& -  \sum\limits_{i,j,k}    \frac{1}{2}   \bigg\{
+  U  \; \delta_{i+1/2}    \left[ \overline {u^2}^{\,i} \right]
+  + V  \; \delta_{j+1/2}    \left[ \overline {u^2}^{\,i} \right]
+  + W \; \delta_{k+1/2}   \left[ \overline {u^2}^{\,i} \right]     \biggr\}    &&& \\
+  %
+  \equiv& - \sum\limits_{i,j,k}  \frac{1}{2}  \overline {u^2}^{\,i}     \biggl\{
+  \delta_{i+1/2} 	\left[ U  \right]
+  + \delta_{j+1/2} 	\left[ V  \right]
+  + \delta_{k+1/2} 	\left[ W \right]     \biggr\}    &&& \\
+  %
+  \equiv& + \sum\limits_{i,j,k}  \frac{1}{2}  \overline {u^2}^{\,i}
+  \biggl\{     \left(   \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t}   \right) \; b_t     \biggr\}    &&& \\
+\end{flalign*}
+Applying similar manipulation applied to the second term of the scalar product leads to:
+\[
+  -  \int_D \textbf{U}_h \cdot     \left(                 {{
+        \begin{array} {*{20}c}
+          \nabla \cdot \left( \textbf{U}\,u \right) \hfill \\
+          \nabla \cdot \left( \textbf{U}\,v \right) \hfill \\
+        \end{array}
+      } }           \right)   \;dv
+  \equiv + \sum\limits_{i,j,k}  \frac{1}{2}  \left( \overline {u^2}^{\,i} + \overline {v^2}^{\,j} \right)
+  \biggl\{     \left(   \frac{1}{e_{3t}} \frac{\partial e_{3t}}{\partial t}   \right) \; b_t     \biggr\}
+\]
+which is the discrete form of $ \frac{1}{2} \int_D u \cdot \nabla \cdot \left(   \textbf{U}\,u   \right) \; dv $.
+\autoref{eq:INVARIANTS_ADV_KE_flux} is thus satisfied.
+
+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).
+
+%% =================================================================================================
+\section{Discrete enstrophy conservation}
+\label{sec:INVARIANTS_4}
+
+%% =================================================================================================
+\subsubsection{Vorticity term with ENS scheme  (\protect\np[=.true.]{ln_dynvor_ens}{ln\_dynvor\_ens})}
+\label{subsec:INVARIANTS_vorENS}
+
+In the ENS scheme, the vorticity term is descretized as follows:
+\begin{equation}
+  \label{eq:INVARIANTS_dynvor_ens}
+  \left\{
+    \begin{aligned}
+      +\frac{1}{e_{1u}} & \overline{q}^{\,i}  & {\overline{ \overline{\left( e_{1v}\,e_{3v}\;  v \right) } } }^{\,i, j+1/2}    \\
+      - \frac{1}{e_{2v}} & \overline{q}^{\,j}  & {\overline{ \overline{\left( e_{2u}\,e_{3u}\; u \right) } } }^{\,i+1/2, j}
+    \end{aligned}
+  \right.
+\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$).
+Indeed, using the symmetry or skew symmetry properties of the operators
+( \autoref{eq:DOM_mi_adj} and \autoref{eq:DOM_di_adj}),
+it can be shown that:
+\begin{equation}
+  \label{eq:INVARIANTS_1.1}
+  \int_D {q\,\;{\textbf{k}}\cdot \frac{1} {e_3} \nabla \times \left( {e_3 \, q \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} \equiv 0
+\end{equation}
+where $dv=e_1\,e_2\,e_3 \; di\,dj\,dk$ is the volume element.
+Indeed, using \autoref{eq:DYN_vor_ens},
+the discrete form of the right hand side of \autoref{eq:INVARIANTS_1.1} can be transformed as follow:
+\begin{flalign*}
+  &\int_D q \,\; \textbf{k} \cdot \frac{1} {e_3 } \nabla \times
+  \left(  e_3 \, q \; \textbf{k} \times  \textbf{U}_h   \right)\;   dv \\
+  %
+  & \qquad
+  {
+    \begin{array}{*{20}l}
+      &\equiv \sum\limits_{i,j,k}
+        q \ \left\{  \delta_{i+1/2}  \left[ - \,\overline {q}^{\,i}\;  \overline{\overline  U }^{\,i,j+1/ 2} \right]
+        - \delta_{j+1/2} \left[	 \overline {q}^{\,j}\;  \overline{\overline  V }^{\,i+1/2, j} \right]     \right\}    \\
+      %
+      &\equiv \sum\limits_{i,j,k}
+        \left\{   \delta_i [q] \; \overline{q}^{\,i} \; \overline{  \overline U  }^{\,i,j+1/2}
+        + \delta_j [q] \; \overline{q}^{\,j} \; \overline{\overline V }^{\,i+1/2,j}        \right\}       &&  \\
+      %
+      &\equiv \,\frac{1} {2} \sum\limits_{i,j,k}
+        \left\{         \delta_i  \left[ q^2 \right] \; \overline{\overline U }^{\,i,j+1/2}
+        + \delta_j  \left[ q^2 \right] \; \overline{\overline V }^{\,i+1/2,j}      \right\}    &&  \\
+      %
+      &\equiv - \frac{1} {2} \sum\limits_{i,j,k} 	q^2 \;
+        \left\{    \delta_{i+1/2}   \left[   \overline{\overline{ U }}^{\,i,j+1/2}    \right]
+        + \delta_{j+1/2}  \left[   \overline{\overline{ V }}^{\,i+1/2,j}     \right]    \right\}    && \\
+    \end{array}
+  }
+  %
+  \allowdisplaybreaks
+  \intertext{ Since $\overline {\;\cdot \;} $ and $\delta $ operators commute: $\delta_{i+1/2}
+    \left[ {\overline a^{\,i}} \right] = \overline {\delta_i \left[ a \right]}^{\,i+1/2}$,
+    and introducing the horizontal divergence $\chi $, it becomes: }
+  \allowdisplaybreaks
+  %
+  & \qquad {
+    \begin{array}{*{20}l}
+      &\equiv \sum\limits_{i,j,k} - \frac{1} {2} q^2 \; \overline{\overline{ e_{1t}\,e_{2t}\,e_{3t}^{}\, \chi}}^{\,i+1/2,j+1/2}
+        \quad \equiv 0 &&
+    \end{array}
+  }
+\end{flalign*}
+The later equality is obtain only when the flow is horizontally non-divergent, \ie\ $\chi$=$0$.
+
+%% =================================================================================================
+\subsubsection{Vorticity Term with EEN scheme (\protect\np[=.true.]{ln_dynvor_een}{ln\_dynvor\_een})}
+\label{subsec:INVARIANTS_vorEEN}
+
+With the EEN scheme, the vorticity terms are represented as:
+\begin{equation}
+  \label{eq:INVARIANTS_dynvor_een2}
+  \left\{ {
+      \begin{aligned}
+        +q\,e_3 \, v 	&\equiv +\frac{1}{e_{1u} }   \sum_{\substack{i_p,\,k_p}}
+        {^{i+1/2-i_p}_j}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{1v} e_{3v} \ v  \right)^{i+i_p-1/2}_{j+j_p}   \\
+        - q\,e_3 \, u     &\equiv -\frac{1}{e_{2v} }    \sum_{\substack{i_p,\,k_p}}
+        {^i_{j+1/2-j_p}}  \mathbb{Q}^{i_p}_{j_p}  \left( e_{2u} e_{3u} \ u  \right)^{i+i_p}_{j+j_p-1/2}   \\
+      \end{aligned}
+    } \right.
+\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:
+\begin{equation}
+  \tag{\ref{eq:INVARIANTS_Q_triads}}
+  _i^j \mathbb{Q}^{i_p}_{j_p}
+  = \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}
+
+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} $,
+similar manipulation can be done for the 3 others.
+The discrete form of the right hand side of \autoref{eq:INVARIANTS_1.1} applied to
+this triad only can be transformed as follow:
+
+\begin{flalign*}
+  &\int_D {q\,\;{\textbf{k}}\cdot \frac{1} {e_3} \nabla \times \left( {e_3 \, q \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} \\
+  %
+  \equiv& \sum\limits_{i,j,k}
+  {q} \    \biggl\{ \;\;
+  \delta_{i+1/2} \left[   -\, {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}  \; U^{i+1/2}_{j}}    \right]
+  - \delta_{j+1/2} \left[       {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}  \; V^{i}_{j+1/2}}    \right]
+  \;\;\biggr\}        &&  \\
+  %
+  \equiv& \sum\limits_{i,j,k}
+  \biggl\{   \delta_i [q] \  {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}  \; U^{i+1/2}_{j}}
+  + \delta_j [q] \  {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}  \; V^{i}_{j+1/2}}   \biggr\}
+  && \\
+  %
+  ... & &&\\
+  &Demonstation \ to \ be \ done... &&\\
+  ... & &&\\
+  %
+  \equiv& \frac{1} {2} \sum\limits_{i,j,k}
+  \biggl\{	\delta_i    \Bigl[    \left(  {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2   \Bigr]\;
+  \overline{\overline {U}}^{\,i,j+1/2}
+  + \delta_j 	\Bigl[    \left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2     \Bigr]\;
+  \overline{\overline {V}}^{\,i+1/2,j}
+  \biggr\}
+  &&  \\
+  %
+  \equiv& - \frac{1} {2} \sum\limits_{i,j,k} 	\left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2\;
+  \biggl\{    \delta_{i+1/2}
+  \left[   \overline{\overline {U}}^{\,i,j+1/2}    \right]
+  + \delta_{j+1/2}
+  \left[   \overline{\overline {V}}^{\,i+1/2,j}     \right]
+  \biggr\}    && \\
+  %
+  \equiv& \sum\limits_{i,j,k} - \frac{1} {2} \left( {{^i_j}\mathbb{Q}^{+1/2}_{+1/2}} \right)^2
+  \; \overline{\overline{ b_t^{}\, \chi}}^{\,i+1/2,\,j+1/2}  &&\\
+  %
+  \ \ \equiv& \ 0     &&\\
+\end{flalign*}
+
+%% =================================================================================================
+\section{Conservation properties on tracers}
+\label{sec:INVARIANTS_5}
+
+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.
+Nevertheless the other schemes ensure that the global variance decreases
+(\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.
+%% =================================================================================================
+\subsection{Advection term}
+\label{subsec:INVARIANTS_5.1}
+
+conservation of a tracer, $T$:
+\[
+  \frac{\partial }{\partial t} \left(   \int_D {T\;dv}   \right)
+  =  \int_D { \frac{1}{e_3}\frac{\partial \left( e_3 \, T \right)}{\partial t} \;dv }=0
+\]
+
+conservation of its variance:
+\begin{flalign*}
+  \frac{\partial }{\partial t} \left( \int_D {\frac{1}{2} T^2\;dv} \right)
+  =&  \int_D { \frac{1}{e_3} Q      \frac{\partial \left( e_3 \, T \right) }{\partial t} \;dv }
+  -   \frac{1}{2} \int_D {  T^2 \frac{1}{e_3} \frac{\partial  e_3 }{\partial t} \;dv }
+\end{flalign*}
+
+Whatever the advection scheme considered it conserves of the tracer content as
+all the scheme are written in flux form.
+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:
+\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    &&&\\
+  &\equiv - \sum\limits_{i,j,k}    \biggl\{
+  \frac{1} {b_t}  \left(  \delta_i    \left[   U \;\tau_u   \right]
+    + \delta_j    \left[   V  \;\tau_v   \right] \right)
+  + \frac{1} {e_{3t}} \delta_k \left[ w\;\tau_w \right]    \biggl\}  b_t   &&&\\
+  %
+  &\equiv - \sum\limits_{i,j,k}     \left\{
+    \delta_i  \left[   U \;\tau_u   \right]
+    + \delta_j  \left[   V  \;\tau_v   \right]
+ 	 + \delta_k \left[ W \;\tau_w \right] \right\}   && \\
+  &\equiv 0 &&&
+\end{flalign*}
+
+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}$.
+It can be demonstarted as follows:
+\begin{flalign*}
+  &\int_D { \frac{1}{e_3} Q      \frac{\partial \left( e_3 \, T \right) }{\partial t} \;dv }
+  = - \int\limits_D \tau\;\nabla \cdot \left( T\; \textbf{U} \right)\;dv &&&\\
+  \equiv& - \sum\limits_{i,j,k} T\;
+  \left\{
+    \delta_i  \left[ U  \overline T^{\,i+1/2}  \right]
+    + \delta_j  \left[ V  \overline T^{\,j+1/2}  \right]
+    + \delta_k \left[ W \overline T^{\,k+1/2} \right]          \right\} && \\
+  \equiv& + \sum\limits_{i,j,k}
+  \left\{     U  \overline T^{\,i+1/2} \,\delta_{i+1/2}  \left[ T \right]
+    +  V  \overline T^{\,j+1/2} \;\delta_{j+1/2}  \left[ T \right]
+    +  W \overline T^{\,k+1/2}\;\delta_{k+1/2} \left[ T \right]     \right\}      &&\\
+  \equiv&  + \frac{1} {2}  \sum\limits_{i,j,k}
+  \Bigl\{   U  \;\delta_{i+1/2} \left[ T^2 \right]
+  + V  \;\delta_{j+1/2}  \left[ T^2 \right]
+  + W \;\delta_{k+1/2} \left[ T^2 \right]   \Bigr\}     && \\
+  \equiv& - \frac{1} {2}  \sum\limits_{i,j,k} T^2
+  \Bigl\{    \delta_i  \left[ U  \right]
+  + \delta_j  \left[ V  \right]
+  + \delta_k \left[ W \right]     \Bigr\}      &&&  \\
+  \equiv& + \frac{1} {2}  \sum\limits_{i,j,k} T^2
+  \Bigl\{   \frac{1}{e_{3t}} \frac{\partial e_{3t}\,T }{\partial t}     \Bigr\}      &&& \\
+\end{flalign*}
+which is the discrete form of $ \frac{1}{2} \int_D {  T^2 \frac{1}{e_3} \frac{\partial  e_3 }{\partial t} \;dv }$.
+
+%% =================================================================================================
+\section{Conservation properties on lateral momentum physics}
+\label{sec:INVARIANTS_dynldf_properties}
+
+The discrete formulation of the horizontal diffusion of momentum ensures
+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
+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}.
+
+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.
+
+%% =================================================================================================
+\subsection{Conservation of potential vorticity}
+\label{subsec:INVARIANTS_6.1}
+
+The lateral momentum diffusion term conserves the potential vorticity:
+\begin{flalign*}
+  &\int \limits_D \frac{1} {e_3 } \textbf{k} \cdot \nabla \times
+  \Bigl[    \nabla_h  \left( A^{\,lm}\;\chi  \right)
+  - \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right)    \Bigr]\;dv   \\
+  % \end{flalign*}
+  %%%%%%%%%% recheck here....  (gm)
+  % \begin{flalign*}
+  =& \int \limits_D  -\frac{1} {e_3 } \textbf{k} \cdot \nabla \times
+  \Bigl[ \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right)  \Bigr]\;dv  \\
+  % \end{flalign*}
+  % \begin{flalign*}
+  \equiv& \sum\limits_{i,j}
+  \left\{
+    \delta_{i+1/2} \left[  \frac {e_{2v}} {e_{1v}\,e_{3v}}  \delta_i \left[ A_f^{\,lm} e_{3f} \zeta  \right]  \right]
+    + \delta_{j+1/2} \left[  \frac {e_{1u}} {e_{2u}\,e_{3u}}  \delta_j \left[ A_f^{\,lm} e_{3f} \zeta  \right]  \right]
+  \right\} 	 \\
+  %
+  \intertext{Using \autoref{eq:DOM_di_adj}, it follows:}
+  %
+  \equiv& \sum\limits_{i,j,k}
+  -\,\left\{
+    \frac{e_{2v}} {e_{1v}\,e_{3v}}  \delta_i	\left[ A_f^{\,lm} e_{3f} \zeta  \right]\;\delta_i \left[ 1\right]
+	 + \frac{e_{1u}} {e_{2u}\,e_{3u}}  \delta_j 	\left[ A_f^{\,lm} e_{3f} \zeta  \right]\;\delta_j \left[ 1\right]
+  \right\} \quad \equiv 0
+  \\
+\end{flalign*}
+
+%% =================================================================================================
+\subsection{Dissipation of horizontal kinetic energy}
+\label{subsec:INVARIANTS_6.2}
+
+The lateral momentum diffusion term dissipates the horizontal kinetic energy:
+%\begin{flalign*}
+\[
+  \begin{split}
+    \int_D \textbf{U}_h \cdot
+    \left[ \nabla_h 		\right.   &     \left.       \left( A^{\,lm}\;\chi \right)
+      - \nabla_h \times  \left( A^{\,lm}\;\zeta \;\textbf{k} \right)     \right] \; dv    \\
+    \\  %%%
+    \equiv& \sum\limits_{i,j,k}
+    \left\{
+      \frac{1} {e_{1u}}               \delta_{i+1/2} \left[  A_T^{\,lm}          \chi     \right]
+      - \frac{1} {e_{2u}\,e_{3u}}  \delta_j           \left[ A_f^{\,lm} e_{3f} \zeta   \right]
+    \right\} \; e_{1u}\,e_{2u}\,e_{3u} \;u     \\
+    &\;\; + 	\left\{
+	   \frac{1} {e_{2u}}             \delta_{j+1/2}	\left[ A_T^{\,lm}          \chi    \right]
+      + \frac{1} {e_{1v}\,e_{3v}} \delta_i            \left[ A_f^{\,lm} e_{3f} \zeta  \right]
+    \right\} \; e_{1v}\,e_{2u}\,e_{3v} \;v     \qquad \\
+    \\  %%%
+    \equiv& \sum\limits_{i,j,k}
+    \Bigl\{
+    e_{2u}\,e_{3u} \;u\;  \delta_{i+1/2} \left[ A_T^{\,lm}           \chi    \right]
+    - e_{1u}             \;u\;  \delta_j           \left[ A_f^{\,lm} e_{3f} \zeta  \right]
+	 \Bigl\}
+	 \\
+    &\;\; + \Bigl\{
+    e_{1v}\,e_{3v} \;v\;  \delta_{j+1/2}  \left[ A_T^{\,lm}           \chi    \right]
+    + e_{2v}             \;v\;  \delta_i            \left[ A_f^{\,lm} e_{3f} \zeta  \right]
+    \Bigl\}      \\
+    \\  %%%
+    \equiv& \sum\limits_{i,j,k}
+    - \Bigl(
+    \delta_i   \left[  e_{2u}\,e_{3u} \;u  \right]
+    + \delta_j  \left[  e_{1v}\,e_{3v}  \;v  \right]
+    \Bigr) \;  A_T^{\,lm} \chi   \\
+    &\;\; - \Bigl(
+    \delta_{i+1/2}  \left[  e_{2v}  \;v  \right]
+    - \delta_{j+1/2}  \left[  e_{1u} \;u  \right]
+    \Bigr)\;  A_f^{\,lm} e_{3f} \zeta      \\
+    \\  %%%
+    \equiv& \sum\limits_{i,j,k}
+    - A_T^{\,lm}  \,\chi^2   \;e_{1t}\,e_{2t}\,e_{3t}
+    - A_f ^{\,lm}  \,\zeta^2 \;e_{1f }\,e_{2f }\,e_{3f}
+    \quad \leq 0       \\
+  \end{split}
+\]
+
+%% =================================================================================================
+\subsection{Dissipation of enstrophy}
+\label{subsec:INVARIANTS_6.3}
+
+The lateral momentum diffusion term dissipates the enstrophy when the eddy coefficients are horizontally uniform:
+\begin{flalign*}
+  &\int\limits_D  \zeta \; \textbf{k} \cdot \nabla \times
+  \left[   \nabla_h \left( A^{\,lm}\;\chi  \right)
+    - \nabla_h \times \left( A^{\,lm}\;\zeta \; \textbf{k} \right)   \right]\;dv &&&\\
+  &\quad = A^{\,lm} \int \limits_D \zeta \textbf{k} \cdot \nabla \times
+  \left[    \nabla_h \times \left( \zeta \; \textbf{k} \right)   \right]\;dv &&&\\
+  &\quad \equiv A^{\,lm} \sum\limits_{i,j,k}  \zeta \;e_{3f}
+  \left\{     \delta_{i+1/2} \left[  \frac{e_{2v}} {e_{1v}\,e_{3v}} \delta_i \left[ e_{3f} \zeta  \right]   \right]
+    + \delta_{j+1/2} \left[  \frac{e_{1u}} {e_{2u}\,e_{3u}} \delta_j \left[ e_{3f} \zeta  \right]   \right]      \right\}   &&&\\
+  %
+  \intertext{Using \autoref{eq:DOM_di_adj}, it follows:}
+  %
+  &\quad \equiv  - A^{\,lm} \sum\limits_{i,j,k}
+  \left\{    \left(  \frac{1} {e_{1v}\,e_{3v}}  \delta_i \left[ e_{3f} \zeta  \right]  \right)^2   b_v
+    + \left(  \frac{1} {e_{2u}\,e_{3u}}  \delta_j \left[ e_{3f} \zeta  \right] \right)^2   b_u  \right\}  \quad \leq \;0    &&&\\
+\end{flalign*}
+
+%% =================================================================================================
+\subsection{Conservation of horizontal divergence}
+\label{subsec:INVARIANTS_6.4}
+
+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 resulting term conserves the $\chi$ and dissipates $\chi^2$ when the eddy coefficients are horizontally uniform.
+\begin{flalign*}
+  & \int\limits_D  \nabla_h \cdot
+  \Bigl[     \nabla_h \left( A^{\,lm}\;\chi \right)
+  - \nabla_h \times \left( A^{\,lm}\;\zeta \;\textbf{k} \right)    \Bigr]  dv
+  = \int\limits_D  \nabla_h \cdot \nabla_h \left( A^{\,lm}\;\chi  \right)   dv   \\
+  %
+  &\equiv \sum\limits_{i,j,k}
+  \left\{   \delta_i \left[ A_u^{\,lm} \frac{e_{2u}\,e_{3u}} {e_{1u}}  \delta_{i+1/2} \left[ \chi \right]  \right]
+    + \delta_j \left[ A_v^{\,lm} \frac{e_{1v}\,e_{3v}} {e_{2v}}  \delta_{j+1/2} \left[ \chi \right]  \right]    \right\}    \\
+  %
+  \intertext{Using \autoref{eq:DOM_di_adj}, it follows:}
+  %
+  &\equiv \sum\limits_{i,j,k}
+  - \left\{   \frac{e_{2u}\,e_{3u}} {e_{1u}}  A_u^{\,lm} \delta_{i+1/2} \left[ \chi \right] \delta_{i+1/2} \left[ 1 \right]
+    + \frac{e_{1v}\,e_{3v}} {e_{2v}}  A_v^{\,lm} \delta_{j+1/2} \left[ \chi \right] \delta_{j+1/2} \left[ 1 \right]    \right\}
+  \quad \equiv 0
+\end{flalign*}
+
+%% =================================================================================================
+\subsection{Dissipation of horizontal divergence variance}
+\label{subsec:INVARIANTS_6.5}
+
+\begin{flalign*}
+  &\int\limits_D \chi \;\nabla_h \cdot
+  \left[    \nabla_h              \left( A^{\,lm}\;\chi                    \right)
+    - \nabla_h   \times  \left( A^{\,lm}\;\zeta \;\textbf{k} \right)    \right]\;  dv
+  = A^{\,lm}   \int\limits_D \chi \;\nabla_h \cdot \nabla_h \left( \chi \right)\;  dv    \\
+  %
+  &\equiv A^{\,lm}  \sum\limits_{i,j,k}  \frac{1} {e_{1t}\,e_{2t}\,e_{3t}}  \chi
+  \left\{
+    \delta_i  \left[   \frac{e_{2u}\,e_{3u}} {e_{1u}}  \delta_{i+1/2} \left[ \chi \right]   \right]
+    + \delta_j  \left[   \frac{e_{1v}\,e_{3v}} {e_{2v}}   \delta_{j+1/2} \left[ \chi \right]   \right]
+  \right\} \;   e_{1t}\,e_{2t}\,e_{3t}    \\
+  %
+  \intertext{Using \autoref{eq:DOM_di_adj}, it turns out to be:}
+  %
+  &\equiv - A^{\,lm} \sum\limits_{i,j,k}
+  \left\{    \left(  \frac{1} {e_{1u}}  \delta_{i+1/2}  \left[ \chi \right]  \right)^2  b_u
+    + \left(  \frac{1} {e_{2v}}  \delta_{j+1/2}  \left[ \chi \right]  \right)^2  b_v    \right\}
+  \quad \leq 0
+\end{flalign*}
+
+%% =================================================================================================
+\section{Conservation properties on vertical momentum physics}
+\label{sec:INVARIANTS_7}
+
+As for the lateral momentum physics,
+the continuous form of the vertical diffusion of momentum satisfies several integral constraints.
+The first two are associated with the conservation of momentum and the dissipation of horizontal kinetic energy:
+\begin{align*}
+  \int\limits_D   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
+  \left(   \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}   \right)\;  dv
+  \qquad \quad &= \vec{\textbf{0}}
+  %
+  \intertext{and}
+  %
+                 \int\limits_D
+                 \textbf{U}_h \cdot   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
+                 \left(   \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}   \right)\; dv    \quad &\leq 0
+\end{align*}
+
+The first property is obvious.
+The second results from:
+\begin{flalign*}
+  \int\limits_D
+  \textbf{U}_h \cdot   \frac{1} {e_3 }\; \frac{\partial } {\partial k}
+  \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}   \right)\;dv    &&&\\
+\end{flalign*}
+\begin{flalign*}
+  &\equiv \sum\limits_{i,j,k}
+  \left(
+    u\; \delta_k \left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2}  \left[ u \right]  \right]\;  e_{1u}\,e_{2u}
+    + v\; \delta_k \left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2}   \left[ v \right]  \right]\;  e_{1v}\,e_{2v} \right)   &&&
+  %
+  \intertext{since the horizontal scale factor does not depend on $k$, it follows:}
+  %
+  &\equiv - \sum\limits_{i,j,k}
+  \left(  \frac{A_u^{\,vm}} {e_{3uw}} \left( \delta_{k+1/2} \left[ u \right] \right)^2\; e_{1u}\,e_{2u}
+    + \frac{A_v^{\,vm}} {e_{3vw}}  \left( \delta_{k+1/2} \left[ v \right] \right)^2\; e_{1v}\,e_{2v}  \right)
+  \quad \leq 0   &&&
+\end{flalign*}
+
+The vorticity is also conserved.
+Indeed:
+\begin{flalign*}
+  \int \limits_D
+  \frac{1} {e_3 } \textbf{k} \cdot \nabla \times
+  \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k}  \left(
+      \frac{A^{\,vm}} {e_3}\; \frac{\partial \textbf{U}_h } {\partial k}
+    \right)  \right)\; dv   &&&
+\end{flalign*}
+\begin{flalign*}
+  \equiv \sum\limits_{i,j,k}  \frac{1} {e_{3f}}\; \frac{1} {e_{1f}\,e_{2f}}
+  \bigg\{    \biggr.   \quad
+  \delta_{i+1/2}
+  &\left(   \frac{e_{2v}} {e_{3v}} \delta_k  \left[  \frac{1} {e_{3vw}} \delta_{k+1/2} \left[ v \right]  \right]  \right)   &&\\
+  \biggl.
+  - \delta_{j+1/2}
+  &\left(   \frac{e_{1u}} {e_{3u}} \delta_k \left[  \frac{1} {e_{3uw}}\delta_{k+1/2} \left[ u \right]  \right]   \right)
+  \biggr\} \;
+  e_{1f}\,e_{2f}\,e_{3f} \; \equiv 0   &&
+\end{flalign*}
+
+If the vertical diffusion coefficient is uniform over the whole domain, the enstrophy is dissipated, \ie
+\begin{flalign*}
+  \int\limits_D \zeta \, \textbf{k} \cdot \nabla \times
+  \left(   \frac{1} {e_3}\; \frac{\partial } {\partial k}
+    \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}   \right)   \right)\; dv = 0   &&&
+\end{flalign*}
+
+This property is only satisfied in $z$-coordinates:
+\begin{flalign*}
+  \int\limits_D \zeta \, \textbf{k} \cdot \nabla \times
+  \left(  \frac{1} {e_3}\; \frac{\partial } {\partial k}
+    \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}  \right)   \right)\; dv   &&&
+\end{flalign*}
+\begin{flalign*}
+  \equiv \sum\limits_{i,j,k} \zeta \;e_{3f} \;
+  \biggl\{ 	\biggr.	\quad
+  \delta_{i+1/2}
+  &\left(   \frac{e_{2v}} {e_{3v}} \delta_k \left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2}[v]  \right]   \right)   &&\\
+  - \delta_{j+1/2}
+  &\biggl.
+  \left(   \frac{e_{1u}} {e_{3u}} \delta_k \left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} [u]  \right]    \right) \biggr\}   &&
+\end{flalign*}
+\begin{flalign*}
+  \equiv \sum\limits_{i,j,k} \zeta \;e_{3f}
+  \biggl\{		\biggr.	\quad
+  \frac{1} {e_{3v}} \delta_k
+  &\left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} \left[ \delta_{i+1/2} \left[ e_{2v}\,v \right] \right]   \right]    &&\\
+  \biggl.
+  - \frac{1} {e_{3u}} \delta_k
+  &\left[  \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} \left[ \delta_{j+1/2} \left[ e_{1u}\,u \right] \right]  \right]  \biggr\}  &&
+\end{flalign*}
+Using the fact that the vertical diffusion coefficients are uniform,
+and that in $z$-coordinate, the vertical scale factors do not depend on $i$ and $j$ so that:
+$e_{3f} =e_{3u} =e_{3v} =e_{3t} $ and $e_{3w} =e_{3uw} =e_{3vw} $, it follows:
+\begin{flalign*}
+  \equiv A^{\,vm} \sum\limits_{i,j,k} \zeta \;\delta_k
+  \left[   \frac{1} {e_{3w}} \delta_{k+1/2} \Bigl[   \delta_{i+1/2} \left[ e_{2v}\,v \right]
+    - \delta_{j+1/ 2} \left[ e_{1u}\,u \right]   \Bigr]    \right]    &&&
+\end{flalign*}
+\begin{flalign*}
+  \equiv - A^{\,vm} \sum\limits_{i,j,k} \frac{1} {e_{3w}}
+  \left( \delta_{k+1/2} \left[ \zeta  \right] \right)^2 \; e_{1f}\,e_{2f}  \; \leq 0    &&&
+\end{flalign*}
+Similarly, the horizontal divergence is obviously conserved:
+
+\begin{flalign*}
+  \int\limits_D \nabla \cdot
+  \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k}
+    \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
+the vertical diffusion coefficient is uniform over the whole domain:
+
+\begin{flalign*}
+  \int\limits_D \chi \;\nabla \cdot
+  \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k}
+    \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k}  \right) \right)\;  dv = 0  &&&
+\end{flalign*}
+This property is only satisfied in the $z$-coordinate:
+\begin{flalign*}
+  \int\limits_D \chi \;\nabla \cdot
+  \left( \frac{1} {e_3 }\; \frac{\partial } {\partial k}
+    \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right)  \right)\; dv    &&&
+\end{flalign*}
+\begin{flalign*}
+  \equiv \sum\limits_{i,j,k} \frac{\chi } {e_{1t}\,e_{2t}}
+  \biggl\{ 	\Biggr.	\quad
+  \delta_{i+1/2}
+  &\left(   \frac{e_{2u}} {e_{3u}} \delta_k
+    \left[ \frac{A_u^{\,vm}} {e_{3uw}} \delta_{k+1/2} [u] \right] \right)    &&\\
+  \Biggl.
+  + \delta_{j+1/2}
+  &\left( \frac{e_{1v}} {e_{3v}} \delta_k
+    \left[ \frac{A_v^{\,vm}} {e_{3vw}} \delta_{k+1/2} [v] \right]   \right)
+  \Biggr\} \;  e_{1t}\,e_{2t}\,e_{3t}   &&
+\end{flalign*}
+
+\begin{flalign*}
+  \equiv A^{\,vm} \sum\limits_{i,j,k}  \chi \,
+  \biggl\{	\biggr.	\quad
+  \delta_{i+1/2}
+  &\left(
+    \delta_k \left[
+      \frac{1} {e_{3uw}} \delta_{k+1/2} \left[ e_{2u}\,u \right] \right]   \right)    && \\
+  \biggl.
+  + \delta_{j+1/2}
+  &\left(    \delta_k \left[
+      \frac{1} {e_{3vw}} \delta_{k+1/2} \left[ e_{1v}\,v \right] \right]   \right)   \biggr\}    &&
+\end{flalign*}
+
+\begin{flalign*}
+  \equiv -A^{\,vm} \sum\limits_{i,j,k}
+  \frac{\delta_{k+1/2} \left[ \chi \right]} {e_{3w}}\; \biggl\{
+  \delta_{k+1/2} \Bigl[
+  \delta_{i+1/2} \left[ e_{2u}\,u \right]
+  + \delta_{j+1/2} \left[ e_{1v}\,v \right]  \Bigr]    \biggr\}    &&&
+\end{flalign*}
+
+\begin{flalign*}
+  \equiv -A^{\,vm} \sum\limits_{i,j,k}
+  \frac{1} {e_{3w}} \delta_{k+1/2} \left[ \chi \right]\; \delta_{k+1/2} \left[ e_{1t}\,e_{2t} \;\chi \right]   &&&
+\end{flalign*}
+
+\begin{flalign*}
+  \equiv -A^{\,vm} \sum\limits_{i,j,k}
+  \frac{e_{1t}\,e_{2t}} {e_{3w}}\; \left( \delta_{k+1/2} \left[ \chi \right]  \right)^2     \quad  \equiv 0    &&&
+\end{flalign*}
+
+%% =================================================================================================
+\section{Conservation properties on tracer physics}
+\label{sec:INVARIANTS_8}
+
+The numerical schemes used for tracer subgridscale physics are written such that
+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.
+
+%% =================================================================================================
+\subsection{Conservation of tracers}
+\label{subsec:INVARIANTS_8.1}
+
+constraint of conservation of tracers:
+\begin{flalign*}
+  &\int\limits_D  \nabla  \cdot \left( A\;\nabla T \right)\;dv  &&& \\ \\
+  &\equiv \sum\limits_{i,j,k}
+  \biggl\{ 	\biggr.
+  \delta_i
+  \left[
+    A_u^{\,lT} \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2}
+    \left[ T \right]
+  \right]
+  + \delta_j
+  \left[
+    A_v^{\,lT} \frac{e_{1v}\,e_{3v}} {e_{2v}} \delta_{j+1/2}
+    \left[ T \right]
+  \right] && \\
+  & \qquad \qquad \qquad \qquad \qquad \qquad \quad \;\;\;
+  + \delta_k
+  \left[
+    A_w^{\,vT} \frac{e_{1t}\,e_{2t}} {e_{3t}} \delta_{k+1/2}
+    \left[ T \right]
+  \right]
+  \biggr\}   \quad  \equiv 0
+  &&
+\end{flalign*}
+
+In fact, this property simply results from the flux form of the operator.
+
+%% =================================================================================================
+\subsection{Dissipation of tracer variance}
+\label{subsec:INVARIANTS_8.2}
+
+constraint on the dissipation of tracer variance:
+\begin{flalign*}
+  \int\limits_D T\;\nabla & \cdot \left( A\;\nabla T \right)\;dv	&&&\\
+  &\equiv   \sum\limits_{i,j,k} \; T
+  \biggl\{  \biggr.
+  \delta_i \left[ A_u^{\,lT} \frac{e_{2u}\,e_{3u}} {e_{1u}} \delta_{i+1/2} \left[T\right] \right]
+  & + \delta_j \left[ A_v^{\,lT} \frac{e_{1v} \,e_{3v}} {e_{2v}} \delta_{j+1/2} \left[T\right] \right]
+  \quad&& \\
+  \biggl.
+  &&+ \delta_k \left[A_w^{\,vT}\frac{e_{1t}\,e_{2t}} {e_{3t}}\delta_{k+1/2}\left[T\right]\right]
+  \biggr\} &&
+\end{flalign*}
+\begin{flalign*}
+  \equiv - \sum\limits_{i,j,k}
+  \biggl\{ 	\biggr.	\quad
+  &    A_u^{\,lT} \left( \frac{1} {e_{1u}} \delta_{i+1/2} \left[ T \right]  \right)^2   e_{1u}\,e_{2u}\,e_{3u}    && \\
+  & + A_v^{\,lT} \left( \frac{1} {e_{2v}} \delta_{j+1/2} \left[ T \right]  \right)^2   e_{1v}\,e_{2v}\,e_{3v}     && \\ \biggl.
+  & + A_w^{\,vT} \left( \frac{1} {e_{3w}} \delta_{k+1/2} \left[ T \right]   \right)^2    e_{1w}\,e_{2w}\,e_{3w}   \biggr\}
+  \quad      \leq 0      &&
+\end{flalign*}
+
+%%%%  end of appendix in gm comment
+%}
+
+\subinc{\input{../../global/epilogue}}
+
+\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_s_coord.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_s_coord.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_s_coord.tex	(revision 11831)
@@ -0,0 +1,588 @@
+\documentclass[../main/NEMO_manual]{subfiles}
+
+\begin{document}
+
+\chapter{Curvilinear $s-$Coordinate Equations}
+\label{apdx:SCOORD}
+
+%    {\em 4.0} & {\em Mike Bell} & {\em review}  \\
+%    {\em 3.x} & {\em Gurvan Madec} & {\em original}  \\
+
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
+
+\section{Chain rule for $s-$coordinates}
+\label{sec:SCOORD_chain}
+
+In order to establish the set of Primitive Equation in curvilinear $s$-coordinates
+(\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:MB_zco_Eq} for
+the special case $k = z$ and thus $e_3 = 1$,
+and we introduce an arbitrary vertical coordinate $a = a(i,j,z,t)$.
+Let us define a new vertical scale factor by $e_3 = \partial z / \partial s$ (which now depends on $(i,j,z,t)$) and
+the horizontal slope of $s-$surfaces by:
+\begin{equation}
+  \label{eq:SCOORD_s_slope}
+  \sigma_1 =\frac{1}{e_1 } \; \left. {\frac{\partial z}{\partial i}} \right|_s
+  \quad \text{and} \quad
+  \sigma_2 =\frac{1}{e_2 } \; \left. {\frac{\partial z}{\partial j}} \right|_s .
+\end{equation}
+
+The model fields (e.g. pressure $p$) can be viewed as functions of $(i,j,z,t)$ (e.g. $p(i,j,z,t)$) or as
+functions of $(i,j,s,t)$ (e.g. $p(i,j,s,t)$). The symbol $\bullet$ will be used to represent any one of
+these fields.  Any ``infinitesimal'' change in $\bullet$ can be written in two forms:
+\begin{equation}
+  \label{eq:SCOORD_s_infin_changes}
+  \begin{aligned}
+    & \delta \bullet =  \delta i \left. \frac{ \partial \bullet }{\partial i} \right|_{j,s,t}
+                + \delta j \left. \frac{ \partial \bullet }{\partial i} \right|_{i,s,t}
+                + \delta s \left. \frac{ \partial \bullet }{\partial s} \right|_{i,j,t}
+                + \delta t \left. \frac{ \partial \bullet }{\partial t} \right|_{i,j,s} , \\
+    & \delta \bullet =  \delta i \left. \frac{ \partial \bullet }{\partial i} \right|_{j,z,t}
+                + \delta j \left. \frac{ \partial \bullet }{\partial i} \right|_{i,z,t}
+                + \delta z \left. \frac{ \partial \bullet }{\partial z} \right|_{i,j,t}
+                + \delta t \left. \frac{ \partial \bullet }{\partial t} \right|_{i,j,z} .
+  \end{aligned}
+\end{equation}
+Using the first form and considering a change $\delta i$ with $j, z$ and $t$ held constant, shows that
+\begin{equation}
+  \label{eq:SCOORD_s_chain_rule1}
+      \left. {\frac{\partial \bullet }{\partial i}} \right|_{j,z,t}  =
+      \left. {\frac{\partial \bullet }{\partial i}} \right|_{j,s,t}
+    + \left. {\frac{\partial s       }{\partial i}} \right|_{j,z,t} \;
+      \left. {\frac{\partial \bullet }{\partial s}} \right|_{i,j,t} .
+\end{equation}
+The term $\left. \partial s / \partial i \right|_{j,z,t}$ can be related to the slope of constant $s$ surfaces,
+(\autoref{eq:SCOORD_s_slope}), by applying the second of (\autoref{eq:SCOORD_s_infin_changes}) with $\bullet$ set to
+$s$ and $j, t$ held constant
+\begin{equation}
+\label{eq:SCOORD_delta_s}
+\delta s|_{j,t} =
+         \delta i \left. \frac{ \partial s }{\partial i} \right|_{j,z,t}
+       + \delta z \left. \frac{ \partial s }{\partial z} \right|_{i,j,t} .
+\end{equation}
+Choosing to look at a direction in the $(i,z)$ plane in which $\delta s = 0$ and using
+(\autoref{eq:SCOORD_s_slope}) we obtain
+\begin{equation}
+\left. \frac{ \partial s }{\partial i} \right|_{j,z,t} =
+         -  \left. \frac{ \partial z }{\partial i} \right|_{j,s,t} \;
+            \left. \frac{ \partial s }{\partial z} \right|_{i,j,t}
+	 = - \frac{e_1 }{e_3 }\sigma_1  .
+\label{eq:SCOORD_ds_di_z}
+\end{equation}
+Another identity, similar in form to (\autoref{eq:SCOORD_ds_di_z}), can be derived
+by choosing $\bullet$ to be $s$ and using the second form of (\autoref{eq:SCOORD_s_infin_changes}) to consider
+changes in which $i , j$ and $s$ are constant. This shows that
+\begin{equation}
+\label{eq:SCOORD_w_in_s}
+w_s = \left. \frac{ \partial z }{\partial t} \right|_{i,j,s} =
+- \left. \frac{ \partial z }{\partial s} \right|_{i,j,t}
+  \left. \frac{ \partial s }{\partial t} \right|_{i,j,z}
+  = - e_3 \left. \frac{ \partial s }{\partial t} \right|_{i,j,z} .
+\end{equation}
+
+In what follows, for brevity, indication of the constancy of the $i, j$ and $t$ indices is
+usually omitted. Using the arguments outlined above one can show that the chain rules needed to establish
+the model equations in the curvilinear $s-$coordinate system are:
+\begin{equation}
+  \label{eq:SCOORD_s_chain_rule2}
+  \begin{aligned}
+    &\left. {\frac{\partial \bullet }{\partial t}} \right|_z  =
+    \left. {\frac{\partial \bullet }{\partial t}} \right|_s
+	 + \frac{\partial \bullet }{\partial s}\; \frac{\partial s}{\partial t} , \\
+    &\left. {\frac{\partial \bullet }{\partial i}} \right|_z  =
+    \left. {\frac{\partial \bullet }{\partial i}} \right|_s
+    +\frac{\partial \bullet }{\partial s}\; \frac{\partial s}{\partial i}=
+    \left. {\frac{\partial \bullet }{\partial i}} \right|_s
+    -\frac{e_1 }{e_3 }\sigma_1 \frac{\partial \bullet }{\partial s} , \\
+    &\left. {\frac{\partial \bullet }{\partial j}} \right|_z  =
+    \left. {\frac{\partial \bullet }{\partial j}} \right|_s
+    + \frac{\partial \bullet }{\partial s}\;\frac{\partial s}{\partial j}=
+    \left. {\frac{\partial \bullet }{\partial j}} \right|_s
+    - \frac{e_2 }{e_3 }\sigma_2 \frac{\partial \bullet }{\partial s} , \\
+    &\;\frac{\partial \bullet }{\partial z}  \;\; = \frac{1}{e_3 }\frac{\partial \bullet }{\partial s} .
+  \end{aligned}
+\end{equation}
+
+%% =================================================================================================
+\section{Continuity equation in $s-$coordinates}
+\label{sec:SCOORD_continuity}
+
+Using (\autoref{eq:SCOORD_s_chain_rule1}) and
+the fact that the horizontal scale factors $e_1$ and $e_2$ do not depend on the vertical coordinate,
+the divergence of the velocity relative to the ($i$,$j$,$z$) coordinate system is transformed as follows in order to
+obtain its expression in the curvilinear $s-$coordinate system:
+
+\begin{subequations}
+  \begin{align*}
+    {
+    \begin{array}{*{20}l}
+      \nabla \cdot {\mathrm {\mathbf U}}
+      &= \frac{1}{e_1 \,e_2 }  \left[ \left. {\frac{\partial (e_2 \,u)}{\partial i}} \right|_z
+        +\left. {\frac{\partial(e_1 \,v)}{\partial j}} \right|_z  \right]
+        + \frac{\partial w}{\partial z} \\ \\
+      &     = \frac{1}{e_1 \,e_2 }  \left[
+		  \left.   \frac{\partial (e_2 \,u)}{\partial i}    \right|_s
+		  - \frac{e_1 }{e_3 } \sigma_1 \frac{\partial (e_2 \,u)}{\partial s}
+        + \left.   \frac{\partial (e_1 \,v)}{\partial j}    \right|_s
+		  - \frac{e_2 }{e_3 } \sigma_2 \frac{\partial (e_1 \,v)}{\partial s}	\right]
+        + \frac{\partial w}{\partial s} \; \frac{\partial s}{\partial z} \\ \\
+      &     = \frac{1}{e_1 \,e_2 }   \left[
+		  \left.   \frac{\partial (e_2 \,u)}{\partial i}    \right|_s
+        + \left.   \frac{\partial (e_1 \,v)}{\partial j}    \right|_s       	\right]
+        + \frac{1}{e_3 }\left[        \frac{\partial w}{\partial s}
+        -  \sigma_1 \frac{\partial u}{\partial s}
+        -  \sigma_2 \frac{\partial v}{\partial s}      \right] \\ \\
+      &     = \frac{1}{e_1 \,e_2 \,e_3 }   \left[
+		  \left.   \frac{\partial (e_2 \,e_3 \,u)}{\partial i}    \right|_s
+		  -\left.    e_2 \,u    \frac{\partial e_3 }{\partial i}     \right|_s
+        + \left.  \frac{\partial (e_1 \,e_3 \,v)}{\partial j}    \right|_s
+		  - \left.    e_1 v      \frac{\partial e_3 }{\partial j}    \right|_s   \right] \\
+      & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad
+        + \frac{1}{e_3 } \left[        \frac{\partial w}{\partial s}
+        -  \sigma_1 \frac{\partial u}{\partial s}
+        -  \sigma_2 \frac{\partial v}{\partial s}      \right]      \\
+      %
+      \intertext{Noting that $
+      \frac{1}{e_1} \left.{ \frac{\partial e_3}{\partial i}} \right|_s
+      =\frac{1}{e_1} \left.{ \frac{\partial^2 z}{\partial i\,\partial s}} \right|_s
+      =\frac{\partial}{\partial s} \left( {\frac{1}{e_1 } \left.{ \frac{\partial z}{\partial i} }\right|_s } \right)
+      =\frac{\partial \sigma_1}{\partial s}
+      $ and $
+      \frac{1}{e_2 }\left. {\frac{\partial e_3 }{\partial j}} \right|_s
+      =\frac{\partial \sigma_2}{\partial s}
+      $, it becomes:}
+    %
+      \nabla \cdot {\mathrm {\mathbf U}}
+      & = \frac{1}{e_1 \,e_2 \,e_3 }  \left[
+		  \left.  \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s
+        +\left.  \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s        \right] \\
+      & \qquad \qquad \qquad \qquad \quad
+        +\frac{1}{e_3 }\left[ {\frac{\partial w}{\partial s}-u\frac{\partial \sigma_1 }{\partial s}-v\frac{\partial \sigma_2 }{\partial s}-\sigma_1 \frac{\partial u}{\partial s}-\sigma_2 \frac{\partial v}{\partial s}} \right] \\
+      \\
+      & = \frac{1}{e_1 \,e_2 \,e_3 }  \left[
+		  \left.  \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s
+        +\left.  \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s        \right]
+        + \frac{1}{e_3 } \; \frac{\partial}{\partial s}   \left[  w -  u\;\sigma_1  - v\;\sigma_2  \right]
+    \end{array}
+        }
+  \end{align*}
+\end{subequations}
+
+Here, $w$ is the vertical velocity relative to the $z-$coordinate system.
+Using the first form of (\autoref{eq:SCOORD_s_infin_changes})
+and the definitions (\autoref{eq:SCOORD_s_slope}) and (\autoref{eq:SCOORD_w_in_s}) for $\sigma_1$, $\sigma_2$ and  $w_s$,
+one can show that the vertical velocity, $w_p$ of a point
+moving with the horizontal velocity of the fluid along an $s$ surface is given by
+\begin{equation}
+\label{eq:SCOORD_w_p}
+\begin{split}
+w_p  = & \left. \frac{ \partial z }{\partial t} \right|_s
+     + \frac{u}{e_1} \left. \frac{ \partial z }{\partial i} \right|_s
+     + \frac{v}{e_2} \left. \frac{ \partial z }{\partial j} \right|_s \\
+     = & w_s + u \sigma_1 + v \sigma_2 .
+\end{split}
+\end{equation}
+ The vertical velocity across this surface is denoted by
+\begin{equation}
+  \label{eq:SCOORD_w_s}
+  \omega  = w - w_p = w - ( w_s + \sigma_1 \,u + \sigma_2 \,v )  .
+\end{equation}
+Hence
+\begin{equation}
+\frac{1}{e_3 } \frac{\partial}{\partial s}   \left[  w -  u\;\sigma_1  - v\;\sigma_2  \right] =
+\frac{1}{e_3 } \frac{\partial}{\partial s} \left[  \omega + w_s \right] =
+   \frac{1}{e_3 } \left[ \frac{\partial \omega}{\partial s}
+ + \left. \frac{ \partial }{\partial t} \right|_s \frac{\partial z}{\partial s} \right] =
+   \frac{1}{e_3 } \frac{\partial \omega}{\partial s} + \frac{1}{e_3 } \left. \frac{ \partial e_3}{\partial t} . \right|_s
+\end{equation}
+
+Using (\autoref{eq:SCOORD_w_s}) in our expression for $\nabla \cdot {\mathrm {\mathbf U}}$ we obtain
+our final expression for the divergence of the velocity in the curvilinear $s-$coordinate system:
+\begin{equation}
+      \nabla \cdot {\mathrm {\mathbf U}} =
+         \frac{1}{e_1 \,e_2 \,e_3 }    \left[
+		  \left.  \frac{\partial (e_2 \,e_3 \,u)}{\partial i} \right|_s
+        +\left.  \frac{\partial (e_1 \,e_3 \,v)}{\partial j} \right|_s        \right]
+        + \frac{1}{e_3 } \frac{\partial \omega }{\partial s}
+        + \frac{1}{e_3 } \left. \frac{\partial e_3}{\partial t} \right|_s .
+\end{equation}
+
+As a result, the continuity equation \autoref{eq:MB_PE_continuity} in the $s-$coordinates is:
+\begin{equation}
+  \label{eq:SCOORD_sco_Continuity}
+  \frac{1}{e_3 } \frac{\partial e_3}{\partial t}
+  + \frac{1}{e_1 \,e_2 \,e_3 }\left[
+    {\left. {\frac{\partial (e_2 \,e_3 \,u)}{\partial i}} \right|_s
+      +  \left. {\frac{\partial (e_1 \,e_3 \,v)}{\partial j}} \right|_s } \right]
+  +\frac{1}{e_3 }\frac{\partial \omega }{\partial s} = 0 .
+\end{equation}
+An additional term has appeared that takes into account
+the contribution of the time variation of the vertical coordinate to the volume budget.
+
+%% =================================================================================================
+\section{Momentum equation in $s-$coordinate}
+\label{sec:SCOORD_momentum}
+
+Here we only consider the first component of the momentum equation,
+the generalization to the second one being straightforward.
+
+$\bullet$ \textbf{Total derivative in vector invariant form}
+
+Let us consider \autoref{eq:MB_dyn_vect}, the first component of the momentum equation in the vector invariant form.
+Its total $z-$coordinate time derivative,
+$\left. \frac{D u}{D t} \right|_z$ can be transformed as follows in order to obtain
+its expression in the curvilinear $s-$coordinate system:
+
+\begin{subequations}
+  \begin{align*}
+    {
+    \begin{array}{*{20}l}
+      \left. \frac{D u}{D t} \right|_z
+      &= \left. {\frac{\partial u }{\partial t}} \right|_z
+        - \left. \zeta \right|_z v
+        + \frac{1}{2e_1} \left.{ \frac{\partial (u^2+v^2)}{\partial i}} \right|_z
+        + w \;\frac{\partial u}{\partial z} \\ \\
+      &= \left. {\frac{\partial u }{\partial t}} \right|_z
+        -  \frac{1}{e_1 \,e_2 }\left[ { \left.{ \frac{\partial (e_2 \,v)}{\partial i} }\right|_z
+        -\left.{ \frac{\partial (e_1 \,u)}{\partial j} }\right|_z } \right] \; v
+        +  \frac{1}{2e_1} \left.{ \frac{\partial (u^2+v^2)}{\partial i} } \right|_z
+        +  w \;\frac{\partial u}{\partial z}      \\
+        %
+      \intertext{introducing the chain rule (\autoref{eq:SCOORD_s_chain_rule1}) }
+      %
+      &= \left. {\frac{\partial u }{\partial t}} \right|_z
+        - \frac{1}{e_1\,e_2}\left[ { \left.{ \frac{\partial (e_2 \,v)}{\partial i} } \right|_s
+        -\left.{ \frac{\partial (e_1 \,u)}{\partial j} } \right|_s } \right.
+        \left. {-\frac{e_1}{e_3}\sigma_1 \frac{\partial (e_2 \,v)}{\partial s}
+        +\frac{e_2}{e_3}\sigma_2 \frac{\partial (e_1 \,u)}{\partial s}} \right] \; v  \\
+      & \qquad \qquad \qquad \qquad
+        {
+        + \frac{1}{2e_1} \left(                                  \left.  \frac{\partial (u^2+v^2)}{\partial i} \right|_s
+        - \frac{e_1}{e_3}\sigma_1 \frac{\partial (u^2+v^2)}{\partial s}               \right)
+        + \frac{w}{e_3 } \;\frac{\partial u}{\partial s}
+        } \\ \\
+      &= \left. {\frac{\partial u }{\partial t}} \right|_z
+        - \left. \zeta \right|_s \;v
+        + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s \\
+      &\qquad \qquad \qquad \quad
+        + \frac{w}{e_3 } \;\frac{\partial u}{\partial s}
+        + \left[   {\frac{\sigma_1 }{e_3 }\frac{\partial v}{\partial s}
+        - \frac{\sigma_2 }{e_3 }\frac{\partial u}{\partial s}}   \right]\;v
+        - \frac{\sigma_1 }{2e_3 }\frac{\partial (u^2+v^2)}{\partial s} \\ \\
+      &= \left. {\frac{\partial u }{\partial t}} \right|_z
+        - \left. \zeta \right|_s \;v
+        + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s \\
+      &\qquad \qquad \qquad \quad
+        + \frac{1}{e_3} \left[    {w\frac{\partial u}{\partial s}
+        +\sigma_1 v\frac{\partial v}{\partial s} - \sigma_2 v\frac{\partial u}{\partial s}
+        - \sigma_1 u\frac{\partial u}{\partial s} - \sigma_1 v\frac{\partial v}{\partial s}} \right] \\ \\
+      &= \left. {\frac{\partial u }{\partial t}} \right|_z
+        - \left. \zeta \right|_s \;v
+        + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s
+        + \frac{1}{e_3} \left[  w - \sigma_2 v - \sigma_1 u  \right]
+        \; \frac{\partial u}{\partial s} .  \\
+        %
+      \intertext{Introducing $\omega$, the dia-s-surface velocity given by (\autoref{eq:SCOORD_w_s}) }
+      %
+      &= \left. {\frac{\partial u }{\partial t}} \right|_z
+        - \left. \zeta \right|_s \;v
+        + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s
+        + \frac{1}{e_3 } \left( \omega + w_s \right) \frac{\partial u}{\partial s}   \\
+    \end{array}
+    }
+  \end{align*}
+\end{subequations}
+Applying the time derivative chain rule (first equation of (\autoref{eq:SCOORD_s_chain_rule1})) to $u$ and
+using (\autoref{eq:SCOORD_w_in_s}) provides the expression of the last term of the right hand side,
+\[
+  {
+    \begin{array}{*{20}l}
+      \frac{w_s}{e_3}  \;\frac{\partial u}{\partial s}
+      = - \left. \frac{\partial s}{\partial t} \right|_z \;  \frac{\partial u }{\partial s}
+      = \left. {\frac{\partial u }{\partial t}} \right|_s  - \left. {\frac{\partial u }{\partial t}} \right|_z \ .
+    \end{array}
+  }
+\]
+This leads to the $s-$coordinate formulation of the total $z-$coordinate time derivative,
+\ie\ the total $s-$coordinate time derivative :
+\begin{align}
+  \label{eq:SCOORD_sco_Dt_vect}
+  \left. \frac{D u}{D t} \right|_s
+  = \left. {\frac{\partial u }{\partial t}} \right|_s
+  - \left. \zeta \right|_s \;v
+  + \frac{1}{2\,e_1}\left. {\frac{\partial (u^2+v^2)}{\partial i}} \right|_s
+  + \frac{1}{e_3 } \omega \;\frac{\partial u}{\partial s} .
+\end{align}
+Therefore, the vector invariant form of the total time derivative has exactly the same mathematical form in
+$z-$ and $s-$coordinates.
+This is not the case for the flux form as shown in next paragraph.
+
+$\bullet$ \textbf{Total derivative in flux form}
+
+Let us start from the total time derivative in the curvilinear $s-$coordinate system we have just establish.
+Following the procedure used to establish (\autoref{eq:MB_flux_form}), it can be transformed into :
+% \begin{subequations}
+\begin{align*}
+  {
+  \begin{array}{*{20}l}
+    \left. \frac{D u}{D t} \right|_s  &= \left. {\frac{\partial u }{\partial t}} \right|_s
+    & -  \zeta \;v
+      + \frac{1}{2\;e_1 } \frac{\partial \left( {u^2+v^2} \right)}{\partial i}
+      + \frac{1}{e_3} \omega \;\frac{\partial u}{\partial s} \\ \\
+                                      &= \left. {\frac{\partial u }{\partial t}} \right|_s
+    &+\frac{1}{e_1\;e_2}  \left(    \frac{\partial \left( {e_2 \,u\,u } \right)}{\partial i}
+      + \frac{\partial \left( {e_1 \,u\,v } \right)}{\partial j}     \right)
+      + \frac{1}{e_3 } \frac{\partial \left( {\omega\,u} \right)}{\partial s} \\ \\
+                                      &&- \,u \left[     \frac{1}{e_1 e_2 } \left(    \frac{\partial(e_2 u)}{\partial i}
+                                         + \frac{\partial(e_1 v)}{\partial j}    \right)
+                                         + \frac{1}{e_3}        \frac{\partial \omega}{\partial s}                       \right] \\ \\
+                                      &&- \frac{v}{e_1 e_2 }\left(    v	\;\frac{\partial e_2 }{\partial i}
+                                         -u	\;\frac{\partial e_1 }{\partial j} 	\right) . \\
+  \end{array}
+  }
+\end{align*}
+Introducing the vertical scale factor inside the horizontal derivative of the first two terms
+(\ie\ the horizontal divergence), it becomes :
+\begin{align*}
+  {
+  \begin{array}{*{20}l}
+    % \begin{align*} {\begin{array}{*{20}l}
+    %     {\begin{array}{*{20}l} \left. \frac{D u}{D t} \right|_s
+    &= \left. {\frac{\partial u }{\partial t}} \right|_s
+    &+ \frac{1}{e_1\,e_2\,e_3}  \left(  \frac{\partial( e_2 e_3 \,u^2 )}{\partial i}
+      + \frac{\partial( e_1 e_3 \,u v )}{\partial j}
+      -  e_2 u u \frac{\partial e_3}{\partial i}
+      -  e_1 u v \frac{\partial e_3 }{\partial j}    \right)
+      + \frac{1}{e_3} \frac{\partial \left( {\omega\,u} \right)}{\partial s} \\ \\
+    && - \,u \left[  \frac{1}{e_1 e_2 e_3} \left(   \frac{\partial(e_2 e_3 \, u)}{\partial i}
+       + \frac{\partial(e_1 e_3 \, v)}{\partial j}
+       -  e_2 u \;\frac{\partial e_3 }{\partial i}
+       -  e_1 v \;\frac{\partial e_3 }{\partial j}   \right)
+       + \frac{1}{e_3}        \frac{\partial \omega}{\partial s}                       \right] \\ \\
+    && - \frac{v}{e_1 e_2 }\left( 	v  \;\frac{\partial e_2 }{\partial i}
+       -u  \;\frac{\partial e_1 }{\partial j} 	\right) \\ \\
+    &= \left. {\frac{\partial u }{\partial t}} \right|_s
+    &+ \frac{1}{e_1\,e_2\,e_3}  \left(  \frac{\partial( e_2 e_3 \,u\,u )}{\partial i}
+      + \frac{\partial( e_1 e_3 \,u\,v )}{\partial j}    \right)
+      + \frac{1}{e_3 } \frac{\partial \left( {\omega\,u} \right)}{\partial s} \\ \\
+    && - \,u \left[  \frac{1}{e_1 e_2 e_3} \left(   \frac{\partial(e_2 e_3 \, u)}{\partial i}
+       + \frac{\partial(e_1 e_3 \, v)}{\partial j}  \right)
+       + \frac{1}{e_3}        \frac{\partial \omega}{\partial s}                       \right]
+       - \frac{v}{e_1 e_2 }\left( 	v   \;\frac{\partial e_2 }{\partial i}
+       -u   \;\frac{\partial e_1 }{\partial j} 	\right)     .             \\
+     %
+    \intertext {Introducing a more compact form for the divergence of the momentum fluxes,
+    and using (\autoref{eq:SCOORD_sco_Continuity}), the $s-$coordinate continuity equation,
+    it becomes : }
+  %
+    &= \left. {\frac{\partial u }{\partial t}} \right|_s
+    &+ \left.  \nabla \cdot \left(   {{\mathrm {\mathbf U}}\,u}   \right)    \right|_s
+      + \,u \frac{1}{e_3 } \frac{\partial e_3}{\partial t}
+      - \frac{v}{e_1 e_2 }\left(    v  \;\frac{\partial e_2 }{\partial i}
+      -u  \;\frac{\partial e_1 }{\partial j} 	\right)
+    \\
+  \end{array}
+  }
+\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:
+\begin{flalign}
+  \label{eq:SCOORD_sco_Dt_flux}
+  \left. \frac{D u}{D t} \right|_s   = \frac{1}{e_3}  \left. \frac{\partial ( e_3\,u)}{\partial t} \right|_s
+  + \left.  \nabla \cdot \left(   {{\mathrm {\mathbf U}}\,u}   \right)    \right|_s
+  - \frac{v}{e_1 e_2 }\left(    v  \;\frac{\partial e_2 }{\partial i}
+    -u  \;\frac{\partial e_1 }{\partial j}            \right).
+\end{flalign}
+which is the total time derivative expressed in the curvilinear $s-$coordinate system.
+It has the same form as in the $z-$coordinate but for
+the vertical scale factor that has appeared inside the time derivative which
+comes from the modification of (\autoref{eq:SCOORD_sco_Continuity}),
+the continuity equation.
+
+$\bullet$ \textbf{horizontal pressure gradient}
+
+The horizontal pressure gradient term can be transformed as follows:
+\[
+  \begin{split}
+    -\frac{1}{\rho_o \, e_1 }\left. {\frac{\partial p}{\partial i}} \right|_z
+    & =-\frac{1}{\rho_o e_1 }\left[ {\left. {\frac{\partial p}{\partial i}} \right|_s -\frac{e_1 }{e_3 }\sigma_1 \frac{\partial p}{\partial s}} \right] \\
+    & =-\frac{1}{\rho_o \,e_1 }\left. {\frac{\partial p}{\partial i}} \right|_s +\frac{\sigma_1 }{\rho_o \,e_3 }\left( {-g\;\rho \;e_3 } \right) \\
+    &=-\frac{1}{\rho_o \,e_1 }\left. {\frac{\partial p}{\partial i}} \right|_s -\frac{g\;\rho }{\rho_o }\sigma_1 .
+  \end{split}
+\]
+Applying similar manipulation to the second component and
+replacing $\sigma_1$ and $\sigma_2$ by their expression \autoref{eq:SCOORD_s_slope}, it becomes:
+\begin{equation}
+  \label{eq:SCOORD_grad_p_1}
+  \begin{split}
+    -\frac{1}{\rho_o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z
+    &=-\frac{1}{\rho_o \,e_1 } \left(     \left.              {\frac{\partial p}{\partial i}} \right|_s
+      + g\;\rho  \;\left. {\frac{\partial z}{\partial i}} \right|_s    \right) \\
+             %
+    -\frac{1}{\rho_o \, e_2 }\left. {\frac{\partial p}{\partial j}} \right|_z
+    &=-\frac{1}{\rho_o \,e_2 } \left(    \left.               {\frac{\partial p}{\partial j}} \right|_s
+      + g\;\rho \;\left. {\frac{\partial z}{\partial j}} \right|_s   \right) . \\
+  \end{split}
+\end{equation}
+
+An additional term appears in (\autoref{eq:SCOORD_grad_p_1}) which accounts for
+the tilt of $s-$surfaces with respect to geopotential $z-$surfaces.
+
+As in $z$-coordinate,
+the horizontal pressure gradient can be split in two parts following \citet{marsaleix.auclair.ea_OM08}.
+Let defined a density anomaly, $d$, by $d=(\rho - \rho_o)/ \rho_o$,
+and a hydrostatic pressure anomaly, $p_h'$, by $p_h'= g \; \int_z^\eta d \; e_3 \; dk$.
+The pressure is then given by:
+\[
+  \begin{split}
+    p &= g\; \int_z^\eta \rho \; e_3 \; dk = g\; \int_z^\eta \rho_o \left( d + 1 \right) \; e_3 \; dk   \\
+    &= g \, \rho_o \; \int_z^\eta d \; e_3 \; dk + \rho_o g \, \int_z^\eta e_3 \; dk .
+  \end{split}
+\]
+Therefore, $p$ and $p_h'$ are linked through:
+\begin{equation}
+  \label{eq:SCOORD_pressure}
+  p = \rho_o \; p_h' + \rho_o \, g \, ( \eta - z )
+\end{equation}
+and the hydrostatic pressure balance expressed in terms of $p_h'$ and $d$ is:
+\[
+  \frac{\partial p_h'}{\partial k} = - d \, g \, e_3 .
+\]
+
+Substituing \autoref{eq:SCOORD_pressure} in \autoref{eq:SCOORD_grad_p_1} and
+using the definition of the density anomaly it becomes an expression in two parts:
+\begin{equation}
+  \label{eq:SCOORD_grad_p_2}
+  \begin{split}
+    -\frac{1}{\rho_o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z
+    &=-\frac{1}{e_1 } \left(     \left.              {\frac{\partial p_h'}{\partial i}} \right|_s
+      + g\; d  \;\left. {\frac{\partial z}{\partial i}} \right|_s    \right)  - \frac{g}{e_1 } \frac{\partial \eta}{\partial i} ,  \\
+             %
+    -\frac{1}{\rho_o \, e_2 }\left. {\frac{\partial p}{\partial j}} \right|_z
+    &=-\frac{1}{e_2 } \left(    \left.               {\frac{\partial p_h'}{\partial j}} \right|_s
+      + g\; d \;\left. {\frac{\partial z}{\partial j}} \right|_s   \right)  - \frac{g}{e_2 } \frac{\partial \eta}{\partial j} . \\
+  \end{split}
+\end{equation}
+This formulation of the pressure gradient is characterised by the appearance of
+a term depending on the sea surface height only
+(last term on the right hand side of expression \autoref{eq:SCOORD_grad_p_2}).
+This term will be loosely termed \textit{surface pressure gradient} whereas
+the first term will be termed the \textit{hydrostatic pressure gradient} by analogy to
+the $z$-coordinate formulation.
+In fact, the true surface pressure gradient is $1/\rho_o \nabla (\rho \eta)$,
+and $\eta$ is implicitly included in the computation of $p_h'$ through the upper bound of the vertical integration.
+
+$\bullet$ \textbf{The other terms of the momentum equation}
+
+The coriolis and forcing terms as well as the the vertical physics remain unchanged as
+they involve neither time nor space derivatives.
+The form of the lateral physics is discussed in \autoref{apdx:DIFFOPERS}.
+
+$\bullet$ \textbf{Full momentum equation}
+
+To sum up, in a curvilinear $s$-coordinate system,
+the vector invariant momentum equation solved by the model has the same mathematical expression as
+the one in a curvilinear $z-$coordinate, except for the pressure gradient term:
+\begin{subequations}
+  \label{eq:SCOORD_dyn_vect}
+  \begin{multline}
+    \label{eq:SCOORD_PE_dyn_vect_u}
+    \frac{\partial u}{\partial t}=
+    +   \left( {\zeta +f} \right)\,v
+    -   \frac{1}{2\,e_1} \frac{\partial}{\partial i} \left(  u^2+v^2   \right)
+    -   \frac{1}{e_3} \omega \frac{\partial u}{\partial k}       \\
+    -   \frac{1}{e_1 } \left(    \frac{\partial p_h'}{\partial i} + g\; d  \; \frac{\partial z}{\partial i}    \right)
+    -   \frac{g}{e_1 } \frac{\partial \eta}{\partial i}
+    +   D_u^{\vect{U}}  +   F_u^{\vect{U}} ,
+  \end{multline}
+  \begin{multline}
+    \label{eq:SCOORD_dyn_vect_v}
+    \frac{\partial v}{\partial t}=
+    -   \left( {\zeta +f} \right)\,u
+    -   \frac{1}{2\,e_2 }\frac{\partial }{\partial j}\left(  u^2+v^2  \right)
+    -   \frac{1}{e_3 } \omega \frac{\partial v}{\partial k}         \\
+    -   \frac{1}{e_2 } \left(    \frac{\partial p_h'}{\partial j} + g\; d  \; \frac{\partial z}{\partial j}    \right)
+    -   \frac{g}{e_2 } \frac{\partial \eta}{\partial j}
+    +  D_v^{\vect{U}}  +   F_v^{\vect{U}} .
+  \end{multline}
+\end{subequations}
+whereas the flux form momentum equation differs from it by
+the formulation of both the time derivative and the pressure gradient term:
+\begin{subequations}
+  \label{eq:SCOORD_dyn_flux}
+  \begin{multline}
+    \label{eq:SCOORD_PE_dyn_flux_u}
+    \frac{1}{e_3} \frac{\partial \left(  e_3\,u  \right) }{\partial t} =
+    - \nabla \cdot \left(   {{\mathrm {\mathbf U}}\,u}   \right)
+    +   \left\{ {f + \frac{1}{e_1 e_2 }\left(    v  \;\frac{\partial e_2 }{\partial i}
+          -u  \;\frac{\partial e_1 }{\partial j}            \right)} \right\} \,v     \\
+    -   \frac{1}{e_1 } \left(    \frac{\partial p_h'}{\partial i} + g\; d  \; \frac{\partial z}{\partial i}    \right)
+    -   \frac{g}{e_1 } \frac{\partial \eta}{\partial i}
+    +   D_u^{\vect{U}}  +   F_u^{\vect{U}} ,
+  \end{multline}
+  \begin{multline}
+    \label{eq:SCOORD_dyn_flux_v}
+    \frac{1}{e_3}\frac{\partial \left(  e_3\,v  \right) }{\partial t}=
+    -  \nabla \cdot \left(   {{\mathrm {\mathbf U}}\,v}   \right)
+    -   \left\{ {f + \frac{1}{e_1 e_2 }\left(    v  \;\frac{\partial e_2 }{\partial i}
+          -u  \;\frac{\partial e_1 }{\partial j}            \right)} \right\} \,u     \\
+    -   \frac{1}{e_2 } \left(    \frac{\partial p_h'}{\partial j} + g\; d  \; \frac{\partial z}{\partial j}    \right)
+    -   \frac{g}{e_2 } \frac{\partial \eta}{\partial j}
+    +  D_v^{\vect{U}}  +   F_v^{\vect{U}} .
+  \end{multline}
+\end{subequations}
+Both formulation share the same hydrostatic pressure balance expressed in terms of
+hydrostatic pressure and density anomalies, $p_h'$ and $d=( \frac{\rho}{\rho_o}-1 )$:
+\begin{equation}
+  \label{eq:SCOORD_dyn_zph}
+  \frac{\partial p_h'}{\partial k} = - d \, g \, e_3 .
+\end{equation}
+
+It is important to realize that the change in coordinate system has only concerned the position on the vertical.
+It has not affected (\textbf{i},\textbf{j},\textbf{k}), the orthogonal curvilinear set of unit vectors.
+($u$,$v$) are always horizontal velocities so that their evolution is driven by \emph{horizontal} forces,
+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.
+
+%% =================================================================================================
+\section{Tracer equation}
+\label{sec:SCOORD_tracer}
+
+The tracer equation is obtained using the same calculation as for the continuity equation and then
+regrouping the time derivative terms in the left hand side :
+
+\begin{multline}
+  \label{eq:SCOORD_tracer}
+  \frac{1}{e_3} \frac{\partial \left(  e_3 T  \right)}{\partial t}
+  = -\frac{1}{e_1 \,e_2 \,e_3}
+  \left[           \frac{\partial }{\partial i} \left( {e_2 \,e_3 \;Tu} \right)
+    +   \frac{\partial }{\partial j} \left( {e_1 \,e_3 \;Tv} \right)               \right]       \\
+  -  \frac{1}{e_3}  \frac{\partial }{\partial k} \left(                   Tw  \right)
+  +  D^{T} +F^{T}
+\end{multline}
+
+The expression for the advection term is a straight consequence of (\autoref{eq:SCOORD_sco_Continuity}),
+the expression of the 3D divergence in the $s-$coordinates established above.
+
+\subinc{\input{../../global/epilogue}}
+
+\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_triads.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_triads.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/apdx_triads.tex	(revision 11831)
@@ -0,0 +1,1181 @@
+\documentclass[../main/NEMO_manual]{subfiles}
+
+%% Local cmds
+\newcommand{\rML}[1][i]{\ensuremath{_{\mathrm{ML}\,#1}}}
+\newcommand{\rMLt}[1][i]{\tilde{r}_{\mathrm{ML}\,#1}}
+%% Move to ../../global/new_cmds.tex to avoid error with \listoffigures
+%\newcommand{\triad}[6][]{\ensuremath{{}_{#2}^{#3}{\mathbb{#4}_{#1}}_{#5}^{\,#6}}
+\newcommand{\triadd}[5]{\ensuremath{{}_{#1}^{#2}{\mathbb{#3}}_{#4}^{\,#5}}}
+\newcommand{\triadt}[5]{\ensuremath{{}_{#1}^{#2}{\tilde{\mathbb{#3}}}_{#4}^{\,#5}}}
+\newcommand{\rtriad}[2][]{\ensuremath{\triad[#1]{i}{k}{#2}{i_p}{k_p}}}
+\newcommand{\rtriadt}[1]{\ensuremath{\triadt{i}{k}{#1}{i_p}{k_p}}}
+
+\begin{document}
+
+\chapter{Iso-Neutral Diffusion and Eddy Advection using Triads}
+\label{apdx:TRIADS}
+
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
+
+%% =================================================================================================
+\section[Choice of \forcode{namtra\_ldf} namelist parameters]{Choice of \protect\nam{tra_ldf}{tra\_ldf} namelist parameters}
+
+Two scheme are available to perform the iso-neutral diffusion.
+If the namelist logical \np{ln_traldf_triad}{ln\_traldf\_triad} is set true,
+\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}{ln\_traldf\_iso} is set true,
+the filtered version of Cox's original scheme (the Standard scheme) is employed (\autoref{sec:LDF_slp}).
+In the present implementation of the Griffies scheme,
+the advective skew fluxes are implemented even if \np{ln_traldf_eiv}{ln\_traldf\_eiv} is false.
+
+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,
+even though the eddy advection is accomplished by means of the skew fluxes.
+
+The options specific to the Griffies scheme include:
+\begin{description}
+\item [{\np{ln_triad_iso}{ln\_triad\_iso}}] See \autoref{sec:TRIADS_taper}.
+  If this is set false (the default),
+  then `iso-neutral' mixing is accomplished within the surface mixed-layer along slopes linearly decreasing with
+  depth from the value immediately below the mixed-layer to zero (flat) at the surface (\autoref{sec:TRIADS_lintaper}).
+  This is the same treatment as used in the default implementation
+  \autoref{subsec:LDF_slp_iso}; \autoref{fig:LDF_eiv_slp}.
+  Where \np{ln_triad_iso}{ln\_triad\_iso} is set true,
+  the vertical skew flux is further reduced to ensure no vertical buoyancy flux,
+  giving an almost pure horizontal diffusive tracer flux within the mixed layer.
+  This is similar to the tapering suggested by \citet{gerdes.koberle.ea_CD91}. See \autoref{subsec:TRIADS_Gerdes-taper}
+\item [{\np{ln_botmix_triad}{ln\_botmix\_triad}}] See \autoref{sec:TRIADS_iso_bdry}.
+  If this is set false (the default) then the lateral diffusive fluxes
+  associated with triads partly masked by topography are neglected.
+  If it is set true, however, then these lateral diffusive fluxes are applied,
+  giving smoother bottom tracer fields at the cost of introducing diapycnal mixing.
+\item [{\np{rn_sw_triad}{rn\_sw\_triad}}] blah blah to be added....
+\end{description}
+The options shared with the Standard scheme include:
+\begin{description}
+\item [{\np{ln_traldf_msc}{ln\_traldf\_msc}}] blah blah to be added
+\item [{\np{rn_slpmax}{rn\_slpmax}}]          blah blah to be added
+\end{description}
+
+%% =================================================================================================
+\section{Triad formulation of iso-neutral diffusion}
+\label{sec:TRIADS_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.
+
+%% =================================================================================================
+\subsection{Iso-neutral diffusion operator}
+
+The iso-neutral second order tracer diffusive operator for small angles between
+iso-neutral surfaces and geopotentials is given by \autoref{eq:TRIADS_iso_tensor_1}:
+\begin{subequations}
+  \label{eq:TRIADS_iso_tensor_1}
+  \begin{equation}
+    D^{lT}=-\nabla \cdot\vect{f}^{lT}\equiv
+    -\frac{1}{e_1e_2e_3}\left[\pd{i}\left (f_1^{lT}e_2e_3\right) +
+      \pd{j}\left (f_2^{lT}e_2e_3\right) + \pd{k}\left (f_3^{lT}e_1e_2\right)\right],
+  \end{equation}
+  where the diffusive flux per unit area of physical space
+  \begin{equation}
+    \vect{f}^{lT}=-{A^{lT}}\Re\cdot\nabla T,
+  \end{equation}
+  \begin{equation}
+    \label{eq:TRIADS_iso_tensor_2}
+    \mbox{with}\quad \;\;\Re =
+    \begin{pmatrix}
+      1   &  0   & -r_1           \rule[-.9 em]{0pt}{1.79 em} \\
+      0   &  1   & -r_2           \rule[-.9 em]{0pt}{1.79 em} \\
+      -r_1 & -r_2 &  r_1 ^2+r_2 ^2 \rule[-.9 em]{0pt}{1.79 em}
+    \end{pmatrix}
+    \quad \text{and} \quad\nabla T=
+    \begin{pmatrix}
+      \frac{1}{e_1} \pd[T]{i} \rule[-.9 em]{0pt}{1.79 em} \\
+      \frac{1}{e_2} \pd[T]{j} \rule[-.9 em]{0pt}{1.79 em} \\
+      \frac{1}{e_3} \pd[T]{k} \rule[-.9 em]{0pt}{1.79 em}
+    \end{pmatrix}
+    .
+  \end{equation}
+\end{subequations}
+% \left( {{\begin{array}{*{20}c}
+%  1 \hfill & 0 \hfill & {-r_1 } \hfill \\
+%  0 \hfill & 1 \hfill & {-r_2 } \hfill \\
+%  {-r_1 } \hfill & {-r_2 } \hfill & {r_1 ^2+r_2 ^2} \hfill \\
+% \end{array} }} \right)
+Here \autoref{eq:MB_iso_slopes}
+\begin{align*}
+  r_1 &=-\frac{e_3 }{e_1 } \left( \frac{\partial \rho }{\partial i}
+        \right)
+        \left( {\frac{\partial \rho }{\partial k}} \right)^{-1} \\
+      &=-\frac{e_3 }{e_1 } \left( -\alpha\frac{\partial T }{\partial i} +
+        \beta\frac{\partial S }{\partial i} \right) \left(
+        -\alpha\frac{\partial T }{\partial k} + \beta\frac{\partial S
+        }{\partial k} \right)^{-1}
+\end{align*}
+is the $i$-component of the slope of the iso-neutral surface relative to the computational surface,
+and $r_2$ is the $j$-component.
+
+We will find it useful to consider the fluxes per unit area in $i,j,k$ space; we write
+\[
+  % \label{eq:TRIADS_Fijk}
+  \vect{F}_{\mathrm{iso}}=\left(f_1^{lT}e_2e_3, f_2^{lT}e_1e_3, f_3^{lT}e_1e_2\right).
+\]
+Additionally, we will sometimes write the contributions towards the fluxes $\vect{f}$ and
+$\vect{F}_{\mathrm{iso}}$ from the component $R_{ij}$ of $\Re$ as $f_{ij}$, $F_{\mathrm{iso}\: ij}$,
+with $f_{ij}=R_{ij}e_i^{-1}\partial T/\partial x_i$ (no summation) etc.
+
+The off-diagonal terms of the small angle diffusion tensor
+\autoref{eq:TRIADS_iso_tensor_1}, \autoref{eq:TRIADS_iso_tensor_2} produce skew-fluxes along
+the $i$- and $j$-directions resulting from the vertical tracer gradient:
+\begin{align}
+  \label{eq:TRIADS_i13c}
+  f_{13}=&+{A^{lT}} r_1\frac{1}{e_3}\frac{\partial T}{\partial k},\qquad f_{23}=+{A^{lT}} r_2\frac{1}{e_3}\frac{\partial T}{\partial k}\\
+  \intertext{and in the k-direction resulting from the lateral tracer gradients}
+  \label{eq:TRIADS_i31c}
+  f_{31}+f_{32}=& {A^{lT}} r_1\frac{1}{e_1}\frac{\partial T}{\partial i}+{A^{lT}} r_2\frac{1}{e_1}\frac{\partial T}{\partial i}
+\end{align}
+
+The vertical diffusive flux associated with the $_{33}$ component of the small angle diffusion tensor is
+\begin{equation}
+  \label{eq:TRIADS_i33c}
+  f_{33}=-{A^{lT}}(r_1^2 +r_2^2) \frac{1}{e_3}\frac{\partial T}{\partial k}.
+\end{equation}
+
+Since there are no cross terms involving $r_1$ and $r_2$ in the above,
+we can consider the iso-neutral diffusive fluxes separately in the $i$-$k$ and $j$-$k$ planes,
+just adding together the vertical components from each plane.
+The following description will describe the fluxes on the $i$-$k$ plane.
+
+There is no natural discretization for the $i$-component of the skew-flux, \autoref{eq:TRIADS_i13c},
+as although it must be evaluated at $u$-points,
+it involves vertical gradients (both for the tracer and the slope $r_1$), defined at $w$-points.
+Similarly, the vertical skew flux, \autoref{eq:TRIADS_i31c},
+is evaluated at $w$-points but involves horizontal gradients defined at $u$-points.
+
+%% =================================================================================================
+\subsection{Standard discretization}
+
+The straightforward approach to discretize the lateral skew flux
+\autoref{eq:TRIADS_i13c} from tracer cell $i,k$ to $i+1,k$, introduced in 1995 into OPA,
+\autoref{eq:TRA_ldf_iso}, is to calculate a mean vertical gradient at the $u$-point from
+the average of the four surrounding vertical tracer gradients, and multiply this by a mean slope at the $u$-point,
+calculated from the averaged surrounding vertical density gradients.
+The total area-integrated skew-flux (flux per unit area in $ijk$ space) from tracer cell $i,k$ to $i+1,k$,
+noting that the $e_{{3}_{i+1/2}^k}$ in the area $e{_{3}}_{i+1/2}^k{e_{2}}_{i+1/2}i^k$ at the $u$-point cancels out with
+the $1/{e_{3}}_{i+1/2}^k$ associated with the vertical tracer gradient, is then \autoref{eq:TRA_ldf_iso}
+\[
+  \left(F_u^{13} \right)_{i+\frac{1}{2}}^k = {A}_{i+\frac{1}{2}}^k
+  {e_{2}}_{i+1/2}^k \overline{\overline
+    r_1} ^{\,i,k}\,\overline{\overline{\delta_k T}}^{\,i,k},
+\]
+where
+\[
+  \overline{\overline
+    r_1} ^{\,i,k} = -\frac{{e_{3u}}_{i+1/2}^k}{{e_{1u}}_{i+1/2}^k}
+  \frac{\delta_{i+1/2} [\rho]}{\overline{\overline{\delta_k \rho}}^{\,i,k}},
+\]
+and here and in the following we drop the $^{lT}$ superscript from ${A^{lT}}$ for simplicity.
+Unfortunately the resulting combination $\overline{\overline{\delta_k\bullet}}^{\,i,k}$ of a $k$ average and
+a $k$ difference of the tracer reduces to $\bullet_{k+1}-\bullet_{k-1}$,
+so two-grid-point oscillations are invisible to this discretization of the iso-neutral operator.
+These \emph{computational modes} will not be damped by this operator, and may even possibly be amplified by it.
+Consequently, applying this operator to a tracer does not guarantee the decrease of its global-average variance.
+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.
+
+%% =================================================================================================
+\subsection{Expression of the skew-flux in terms of triad slopes}
+
+\citep{griffies.gnanadesikan.ea_JPO98} introduce a different discretization of the off-diagonal terms that
+nicely solves the problem.
+% Instead of multiplying the mean slope calculated at the $u$-point by
+% the mean vertical gradient at the $u$-point,
+\begin{figure}[tb]
+  \centering
+  \includegraphics[width=0.66\textwidth]{TRIADS_GRIFF_triad_fluxes}
+  \caption[Triads arrangement and tracer gradients to give lateral and vertical tracer fluxes]{
+    (a) Arrangement of triads $S_i$ and tracer gradients to
+    give lateral tracer flux from box $i,k$ to $i+1,k$
+    (b) Triads $S'_i$ and tracer gradients to give vertical tracer flux from
+    box $i,k$ to $i,k+1$.}
+  \label{fig:TRIADS_ISO_triad}
+\end{figure}
+They get the skew flux from the products of the vertical gradients at each $w$-point surrounding the $u$-point with
+the corresponding `triad' slope calculated from the lateral density gradient across the $u$-point divided by
+the vertical density gradient at the same $w$-point as the tracer gradient.
+See \autoref{fig:TRIADS_ISO_triad}a, where the thick lines denote the tracer gradients,
+and the thin lines the corresponding triads, with slopes $s_1, \dotsc s_4$.
+The total area-integrated skew-flux from tracer cell $i,k$ to $i+1,k$
+\begin{multline}
+  \label{eq:TRIADS_i13}
+  \left( F_u^{13}  \right)_{i+\frac{1}{2}}^k = {A}_{i+1}^k a_1 s_1
+  \delta_{k+\frac{1}{2}} \left[ T^{i+1}
+  \right]/e_{{3w}_{i+1}}^{k+\frac{1}{2}}  + {A} _i^k a_2 s_2 \delta
+  _{k+\frac{1}{2}} \left[ T^i
+  \right]/e_{{3w}_{i+1}}^{k+\frac{1}{2}} \\
+  +{A} _{i+1}^k a_3 s_3 \delta_{k-\frac{1}{2}} \left[ T^{i+1}
+  \right]/e_{{3w}_{i+1}}^{k+\frac{1}{2}}  +{A} _i^k a_4 s_4 \delta
+  _{k-\frac{1}{2}} \left[ T^i \right]/e_{{3w}_{i+1}}^{k+\frac{1}{2}},
+\end{multline}
+where the contributions of the triad fluxes are weighted by areas $a_1, \dotsc a_4$,
+and ${A}$ is now defined at the tracer points rather than the $u$-points.
+This discretization gives a much closer stencil, and disallows the two-point computational modes.
+
+The vertical skew flux \autoref{eq:TRIADS_i31c} from tracer cell $i,k$ to $i,k+1$ at
+the $w$-point $i,k+\frac{1}{2}$ is constructed similarly (\autoref{fig:TRIADS_ISO_triad}b) by
+multiplying lateral tracer gradients from each of the four surrounding $u$-points by the appropriate triad slope:
+\begin{multline}
+  \label{eq:TRIADS_i31}
+  \left( F_w^{31} \right) _i ^{k+\frac{1}{2}} =  {A}_i^{k+1} a_{1}'
+  s_{1}' \delta_{i-\frac{1}{2}} \left[ T^{k+1} \right]/{e_{3u}}_{i-\frac{1}{2}}^{k+1}
+  +{A}_i^{k+1} a_{2}' s_{2}' \delta_{i+\frac{1}{2}} \left[ T^{k+1} \right]/{e_{3u}}_{i+\frac{1}{2}}^{k+1} \\
+  + {A}_i^k a_{3}' s_{3}' \delta_{i-\frac{1}{2}} \left[ T^k\right]/{e_{3u}}_{i-\frac{1}{2}}^k
+  +{A}_i^k a_{4}' s_{4}' \delta_{i+\frac{1}{2}} \left[ T^k \right]/{e_{3u}}_{i+\frac{1}{2}}^k.
+\end{multline}
+
+We notate the triad slopes $s_i$ and $s'_i$ in terms of the `anchor point' $i,k$
+(appearing in both the vertical and lateral gradient),
+and the $u$- and $w$-points $(i+i_p,k)$, $(i,k+k_p)$ at the centres of the `arms' of the triad as follows
+(see also \autoref{fig:TRIADS_ISO_triad}):
+\begin{equation}
+  \label{eq:TRIADS_R}
+  _i^k \mathbb{R}_{i_p}^{k_p}
+  =-\frac{ {e_{3w}}_{\,i}^{\,k+k_p}} { {e_{1u}}_{\,i+i_p}^{\,k}}
+  \
+  \frac
+  { \alpha_i^k  \ \delta_{i+i_p}[T^k] - \beta_i^k \ \delta_{i+i_p}[S^k] }
+  { \alpha_i^k  \ \delta_{k+k_p}[T^i] - \beta_i^k \ \delta_{k+k_p}[S^i] }.
+\end{equation}
+In calculating the slopes of the local neutral surfaces,
+the expansion coefficients $\alpha$ and $\beta$ are evaluated at the anchor points of the triad,
+while the metrics are calculated at the $u$- and $w$-points on the arms.
+
+\begin{figure}[tb]
+  \centering
+  \includegraphics[width=0.66\textwidth]{TRIADS_GRIFF_qcells}
+  \caption[Triad notation for quarter cells]{
+    Triad notation for quarter cells.
+    $T$-cells are inside boxes,
+    while the $i+\fractext{1}{2},k$ $u$-cell is shaded in green and
+    the $i,k+\fractext{1}{2}$ $w$-cell is shaded in pink.}
+  \label{fig:TRIADS_qcells}
+\end{figure}
+
+Each triad $\{_i^{k}\:_{i_p}^{k_p}\}$ is associated (\autoref{fig:TRIADS_qcells}) with the quarter cell that is
+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:TRIADS_i13} and \autoref{eq:TRIADS_i31} in this notation,
+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)$,
+and then again as an $s'$ to calculate the vertical flux along its $w$-arm at $(i,k+k_p)$.
+Each vertical area $a_i$ used to calculate the lateral flux and horizontal area $a'_i$ used to
+calculate the vertical flux can also be identified as the area across the $u$- and $w$-arms of a unique triad,
+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:TRIADS_i13} $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$,
+and in \autoref{eq:TRIADS_i31} $a'_{1}={\:}_i^k{\mathbb{A}_w}_{1/2}^{1/2}$.
+
+%% =================================================================================================
+\subsection{Full triad fluxes}
+
+A key property of iso-neutral diffusion is that it should not affect the (locally referenced) density.
+In particular there should be no lateral or vertical density flux.
+The lateral density flux disappears so long as the area-integrated lateral diffusive flux from
+tracer cell $i,k$ to $i+1,k$ coming from the $_{11}$ term of the diffusion tensor takes the form
+\begin{equation}
+  \label{eq:TRIADS_i11}
+  \left( F_u^{11} \right) _{i+\frac{1}{2}} ^{k} =
+  - \left( {A}_i^{k+1} a_{1} + {A}_i^{k+1} a_{2} + {A}_i^k
+    a_{3} + {A}_i^k a_{4} \right)
+  \frac{\delta_{i+1/2} \left[ T^k\right]}{{e_{1u}}_{\,i+1/2}^{\,k}},
+\end{equation}
+where the areas $a_i$ are as in \autoref{eq:TRIADS_i13}.
+In this case, separating the total lateral flux, the sum of \autoref{eq:TRIADS_i13} and \autoref{eq:TRIADS_i11},
+into triad components, a lateral tracer flux
+\begin{equation}
+  \label{eq:TRIADS_latflux-triad}
+  _i^k {\mathbb{F}_u}_{i_p}^{k_p} (T) = - {A}_i^k{ \:}_i^k{\mathbb{A}_u}_{i_p}^{k_p}
+  \left(
+    \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
+    -\ {_i^k\mathbb{R}_{i_p}^{k_p}} \
+    \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
+  \right)
+\end{equation}
+can be identified with each triad.
+Then, because the same metric factors ${e_{3w}}_{\,i}^{\,k+k_p}$ and ${e_{1u}}_{\,i+i_p}^{\,k}$ are employed for both
+the density gradients in $ _i^k \mathbb{R}_{i_p}^{k_p}$ and the tracer gradients,
+the lateral density flux associated with each triad separately disappears.
+\begin{equation}
+  \label{eq:TRIADS_latflux-rho}
+  {\mathbb{F}_u}_{i_p}^{k_p} (\rho)=-\alpha _i^k {\:}_i^k {\mathbb{F}_u}_{i_p}^{k_p} (T) + \beta_i^k {\:}_i^k {\mathbb{F}_u}_{i_p}^{k_p} (S)=0
+\end{equation}
+Thus the total flux $\left( F_u^{31} \right) ^i _{i,k+\frac{1}{2}} + \left( F_u^{11} \right) ^i _{i,k+\frac{1}{2}}$ from
+tracer cell $i,k$ to $i+1,k$ must also vanish since it is a sum of four such triad fluxes.
+
+The squared slope $r_1^2$ in the expression \autoref{eq:TRIADS_i33c} for the $_{33}$ component is also expressed in
+terms of area-weighted squared triad slopes,
+so the area-integrated vertical flux from tracer cell $i,k$ to $i,k+1$ resulting from the $r_1^2$ term is
+\begin{equation}
+  \label{eq:TRIADS_i33}
+  \left( F_w^{33} \right) _i^{k+\frac{1}{2}} =
+  - \left( {A}_i^{k+1} a_{1}' s_{1}'^2
+    + {A}_i^{k+1} a_{2}' s_{2}'^2
+    + {A}_i^k a_{3}' s_{3}'^2
+    + {A}_i^k a_{4}' s_{4}'^2 \right)\delta_{k+\frac{1}{2}} \left[ T^{i+1} \right],
+\end{equation}
+where the areas $a'$ and slopes $s'$ are the same as in \autoref{eq:TRIADS_i31}.
+Then, separating the total vertical flux, the sum of \autoref{eq:TRIADS_i31} and \autoref{eq:TRIADS_i33},
+into triad components, a vertical flux
+\begin{align}
+  \label{eq:TRIADS_vertflux-triad}
+  _i^k {\mathbb{F}_w}_{i_p}^{k_p} (T)
+  &= {A}_i^k{\: }_i^k{\mathbb{A}_w}_{i_p}^{k_p}
+    \left(
+    {_i^k\mathbb{R}_{i_p}^{k_p}}\frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
+    -\ \left({_i^k\mathbb{R}_{i_p}^{k_p}}\right)^2 \
+    \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
+    \right) \\
+  &= - \left(\left.{ }_i^k{\mathbb{A}_w}_{i_p}^{k_p}\right/{ }_i^k{\mathbb{A}_u}_{i_p}^{k_p}\right)
+    {_i^k\mathbb{R}_{i_p}^{k_p}}{\: }_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \label{eq:TRIADS_vertflux-triad2}
+\end{align}
+may be associated with each triad.
+Each vertical density flux $_i^k {\mathbb{F}_w}_{i_p}^{k_p} (\rho)$ associated with a triad then
+separately disappears (because the lateral flux $_i^k{\mathbb{F}_u}_{i_p}^{k_p} (\rho)$ disappears).
+Consequently the total vertical density flux
+$\left( F_w^{31} \right)_i ^{k+\frac{1}{2}} + \left( F_w^{33} \right)_i^{k+\frac{1}{2}}$ from
+tracer cell $i,k$ to $i,k+1$ must also vanish since it is a sum of four such triad fluxes.
+
+We can explicitly identify (\autoref{fig:TRIADS_qcells}) the triads associated with the $s_i$, $a_i$,
+and $s'_i$, $a'_i$ used in the definition of the $u$-fluxes and $w$-fluxes in \autoref{eq:TRIADS_i31},
+\autoref{eq:TRIADS_i13}, \autoref{eq:TRIADS_i11} \autoref{eq:TRIADS_i33} and \autoref{fig:TRIADS_ISO_triad} to write out
+the iso-neutral fluxes at $u$- and $w$-points as sums of the triad fluxes that cross the $u$- and $w$-faces:
+%(\autoref{fig:TRIADS_ISO_triad}):
+\begin{flalign}
+  \label{eq:TRIADS_iso_flux} \vect{F}_{\mathrm{iso}}(T) &\equiv
+  \sum_{\substack{i_p,\,k_p}}
+  \begin{pmatrix}
+    {_{i+1/2-i_p}^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) \\ \\
+    {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p} } (T) \\
+  \end{pmatrix}.
+\end{flalign}
+
+%% =================================================================================================
+\subsection{Ensuring the scheme does not increase tracer variance}
+\label{subsec:TRIADS_variance}
+
+We now require that this operator should not increase the globally-integrated tracer variance.
+%This changes according to
+% \begin{align*}
+% &\int_D  D_l^T \; T \;dv \equiv  \sum_{i,k} \left\{ T \ D_l^T \ b_T \right\}    \\
+% &\equiv + \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
+% 		\delta_{i} \left[{_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \right]
+% 	     + \delta_{k} \left[ {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right]  \ T \right\}    \\
+% &\equiv  - \sum_{i,k} \sum_{\substack{i_p,\,k_p}} \left\{
+%                 {_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \ \delta_{i+1/2} [T]
+%              + {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}}  \ \delta_{k+1/2} [T]   \right\}      \\
+% \end{align*}
+Each triad slope $_i^k\mathbb{R}_{i_p}^{k_p}$ drives a lateral flux $_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)$ across
+the $u$-point $i+i_p,k$ and a vertical flux $_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)$ across the $w$-point $i,k+k_p$.
+The lateral flux drives a net rate of change of variance,
+summed over the two $T$-points $i+i_p-\fractext{1}{2},k$ and $i+i_p+\fractext{1}{2},k$, of
+\begin{multline}
+  {b_T}_{i+i_p-1/2}^k\left(\frac{\partial T}{\partial t}T\right)_{i+i_p-1/2}^k+
+  \quad {b_T}_{i+i_p+1/2}^k\left(\frac{\partial T}{\partial
+      t}T\right)_{i+i_p+1/2}^k \\
+  \begin{aligned}
+    &= -T_{i+i_p-1/2}^k{\;} _i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \quad + \quad  T_{i+i_p+1/2}^k
+    {\;}_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \\
+    &={\;} _i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)\,\delta_{i+ i_p}[T^k], \label{eq:TRIADS_dvar_iso_i}
+  \end{aligned}
+\end{multline}
+while the vertical flux similarly drives a net rate of change of variance summed over
+the $T$-points $i,k+k_p-\fractext{1}{2}$ (above) and $i,k+k_p+\fractext{1}{2}$ (below) of
+\begin{equation}
+  \label{eq:TRIADS_dvar_iso_k}
+  _i^k{\mathbb{F}_w}_{i_p}^{k_p} (T) \,\delta_{k+ k_p}[T^i].
+\end{equation}
+The total variance tendency driven by the triad is the sum of these two.
+Expanding $_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)$ and $_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)$ with
+\autoref{eq:TRIADS_latflux-triad} and \autoref{eq:TRIADS_vertflux-triad}, it is
+\begin{multline*}
+  -{A}_i^k\left \{
+    { } _i^k{\mathbb{A}_u}_{i_p}^{k_p}
+    \left(
+      \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
+      - {_i^k\mathbb{R}_{i_p}^{k_p}} \
+      \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }\right)\,\delta_{i+ i_p}[T^k] \right.\\
+  - \left. { } _i^k{\mathbb{A}_w}_{i_p}^{k_p}
+    \left(
+      \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
+      -{\:}_i^k\mathbb{R}_{i_p}^{k_p}
+      \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
+    \right) {\,}_i^k\mathbb{R}_{i_p}^{k_p}\delta_{k+ k_p}[T^i]
+  \right \}.
+\end{multline*}
+The key point is then that if we require $_i^k{\mathbb{A}_u}_{i_p}^{k_p}$ and $_i^k{\mathbb{A}_w}_{i_p}^{k_p}$ to
+be related to a triad volume $_i^k\mathbb{V}_{i_p}^{k_p}$ by
+\begin{equation}
+  \label{eq:TRIADS_V-A}
+  _i^k\mathbb{V}_{i_p}^{k_p}
+  ={\;}_i^k{\mathbb{A}_u}_{i_p}^{k_p}\,{e_{1u}}_{\,i + i_p}^{\,k}
+  ={\;}_i^k{\mathbb{A}_w}_{i_p}^{k_p}\,{e_{3w}}_{\,i}^{\,k + k_p},
+\end{equation}
+the variance tendency reduces to the perfect square
+\begin{equation}
+  \label{eq:TRIADS_perfect-square}
+  -{A}_i^k{\:} _i^k\mathbb{V}_{i_p}^{k_p}
+  \left(
+    \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
+    -{\:}_i^k\mathbb{R}_{i_p}^{k_p}
+    \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
+  \right)^2\leq 0.
+\end{equation}
+Thus, the constraint \autoref{eq:TRIADS_V-A} ensures that the fluxes
+(\autoref{eq:TRIADS_latflux-triad}, \autoref{eq:TRIADS_vertflux-triad}) associated with
+a given slope triad $_i^k\mathbb{R}_{i_p}^{k_p}$ do not increase the net variance.
+Since the total fluxes are sums of such fluxes from the various triads, this constraint, applied to all triads,
+is sufficient to ensure that the globally integrated variance does not increase.
+
+The expression \autoref{eq:TRIADS_V-A} can be interpreted as a discretization of the global integral
+\begin{equation}
+  \label{eq:TRIADS_cts-var}
+  \frac{\partial}{\partial t}\int\!\fractext{1}{2} T^2\, dV =
+  \int\!\mathbf{F}\cdot\nabla T\, dV,
+\end{equation}
+where, within each triad volume $_i^k\mathbb{V}_{i_p}^{k_p}$, the lateral and vertical fluxes/unit area
+\[
+  \mathbf{F}=\left(
+    \left.{}_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)\right/{}_i^k{\mathbb{A}_u}_{i_p}^{k_p},
+    \left.{\:}_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)\right/{}_i^k{\mathbb{A}_w}_{i_p}^{k_p}
+  \right)
+\]
+and the gradient
+\[
+  \nabla T = \left(
+    \left.\delta_{i+ i_p}[T^k] \right/ {e_{1u}}_{\,i + i_p}^{\,k},
+    \left.\delta_{k+ k_p}[T^i] \right/ {e_{3w}}_{\,i}^{\,k + k_p}
+  \right)
+\]
+
+%% =================================================================================================
+\subsection{Triad volumes in Griffes's scheme and in \NEMO}
+
+To complete the discretization we now need only specify the triad volumes $_i^k\mathbb{V}_{i_p}^{k_p}$.
+\citet{griffies.gnanadesikan.ea_JPO98} identifies these $_i^k\mathbb{V}_{i_p}^{k_p}$ as the volumes of the quarter cells,
+defined in terms of the distances between $T$, $u$,$f$ and $w$-points.
+This is the natural discretization of \autoref{eq:TRIADS_cts-var}.
+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
+\begin{equation}
+  \label{eq:TRIADS_V-NEMO}
+  _i^k\mathbb{V}_{i_p}^{k_p}=\fractext{1}{4} {b_u}_{i+i_p}^k,
+\end{equation}
+as a quarter of the volume of the $u$-cell inside which the triad quarter-cell lies.
+This has the nice property that when the slopes $\mathbb{R}$ vanish,
+the lateral flux from tracer cell $i,k$ to $i+1,k$ reduces to the classical form
+\begin{equation}
+  \label{eq:TRIADS_lat-normal}
+  -\overline{A}_{\,i+1/2}^k\;
+  \frac{{b_u}_{i+1/2}^k}{{e_{1u}}_{\,i + i_p}^{\,k}}
+  \;\frac{\delta_{i+ 1/2}[T^k] }{{e_{1u}}_{\,i + i_p}^{\,k}}
+  = -\overline{A}_{\,i+1/2}^k\;\frac{{e_{1w}}_{\,i + 1/2}^{\,k}\:{e_{1v}}_{\,i + 1/2}^{\,k}\;\delta_{i+ 1/2}[T^k]}{{e_{1u}}_{\,i + 1/2}^{\,k}}.
+\end{equation}
+In fact if the diffusive coefficient is defined at $u$-points,
+so that we employ ${A}_{i+i_p}^k$ instead of  ${A}_i^k$ in the definitions of the triad fluxes
+\autoref{eq:TRIADS_latflux-triad} and \autoref{eq:TRIADS_vertflux-triad},
+we can replace $\overline{A}_{\,i+1/2}^k$ by $A_{i+1/2}^k$ in the above.
+
+%% =================================================================================================
+\subsection{Summary of the scheme}
+
+The iso-neutral fluxes at $u$- and $w$-points are the sums of the triad fluxes that
+cross the $u$- and $w$-faces \autoref{eq:TRIADS_iso_flux}:
+\begin{subequations}
+  % \label{eq:TRIADS_alltriadflux}
+  \begin{flalign*}
+    % \label{eq:TRIADS_vect_isoflux}
+    \vect{F}_{\mathrm{iso}}(T) &\equiv
+    \sum_{\substack{i_p,\,k_p}}
+    \begin{pmatrix}
+      {_{i+1/2-i_p}^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) \\ \\
+      {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p} } (T)
+    \end{pmatrix},
+  \end{flalign*}
+  where \autoref{eq:TRIADS_latflux-triad}:
+  \begin{align}
+    \label{eq:TRIADS_triadfluxu}
+    _i^k {\mathbb{F}_u}_{i_p}^{k_p} (T) &= - {A}_i^k{
+                                          \:}\frac{{{}_i^k\mathbb{V}}_{i_p}^{k_p}}{{e_{1u}}_{\,i + i_p}^{\,k}}
+                                          \left(
+                                          \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
+                                          -\ {_i^k\mathbb{R}_{i_p}^{k_p}} \
+                                          \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
+                                          \right),\\
+    \intertext{and}
+    _i^k {\mathbb{F}_w}_{i_p}^{k_p} (T)
+                                        &= {A}_i^k{\: }\frac{{{}_i^k\mathbb{V}}_{i_p}^{k_p}}{{e_{3w}}_{\,i}^{\,k+k_p}}
+                                          \left(
+                                          {_i^k\mathbb{R}_{i_p}^{k_p}}\frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
+                                          -\ \left({_i^k\mathbb{R}_{i_p}^{k_p}}\right)^2 \
+                                          \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
+                                          \right),\label{eq:TRIADS_triadfluxw}
+  \end{align}
+  with \autoref{eq:TRIADS_V-NEMO}
+  \[
+    % \label{eq:TRIADS_V-NEMO2}
+    _i^k{\mathbb{V}}_{i_p}^{k_p}=\fractext{1}{4} {b_u}_{i+i_p}^k.
+  \]
+\end{subequations}
+
+The divergence of the expression \autoref{eq:TRIADS_iso_flux} for the fluxes gives the iso-neutral diffusion tendency at
+each tracer point:
+\[
+  % \label{eq:TRIADS_iso_operator}
+  D_l^T = \frac{1}{b_T}
+  \sum_{\substack{i_p,\,k_p}} \left\{ \delta_{i} \left[{_{i+1/2-i_p}^k
+        {\mathbb{F}_u }_{i_p}^{k_p}} \right] + \delta_{k} \left[
+      {_i^{k+1/2-k_p} {\mathbb{F}_w}_{i_p}^{k_p}} \right] \right\}
+\]
+where $b_T= e_{1T}\,e_{2T}\,e_{3T}$ is the volume of $T$-cells.
+The diffusion scheme satisfies the following six properties:
+
+\begin{description}
+\item [Horizontal diffusion] The discretization of the diffusion operator recovers the traditional five-point Laplacian
+  \autoref{eq:TRIADS_lat-normal} in the limit of flat iso-neutral direction:
+  \[
+    % \label{eq:TRIADS_iso_property0}
+    D_l^T = \frac{1}{b_T} \
+    \delta_{i} \left[ \frac{e_{2u}\,e_{3u}}{e_{1u}} \;
+      \overline{A}^{\,i} \; \delta_{i+1/2}[T] \right] \qquad
+    \text{when} \quad { _i^k \mathbb{R}_{i_p}^{k_p} }=0
+  \]
+\item [Implicit treatment in the vertical] Only tracer values associated with a single water column appear in the expression \autoref{eq:TRIADS_i33} for
+  the $_{33}$ fluxes, vertical fluxes driven by vertical gradients.
+  This is of paramount importance since it means that a time-implicit algorithm can be used to
+  solve the vertical diffusion equation.
+  This is necessary since the vertical eddy diffusivity associated with this term,
+  \[
+    \frac{1}{b_w}\sum_{\substack{i_p, \,k_p}} \left\{
+      {\:}_i^k\mathbb{V}_{i_p}^{k_p} \: {A}_i^k \: \left(_i^k \mathbb{R}_{i_p}^{k_p}\right)^2
+    \right\}  =
+    \frac{1}{4b_w}\sum_{\substack{i_p, \,k_p}} \left\{
+      {b_u}_{i+i_p}^k\: {A}_i^k \: \left(_i^k \mathbb{R}_{i_p}^{k_p}\right)^2
+    \right\},
+  \]
+  (where $b_w= e_{1w}\,e_{2w}\,e_{3w}$ is the volume of $w$-cells) can be quite large.
+\item [Pure iso-neutral operator] The iso-neutral flux of locally referenced potential density is zero.
+  See \autoref{eq:TRIADS_latflux-rho} and \autoref{eq:TRIADS_vertflux-triad2}.
+\item [Conservation of tracer] The iso-neutral diffusion conserves tracer content, \ie
+  \[
+    % \label{eq:TRIADS_iso_property1}
+    \sum_{i,j,k} \left\{ D_l^T \      b_T \right\} = 0
+  \]
+  This property is trivially satisfied since the iso-neutral diffusive operator is written in flux form.
+\item [No increase of tracer variance] The iso-neutral diffusion does not increase the tracer variance, \ie
+  \[
+    % \label{eq:TRIADS_iso_property2}
+    \sum_{i,j,k} \left\{ T \ D_l^T      \ b_T \right\} \leq 0
+  \]
+  The property is demonstrated in \autoref{subsec:TRIADS_variance} above.
+  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.
+  It therefore ensures that, when the diffusivity coefficient is large enough,
+  the field on which it is applied becomes free of grid-point noise.
+\item [Self-adjoint operator] The iso-neutral diffusion operator is self-adjoint, \ie
+  \begin{equation}
+    \label{eq:TRIADS_iso_property3}
+    \sum_{i,j,k} \left\{ S \ D_l^T \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\}
+  \end{equation}
+  In other word, there is no need to develop a specific routine from the adjoint of this operator.
+  We just have to apply the same routine.
+  This property can be demonstrated similarly to the proof of the `no increase of tracer variance' property.
+  The contribution by a single triad towards the left hand side of \autoref{eq:TRIADS_iso_property3},
+  can be found by replacing $\delta[T]$ by $\delta[S]$ in \autoref{eq:TRIADS_dvar_iso_i} and \autoref{eq:TRIADS_dvar_iso_k}.
+  This results in a term similar to \autoref{eq:TRIADS_perfect-square},
+  \[
+    % \label{eq:TRIADS_TScovar}
+    - {A}_i^k{\:} _i^k\mathbb{V}_{i_p}^{k_p}
+    \left(
+      \frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
+      -{\:}_i^k\mathbb{R}_{i_p}^{k_p}
+      \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
+    \right)
+    \left(
+      \frac{ \delta_{i+ i_p}[S^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }
+      -{\:}_i^k\mathbb{R}_{i_p}^{k_p}
+      \frac{ \delta_{k+k_p} [S^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }
+    \right).
+  \]
+This is symmetrical in $T $ and $S$, so exactly the same term arises from
+the discretization of this triad's contribution towards the RHS of \autoref{eq:TRIADS_iso_property3}.
+\end{description}
+
+%% =================================================================================================
+\subsection{Treatment of the triads at the boundaries}
+\label{sec:TRIADS_iso_bdry}
+
+The triad slope can only be defined where both the grid boxes centred at the end of the arms exist.
+Triads that would poke up through the upper ocean surface into the atmosphere,
+or down into the ocean floor, must be masked out.
+See \autoref{fig:TRIADS_bdry_triads}.
+Surface layer triads \triad{i}{1}{R}{1/2}{-1/2} (magenta) and \triad{i+1}{1}{R}{-1/2}{-1/2} (blue) that
+require density to be specified above the ocean surface are masked (\autoref{fig:TRIADS_bdry_triads}a):
+this ensures that lateral tracer gradients produce no flux through the ocean surface.
+However, to prevent surface noise, it is customary to retain the $_{11}$ contributions towards
+the lateral triad fluxes \triad[u]{i}{1}{F}{1/2}{-1/2} and \triad[u]{i+1}{1}{F}{-1/2}{-1/2};
+this drives diapycnal tracer fluxes.
+Similar comments apply to triads that would intersect the ocean floor (\autoref{fig:TRIADS_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.
+The associated lateral fluxes (grey-black dashed line) are masked if \np[=.false.]{ln_botmix_triad}{ln\_botmix\_triad},
+but left unmasked, giving bottom mixing, if \np[=.true.]{ln_botmix_triad}{ln\_botmix\_triad}.
+
+The default option \np[=.false.]{ln_botmix_triad}{ln\_botmix\_triad} is suitable when the bbl mixing option is enabled
+(\np[=.true.]{ln_trabbl}{ln\_trabbl}, with \np[=1]{nn_bbl_ldf}{nn\_bbl\_ldf}), or for simple idealized problems.
+For setups with topography without bbl mixing, \np[=.true.]{ln_botmix_triad}{ln\_botmix\_triad} may be necessary.
+\begin{figure}[h]
+  \centering
+  \includegraphics[width=0.66\textwidth]{TRIADS_GRIFF_bdry_triads}
+  \caption[Boundary triads]{
+    (a) Uppermost model layer $k=1$ with $i,1$ and $i+1,1$ tracer points (black dots),
+    and $i+1/2,1$ $u$-point (blue square).
+    Triad slopes \triad{i}{1}{R}{1/2}{-1/2} (magenta) and
+    \triad{i+1}{1}{R}{-1/2}{-1/2} (blue) poking through the ocean surface are masked
+    (faded in figure).
+    However,
+    the lateral $_{11}$ contributions towards \triad[u]{i}{1}{F}{1/2}{-1/2} and
+    \triad[u]{i+1}{1}{F}{-1/2}{-1/2} (yellow line) are still applied,
+    giving diapycnal diffusive fluxes.
+    \newline
+    (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.
+    The associated lateral fluxes (grey-black dashed line) are masked if
+    \protect\np[=.false.]{ln_botmix_triad}{ln\_botmix\_triad}, but left unmasked,
+    giving bottom mixing, if \protect\np[=.true.]{ln_botmix_triad}{ln\_botmix\_triad}}
+  \label{fig:TRIADS_bdry_triads}
+\end{figure}
+
+%% =================================================================================================
+\subsection{ Limiting of the slopes within the interior}
+\label{sec:TRIADS_limit}
+
+As discussed in \autoref{subsec:LDF_slp_iso},
+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
+has a value of $1/100$ in the ocean interior.
+%, ramping linearly down above 70~m depth to zero at the surface
+It is of course relevant to the iso-neutral slopes $\tilde{r}_i=r_i+\sigma_i$ relative to geopotentials
+(here the $\sigma_i$ are the slopes of the coordinate surfaces relative to geopotentials)
+\autoref{eq:MB_slopes_eiv} rather than the slope $r_i$ relative to coordinate surfaces, so we require
+\[
+  |\tilde{r}_i|\leq \tilde{r}_\mathrm{max}=0.01.
+\]
+and then recalculate the slopes $r_i$ relative to coordinates.
+Each individual triad slope
+\begin{equation}
+  \label{eq:TRIADS_Rtilde}
+  _i^k\tilde{\mathbb{R}}_{i_p}^{k_p} = {}_i^k\mathbb{R}_{i_p}^{k_p}  + \frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}}
+\end{equation}
+is limited like this and then the corresponding $_i^k\mathbb{R}_{i_p}^{k_p} $ are recalculated and
+combined to form the fluxes.
+Note that where the slopes have been limited, there is now a non-zero iso-neutral density flux that
+drives dianeutral mixing.
+In particular this iso-neutral density flux is always downwards,
+and so acts to reduce gravitational potential energy.
+
+%% =================================================================================================
+\subsection{Tapering within the surface mixed layer}
+\label{sec:TRIADS_taper}
+
+Additional tapering of the iso-neutral fluxes is necessary within the surface mixed layer.
+When the Griffies triads are used, we offer two options for this.
+
+%% =================================================================================================
+\subsubsection{Linear slope tapering within the surface mixed layer}
+\label{sec:TRIADS_lintaper}
+
+This is the option activated by the default choice \np[=.false.]{ln_triad_iso}{ln\_triad\_iso}.
+Slopes $\tilde{r}_i$ relative to geopotentials are tapered linearly from their value immediately below
+the mixed layer to zero at the surface, as described in option (c) of \autoref{fig:LDF_eiv_slp}, to values
+\begin{equation}
+  \label{eq:TRIADS_rmtilde}
+  \rMLt = -\frac{z}{h}\left.\tilde{r}_i\right|_{z=-h}\quad \text{ for  } z>-h,
+\end{equation}
+and then the $r_i$ relative to vertical coordinate surfaces are appropriately adjusted to
+\[
+  % \label{eq:TRIADS_rm}
+  \rML =\rMLt -\sigma_i \quad \text{ for  } z>-h.
+\]
+Thus the diffusion operator within the mixed layer is given by:
+\[
+  % \label{eq:TRIADS_iso_tensor_ML}
+  D^{lT}=\nabla {\mathrm {\mathbf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad
+  \mbox{with}\quad \;\;\Re =\left( {{
+        \begin{array}{*{20}c}
+          1 \hfill & 0 \hfill & {-\rML[1]}\hfill \\
+          0 \hfill & 1 \hfill & {-\rML[2]} \hfill \\
+          {-\rML[1]}\hfill &   {-\rML[2]} \hfill & {\rML[1]^2+\rML[2]^2} \hfill
+        \end{array}
+      }} \right)
+\]
+
+This slope tapering gives a natural connection between tracer in the mixed-layer and
+in isopycnal layers immediately below, in the thermocline.
+It is consistent with the way the $\tilde{r}_i$ are tapered within the mixed layer
+(see \autoref{sec:TRIADS_taperskew} below) so as to ensure a uniform GM eddy-induced velocity throughout the mixed layer.
+However, it gives a downwards density flux and so acts so as to reduce potential energy in the same way as
+does the slope limiting discussed above in \autoref{sec:TRIADS_limit}.
+
+As in \autoref{sec:TRIADS_limit} above, the tapering \autoref{eq:TRIADS_rmtilde} is applied separately to
+each triad $_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}$, and the $_i^k\mathbb{R}_{i_p}^{k_p}$ adjusted.
+For clarity, we assume $z$-coordinates in the following;
+the conversion from $\mathbb{R}$ to $\tilde{\mathbb{R}}$ and back to $\mathbb{R}$ follows exactly as
+described above by \autoref{eq:TRIADS_Rtilde}.
+\begin{enumerate}
+\item Mixed-layer depth is defined so as to avoid including regions of weak vertical stratification in
+  the slope definition.
+  At each $i,j$ (simplified to $i$ in \autoref{fig:TRIADS_MLB_triad}),
+  we define the mixed-layer by setting the vertical index of the tracer point immediately below the mixed layer,
+  $k_{\mathrm{ML}}$, as the maximum $k$ (shallowest tracer point) such that
+  the potential density ${\rho_0}_{i,k}>{\rho_0}_{i,k_{10}}+\Delta\rho_c$,
+  where $i,k_{10}$ is the tracer gridbox within which the depth reaches 10~m.
+  See the left side of \autoref{fig:TRIADS_MLB_triad}.
+  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}$,
+  the depth of the $w$-point above the $i,k_{\mathrm{ML}}$ tracer point.
+\item We define `basal' triad slopes ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ as
+  the slopes of those triads whose vertical `arms' go down from the $i,k_{\mathrm{ML}}$ tracer point to
+  the $i,k_{\mathrm{ML}}-1$ tracer point below.
+  This is to ensure that the vertical density gradients associated with
+  these basal triad slopes ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ are representative of the thermocline.
+  The four basal triads defined in the bottom part of \autoref{fig:TRIADS_MLB_triad} are then
+  \begin{align*}
+    {\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p} &=
+                                                       {\:}^{k_{\mathrm{ML}}-k_p-1/2}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p},
+                                                       % \label{eq:TRIADS_Rbase}
+    \\
+    \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}.
+  \end{align*}
+The vertical flux associated with each of these triads passes through
+the $w$-point $i,k_{\mathrm{ML}}-1/2$ lying \emph{below} the $i,k_{\mathrm{ML}}$ tracer point, so it is this depth
+\[
+  % \label{eq:TRIADS_zbase}
+  {z_\mathrm{base}}_{\,i}={z_{w}}_{k_\mathrm{ML}-1/2}
+\]
+one gridbox deeper than the diagnosed ML depth $z_{\mathrm{ML}})$ that sets the $h$ used to taper the slopes in
+\autoref{eq:TRIADS_rmtilde}.
+\item Finally, we calculate the adjusted triads ${\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,i_p}^{k_p}$ within
+  the mixed layer, by multiplying the appropriate ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ by
+  the ratio of the depth of the $w$-point ${z_w}_{k+k_p}$ to ${z_{\mathrm{base}}}_{\,i}$.
+  For instance the green triad centred on $i,k$
+  \begin{align*}
+    {\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,1/2}^{-1/2} &=
+                                                        \frac{{z_w}_{k-1/2}}{{z_{\mathrm{base}}}_{\,i}}{\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,1/2}^{-1/2} \\
+    \intertext{and more generally}
+    {\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,i_p}^{k_p} &=
+                                                       \frac{{z_w}_{k+k_p}}{{z_{\mathrm{base}}}_{\,i}}{\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}.
+                                                       % \label{eq:TRIADS_RML}
+  \end{align*}
+\end{enumerate}
+
+\begin{figure}[h]
+  \centering
+  \includegraphics[width=0.66\textwidth]{TRIADS_GRIFF_MLB_triads}
+  \caption[Definition of mixed-layer depth and calculation of linearly tapered triads]{
+    Definition of mixed-layer depth and calculation of linearly tapered triads.
+    The figure shows a water column at a given $i,j$ (simplified to $i$),
+    with the ocean surface at the top.
+    Tracer points are denoted by bullets, and black lines the edges of the tracer cells;
+    $k$ increases upwards.
+    \newline
+    We define the mixed-layer by setting the vertical index of the tracer point immediately below
+    the mixed layer, $k_{\mathrm{ML}}$, as the maximum $k$ (shallowest tracer point) such that
+    ${\rho_0}_{i,k}>{\rho_0}_{i,k_{10}}+\Delta\rho_c$,
+    where $i,k_{10}$ is the tracer gridbox within which the depth reaches 10~m.
+    We calculate the triad slopes within the mixed layer by linearly tapering them from zero
+    (at the surface) to the `basal' slopes,
+    the slopes of the four triads passing through the $w$-point $i,k_{\mathrm{ML}}-1/2$ (blue square),
+    ${\:}_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.}
+  \label{fig:TRIADS_MLB_triad}
+\end{figure}
+
+%% =================================================================================================
+\subsubsection{Additional truncation of skew iso-neutral flux components}
+\label{subsec:TRIADS_Gerdes-taper}
+
+The alternative option is activated by setting \np{ln_triad_iso}{ln\_triad\_iso} = true.
+This retains the same tapered slope $\rML$  described above for the calculation of the $_{33}$ term of
+the iso-neutral diffusion tensor (the vertical tracer flux driven by vertical tracer gradients),
+but replaces the $\rML$ in the skew term by
+\begin{equation}
+  \label{eq:TRIADS_rm*}
+  \rML^*=\left.\rMLt^2\right/\tilde{r}_i-\sigma_i,
+\end{equation}
+giving a ML diffusive operator
+\[
+  % \label{eq:TRIADS_iso_tensor_ML2}
+  D^{lT}=\nabla {\mathrm {\mathbf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad
+  \mbox{with}\quad \;\;\Re =\left( {{
+        \begin{array}{*{20}c}
+          1 \hfill & 0 \hfill & {-\rML[1]^*}\hfill \\
+          0 \hfill & 1 \hfill & {-\rML[2]^*} \hfill \\
+          {-\rML[1]^*}\hfill &   {-\rML[2]^*} \hfill & {\rML[1]^2+\rML[2]^2} \hfill \\
+        \end{array}
+      }} \right).
+\]
+This operator
+\footnote{
+  To ensure good behaviour where horizontal density gradients are weak,
+  we in fact follow \citet{gerdes.koberle.ea_CD91} and
+  set $\rML^*=\mathrm{sgn}(\tilde{r}_i)\min(|\rMLt^2/\tilde{r}_i|,|\tilde{r}_i|)-\sigma_i$.
+}
+then has the property it gives no vertical density flux, and so does not change the potential energy.
+This approach is similar to multiplying the iso-neutral diffusion coefficient by
+$\tilde{r}_{\mathrm{max}}^{-2}\tilde{r}_i^{-2}$ for steep slopes,
+as suggested by \citet{gerdes.koberle.ea_CD91} (see also \citet{griffies_bk04}).
+Again it is applied separately to each triad $_i^k\mathbb{R}_{i_p}^{k_p}$
+
+In practice, this approach gives weak vertical tracer fluxes through the mixed-layer,
+as well as vanishing density fluxes.
+While it is theoretically advantageous that it does not change the potential energy,
+it may give a discontinuity between the fluxes within the mixed-layer (purely horizontal) and
+just below (along iso-neutral surfaces).
+% This may give strange looking results,
+% particularly where the mixed-layer depth varies strongly laterally.
+%% =================================================================================================
+\section{Eddy induced advection formulated as a skew flux}
+\label{sec:TRIADS_skew-flux}
+
+%% =================================================================================================
+\subsection{Continuous skew flux formulation}
+\label{sec:TRIADS_continuous-skew-flux}
+
+When Gent and McWilliams's [1990] diffusion is used, an additional advection term is added.
+The associated velocity is the so called eddy induced velocity,
+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:LDF_slp_geo} is used in $z$-coordinate,
+and the sum \autoref{eq:LDF_slp_geo} + \autoref{eq:LDF_slp_iso} in $z^*$ or $s$-coordinates.
+
+The eddy induced velocity is given by:
+\begin{subequations}
+  % \label{eq:TRIADS_eiv}
+  \begin{equation}
+    \label{eq:TRIADS_eiv_v}
+    \begin{split}
+      u^* & = - \frac{1}{e_{3}}\;          \partial_i\psi_1,  \\
+      v^* & = - \frac{1}{e_{3}}\;          \partial_j\psi_2,    \\
+      w^* & =    \frac{1}{e_{1}e_{2}}\; \left\{ \partial_i  \left( e_{2} \, \psi_1\right)
+        + \partial_j  \left( e_{1} \, \psi_2\right) \right\},
+    \end{split}
+  \end{equation}
+  where the streamfunctions $\psi_i$ are given by
+  \begin{equation}
+    \label{eq:TRIADS_eiv_psi}
+    \begin{split}
+      \psi_1 & = A_{e} \; \tilde{r}_1,   \\
+      \psi_2 & = A_{e} \; \tilde{r}_2,
+    \end{split}
+  \end{equation}
+\end{subequations}
+with $A_{e}$ the eddy induced velocity coefficient,
+and $\tilde{r}_1$ and $\tilde{r}_2$ the slopes between the iso-neutral and the geopotential surfaces.
+
+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 \texttt{traldf\_eiv?} is set in the default implementation,
+where \np{ln_traldf_triad}{ln\_traldf\_triad} is set false.
+This allows us to take advantage of all the advection schemes offered for the tracers
+(see \autoref{sec:TRA_adv}) and not just a $2^{nd}$ order advection scheme.
+This is particularly useful for passive tracers where
+\emph{positivity} of the advection scheme is of paramount importance.
+
+However, when \np{ln_traldf_triad}{ln\_traldf\_triad} is set true,
+\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,
+the tracer advective fluxes per unit area in $ijk$ space can be transformed as follows:
+\begin{flalign*}
+  \begin{split}
+    \textbf{F}_{\mathrm{eiv}}^T =
+    \begin{pmatrix}
+      {e_{2}\,e_{3}\;  u^*} \\
+ 		{e_{1}\,e_{2}\; w^*}
+    \end{pmatrix}   \;   T
+    &=
+    \begin{pmatrix}
+      { - \partial_k \left( e_{2} \,\psi_1 \right) \; T \;} \\
+ 		{+ \partial_i  \left( e_{2} \, \psi_1 \right) \; T \;}
+    \end{pmatrix} 			\\
+    &=
+    \begin{pmatrix}
+      { - \partial_k \left( e_{2} \, \psi_1  \; T \right) \;} \\
+ 		{+ \partial_i  \left( e_{2} \,\psi_1 \; T \right) \;}
+    \end{pmatrix}
+    +
+    \begin{pmatrix}
+      {+ e_{2} \, \psi_1  \; \partial_k T} \\
+ 		{ - e_{2} \, \psi_1  \; \partial_i  T}
+    \end{pmatrix}
+  \end{split}
+\end{flalign*}
+and since the eddy induced velocity field is non-divergent,
+we end up with the skew form of the eddy induced advective fluxes per unit area in $ijk$ space:
+\begin{equation}
+  \label{eq:TRIADS_eiv_skew_ijk}
+  \textbf{F}_\mathrm{eiv}^T =
+  \begin{pmatrix}
+    {+ e_{2} \, \psi_1  \; \partial_k T}   \\
+    { - e_{2} \, \psi_1  \; \partial_i  T}
+  \end{pmatrix}
+\end{equation}
+The total fluxes per unit physical area are then
+\begin{equation}
+  \label{eq:TRIADS_eiv_skew_physical}
+  \begin{split}
+    f^*_1 & = \frac{1}{e_{3}}\; \psi_1 \partial_k T   \\
+    f^*_2 & = \frac{1}{e_{3}}\; \psi_2 \partial_k T   \\
+    f^*_3 & =  -\frac{1}{e_{1}e_{2}}\; \left\{ e_{2} \psi_1 \partial_i T + e_{1} \psi_2 \partial_j T \right\}.
+\end{split}
+\end{equation}
+Note that \autoref{eq:TRIADS_eiv_skew_physical} takes the same form whatever the vertical coordinate,
+though of course the slopes $\tilde{r}_i$ which define the $\psi_i$ in \autoref{eq:TRIADS_eiv_psi} are relative to
+geopotentials.
+The tendency associated with eddy induced velocity is then simply the convergence of the fluxes
+(\autoref{eq:TRIADS_eiv_skew_ijk}, \autoref{eq:TRIADS_eiv_skew_physical}), so
+\[
+  % \label{eq:TRIADS_skew_eiv_conv}
+  \frac{\partial T}{\partial t}= -\frac{1}{e_1 \, e_2 \, e_3 }      \left[
+    \frac{\partial}{\partial i} \left( e_2 \psi_1 \partial_k T\right)
+    + \frac{\partial}{\partial j} \left( e_1  \;
+      \psi_2 \partial_k T\right)
+    -  \frac{\partial}{\partial k} \left( e_{2} \psi_1 \partial_i T
+      + e_{1} \psi_2 \partial_j T \right)  \right]
+\]
+It naturally conserves the tracer content, as it is expressed in flux form.
+Since it has the same divergence as the advective form it also preserves the tracer variance.
+
+%% =================================================================================================
+\subsection{Discrete skew flux formulation}
+
+The skew fluxes in (\autoref{eq:TRIADS_eiv_skew_physical}, \autoref{eq:TRIADS_eiv_skew_ijk}),
+like the off-diagonal terms (\autoref{eq:TRIADS_i13c}, \autoref{eq:TRIADS_i31c}) of the small angle diffusion tensor,
+are best expressed in terms of the triad slopes, as in \autoref{fig:TRIADS_ISO_triad} and
+(\autoref{eq:TRIADS_i13}, \autoref{eq:TRIADS_i31});
+but now in terms of the triad slopes $\tilde{\mathbb{R}}$ relative to geopotentials instead of
+the $\mathbb{R}$ relative to coordinate surfaces.
+The discrete form of \autoref{eq:TRIADS_eiv_skew_ijk} using the slopes \autoref{eq:TRIADS_R} and
+defining $A_e$ at $T$-points is then given by:
+
+\begin{subequations}
+  % \label{eq:TRIADS_allskewflux}
+  \begin{flalign*}
+    % \label{eq:TRIADS_vect_skew_flux}
+    \vect{F}_{\mathrm{eiv}}(T) &\equiv    \sum_{\substack{i_p,\,k_p}}
+    \begin{pmatrix}
+      {_{i+1/2-i_p}^k {\mathbb{S}_u}_{i_p}^{k_p} } (T)      \\      \\
+      {_i^{k+1/2-k_p} {\mathbb{S}_w}_{i_p}^{k_p} } (T)      \\
+    \end{pmatrix},
+  \end{flalign*}
+  where the skew flux in the $i$-direction associated with a given triad is (\autoref{eq:TRIADS_latflux-triad},
+  \autoref{eq:TRIADS_triadfluxu}):
+  \begin{align}
+    \label{eq:TRIADS_skewfluxu}
+    _i^k {\mathbb{S}_u}_{i_p}^{k_p} (T) &= + \fractext{1}{4} {A_e}_i^k{
+                                          \:}\frac{{b_u}_{i+i_p}^k}{{e_{1u}}_{\,i + i_p}^{\,k}}
+                                          \ {_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}} \
+                                          \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }, \\
+    \intertext{
+    and \autoref{eq:TRIADS_triadfluxw} in the $k$-direction, changing the sign
+    to be consistent with \autoref{eq:TRIADS_eiv_skew_ijk}:
+    }
+    _i^k {\mathbb{S}_w}_{i_p}^{k_p} (T)
+                                        &= -\fractext{1}{4} {A_e}_i^k{\: }\frac{{b_u}_{i+i_p}^k}{{e_{3w}}_{\,i}^{\,k+k_p}}
+                                          {_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}}\frac{ \delta_{i+ i_p}[T^k] }{ {e_{1u}}_{\,i + i_p}^{\,k} }.\label{eq:TRIADS_skewfluxw}
+  \end{align}
+\end{subequations}
+
+Such a discretisation is consistent with the iso-neutral operator as it uses the same definition for the slopes.
+It also ensures the following two key properties.
+
+%% =================================================================================================
+\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.
+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)$.
+For, following \autoref{subsec:TRIADS_variance} and \autoref{eq:TRIADS_dvar_iso_i},
+the associated horizontal skew-flux $_i^k{\mathbb{S}_u}_{i_p}^{k_p} (T)$ drives a net rate of change of variance,
+summed over the two $T$-points $i+i_p-\fractext{1}{2},k$ and $i+i_p+\fractext{1}{2},k$, of
+\begin{equation}
+  \label{eq:TRIADS_dvar_eiv_i}
+  _i^k{\mathbb{S}_u}_{i_p}^{k_p} (T)\,\delta_{i+ i_p}[T^k],
+\end{equation}
+while the associated vertical skew-flux gives a variance change summed over
+the $T$-points $i,k+k_p-\fractext{1}{2}$ (above) and $i,k+k_p+\fractext{1}{2}$ (below) of
+\begin{equation}
+  \label{eq:TRIADS_dvar_eiv_k}
+  _i^k{\mathbb{S}_w}_{i_p}^{k_p} (T) \,\delta_{k+ k_p}[T^i].
+\end{equation}
+Inspection of the definitions (\autoref{eq:TRIADS_skewfluxu}, \autoref{eq:TRIADS_skewfluxw}) shows that
+these two variance changes (\autoref{eq:TRIADS_dvar_eiv_i}, \autoref{eq:TRIADS_dvar_eiv_k}) sum to zero.
+Hence the two fluxes associated with each triad make no net contribution to the variance budget.
+
+%% =================================================================================================
+\subsubsection{Reduction in gravitational PE}
+
+The vertical density flux associated with the vertical skew-flux always has the same sign as
+the vertical density gradient;
+thus, so long as the fluid is stable (the vertical density gradient is negative)
+the vertical density flux is negative (downward) and hence reduces the gravitational PE.
+
+For the change in gravitational PE driven by the $k$-flux is
+\begin{align}
+  \label{eq:TRIADS_vert_densityPE}
+  g {e_{3w}}_{\,i}^{\,k+k_p}{\mathbb{S}_w}_{i_p}^{k_p} (\rho)
+  &=g {e_{3w}}_{\,i}^{\,k+k_p}\left[-\alpha _i^k {\:}_i^k
+    {\mathbb{S}_w}_{i_p}^{k_p} (T) + \beta_i^k {\:}_i^k
+    {\mathbb{S}_w}_{i_p}^{k_p} (S) \right]. \notag \\
+  \intertext{Substituting  ${\:}_i^k {\mathbb{S}_w}_{i_p}^{k_p}$ from \autoref{eq:TRIADS_skewfluxw}, gives}
+  % and separating out
+  % $\rtriadt{R}=\rtriad{R} + \delta_{i+i_p}[z_T^k]$,
+  % gives two terms. The
+  % first $\rtriad{R}$ term (the only term for $z$-coordinates) is:
+  &=-\fractext{1}{4} g{A_e}_i^k{\: }{b_u}_{i+i_p}^k {_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}}
+    \frac{ -\alpha _i^k\delta_{i+ i_p}[T^k]+ \beta_i^k\delta_{i+ i_p}[S^k]} { {e_{1u}}_{\,i + i_p}^{\,k} } \notag \\
+  &=+\fractext{1}{4} g{A_e}_i^k{\: }{b_u}_{i+i_p}^k
+    \left({_i^k\mathbb{R}_{i_p}^{k_p}}+\frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}}\right) {_i^k\mathbb{R}_{i_p}^{k_p}}
+    \frac{-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]} {{e_{3w}}_{\,i}^{\,k+k_p}},
+\end{align}
+using the definition of the triad slope $\rtriad{R}$, \autoref{eq:TRIADS_R} to
+express $-\alpha _i^k\delta_{i+ i_p}[T^k]+\beta_i^k\delta_{i+ i_p}[S^k]$ in terms of
+$-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]$.
+
+Where the coordinates slope, the $i$-flux gives a PE change
+\begin{multline}
+  \label{eq:TRIADS_lat_densityPE}
+  g \delta_{i+i_p}[z_T^k]
+  \left[
+    -\alpha _i^k {\:}_i^k {\mathbb{S}_u}_{i_p}^{k_p} (T) + \beta_i^k {\:}_i^k {\mathbb{S}_u}_{i_p}^{k_p} (S)
+  \right] \\
+  = +\fractext{1}{4} g{A_e}_i^k{\: }{b_u}_{i+i_p}^k
+  \frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}}
+  \left({_i^k\mathbb{R}_{i_p}^{k_p}}+\frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}}\right)
+  \frac{-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]} {{e_{3w}}_{\,i}^{\,k+k_p}},
+\end{multline}
+(using \autoref{eq:TRIADS_skewfluxu}) and so the total PE change \autoref{eq:TRIADS_vert_densityPE} +
+\autoref{eq:TRIADS_lat_densityPE} associated with the triad fluxes is
+\begin{multline*}
+  % \label{eq:TRIADS_tot_densityPE}
+  g{e_{3w}}_{\,i}^{\,k+k_p}{\mathbb{S}_w}_{i_p}^{k_p} (\rho) +
+  g\delta_{i+i_p}[z_T^k] {\:}_i^k {\mathbb{S}_u}_{i_p}^{k_p} (\rho) \\
+  = +\fractext{1}{4} g{A_e}_i^k{\: }{b_u}_{i+i_p}^k
+  \left({_i^k\mathbb{R}_{i_p}^{k_p}}+\frac{\delta_{i+i_p}[z_T^k]}{{e_{1u}}_{\,i + i_p}^{\,k}}\right)^2
+  \frac{-\alpha_i^k \delta_{k+ k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]} {{e_{3w}}_{\,i}^{\,k+k_p}}.
+\end{multline*}
+Where the fluid is stable, with $-\alpha_i^k \delta_{k+ k_p}[T^i]+
+\beta_i^k\delta_{k+ k_p}[S^i]<0$, this PE change is negative.
+
+%% =================================================================================================
+\subsection{Treatment of the triads at the boundaries}
+\label{sec:TRIADS_skew_bdry}
+
+Triad slopes \rtriadt{R} used for the calculation of the eddy-induced skew-fluxes are masked at the boundaries
+in exactly the same way as are the triad slopes \rtriad{R} used for the iso-neutral diffusive fluxes,
+as described in \autoref{sec:TRIADS_iso_bdry} and \autoref{fig:TRIADS_bdry_triads}.
+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.
+The namelist parameter \np{ln_botmix_triad}{ln\_botmix\_triad} has no effect on the eddy-induced skew-fluxes.
+
+%% =================================================================================================
+\subsection{Limiting of the slopes within the interior}
+\label{sec:TRIADS_limitskew}
+
+Presently, the iso-neutral slopes $\tilde{r}_i$ relative to geopotentials are limited to be less than $1/100$,
+exactly as in calculating the iso-neutral diffusion, \S \autoref{sec:TRIADS_limit}.
+Each individual triad \rtriadt{R} is so limited.
+
+%% =================================================================================================
+\subsection{Tapering within the surface mixed layer}
+\label{sec:TRIADS_taperskew}
+
+The slopes $\tilde{r}_i$ relative to geopotentials (and thus the individual triads \rtriadt{R})
+are always tapered linearly from their value immediately below the mixed layer to zero at the surface
+\autoref{eq:TRIADS_rmtilde}, as described in \autoref{sec:TRIADS_lintaper}.
+This is option (c) of \autoref{fig:LDF_eiv_slp}.
+This linear tapering for the slopes used to calculate the eddy-induced fluxes is unaffected by
+the value of \np{ln_triad_iso}{ln\_triad\_iso}.
+
+The justification for this linear slope tapering is that, for $A_e$ that is constant or varies only in
+the horizontal (the most commonly used options in \NEMO: see \autoref{sec:LDF_coef}),
+it is equivalent to a horizontal eiv (eddy-induced velocity) that is uniform within the mixed layer
+\autoref{eq:TRIADS_eiv_v}.
+This ensures that the eiv velocities do not restratify the mixed layer \citep{treguier.held.ea_JPO97,danabasoglu.ferrari.ea_JC08}.
+Equivantly, in terms of the skew-flux formulation we use here,
+the linear slope tapering within the mixed-layer gives a linearly varying vertical flux,
+and so a tracer convergence uniform in depth
+(the horizontal flux convergence is relatively insignificant within the mixed-layer).
+
+%% =================================================================================================
+\subsection{Streamfunction diagnostics}
+\label{sec:TRIADS_sfdiag}
+
+Where the namelist parameter \np[=.true.]{ln_traldf_gdia}{ln\_traldf\_gdia},
+diagnosed mean eddy-induced velocities are output.
+Each time step, streamfunctions are calculated in the $i$-$k$ and $j$-$k$ planes at
+$uw$ (integer +1/2 $i$, integer $j$, integer +1/2 $k$) and $vw$ (integer $i$, integer +1/2 $j$, integer +1/2 $k$)
+points (see Table \autoref{tab:DOM_cell}) respectively.
+We follow \citep{griffies_bk04} and calculate the streamfunction at a given $uw$-point from
+the surrounding four triads according to:
+\[
+  % \label{eq:TRIADS_sfdiagi}
+  {\psi_1}_{i+1/2}^{k+1/2}={\fractext{1}{4}}\sum_{\substack{i_p,\,k_p}}
+  {A_e}_{i+1/2-i_p}^{k+1/2-k_p}\:\triadd{i+1/2-i_p}{k+1/2-k_p}{R}{i_p}{k_p}.
+\]
+The streamfunction $\psi_1$ is calculated similarly at $vw$ points.
+The eddy-induced velocities are then calculated from the straightforward discretisation of \autoref{eq:TRIADS_eiv_v}:
+\[
+  % \label{eq:TRIADS_eiv_v_discrete}
+  \begin{split}
+    {u^*}_{i+1/2}^{k} & = - \frac{1}{{e_{3u}}_{i}^{k}}\left({\psi_1}_{i+1/2}^{k+1/2}-{\psi_1}_{i+1/2}^{k+1/2}\right),   \\
+    {v^*}_{j+1/2}^{k} & = - \frac{1}{{e_{3v}}_{j}^{k}}\left({\psi_2}_{j+1/2}^{k+1/2}-{\psi_2}_{j+1/2}^{k+1/2}\right),   \\
+    {w^*}_{i,j}^{k+1/2} & =    \frac{1}{e_{1t}e_{2t}}\; \left\{
+      {e_{2u}}_{i+1/2}^{k+1/2} \,{\psi_1}_{i+1/2}^{k+1/2} -
+      {e_{2u}}_{i-1/2}^{k+1/2} \,{\psi_1}_{i-1/2}^{k+1/2} \right. + \\
+    \phantom{=} & \qquad\qquad\left. {e_{2v}}_{j+1/2}^{k+1/2} \,{\psi_2}_{j+1/2}^{k+1/2} - {e_{2v}}_{j-1/2}^{k+1/2} \,{\psi_2}_{j-1/2}^{k+1/2} \right\},
+  \end{split}
+\]
+
+\subinc{\input{../../global/epilogue}}
+
+\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/blocks.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/blocks.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/blocks.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/blocks.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_ASM.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_ASM.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_ASM.tex	(revision 11831)
@@ -2,26 +2,39 @@
 
 \begin{document}
-% ================================================================
-% Chapter Assimilation increments (ASM)
-% ================================================================
+
 \chapter{Apply Assimilation Increments (ASM)}
 \label{chap:ASM}
 
-Authors: D. Lea,  M. Martin, K. Mogensen, A. Weaver, ...   % do we keep
+%    {\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}  \\
 
-\minitoc
+\thispagestyle{plain}
 
-\newpage
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
 
 The ASM code adds the functionality to apply increments to the model variables: temperature, salinity,
-sea surface height, velocity and sea ice concentration. 
+sea surface height, velocity and sea ice concentration.
 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}{\_asminc}.
 There is a brief description of all the namelist options provided.
 To build the ASM code \key{asminc} must be set.
 
-%===============================================================
-
+%% =================================================================================================
 \section{Direct initialization}
 \label{sec:ASM_DI}
@@ -29,6 +42,7 @@
 Direct initialization (DI) refers to the instantaneous correction of the model background state using
 the analysis increment.
-DI is used when \np{ln\_asmdin} is set to true.
+DI is used when \np{ln_asmdin}{ln\_asmdin} is set to true.
 
+%% =================================================================================================
 \section{Incremental analysis updates}
 \label{sec:ASM_IAU}
@@ -37,18 +51,18 @@
 it may be preferable to introduce the increment gradually into the ocean model in order to
 minimize spurious adjustment processes.
-This technique is referred to as Incremental Analysis Updates (IAU) \citep{Bloom_al_MWR96}.
+This technique is referred to as Incremental Analysis Updates (IAU) \citep{bloom.takacs.ea_MWR96}.
 IAU is a common technique used with 3D assimilation methods such as 3D-Var or OI.
-IAU is used when \np{ln\_asmiau} is set to true.
+IAU is used when \np{ln_asmiau}{ln\_asmiau} is set to true.
 
-With IAU, the model state trajectory ${\bf x}$ in the assimilation window ($t_{0} \leq t_{i} \leq t_{N}$)
+With IAU, the model state trajectory ${\mathbf x}$ in the assimilation window ($t_{0} \leq t_{i} \leq t_{N}$)
 is corrected by adding the analysis increments for temperature, salinity, horizontal velocity and SSH as
 additional tendency terms to the prognostic equations:
 \begin{align*}
-  % \label{eq:wa_traj_iau}
-  {\bf x}^{a}(t_{i}) = M(t_{i}, t_{0})[{\bf x}^{b}(t_{0})] \; + \; F_{i} \delta \tilde{\bf x}^{a}
+  % \label{eq:ASM_wa_traj_iau}
+  {\mathbf x}^{a}(t_{i}) = M(t_{i}, t_{0})[{\mathbf x}^{b}(t_{0})] \; + \; F_{i} \delta \tilde{\mathbf x}^{a}
 \end{align*}
-where $F_{i}$ is a weighting function for applying the increments $\delta\tilde{\bf x}^{a}$ defined such that
+where $F_{i}$ is a weighting function for applying the increments $\delta\tilde{\mathbf x}^{a}$ defined such that
 $\sum_{i=1}^{N} F_{i}=1$.
-${\bf x}^b$ denotes the model initial state and ${\bf x}^a$ is the model state after the increments are applied.
+${\mathbf x}^b$ denotes the model initial state and ${\mathbf x}^a$ is the model state after the increments are applied.
 To control the adjustment time of the model to the increment,
 the increment can be applied over an arbitrary sub-window, $t_{m} \leq t_{i} \leq t_{n}$,
@@ -56,44 +70,46 @@
 Typically the increments are spread evenly over the full window.
 In addition, two different weighting functions have been implemented.
-The first function employs constant weights, 
+The first function (namelist option \np{niaufn}{niaufn}=0) employs constant weights,
 \begin{align}
-  \label{eq:F1_i}
+  \label{eq:ASM_F1_i}
   F^{(1)}_{i}
   =\left\{
   \begin{array}{ll}
-    0     &    {\rm if} \; \; \; t_{i} < t_{m}                \\
-    1/M &    {\rm if} \; \; \; t_{m} < t_{i} \leq t_{n} \\
-    0     &    {\rm if} \; \; \; t_{i} > t_{n}
+    0     &    {\mathrm if} \; \; \; t_{i} < t_{m}                \\
+    1/M &    {\mathrm if} \; \; \; t_{m} < t_{i} \leq t_{n} \\
+    0     &    {\mathrm if} \; \; \; t_{i} > t_{n}
   \end{array}
-            \right. 
+            \right.
 \end{align}
 where $M = m-n$.
-The second function employs peaked hat-like weights in order to give maximum weight in the centre of the sub-window,
+The second function (namelist option \np{niaufn}{niaufn}=1) employs peaked hat-like weights in order to give maximum weight in the centre of the sub-window,
 with the weighting reduced linearly to a small value at the window end-points:
 \begin{align}
-  \label{eq:F2_i}
+  \label{eq:ASM_F2_i}
   F^{(2)}_{i}
   =\left\{
   \begin{array}{ll}
-    0                           &    {\rm if} \; \; \; t_{i}       <     t_{m}                        \\
-    \alpha \, i               &    {\rm if} \; \; \; t_{m}    \leq t_{i}    \leq   t_{M/2}   \\
-    \alpha \, (M - i +1) &    {\rm if} \; \; \; t_{M/2}  <    t_{i}    \leq   t_{n}       \\
-    0                            &   {\rm if} \; \; \; t_{i}        >    t_{n}
+    0                           &    {\mathrm if} \; \; \; t_{i}       <     t_{m}                        \\
+    \alpha \, i               &    {\mathrm if} \; \; \; t_{m}    \leq t_{i}    \leq   t_{M/2}   \\
+    \alpha \, (M - i +1) &    {\mathrm if} \; \; \; t_{M/2}  <    t_{i}    \leq   t_{n}       \\
+    0                            &   {\mathrm if} \; \; \; t_{i}        >    t_{n}
   \end{array}
                                    \right.
 \end{align}
-where $\alpha^{-1} = \sum_{i=1}^{M/2} 2i$ and $M$ is assumed to be even. 
-The weights described by \autoref{eq:F2_i} provide a smoother transition of the analysis trajectory from
-one assimilation cycle to the next than that described by \autoref{eq:F1_i}.
+where $\alpha^{-1} = \sum_{i=1}^{M/2} 2i$ and $M$ is assumed to be even.
+The weights described by \autoref{eq:ASM_F2_i} provide a smoother transition of the analysis trajectory from
+one assimilation cycle to the next than that described by \autoref{eq:ASM_F1_i}.
 
-%==========================================================================
-% Divergence damping description %%%
+%% =================================================================================================
 \section{Divergence damping initialisation}
 \label{sec:ASM_div_dmp}
 
-The velocity increments may be initialized by the iterative application of a divergence damping operator.
-In iteration step $n$ new estimates of velocity increments $u^{n}_I$ and $v^{n}_I$ are updated by:
+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}.
+
+In iteration step $n$ (starting at $n=1$) new estimates of velocity increments $u^{n}_I$ and $v^{n}_I$ are updated by:
+
 \begin{equation}
-  \label{eq:asm_dmp}
+  \label{eq:ASM_dmp}
   \left\{
     \begin{aligned}
@@ -105,12 +121,15 @@
   \right.,
 \end{equation}
-where
+
+where the divergence is defined as
+
 \[
-  % \label{eq:asm_div}
+  % \label{eq:ASM_div}
   \chi^{n-1}_I = \frac{1}{e_{1t}\,e_{2t}\,e_{3t} }
   \left( {\delta_i \left[ {e_{2u}\,e_{3u}\,u^{n-1}_I} \right]
       +\delta_j \left[ {e_{1v}\,e_{3v}\,v^{n-1}_I} \right]} \right).
 \]
-By the application of \autoref{eq:asm_dmp} and \autoref{eq:asm_dmp} the divergence is filtered in each iteration,
+
+By the application of \autoref{eq:ASM_dmp} the divergence is filtered in each iteration,
 and the vorticity is left unchanged.
 In the presence of coastal boundaries with zero velocity increments perpendicular to the coast
@@ -118,24 +137,22 @@
 This type of the initialisation reduces the vertical velocity magnitude and
 alleviates the problem of the excessive unphysical vertical mixing in the first steps of the model integration
-\citep{Talagrand_JAS72, Dobricic_al_OS07}.
+\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}{nn\_divdmp} in the \nam{_asminc}{\_asminc} namelist
 a value greater than zero.
-By choosing this value to be of the order of 100 the increments in
-the vertical velocity will be significantly reduced.
+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.
 
-
-%==========================================================================
-
+%% =================================================================================================
 \section{Implementation details}
 \label{sec:ASM_details}
 
-Here we show an example \ngn{namasm} namelist and the header of an example assimilation increments file on
+Here we show an example \nam{_asminc}{\_asminc} namelist and the header of an example assimilation increments file on
 the ORCA2 grid.
 
-%------------------------------------------namasm-----------------------------------------------------
-%
-\nlst{nam_asminc}
-%-------------------------------------------------------------------------------------------------------------
+\begin{listing}
+  \nlst{nam_asminc}
+  \caption{\forcode{&nam_asminc}}
+  \label{lst:nam_asminc}
+\end{listing}
 
 The header of an assimilation increments file produced using the NetCDF tool
@@ -177,7 +194,5 @@
 \end{clines}
 
-\biblio
-
-\pindex
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_CONFIG.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_CONFIG.tex	(revision 11086)
+++ 	(revision )
@@ -1,326 +1,0 @@
-\documentclass[../main/NEMO_manual]{subfiles}
-
-\begin{document}
-% ================================================================
-% Chapter Configurations
-% ================================================================
-\chapter{Configurations}
-\label{chap:CFG}
-
-\minitoc
-
-\newpage
-
-% ================================================================
-% Introduction
-% ================================================================
-\section{Introduction}
-\label{sec:CFG_intro}
-
-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.
-This form of verification is critical as one adopts the code for his or her particular research purposes.
-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.
-
-%------------------------------------------namcfg----------------------------------------------------
-
-\nlst{namcfg}
-%-------------------------------------------------------------------------------------------------------------
-
-% ================================================================
-% 1D model configuration
-% ================================================================
-\section{C1D: 1D Water column model (\protect\key{c1d}) }
-\label{sec:CFG_c1d}
-
-BE careful: to be re-written according to suppression of jpizoom and jpjzoom !!!!
-
-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{CONFIG/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;
-\textit{(b)} to investigate suitable parameterisations of unresolved turbulence
-(surface wave breaking, Langmuir circulation, ...);
-\textit{(c)} to compare the behaviour of different vertical mixing schemes;
-\textit{(d)} to perform sensitivity studies on the vertical diffusion at a particular point of an ocean domain;
-\textit{(d)} to produce extra diagnostics, without the large memory requirement of the full 3D model.
-
-The methodology is based on the use of the zoom functionality over the smallest possible domain:
-a 3x3 domain centered on the grid point of interest, with some extra routines.
-There is no need to define a new mesh, bathymetry, initial state or forcing,
-since the 1D model will use those of the configuration it is a zoom of.
-The chosen grid point is set in \textit{\ngn{namcfg}} namelist by
-setting the \np{jpizoom} and \np{jpjzoom} parameters to the indices of the location of the chosen grid point.
-
-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 five main things in the code behaviour: 
-\begin{description}
-\item[(1)]
-  the lateral boundary condition routine (\rou{lbc\_lnk}) set the value of the central column of
-  the 3x3 domain is imposed over the whole domain;
-\item[(3)]
-  a call to \rou{lbc\_lnk} is systematically done when reading input data (\ie in \mdl{iom});
-\item[(3)]
-  a simplified \rou{stp} routine is used (\rou{stp\_c1d}, see \mdl{step\_c1d} module) in which
-  both lateral tendancy terms and lateral physics are not called;
-\item[(4)]
-  the vertical velocity is zero
-  (so far, no attempt at introducing a Ekman pumping velocity has been made);
-\item[(5)]
-  a simplified treatment of the Coriolis term is performed as $U$- and $V$-points are the same
-  (see \mdl{dyncor\_c1d}).
-\end{description}
-All the relevant \textit{\_c1d} modules can be found in the NEMOGCM/NEMO/OPA\_SRC/C1D directory of
-the \NEMO distribution.
-
-% to be added:  a test case on the yearlong Ocean Weather Station (OWS) Papa dataset of Martin (1985)
-
-% ================================================================
-% ORCA family configurations
-% ================================================================
-\section{ORCA family: global ocean with tripolar grid}
-\label{sec:CFG_orca}
-
-The ORCA family is a series of global ocean configurations that are run together with
-the LIM sea-ice model (ORCA-LIM) and possibly with PISCES biogeochemical model (ORCA-LIM-PISCES),
-using various resolutions.
-An appropriate namelist is available in \path{CONFIG/ORCA2_LIM3_PISCES/EXP00/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 in the wiki of NEMO: \\
-https://forge.ipsl.jussieu.fr/nemo/wiki/Users/ReferenceConfigurations/ORCA2\_LIM3\_PISCES \\
-In this namelist\_cfg the name of domain input file is set in \ngn{namcfg} block of namelist. 
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=0.98\textwidth]{Fig_ORCA_NH_mesh}
-    \caption{
-      \protect\label{fig:MISC_ORCA_msh}
-      ORCA mesh conception.
-      The departure from an isotropic Mercator grid start poleward of 20\deg{N}.
-      The two "north pole" are the foci of a series of embedded ellipses (blue curves) which
-      are determined analytically and form the i-lines of the ORCA mesh (pseudo latitudes).
-      Then, following \citet{Madec_Imbard_CD96}, the normal to the series of ellipses (red curves) is computed which
-      provides the j-lines of the mesh (pseudo longitudes).
-    }
-  \end{center}
-\end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-% -------------------------------------------------------------------------------------------------------------
-%       ORCA tripolar grid
-% -------------------------------------------------------------------------------------------------------------
-\subsection{ORCA tripolar grid}
-\label{subsec:CFG_orca_grid}
-
-The ORCA grid is a tripolar is based on the semi-analytical method of \citet{Madec_Imbard_CD96}.
-It allows to construct a global orthogonal curvilinear ocean mesh which has no singularity point inside
-the computational domain since two north mesh poles are introduced and placed on lands.
-The method involves defining an analytical set of mesh parallels in the stereographic polar plan,
-computing the associated set of mesh meridians, and projecting the resulting mesh onto the sphere.
-The set of mesh parallels used is a series of embedded ellipses which foci are the two mesh north poles
-(\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. 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!tbp]
-  \begin{center}
-    \includegraphics[width=1.0\textwidth]{Fig_ORCA_NH_msh05_e1_e2}
-    \includegraphics[width=0.80\textwidth]{Fig_ORCA_aniso}
-    \caption {
-      \protect\label{fig:MISC_ORCA_e1e2}
-      \textit{Top}: Horizontal scale factors ($e_1$, $e_2$) and
-      \textit{Bottom}: ratio of anisotropy ($e_1 / e_2$)
-      for ORCA 0.5\deg ~mesh.
-      South of 20\deg{N} a Mercator grid is used ($e_1 = e_2$) so that the anisotropy ratio is 1.
-      Poleward of 20\deg{N}, the two "north pole" introduce a weak anisotropy over the ocean areas ($< 1.2$) except in
-      vicinity of Victoria Island (Canadian Arctic Archipelago).
-    }
-  \end{center}
-\end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-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)
-is a compromise between maintaining the ratio of mesh anisotropy ($e_1 / e_2$) close to one in the ocean
-(especially in area of strong eddy activities such as the Gulf Stream) and keeping the smallest scale factor in
-the northern hemisphere larger than the smallest one in the southern hemisphere.
-The resulting mesh is shown in \autoref{fig:MISC_ORCA_msh} and \autoref{fig:MISC_ORCA_e1e2} for
-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. 
-
-% -------------------------------------------------------------------------------------------------------------
-%       ORCA-LIM(-PISCES) configurations
-% -------------------------------------------------------------------------------------------------------------
-\subsection{ORCA pre-defined resolution}
-\label{subsec:CFG_orca_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}).
-
-%--------------------------------------------------TABLE--------------------------------------------------
-\begin{table}[!t]
-  \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
-    \end{tabular}
-    \caption{
-      \protect\label{tab:ORCA}
-      Domain size of ORCA family configurations.
-      The flag for configurations of ORCA family need to be set in \textit{domain\_cfg} file.
-    }
-  \end{center}
-\end{table}
-%--------------------------------------------------------------------------------------------------------------
-
-
-The ORCA\_R2 configuration has the following specificity: starting from a 2\deg~ORCA mesh,
-local mesh refinements were applied to the Mediterranean, Red, Black and Caspian Seas,
-so that the resolution is 1\deg \time 1\deg there.
-A local transformation were also applied with in the Tropics in order to refine the meridional resolution up to
-0.5\deg at the Equator.
-
-The ORCA\_R1 configuration has only a local tropical transformation to refine the meridional resolution up to
-1/3\deg~at the Equator.
-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.  
-
-For ORCA\_R1 and R025, setting the configuration key to 75 allows to use 75 vertical levels, otherwise 46 are used.
-In the other ORCA configurations, 31 levels are used
-(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.
-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_al_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_Rep04} (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_Rep04} 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_Rep04} has been chosen of the \NEMO distribution since release v3.3. 
-
-ORCA\_R2 pre-defined configuration can also be run with an AGRIF zoom over the Agulhas current area
-(\key{agrif} defined) and, by setting the appropriate variables, see \path{CONFIG/SHARED/namelist_ref}.
-A regional Arctic or peri-Antarctic configuration is extracted from an ORCA\_R2 or R05 configurations using
-sponge layers at open boundaries. 
-
-% -------------------------------------------------------------------------------------------------------------
-%       GYRE family: double gyre basin
-% -------------------------------------------------------------------------------------------------------------
-\section{GYRE family: double gyre basin }
-\label{sec:CFG_gyre}
-
-The GYRE configuration \citep{Levy_al_OM10} has been built to
-simulate the seasonal cycle of a double-gyre box model.
-It consists in an idealized domain similar to that used in the studies of \citet{Drijfhout_JPO94} and
-\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. 
-
-The domain geometry is a closed rectangular basin on the $\beta$-plane centred at $\sim$ 30\deg{N} and
-rotated by 45\deg, 3180~km long, 2120~km wide and 4~km deep (\autoref{fig:MISC_strait_hand}).
-The domain is bounded by vertical walls and by a flat bottom.
-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_al_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
-a small recirculation gyre in the southern corner.
-The net heat flux takes the form of a restoring toward a zonal apparent air temperature profile.
-A portion of the net heat flux which comes from the solar radiation is allowed to penetrate within the water column.
-The fresh water flux is also prescribed and varies zonally.
-It is determined such as, at each time step, the basin-integrated flux is zero.
-The basin is initialised at rest with vertical profiles of temperature and salinity uniformly applied to
-the whole domain.
-
-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{CONFIG/GYRE/EXP00/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   \\
-Obviously, the namelist parameters have to be adjusted to the chosen resolution,
-see the Configurations pages on the NEMO web site (Using NEMO\/Configurations).
-In the vertical, GYRE uses the default 30 ocean levels (\jp{jpk}\forcode{ = 31}) (\autoref{fig:zgr}).
-
-The GYRE configuration is also used in benchmark test as it is very simple to increase its resolution and
-as it does not requires any input file.
-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{CONFIG/GYRE/EXP00/namelist_cfg}.
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=1.0\textwidth]{Fig_GYRE}
-    \caption{
-      \protect\label{fig:GYRE}
-      Snapshot of relative vorticity at the surface of the model domain in GYRE R9, R27 and R54.
-      From \citet{Levy_al_OM10}.
-    }
-  \end{center}
-\end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-% -------------------------------------------------------------------------------------------------------------
-%       AMM configuration
-% -------------------------------------------------------------------------------------------------------------
-\section{AMM: atlantic margin configuration}
-\label{sec:MISC_config_AMM}
-
-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{CONFIG/AMM12/EXP00/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.
-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.
-The AMM configuration uses the GLS (\key{zdfgls}) turbulence scheme,
-the VVL non-linear free surface(\key{vvl}) and time-splitting (\key{dynspg\_ts}).
-
-In addition to the tidal boundary condition the model may also take open boundary conditions from
-a North Atlantic model.
-Boundaries may be completely omitted by setting \np{ln\_bdy} to false.
-Sample surface fluxes, river forcing and a sample initial restart file are included to test a realistic model run.
-The Baltic boundary is included within the river input file and is specified as a river source.
-Unlike ordinary river points the Baltic inputs also include salinity and temperature data.
-
-\biblio
-
-\pindex
-
-\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_DIA.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_DIA.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_DIA.tex	(revision 11831)
@@ -2,18 +2,35 @@
 
 \begin{document}
-% ================================================================
-% Chapter I/O & Diagnostics
-% ================================================================
+
 \chapter{Output and Diagnostics (IOM, DIA, TRD, FLO)}
 \label{chap:DIA}
 
-\minitoc
-
-\newpage
-
-% ================================================================
-%       Old Model Output 
-% ================================================================
-\section{Old model output (default)}
+%    {\em 4.0} & {\em Mirek Andrejczuk, Massimiliano Drudi} & {\em }  \\
+%    {\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 }  \\
+
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
+
+%% =================================================================================================
+\section{Model output}
 \label{sec:DIA_io_old}
 
@@ -25,10 +42,9 @@
 the same run performed in one step.
 It should be noted that this requires that the restart file contains two consecutive time steps for
-all the prognostic variables, and that it is saved in the same binary format as the one used by the computer that
-is to read it (in particular, 32 bits binary IEEE format must not be used for this file).
+all the prognostic variables.
 
 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.
 
@@ -39,51 +55,32 @@
 A complete description of the use of this I/O server is presented in the next section.
 
-By default, \key{iomput} is not defined,
-NEMO produces NetCDF with the old IOIPSL library which has been kept for compatibility and its easy installation.
-However, the IOIPSL library is quite inefficient on parallel machines and, since version 3.2,
-many diagnostic options have been added presuming the use of \key{iomput}.
-The usefulness of the default IOIPSL-based option is expected to reduce with each new release.
-If \key{iomput} is not defined, output files and content are defined in the \mdl{diawri} module and
-contain mean (or instantaneous if \key{diainstant} is defined) values over a regular period of
-nn\_write time-steps (namelist parameter). 
-
-%\gmcomment{                    % start of gmcomment
-
-% ================================================================
-% Diagnostics
-% ================================================================
+%\cmtgm{                    % start of gmcomment
+
+%% =================================================================================================
 \section{Standard model output (IOM)}
 \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}
-\item
-  The complete and flexible control of the output files through external XML files adapted by
+\item The complete and flexible control of the output files through external XML files adapted by
   the user from standard templates.
-\item
-  To achieve high performance and scalable output through the optional distribution of
+\item To achieve high performance and scalable output through the optional distribution of
   all diagnostic output related tasks to dedicated processes.
 \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:
 
 \begin{itemize}
-\item
-  The choice of output frequencies that can be different for each file (including real months and years).
-\item
-  The choice of file contents; includes complete flexibility over which data are written in which files
+\item The choice of output frequencies that can be different for each file (including real months and years).
+\item The choice of file contents; includes complete flexibility over which data are written in which files
   (the same data can be written in different files).
-\item
-  The possibility to split output files at a chosen frequency.
-\item
-  The possibility to extract a vertical or an horizontal subdomain.
-\item
-  The choice of the temporal operation to perform, \eg: average, accumulate, instantaneous, min, max and once.
-\item
-  Control over metadata via a large XML "database" of possible output fields.
+\item The possibility to split output files at a chosen frequency.
+\item The possibility to extract a vertical or an horizontal subdomain.
+\item The choice of the temporal operation to perform, \eg: average, accumulate, instantaneous, min, max and once.
+\item Control over metadata via a large XML "database" of possible output fields.
 \end{itemize}
 
@@ -91,36 +88,40 @@
 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: \path{NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef.xml},
-\path{NEMOGCM/CONFIG/SHARED/field_def.xml} and \path{NEMOGCM/CONFIG/SHARED/domain_def.xml}. \\
+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},
+\path{cfgs/SHARED/field_def_nemo-pisces.xml},
+\path{cfgs/SHARED/field_def_nemo-ice.xml} and \path{cfgs/SHARED/domain_def_nemo.xml}. \\
 
 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-1.0}{XIOS-1.0} 
-(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.
 
+%% =================================================================================================
 \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 
-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, 
+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[=.true. ]{ln_xios_read}{ln\_xios\_read}
+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):
 
@@ -129,34 +130,34 @@
 \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}{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[=2]{nn_wxios}{nn\_wxios} 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[=2]{nn_wxios}{nn\_wxios}}. 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} - 
+\begin{enumerate}
+\item 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 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}
-
+\end{enumerate}
 
 An older versions of XIOS do not support reading functionality. It's recommended to use at least XIOS2@1451.
 
-
+%% =================================================================================================
 \subsection{XIOS: XML Inputs-Outputs Server}
 
+%% =================================================================================================
 \subsubsection{Attached or detached mode?}
 
@@ -168,12 +169,14 @@
 \xmlline|<variable id="using_server" type="bool"></variable>|
 
-The {\tt using\_server} setting determines whether or not the server will be used in \textit{attached mode}
-(as a library) [{\tt> false <}] or in \textit{detached mode}
-(as an external executable on N additional, dedicated cpus) [{\tt > true <}].
-The \textit{attached mode} is simpler to use but much less efficient for massively parallel applications.
+The \texttt{using\_server} setting determines whether or not the server will be used in
+\textit{attached mode}
+(as a library) [\texttt{> false <}] or in \textit{detached mode}
+(as an external executable on N additional, dedicated cpus) [\texttt{ > true <}].
+The \textit{attached mode} is simpler to use but much less efficient for
+massively parallel applications.
 The type of each file can be either ''multiple\_file'' or ''one\_file''.
 
 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
@@ -187,17 +190,18 @@
 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.
 
+%% =================================================================================================
 \subsubsection{Number of cpu used by XIOS in detached mode}
 
 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.
@@ -205,11 +209,12 @@
 \cmd|mpirun -np 62 ./nemo.exe : -np 2 ./xios_server.exe|
 
+%% =================================================================================================
 \subsubsection{Control of XIOS: the context in iodef.xml}
 
-As well as the {\tt 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.
 
 \begin{table}
-  \scriptsize
   \begin{tabularx}{\textwidth}{|lXl|}
     \hline
@@ -220,5 +225,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 &
@@ -226,5 +231,5 @@
     \hline
     buffer\_server\_factor\_size                                            &
-    ratio between NEMO and XIOS buffer size.
+    ratio between \NEMO\ and XIOS buffer size.
     Should be 2.                                                            &
     2        \\
@@ -243,5 +248,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   \\
@@ -250,14 +255,17 @@
 \end{table}
 
+%% =================================================================================================
 \subsection{Practical issues}
 
+%% =================================================================================================
 \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.
-The \href{https://forge.ipsl.jussieu.fr/nemo/wiki/Users/ModelInterfacing/InputsOutputs#Inputs-OutputsusingXIOS}
-{XIOS with NEMO} guide provides an example illustration of how this can be achieved.
-
+\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.
+
+%% =================================================================================================
 \subsubsection{Add your own outputs}
 
@@ -268,23 +276,18 @@
 
 \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.
-\item[2.]
-  If necessary, add \forcode{USE iom ! I/O manager library} to the list of used modules in
+\item in \NEMO\ code, add a \forcode{CALL iom_put( 'identifier', array )} where you want to output a 2D or 3D array.
+\item If necessary, add \forcode{USE iom ! I/O manager library} to the list of used modules in
   the upper part of your module.
-\item[3.]
-  in the field\_def.xml file, add the definition of your variable using the same identifier you used in the f90 code
+\item in the field\_def.xml file, add the definition of your variable using the same identifier you used in the f90 code
   (see subsequent sections for a details of the XML syntax and rules).
   For example:
-
 \begin{xmllines}
 <field_definition>
 	<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> 
-\end{xmllines}
-
+</field_definition>
+\end{xmllines}
 Note your definition must be added to the field\_group whose reference grid is consistent with the size of
 the array passed to iomput.
@@ -293,29 +296,26 @@
 (iom\_set\_domain\_attr and iom\_set\_axis\_attr in \mdl{iom}) or defined in the domain\_def.xml file.
 \eg:
-
 \begin{xmllines}
 <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
 \end{xmllines}
-
-Note, if your array is computed within the surface module each \np{nn\_fsbc} time\_step,
+Note, if your array is computed within the surface module each \np{nn_fsbc}{nn\_fsbc} time\_step,
 add the field definition within the field\_group defined with the id "SBC":
 \xmlcode{<field_group id="SBC" ...>} which has been defined with the correct frequency of operations
 (iom\_set\_field\_attr in \mdl{iom})
-\item[4.]
-  add your field in one of the output files defined in iodef.xml
+\item add your field in one of the output files defined in iodef.xml
   (again see subsequent sections for syntax and rules)
-
-\begin{xmllines}
-<file id="file1" .../>   
+\begin{xmllines}
+<file id="file1" .../>
 ...
-	<field field_ref="identifier" />   
+	<field field_ref="identifier" />
 	...
-</file>   
-\end{xmllines}
-
+</file>
+\end{xmllines}
 \end{enumerate}
 
+%% =================================================================================================
 \subsection{XML fundamentals}
 
+%% =================================================================================================
 \subsubsection{ XML basic rules}
 
@@ -327,5 +327,6 @@
 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:
@@ -334,5 +335,4 @@
 
 \begin{table}
-  \scriptsize
   \begin{tabular*}{\textwidth}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|}
     \hline
@@ -366,5 +366,4 @@
 
 \begin{table}
-  \scriptsize
   \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|}
     \hline
@@ -376,11 +375,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
@@ -391,5 +390,4 @@
 
 \begin{table}
-  \scriptsize
   \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|}
     \hline
@@ -407,9 +405,8 @@
 \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):
 
 \begin{table}
-  \scriptsize
   \begin{tabular}{|p{0.15\textwidth}p{0.4\textwidth}p{0.35\textwidth}|}
     \hline
@@ -436,4 +433,5 @@
 \end{table}
 
+%% =================================================================================================
 \subsubsection{Nesting XML files}
 
@@ -441,13 +439,16 @@
 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 and domain definition is done in 2 separate files:
-\path{NEMOGCM/CONFIG/SHARED/field_def.xml} and \path{NEMOGCM/CONFIG/SHARED/domain_def.xml} that
+
+\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
+\path{cfgs/SHARED/field_def_nemo-ice.xml} ) and the  domain definition is done in another file ( \path{cfgs/SHARED/domain_def_nemo.xml} )
+that
 are included in the main iodef.xml file through the following commands:
 \begin{xmllines}
-<field_definition src="./field_def.xml" />
-<domain_definition src="./domain_def.xml" />
-\end{xmllines}
-
+<context id="nemo" src="./context_nemo.xml"/>
+\end{xmllines}
+
+%% =================================================================================================
 \subsubsection{Use of inheritance}
 
@@ -462,7 +463,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}
 
@@ -481,13 +482,14 @@
 </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}
 
 Inherit (and overwrite, if needed) the attributes of a tag you are refering to.
 
+%% =================================================================================================
 \subsubsection{Use of groups}
 
@@ -508,5 +510,8 @@
 
 Secondly, the group can be used to replace a list of elements.
-Several examples of groups of fields are proposed at the end of the file \path{CONFIG/SHARED/field_def.xml}.
+Several examples of groups of fields are proposed at the end of the XML field files (
+\path{cfgs/SHARED/field_def_nemo-oce.xml},
+\path{cfgs/SHARED/field_def_nemo-pisces.xml} and
+\path{cfgs/SHARED/field_def_nemo-ice.xml} ) .
 For example, a short list of the usual variables related to the U grid:
 
@@ -514,5 +519,5 @@
 <field_group id="groupU" >
 	<field field_ref="uoce"  />
-	<field field_ref="suoce" />
+	<field field_ref="ssu" />
 	<field field_ref="utau"  />
 </field_group>
@@ -525,7 +530,8 @@
 	<field_group group_ref="groupU" />
 	<field field_ref="uocetr_eff"   />  <!-- add another field -->
-</file>   
-\end{xmllines}
-
+</file>
+\end{xmllines}
+
+%% =================================================================================================
 \subsection{Detailed functionalities}
 
@@ -533,15 +539,16 @@
 the new functionalities offered by the XML interface of XIOS.
 
+%% =================================================================================================
 \subsubsection{Define horizontal subdomains}
 
 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{CONFIG/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).
 
 \begin{xmllines}
-<domain_group id="grid_T">
-	<domain id="myzoom" zoom_ibegin="10" zoom_jbegin="10" zoom_ni="5" zoom_nj="5" />
+<domain id="myzoomT" domain_ref="grid_T">
+	<zoom_domain ibegin="10" jbegin="10" ni="5" nj="5" />
 \end{xmllines}
 
@@ -551,9 +558,9 @@
 \begin{xmllines}
 <file id="myfile_vzoom" output_freq="1d" >
-	<field field_ref="toce" domain_ref="myzoom"/>
+	<field field_ref="toce" domain_ref="myzoomT"/>
 </file>
 \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.
@@ -568,20 +575,23 @@
 \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.
 
+%% =================================================================================================
 \subsubsection{Define vertical zooms}
 
-Vertical zooms are defined through the attributs zoom\_begin and zoom\_end of the tag family axis.
+Vertical zooms are defined through the attributs zoom\_begin and zoom\_n of the tag family axis.
 It must therefore be done in the axis part of the XML file.
-For example, in \path{NEMOGCM/CONFIG/ORCA2_LIM/iodef_demo.xml}, we provide the following example:
-
-\begin{xmllines}
-<axis_group id="deptht" long_name="Vertical T levels" unit="m" positive="down" >
-	<axis id="deptht" />
-	<axis id="deptht_myzoom" zoom_begin="1" zoom_end="10" />
+For example, in \path{cfgs/ORCA2_ICE_PISCES/EXPREF/iodef_demo.xml}, we provide the following example:
+
+\begin{xmllines}
+<axis_definition>
+	<axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
+	<axis id="deptht_zoom" azix_ref="deptht" >
+		<zoom_axis zoom_begin="1" zoom_n="10" />
+	</axis>
 \end{xmllines}
 
@@ -595,4 +605,5 @@
 \end{xmllines}
 
+%% =================================================================================================
 \subsubsection{Control of the output file names}
 
@@ -601,5 +612,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"  -->
 		...
@@ -620,5 +631,4 @@
 
 \begin{table}
-  \scriptsize
   \begin{tabularx}{\textwidth}{|lX|}
     \hline
@@ -656,5 +666,5 @@
 \end{table}
 
-\noindent For example, 
+\noindent For example,
 \xmlline|<file id="myfile_hzoom" name="myfile_@expname@_@startdate@_freq@freq@" output_freq="1d" >|
 
@@ -668,7 +678,8 @@
 \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.
@@ -681,53 +692,53 @@
 
 \begin{table}
-  \scriptsize
-  \begin{tabularx}{\textwidth}{|X|c|c|c|}
+  \begin{tabular}{|l|c|c|}
     \hline
     tag ids affected by automatic definition of some of their attributes &
     name attribute                                                       &
-    attribute value                      \\
+    attribute value                                                      \\
     \hline
     \hline
     field\_definition                                                    &
     freq\_op                                                             &
-    \np{rn\_rdt}                         \\
+    \np{rn_rdt}{rn\_rdt}                                                         \\
     \hline
     SBC                                                                  &
     freq\_op                                                             &
-    \np{rn\_rdt} $\times$ \np{nn\_fsbc}  \\
+    \np{rn_rdt}{rn\_rdt} $\times$ \np{nn_fsbc}{nn\_fsbc}                                  \\
     \hline
     ptrc\_T                                                              &
     freq\_op                                                             &
-    \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\
+    \np{rn_rdt}{rn\_rdt} $\times$ \np{nn_dttrc}{nn\_dttrc}                                 \\
     \hline
     diad\_T                                                              &
     freq\_op                                                             &
-    \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\
+    \np{rn_rdt}{rn\_rdt} $\times$ \np{nn_dttrc}{nn\_dttrc}                                 \\
     \hline
     EqT, EqU, EqW                                                        &
     jbegin, ni,                                                          &
-    according to the grid                \\
-    &
+    according to the grid                                                \\
+                                                                         &
     name\_suffix                                                         &
-    \\
+                                                                         \\
     \hline
     TAO, RAMA and PIRATA moorings                                        &
     zoom\_ibegin, zoom\_jbegin,                                          &
-    according to the grid                \\
-    &
+    according to the grid                                                \\
+                                                                         &
     name\_suffix                                                         &
-    \\
-    \hline
-  \end{tabularx}
+                                                                         \\
+    \hline
+  \end{tabular}
 \end{table}
 
+%% =================================================================================================
 \subsubsection{Advanced use of XIOS functionalities}
 
+%% =================================================================================================
 \subsection{XML reference tables}
-\label{subsec:IOM_xmlref}
+\label{subsec:DIA_IOM_xmlref}
 
 \begin{enumerate}
-\item
-  Simple computation: directly define the computation when refering to the variable in the file definition.
+\item Simple computation: directly define the computation when refering to the variable in the file definition.
 
 \begin{xmllines}
@@ -737,6 +748,5 @@
 \end{xmllines}
 
-\item
-  Simple computation: define a new variable and use it in the file definition.
+\item Simple computation: define a new variable and use it in the file definition.
 
 in field\_definition:
@@ -755,6 +765,5 @@
 sst2 won't be evaluated.
 
-\item
-  Change of variable precision:
+\item Change of variable precision:
 
 \begin{xmllines}
@@ -765,13 +774,12 @@
 \end{xmllines}
 
-Note that, then the code is crashing, writting real4 variables forces a numerical convection 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.
 
-\item
-  add user defined attributes:
-
-\begin{xmllines}
-<file_group id="1d" output_freq="1d" output_level="10" enabled=".true."> <!-- 1d files --> 
+\item add user defined attributes:
+
+\begin{xmllines}
+<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" >
@@ -782,9 +790,8 @@
 		<variable id="my_global_attribute" type="string" > blabla_global </variable>
 	</file>
-</file_group> 
-\end{xmllines}
-
-\item
-  use of the ``@'' function: example 1, weighted temporal average
+</file_group>
+\end{xmllines}
+
+\item use of the ``@'' function: example 1, weighted temporal average
 
  - define a new variable in field\_definition
@@ -797,9 +804,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}
 
@@ -814,6 +821,5 @@
 Note that in this case, freq\_op must be equal to the file output\_freq.
 
-\item
-  use of the ``@'' function: example 2, monthly SSH standard deviation
+\item use of the ``@'' function: example 2, monthly SSH standard deviation
 
  - define a new variable in field\_definition
@@ -826,12 +832,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}
 
@@ -840,11 +846,10 @@
 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.
 Note that in this case, freq\_op must be equal to the file output\_freq.
 
-\item
-  use of the ``@'' function: example 3, monthly average of SST diurnal cycle
+\item use of the ``@'' function: example 3, monthly average of SST diurnal cycle
 
  - define 2 new variables in field\_definition
@@ -858,5 +863,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" >
@@ -864,5 +869,5 @@
 		</field>
 	</file>
-</file_group> 
+</file_group>
 \end{xmllines}
 
@@ -877,8 +882,8 @@
 field\_ref="sst" means that attributes not explicitely defined, are inherited from sst field.
 
+%% =================================================================================================
 \subsubsection{Tag list per family}
 
 \begin{table}
-  \scriptsize
   \begin{tabularx}{\textwidth}{|l|X|X|l|X|}
     \hline
@@ -903,9 +908,8 @@
     \hline
   \end{tabularx}
-  \caption{Context tags}
+  \caption{XIOS: context tags}
 \end{table}
 
 \begin{table}
-  \scriptsize
   \begin{tabularx}{\textwidth}{|l|X|X|X|l|}
     \hline
@@ -938,9 +942,8 @@
     \hline
   \end{tabularx}
-  \caption{Field tags ("\tt{field\_*}")}
+  \caption{XIOS: field tags ("\texttt{field\_*}")}
 \end{table}
 
 \begin{table}
-  \scriptsize
   \begin{tabularx}{\textwidth}{|l|X|X|X|l|}
     \hline
@@ -974,9 +977,8 @@
     \hline
   \end{tabularx}
-  \caption{File tags ("\tt{file\_*}")}
+  \caption{XIOS: file tags ("\texttt{file\_*}")}
 \end{table}
 
 \begin{table}
-  \scriptsize
   \begin{tabularx}{\textwidth}{|l|X|X|X|X|}
     \hline
@@ -1007,9 +1009,8 @@
     \hline
   \end{tabularx}
-  \caption{Axis tags ("\tt{axis\_*}")}
+  \caption{XIOS: axis tags ("\texttt{axis\_*}")}
 \end{table}
 
 \begin{table}
-  \scriptsize
   \begin{tabularx}{\textwidth}{|l|X|X|X|X|}
     \hline
@@ -1040,9 +1041,8 @@
     \hline
   \end{tabularx}
-  \caption{Domain tags ("\tt{domain\_*)}"}
+  \caption{XIOS: domain tags ("\texttt{domain\_*)}"}
 \end{table}
 
 \begin{table}
-  \scriptsize
   \begin{tabularx}{\textwidth}{|l|X|X|X|X|}
     \hline
@@ -1073,11 +1073,11 @@
     \hline
   \end{tabularx}
-  \caption{Grid tags ("\tt{grid\_*}")}
+  \caption{XIOS: grid tags ("\texttt{grid\_*}")}
 \end{table}
 
+%% =================================================================================================
 \subsubsection{Attributes list per family}
 
 \begin{table}
-  \scriptsize
   \begin{tabularx}{\textwidth}{|l|X|l|l|}
     \hline
@@ -1114,9 +1114,8 @@
     \hline
   \end{tabularx}
-  \caption{Reference attributes ("\tt{*\_ref}")}
+  \caption{XIOS: reference attributes ("\texttt{*\_ref}")}
 \end{table}
 
 \begin{table}
-  \scriptsize
   \begin{tabularx}{\textwidth}{|l|X|l|l|}
     \hline
@@ -1150,9 +1149,8 @@
     \hline
   \end{tabularx}
-  \caption{Domain attributes ("\tt{zoom\_*}")}
+  \caption{XIOS: domain attributes ("\texttt{zoom\_*}")}
 \end{table}
 
 \begin{table}
-  \scriptsize
   \begin{tabularx}{\textwidth}{|l|X|l|l|}
     \hline
@@ -1205,9 +1203,8 @@
     \hline
   \end{tabularx}
-  \caption{File attributes}
+  \caption{XIOS: file attributes}
 \end{table}
 
 \begin{table}
-  \scriptsize
   \begin{tabularx}{\textwidth}{|l|X|l|l|}
     \hline
@@ -1254,9 +1251,8 @@
     \hline
   \end{tabularx}
-  \caption{Field attributes}
+  \caption{XIOS: field attributes}
 \end{table}
 
 \begin{table}
-  \scriptsize
   \begin{tabularx}{\textwidth}{|l|X|X|X|}
     \hline
@@ -1313,24 +1309,22 @@
     \hline
   \end{tabularx}
-  \caption{Miscellaneous attributes}
+  \caption{XIOS: miscellaneous attributes}
 \end{table}
 
+%% =================================================================================================
 \subsection{CF metadata standard compliance}
 
-Output from the XIOS-1.0 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.
+section \autoref{subsec:DIA_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}{ln\_cfmeta} in the \nam{run}{run} namelist.
 This must be set to true if these metadata are to be included in the output files.
 
-
-% ================================================================
-%       NetCDF4 support
-% ================================================================
-\section{NetCDF4 support (\protect\key{netcdf4})}
+%% =================================================================================================
+\section[NetCDF4 support (\texttt{\textbf{key\_netcdf4}})]{NetCDF4 support (\protect\key{netcdf4})}
 \label{sec:DIA_nc4}
 
@@ -1340,5 +1334,5 @@
 Chunking and compression can lead to significant reductions in file sizes for a small runtime overhead.
 For a fuller discussion on chunking and other performance issues the reader is referred to
-the NetCDF4 documentation found \href{http://www.unidata.ucar.edu/software/netcdf/docs/netcdf.html#Chunking}{here}.
+the NetCDF4 documentation found \href{https://www.unidata.ucar.edu/software/netcdf/docs/netcdf_perf_chunking.html}{here}.
 
 The new features are only available when the code has been linked with a NetCDF4 library
@@ -1346,14 +1340,15 @@
 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:
-
-%------------------------------------------namnc4----------------------------------------------------
-
-\nlst{namnc4}
-%-------------------------------------------------------------------------------------------------------------
+\NEMO\ executables linked with NetCDF4 libraries can be made to produce NetCDF3 files by
+setting the \np{ln_nc4zip}{ln\_nc4zip} logical to false in the \nam{nc4}{nc4} namelist:
+
+\begin{listing}
+  \nlst{namnc4}
+  \caption{\forcode{&namnc4}}
+  \label{lst:namnc4}
+\end{listing}
 
 If \key{netcdf4} has not been defined, these namelist parameters are not read.
-In this case, \np{ln\_nc4zip} is set false and dummy routines for a few NetCDF4-specific functions are defined.
+In this case, \np{ln_nc4zip}{ln\_nc4zip} is set false and dummy routines for a few NetCDF4-specific functions are defined.
 These functions will not be used but need to be included so that compilation is possible with NetCDF3 libraries.
 
@@ -1389,15 +1384,13 @@
 \end{forlines}
 
-\noindent for a standard ORCA2\_LIM configuration gives chunksizes of {\small\tt 46x38x1} respectively in
-the mono-processor case (\ie global domain of {\small\tt 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
+\noindent for a standard ORCA2\_LIM configuration gives chunksizes of {\small\texttt 46x38x1} respectively in
+the mono-processor case (\ie\ global domain of {\small\texttt 182x149x31}).
+An illustration of the potential space savings that NetCDF4 chunking and compression provides is given in
+table \autoref{tab:DIA_NC4} which compares the results of two short runs of the ORCA2\_LIM reference configuration with
 a 4x2 mpi partitioning.
 Note the variation in the compression ratio achieved which reflects chiefly the dry to wet volume ratio of
 each processing region.
 
-%------------------------------------------TABLE----------------------------------------------------
 \begin{table}
-  \scriptsize
   \centering
   \begin{tabular}{lrrr}
@@ -1431,93 +1424,83 @@
     ORCA2\_2d\_grid\_W\_0007.nc & 4416		& 1368	  & 70\%      \\
   \end{tabular}
-  \caption{
-    \protect\label{tab:NC4}
-    Filesize comparison between NetCDF3 and NetCDF4 with chunking and compression
-  }
+  \caption{Filesize comparison between NetCDF3 and NetCDF4 with chunking and compression}
+  \label{tab:DIA_NC4}
 \end{table}
-%----------------------------------------------------------------------------------------------------
 
 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}{nc4} in
+\textit{xmlio\_server.def}.
+Typically this namelist serves the mean files whilst the \nam{nc4}{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  (\protect\ngn{namtrd})}
+
+%% =================================================================================================
+\section[Tracer/Dynamics trends (\forcode{&namtrd})]{Tracer/Dynamics trends (\protect\nam{trd}{trd})}
 \label{sec:DIA_trd}
 
-%------------------------------------------namtrd----------------------------------------------------
-
-\nlst{namtrd} 
-%-------------------------------------------------------------------------------------------------------------
+\begin{listing}
+  \nlst{namtrd}
+  \caption{\forcode{&namtrd}}
+  \label{lst:namtrd}
+\end{listing}
 
 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.
-Note that the output are done with xIOS, and therefore the \key{IOM} is required.
-
-What is done depends on the \ngn{namtrd} logical set to \forcode{.true.}:
+(\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}{trd} namelist.
+Note that the output are done with XIOS, and therefore the \key{iomput} is required.
+
+What is done depends on the \nam{trd}{trd} logical set to \forcode{.true.}:
 
 \begin{description}
-\item[\np{ln\_glo\_trd}]:
-  at each \np{nn\_trd} time-step a check of the basin averaged properties of
+\item [{\np{ln_glo_trd}{ln\_glo\_trd}}]: at each \np{nn_trd}{nn\_trd} time-step a check of the basin averaged properties of
   the momentum and tracer equations is performed.
   This also includes a check of $T^2$, $S^2$, $\tfrac{1}{2} (u^2+v2)$,
   and potential energy time evolution equations properties;
-\item[\np{ln\_dyn\_trd}]:
-  each 3D trend of the evolution of the two momentum components is output;
-\item[\np{ln\_dyn\_mxl}]:
-  each 3D trend of the evolution of the two momentum components averaged over the mixed layer is output;
-\item[\np{ln\_vor\_trd}]:
-  a vertical summation of the moment tendencies is performed,
+\item [{\np{ln_dyn_trd}{ln\_dyn\_trd}}]: each 3D trend of the evolution of the two momentum components is output;
+\item [{\np{ln_dyn_mxl}{ln\_dyn\_mxl}}]: each 3D trend of the evolution of the two momentum components averaged over the mixed layer is output;
+\item [{\np{ln_vor_trd}{ln\_vor\_trd}}]: a vertical summation of the moment tendencies is performed,
   then the curl is computed to obtain the barotropic vorticity tendencies which are output;
-\item[\np{ln\_KE\_trd}] :
-  each 3D trend of the Kinetic Energy equation is output;
-\item[\np{ln\_tra\_trd}]:
-  each 3D trend of the evolution of temperature and salinity is output;
-\item[\np{ln\_tra\_mxl}]:
-  each 2D trend of the evolution of temperature and salinity averaged over the mixed layer is output;
+\item [{\np{ln_KE_trd}{ln\_KE\_trd}}]  : each 3D trend of the Kinetic Energy equation is output;
+\item [{\np{ln_tra_trd}{ln\_tra\_trd}}]: each 3D trend of the evolution of temperature and salinity is output;
+\item [{\np{ln_tra_mxl}{ln\_tra\_mxl}}]: each 2D trend of the evolution of temperature and salinity averaged over the mixed layer is output;
 \end{description}
 
-Note that the mixed layer tendency diagnostic can also be used on biogeochemical models via 
-the \key{trdtrc} and \key{trdmld\_trc} CPP keys.
+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 \key{vvl} defined).
-
-% -------------------------------------------------------------------------------------------------------------
-%       On-line Floats trajectories
-% -------------------------------------------------------------------------------------------------------------
-\section{FLO: On-Line Floats trajectories (\protect\key{floats})}
-\label{sec:FLO}
-%--------------------------------------------namflo-------------------------------------------------------
-
-\nlst{namflo} 
-%--------------------------------------------------------------------------------------------------------------
+In particular, options associated with \np{ln_dyn_mxl}{ln\_dyn\_mxl}, \np{ln_vor_trd}{ln\_vor\_trd}, and \np{ln_tra_mxl}{ln\_tra\_mxl} are not working,
+and none of the options have been tested with variable volume (\ie\ \np[=.true.]{ln_linssh}{ln\_linssh}).
+
+%% =================================================================================================
+\section[FLO: On-Line Floats trajectories (\texttt{\textbf{key\_floats}})]{FLO: On-Line Floats trajectories (\protect\key{floats})}
+\label{sec:DIA_FLO}
+
+\begin{listing}
+  \nlst{namflo}
+  \caption{\forcode{&namflo}}
+  \label{lst:namflo}
+\end{listing}
 
 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} namelis 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.}).
-Note that the \cite{Blanke_Raynaud_JPO97} algorithm have the advantage of providing trajectories which
+Options are defined by \nam{flo}{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[=.true.]{ln_flork4}{ln\_flork4}).
+Note that the \cite{blanke.raynaud_JPO97} algorithm have the advantage of providing trajectories which
 are consistent with the numeric of the code, so that the trajectories never intercept the bathymetry.
 
+%% =================================================================================================
 \subsubsection{Input data: initial coordinates}
 
 Initial coordinates can be given with Ariane Tools convention
-(IJK coordinates, (\np{ln\_ariane}\forcode{ = .true.}) ) or with longitude and latitude.
-
-In case of Ariane convention, input filename is \np{init\_float\_ariane}.
+(IJK coordinates, (\np[=.true.]{ln_ariane}{ln\_ariane}) ) or with longitude and latitude.
+
+In case of Ariane convention, input filename is \textit{init\_float\_ariane}.
 Its format is: \\
-{\scriptsize \texttt{I J K nisobfl itrash itrash}}
+{ \texttt{I J K nisobfl itrash}}
 
 \noindent with:
@@ -1525,5 +1508,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
@@ -1531,5 +1514,5 @@
 \noindent Example: \\
 \noindent
-{\scriptsize
+{
   \texttt{
     100.00000  90.00000  -1.50000 1.00000   0.00000   \\
@@ -1542,5 +1525,5 @@
 In the other case (longitude and latitude), input filename is init\_float.
 Its format is: \\
-{\scriptsize \texttt{Long Lat depth nisobfl ngrpfl itrash}}
+{ \texttt{Long Lat depth nisobfl ngrpfl itrash}}
 
 \noindent with:
@@ -1556,5 +1539,5 @@
 \noindent Example: \\
 \noindent
-{\scriptsize
+{
   \texttt{
     20.0 0.0 0.0 0 1 1    \\
@@ -1565,20 +1548,19 @@
 } \\
 
-\np{jpnfl} is the total number of floats during the run.
-When initial positions are read in a restart file (\np{ln\_rstflo}\forcode{ = .true.} ),
-\np{jpnflnewflo} can be added in the initialization file.
-
+\np{jpnfl}{jpnfl} is the total number of floats during the run.
+When initial positions are read in a restart file (\np[=.true.]{ln_rstflo}{ln\_rstflo} ),
+\np{jpnflnewflo}{jpnflnewflo} can be added in the initialization file.
+
+%% =================================================================================================
 \subsubsection{Output data}
 
-\np{nn\_writefl} is the frequency of writing in float output file and \np{nn\_stockfl} is the frequency of
+\np{nn_writefl}{nn\_writefl} is the frequency of writing in float output file and \np{nn_stockfl}{nn\_stockfl} is the frequency of
 creation of the float restart file.
 
-Output data can be written in ascii files (\np{ln\_flo\_ascii}\forcode{ = .true.}).
+Output data can be written in ascii files (\np[=.true.]{ln_flo_ascii}{ln\_flo\_ascii}).
 In that case, output filename is trajec\_float.
 
-Another possiblity of writing format is Netcdf (\np{ln\_flo\_ascii}\forcode{ = .false.}).
-There are 2 possibilities:
-
-- if (\key{iomput}) is used, outputs are selected in  iodef.xml.
+Another possiblity of writing format is Netcdf (\np[=.false.]{ln_flo_ascii}{ln\_flo\_ascii}) with
+\key{iomput} and outputs selected in iodef.xml.
 Here it is an example of specification to put in files description section:
 
@@ -1597,36 +1579,30 @@
 \end{xmllines}
 
- -  if (\key{iomput}) is not used, a file called \ifile{trajec\_float} will be created by IOIPSL library.
-
- See also \href{http://stockage.univ-brest.fr/~grima/Ariane/}{here} the web site describing the off-line use of
- this marvellous diagnostic tool.
-
-% -------------------------------------------------------------------------------------------------------------
-%       Harmonic analysis of tidal constituents
-% -------------------------------------------------------------------------------------------------------------
-\section{Harmonic analysis of tidal constituents (\protect\key{diaharm}) }
+%% =================================================================================================
+\section[Harmonic analysis of tidal constituents (\texttt{\textbf{key\_diaharm}})]{Harmonic analysis of tidal constituents (\protect\key{diaharm})}
 \label{sec:DIA_diag_harm}
 
-%------------------------------------------namdia_harm----------------------------------------------------
-%
-\nlst{nam_diaharm}
-%----------------------------------------------------------------------------------------------------------
+\begin{listing}
+  \nlst{nam_diaharm}
+  \caption{\forcode{&nam_diaharm}}
+  \label{lst:nam_diaharm}
+\end{listing}
 
 A module is available to compute the amplitude and phase of tidal waves.
 This on-line Harmonic analysis is actived with \key{diaharm}.
 
-Some parameters are available in namelist \ngn{namdia\_harm}:
-
- - \np{nit000\_han} is the first time step used for harmonic analysis
-
- - \np{nitend\_han} is the  last time step used for harmonic analysis
-
- - \np{nstep\_han}  is the  time step frequency for harmonic analysis
-
- - \np{nb\_ana}     is the number of harmonics to analyse
-
- - \np{tname}       is an array with names of tidal constituents to analyse
-
- \np{nit000\_han} and \np{nitend\_han} must be between \np{nit000} and \np{nitend} of the simulation.
+Some parameters are available in namelist \nam{_diaharm}{\_diaharm}:
+
+ - \np{nit000_han}{nit000\_han} is the first time step used for harmonic analysis
+
+ - \np{nitend_han}{nitend\_han} is the  last time step used for harmonic analysis
+
+ - \np{nstep_han}{nstep\_han}  is the  time step frequency for harmonic analysis
+
+% - \np{nb_ana}{nb\_ana}     is the number of harmonics to analyse
+
+ - \np{tname}{tname}       is an array with names of tidal constituents to analyse
+
+ \np{nit000_han}{nit000\_han} and \np{nitend_han}{nitend\_han} must be between \np{nit000}{nit000} and \np{nitend}{nitend} of the simulation.
  The restart capability is not implemented.
 
@@ -1649,14 +1625,13 @@
 We obtain in output $C_{j}$ and $S_{j}$ for each tidal wave.
 
-% -------------------------------------------------------------------------------------------------------------
-%       Sections transports
-% -------------------------------------------------------------------------------------------------------------
-\section{Transports across sections (\protect\key{diadct}) }
+%% =================================================================================================
+\section[Transports across sections (\texttt{\textbf{key\_diadct}})]{Transports across sections (\protect\key{diadct})}
 \label{sec:DIA_diag_dct}
 
-%------------------------------------------namdct----------------------------------------------------
-
-\nlst{namdct}
-%-------------------------------------------------------------------------------------------------------------
+\begin{listing}
+  \nlst{nam_diadct}
+  \caption{\forcode{&nam_diadct}}
+  \label{lst:nam_diadct}
+\end{listing}
 
 A module is available to compute the transport of volume, heat and salt through sections.
@@ -1664,7 +1639,7 @@
 
 Each section is defined by the coordinates of its 2 extremities.
-The pathways between them are contructed using tools which can be found in \texttt{NEMOGCM/TOOLS/SECTIONS\_DIADCT}
-and are written in a binary file \texttt{section\_ijglobal.diadct\_ORCA2\_LIM} which is later read in by
-NEMO to compute on-line transports.
+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.
 
 The on-line transports module creates three output ascii files:
@@ -1676,13 +1651,14 @@
 - \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{_diadct}{\_diadct} 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
-\np{nn\_dctwri}: frequency of writing ( mean of instantaneous transports )
-\np{nn\_debug} : debugging of the section
-
+\np{nn_dct}{nn\_dct}   : frequency of instantaneous transports computing
+\np{nn_dctwri}{nn\_dctwri}: frequency of writing ( mean of instantaneous transports )
+\np{nn_debug}{nn\_debug} : debugging of the section
+
+%% =================================================================================================
 \subsubsection{Creating a binary file containing the pathway of each section}
 
-In \texttt{NEMOGCM/TOOLS/SECTIONS\_DIADCT/run},
+In \texttt{tools/SECTIONS\_DIADCT/run},
 the file \textit{ {list\_sections.ascii\_global}} contains a list of all the sections that are to be computed
 (this list of sections is based on MERSEA project metrics).
@@ -1691,5 +1667,5 @@
 
 Each section is defined by: \\
-\noindent {\scriptsize \texttt{long1 lat1 long2 lat2 nclass (ok/no)strpond (no)ice section\_name}} \\
+\noindent { \texttt{long1 lat1 long2 lat2 nclass (ok/no)strpond (no)ice section\_name}} \\
 with:
 
@@ -1698,5 +1674,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;
@@ -1708,5 +1684,5 @@
 
 \noindent If nclass $\neq$ 0, the next lines contain the class type and the nclass bounds: \\
-{\scriptsize
+{
   \texttt{
     long1 lat1 long2 lat2 nclass (ok/no)strpond (no)ice section\_name \\
@@ -1731,7 +1707,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\_ORCA2\_LIM} 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
@@ -1741,5 +1717,5 @@
  and the ATL\_Cuba\_Florida with 4 temperature clases (5 class bounds), are shown: \\
  \noindent
- {\scriptsize
+ {
    \texttt{
      -68.    -54.5   -60.    -64.7  00 okstrpond noice ACC\_Drake\_Passage \\
@@ -1753,8 +1729,9 @@
  }
 
+%% =================================================================================================
 \subsubsection{To read the output files}
 
 The output format is: \\
-{\scriptsize
+{
   \texttt{
     date, time-step number, section number,                \\
@@ -1778,5 +1755,4 @@
 
 \begin{table}
-  \scriptsize
   \begin{tabular}{|l|l|l|l|l|}
     \hline
@@ -1792,10 +1768,7 @@
 \end{table}
 
-% ================================================================
-% Steric effect in sea surface height
-% ================================================================
+%% =================================================================================================
 \section{Diagnosing the steric effect in sea surface height}
 \label{sec:DIA_steric}
-
 
 Changes in steric sea level are caused when changes in the density of the water column imply an expansion or
@@ -1809,20 +1782,20 @@
 The steric effect is therefore not explicitely represented.
 This approximation does not represent a serious error with respect to the flow field calculated by the model
-\citep{Greatbatch_JGR94}, but extra attention is required when investigating sea level,
+\citep{greatbatch_JGR94}, but extra attention is required when investigating sea level,
 as steric changes are an important contribution to local changes in sea level on seasonal and climatic time scales.
 This is especially true for investigation into sea level rise due to global warming.
 
 Fortunately, the steric contribution to the sea level consists of a spatially uniform component that
-can be diagnosed by considering the mass budget of the world ocean \citep{Greatbatch_JGR94}.
+can be diagnosed by considering the mass budget of the world ocean \citep{greatbatch_JGR94}.
 In order to better understand how global mean sea level evolves and thus how the steric sea level can be diagnosed,
 we compare, in the following, the non-Boussinesq and Boussinesq cases.
 
 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$).
 
@@ -1834,5 +1807,5 @@
     \mathcal{V} &=  \mathcal{A}  \;\bar{\eta}
   \end{split}
-  \label{eq:MV_nBq}
+  \label{eq:DIA_MV_nBq}
 \end{equation}
 
@@ -1842,18 +1815,18 @@
   \frac{1}{e_3} \partial_t ( e_3\,\rho) + \nabla( \rho \, \textbf{U} )
   = \left. \frac{\textit{emp}}{e_3}\right|_\textit{surface}
-  \label{eq:Co_nBq}
+  \label{eq:DIA_Co_nBq}
 \end{equation}
 
 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}
   \partial_t \mathcal{M} = \mathcal{A} \;\overline{\textit{emp}}
-  \label{eq:Mass_nBq}
+  \label{eq:DIA_Mass_nBq}
 \end{equation}
 
 where $\overline{\textit{emp}} = \int_S \textit{emp}\,ds$ is the net mass flux through the ocean surface.
-Bringing \autoref{eq:Mass_nBq} and the time derivative of \autoref{eq:MV_nBq} together leads to
+Bringing \autoref{eq:DIA_Mass_nBq} and the time derivative of \autoref{eq:DIA_MV_nBq} together leads to
 the evolution equation of the mean sea level
 
@@ -1861,17 +1834,17 @@
   \partial_t \bar{\eta} = \frac{\overline{\textit{emp}}}{ \bar{\rho}}
   - \frac{\mathcal{V}}{\mathcal{A}} \;\frac{\partial_t \bar{\rho} }{\bar{\rho}}
-  \label{eq:ssh_nBq}
+  \label{eq:DIA_ssh_nBq}
 \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:DIA_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).
-In particular, the mass conservation equation, \autoref{eq:Co_nBq}, degenerates into the incompressibility equation:
+the gravity (\ie\ in the hydrostatic balance of the primitive Equations).
+In particular, the mass conservation equation, \autoref{eq:DIA_Co_nBq}, degenerates into the incompressibility equation:
 
 \[
   \frac{1}{e_3} \partial_t ( e_3 ) + \nabla( \textbf{U} ) = \left. \frac{\textit{emp}}{\rho_o \,e_3}\right|_ \textit{surface}
-  % \label{eq:Co_Bq}
+  % \label{eq:DIA_Co_Bq}
 \]
 
@@ -1880,5 +1853,5 @@
 \[
   \partial_t \mathcal{V} = \mathcal{A} \;\frac{\overline{\textit{emp}}}{\rho_o}
-  % \label{eq:V_Bq}
+  % \label{eq:DIA_V_Bq}
 \]
 
@@ -1888,9 +1861,9 @@
 the ocean surface, not by changes in mean mass of the ocean: the steric effect is missing in a Boussinesq fluid.
 
-Nevertheless, following \citep{Greatbatch_JGR94}, the steric effect on the volume can be diagnosed by
-considering the mass budget of the ocean. 
+Nevertheless, following \citep{greatbatch_JGR94}, the steric effect on the volume can be diagnosed by
+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
-\citep{Greatbatch_JGR94}.
+\citep{greatbatch_JGR94}.
 In others words, the Boussinesq mass, $\mathcal{M}_o$, can be related to $\mathcal{M}$,
 the total mass of the ocean seen by the Boussinesq model, via the steric contribution to the sea level,
@@ -1899,5 +1872,5 @@
 \begin{equation}
   \mathcal{M}_o = \mathcal{M} + \rho_o \,\eta_s \,\mathcal{A}
-  \label{eq:M_Bq}
+  \label{eq:DIA_M_Bq}
 \end{equation}
 
@@ -1905,15 +1878,15 @@
 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})
-in \autoref{eq:M_Bq} leads to a very simple form for the steric height:
+where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO\ (cf. \autoref{subsec:TRA_eos})
+in \autoref{eq:DIA_M_Bq} leads to a very simple form for the steric height:
 
 \begin{equation}
   \eta_s = - \frac{1}{\mathcal{A}} \mathcal{D}
-  \label{eq:steric_Bq}
+  \label{eq:DIA_steric_Bq}
 \end{equation}
 
 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.
@@ -1924,16 +1897,16 @@
 This value is a sensible choice for the reference density used in a Boussinesq ocean climate model since,
 with the exception of only a small percentage of the ocean, density in the World Ocean varies by no more than
-2$\%$ from this value (\cite{Gill1982}, page 47).
+2$\%$ from this value (\cite{gill_bk82}, page 47).
 
 Second, we have assumed here that the total ocean surface, $\mathcal{A}$,
 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 \key{vvl} defined, it is given by
+
+Third, the discretisation of \autoref{eq:DIA_steric_Bq} depends on the type of free surface which is considered.
+In the non linear free surface case, \ie\ \np[=.true.]{ln_linssh}{ln\_linssh}, it is given by
 
 \[
   \eta_s = - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t} e_{2t} e_{3t} }{ \sum_{i,\,j,\,k}       e_{1t} e_{2t} e_{3t} }
-  % \label{eq:discrete_steric_Bq_nfs}
+  % \label{eq:DIA_discrete_steric_Bq_nfs}
 \]
 
@@ -1945,5 +1918,5 @@
   \eta_s = - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t}e_{2t}e_{3t} + \sum_{i,\,j} d_a\; e_{1t}e_{2t} \eta }
                   { \sum_{i,\,j,\,k}       e_{1t}e_{2t}e_{3t} + \sum_{i,\,j}       e_{1t}e_{2t} \eta }
-  % \label{eq:discrete_steric_Bq_fs}
+  % \label{eq:DIA_discrete_steric_Bq_fs}
 \]
 
@@ -1954,6 +1927,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_al_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.
@@ -1965,16 +1938,13 @@
 \[
   \eta_s = - \frac{1}{\mathcal{A}} \int_D d_a(T,S_o,p_o) \,dv
-  % \label{eq:thermosteric_Bq}
+  % \label{eq:DIA_thermosteric_Bq}
 \]
 
 where $S_o$ and $p_o$ are the initial salinity and pressure, respectively.
 
-Both steric and thermosteric sea level are computed in \mdl{diaar5} which needs the \key{diaar5} defined to
-be called.
-
-% -------------------------------------------------------------------------------------------------------------
-%       Other Diagnostics
-% -------------------------------------------------------------------------------------------------------------
-\section{Other diagnostics (\protect\key{diahth}, \protect\key{diaar5})}
+Both steric and thermosteric sea level are computed in \mdl{diaar5}.
+
+%% =================================================================================================
+\section{Other diagnostics}
 \label{sec:DIA_diag_others}
 
@@ -1982,9 +1952,10 @@
 The available ready-to-add diagnostics modules can be found in directory DIA.
 
-\subsection{Depth of various quantities (\protect\mdl{diahth})}
+%% =================================================================================================
+\subsection[Depth of various quantities (\textit{diahth.F90})]{Depth of various quantities (\protect\mdl{diahth})}
 
 Among the available diagnostics the following ones are obtained when defining the \key{diahth} CPP key:
 
-- the mixed layer depth (based on a density criterion \citep{de_Boyer_Montegut_al_JGR04}) (\mdl{diahth})
+- the mixed layer depth (based on a density criterion \citep{de-boyer-montegut.madec.ea_JGR04}) (\mdl{diahth})
 
 - the turbocline depth (based on a turbulent mixing coefficient criterion) (\mdl{diahth})
@@ -1994,58 +1965,54 @@
 - the depth of the thermocline (maximum of the vertical temperature gradient) (\mdl{diahth})
 
-% -----------------------------------------------------------
-%     Poleward heat and salt transports
-% -----------------------------------------------------------
-
-\subsection{Poleward heat and salt transports (\protect\mdl{diaptr})}
-
-%------------------------------------------namptr-----------------------------------------
-
-\nlst{namptr} 
-%-----------------------------------------------------------------------------------------
-
-The poleward heat and salt transports, their advective and diffusive component,
-and the meriodional stream function can be computed on-line in \mdl{diaptr} \np{ln\_diaptr} to true
-(see the \textit{\ngn{namptr} } namelist below).
-When \np{ln\_subbas}\forcode{ = .true.}, transports and stream function are computed for the Atlantic, Indian,
+\begin{figure}[!t]
+  \centering
+  \includegraphics[width=0.66\textwidth]{DIA_mask_subasins}
+  \caption[Decomposition of the World Ocean to compute transports as well as
+  the meridional stream-function]{
+    Decomposition of the World Ocean (here ORCA2) into sub-basin used in to
+    compute the heat and salt transports as well as the meridional stream-function:
+    Atlantic basin (red), Pacific basin (green),
+    Indian basin (blue), Indo-Pacific basin (blue+green).
+    Note that semi-enclosed seas (Red, Med and Baltic seas) as well as
+    Hudson Bay are removed from the sub-basins.
+    Note also that the Arctic Ocean has been split into Atlantic and
+    Pacific basins along the North fold line.
+  }
+  \label{fig:DIA_mask_subasins}
+\end{figure}
+
+%% =================================================================================================
+\subsection[CMIP specific diagnostics (\textit{diaar5.F90}, \textit{diaptr.F90})]{CMIP specific diagnostics (\protect\mdl{diaar5})}
+
+A series of diagnostics has been added in the \mdl{diaar5} and \mdl{diaptr}.
+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[=.true.]{ln_diaptr}{ln\_diaptr}
+(see the \nam{ptr}{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[=.true.]{ln_subbas}{ln\_subbas}, 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.
 The sub-basin decomposition requires an input file (\ifile{subbasins}) which contains three 2D mask arrays,
-the Indo-Pacific mask been deduced from the sum of the Indian and Pacific mask (\autoref{fig:mask_subasins}).
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=1.0\textwidth]{Fig_mask_subasins}
-    \caption{
-      \protect\label{fig:mask_subasins}
-		Decomposition of the World Ocean (here ORCA2) into sub-basin used in to
-      compute the heat and salt transports as well as the meridional stream-function:
-      Atlantic basin (red), Pacific basin (green), Indian basin (bleue), Indo-Pacific basin (bleue+green).
-		Note that semi-enclosed seas (Red, Med and Baltic seas) as well as Hudson Bay are removed from the sub-basins.
-      Note also that the Arctic Ocean has been split into Atlantic and Pacific basins along the North fold line.
-    }
-  \end{center}
-\end{figure}  
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-% -----------------------------------------------------------
-%       CMIP specific diagnostics 
-% -----------------------------------------------------------
-\subsection{CMIP specific diagnostics (\protect\mdl{diaar5})}
-
-A series of diagnostics has been added in the \mdl{diaar5}.
-They corresponds to outputs that are required for AR5 simulations (CMIP5)
-(see also \autoref{sec:DIA_steric} for one of them).
-Activating those outputs requires to define the \key{diaar5} CPP key.
-
-% -----------------------------------------------------------
-%       25 hour mean and hourly Surface, Mid and Bed 
-% -----------------------------------------------------------
+the Indo-Pacific mask been deduced from the sum of the Indian and Pacific mask (\autoref{fig:DIA_mask_subasins}).
+
+\begin{listing}
+  \nlst{namptr}
+  \caption{\forcode{&namptr}}
+  \label{lst:namptr}
+\end{listing}
+
+%% =================================================================================================
 \subsection{25 hour mean output for tidal models}
 
-%------------------------------------------nam_dia25h-------------------------------------
-
-\nlst{nam_dia25h}
-%-----------------------------------------------------------------------------------------
+\begin{listing}
+  \nlst{nam_dia25h}
+  \caption{\forcode{&nam_dia25h}}
+  \label{lst:nam_dia25h}
+\end{listing}
 
 A module is available to compute a crudely detided M2 signal by obtaining a 25 hour mean.
@@ -2054,13 +2021,12 @@
 This diagnostic is actived with the logical $ln\_dia25h$.
 
-% -----------------------------------------------------------
-%     Top Middle and Bed hourly output
-% -----------------------------------------------------------
+%% =================================================================================================
 \subsection{Top middle and bed hourly output}
 
-%------------------------------------------nam_diatmb-----------------------------------------------------
-
-\nlst{nam_diatmb}
-%----------------------------------------------------------------------------------------------------------
+\begin{listing}
+  \nlst{nam_diatmb}
+  \caption{\forcode{&nam_diatmb}}
+  \label{lst:nam_diatmb}
+\end{listing}
 
 A module is available to output the surface (top), mid water and bed diagnostics of a set of standard variables.
@@ -2070,7 +2036,5 @@
 This diagnostic is actived with the logical $ln\_diatmb$.
 
-% -----------------------------------------------------------
-%     Courant numbers
-% -----------------------------------------------------------
+%% =================================================================================================
 \subsection{Courant numbers}
 
@@ -2080,5 +2044,5 @@
 \[
   C_u = |u|\frac{\rdt}{e_{1u}}, \quad C_v = |v|\frac{\rdt}{e_{2v}}, \quad C_w = |w|\frac{\rdt}{e_{3w}}
-  % \label{eq:CFL}
+  % \label{eq:DIA_CFL}
 \]
 
@@ -2089,5 +2053,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}{nn\_diacfl} namelist parameter to 1 in the \nam{ctl}{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
@@ -2095,11 +2059,7 @@
 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. 
-
-% ================================================================
-
-\biblio
-
-\pindex
+The maximum values from the run are also copied to the ocean.output file.
+
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_DIU.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_DIU.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_DIU.tex	(revision 11831)
@@ -2,48 +2,58 @@
 
 \begin{document}
-% ================================================================
-% Diurnal SST models (DIU)
-% Edited by James While
-% ================================================================
+
 \chapter{Diurnal SST Models (DIU)}
 \label{chap:DIU}
 
-\minitoc
+\thispagestyle{plain}
 
+\chaptertoc
 
-\newpage
-$\ $\newline % force a new line
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
 
 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}
-\item
-  A foundation SST which is free from diurnal warming.
-\item
-  A warm layer, typically ~3\,m thick,
+\item A foundation SST which is free from diurnal warming.
+\item A warm layer, typically ~3\,m thick,
   where heating from solar radiation can cause a warm stably stratified layer during the daytime
-\item
-  A cool skin, a thin layer, approximately ~1\, mm thick,
+\item A cool skin, a thin layer, approximately ~1\, mm thick,
   where long wave cooling is dominant and cools the immediate ocean surface.
 \end{itemize}
 
 Models are provided for both the warm layer, \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_{\rm{cs}}$ and $\Delta T_{\rm{wl}}$) and
+($\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}{diu}:
 
-\nlst{namdiu}
+\begin{listing}
+  \nlst{namdiu}
+  \caption{\forcode{&namdiu}}
+  \label{lst:namdiu}
+\end{listing}
+
 This namelist contains only two variables:
 \begin{description}
-\item[\np{ln\_diurnal}]
-  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.
-  \np{ln\_diurnal\_only} must be \forcode{.false.} if \np{ln\_diurnal} is \forcode{.false.}.
+\item [{\np{ln_diurnal}{ln\_diurnal}}] A logical switch for turning on/off both the cool skin and warm layer.
+\item [{\np{ln_diurnal_only}{ln\_diurnal\_only}}] A logical switch which if \forcode{.true.} will run the diurnal model without the other dynamical parts of \NEMO.
+  \np{ln_diurnal_only}{ln\_diurnal\_only} must be \forcode{.false.} if \np{ln_diurnal}{ln\_diurnal} is \forcode{.false.}.
 \end{description}
 
@@ -53,25 +63,24 @@
 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.
 
-%===============================================================
+%% =================================================================================================
 \section{Warm layer model}
-\label{sec:warm_layer_sec}
-%===============================================================
+\label{sec:DIU_warm_layer_sec}
 
-The warm layer is calculated using the model of \citet{Takaya_al_JGR10} (TAKAYA10 model hereafter).
+The warm layer is calculated using the model of \citet{takaya.bidlot.ea_JGR10} (TAKAYA10 model hereafter).
 This is a simple flux based model that is defined by the equations
 \begin{align}
-\frac{\partial{\Delta T_{\rm{wl}}}}{\partial{t}}&=&\frac{Q(\nu+1)}{D_T\rho_w c_p
+\frac{\partial{\Delta T_{\mathrm{wl}}}}{\partial{t}}&=&\frac{Q(\nu+1)}{D_T\rho_w c_p
 \nu}-\frac{(\nu+1)ku^*_{w}f(L_a)\Delta T}{D_T\Phi\!\left(\frac{D_T}{L}\right)} \mbox{,}
-\label{eq:ecmwf1} \\
-L&=&\frac{\rho_w c_p u^{*^3}_{w}}{\kappa g \alpha_w Q }\mbox{,}\label{eq:ecmwf2}
+\label{eq:DIU_ecmwf1} \\
+L&=&\frac{\rho_w c_p u^{*^3}_{w}}{\kappa g \alpha_w Q }\mbox{,}\label{eq:DIU_ecmwf2}
 \end{align}
-where $\Delta T_{\rm{wl}}$ is the temperature difference between the top of the warm layer and the depth $D_T=3$\,m at which there is assumed to be no diurnal signal.
-In equation (\autoref{eq:ecmwf1}) $\alpha_w=2\times10^{-4}$ is the thermal expansion coefficient of water,
+where $\Delta T_{\mathrm{wl}}$ is the temperature difference between the top of the warm layer and the depth $D_T=3$\,m at which there is assumed to be no diurnal signal.
+In equation (\autoref{eq:DIU_ecmwf1}) $\alpha_w=2\times10^{-4}$ is the thermal expansion coefficient of water,
 $\kappa=0.4$ is von K\'{a}rm\'{a}n's constant, $c_p$ is the heat capacity at constant pressure of sea water,
 $\rho_w$ is the water density, and $L$ is the Monin-Obukhov length.
 The tunable variable $\nu$ is a shape parameter that defines the expected subskin temperature profile via
-$T(z) = T(0) - \left( \frac{z}{D_T} \right)^\nu \Delta T_{\rm{wl}}$,
+$T(z) = T(0) - \left( \frac{z}{D_T} \right)^\nu \Delta T_{\mathrm{wl}}$,
 where $T$ is the absolute temperature and $z\le D_T$ is the depth below the top of the warm layer.
 The influence of wind on TAKAYA10 comes through the magnitude of the friction velocity of the water $u^*_{w}$,
@@ -79,14 +88,14 @@
 the relationship $u^*_{w} = u_{10}\sqrt{\frac{C_d\rho_a}{\rho_w}}$, where $C_d$ is the drag coefficient,
 and $\rho_a$ is the density of air.
-The symbol $Q$ in equation (\autoref{eq:ecmwf1}) is the instantaneous total thermal energy flux into
+The symbol $Q$ in equation (\autoref{eq:DIU_ecmwf1}) is the instantaneous total thermal energy flux into
 the diurnal layer, \ie
 \[
-  Q = Q_{\rm{sol}} + Q_{\rm{lw}} + Q_{\rm{h}}\mbox{,}
-  % \label{eq:e_flux_eqn}
+  Q = Q_{\mathrm{sol}} + Q_{\mathrm{lw}} + Q_{\mathrm{h}}\mbox{,}
+  % \label{eq:DIU_e_flux_eqn}
 \]
-where $Q_{\rm{h}}$ is the sensible and latent heat flux, $Q_{\rm{lw}}$ is the long wave flux,
-and $Q_{\rm{sol}}$ is the solar flux absorbed within the diurnal warm layer.
-For $Q_{\rm{sol}}$ the 9 term representation of \citet{Gentemann_al_JGR09} is used.
-In equation \autoref{eq:ecmwf1} the function $f(L_a)=\max(1,L_a^{\frac{2}{3}})$,
+where $Q_{\mathrm{h}}$ is the sensible and latent heat flux, $Q_{\mathrm{lw}}$ is the long wave flux,
+and $Q_{\mathrm{sol}}$ is the solar flux absorbed within the diurnal warm layer.
+For $Q_{\mathrm{sol}}$ the 9 term representation of \citet{gentemann.minnett.ea_JGR09} is used.
+In equation \autoref{eq:DIU_ecmwf1} the function $f(L_a)=\max(1,L_a^{\frac{2}{3}})$,
 where $L_a=0.3$\footnote{
   This is a global average value, more accurately $L_a$ could be computed as $L_a=(u^*_{w}/u_s)^{\frac{1}{2}}$,
@@ -99,11 +108,11 @@
 4\zeta^2}{1+3\zeta+0.25\zeta^2} &(\zeta \ge 0) \\
                                     (1 - 16\zeta)^{-\frac{1}{2}} & (\zeta < 0) \mbox{,}
-                                    \end{array} \right. \label{eq:stab_func_eqn}
+                                    \end{array} \right. \label{eq:DIU_stab_func_eqn}
 \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
-equation (\autoref{eq:ecmwf2})).
+where $\zeta=\frac{D_T}{L}$.  It is clear that the first derivative of (\autoref{eq:DIU_stab_func_eqn}),
+and thus of (\autoref{eq:DIU_ecmwf1}), is discontinuous at $\zeta=0$ (\ie\ $Q\rightarrow0$ in
+equation (\autoref{eq:DIU_ecmwf2})).
 
-The two terms on the right hand side of (\autoref{eq:ecmwf1}) represent different processes.
+The two terms on the right hand side of (\autoref{eq:DIU_ecmwf1}) represent different processes.
 The first term is simply the diabatic heating or cooling of the diurnal warm layer due to
 thermal energy fluxes into and out of the layer.
@@ -111,33 +120,30 @@
 In practice the second term acts as a relaxation on the temperature.
 
-%===============================================================
+%% =================================================================================================
+\section{Cool skin model}
+\label{sec:DIU_cool_skin_sec}
 
-\section{Cool skin model}
-\label{sec:cool_skin_sec}
-
-%===============================================================
-
-The cool skin is modelled using the framework of \citet{Saunders_JAS82} who used a formulation of the near surface temperature difference based upon the heat flux and the friction velocity $u^*_{w}$.
-As the cool skin is so thin (~1\,mm) we ignore the solar flux component to the heat flux and the Saunders equation for the cool skin temperature difference $\Delta T_{\rm{cs}}$ becomes
+The cool skin is modelled using the framework of \citet{saunders_JAS67} who used a formulation of the near surface temperature difference based upon the heat flux and the friction velocity $u^*_{w}$.
+As the cool skin is so thin (~1\,mm) we ignore the solar flux component to the heat flux and the Saunders equation for the cool skin temperature difference $\Delta T_{\mathrm{cs}}$ becomes
 \[
-  % \label{eq:sunders_eqn}
-  \Delta T_{\rm{cs}}=\frac{Q_{\rm{ns}}\delta}{k_t} \mbox{,}
+  % \label{eq:DIU_sunders_eqn}
+  \Delta T_{\mathrm{cs}}=\frac{Q_{\mathrm{ns}}\delta}{k_t} \mbox{,}
 \]
-where $Q_{\rm{ns}}$ is the, usually negative, non-solar heat flux into the ocean and
+where $Q_{\mathrm{ns}}$ is the, usually negative, non-solar heat flux into the ocean and
 $k_t$ is the thermal conductivity of sea water.
 $\delta$ is the thickness of the skin layer and is given by
 \begin{equation}
-\label{eq:sunders_thick_eqn}
+\label{eq:DIU_sunders_thick_eqn}
 \delta=\frac{\lambda \mu}{u^*_{w}} \mbox{,}
 \end{equation}
 where $\mu$ is the kinematic viscosity of sea water and $\lambda$ is a constant of proportionality which
-\citet{Saunders_JAS82} suggested varied between 5 and 10.
+\citet{saunders_JAS67} suggested varied between 5 and 10.
 
-The value of $\lambda$ used in equation (\autoref{eq:sunders_thick_eqn}) is that of \citet{Artale_al_JGR02},
-which is shown in \citet{Tu_Tsuang_GRL05} to outperform a number of other parametrisations at
+The value of $\lambda$ used in equation (\autoref{eq:DIU_sunders_thick_eqn}) is that of \citet{artale.iudicone.ea_JGR02},
+which is shown in \citet{tu.tsuang_GRL05} to outperform a number of other parametrisations at
 both low and high wind speeds.
 Specifically,
 \[
-  % \label{eq:artale_lambda_eqn}
+  % \label{eq:DIU_artale_lambda_eqn}
   \lambda = \frac{ 8.64\times10^4 u^*_{w} k_t }{ \rho c_p h \mu \gamma }\mbox{,}
 \]
@@ -145,5 +151,5 @@
 $\gamma$ is a dimensionless function of wind speed $u$:
 \[
-  % \label{eq:artale_gamma_eqn}
+  % \label{eq:DIU_artale_gamma_eqn}
   \gamma =
   \begin{cases}
@@ -154,7 +160,5 @@
 \]
 
-\biblio
-
-\pindex
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_DOM.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_DOM.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_DOM.tex	(revision 11831)
@@ -2,127 +2,174 @@
 
 \begin{document}
-% ================================================================
-% Chapter 2 ——— Space and Time Domain (DOM)
-% ================================================================
+
 \chapter{Space Domain (DOM)}
 \label{chap:DOM}
 
-\minitoc
-
-% 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 
-%                  should be put outside of DOM routine (better with TRC staff and off-line
-%                  tracers)
-% 	-geo2ocean:  how to switch from geographic to mesh coordinate
-%     - domclo:  closed sea and lakes.... management of closea sea area : specific to global configuration, both forced and coupled
-
-\newpage
-
-Having defined the continuous equations in \autoref{chap:PE} and chosen a time discretization \autoref{chap:STP},
-we need to choose a discretization on a grid, and numerical algorithms.
+% 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
+%              should be put outside of DOM routine (better with TRC staff and off-line
+%              tracers)
+% - geo2ocean: how to switch from geographic to mesh coordinate
+% -    domclo: closed sea and lakes....
+%              management of closea sea area: specific to global cfg, both forced and coupled
+
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{0.8\textwidth}{l||X|X}
+    Release                                                                                 &
+    Author(s)                                                                               &
+    Modifications                                                                           \\
+    \hline
+    {\em 4.0                                                                              } &
+    {\em Simon M\"{u}ller \& Andrew Coward \newline \newline
+      Simona Flavoni and Tim Graham                                                       } &
+    {\em Compatibility changes: many options moved to external domain configuration tools
+      (see \autoref{apdx:DOMCFG}). \newline
+      Updates                                                                             } \\
+    {\em 3.6                                                                              } &
+    {\em Rachid Benshila, Christian \'{E}th\'{e}, Pierre Mathiot and Gurvan Madec         } &
+    {\em Updates                                                                          } \\
+    {\em $\leq$ 3.4                                                                       } &
+    {\em Gurvan Madec and S\'{e}bastien Masson                                            } &
+    {\em First version                                                                    }
+  \end{tabularx}
+}
+
+\clearpage
+
+Having defined the continuous equations in \autoref{chap:MB} and
+chosen a time discretisation \autoref{chap:TD},
+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 information relevant to the main directory routines as well as the DOM (DOMain) directory.
-
-% ================================================================
-% Fundamentals of the Discretisation
-% ================================================================
+and other relevant information about the DOM (DOMain) source code modules.
+
+%% =================================================================================================
 \section{Fundamentals of the discretisation}
 \label{sec:DOM_basics}
 
-% -------------------------------------------------------------------------------------------------------------
-%        Arrangement of Variables 
-% -------------------------------------------------------------------------------------------------------------
+%% =================================================================================================
 \subsection{Arrangement of variables}
 \label{subsec:DOM_cell}
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!tb]
-  \begin{center}
-    \includegraphics[]{Fig_cell}
-    \caption{
-      \protect\label{fig:cell}
-      Arrangement of variables.
-      $t$ indicates scalar points where temperature, salinity, density, pressure and
-      horizontal divergence are defined.
-      $(u,v,w)$ indicates vector points, and $f$ indicates vorticity points where both relative and
-      planetary vorticities are defined.
-    }
-  \end{center}
+\begin{figure}
+  \centering
+  \includegraphics[width=0.33\textwidth]{DOM_cell}
+  \caption[Arrangement of variables in the unit cell of space domain]{
+    Arrangement of variables in the unit cell of space domain.
+    $t$ indicates scalar points where
+    temperature, salinity, density, pressure and horizontal divergence are defined.
+    $(u,v,w)$ indicates vector points, and $f$ indicates vorticity points where
+    both relative and planetary vorticities are defined.}
+  \label{fig:DOM_cell}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-The numerical techniques used to solve the Primitive Equations in this model are based on the traditional,
-centred second-order finite difference approximation.
-Special attention has been given to the homogeneity of the solution in the three space directions.
+
+The numerical techniques used to solve the Primitive Equations in this model are based on
+the traditional, centred second-order finite difference approximation.
+Special attention has been given to the homogeneity of the solution in the three spatial directions.
 The arrangement of variables is the same in all directions.
-It consists of cells centred on scalar points ($t$, $S$, $p$, $\rho$) with vector points $(u, v, w)$ defined in
-the centre of each face of the cells (\autoref{fig:cell}).
-This is the generalisation to three dimensions of the well-known ``C'' grid in Arakawa's classification
-\citep{Mesinger_Arakawa_Bk76}.
-The relative and planetary vorticity, $\zeta$ and $f$, are defined in the centre of each vertical edge and
-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
-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}.
-In all the following, subscripts $u$, $v$, $w$, $f$, $uw$, $vw$ or $fw$ indicate the position of
-the grid-point where the scale factors are defined.
-Each scale factor is defined as the local analytical value provided by \autoref{eq:scale_factors}.
+It consists of cells centred on scalar points ($t$, $S$, $p$, $\rho$) with
+vector points $(u, v, w)$ defined in the centre of each face of the cells (\autoref{fig:DOM_cell}).
+This is the generalisation to three dimensions of the well-known ``C'' grid in
+Arakawa's classification \citep{mesinger.arakawa_bk76}.
+The relative and planetary vorticity, $\zeta$ and $f$, are defined in the centre of each
+vertical edge and 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 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:DOM_cell}.
+In all the following,
+subscripts $u$, $v$, $w$, $f$, $uw$, $vw$ or $fw$ indicate the position of the grid-point where
+the scale factors are defined.
+Each scale factor is defined as the local analytical value provided by \autoref{eq:MB_scale_factors}.
 As a result, the mesh on which partial derivatives $\pd[]{\lambda}$, $\pd[]{\varphi}$ and
-$\pd[]{z}$ are evaluated in a uniform mesh with a grid size of unity.
-Discrete partial derivatives are formulated by the traditional, centred second order finite difference approximation
-while the scale factors are chosen equal to their local analytical value.
+$\pd[]{z}$ are evaluated is a uniform mesh with a grid size of unity.
+Discrete partial derivatives are formulated by
+the traditional, centred second order finite difference approximation while
+the scale factors are chosen equal to their local analytical value.
 An important point here is that the partial derivative of the scale factors must be evaluated by
 centred finite difference approximation, not from their analytical expression.
-This preserves the symmetry of the discrete set of equations and therefore satisfies many of
-the continuous properties (see \autoref{apdx:C}).
+This preserves the symmetry of the discrete set of equations and
+therefore satisfies many of the continuous properties (see \autoref{apdx:INVARIANTS}).
 A similar, related remark can be made about the domain size:
-when needed, an area, volume, or the total ocean depth must be evaluated as the sum of the relevant scale factors
-(see \autoref{eq:DOM_bar} in the next section).
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{table}[!tb]
-  \begin{center}
-    \begin{tabular}{|p{46pt}|p{56pt}|p{56pt}|p{56pt}|}
-      \hline
-      T	& $i 		 $ & $j      $ & $k      $ \\
-      \hline
-      u	& $i + 1/2$ & $j      $ & $k      $ \\
-      \hline
-      v	& $i	 	 $ & $j + 1/2$ & $k      $ \\
-      \hline
-      w	& $i	 	 $ & $j      $ & $k + 1/2$ \\
-      \hline
-      f	& $i + 1/2$ & $j + 1/2$ & $k      $ \\
-      \hline
-      uw	& $i + 1/2$ & $j      $ & $k + 1/2$ \\
-      \hline
-      vw	& $i	 	 $ & $j + 1/2$ & $k + 1/2$ \\
-      \hline
-      fw	& $i + 1/2$ & $j + 1/2$ & $k + 1/2$ \\
-      \hline
-    \end{tabular}
-    \caption{
-      \protect\label{tab:cell}
-      Location of grid-points as a function of integer or integer and a half value of the column, line or level.
-      This indexing is only used for the writing of the semi -discrete equation.
-      In the code, the indexing uses integer values only and has a reverse direction in the vertical
-      (see \autoref{subsec:DOM_Num_Index})
-    }
-  \end{center}
+when needed, an area, volume, or the total ocean depth must be evaluated as
+the product or sum of the relevant scale factors (see \autoref{eq:DOM_bar} in the next section).
+
+\begin{table}
+  \centering
+  \begin{tabular}{|l|l|l|l|}
+    \hline
+    t   & $i      $ & $j      $ & $k      $ \\
+    \hline
+    u   & $i + 1/2$ & $j      $ & $k      $ \\
+    \hline
+    v   & $i      $ & $j + 1/2$ & $k      $ \\
+    \hline
+    w   & $i      $ & $j      $ & $k + 1/2$ \\
+    \hline
+    f   & $i + 1/2$ & $j + 1/2$ & $k      $ \\
+    \hline
+    uw  & $i + 1/2$ & $j      $ & $k + 1/2$ \\
+    \hline
+    vw  & $i      $ & $j + 1/2$ & $k + 1/2$ \\
+    \hline
+    fw  & $i + 1/2$ & $j + 1/2$ & $k + 1/2$ \\
+    \hline
+  \end{tabular}
+  \caption[Location of grid-points]{
+    Location of grid-points as a function of integer or
+    integer and a half value of the column, line or level.
+    This indexing is only used for the writing of the semi-discrete equations.
+    In the code, the indexing uses integer values only and
+    is positive downwards in the vertical with $k=1$ at the surface.
+    (see \autoref{subsec:DOM_Num_Index})}
+  \label{tab:DOM_cell}
 \end{table}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-% -------------------------------------------------------------------------------------------------------------
-%        Vector Invariant Formulation 
-% -------------------------------------------------------------------------------------------------------------
+
+Note that the definition of the scale factors
+(\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}.
+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
+the distance between the $u$-points on each side of the $t$-point.
+Relying on an analytical transformation has two advantages:
+firstly, there is no ambiguity in the scale factors appearing in the discrete equations,
+since they are first introduced in the continuous equations;
+secondly, analytical transformations encourage good practice by
+the definition of smoothly varying grids
+(rather than allowing the user to set arbitrary jumps in thickness between adjacent layers)
+\citep{treguier.dukowicz.ea_JGR96}.
+An example of the effect of such a choice is shown in \autoref{fig:DOM_zgr_e3}.
+\begin{figure}
+  \centering
+  \includegraphics[width=0.5\textwidth]{DOM_zgr_e3}
+  \caption[Comparison of grid-point position, vertical grid-size and scale factors]{
+    Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical,
+    and (b) analytically derived grid-point position and scale factors.
+    For both grids here, the same $w$-point depth has been chosen but
+    in (a) the $t$-points are set half way between $w$-points while
+    in (b) they are defined from an analytical function:
+    $z(k) = 5 \, (k - 1/2)^3 - 45 \, (k - 1/2)^2 + 140 \, (k - 1/2) - 150$.
+    Note the resulting difference between the value of the grid-size $\Delta_k$ and
+    those of the scale factor $e_k$.}
+  \label{fig:DOM_zgr_e3}
+\end{figure}
+
+%% =================================================================================================
 \subsection{Discrete operators}
 \label{subsec:DOM_operators}
 
-Given the values of a variable $q$ at adjacent points, the differencing and averaging operators at
-the midpoint between them are:
+Given the values of a variable $q$ at adjacent points,
+the differencing and averaging operators at the midpoint between them are:
 \begin{alignat*}{2}
-  % \label{eq:di_mi}
+  % \label{eq:DOM_di_mi}
   \delta_i [q]      &= &       &q (i + 1/2) - q (i - 1/2) \\
   \overline q^{\, i} &= &\big\{ &q (i + 1/2) + q (i - 1/2) \big\} / 2
@@ -130,27 +177,27 @@
 
 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 $t$-point.
+Following \autoref{eq:MB_grad} and \autoref{eq:MB_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:
-\[
+\begin{gather*}
   % \label{eq:DOM_grad}
   \nabla q \equiv   \frac{1}{e_{1u}} \delta_{i + 1/2} [q] \; \, \vect i
                   + \frac{1}{e_{2v}} \delta_{j + 1/2} [q] \; \, \vect j
-                  + \frac{1}{e_{3w}} \delta_{k + 1/2} [q] \; \, \vect k
-\]
-\begin{multline*}
+                  + \frac{1}{e_{3w}} \delta_{k + 1/2} [q] \; \, \vect k \\
   % \label{eq:DOM_lap}
   \Delta q \equiv   \frac{1}{e_{1t} \, e_{2t} \, e_{3t}}
                     \; \lt[   \delta_i \lt( \frac{e_{2u} \, e_{3u}}{e_{1u}} \; \delta_{i + 1/2} [q] \rt)
-                            + \delta_j \lt( \frac{e_{1v} \, e_{3v}}{e_{2v}} \; \delta_{j + 1/2} [q] \rt) \; \rt] \\
+                            + \delta_j \lt( \frac{e_{1v} \, e_{3v}}{e_{2v}} \; \delta_{j + 1/2} [q] \rt) \; \rt]
                   + \frac{1}{e_{3t}}
                               \delta_k \lt[ \frac{1              }{e_{3w}} \; \delta_{k + 1/2} [q] \rt]
-\end{multline*}
-
-Following \autoref{eq:PE_curl} and \autoref{eq:PE_div}, a vector $\vect A = (a_1,a_2,a_3)$ defined at
-vector points $(u,v,w)$ has its three curl components defined at $vw$-, $uw$, and $f$-points, and
+\end{gather*}
+
+Following \autoref{eq:MB_curl} and \autoref{eq:MB_div},
+a vector $\vect A = (a_1,a_2,a_3)$ defined at vector points $(u,v,w)$ has
+its three curl components defined at $vw$-, $uw$, and $f$-points, and
 its divergence defined at $t$-points:
-\begin{multline}
+\begin{multline*}
 % \label{eq:DOM_curl}
   \nabla \times \vect A \equiv   \frac{1}{e_{2v} \, e_{3vw}}
@@ -163,14 +210,14 @@
                                  \Big[   \delta_{i + 1/2} (e_{2v} \, a_2)
                                        - \delta_{j + 1/2} (e_{1u} \, a_1) \Big] \vect k
-\end{multline}
-\begin{equation}
+\end{multline*}
+\[
 % \label{eq:DOM_div}
   \nabla \cdot \vect A \equiv   \frac{1}{e_{1t} \, e_{2t} \, e_{3t}}
                                 \Big[ \delta_i (e_{2u} \, e_{3u} \, a_1) + \delta_j (e_{1v} \, e_{3v} \, a_2) \Big]
                               + \frac{1}{e_{3t}} \delta_k (a_3)
-\end{equation}
-
-The vertical average over the whole water column denoted by an overbar becomes for a quantity $q$ which
-is a masked field (i.e. equal to zero inside solid area):
+\]
+
+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):
 \begin{equation}
   \label{eq:DOM_bar}
@@ -178,6 +225,7 @@
 \end{equation}
 where $H_q$  is the ocean depth, which is the masked sum of the vertical scale factors at $q$ points,
-$k^b$ and $k^o$ are the bottom and surface $k$-indices, and the symbol $k^o$ refers to a summation over
-all grid points of the same type in the direction indicated by the subscript (here $k$).
+$k^b$ and $k^o$ are the bottom and surface $k$-indices,
+and the symbol $\sum \limits_k$ refers to a summation over all grid points of the same type in
+the direction indicated by the subscript (here $k$).
 
 In continuous form, the following properties are satisfied:
@@ -189,13 +237,14 @@
 \end{gather}
 
-It is straightforward to demonstrate that these properties are verified locally in discrete form as soon as
-the scalar $q$ is taken at $t$-points and the vector $\vect A$ has its components defined at
+It is straightforward to demonstrate that these properties are verified locally in discrete form as
+soon as the scalar $q$ is taken at $t$-points and the vector $\vect A$ has its components defined at
 vector points $(u,v,w)$.
 
-Let $a$ and $b$ be two fields defined on the mesh, with value zero inside continental area.
-Using integration by parts it can be shown that the differencing operators ($\delta_i$, $\delta_j$ and $\delta_k$)
-are skew-symmetric linear operators, and further that the averaging operators $\overline{\cdots}^{\, i}$,
-$\overline{\cdots}^{\, j}$ and $\overline{\cdots}^{\, k}$) are symmetric linear operators, \ie
-\begin{alignat}{4}
+Let $a$ and $b$ be two fields defined on the mesh, with a value of zero inside continental areas.
+It can be shown that the differencing operators ($\delta_i$, $\delta_j$ and
+$\delta_k$) are skew-symmetric linear operators,
+and further that the averaging operators ($\overline{\cdots}^{\, i}$, $\overline{\cdots}^{\, j}$ and
+$\overline{\cdots}^{\, k}$) are symmetric linear operators, \ie
+\begin{alignat}{5}
   \label{eq:DOM_di_adj}
   &\sum \limits_i a_i \; \delta_i [b]      &\equiv &- &&\sum \limits_i \delta      _{   i + 1/2} [a] &b_{i + 1/2} \\
@@ -204,840 +253,447 @@
 \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
+These two properties will be used extensively in the \autoref{apdx:INVARIANTS} to
 demonstrate integral conservative properties of the discrete formulation chosen.
 
-% -------------------------------------------------------------------------------------------------------------
-%        Numerical Indexing 
-% -------------------------------------------------------------------------------------------------------------
+%% =================================================================================================
 \subsection{Numerical indexing}
 \label{subsec:DOM_Num_Index}
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!tb]
-  \begin{center}
-    \includegraphics[]{Fig_index_hor}
-    \caption{
-      \protect\label{fig:index_hor}
-      Horizontal integer indexing used in the \fortran code.
-      The dashed area indicates the cell in which variables contained in arrays have the same $i$- and $j$-indices
-    }
-  \end{center}
+\begin{figure}
+  \centering
+  \includegraphics[width=0.33\textwidth]{DOM_index_hor}
+  \caption[Horizontal integer indexing]{
+    Horizontal integer indexing used in the \fortran\ code.
+    The dashed area indicates the cell in which
+    variables contained in arrays have the same $i$- and $j$-indices}
+  \label{fig:DOM_index_hor}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-The array representation used in the \fortran code requires an integer indexing while
-the analytical definition of the mesh (see \autoref{subsec:DOM_cell}) is associated with the use of
-integer values for $t$-points and both integer and integer and a half values for all the other points.
-Therefore a specific integer indexing must be defined for points other than $t$-points
-(\ie velocity and vorticity grid-points).
-Furthermore, the direction of the vertical indexing has been changed so that the surface level is at $k = 1$.
-
-% -----------------------------------
-%        Horizontal Indexing 
-% -----------------------------------
+
+The array representation used in the \fortran\ code requires an integer indexing.
+However, the analytical definition of the mesh (see \autoref{subsec:DOM_cell}) is associated with
+the use of 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).
+Furthermore, the direction of the vertical indexing has been reversed and
+the surface level set at $k = 1$.
+
+%% =================================================================================================
 \subsubsection{Horizontal indexing}
 \label{subsec:DOM_Num_Index_hor}
 
-The indexing in the horizontal plane has been chosen as shown in \autoref{fig:index_hor}.
+The indexing in the horizontal plane has been chosen as shown in \autoref{fig:DOM_index_hor}.
 For an increasing $i$ index ($j$ index),
 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.
-
-% -----------------------------------
-%        Vertical indexing 
-% -----------------------------------
+(see the dashed area in \autoref{fig:DOM_index_hor}).
+A $t$-point and its nearest north-east $f$-point have the same $i$-and $j$-indices.
+
+%% =================================================================================================
 \subsubsection{Vertical indexing}
 \label{subsec:DOM_Num_Index_vertical}
 
-In the vertical, the chosen indexing requires special attention since the $k$-axis is re-orientated downward in
-the \fortran code compared to the indexing used in the semi -discrete equations and
-given in \autoref{subsec:DOM_cell}.
-The sea surface corresponds to the $w$-level $k = 1$ which is the same index as $t$-level just below
-(\autoref{fig:index_vert}).
-The last $w$-level ($k = jpk$) either corresponds to the ocean floor or is inside the bathymetry while
-the last $t$-level is always inside the bathymetry (\autoref{fig:index_vert}).
-Note that for an increasing $k$ index, a $w$-point and the $t$-point just below have the same $k$ index,
-in opposition to what is done in the horizontal plane where
-it is the $t$-point and the nearest velocity points in the direction of the horizontal axis that
-have the same $i$ or $j$ index
-(compare the dashed area in \autoref{fig:index_hor} and \autoref{fig:index_vert}).
+In the vertical, the chosen indexing requires special attention since
+the direction of the $k$-axis in the \fortran\ code is the reverse of
+that used in the semi-discrete equations and given in \autoref{subsec:DOM_cell}.
+The sea surface corresponds to the $w$-level $k = 1$,
+which is the same index as the $t$-level just below (\autoref{fig:DOM_index_vert}).
+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:DOM_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
+(compare the dashed area in \autoref{fig:DOM_index_hor} and \autoref{fig:DOM_index_vert}).
 Since the scale factors are chosen to be strictly positive,
-a \textit{minus sign} appears in the \fortran code \textit{before all the vertical derivatives} of
-the discrete equations given in this documentation.
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!pt]
-  \begin{center}
-    \includegraphics[]{Fig_index_vert}
-    \caption{
-      \protect\label{fig:index_vert}
-      Vertical integer indexing used in the \fortran code.
-      Note that the $k$-axis is orientated downward.
-      The dashed area indicates the cell in which variables contained in arrays have the same $k$-index.
-    }
-  \end{center}
+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.
+
+\begin{figure}
+  \centering
+  \includegraphics[width=0.33\textwidth]{DOM_index_vert}
+  \caption[Vertical integer indexing]{
+    Vertical integer indexing used in the \fortran\ code.
+    Note that the $k$-axis is oriented downward.
+    The dashed area indicates the cell in which
+    variables contained in arrays have a common $k$-index.}
+  \label{fig:DOM_index_vert}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-% -----------------------------------
-%        Domain Size
-% -----------------------------------
-\subsubsection{Domain size}
+
+%% =================================================================================================
+\section{Spatial domain configuration}
+\label{subsec:DOM_config}
+
+Two typical methods are available to specify the spatial domain configuration;
+they can be selected using parameter \np{ln_read_cfg}{ln\_read\_cfg} parameter in
+namelist \nam{cfg}{cfg}.
+
+If \np{ln_read_cfg}{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}{cn\_domcfg} parameter in namelist \nam{cfg}{cfg}.
+
+If \np{ln_read_cfg}{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:DOMCFG}.
+
+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}{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}).
+
+%% =================================================================================================
+\subsection{Domain size}
 \label{subsec:DOM_size}
 
-The total size of the computational domain is set by the parameters \np{jpiglo},
-\np{jpjglo} and \np{jpkglo} in the $i$, $j$ and $k$ directions respectively.
-Parameters $jpi$ and $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}).
-
-% ================================================================
-% Domain: List of fields needed
-% ================================================================
-\section{Needed fields}
-\label{sec:DOM_fields}
-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 values of as indicated in \autoref{tab:cell}.
-The associated scale factors are defined using the analytical first derivative of the transformation
-\autoref{eq:scale_factors}.
-Necessary fields for configuration definition are:
+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}{cn\_cfg},
+and the nominal resolution through parameter \np{nn_cfg}{nn\_cfg}
+(unless in the input file both of variables \texttt{ORCA} and \texttt{ORCA\_index} are present,
+in which case \np{cn_cfg}{cn\_cfg} and \np{nn_cfg}{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}.
+
+%% =================================================================================================
+\subsection[Horizontal grid mesh (\textit{domhgr.F90}]{Horizontal grid mesh (\protect\mdl{domhgr})}
+\label{subsec:DOM_hgr}
+
+%% =================================================================================================
+\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{clines}
+int    jpiglo, jpjglo, jpkglo     /* global domain sizes                                    */
+int    jperio                     /* lateral global domain b.c.                             */
+double glamt, glamu, glamv, glamf /* geographic longitude (t,u,v and f points respectively) */
+double gphit, gphiu, gphiv, gphif /* geographic latitude                                    */
+double e1t, e1u, e1v, e1f         /* horizontal scale factors                               */
+double e2t, e2u, e2v, e2f         /* horizontal scale factors                               */
+\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:DOM_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{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{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}{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.
+
+%% =================================================================================================
+\subsection[Vertical grid (\textit{domzgr.F90})]{Vertical grid (\protect\mdl{domzgr})}
+\label{subsec:DOM_zgr}
+
+\begin{listing}
+  \nlst{namdom}
+  \caption{\forcode{&namdom}}
+  \label{lst:namdom}
+\end{listing}
+
+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 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 $(i,j)$ location of the horizontal grid.
+\end{enumerate}
+
+\begin{figure}
+  \centering
+  \includegraphics[width=0.5\textwidth]{DOM_z_zps_s_sps}
+  \caption[Ocean bottom regarding coordinate systems ($z$, $s$ and hybrid $s-z$)]{
+    The ocean bottom as seen by the model:
+    \begin{enumerate*}[label=(\textit{\alph*})]
+    \item $z$-coordinate with full step,
+    \item $z$-coordinate with partial step,
+    \item $s$-coordinate: terrain following representation,
+    \item hybrid $s-z$ coordinate,
+    \item hybrid $s-z$ coordinate with partial step, and
+    \item same as (e) but in the non-linear free surface
+      (\protect\np[=.false.]{ln_linssh}{ln\_linssh}).
+  \end{enumerate*}
+  Note that the non-linear free surface can be used with any of the 5 coordinates (a) to (e).}
+  \label{fig:DOM_z_zps_s_sps}
+\end{figure}
+
+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}{ln\_linssh} set to \forcode{=.false.} in \nam{dom}{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:DOM_z_zps_s_sps}f).
+When a linear free surface is assumed
+(\np{ln_linssh}{ln\_linssh} set to \forcode{=.true.} in \nam{dom}{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}{ln\_zco}, \np{ln_zps}{ln\_zps}, \np{ln_sco}{ln\_sco} and \np{ln_isfcav}{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}{cn\_domcfg} file.
+
+\medskip
+The decision on these choices must be made when the \np{cn_domcfg}{cn\_domcfg} file is constructed.
+Three main choices are offered (\autoref{fig:DOM_z_zps_s_sps}a-c):
 
 \begin{itemize}
-\item
-  Geographic position:
-  longitude with \texttt{glamt}, \texttt{glamu}, \texttt{glamv}, \texttt{glamf} and
-  latitude  with \texttt{gphit}, \texttt{gphiu}, \texttt{gphiv}, \texttt{gphif}
-  (all respectively at T, U, V and F point)
-\item
-  Coriolis parameter (if domain not on the sphere): \texttt{ff\_f} and \texttt{ff\_t}
-  (at T and F point)
-\item
-  Scale factors:
-  \texttt{e1t}, \texttt{e1u}, \texttt{e1v} and \texttt{e1f} (on i direction),
-  \texttt{e2t}, \texttt{e2u}, \texttt{e2v} and \texttt{e2f} (on j direction) and
-  \texttt{ie1e2u\_v}, \texttt{e1e2u}, \texttt{e1e2v}. \\
-  \texttt{e1e2u}, \texttt{e1e2v} are u and v surfaces (if gridsize reduction in some straits), 
-  \texttt{ie1e2u\_v} is to flag set u and v surfaces are neither read nor computed.
+\item $z$-coordinate with full step bathymetry (\np[=.true.]{ln_zco}{ln\_zco}),
+\item $z$-coordinate with partial step ($zps$) bathymetry (\np[=.true.]{ln_zps}{ln\_zps}),
+\item Generalized, $s$-coordinate (\np[=.true.]{ln_sco}{ln\_sco}).
 \end{itemize}
- 
-These fields can be read in an domain input file which name is setted in \np{cn\_domcfg} parameter specified in
-\ngn{namcfg}.
-
-\nlst{namcfg}
-
-Or they can be defined in an analytical way in \path{MY_SRC} directory of the configuration.
-For Reference Configurations of NEMO input domain files are supplied by NEMO System Team.
-For analytical definition of input fields two routines are supplied: \mdl{usrdef\_hgr} and \mdl{usrdef\_zgr}.
-They are an example of GYRE configuration parameters, and they are available in \path{src/OCE/USR} directory,
-they provide the horizontal and vertical mesh.
-% -------------------------------------------------------------------------------------------------------------
-%        Needed fields 
-% -------------------------------------------------------------------------------------------------------------
-%\subsection{List of needed fields to build DOMAIN}
-%\label{subsec:DOM_fields_list}
-
-
-% ================================================================
-% Domain: Horizontal Grid (mesh) 
-% ================================================================
-\section{Horizontal grid mesh (\protect\mdl{domhgr})}
-\label{sec:DOM_hgr}
-
-% -------------------------------------------------------------------------------------------------------------
-%        Coordinates and scale factors 
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Coordinates and scale factors}
-\label{subsec:DOM_hgr_coord_e}
-
-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 values of as indicated in \autoref{tab:cell}.
-The associated scale factors are defined using the analytical first derivative of the transformation
-\autoref{eq:scale_factors}.
-These definitions are done in two modules, \mdl{domhgr} and \mdl{domzgr},
-which provide the horizontal and vertical meshes, respectively.
-This section deals with the horizontal mesh parameters.
-
-In a horizontal plane, the location of all the model grid points is defined from
-the analytical expressions of the longitude $\lambda$ and latitude $\varphi$ as a function of $(i,j)$.
-The horizontal scale factors are calculated using \autoref{eq:scale_factors}.
-For example, when the longitude and latitude are function of a single value
-($i$ and $j$, respectively) (geographical configuration of the mesh),
-the horizontal mesh definition reduces to define the wanted $\lambda(i)$, $\varphi(j)$,
-and their derivatives $\lambda'(i) \ \varphi'(j)$ in the \mdl{domhgr} module.
-The model computes the grid-point positions and scale factors in the horizontal plane as follows:
+
+Additionally, hybrid combinations of the three main coordinates are available:
+$s-z$ or $s-zps$ coordinate (\autoref{fig:DOM_z_zps_s_sps}d and \autoref{fig:DOM_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}{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[=.true.]{ln_linssh}{ln\_linssh}),
+\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{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                                 */
+double e3t_1d, e3w_1d                    /* reference vertical scale factors at T and W points           */
+double e3t_0, e3u_0, e3v_0, e3f_0, e3w_0 /* vertical scale factors 3D coordinate at T,U,V,F and W points */
+double e3uw_0, e3vw_0                    /* vertical scale factors 3D coordinate at UW and VW points     */
+int    bottom_level, top_level           /* last wet T-points, 1st wet T-points (for ice shelf cavities) */
+                                         /* For reference:                                               */
+float  bathy_metry                       /* bathymetry used in setting top and bottom levels             */
+\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.
+
+%% =================================================================================================
+\subsubsection{Level bathymetry and mask}
+\label{subsec:DOM_msk}
+
+From \jp{top\_level} and \jp{bottom\_level} fields, the mask fields are defined as follows:
 \begin{align*}
-   \lambda_t &\equiv \text{glamt} =      \lambda (i      )
-  &\varphi_t &\equiv \text{gphit} =      \varphi (j      ) \\
-   \lambda_u &\equiv \text{glamu} =      \lambda (i + 1/2)
-  &\varphi_u &\equiv \text{gphiu} =      \varphi (j      ) \\
-   \lambda_v &\equiv \text{glamv} =      \lambda (i      )
-  &\varphi_v &\equiv \text{gphiv} =      \varphi (j + 1/2) \\
-   \lambda_f &\equiv \text{glamf} =      \lambda (i + 1/2)
-  &\varphi_f &\equiv \text{gphif} =      \varphi (j + 1/2) \\
-   e_{1t}    &\equiv \text{e1t}   = r_a |\lambda'(i      ) \; \cos\varphi(j      ) |
-  &e_{2t}    &\equiv \text{e2t}   = r_a |\varphi'(j      )                         | \\
-   e_{1u}    &\equiv \text{e1t}   = r_a |\lambda'(i + 1/2) \; \cos\varphi(j      ) |
-  &e_{2u}    &\equiv \text{e2t}   = r_a |\varphi'(j      )                         | \\
-   e_{1v}    &\equiv \text{e1t}   = r_a |\lambda'(i      ) \; \cos\varphi(j + 1/2) |
-  &e_{2v}    &\equiv \text{e2t}   = r_a |\varphi'(j + 1/2)                         | \\
-   e_{1f}    &\equiv \text{e1t}   = r_a |\lambda'(i + 1/2) \; \cos\varphi(j + 1/2) |
-  &e_{2f}    &\equiv \text{e2t}   = r_a |\varphi'(j + 1/2)                         |
+  tmask(i,j,k) &=
+  \begin{cases}
+    0 &\text{if $                             k <    top\_level(i,j)$} \\
+    1 &\text{if $     bottom\_level(i,j) \leq k \leq top\_level(i,j)$} \\
+    0 &\text{if $k >  bottom\_level(i,j)                            $}
+  \end{cases} \\
+  umask(i,j,k) &= tmask(i,j,k) * tmask(i + 1,j,    k) \\
+  vmask(i,j,k) &= tmask(i,j,k) * tmask(i    ,j + 1,k) \\
+  fmask(i,j,k) &= tmask(i,j,k) * tmask(i + 1,j,    k) * tmask(i,j,k) * tmask(i + 1,j,    k) \\
+  wmask(i,j,k) &= tmask(i,j,k) * tmask(i    ,j,k - 1) \\
+  \text{with~} wmask(i,j,1) &= tmask(i,j,1)
 \end{align*}
-where the last letter of each computational name indicates the grid point considered and
-$r_a$ is the earth radius (defined in \mdl{phycst} along with all universal constants).
-Note that the horizontal position of and scale factors at $w$-points are exactly equal to those of $t$-points,
-thus no specific arrays are defined at $w$-points.
-
-Note that the definition of the scale factors
-(\ie as the analytical first derivative of the transformation that
-gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$)
-is specific to the \NEMO model \citep{Marti_al_JGR92}.
-As an example, $e_{1t}$ is defined locally at a $t$-point,
-whereas many other models on a C grid choose to define such a scale factor as
-the distance between the $U$-points on each side of the $t$-point.
-Relying on an analytical transformation has two advantages:
-firstly, there is no ambiguity in the scale factors appearing in the discrete equations,
-since they are first introduced in the continuous equations;
-secondly, analytical transformations encourage good practice by the definition of smoothly varying grids
-(rather than allowing the user to set arbitrary jumps in thickness between adjacent layers) \citep{Treguier1996}.
-An example of the effect of such a choice is shown in \autoref{fig:zgr_e3}.
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!t]
-  \begin{center}
-    \includegraphics[]{Fig_zgr_e3}
-    \caption{
-      \protect\label{fig:zgr_e3}
-      Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical,
-      and (b) analytically derived grid-point position and scale factors.
-      For both grids here, the same $w$-point depth has been chosen but
-      in (a) the $t$-points are set half way between $w$-points while
-      in (b) they are defined from an analytical function:
-      $z(k) = 5 \, (k - 1/2)^3 - 45 \, (k - 1/2)^2 + 140 \, (k - 1/2) - 150$.
-      Note the resulting difference between the value of the grid-size $\Delta_k$ and
-      those of the scale factor $e_k$.
-    }
-  \end{center}
-\end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-% -------------------------------------------------------------------------------------------------------------
-%        Choice of horizontal grid
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Choice of horizontal grid}
-\label{subsec:DOM_hgr_msh_choice}
-
-% -------------------------------------------------------------------------------------------------------------
-%        Grid files
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Output grid files}
-\label{subsec:DOM_hgr_files}
-
-All the arrays relating to a particular ocean model configuration (grid-point position, scale factors, masks)
-can be saved in files if \np{nn\_msh} $\not = 0$ (namelist variable in \ngn{namdom}).
-This can be particularly useful for plots and off-line diagnostics.
-In some cases, the user may choose to make a local modification of a scale factor in the code.
-This is the case in global configurations when restricting the width of a specific strait
-(usually a one-grid-point strait that happens to be too wide due to insufficient model resolution).
-An example is Gibraltar Strait in the ORCA2 configuration.
-When such modifications are done,
-the output grid written when \np{nn\_msh} $\not = 0$ is no more equal to the input grid.
-
-% ================================================================
-% Domain: Vertical Grid (domzgr)
-% ================================================================
-\section{Vertical grid (\protect\mdl{domzgr})}
-\label{sec:DOM_zgr}
-%-----------------------------------------nam_zgr & namdom-------------------------------------------
-%
-%\nlst{namzgr} 
-
-\nlst{namdom} 
-%-------------------------------------------------------------------------------------------------------------
-
-Variables are defined through the \ngn{namzgr} and \ngn{namdom} namelists.
-In the vertical, the model mesh is determined by four things: 
-(1) the bathymetry given in meters; 
-(2) the number of levels of the model (\jp{jpk}); 
-(3) the analytical transformation $z(i,j,k)$ and the vertical scale factors (derivatives of the transformation); and
-(4) the masking system, \ie the number of wet model levels at each 
-$(i,j)$ column of points.
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!tb]
-  \begin{center}
-    \includegraphics[]{Fig_z_zps_s_sps}
-    \caption{
-      \protect\label{fig:z_zps_s_sps}
-      The ocean bottom as seen by the model:
-      (a) $z$-coordinate with full step,
-      (b) $z$-coordinate with partial step,
-      (c) $s$-coordinate: terrain following representation,
-      (d) hybrid $s-z$ coordinate,
-      (e) hybrid $s-z$ coordinate with partial step, and
-      (f) same as (e) but in the non-linear free surface (\protect\np{ln\_linssh}~\forcode{= .false.}).
-      Note that the non-linear free surface can be used with any of the 5 coordinates (a) to (e).
-    }
-  \end{center}
-\end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-The choice of a vertical coordinate, even if it is made through \ngn{namzgr} namelist parameters, 
-must be done once of all at the beginning of an experiment.
-It is not intended as an option which can be enabled or disabled in the middle of an experiment.
-Three main choices are offered (\autoref{fig:z_zps_s_sps}):
-$z$-coordinate with full step bathymetry (\np{ln\_zco}~\forcode{= .true.}),
-$z$-coordinate with partial step bathymetry (\np{ln\_zps}~\forcode{= .true.}),
-or generalized, $s$-coordinate (\np{ln\_sco}~\forcode{= .true.}).
-Hybridation of the three main coordinates are available:
-$s-z$ or $s-zps$ coordinate (\autoref{fig:z_zps_s_sps} and \autoref{fig:z_zps_s_sps}).
-By default a non-linear free surface is used: the coordinate follow the time-variation of the free surface so that
-the transformation is time dependent: $z(i,j,k,t)$ (\autoref{fig:z_zps_s_sps}).
-When a linear free surface is assumed (\np{ln\_linssh}~\forcode{= .true.}),
-the vertical coordinate 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).
-The last choice in terms of vertical coordinate concerns the presence (or not) in
-the model domain of ocean cavities beneath ice shelves.
-Setting \np{ln\_isfcav} to true allows to manage ocean cavities, otherwise they are filled in.
-This option is currently only available in $z$- or $zps$-coordinate,
-and partial step are also applied at the ocean/ice shelf interface.
-
-Contrary to the horizontal grid, the vertical grid is computed in the code and no provision is made for
-reading it from a file.
-The only input file is the bathymetry (in meters) (\ifile{bathy\_meter})
-\footnote{
-  N.B. in full step $z$-coordinate, a \ifile{bathy\_level} file can replace the \ifile{bathy\_meter} file,
-  so that the computation of the number of wet ocean point in each water column is by-passed}.
-If \np{ln\_isfcav}~\forcode{= .true.}, an extra file input file (\ifile{isf\_draft\_meter}) describing
-the ice shelf draft (in meters) is needed.
-
-After reading the bathymetry, the algorithm for vertical grid definition differs between the different options:
-\begin{description}
-\item[\textit{zco}]
-  set a reference coordinate transformation $z_0(k)$, and set $z(i,j,k,t) = z_0(k)$.
-\item[\textit{zps}]
-  set a reference coordinate transformation $z_0(k)$, and calculate the thickness of the deepest level at
-  each $(i,j)$ point using the bathymetry, to obtain the final three-dimensional depth and scale factor arrays.
-\item[\textit{sco}]
-  smooth the bathymetry to fulfill the hydrostatic consistency criteria and
-  set the three-dimensional transformation.
-\item[\textit{s-z} and \textit{s-zps}]
-  smooth the bathymetry to fulfill the hydrostatic consistency criteria and
-  set the three-dimensional transformation $z(i,j,k)$,
-  and possibly introduce masking of extra land points to better fit the original bathymetry file.
-\end{description}
-%%%
-\gmcomment{   add the description of the smoothing:  envelop topography...}
-%%%
-
-Unless a linear free surface is used (\np{ln\_linssh}~\forcode{= .false.}),
-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 using a fixed reference coordinate system which
-computer names have 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 simply set one for all to their reference counterpart.
-
-% -------------------------------------------------------------------------------------------------------------
-%        Meter Bathymetry
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Meter bathymetry}
-\label{subsec:DOM_bathy}
-
-Three options are possible for defining the bathymetry, according to the namelist variable \np{nn\_bathy}
-(found in \ngn{namdom} namelist): 
-\begin{description}
-\item[\np{nn\_bathy}~\forcode{= 0}]:
-  a flat-bottom domain is defined.
-  The total depth $z_w (jpk)$ is given by the coordinate transformation.
-  The domain can either be a closed basin or a periodic channel depending on the parameter \np{jperio}.
-\item[\np{nn\_bathy}~\forcode{= -1}]:
-  a domain with a bump of topography one third of the domain width at the central latitude.
-  This is meant for the "EEL-R5" configuration, a periodic or open boundary channel with a seamount.
-\item[\np{nn\_bathy}~\forcode{= 1}]:
-  read a bathymetry and ice shelf draft (if needed).
-  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 horizontal ocean mesh.
-  Defining the bathymetry also defines the coastline: where the bathymetry is zero,
-  no model levels are defined (all levels are masked).
-
-  The \ifile{isfdraft\_meter} file (Netcdf format) provides the ice shelf draft (positive, in meters) at
-  each grid point of the model grid.
-  This file is only needed if \np{ln\_isfcav}~\forcode{= .true.}.
-  Defining the ice shelf draft will also define the ice shelf edge and the grounding line position.
-\end{description}
-
-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.
+
+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)
+exactly in the same way as for the bottom boundary.
+
+%% The specification of closed lateral boundaries requires that at least
+%% the first and last rows and columns of the \textit{mbathy} array are set to zero.
+%% In the particular case of an east-west cyclical boundary condition, \textit{mbathy} has its last column equal to
+%% the second one and its first column equal to the last but one (and so too the mask arrays)
+%% (see \autoref{fig:LBC_jperio}).
+
+%        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, \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}),
-but the code has to be adapted to the user's configuration.
-
-% -------------------------------------------------------------------------------------------------------------
-%        z-coordinate  and reference coordinate transformation
-% -------------------------------------------------------------------------------------------------------------
-\subsection[$Z$-coordinate (\protect\np{ln\_zco}~\forcode{= .true.}) and ref. coordinate]
-				{$Z$-coordinate (\protect\np{ln\_zco}~\forcode{= .true.}) and reference coordinate}
-\label{subsec:DOM_zco}
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!tb]
-  \begin{center}
-    \includegraphics[]{Fig_zgr}
-    \caption{
-      \protect\label{fig:zgr}
-      Default vertical mesh for ORCA2: 30 ocean levels (L30).
-      Vertical level functions for (a) T-point depth and (b) the associated scale factor as computed from
-      \autoref{eq:DOM_zgr_ana_1} using \autoref{eq:DOM_zgr_coef} in $z$-coordinate.
-    }
-  \end{center}
-\end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-The reference coordinate transformation $z_0(k)$ defines the arrays $gdept_0$ and $gdepw_0$ for $t$- and $w$-points,
-respectively.
-As indicated on \autoref{fig:index_vert} \jp{jpk} is the number of $w$-levels.
-$gdepw_0(1)$ is the ocean surface.
-There are at most \jp{jpk}-1 $t$-points inside the ocean,
-the additional $t$-point at $jk = jpk$ is below the sea floor and is not used.
-The vertical location of $w$- and $t$-levels is defined from the analytic expression of the depth $z_0(k)$ whose
-analytical derivative with respect to $k$ provides 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{namcfg} namelist.
-
-It is possible to define a simple regular vertical grid by giving zero stretching (\np{ppacr}~\forcode{= 0}).
-In that case, the parameters \jp{jpk} (number of $w$-levels) and
-\np{pphmax} (total ocean depth in meters) fully define the grid.
-
-For climate-related studies it is often desirable to concentrate the vertical resolution near the ocean surface.
-The following function is proposed as a standard for a $z$-coordinate (with either full or partial steps): 
-\begin{gather}
-  \label{eq:DOM_zgr_ana_1}
-    z_0  (k) = h_{sur} - h_0 \; k - \; h_1 \; \log  \big[ \cosh ((k - h_{th}) / h_{cr}) \big] \\
-    e_3^0(k) = \lt|    - h_0      -    h_1 \; \tanh \big[        (k - h_{th}) / h_{cr}  \big] \rt|
-\end{gather}
-where $k = 1$ to \jp{jpk} for $w$-levels and $k = 1$ to $k = 1$ for $T-$levels.
-Such an expression allows us to define a nearly uniform vertical location of levels at the ocean top and bottom with
-a smooth hyperbolic tangent transition in between (\autoref{fig:zgr}).
-
-If the ice shelf cavities are opened (\np{ln\_isfcav}~\forcode{= .true.}), the definition of $z_0$ is the same.
-However, definition of $e_3^0$ at $t$- and $w$-points is respectively changed to:
-\begin{equation}
-  \label{eq:DOM_zgr_ana_2}
-  \begin{split}
-    e_3^T(k) &= z_W (k + 1) - z_W (k    ) \\
-    e_3^W(k) &= z_T (k    ) - z_T (k - 1)
-  \end{split}
-\end{equation}
-This formulation decrease the self-generated circulation into the ice shelf cavity 
-(which can, in extreme case, leads to blow up).\\
- 
-The most used vertical grid for ORCA2 has $10~m$ ($500~m$) resolution in the surface (bottom) layers and
-a depth which varies from 0 at the sea surface to a minimum of $-5000~m$.
-This leads to the following conditions:
-\begin{equation}
-  \label{eq:DOM_zgr_coef}
-  \begin{array}{ll}
-    e_3 (1   + 1/2) =  10. & z(1  ) =     0. \\
-    e_3 (jpk - 1/2) = 500. & z(jpk) = -5000.
-  \end{array}
-\end{equation}
-
-With the choice of the stretching $h_{cr} = 3$ and the number of levels \jp{jpk}~$= 31$,
-the four coefficients $h_{sur}$, $h_0$, $h_1$, and $h_{th}$ in
-\autoref{eq:DOM_zgr_ana_2} have been determined such that
-\autoref{eq:DOM_zgr_coef} is satisfied, through an optimisation procedure using a bisection method.
-For the first standard ORCA2 vertical grid this led to the following values:
-$h_{sur} = 4762.96$, $h_0 = 255.58, h_1 = 245.5813$, and $h_{th} = 21.43336$.
-The resulting depths and scale factors as a function of the model levels are shown in
-\autoref{fig:zgr} and given in \autoref{tab:orca_zgr}.
-Those values correspond to the parameters \np{ppsur}, \np{ppa0}, \np{ppa1}, \np{ppkth} in \ngn{namcfg} 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:
-\begin{itemize}
-\item
-  \np{ppacr}~$= h_{cr}$: stretching factor (nondimensional).
-  The larger \np{ppacr}, the smaller the stretching.
-  Values from $3$ to $10$ are usual.
-\item
-  \np{ppkth}~$= h_{th}$: is approximately the model level at which maximum stretching occurs
-  (nondimensional, usually of order 1/2 or 2/3 of \jp{jpk})
-\item
-  \np{ppdzmin}: minimum thickness for the top layer (in meters).
-\item
-  \np{pphmax}: total depth of the ocean (meters).
-\end{itemize}
-As an example, for the $45$ layers used in the DRAKKAR configuration those parameters are:
-\jp{jpk}~$= 46$, \np{ppacr}~$= 9$, \np{ppkth}~$= 23.563$, \np{ppdzmin}~$= 6~m$, \np{pphmax}~$= 5750~m$.
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{table}
-  \begin{center}
-    \begin{tabular}{c||r|r|r|r}
-      \hline
-      \textbf{LEVEL} & \textbf{gdept\_1d} & \textbf{gdepw\_1d} & \textbf{e3t\_1d } & \textbf{e3w\_1d} \\
-      \hline
-      1              & \textbf{     5.00} &               0.00 & \textbf{   10.00} &            10.00 \\
-      \hline
-      2              & \textbf{    15.00} &	            10.00 & \textbf{   10.00} &            10.00 \\
-      \hline
-      3              & \textbf{    25.00} &              20.00 & \textbf{   10.00} &            10.00 \\
-      \hline
-      4              & \textbf{    35.01} &	            30.00 & \textbf{   10.01} &            10.00 \\
-      \hline
-      5              & \textbf{    45.01} &              40.01 & \textbf{   10.01} &            10.01 \\
-      \hline
-      6              & \textbf{    55.03} &              50.02 & \textbf{   10.02} &            10.02 \\
-      \hline
-      7              & \textbf{    65.06} &              60.04 & \textbf{   10.04} &            10.03 \\
-      \hline
-      8              & \textbf{    75.13} &              70.09 & \textbf{   10.09} &            10.06 \\
-      \hline
-      9              & \textbf{    85.25} &              80.18 & \textbf{   10.17} &            10.12 \\
-      \hline
-      10             & \textbf{    95.49} &              90.35 & \textbf{   10.33} &            10.24 \\
-      \hline
-      11             & \textbf{   105.97} &             100.69 & \textbf{   10.65} &            10.47 \\
-      \hline
-      12             & \textbf{   116.90} &             111.36 & \textbf{   11.27} &            10.91 \\
-      \hline
-      13             & \textbf{   128.70} &             122.65 & \textbf{   12.47} &            11.77 \\
-      \hline
-      14             & \textbf{   142.20} &             135.16 & \textbf{   14.78} &            13.43 \\
-      \hline
-      15             & \textbf{   158.96} &             150.03 & \textbf{   19.23} &            16.65 \\
-      \hline
-      16             & \textbf{   181.96} &             169.42 & \textbf{   27.66} &            22.78 \\
-      \hline
-      17             & \textbf{   216.65} &             197.37 & \textbf{   43.26} &            34.30 \\
-      \hline
-      18             & \textbf{   272.48} &             241.13 & \textbf{   70.88} &            55.21 \\
-      \hline
-      19             & \textbf{   364.30} &             312.74 & \textbf{  116.11} &            90.99 \\
-      \hline
-      20             & \textbf{   511.53} &             429.72 & \textbf{  181.55} &           146.43 \\
-      \hline
-      21             & \textbf{   732.20} &             611.89 & \textbf{  261.03} &           220.35 \\
-      \hline
-      22             & \textbf{  1033.22} &             872.87 & \textbf{  339.39} &           301.42 \\
-      \hline
-      23             & \textbf{  1405.70} &            1211.59 & \textbf{  402.26} &           373.31 \\
-      \hline
-      24             & \textbf{  1830.89} &            1612.98 & \textbf{  444.87} &           426.00 \\
-      \hline
-      25             & \textbf{  2289.77} &            2057.13 & \textbf{  470.55} &           459.47 \\
-      \hline
-      26             & \textbf{  2768.24} &            2527.22 & \textbf{  484.95} &           478.83 \\
-      \hline
-      27             & \textbf{  3257.48} &            3011.90 & \textbf{  492.70} &           489.44 \\
-      \hline
-      28             & \textbf{  3752.44} &            3504.46 & \textbf{  496.78} &           495.07 \\
-      \hline
-      29             & \textbf{  4250.40} &            4001.16 & \textbf{  498.90} &           498.02 \\
-      \hline
-      30             & \textbf{  4749.91} &            4500.02 & \textbf{  500.00} &           499.54 \\
-      \hline
-      31             & \textbf{  5250.23} &            5000.00 & \textbf{  500.56} &           500.33 \\
-      \hline
-    \end{tabular}
-  \end{center}
-  \caption{
-    \protect\label{tab:orca_zgr}
-    Default vertical mesh in $z$-coordinate for 30 layers ORCA2 configuration as computed from
-    \autoref{eq:DOM_zgr_ana_2} using the coefficients given in \autoref{eq:DOM_zgr_coef}
-  }
-\end{table}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-% -------------------------------------------------------------------------------------------------------------
-%        z-coordinate with partial step
-% -------------------------------------------------------------------------------------------------------------
-\subsection{$Z$-coordinate with partial step (\protect\np{ln\_zps}~\forcode{= .true.})}
-\label{subsec:DOM_zps}
-%--------------------------------------------namdom-------------------------------------------------------
-
-\nlst{namdom} 
-%--------------------------------------------------------------------------------------------------------------
-
-In $z$-coordinate partial step,
-the depths of the model levels are defined by the reference analytical function $z_0(k)$ as described in
-the previous section, \textit{except} in the bottom layer.
-The thickness of the bottom layer is allowed to vary as a function of geographical location $(\lambda,\varphi)$ to
-allow a better representation of the bathymetry, especially in the case of small slopes
-(where the bathymetry varies by less than one level thickness from one grid point to the next).
-The reference layer thicknesses $e_{3t}^0$ have been defined in the absence of bathymetry.
-With partial steps, layers from 1 to \jp{jpk}-2 can have a thickness smaller than $e_{3t}(jk)$.
-The model deepest layer (\jp{jpk}-1) is allowed to have either a smaller or larger 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,
-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 depth allowed is actually $6000~m$ (the default thickness $e_{3t}(jpk - 1)$ being $250~m$).
-Two variables in the namdom namelist are used to define the partial step vertical grid.
-The mimimum water thickness (in meters) allowed for a cell partially filled with bathymetry at level jk is
-the minimum of \np{rn\_e3zps\_min} (thickness in meters, usually $20~m$) or $e_{3t}(jk)*$\np{rn\_e3zps\_rat}
-(a fraction, usually 10\%, of the default thickness $e_{3t}(jk)$).
-
-\gmcomment{ \colorbox{yellow}{Add a figure here of pstep especially at last ocean level }  }
-
-% -------------------------------------------------------------------------------------------------------------
-%        s-coordinate
-% -------------------------------------------------------------------------------------------------------------
-\subsection{$S$-coordinate (\protect\np{ln\_sco}~\forcode{= .true.})}
-\label{subsec:DOM_sco}
-%------------------------------------------nam_zgr_sco---------------------------------------------------
-%
-%\nlst{namzgr_sco} 
-%--------------------------------------------------------------------------------------------------------------
-Options are defined in \ngn{namzgr\_sco}.
-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:
-
-\begin{align*}
-  % \label{eq:DOM_sco_ana}
-  z(k)   &= h(i,j) \; z_0 (k) \\
-  e_3(k) &= h(i,j) \; z_0'(k)
-\end{align*}
-
-where $h$ is the depth of the last $w$-level ($z_0(k)$) defined at the $t$-point location in the horizontal and
-$z_0(k)$ is a function which varies from $0$ at the sea surface to $1$ at the ocean bottom.
-The depth field $h$ is not necessary the ocean depth,
-since a mixed step-like and bottom-following representation of the topography can be used
-(\autoref{fig:z_zps_s_sps}) or an envelop bathymetry can be defined (\autoref{fig:z_zps_s_sps}).
-The namelist parameter \np{rn\_rmax} determines the slope at which
-the terrain-following coordinate intersects the sea bed and becomes a pseudo z-coordinate.
-The coordinate can also be hybridised by specifying \np{rn\_sbot\_min} and \np{rn\_sbot\_max} as
-the minimum and maximum depths at which the terrain-following vertical coordinate is calculated.
-
-Options for stretching the coordinate are provided as examples,
-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
-(\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_al_JPO96}:
-
-\[
-  z = s_{min} + C (s) (H - s_{min})
-  % \label{eq:SH94_1}
-\]
-
-where $s_{min}$ is the depth at which the $s$-coordinate stretching starts and
-allows a $z$-coordinate to placed on top of the stretched coordinate,
-and $z$ is the depth (negative down from the asea surface).
-\begin{gather*}
-  s = - \frac{k}{n - 1} \quad \text{and} \quad 0 \leq k \leq n - 1
-  % \label{eq:DOM_s}
- \\
-  % \label{eq:DOM_sco_function}
-  C(s) = \frac{[\tanh(\theta \, (s + b)) - \tanh(\theta \, b)]}{2 \; \sinh(\theta)}
-\end{gather*}
-
-A stretching function,
-modified from the commonly used \citet{Song_Haidvogel_JCP94} stretching (\np{ln\_s\_SH94}~\forcode{= .true.}),
-is also available and is more commonly used for shelf seas modelling:
-
-\[
-  C(s) =   (1 - b) \frac{\sinh(\theta s)}{\sinh(\theta)}
-         + b       \frac{\tanh \lt[ \theta \lt(s + \frac{1}{2} \rt) \rt] -   \tanh \lt( \frac{\theta}{2} \rt)}
-                        {                                                  2 \tanh \lt( \frac{\theta}{2} \rt)}
-  % \label{eq:SH94_2}
-\]
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!ht]
-  \begin{center}
-    \includegraphics[]{Fig_sco_function}
-    \caption{
-      \protect\label{fig:sco_function}
-      Examples of the stretching function applied to a seamount;
-      from left to right: surface, surface and bottom, and bottom intensified resolutions
-    }
-  \end{center}
-\end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-where $H_c$ is the critical depth (\np{rn\_hc}) at which the coordinate transitions from pure $\sigma$ to
-the stretched coordinate, and $\theta$ (\np{rn\_theta}) and $b$ (\np{rn\_bb}) are the surface and
-bottom control parameters such that $0 \leqslant \theta \leqslant 20$, and $0 \leqslant b \leqslant 1$.
-$b$ has been designed to allow surface and/or bottom increase of the vertical resolution
-(\autoref{fig:sco_function}).
-
-Another example has been provided at version 3.5 (\np{ln\_s\_SF12}) that allows a fixed surface resolution in
-an analytical terrain-following stretching \citet{Siddorn_Furner_OM12}.
-In this case the a stretching function $\gamma$ is defined such that:
-
-\begin{equation}
-  z = - \gamma h \quad \text{with} \quad 0 \leq \gamma \leq 1
-  % \label{eq:z}
-\end{equation}
-
-The function is defined with respect to $\sigma$, the unstretched terrain-following coordinate:
-
-\begin{gather*}
-  % \label{eq:DOM_gamma_deriv}
-  \gamma =   A \lt( \sigma   - \frac{1}{2} (\sigma^2     + f (\sigma)) \rt)
-           + B \lt( \sigma^3 - f           (\sigma) \rt) + f (\sigma)       \\
-  \intertext{Where:}
-  % \label{eq:DOM_gamma}
-  f(\sigma) = (\alpha + 2) \sigma^{\alpha + 1} - (\alpha + 1) \sigma^{\alpha + 2}
-  \quad \text{and} \quad \sigma = \frac{k}{n - 1}
-\end{gather*}
-
-This gives an analytical stretching of $\sigma$ that is solvable in $A$ and $B$ as a function of
-the user prescribed stretching parameter $\alpha$ (\np{rn\_alpha}) that stretches towards
-the surface ($\alpha > 1.0$) or the bottom ($\alpha < 1.0$) and
-user prescribed surface (\np{rn\_zs}) and bottom depths.
-The bottom cell depth in this example is given as a function of water depth:
-
-\[
-  % \label{eq:DOM_zb}
-  Z_b = h a + b
-\]
-
-where the namelist parameters \np{rn\_zb\_a} and \np{rn\_zb\_b} are $a$ and $b$ respectively.
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!ht]
-  \includegraphics[]{Fig_DOM_compare_coordinates_surface}
-  \caption{
-    A comparison of the \citet{Song_Haidvogel_JCP94} $S$-coordinate (solid lines),
-    a 50 level $Z$-coordinate (contoured surfaces) and
-    the \citet{Siddorn_Furner_OM12} $S$-coordinate (dashed lines) in the surface $100~m$ for
-    a idealised bathymetry that goes from $50~m$ to $5500~m$ depth.
-    For clarity every third coordinate surface is shown.
-  }
-  \label{fig:fig_compare_coordinates_surface}
-\end{figure}
- % >>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-This gives a smooth analytical stretching in computational space that is constrained to
-given specified surface and bottom grid cell thicknesses in real space.
-This is not to be confused with the hybrid schemes that
-superimpose geopotential coordinates on terrain following coordinates thus
-creating a non-analytical vertical coordinate that
-therefore may suffer from large gradients in the vertical resolutions.
-This stretching is less straightforward to implement than the \citet{Song_Haidvogel_JCP94} stretching,
-but has the advantage of resolving diurnal processes in deep water and has generally flatter slopes.
-
-As with the \citet{Song_Haidvogel_JCP94} stretching the stretch is only applied at depths greater than
-the critical depth $h_c$.
-In this example two options are available in depths shallower than $h_c$,
-with pure sigma being applied if the \np{ln\_sigcrit} is true and pure z-coordinates if it is false
-(the z-coordinate being equal to the depths of the stretched coordinate at $h_c$).
-
-Minimising the horizontal slope of the vertical coordinate is important in terrain-following systems as
-large slopes lead to hydrostatic consistency.
-A hydrostatic consistency parameter diagnostic following \citet{Haney1991} has been implemented,
-and is output as part of the model mesh file at the start of the run.
-
-% -------------------------------------------------------------------------------------------------------------
-%        z*- or s*-coordinate
-% -------------------------------------------------------------------------------------------------------------
-\subsection{\zstar- or \sstar-coordinate (\protect\np{ln\_linssh}~\forcode{= .false.})}
-\label{subsec:DOM_zgr_star}
-
-This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO web site.
-
-%gm% key advantage: minimise the diffusion/dispertion associated with advection in response to high frequency surface disturbances
-
-% -------------------------------------------------------------------------------------------------------------
-%        level bathymetry and mask 
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Level bathymetry and mask}
-\label{subsec:DOM_msk}
-
-Whatever the vertical coordinate used, the model offers the possibility of representing the bottom topography with
-steps that follow the face of the model cells (step like topography) \citep{Madec_al_JPO96}.
-The distribution of the steps in the horizontal is defined in a 2D integer array, mbathy, which
-gives the number of ocean levels (\ie those that are not masked) at each $t$-point.
-mbathy is computed from the meter bathymetry using the definiton of gdept as the number of $t$-points which
-gdept $\leq$ bathy.
-
-Modifications of the model bathymetry are performed in the \textit{bat\_ctl} routine (see \mdl{domzgr} module) after
-mbathy is computed.
-Isolated grid points that do not communicate with another ocean point at the same level are eliminated.
-
-As for the representation of bathymetry, a 2D integer array, misfdep, is created.
-misfdep defines the level of the first wet $t$-point.
-All the cells between $k = 1$ and $misfdep(i,j) - 1$ are masked.
-By default, $misfdep(:,:) = 1$ and no cells are masked.
-
-In case of ice shelf cavities, modifications of the model bathymetry and ice shelf draft into 
-the cavities are performed in the \textit{zgr\_isf} routine.
-The compatibility between ice shelf draft and bathymetry is checked.
-All the locations where the isf cavity is thinnest than \np{rn\_isfhmin} meters are grounded (\ie masked).
-If only one cell on the water column is opened at $t$-, $u$- or $v$-points,
-the bathymetry or the ice shelf draft is dug to fit this constrain.
-If the incompatibility is too strong (need to dig more than 1 cell), the cell is masked.
-
-From the \textit{mbathy} and \textit{misfdep} array, the mask fields are defined as follows:
-\begin{alignat*}{2}
-  tmask(i,j,k) &= &  &
-    \begin{cases}
-                  0 &\text{if $                  k  <    misfdep(i,j)$} \\
-                  1 &\text{if $misfdep(i,j) \leq k \leq   mbathy(i,j)$} \\
-                  0 &\text{if $                  k  >     mbathy(i,j)$}
-    \end{cases}
-  \\
-  umask(i,j,k) &= &  &tmask(i,j,k) * tmask(i + 1,j,    k) \\
-  vmask(i,j,k) &= &  &tmask(i,j,k) * tmask(i    ,j + 1,k) \\
-  fmask(i,j,k) &= &  &tmask(i,j,k) * tmask(i + 1,j,    k) \\
-               &  &* &tmask(i,j,k) * tmask(i + 1,j,    k) \\
-  wmask(i,j,k) &= &  &tmask(i,j,k) * tmask(i    ,j,k - 1) \\
-  \text{with~} wmask(i,j,1) &= & &tmask(i,j,1)
-\end{alignat*}
-
-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) 
-exactly in the same way as for the bottom boundary.
-
-The specification of closed lateral boundaries requires that at least
-the first and last rows and columns of the \textit{mbathy} array are set to zero.
-In the particular case of an east-west cyclical boundary condition, \textit{mbathy} has its last column equal to
-the second one and its first column equal to the last but one (and so too the mask arrays)
-(see \autoref{fig:LBC_jperio}).
-
-% ================================================================
-% Domain: Initial State (dtatsd & istate)
-% ================================================================
-\section{Initial state (\protect\mdl{istate} and \protect\mdl{dtatsd})}
-\label{sec:DTA_tsd}
-%-----------------------------------------namtsd-------------------------------------------
-
-\nlst{namtsd} 
-%------------------------------------------------------------------------------------------
-
-Options are defined in \ngn{namtsd}.
-By default, the ocean start from rest (the velocity field is set to zero) and the initialization of temperature and
-salinity fields is controlled through the \np{ln\_tsd\_ini} namelist parameter.
+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{clines}
+
+%% =================================================================================================
+\subsection{Output grid files}
+\label{subsec:DOM_meshmask}
+
+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}{ln\_write\_cfg} (namelist \nam{cfg}{cfg}) is set to
+\forcode{.true.};
+the output filename is set through parameter \np{cn_domcfg_out}{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.
+
+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}{ln\_meshmask} (namelist \nam{dom}{dom}) is set to
+\forcode{.true.}.
+This file contains additional fields that can be useful for post-processing applications.
+
+%% =================================================================================================
+\section[Initial state (\textit{istate.F90} and \textit{dtatsd.F90})]{Initial state (\protect\mdl{istate} and \protect\mdl{dtatsd})}
+\label{sec:DOM_DTA_tsd}
+
+\begin{listing}
+  \nlst{namtsd}
+  \caption{\forcode{&namtsd}}
+  \label{lst:namtsd}
+\end{listing}
+
+Basic initial state options are defined in \nam{tsd}{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}{ln\_tsd\_init} namelist parameter.
+
 \begin{description}
-\item[\np{ln\_tsd\_init}~\forcode{= .true.}]
-  use a T and S input files that can be given on the model grid itself or on their native input data grid.
+\item [{\np[=.true.]{ln_tsd_init}{ln\_tsd\_init}}] 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 relative to the input files are given in the \np{sn\_tem} and \np{sn\_sal} structures.
+  The information relating to the input files are specified in
+  the \np{sn_tem}{sn\_tem} and \np{sn_sal}{sn\_sal} structures.
   The computation is done in the \mdl{dtatsd} module.
-\item[\np{ln\_tsd\_init}~\forcode{= .false.}]
-  use constant salinity value of $35.5~psu$ and an analytical profile of temperature
-  (typical of the tropical ocean), see \rou{istate\_t\_s} subroutine called from \mdl{istate} module.
+\item [{\np[=.false.]{ln_tsd_init}{ln\_tsd\_init}}] 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:CFGS_gyre}).
 \end{description}
 
-\biblio
-
-\pindex
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_DYN.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_DYN.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_DYN.tex	(revision 11831)
@@ -2,11 +2,26 @@
 
 \begin{document}
-% ================================================================
-% Chapter ——— Ocean Dynamics (DYN)
-% ================================================================
+
 \chapter{Ocean Dynamics (DYN)}
 \label{chap:DYN}
 
-\minitoc
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
 
 Using the representation described in \autoref{chap:DOM},
@@ -36,47 +51,42 @@
 (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 
-MISC correspond to "extracting tendency terms" or "vorticity balance"?}
-
-% ================================================================
-% Sea Surface Height evolution & Diagnostics variables
-% ================================================================
+\cmtgm{STEVEN: not quite sure I've got the sense of the last sentence.
+  Does MISC correspond to "extracting tendency terms" or "vorticity balance"?}
+
+%% =================================================================================================
 \section{Sea surface height and diagnostic variables ($\eta$, $\zeta$, $\chi$, $w$)}
 \label{sec:DYN_divcur_wzv}
 
-%--------------------------------------------------------------------------------------------------------------
-%           Horizontal divergence and relative vorticity
-%--------------------------------------------------------------------------------------------------------------
-\subsection{Horizontal divergence and relative vorticity (\protect\mdl{divcur})}
+%% =================================================================================================
+\subsection[Horizontal divergence and relative vorticity (\textit{divcur.F90})]{Horizontal divergence and relative vorticity (\protect\mdl{divcur})}
 \label{subsec:DYN_divcur}
 
-The vorticity is defined at an $f$-point (\ie corner point) as follows:
-\begin{equation}
-  \label{eq:divcur_cur}
+The vorticity is defined at an $f$-point (\ie\ corner point) as follows:
+\begin{equation}
+  \label{eq:DYN_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.
 It is given by:
 \[
-  % \label{eq:divcur_div}
+  % \label{eq:DYN_divcur_div}
   \chi =\frac{1}{e_{1t}\,e_{2t}\,e_{3t} }
   \left( {\delta_i \left[ {e_{2u}\,e_{3u}\,u} \right]
@@ -96,15 +106,13 @@
 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. 
-
-%--------------------------------------------------------------------------------------------------------------
-%           Sea Surface Height evolution
-%--------------------------------------------------------------------------------------------------------------
-\subsection{Horizontal divergence and relative vorticity (\protect\mdl{sshwzv})}
+the nonlinear advection and of the vertical velocity respectively.
+
+%% =================================================================================================
+\subsection[Horizontal divergence and relative vorticity (\textit{sshwzv.F90})]{Horizontal divergence and relative vorticity (\protect\mdl{sshwzv})}
 \label{subsec:DYN_sshwzv}
 
 The sea surface height is given by:
 \begin{equation}
-  \label{eq:dynspg_ssh}
+  \label{eq:DYN_spg_ssh}
   \begin{aligned}
     \frac{\partial \eta }{\partial t}
@@ -115,22 +123,22 @@
   \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}:
+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:DYN_spg_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
 the sea surface height equation otherwise tracer content will not be conserved
-\citep{Griffies_al_MWR01, Leclair_Madec_OM09}.
+\citep{griffies.pacanowski.ea_MWR01, leclair.madec_OM09}.
 
 The vertical velocity is computed by an upward integration of the horizontal divergence starting at the bottom,
 taking into account the change of the thickness of the levels:
 \begin{equation}
-  \label{eq:wzv}
+  \label{eq:DYN_wzv}
   \left\{
     \begin{aligned}
@@ -142,52 +150,51 @@
 \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.
-\gmcomment{not sure of this...  to be modified with the change in emp setting}
-In the case of a linear free surface, the time derivative in \autoref{eq:wzv} disappears.
+\cmtgm{not sure of this...  to be modified with the change in emp setting}
+In the case of a linear free surface, the time derivative in \autoref{eq:DYN_wzv} disappears.
 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:DYN_spg_ssh}).
 
 Note also that whereas the vertical velocity has the same discrete expression in $z$- and $s$-coordinates,
 its physical meaning is not the same:
 in the second case, $w$ is the velocity normal to the $s$-surfaces.
-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}). 
-
-
-% ================================================================
-% Coriolis and Advection terms: vector invariant form
-% ================================================================
+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:DYN_wzv}
+(see \autoref{subsec:DOM_Num_Index_vertical}).
+
+%% =================================================================================================
 \section{Coriolis and advection: vector invariant form}
 \label{sec:DYN_adv_cor_vect}
-%-----------------------------------------nam_dynadv----------------------------------------------------
-
-\nlst{namdyn_adv} 
-%-------------------------------------------------------------------------------------------------------------
+
+\begin{listing}
+  \nlst{namdyn_adv}
+  \caption{\forcode{&namdyn_adv}}
+  \label{lst:namdyn_adv}
+\end{listing}
 
 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}{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 
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Vorticity term (\protect\mdl{dynvor})}
+%% =================================================================================================
+\subsection[Vorticity term (\textit{dynvor.F90})]{Vorticity term (\protect\mdl{dynvor})}
 \label{subsec:DYN_vor}
-%------------------------------------------nam_dynvor----------------------------------------------------
-
-\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:
+
+\begin{listing}
+  \nlst{namdyn_vor}
+  \caption{\forcode{&namdyn_vor}}
+  \label{lst:namdyn_vor}
+\end{listing}
+
+Options are defined through the \nam{dyn_vor}{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);
@@ -195,22 +202,21 @@
 horizontal kinetic energy for the planetary vorticity term (MIX scheme);
 or conserving both the potential enstrophy of horizontally non-divergent flow and horizontal kinetic energy
-(EEN scheme) (see \autoref{subsec:C_vorEEN}).
+(EEN scheme) (see \autoref{subsec:INVARIANTS_vorEEN}).
 In the case of ENS, ENE or MIX schemes the land sea mask may be slightly modified to ensure the consistency of
-vorticity term with analytical equations (\np{ln\_dynvor\_con}\forcode{ = .true.}).
+vorticity term with analytical equations (\np[=.true.]{ln_dynvor_con}{ln\_dynvor\_con}).
 The vorticity terms are all computed in dedicated routines that can be found in the \mdl{dynvor} module.
 
-%-------------------------------------------------------------
 %                 enstrophy conserving scheme
-%-------------------------------------------------------------
-\subsubsection{Enstrophy conserving scheme (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})}
+%% =================================================================================================
+\subsubsection[Enstrophy conserving scheme (\forcode{ln_dynvor_ens})]{Enstrophy conserving scheme (\protect\np{ln_dynvor_ens}{ln\_dynvor\_ens})}
 \label{subsec:DYN_vor_ens}
 
 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:
 \begin{equation}
-  \label{eq:dynvor_ens}
+  \label{eq:DYN_vor_ens}
   \left\{
     \begin{aligned}
@@ -221,10 +227,9 @@
     \end{aligned}
   \right.
-\end{equation} 
-
-%-------------------------------------------------------------
+\end{equation}
+
 %                 energy conserving scheme
-%-------------------------------------------------------------
-\subsubsection{Energy conserving scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})}
+%% =================================================================================================
+\subsubsection[Energy conserving scheme (\forcode{ln_dynvor_ene})]{Energy conserving scheme (\protect\np{ln_dynvor_ene}{ln\_dynvor\_ene})}
 \label{subsec:DYN_vor_ene}
 
@@ -232,5 +237,5 @@
 It is given by:
 \begin{equation}
-  \label{eq:dynvor_ene}
+  \label{eq:DYN_vor_ene}
   \left\{
     \begin{aligned}
@@ -241,17 +246,16 @@
     \end{aligned}
   \right.
-\end{equation} 
-
-%-------------------------------------------------------------
+\end{equation}
+
 %                 mix energy/enstrophy conserving scheme
-%-------------------------------------------------------------
-\subsubsection{Mixed energy/enstrophy conserving scheme (\protect\np{ln\_dynvor\_mix}\forcode{ = .true.}) }
+%% =================================================================================================
+\subsubsection[Mixed energy/enstrophy conserving scheme (\forcode{ln_dynvor_mix})]{Mixed energy/enstrophy conserving scheme (\protect\np{ln_dynvor_mix}{ln\_dynvor\_mix})}
 \label{subsec:DYN_vor_mix}
 
 For the mixed energy/enstrophy conserving scheme (MIX scheme), a mixture of the two previous schemes is used.
-It consists of the ENS scheme (\autoref{eq:dynvor_ens}) for the relative vorticity term,
-and of the ENE scheme (\autoref{eq:dynvor_ene}) applied to the planetary vorticity term.
-\[
-  % \label{eq:dynvor_mix}
+It consists of the ENS scheme (\autoref{eq:DYN_vor_ens}) for the relative vorticity term,
+and of the ENE scheme (\autoref{eq:DYN_vor_ene}) applied to the planetary vorticity term.
+\[
+  % \label{eq:DYN_vor_mix}
   \left\{ {
       \begin{aligned}
@@ -268,8 +272,7 @@
 \]
 
-%-------------------------------------------------------------
 %                 energy and enstrophy conserving scheme
-%-------------------------------------------------------------
-\subsubsection{Energy and enstrophy conserving scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.}) }
+%% =================================================================================================
+\subsubsection[Energy and enstrophy conserving scheme (\forcode{ln_dynvor_een})]{Energy and enstrophy conserving scheme (\protect\np{ln_dynvor_een}{ln\_dynvor\_een})}
 \label{subsec:DYN_vor_een}
 
@@ -278,5 +281,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.
@@ -284,42 +287,38 @@
 $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) 
+\cmtgm{ To circumvent this, Adcroft (ADD REF HERE)
 Nevertheless, this technique strongly distort the phase and group velocity of Rossby waves....}
 
-A very nice solution to the problem of double averaging was proposed by \citet{Arakawa_Hsu_MWR90}.
+A very nice solution to the problem of double averaging was proposed by \citet{arakawa.hsu_MWR90}.
 The idea is to get rid of the double averaging by considering triad combinations of vorticity.
 It is noteworthy that this solution is conceptually quite similar to the one proposed by
-\citep{Griffies_al_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: 
-\[
-  % \label{eq:pot_vor}
+\citep{griffies.gnanadesikan.ea_JPO98} for the discretization of the iso-neutral diffusion operator (see \autoref{apdx:INVARIANTS}).
+
+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:DYN_pot_vor}
   q  = \frac{\zeta +f} {e_{3f} }
 \]
-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: 
-\begin{equation}
-  \label{eq:een_e3f}
+where the relative vorticity is defined by (\autoref{eq:DYN_divcur_cur}),
+the Coriolis parameter is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is:
+\begin{equation}
+  \label{eq:DYN_een_e3f}
   e_{3f} = \overline{\overline {e_{3t} }} ^{\,i+1/2,j+1/2}
 \end{equation}
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!ht]
-  \begin{center}
-    \includegraphics[width=0.70\textwidth]{Fig_DYN_een_triad}
-    \caption{
-      \protect\label{fig:DYN_een_triad}
-      Triads used in the energy and enstrophy conserving scheme (een) for
-      $u$-component (upper panel) and $v$-component (lower panel).
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{DYN_een_triad}
+  \caption[Triads used in the energy and enstrophy conserving scheme (EEN)]{
+    Triads used in the energy and enstrophy conserving scheme (EEN) for
+    $u$-component (upper panel) and $v$-component (lower panel).}
+  \label{fig:DYN_een_triad}
 \end{figure}
-% >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-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:DYN_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.}).
+(\np[=1]{nn_een_e3f}{nn\_een\_e3f}), or just by $4$ (\np[=.true.]{nn_een_e3f}{nn\_een\_e3f}).
 The latter case preserves the continuity of $e_{3f}$ when one or more of the neighbouring $e_{3t}$ tends to zero and
 extends by continuity the value of $e_{3f}$ into the land areas.
@@ -327,19 +326,19 @@
 (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_al_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}): 
-\begin{equation}
-  \label{eq:Q_triads}
+(\autoref{fig:DYN_een_triad}):
+\begin{equation}
+  \label{eq:DYN_Q_triads}
   _i^j \mathbb{Q}^{i_p}_{j_p}
   = \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: 
-\begin{equation}
-  \label{eq:dynvor_een}
+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:DYN_vor_een}
   \left\{ {
       \begin{aligned}
@@ -350,27 +349,25 @@
       \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:INVARIANTS_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_al_OM09}.
+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_al_OD06, Penduff_al_OS07}. 
-
-%--------------------------------------------------------------------------------------------------------------
-%           Kinetic Energy Gradient term
-%--------------------------------------------------------------------------------------------------------------
-\subsection{Kinetic energy gradient term (\protect\mdl{dynkeg})}
+leading to a larger topostrophy of the flow \citep{barnier.madec.ea_OD06, penduff.le-sommer.ea_OS07}.
+
+%% =================================================================================================
+\subsection[Kinetic energy gradient term (\textit{dynkeg.F90})]{Kinetic energy gradient term (\protect\mdl{dynkeg})}
 \label{subsec:DYN_keg}
 
-As demonstrated in \autoref{apdx:C},
+As demonstrated in \autoref{apdx:INVARIANTS},
 there is a single discrete formulation of the kinetic energy gradient term that,
 together with the formulation chosen for the vertical advection (see below),
 conserves the total kinetic energy:
 \[
-  % \label{eq:dynkeg}
+  % \label{eq:DYN_keg}
   \left\{
     \begin{aligned}
@@ -381,8 +378,6 @@
 \]
 
-%--------------------------------------------------------------------------------------------------------------
-%           Vertical advection term
-%--------------------------------------------------------------------------------------------------------------
-\subsection{Vertical advection term (\protect\mdl{dynzad}) }
+%% =================================================================================================
+\subsection[Vertical advection term (\textit{dynzad.F90})]{Vertical advection term (\protect\mdl{dynzad})}
 \label{subsec:DYN_zad}
 
@@ -391,7 +386,7 @@
 conserves the total kinetic energy.
 Indeed, the change of KE due to the vertical advection is exactly balanced by
-the change of KE due to the gradient of KE (see \autoref{apdx:C}).
-\[
-  % \label{eq:dynzad}
+the change of KE due to the gradient of KE (see \autoref{apdx:INVARIANTS}).
+\[
+  % \label{eq:DYN_zad}
   \left\{
     \begin{aligned}
@@ -401,60 +396,48 @@
   \right.
 \]
-When \np{ln\_dynzad\_zts}\forcode{ = .true.},
+When \np[=.true.]{ln_dynzad_zts}{ln\_dynzad\_zts},
 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_OM2015}. 
+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,
-an option which is only available with a TVD scheme (see \np{ln\_traadv\_tvd\_zts} in \autoref{subsec:TRA_adv_tvd}).
-
-
-% ================================================================
-% Coriolis and Advection : flux form
-% ================================================================
+an option which is only available with a TVD scheme (see \np{ln_traadv_tvd_zts}{ln\_traadv\_tvd\_zts} in \autoref{subsec:TRA_adv_tvd}).
+
+%% =================================================================================================
 \section{Coriolis and advection: flux form}
 \label{sec:DYN_adv_cor_flux}
-%------------------------------------------nam_dynadv----------------------------------------------------
-
-\nlst{namdyn_adv} 
-%-------------------------------------------------------------------------------------------------------------
-
-Options are defined through the \ngn{namdyn\_adv} namelist variables.
+
+Options are defined through the \nam{dyn_adv}{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}.
 
-
-%--------------------------------------------------------------------------------------------------------------
-%           Coriolis plus curvature metric terms
-%--------------------------------------------------------------------------------------------------------------
-\subsection{Coriolis plus curvature metric terms (\protect\mdl{dynvor}) }
+%% =================================================================================================
+\subsection[Coriolis plus curvature metric terms (\textit{dynvor.F90})]{Coriolis plus curvature metric terms (\protect\mdl{dynvor})}
 \label{subsec:DYN_cor_flux}
 
 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}
+  % \label{eq:DYN_cor_metric}
   f+\frac{1}{e_1 e_2 }\left( {v\frac{\partial e_2 }{\partial i}  -  u\frac{\partial e_1 }{\partial j}} \right)  \\
   \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*} 
-
-Any of the (\autoref{eq:dynvor_ens}), (\autoref{eq:dynvor_ene}) and (\autoref{eq:dynvor_een}) schemes can be used to
+\end{multline*}
+
+Any of the (\autoref{eq:DYN_vor_ens}), (\autoref{eq:DYN_vor_ene}) and (\autoref{eq:DYN_vor_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).
-
-%--------------------------------------------------------------------------------------------------------------
-%           Flux form Advection term
-%--------------------------------------------------------------------------------------------------------------
-\subsection{Flux form advection term (\protect\mdl{dynadv}) }
+However, the energy-conserving scheme (\autoref{eq:DYN_vor_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).
+
+%% =================================================================================================
+\subsection[Flux form advection term (\textit{dynadv.F90})]{Flux form advection term (\protect\mdl{dynadv})}
 \label{subsec:DYN_adv_flux}
 
 The discrete expression of the advection term is given by:
 \[
-  % \label{eq:dynadv}
+  % \label{eq:DYN_adv}
   \left\{
     \begin{aligned}
@@ -475,19 +458,18 @@
 a $2^{nd}$ order centered finite difference scheme, CEN2,
 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 latter is described in \citet{shchepetkin.mcwilliams_OM05}.
+The schemes are selected using the namelist logicals \np{ln_dynadv_cen2}{ln\_dynadv\_cen2} and \np{ln_dynadv_ubs}{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$.
+
 %                 2nd order centred scheme
-%-------------------------------------------------------------
-\subsubsection{CEN2: $2^{nd}$ order centred scheme (\protect\np{ln\_dynadv\_cen2}\forcode{ = .true.})}
+%% =================================================================================================
+\subsubsection[CEN2: $2^{nd}$ order centred scheme (\forcode{ln_dynadv_cen2})]{CEN2: $2^{nd}$ order centred scheme (\protect\np{ln_dynadv_cen2}{ln\_dynadv\_cen2})}
 \label{subsec:DYN_adv_cen2}
 
 In the centered $2^{nd}$ order formulation, the velocity is evaluated as the mean of the two neighbouring points:
 \begin{equation}
-  \label{eq:dynadv_cen2}
+  \label{eq:DYN_adv_cen2}
   \left\{
     \begin{aligned}
@@ -496,7 +478,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.
@@ -504,8 +486,7 @@
 so $u$ and $v$ are the \emph{now} velocities.
 
-%-------------------------------------------------------------
 %                 UBS scheme
-%-------------------------------------------------------------
-\subsubsection{UBS: Upstream Biased Scheme (\protect\np{ln\_dynadv\_ubs}\forcode{ = .true.})}
+%% =================================================================================================
+\subsubsection[UBS: Upstream Biased Scheme (\forcode{ln_dynadv_ubs})]{UBS: Upstream Biased Scheme (\protect\np{ln_dynadv_ubs}{ln\_dynadv\_ubs})}
 \label{subsec:DYN_adv_ubs}
 
@@ -514,5 +495,5 @@
 For example, the evaluation of $u_T^{ubs} $ is done as follows:
 \begin{equation}
-  \label{eq:dynadv_ubs}
+  \label{eq:DYN_adv_ubs}
   u_T^{ubs} =\overline u ^i-\;\frac{1}{6}
   \begin{cases}
@@ -522,29 +503,29 @@
 \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
-\citep{Shchepetkin_McWilliams_OM05}.
-The overall performance of the advection scheme is similar to that reported in \citet{Farrow1995}.
+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}.
 It is a relatively good compromise between accuracy and smoothness.
 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}{ln\_dynldf\_lap}\np[=.false.]{ln_dynldf_bilap}{ln\_dynldf\_bilap}),
 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
-$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 
+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:DYN_adv_cen2} are used.
+UBS is diffusive and is associated with vertical mixing of momentum. \cmtgm{ gm  pursue the
 sentence:Since vertical mixing of momentum is a source term of the TKE equation...  }
 
-For stability reasons, the first term in (\autoref{eq:dynadv_ubs}),
+For stability reasons, the first term in (\autoref{eq:DYN_adv_ubs}),
 which corresponds to a second order centred scheme, is evaluated using the \textit{now} velocity (centred in time),
 while the second term, which is the diffusion part of the scheme,
 is evaluated using the \textit{before} velocity (forward in time).
-This is discussed by \citet{Webb_al_JAOT98} in the context of the Quick advection scheme.
+This is discussed by \citet{webb.de-cuevas.ea_JAOT98} in the context of the Quick advection scheme.
 
 Note that the UBS and QUICK (Quadratic Upstream Interpolation for Convective Kinematics) schemes only differ by
 one coefficient.
-Replacing $1/6$ by $1/8$ in (\autoref{eq:dynadv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}.
+Replacing $1/6$ by $1/8$ in (\autoref{eq:DYN_adv_ubs}) leads to the QUICK advection scheme \citep{webb.de-cuevas.ea_JAOT98}.
 This option is not available through a namelist parameter, since the $1/6$ coefficient is hard coded.
 Nevertheless it is quite easy to make the substitution in the \mdl{dynadv\_ubs} module and obtain a QUICK scheme.
@@ -553,34 +534,30 @@
 there is also the possibility of using a $4^{th}$ order evaluation of the advective velocity as in ROMS.
 This is an error and should be suppressed soon.
-%%%
-\gmcomment{action :  this have to be done}
-%%%
-
-% ================================================================
-%           Hydrostatic pressure gradient term
-% ================================================================
-\section{Hydrostatic pressure gradient (\protect\mdl{dynhpg})}
+\cmtgm{action :  this have to be done}
+
+%% =================================================================================================
+\section[Hydrostatic pressure gradient (\textit{dynhpg.F90})]{Hydrostatic pressure gradient (\protect\mdl{dynhpg})}
 \label{sec:DYN_hpg}
-%------------------------------------------nam_dynhpg---------------------------------------------------
-
-\nlst{namdyn_hpg} 
-%-------------------------------------------------------------------------------------------------------------
-
-Options are defined through the \ngn{namdyn\_hpg} namelist variables.
+
+\begin{listing}
+  \nlst{namdyn_hpg}
+  \caption{\forcode{&namdyn_hpg}}
+  \label{lst:namdyn_hpg}
+\end{listing}
+
+Options are defined through the \nam{dyn_hpg}{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.
 
-%--------------------------------------------------------------------------------------------------------------
-%           z-coordinate with full step
-%--------------------------------------------------------------------------------------------------------------
-\subsection{Full step $Z$-coordinate (\protect\np{ln\_dynhpg\_zco}\forcode{ = .true.})}
+%% =================================================================================================
+\subsection[Full step $Z$-coordinate (\forcode{ln_dynhpg_zco})]{Full step $Z$-coordinate (\protect\np{ln_dynhpg_zco}{ln\_dynhpg\_zco})}
 \label{subsec:DYN_hpg_zco}
 
@@ -592,5 +569,5 @@
 for $k=km$ (surface layer, $jk=1$ in the code)
 \begin{equation}
-  \label{eq:dynhpg_zco_surf}
+  \label{eq:DYN_hpg_zco_surf}
   \left\{
     \begin{aligned}
@@ -601,9 +578,9 @@
     \end{aligned}
   \right.
-\end{equation} 
+\end{equation}
 
 for $1<k<km$ (interior layer)
 \begin{equation}
-  \label{eq:dynhpg_zco}
+  \label{eq:DYN_hpg_zco}
   \left\{
     \begin{aligned}
@@ -616,16 +593,14 @@
     \end{aligned}
   \right.
-\end{equation} 
-
-Note that the $1/2$ factor in (\autoref{eq:dynhpg_zco_surf}) is adequate because of the definition of $e_{3w}$ as
+\end{equation}
+
+Note that the $1/2$ factor in (\autoref{eq:DYN_hpg_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),
-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}$.
-
-%--------------------------------------------------------------------------------------------------------------
-%           z-coordinate with partial step
-%--------------------------------------------------------------------------------------------------------------
-\subsection{Partial step $Z$-coordinate (\protect\np{ln\_dynhpg\_zps}\forcode{ = .true.})}
+Note also that in case of variable volume level (\texttt{vvl?} defined),
+the surface pressure gradient is included in \autoref{eq:DYN_hpg_zco_surf} and
+\autoref{eq:DYN_hpg_zco} through the space and time variations of the vertical scale factor $e_{3w}$.
+
+%% =================================================================================================
+\subsection[Partial step $Z$-coordinate (\forcode{ln_dynhpg_zps})]{Partial step $Z$-coordinate (\protect\np{ln_dynhpg_zps}{ln\_dynhpg\_zps})}
 \label{subsec:DYN_hpg_zps}
 
@@ -633,5 +608,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,
@@ -645,18 +620,16 @@
 module \mdl{zpsdhe} located in the TRA directory and described in \autoref{sec:TRA_zpshde}.
 
-%--------------------------------------------------------------------------------------------------------------
-%           s- and s-z-coordinates
-%--------------------------------------------------------------------------------------------------------------
+%% =================================================================================================
 \subsection{$S$- and $Z$-$S$-coordinates}
 \label{subsec:DYN_hpg_sco}
 
 Pressure gradient formulations in an $s$-coordinate have been the subject of a vast number of papers
-(\eg, \citet{Song1998, 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.
 
-$\bullet$ Traditional coding (see for example \citet{Madec_al_JPO96}: (\np{ln\_dynhpg\_sco}\forcode{ = .true.})
-\begin{equation}
-  \label{eq:dynhpg_sco}
+$\bullet$ Traditional coding (see for example \citet{madec.delecluse.ea_JPO96}: (\np[=.true.]{ln_dynhpg_sco}{ln\_dynhpg\_sco})
+\begin{equation}
+  \label{eq:DYN_hpg_sco}
   \left\{
     \begin{aligned}
@@ -667,24 +640,24 @@
     \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 
+computed as in \autoref{eq:DYN_hpg_zco_surf} - \autoref{eq:DYN_hpg_zco},
+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.}).
-
-$\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} 
-(\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,
-the coordinate surfaces are not horizontal but follow the free surface \citep{Levier2007}.
-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.
+
+$\bullet$ Traditional coding with adaptation for ice shelf cavities (\np[=.true.]{ln_dynhpg_isf}{ln\_dynhpg\_isf}).
+This scheme need the activation of ice shelf cavities (\np[=.true.]{ln_isfcav}{ln\_isfcav}).
+
+$\bullet$ Pressure Jacobian scheme (prj) (a research paper in preparation) (\np[=.true.]{ln_dynhpg_prj}{ln\_dynhpg\_prj})
+
+$\bullet$ Density Jacobian with cubic polynomial scheme (DJC) \citep{shchepetkin.mcwilliams_OM05}
+(\np[=.true.]{ln_dynhpg_djc}{ln\_dynhpg\_djc}) (currently disabled; under development)
+
+Note that expression \autoref{eq:DYN_hpg_sco} is commonly used when the variable volume formulation is activated
+(\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[=.true.]{ln_dynhpg_prj}{ln\_dynhpg\_prj}) is available as
+an improved option to \np[=.true.]{ln_dynhpg_sco}{ln\_dynhpg\_sco} when \texttt{vvl?} is active.
 The pressure Jacobian scheme uses a constrained cubic spline to
 reconstruct the density profile across the water column.
@@ -694,8 +667,10 @@
 This method can provide a more accurate calculation of the horizontal pressure gradient than the standard scheme.
 
+%% =================================================================================================
 \subsection{Ice shelf cavity}
 \label{subsec:DYN_hpg_isf}
+
 Beneath an ice shelf, the total pressure gradient is the sum of the pressure gradient due to the ice shelf load and
-the pressure gradient due to the ocean load (\np{ln\_dynhpg\_isf}\forcode{ = .true.}).\\
+the pressure gradient due to the ocean load (\np[=.true.]{ln_dynhpg_isf}{ln\_dynhpg\_isf}).\\
 
 The main hypothesis to compute the ice shelf load is that the ice shelf is in an isostatic equilibrium.
@@ -704,13 +679,11 @@
 corresponds to the water replaced by the ice shelf.
 This top pressure is constant over time.
-A detailed description of this method is described in \citet{Losch2008}.\\
-
-The pressure gradient due to ocean load is computed using the expression \autoref{eq:dynhpg_sco} described in
-\autoref{subsec:DYN_hpg_sco}. 
-
-%--------------------------------------------------------------------------------------------------------------
-%           Time-scheme
-%--------------------------------------------------------------------------------------------------------------
-\subsection{Time-scheme (\protect\np{ln\_dynhpg\_imp}\forcode{ = .true./.false.})}
+A detailed description of this method is described in \citet{losch_JGR08}.\\
+
+The pressure gradient due to ocean load is computed using the expression \autoref{eq:DYN_hpg_sco} described in
+\autoref{subsec:DYN_hpg_sco}.
+
+%% =================================================================================================
+\subsection[Time-scheme (\forcode{ln_dynhpg_imp})]{Time-scheme (\protect\np{ln_dynhpg_imp}{ln\_dynhpg\_imp})}
 \label{subsec:DYN_hpg_imp}
 
@@ -722,37 +695,37 @@
 the physical phenomenon that controls the time-step is internal gravity waves (IGWs).
 A semi-implicit scheme for doubling the stability limit associated with IGWs can be used
-\citep{Brown_Campana_MWR78, Maltrud1998}.
+\citep{brown.campana_MWR78, maltrud.smith.ea_JGR98}.
 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. 
-
-$\bullet$ leapfrog scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}):
-
-\begin{equation}
-  \label{eq:dynhpg_lf}
+(\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[=.true.]{ln_dynhpg_imp}{ln\_dynhpg\_imp}):
+
+\begin{equation}
+  \label{eq:DYN_hpg_lf}
   \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \;
   -\frac{1}{\rho_o \,e_{1u} }\delta_{i+1/2} \left[ {p_h^t } \right]
 \end{equation}
 
-$\bullet$ semi-implicit scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}):
-\begin{equation}
-  \label{eq:dynhpg_imp}
+$\bullet$ semi-implicit scheme (\np[=.true.]{ln_dynhpg_imp}{ln\_dynhpg\_imp}):
+\begin{equation}
+  \label{eq:DYN_hpg_imp}
   \frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \;
   -\frac{1}{4\,\rho_o \,e_{1u} } \delta_{i+1/2} \left[ p_h^{t+\rdt} +2\,p_h^t +p_h^{t-\rdt}  \right]
 \end{equation}
 
-The semi-implicit time scheme \autoref{eq:dynhpg_imp} is made possible without
+The semi-implicit time scheme \autoref{eq:DYN_hpg_imp} is made possible without
 significant additional computation since the density can be updated to time level $t+\rdt$ before
 computing the horizontal hydrostatic pressure gradient.
 It can be easily shown that the stability limit associated with the hydrostatic pressure gradient doubles using
-\autoref{eq:dynhpg_imp} compared to that using the standard leapfrog scheme \autoref{eq:dynhpg_lf}.
-Note that \autoref{eq:dynhpg_imp} is equivalent to applying a time filter to the pressure gradient to
+\autoref{eq:DYN_hpg_imp} compared to that using the standard leapfrog scheme \autoref{eq:DYN_hpg_lf}.
+Note that \autoref{eq:DYN_hpg_imp} is equivalent to applying a time filter to the pressure gradient to
 eliminate high frequency IGWs.
-Obviously, when using \autoref{eq:dynhpg_imp},
+Obviously, when using \autoref{eq:DYN_hpg_imp},
 the doubling of the time-step is achievable only if no other factors control the time-step,
 such as the stability limits associated with advection or diffusion.
 
-In practice, the semi-implicit scheme is used when \np{ln\_dynhpg\_imp}\forcode{ = .true.}.
+In practice, the semi-implicit scheme is used when \np[=.true.]{ln_dynhpg_imp}{ln\_dynhpg\_imp}.
 In this case, we choose to apply the time filter to temperature and salinity used in the equation of state,
 instead of applying it to the hydrostatic pressure or to the density,
@@ -760,5 +733,5 @@
 The density used to compute the hydrostatic pressure gradient (whatever the formulation) is evaluated as follows:
 \[
-  % \label{eq:rho_flt}
+  % \label{eq:DYN_rho_flt}
   \rho^t = \rho( \widetilde{T},\widetilde {S},z_t)
   \quad	  \text{with}	\quad
@@ -768,38 +741,37 @@
 Note that in the semi-implicit case, it is necessary to save the filtered density,
 an extra three-dimensional field, in the restart file to restart the model with exact reproducibility.
-This option is controlled by  \np{nn\_dynhpg\_rst}, a namelist parameter.
-
-% ================================================================
-% Surface Pressure Gradient
-% ================================================================
-\section{Surface pressure gradient (\protect\mdl{dynspg})}
+This option is controlled by  \np{nn_dynhpg_rst}{nn\_dynhpg\_rst}, a namelist parameter.
+
+%% =================================================================================================
+\section[Surface pressure gradient (\textit{dynspg.F90})]{Surface pressure gradient (\protect\mdl{dynspg})}
 \label{sec:DYN_spg}
-%-----------------------------------------nam_dynspg----------------------------------------------------
-
-\nlst{namdyn_spg} 
-%------------------------------------------------------------------------------------------------------------
-
-Options are defined through the \ngn{namdyn\_spg} namelist variables.
-The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}).
+
+\begin{listing}
+  \nlst{namdyn_spg}
+  \caption{\forcode{&namdyn_spg}}
+  \label{lst:namdyn_spg}
+\end{listing}
+
+Options are defined through the \nam{dyn_spg}{dyn\_spg} namelist variables.
+The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:MB_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).
-In the linear free surface case (\autoref{subsec:PE_free_surface})
+the variable volume case (nonlinear free surface, \texttt{vvl?} is defined).
+In the linear free surface case (\autoref{subsec:MB_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, 
+while they are time-dependent in the nonlinear case (\autoref{subsec:MB_free_surface}).
+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:MB_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}.
 
-
 The form of the surface pressure gradient term depends on how the user wants to
-handle the fast external gravity waves that are a solution of the analytical equation (\autoref{sec:PE_hor_pg}).
+handle the fast external gravity waves that are a solution of the analytical equation (\autoref{sec:MB_hor_pg}).
 Three formulations are available, all controlled by a CPP key (ln\_dynspg\_xxx):
 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.
 
@@ -807,18 +779,15 @@
 As a consequence the update of the $next$ velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}.
 
-
-%--------------------------------------------------------------------------------------------------------------
-% Explicit free surface formulation
-%--------------------------------------------------------------------------------------------------------------
-\subsection{Explicit free surface (\protect\key{dynspg\_exp})}
+%% =================================================================================================
+\subsection[Explicit free surface (\forcode{ln_dynspg_exp})]{Explicit free surface (\protect\np{ln_dynspg_exp}{ln\_dynspg\_exp})}
 \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}{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}
-  \label{eq:dynspg_exp}
+  \label{eq:DYN_spg_exp}
   \left\{
     \begin{aligned}
@@ -827,97 +796,90 @@
     \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.
 Thus, nothing is done in the \mdl{dynspg\_exp} module.
 
-%--------------------------------------------------------------------------------------------------------------
-% Split-explict free surface formulation
-%--------------------------------------------------------------------------------------------------------------
-\subsection{Split-explicit free surface (\protect\key{dynspg\_ts})}
+%% =================================================================================================
+\subsection[Split-explicit free surface (\forcode{ln_dynspg_ts})]{Split-explicit free surface (\protect\np{ln_dynspg_ts}{ln\_dynspg\_ts})}
 \label{subsec:DYN_spg_ts}
-%------------------------------------------namsplit-----------------------------------------------------------
-%
 %\nlst{namsplit}
-%-------------------------------------------------------------------------------------------------------------
-
-The split-explicit free surface formulation used in \NEMO (\key{dynspg\_ts} defined),
-also called the time-splitting formulation, follows the one proposed by \citet{Shchepetkin_McWilliams_OM05}.
+
+The split-explicit free surface formulation used in \NEMO\ (\np{ln_dynspg_ts}{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
 a smaller time step than $\rdt$, the time step used for the three dimensional prognostic variables
-(\autoref{fig:DYN_dynspg_ts}).
+(\autoref{fig:DYN_spg_ts}).
 The size of the small time step, $\rdt_e$ (the external mode or barotropic time step) is provided through
-the \np{nn\_baro} namelist parameter as: $\rdt_e = \rdt / nn\_baro$.
-This parameter can be optionally defined automatically (\np{ln\_bt\_nn\_auto}\forcode{ = .true.}) considering that
+the \np{nn_baro}{nn\_baro} namelist parameter as: $\rdt_e = \rdt / nn\_baro$.
+This parameter can be optionally defined automatically (\np[=.true.]{ln_bt_nn_auto}{ln\_bt\_nn\_auto}) considering that
 the stability of the barotropic system is essentially controled by external waves propagation.
 Maximum Courant number is in that case time independent, and easily computed online from the input bathymetry.
-Therefore, $\rdt_e$ is adjusted so that the Maximum allowed Courant number is smaller than \np{rn\_bt\_cmax}.
-
-%%%
+Therefore, $\rdt_e$ is adjusted so that the Maximum allowed Courant number is smaller than \np{rn_bt_cmax}{rn\_bt\_cmax}.
+
 The barotropic mode solves the following equations:
 % \begin{subequations}
-%  \label{eq:BT}
-\begin{equation}
-  \label{eq:BT_dyn}
-  \frac{\partial {\rm \overline{{\bf U}}_h} }{\partial t}=
-  -f\;{\rm {\bf k}}\times {\rm \overline{{\bf U}}_h}
-  -g\nabla _h \eta -\frac{c_b^{\textbf U}}{H+\eta} \rm {\overline{{\bf U}}_h} + \rm {\overline{\bf G}}
-\end{equation}
-\[
-  % \label{eq:BT_ssh}
-  \frac{\partial \eta }{\partial t}=-\nabla \cdot \left[ {\left( {H+\eta } \right) \; {\rm{\bf \overline{U}}}_h \,} \right]+P-E
+%  \label{eq:DYN_BT}
+\begin{equation}
+  \label{eq:DYN_BT_dyn}
+  \frac{\partial {\mathrm \overline{{\mathbf U}}_h} }{\partial t}=
+  -f\;{\mathrm {\mathbf k}}\times {\mathrm \overline{{\mathbf U}}_h}
+  -g\nabla _h \eta -\frac{c_b^{\textbf U}}{H+\eta} \mathrm {\overline{{\mathbf U}}_h} + \mathrm {\overline{\mathbf G}}
+\end{equation}
+\[
+  % \label{eq:DYN_BT_ssh}
+  \frac{\partial \eta }{\partial t}=-\nabla \cdot \left[ {\left( {H+\eta } \right) \; {\mathrm{\mathbf \overline{U}}}_h \,} \right]+P-E
 \]
 % \end{subequations}
-where $\rm {\overline{\bf G}}$ is a forcing term held constant, containing coupling term between modes,
+where $\mathrm {\overline{\mathbf G}}$ is a forcing term held constant, containing coupling term between modes,
 surface atmospheric forcing as well as slowly varying barotropic terms not explicitly computed to gain efficiency.
-The third term on the right hand side of \autoref{eq:BT_dyn} represents the bottom stress
-(see section \autoref{sec:ZDF_bfr}), explicitly accounted for at each barotropic iteration.
+The third term on the right hand side of \autoref{eq:DYN_BT_dyn} represents the bottom stress
+(see section \autoref{sec:ZDF_drg}), explicitly accounted for at each barotropic iteration.
 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,
-"multi-purpose" stability compromise as defined in \citet{Shchepetkin_McWilliams_Bk08}
-(see their figure 12, lower left). 
-
-%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >
+detailed in \citet{shchepetkin.mcwilliams_OM05}.
+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).
+
 \begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=0.7\textwidth]{Fig_DYN_dynspg_ts}
-    \caption{
-      \protect\label{fig:DYN_dynspg_ts}
-      Schematic of the split-explicit time stepping scheme for the external and internal modes.
-      Time increases to the right. In this particular exemple,
-      a boxcar averaging window over $nn\_baro$ barotropic time steps is used ($nn\_bt\_flt=1$) and $nn\_baro=5$.
-      Internal mode time steps (which are also the model time steps) are denoted by $t-\rdt$, $t$ and $t+\rdt$.
-      Variables with $k$ superscript refer to instantaneous barotropic variables,
-      $< >$ and $<< >>$ operator refer to time filtered variables using respectively primary (red vertical bars) and
-      secondary weights (blue vertical bars).
-      The former are used to obtain time filtered quantities at $t+\rdt$ while
-      the latter are used to obtain time averaged transports to advect tracers.
-      a) Forward time integration: \protect\np{ln\_bt\_fw}\forcode{ = .true.},
-      \protect\np{ln\_bt\_av}\forcode{ = .true.}.
-      b) Centred time integration: \protect\np{ln\_bt\_fw}\forcode{ = .false.},
-      \protect\np{ln\_bt\_av}\forcode{ = .true.}.
-      c) Forward time integration with no time filtering (POM-like scheme):
-      \protect\np{ln\_bt\_fw}\forcode{ = .true.}, \protect\np{ln\_bt\_av}\forcode{ = .false.}.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{DYN_dynspg_ts}
+  \caption[Split-explicit time stepping scheme for the external and internal modes]{
+    Schematic of the split-explicit time stepping scheme for the external and internal modes.
+    Time increases to the right.
+    In this particular exemple,
+    a boxcar averaging window over \np{nn_baro}{nn\_baro} barotropic time steps is used
+    (\np[=1]{nn_bt_flt}{nn\_bt\_flt}) and \np[=5]{nn_baro}{nn\_baro}.
+    Internal mode time steps (which are also the model time steps) are denoted by
+    $t-\rdt$, $t$ and $t+\rdt$.
+    Variables with $k$ superscript refer to instantaneous barotropic variables,
+    $< >$ and $<< >>$ operator refer to time filtered variables using respectively primary
+    (red vertical bars) and secondary weights (blue vertical bars).
+    The former are used to obtain time filtered quantities at $t+\rdt$ while
+    the latter are used to obtain time averaged transports to advect tracers.
+    a) Forward time integration:
+    \protect\np[=.true.]{ln_bt_fw}{ln\_bt\_fw},  \protect\np[=.true.]{ln_bt_av}{ln\_bt\_av}.
+    b) Centred time integration:
+    \protect\np[=.false.]{ln_bt_fw}{ln\_bt\_fw}, \protect\np[=.true.]{ln_bt_av}{ln\_bt\_av}.
+    c) Forward time integration with no time filtering (POM-like scheme):
+    \protect\np[=.true.]{ln_bt_fw}{ln\_bt\_fw},  \protect\np[=.false.]{ln_bt_av}{ln\_bt\_av}.}
+  \label{fig:DYN_spg_ts}
 \end{figure}
-%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >
-
-In the default case (\np{ln\_bt\_fw}\forcode{ = .true.}),
+
+In the default case (\np[=.true.]{ln_bt_fw}{ln\_bt\_fw}),
 the external mode is integrated between \textit{now} and \textit{after} baroclinic time-steps
-(\autoref{fig:DYN_dynspg_ts}a).
+(\autoref{fig:DYN_spg_ts}a).
 To avoid aliasing of fast barotropic motions into three dimensional equations,
-time filtering is eventually applied on barotropic quantities (\np{ln\_bt\_av}\forcode{ = .true.}).
+time filtering is eventually applied on barotropic quantities (\np[=.true.]{ln_bt_av}{ln\_bt\_av}).
 In that case, the integration is extended slightly beyond \textit{after} time step to
 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
-(\np{ln\_bt\_fw}\forcode{ = .false.}).
-Although more computationaly expensive ( \np{nn\_baro} additional iterations are indeed necessary),
+(\np[=.false.]{ln_bt_fw}{ln\_bt\_fw}).
+Although more computationaly expensive ( \np{nn_baro}{nn\_baro} additional iterations are indeed necessary),
 the baroclinic to barotropic forcing term given at \textit{now} time step become centred in
 the middle of the integration window.
@@ -926,5 +888,4 @@
 %references to Patrick Marsaleix' work here. Also work done by SHOM group.
 
-%%%
 
 As far as tracer conservation is concerned,
@@ -936,25 +897,23 @@
 and time splitting not compatible.
 Advective barotropic velocities are obtained by using a secondary set of filtering weights,
-uniquely defined from the filter coefficients used for the time averaging (\citet{Shchepetkin_McWilliams_OM05}).
+uniquely defined from the filter coefficients used for the time averaging (\citet{shchepetkin.mcwilliams_OM05}).
 Consistency between the time averaged continuity equation and the time stepping of tracers is here the key to
 obtain exact conservation.
 
-%%%
 
 One can eventually choose to feedback instantaneous values by not using any time filter
-(\np{ln\_bt\_av}\forcode{ = .false.}). 
+(\np[=.false.]{ln_bt_av}{ln\_bt\_av}).
 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
 external gravity waves in idealized or weakly non-linear cases.
 Although the damping is lower than for the filtered free surface,
-it is still significant as shown by \citet{Levier2007} in the case of an analytical barotropic Kelvin wave.
-
-%>>>>>===============
-\gmcomment{               %%% copy from griffies Book 
+it is still significant as shown by \citet{levier.treguier.ea_rpt07} in the case of an analytical barotropic Kelvin wave.
+
+\cmtgm{               %%% copy from griffies Book
 
 \textbf{title: Time stepping the barotropic system }
@@ -963,5 +922,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
 
 \[
@@ -986,5 +945,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}
@@ -992,5 +951,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}
@@ -1001,5 +960,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}
@@ -1009,5 +968,5 @@
   \end{split}
 \]
-with 
+with
 \[
   % \label{eq:DYN_spg_ts_etaF}
@@ -1015,5 +974,5 @@
 \]
 the time averaged surface height taken from the previous barotropic cycle.
-Likewise, 
+Likewise,
 \[
   % \label{eq:DYN_spg_ts_u}
@@ -1021,5 +980,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}
@@ -1027,9 +986,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}
@@ -1037,19 +996,19 @@
 \]
 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}.
 We have tried various forms of such filtering,
-with the following method discussed in \cite{Griffies_al_MWR01} chosen due to
+with the following method discussed in \cite{griffies.pacanowski.ea_MWR01} chosen due to
 its stability and reasonably good maintenance of tracer conservation properties (see ??).
 
@@ -1058,5 +1017,5 @@
   \eta^{F}(\tau-\Delta) =  \overline{\eta^{(b)}(\tau)}
 \end{equation}
-Another approach tried was 
+Another approach tried was
 
 \[
@@ -1071,26 +1030,21 @@
 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)
 
-%>>>>>===============
-
-
-%--------------------------------------------------------------------------------------------------------------
-% Filtered free surface formulation
-%--------------------------------------------------------------------------------------------------------------
-\subsection{Filtered free surface (\protect\key{dynspg\_flt})}
+%% =================================================================================================
+\subsection{Filtered free surface (\forcode{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:MB_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 
+\cmtgm{               %%% copy from chap-model basics
   \[
-    % \label{eq:spg_flt}
-    \frac{\partial {\rm {\bf U}}_h }{\partial t}= {\rm {\bf M}}
+    % \label{eq:DYN_spg_flt}
+    \frac{\partial {\mathrm {\mathbf U}}_h }{\partial t}= {\mathrm {\mathbf M}}
     - g \nabla \left( \tilde{\rho} \ \eta \right)
     - g \ T_c \nabla \left( \widetilde{\rho} \ \partial_t \eta \right)
@@ -1098,35 +1052,35 @@
   where $T_c$, is a parameter with dimensions of time which characterizes the force,
   $\widetilde{\rho} = \rho / \rho_o$ is the dimensionless density,
-  and $\rm {\bf M}$ represents the collected contributions of the Coriolis, hydrostatic pressure gradient,
-  non-linear and viscous terms in \autoref{eq:PE_dyn}.
-}   %end gmcomment
-
-Note that in the linear free surface formulation (\key{vvl} not defined),
+  and $\mathrm {\mathbf M}$ represents the collected contributions of the Coriolis, hydrostatic pressure gradient,
+  non-linear and viscous terms in \autoref{eq:MB_dyn}.
+}   %end cmtgm
+
+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. 
-
-% ================================================================
-% Lateral diffusion term
-% ================================================================
-\section{Lateral diffusion term and operators (\protect\mdl{dynldf})}
+It is computed once and for all and applies to all ocean time steps.
+
+%% =================================================================================================
+\section[Lateral diffusion term and operators (\textit{dynldf.F90})]{Lateral diffusion term and operators (\protect\mdl{dynldf})}
 \label{sec:DYN_ldf}
-%------------------------------------------nam_dynldf----------------------------------------------------
-
-\nlst{namdyn_ldf} 
-%-------------------------------------------------------------------------------------------------------------
-
-Options are defined through the \ngn{namdyn\_ldf} namelist variables.
+
+\begin{listing}
+  \nlst{namdyn_ldf}
+  \caption{\forcode{&namdyn_ldf}}
+  \label{lst:namdyn_ldf}
+\end{listing}
+
+Options are defined through the \nam{dyn_ldf}{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}).
+This latter term is solved implicitly together with the vertical diffusion term (see \autoref{chap:TD}).
 
 At the lateral boundaries either free slip,
 no slip or partial slip boundary conditions are applied according to the user's choice (see \autoref{chap:LBC}).
 
-\gmcomment{
+\cmtgm{
   Hyperviscous operators are frequently used in the simulation of turbulent flows to
   control the dissipation of unresolved small scale features.
@@ -1137,46 +1091,42 @@
   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}$.
 }
 
-% ================================================================
-\subsection[Iso-level laplacian (\protect\np{ln\_dynldf\_lap}\forcode{ = .true.})]
-				{Iso-level laplacian operator (\protect\np{ln\_dynldf\_lap}\forcode{ = .true.})}
+%% =================================================================================================
+\subsection[Iso-level laplacian (\forcode{ln_dynldf_lap})]{Iso-level laplacian operator (\protect\np{ln_dynldf_lap}{ln\_dynldf\_lap})}
 \label{subsec:DYN_ldf_lap}
 
-For lateral iso-level diffusion, the discrete operator is: 
-\begin{equation}
-  \label{eq:dynldf_lap}
+For lateral iso-level diffusion, the discrete operator is:
+\begin{equation}
+  \label{eq:DYN_ldf_lap}
   \left\{
     \begin{aligned}
-      D_u^{l{\rm {\bf 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[ 
+      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[
         {A_f^{lm} \;e_{3f} \zeta } \right] \\ \\
-      D_v^{l{\rm {\bf 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[ 
+      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[
         {A_f^{lm} \;e_{3f} \zeta } \right]
     \end{aligned}
   \right.
-\end{equation} 
-
-As explained in \autoref{subsec:PE_ldf},
+\end{equation}
+
+As explained in \autoref{subsec:MB_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. 
-
-%--------------------------------------------------------------------------------------------------------------
-%           Rotated laplacian operator
-%--------------------------------------------------------------------------------------------------------------
-\subsection[Rotated laplacian (\protect\np{ln\_dynldf\_iso}\forcode{ = .true.})]
-				{Rotated laplacian operator (\protect\np{ln\_dynldf\_iso}\forcode{ = .true.})}
+ensures a complete separation between the vorticity and divergence parts of the momentum diffusion.
+
+%% =================================================================================================
+\subsection[Rotated laplacian (\forcode{ln_dynldf_iso})]{Rotated laplacian operator (\protect\np{ln_dynldf_iso}{ln\_dynldf\_iso})}
 \label{subsec:DYN_ldf_iso}
 
 A rotation of the lateral momentum diffusion operator is needed in several cases:
-for iso-neutral diffusion in the $z$-coordinate (\np{ln\_dynldf\_iso}\forcode{ = .true.}) and
-for either iso-neutral (\np{ln\_dynldf\_iso}\forcode{ = .true.}) or
-geopotential (\np{ln\_dynldf\_hor}\forcode{ = .true.}) diffusion in the $s$-coordinate.
+for iso-neutral diffusion in the $z$-coordinate (\np[=.true.]{ln_dynldf_iso}{ln\_dynldf\_iso}) and
+for either iso-neutral (\np[=.true.]{ln_dynldf_iso}{ln\_dynldf\_iso}) or
+geopotential (\np[=.true.]{ln_dynldf_hor}{ln\_dynldf\_hor}) diffusion in the $s$-coordinate.
 In the partial step case, coordinates are horizontal except at the deepest level and
-no rotation is performed when \np{ln\_dynldf\_hor}\forcode{ = .true.}.
+no rotation is performed when \np[=.true.]{ln_dynldf_hor}{ln\_dynldf\_hor}.
 The diffusion operator is defined simply as the divergence of down gradient momentum fluxes on
 each momentum component.
@@ -1184,5 +1134,5 @@
 The resulting discrete representation is:
 \begin{equation}
-  \label{eq:dyn_ldf_iso}
+  \label{eq:DYN_ldf_iso}
   \begin{split}
     D_u^{l\textbf{U}} &= \frac{1}{e_{1u} \, e_{2u} \, e_{3u} }	\\
@@ -1208,59 +1158,48 @@
                 -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}).
 
-%--------------------------------------------------------------------------------------------------------------
-%           Iso-level bilaplacian operator
-%--------------------------------------------------------------------------------------------------------------
-\subsection[Iso-level bilaplacian (\protect\np{ln\_dynldf\_bilap}\forcode{ = .true.})]
-				{Iso-level bilaplacian operator (\protect\np{ln\_dynldf\_bilap}\forcode{ = .true.})}
+%% =================================================================================================
+\subsection[Iso-level bilaplacian (\forcode{ln_dynldf_bilap})]{Iso-level bilaplacian operator (\protect\np{ln_dynldf_bilap}{ln\_dynldf\_bilap})}
 \label{subsec:DYN_ldf_bilap}
 
-The lateral fourth order operator formulation on momentum is obtained by applying \autoref{eq:dynldf_lap} twice.
+The lateral fourth order operator formulation on momentum is obtained by applying \autoref{eq:DYN_ldf_lap} twice.
 It requires an additional assumption on boundary conditions:
 the first derivative term normal to the coast depends on the free or no-slip lateral boundary conditions chosen,
 while the third derivative terms normal to the coast are set to zero (see \autoref{chap:LBC}).
-%%%
-\gmcomment{add a remark on the the change in the position of the coefficient}
-%%%
-
-% ================================================================
-%           Vertical diffusion term
-% ================================================================
-\section{Vertical diffusion term (\protect\mdl{dynzdf})}
+\cmtgm{add a remark on the the change in the position of the coefficient}
+
+%% =================================================================================================
+\section[Vertical diffusion term (\textit{dynzdf.F90})]{Vertical diffusion term (\protect\mdl{dynzdf})}
 \label{sec:DYN_zdf}
-%----------------------------------------------namzdf------------------------------------------------------
-
-\nlst{namzdf} 
-%-------------------------------------------------------------------------------------------------------------
-
-Options are defined through the \ngn{namzdf} namelist variables.
+
+Options are defined through the \nam{zdf}{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:
 $(a)$ a forward time differencing scheme
-(\np{ln\_zdfexp}\forcode{ = .true.}) using a time splitting technique (\np{nn\_zdfexp} $>$ 1) or
-$(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. 
+(\np[=.true.]{ln_zdfexp}{ln\_zdfexp}) using a time splitting technique (\np{nn_zdfexp}{nn\_zdfexp} $>$ 1) or
+$(b)$ a backward (or implicit) time differencing scheme (\np[=.false.]{ln_zdfexp}{ln\_zdfexp})
+(see \autoref{chap:TD}).
+Note that namelist variables \np{ln_zdfexp}{ln\_zdfexp} and \np{nn_zdfexp}{nn\_zdfexp} apply to both tracers and dynamics.
 
 The formulation of the vertical subgrid scale physics is the same whatever the vertical coordinate is.
-The vertical diffusion operators given by \autoref{eq:PE_zdf} take the following semi-discrete space form:
-\[
-  % \label{eq:dynzdf}
+The vertical diffusion operators given by \autoref{eq:MB_zdf} take the following semi-discrete space form:
+\[
+  % \label{eq:DYN_zdf}
   \left\{
     \begin{aligned}
@@ -1280,5 +1219,5 @@
 the vertical turbulent momentum fluxes,
 \begin{equation}
-  \label{eq:dynzdf_sbc}
+  \label{eq:DYN_zdf_sbc}
   \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{z=1}
   = \frac{1}{\rho_o} \binom{\tau_u}{\tau_v }
@@ -1286,5 +1225,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)
@@ -1293,9 +1232,7 @@
 
 The turbulent flux of momentum at the bottom of the ocean is specified through a bottom friction parameterisation
-(see \autoref{sec:ZDF_bfr})
-
-% ================================================================
-% External Forcing
-% ================================================================
+(see \autoref{sec:ZDF_drg})
+
+%% =================================================================================================
 \section{External forcings}
 \label{sec:DYN_forcing}
@@ -1303,38 +1240,40 @@
 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. 
-
-(1) When \np{ln\_apr\_dyn}\forcode{ = .true.} (see \autoref{sec:SBC_apr}),
+three other forcings may enter the dynamical equations by affecting the surface pressure gradient.
+
+(1) When \np[=.true.]{ln_apr_dyn}{ln\_apr\_dyn} (see \autoref{sec:SBC_apr}),
 the atmospheric pressure is taken into account when computing the surface pressure gradient.
 
-(2) When \np{ln\_tide\_pot}\forcode{ = .true.} and \np{ln\_tide}\forcode{ = .true.} (see \autoref{sec:SBC_tide}),
+(2) When \np[=.true.]{ln_tide_pot}{ln\_tide\_pot} and \np[=.true.]{ln_tide}{ln\_tide} (see \autoref{sec:SBC_tide}),
 the tidal potential is taken into account when computing the surface pressure gradient.
 
-(3) When \np{nn\_ice\_embd}\forcode{ = 2} and LIM or CICE is used
-(\ie when the sea-ice is embedded in the ocean),
+(3) When \np[=2]{nn_ice_embd}{nn\_ice\_embd} and LIM or CICE is used
+(\ie\ when the sea-ice is embedded in the ocean),
 the snow-ice mass is taken into account when computing the surface pressure gradient.
 
-
-\gmcomment{ missing : the lateral boundary condition !!!   another external forcing
+\cmtgm{ missing : the lateral boundary condition !!!   another external forcing
  }
 
-% ================================================================
-% Wetting and drying 
-% ================================================================
+%% =================================================================================================
 \section{Wetting and drying }
 \label{sec:DYN_wetdry}
+
 There are two main options for wetting and drying code (wd):
 (a) an iterative limiter (il) and (b) a directional limiter (dl).
-The directional limiter is based on the scheme developed by \cite{WarnerEtal13} for RO
+The directional limiter is based on the scheme developed by \cite{warner.defne.ea_CG13} for RO
 MS
-which was in turn based on ideas developed for POM by \cite{Oey06}. The iterative
+which was in turn based on ideas developed for POM by \cite{oey_OM06}. The iterative
 limiter is a new scheme.  The iterative limiter is activated by setting $\mathrm{ln\_wd\_il} = \mathrm{.true.}$
 and $\mathrm{ln\_wd\_dl} = \mathrm{.false.}$. The directional limiter is activated
 by setting $\mathrm{ln\_wd\_dl} = \mathrm{.true.}$ and $\mathrm{ln\_wd\_il} = \mathrm{.false.}$.
 
-\nlst{namwad}
+\begin{listing}
+  \nlst{namwad}
+  \caption{\forcode{&namwad}}
+  \label{lst:namwad}
+\end{listing}
 
 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
@@ -1344,5 +1283,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
@@ -1363,18 +1302,16 @@
 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.
 The final sub-section covers some additional considerations that are relevant to both schemes.
 
-
-%-----------------------------------------------------------------------------------------
 %   Iterative limiters
-%-----------------------------------------------------------------------------------------
-\subsection   [Directional limiter (\textit{wet\_dry})]
-         {Directional limiter (\mdl{wet\_dry})}
+%% =================================================================================================
+\subsection[Directional limiter (\textit{wet\_dry.F90})]{Directional limiter (\mdl{wet\_dry})}
 \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}{rn\_wdmin1}).
 
 All the changes associated with this option are made to the barotropic solver for the non-linear
@@ -1386,8 +1323,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[=.false.]{ln_wd_dl_ramp}{ln\_wd\_dl\_ramp} then zuwdmask is 1 when the
+flux is from a cell with water depth greater than \np{rn_wdmin1}{rn\_wdmin1} and 0 otherwise. If the user sets
+\np[=.true.]{ln_wd_dl_ramp}{ln\_wd\_dl\_ramp} the flux across the face is ramped down as the water depth decreases
+from 2 * \np{rn_wdmin1}{rn\_wdmin1} to \np{rn_wdmin1}{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
@@ -1399,24 +1336,21 @@
 treatment in the calculation of the flux of mass across the cell face.
 
-
-\cite{WarnerEtal13} state that in their scheme the velocity masks at the cell faces for the baroclinic
+\cite{warner.defne.ea_CG13} state that in their scheme the velocity masks at the cell faces for the baroclinic
 timesteps are set to 0 or 1 depending on whether the average of the masks over the barotropic sub-steps is respectively less than
 or greater than 0.5. That scheme does not conserve tracers in integrations started from constant tracer
 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[=.true.]{ln_wd_dl_bc}{ln\_wd\_dl\_bc}, the
+baroclinic velocities are also multiplied by a suitably weighted average of zuwdmask.
+
 %   Iterative limiters
-%-----------------------------------------------------------------------------------------
-
-\subsection   [Iterative limiter (\textit{wet\_dry})]
-         {Iterative limiter (\mdl{wet\_dry})}
+
+%% =================================================================================================
+\subsection[Iterative limiter (\textit{wet\_dry.F90})]{Iterative limiter (\mdl{wet\_dry})}
 \label{subsec:DYN_wd_iterative_limiter}
 
-\subsubsection [Iterative flux limiter (\textit{wet\_dry})]
-         {Iterative flux limiter (\mdl{wet\_dry})}
-\label{subsubsec:DYN_wd_il_spg_limiter}
+%% =================================================================================================
+\subsubsection[Iterative flux limiter (\textit{wet\_dry.F90})]{Iterative flux limiter (\mdl{wet\_dry})}
+\label{subsec:DYN_wd_il_spg_limiter}
 
 The iterative limiter modifies the fluxes across the faces of cells that are either already ``dry''
@@ -1426,13 +1360,15 @@
 
 The continuity equation for the total water depth in a column
-\begin{equation} \label{dyn_wd_continuity}
- \frac{\partial h}{\partial t} + \mathbf{\nabla.}(h\mathbf{u}) = 0 .
+\begin{equation}
+  \label{eq:DYN_wd_continuity}
+  \frac{\partial h}{\partial t} + \mathbf{\nabla.}(h\mathbf{u}) = 0 .
 \end{equation}
 can be written in discrete form  as
 
-\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) ) 
-&= - ( \mathrm{flxu}_{i+1,j} - \mathrm{flxu}_{i,j}  + \mathrm{flxv}_{i,j+1} - \mathrm{flxv}_{i,j} ) \\
-&= \mathrm{zzflx}_{i,j} .
+\begin{align}
+  \label{eq:DYN_wd_continuity_2}
+  \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} .
 \end{align}
 
@@ -1447,6 +1383,7 @@
 (zzflxp) and fluxes that are into the cell (zzflxn).  Clearly
 
-\begin{equation} \label{dyn_wd_zzflx_p_n_1}
-\mathrm{zzflx}_{i,j} = \mathrm{zzflxp}_{i,j} + \mathrm{zzflxn}_{i,j} .  
+\begin{equation}
+  \label{eq:DYN_wd_zzflx_p_n_1}
+  \mathrm{zzflx}_{i,j} = \mathrm{zzflxp}_{i,j} + \mathrm{zzflxn}_{i,j} .
 \end{equation}
 
@@ -1459,9 +1396,10 @@
 $\mathrm{zcoef}_{i,j}^{(m)}$ such that:
 
-\begin{equation} \label{dyn_wd_continuity_coef}
-\begin{split}
-\mathrm{zzflxp}^{(m)}_{i,j} =& \mathrm{zcoef}_{i,j}^{(m)} \mathrm{zzflxp}^{(0)}_{i,j} \\
-\mathrm{zzflxn}^{(m)}_{i,j} =& \mathrm{zcoef}_{i,j}^{(m)} \mathrm{zzflxn}^{(0)}_{i,j}
-\end{split}
+\begin{equation}
+  \label{eq:DYN_wd_continuity_coef}
+  \begin{split}
+    \mathrm{zzflxp}^{(m)}_{i,j} =& \mathrm{zcoef}_{i,j}^{(m)} \mathrm{zzflxp}^{(0)}_{i,j} \\
+    \mathrm{zzflxn}^{(m)}_{i,j} =& \mathrm{zcoef}_{i,j}^{(m)} \mathrm{zzflxn}^{(0)}_{i,j}
+  \end{split}
 \end{equation}
 
@@ -1471,37 +1409,41 @@
 The iteration is initialised by setting
 
-\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} . 
+\begin{equation}
+  \label{eq:DYN_wd_zzflx_initial}
+  \mathrm{zzflxp^{(0)}}_{i,j} = \mathrm{zzflxp}_{i,j} , \quad  \mathrm{zzflxn^{(0)}}_{i,j} = \mathrm{zzflxn}_{i,j} .
 \end{equation}
 
 The fluxes out of cell $(i,j)$ are updated at the $m+1$th iteration if the depth of the
 cell on timestep $t_e$, namely $h_{i,j}(t_e)$, is less than the total flux out of the cell
-times the timestep divided by the cell area. Using (\ref{dyn_wd_continuity_2}) this
+times the timestep divided by the cell area. Using (\autoref{eq:DYN_wd_continuity_2}) this
 condition is
 
-\begin{equation} \label{dyn_wd_continuity_if}
-h_{i,j}(t_e)  - \mathrm{rn\_wdmin1} <  \frac{\Delta t}{e_1 e_2} ( \mathrm{zzflxp}^{(m)}_{i,j} + \mathrm{zzflxn}^{(m)}_{i,j} ) .
-\end{equation}
-
-Rearranging (\ref{dyn_wd_continuity_if}) we can obtain an expression for the maximum
+\begin{equation}
+  \label{eq:DYN_wd_continuity_if}
+  h_{i,j}(t_e)  - \mathrm{rn\_wdmin1} <  \frac{\Delta t}{e_1 e_2} ( \mathrm{zzflxp}^{(m)}_{i,j} + \mathrm{zzflxn}^{(m)}_{i,j} ) .
+\end{equation}
+
+Rearranging (\autoref{eq:DYN_wd_continuity_if}) we can obtain an expression for the maximum
 outward flux that can be allowed and still maintain the minimum wet depth:
 
-\begin{equation} \label{dyn_wd_max_flux}
-\begin{split}
-\mathrm{zzflxp}^{(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]
-\end{split}
-\end{equation}
-
-Note a small tolerance ($\mathrm{rn\_wdmin2}$) has been introduced here {\it [Q: Why is
-this necessary/desirable?]}. Substituting from (\ref{dyn_wd_continuity_coef}) gives an
+\begin{equation}
+  \label{eq:DYN_wd_max_flux}
+  \begin{split}
+    \mathrm{zzflxp}^{(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]
+  \end{split}
+\end{equation}
+
+Note a small tolerance ($\mathrm{rn\_wdmin2}$) has been introduced here {\itshape [Q: Why is
+this necessary/desirable?]}. Substituting from (\autoref{eq:DYN_wd_continuity_coef}) gives an
 expression for the coefficient needed to multiply the outward flux at this cell in order
 to avoid drying.
 
-\begin{equation} \label{dyn_wd_continuity_nxtcoef}
-\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} } 
-\end{split}
+\begin{equation}
+  \label{eq:DYN_wd_continuity_nxtcoef}
+  \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} }
+  \end{split}
 \end{equation}
 
@@ -1518,11 +1460,8 @@
 directional limiter does.
 
-
-%----------------------------------------------------------------------------------------
 %      Surface pressure gradients
-%----------------------------------------------------------------------------------------
-\subsubsection   [Modification of surface pressure gradients (\textit{dynhpg})]
-         {Modification of surface pressure gradients (\mdl{dynhpg})}
-\label{subsubsec:DYN_wd_il_spg}
+%% =================================================================================================
+\subsubsection[Modification of surface pressure gradients (\textit{dynhpg.F90})]{Modification of surface pressure gradients (\mdl{dynhpg})}
+\label{subsec:DYN_wd_il_spg}
 
 At ``dry'' points the water depth is usually close to $\mathrm{rn\_wdmin1}$. If the
@@ -1537,14 +1476,15 @@
 neighbouring $(i+1,j)$ and $(i,j)$ tracer points.  zcpx is calculated using two logicals
 variables, $\mathrm{ll\_tmp1}$ and $\mathrm{ll\_tmp2}$ which are evaluated for each grid
-column.  The three possible combinations are illustrated in figure \ref{Fig_WAD_dynhpg}.
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!ht] \begin{center}
-\includegraphics[width=0.8\textwidth]{Fig_WAD_dynhpg}
-\caption{ \label{Fig_WAD_dynhpg}
-Illustrations of the three possible combinations of the logical variables controlling the
-limiting of the horizontal pressure gradient in wetting and drying regimes}
-\end{center}\end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+column.  The three possible combinations are illustrated in \autoref{fig:DYN_WAD_dynhpg}.
+
+\begin{figure}[!ht]
+  \centering
+  \includegraphics[width=0.66\textwidth]{DYN_WAD_dynhpg}
+  \caption[Combinations controlling the limiting of the horizontal pressure gradient in
+  wetting and drying regimes]{
+    Three possible combinations of the logical variables controlling the
+    limiting of the horizontal pressure gradient in wetting and drying regimes}
+  \label{fig:DYN_WAD_dynhpg}
+\end{figure}
 
 The first logical, $\mathrm{ll\_tmp1}$, is set to true if and only if the water depth at
@@ -1553,12 +1493,13 @@
 of the topography at the two points:
 
-\begin{equation} \label{dyn_ll_tmp1}
-\begin{split}
-\mathrm{ll\_tmp1}  = & \mathrm{MIN(sshn(ji,jj), sshn(ji+1,jj))} > \\
+\begin{equation}
+  \label{eq:DYN_ll_tmp1}
+  \begin{split}
+    \mathrm{ll\_tmp1}  = & \mathrm{MIN(sshn(ji,jj), sshn(ji+1,jj))} > \\
                      & \quad \mathrm{MAX(-ht\_wd(ji,jj), -ht\_wd(ji+1,jj))\  .and.} \\
-& \mathrm{MAX(sshn(ji,jj) + ht\_wd(ji,jj),} \\
-& \mathrm{\phantom{MAX(}sshn(ji+1,jj) + ht\_wd(ji+1,jj))} >\\
-& \quad\quad\mathrm{rn\_wdmin1 + rn\_wdmin2 }
-\end{split}
+                     & \mathrm{MAX(sshn(ji,jj) + ht\_wd(ji,jj),} \\
+                     & \mathrm{\phantom{MAX(}sshn(ji+1,jj) + ht\_wd(ji+1,jj))} >\\
+                     & \quad\quad\mathrm{rn\_wdmin1 + rn\_wdmin2 }
+  \end{split}
 \end{equation}
 
@@ -1567,10 +1508,11 @@
 at the two points plus $\mathrm{rn\_wdmin1} + \mathrm{rn\_wdmin2}$
 
-\begin{equation} \label{dyn_ll_tmp2}
-\begin{split}
-\mathrm{ ll\_tmp2 } = & \mathrm{( ABS( sshn(ji,jj) - sshn(ji+1,jj) ) > 1.E-12 )\ .AND.}\\
-& \mathrm{( MAX(sshn(ji,jj), sshn(ji+1,jj)) > } \\
-& \mathrm{\phantom{(} MAX(-ht\_wd(ji,jj), -ht\_wd(ji+1,jj)) + rn\_wdmin1 + rn\_wdmin2}) .
-\end{split}
+\begin{equation}
+  \label{eq:DYN_ll_tmp2}
+  \begin{split}
+    \mathrm{ ll\_tmp2 } = & \mathrm{( ABS( sshn(ji,jj) - sshn(ji+1,jj) ) > 1.E-12 )\ .AND.}\\
+    & \mathrm{( MAX(sshn(ji,jj), sshn(ji+1,jj)) > } \\
+    & \mathrm{\phantom{(} MAX(-ht\_wd(ji,jj), -ht\_wd(ji+1,jj)) + rn\_wdmin1 + rn\_wdmin2}) .
+  \end{split}
 \end{equation}
 
@@ -1588,7 +1530,7 @@
 conditions.
 
-\subsubsection   [Additional considerations (\textit{usrdef\_zgr})]
-         {Additional considerations (\mdl{usrdef\_zgr})}
-\label{subsubsec:WAD_additional}
+%% =================================================================================================
+\subsubsection[Additional considerations (\textit{usrdef\_zgr.F90})]{Additional considerations (\mdl{usrdef\_zgr})}
+\label{subsec:DYN_WAD_additional}
 
 In the very shallow water where wetting and drying occurs the parametrisation of
@@ -1600,38 +1542,27 @@
 in uncoupled integrations the net surface heat fluxes need to be appropriately limited.
 
-%----------------------------------------------------------------------------------------
 %      The WAD test cases
-%----------------------------------------------------------------------------------------
-\subsection   [The WAD test cases (\textit{usrdef\_zgr})]
-         {The WAD test cases (\mdl{usrdef\_zgr})}
-\label{WAD_test_cases}
+%% =================================================================================================
+\subsection[The WAD test cases (\textit{usrdef\_zgr.F90})]{The WAD test cases (\mdl{usrdef\_zgr})}
+\label{subsec:DYN_WAD_test_cases}
 
 See the WAD tests MY\_DOC documention for details of the WAD test cases.
 
-
-
-% ================================================================
-% Time evolution term 
-% ================================================================
-\section{Time evolution term (\protect\mdl{dynnxt})}
+%% =================================================================================================
+\section[Time evolution term (\textit{dynnxt.F90})]{Time evolution term (\protect\mdl{dynnxt})}
 \label{sec:DYN_nxt}
 
-%----------------------------------------------namdom----------------------------------------------------
-
-\nlst{namdom} 
-%-------------------------------------------------------------------------------------------------------------
-
-Options are defined through the \ngn{namdom} namelist variables.
+Options are defined through the \nam{dom}{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:TD}).
 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:SCOORD_momentum})
 
 $\bullet$ vector invariant form or linear free surface
-(\np{ln\_dynhpg\_vec}\forcode{ = .true.} ; \key{vvl} not defined):
-\[
-  % \label{eq:dynnxt_vec}
+(\np[=.true.]{ln_dynhpg_vec}{ln\_dynhpg\_vec} ; \texttt{vvl?} not defined):
+\[
+  % \label{eq:DYN_nxt_vec}
   \left\{
     \begin{aligned}
@@ -1643,7 +1574,7 @@
 
 $\bullet$ flux form and nonlinear free surface
-(\np{ln\_dynhpg\_vec}\forcode{ = .false.} ; \key{vvl} defined):
-\[
-  % \label{eq:dynnxt_flux}
+(\np[=.false.]{ln_dynhpg_vec}{ln\_dynhpg\_vec} ; \texttt{vvl?} defined):
+\[
+  % \label{eq:DYN_nxt_flux}
   \left\{
     \begin{aligned}
@@ -1656,6 +1587,6 @@
 where RHS is the right hand side of the momentum equation,
 the subscript $f$ denotes filtered values and $\gamma$ is the Asselin coefficient.
-$\gamma$ is initialized as \np{nn\_atfp} (namelist parameter).
-Its default value is \np{nn\_atfp}\forcode{ = 10.e-3}.
+$\gamma$ is initialized as \np{nn_atfp}{nn\_atfp} (namelist parameter).
+Its default value is \np[=10.e-3]{nn_atfp}{nn\_atfp}.
 In both cases, the modified Asselin filter is not applied since perfect conservation is not an issue for
 the momentum equations.
@@ -1665,8 +1596,5 @@
 and only array swapping and Asselin filtering is done in \mdl{dynnxt}.
 
-% ================================================================
-\biblio
-
-\pindex
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_LBC.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_LBC.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_LBC.tex	(revision 11831)
@@ -2,31 +2,55 @@
 
 \begin{document}
-% ================================================================
-% Chapter — Lateral Boundary Condition (LBC) 
-% ================================================================
+
 \chapter{Lateral Boundary Condition (LBC)}
 \label{chap:LBC}
 
-\minitoc
-
-\newpage
-
-%gm% add here introduction to this chapter
-
-% ================================================================
-% Boundary Condition at the Coast
-% ================================================================
-\section{Boundary condition at the coast (\protect\np{rn\_shlat})}
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
+
+\cmtgm{Add here introduction to this chapter}
+
+%% =================================================================================================
+\section[Boundary condition at the coast (\forcode{rn_shlat})]{Boundary condition at the coast (\protect\np{rn_shlat}{rn\_shlat})}
 \label{sec:LBC_coast}
-%--------------------------------------------nam_lbc-------------------------------------------------------
-
-\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.
+
+\begin{listing}
+  \nlst{namlbc}
+  \caption{\forcode{&namlbc}}
+  \label{lst:namlbc}
+\end{listing}
+
+%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}{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.
@@ -40,10 +64,10 @@
 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,
 
 \[
-  % \label{eq:lbc_aaaa}
+  % \label{eq:LBC_aaaa}
   \frac{A^{lT} }{e_1 }\frac{\partial T}{\partial i}\equiv \frac{A_u^{lT}
   }{e_{1u} } \; \delta_{i+1 / 2} \left[ T \right]\;\;mask_u
@@ -51,18 +75,14 @@
 (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}).
+
 \begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=0.90\textwidth]{Fig_LBC_uv}
-    \caption{
-      \protect\label{fig:LBC_uv}
-      Lateral boundary (thick line) at T-level.
-      The velocity normal to the boundary is set to zero.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{LBC_uv}
+  \caption[Lateral boundary at $T$-level]{
+    Lateral boundary (thick line) at T-level.
+    The velocity normal to the boundary is set to zero.}
+  \label{fig:LBC_uv}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
 For momentum the situation is a bit more complex as two boundary conditions must be provided along the coast
@@ -78,34 +98,30 @@
 and is required in order to compute the vorticity at the coast.
 Four different types of lateral boundary condition are available,
-controlled by the value of the \np{rn\_shlat} namelist parameter
+controlled by the value of the \np{rn_shlat}{rn\_shlat} namelist parameter
 (The value of the mask$_{f}$ array along the coastline is set equal to this parameter).
 These are:
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!p]
-  \begin{center}
-    \includegraphics[width=0.90\textwidth]{Fig_LBC_shlat}
-    \caption{
-      \protect\label{fig:LBC_shlat}
-      lateral boundary condition
-      (a) free-slip ($rn\_shlat=0$);
-      (b) no-slip ($rn\_shlat=2$);
-      (c) "partial" free-slip ($0<rn\_shlat<2$) and
-      (d) "strong" no-slip ($2<rn\_shlat$).
-      Implied "ghost" velocity inside land area is display in grey.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{LBC_shlat}
+  \caption[Lateral boundary conditions]{
+    Lateral boundary conditions
+    (a) free-slip                       (\protect\np[=0]{rn_shlat}{rn\_shlat});
+    (b) no-slip                         (\protect\np[=2]{rn_shlat}{rn\_shlat});
+    (c) "partial" free-slip (\forcode{0<}\protect\np[<2]{rn_shlat}{rn\_shlat}) and
+    (d) "strong" no-slip    (\forcode{2<}\protect\np{rn_shlat}{rn\_shlat}).
+    Implied "ghost" velocity inside land area is display in grey.}
+  \label{fig:LBC_shlat}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
 \begin{description}
 
-\item[free-slip boundary condition (\np{rn\_shlat}\forcode{ = 0}):] the tangential velocity at
+\item [free-slip boundary condition ({\np[=0]{rn_shlat}{rn\_shlat}})] 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).
 
-\item[no-slip boundary condition (\np{rn\_shlat}\forcode{ = 2}):] the tangential velocity vanishes at the coastline.
+\item [no-slip boundary condition ({\np[=2]{rn_shlat}{rn\_shlat}})] the tangential velocity vanishes at the coastline.
   Assuming that the tangential velocity decreases linearly from
   the closest ocean velocity grid point to the coastline,
@@ -113,5 +129,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:
 
   \[
@@ -122,5 +138,5 @@
   the no-slip boundary condition, simply by multiplying it by the mask$_{f}$ :
   \[
-    % \label{eq:lbc_bbbb}
+    % \label{eq:LBC_bbbb}
     \zeta \equiv \frac{1}{e_{1f} {\kern 1pt}e_{2f} }\left( {\delta_{i+1/2}
         \left[ {e_{2v} \,v} \right]-\delta_{j+1/2} \left[ {e_{1u} \,u} \right]}
@@ -128,10 +144,10 @@
   \]
 
-\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
+\item ["partial" free-slip boundary condition (0$<$\np{rn_shlat}{rn\_shlat}$<$2)] the tangential velocity at
+  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$.
 
-\item["strong" no-slip boundary condition (2$<$\np{rn\_shlat}):] the viscous boundary layer is assumed to
+\item ["strong" no-slip boundary condition (2$<$\np{rn_shlat}{rn\_shlat})] the viscous boundary layer is assumed to
   be smaller than half the grid size (\autoref{fig:LBC_shlat}-d).
   The friction is thus larger than in the no-slip case.
@@ -139,13 +155,10 @@
 \end{description}
 
-Note that when the bottom topography is entirely represented by the $s$-coor-dinates (pure $s$-coordinate),
+Note that when the bottom topography is entirely represented by the $s$-coordinates (pure $s$-coordinate),
 the lateral boundary condition on tangential velocity is of much less importance as
 it is only applied next to the coast where the minimum water depth can be quite shallow.
 
-
-% ================================================================
-% Boundary Condition around the Model Domain
-% ================================================================
-\section{Model domain boundary condition (\protect\np{jperio})}
+%% =================================================================================================
+\section[Model domain boundary condition (\forcode{jperio})]{Model domain boundary condition (\protect\jp{jperio})}
 \label{sec:LBC_jperio}
 
@@ -153,101 +166,81 @@
 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. 
-
-% -------------------------------------------------------------------------------------------------------------
-%        Closed, cyclic (\np{jperio}\forcode{ = 0..2}) 
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Closed, cyclic (\protect\np{jperio}\forcode{= [0127]})}
+The north-fold boundary condition is associated with the 3-pole ORCA mesh.
+
+%% =================================================================================================
+\subsection[Closed, cyclic (\forcode{=0,1,2,7})]{Closed, cyclic (\protect\jp{jperio}\forcode{=0,1,2,7})}
 \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}{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})],
-  solid walls are imposed at all model boundaries:
+\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})],
-  first and last rows are set to zero (closed) whilst the first column is set to
+\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
   (\autoref{fig:LBC_jperio}-a).
   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})],
-  first and last columns are set to zero (closed) whilst the first row is set to
+\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
   (\autoref{fig:LBC_jperio}-a).
   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}
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=1.0\textwidth]{Fig_LBC_jperio}
-    \caption{
-      \protect\label{fig:LBC_jperio}
-      setting of (a) east-west cyclic  (b) symmetric across the equator boundary conditions.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{LBC_jperio}
+  \caption[Setting of east-west cyclic and symmetric across the Equator boundary conditions]{
+    Setting of (a) east-west cyclic (b) symmetric across the Equator boundary conditions}
+  \label{fig:LBC_jperio}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-% -------------------------------------------------------------------------------------------------------------
-%        North fold (\textit{jperio = 3 }to $6)$ 
-% -------------------------------------------------------------------------------------------------------------
-\subsection{North-fold (\protect\np{jperio}\forcode{ = 3..6})}
+
+%% =================================================================================================
+\subsection[North-fold (\forcode{=3,6})]{North-fold (\protect\jp{jperio}\forcode{=3,6})}
 \label{subsec:LBC_north_fold}
 
 The north fold boundary condition has been introduced in order to handle the north boundary of
 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}. 
+Such a grid has two poles in the northern hemisphere (\autoref{fig:CFGS_ORCA_msh},
+and thus requires a specific treatment illustrated in \autoref{fig:LBC_North_Fold_T}.
 Further information can be found in \mdl{lbcnfd} module which applies the north fold boundary condition.
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=0.90\textwidth]{Fig_North_Fold_T}
-    \caption{
-      \protect\label{fig:North_Fold_T}
-      North fold boundary with a $T$-point pivot and cyclic east-west boundary condition ($jperio=4$),
-      as used in ORCA 2, 1/4, and 1/12.
-      Pink shaded area corresponds to the inner domain mask (see text).
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{LBC_North_Fold_T}
+  \caption[North fold boundary in ORCA 2\deg, 1/4\deg and 1/12\deg]{
+    North fold boundary with a $T$-point pivot and cyclic east-west boundary condition ($jperio=4$),
+    as used in ORCA 2\deg, 1/4\deg and 1/12\deg.
+    Pink shaded area corresponds to the inner domain mask (see text).}
+  \label{fig:LBC_North_Fold_T}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-% ====================================================================
-% Exchange with neighbouring processors 
-% ====================================================================
-\section{Exchange with neighbouring processors (\protect\mdl{lbclnk}, \protect\mdl{lib\_mpp})}
+
+%% =================================================================================================
+\section[Exchange with neighbouring processors (\textit{lbclnk.F90}, \textit{lib\_mpp.F90})]{Exchange with neighbouring processors (\protect\mdl{lbclnk}, \protect\mdl{lib\_mpp})}
 \label{sec:LBC_mpp}
 
+\begin{listing}
+  \nlst{nammpp}
+  \caption{\forcode{&nammpp}}
+  \label{lst:nammpp}
+\end{listing}
+
 For massively parallel processing (mpp), a domain decomposition method is used.
-The basic idea of the method is to split the large computation domain of a numerical experiment into
-several smaller domains and solve the set of equations by addressing independent local problems.
+The basic idea of the method is to split the large computation domain of a numerical experiment into several smaller domains and
+solve the set of equations by addressing independent local problems.
 Each processor has its own local memory and computes the model equation over a subdomain of the whole model domain.
-The subdomain boundary conditions are specified through communications between processors which
-are organized by explicit statements (message passing method).
-
-A big advantage is that the method does not need many modifications of the initial \fortran code.
-From the modeller's point of view, each sub domain running on a processor is identical to the "mono-domain" code.
-In addition, the programmer manages the communications between subdomains,
-and the code is faster when the number of processors is increased.
-The porting of OPA code on an iPSC860 was achieved during Guyon's PhD [Guyon et al. 1994, 1995]
-in collaboration with CETIIS and ONERA.
-The implementation in the operational context and the studies of performance on
-a T3D and T3E Cray computers have been made in collaboration with IDRIS and CNRS.
+The subdomain boundary conditions are specified through communications between processors which are organized by
+explicit statements (message passing method).
 The present implementation is largely inspired by Guyon's work [Guyon 1995].
 
@@ -256,7 +249,5 @@
 depend at the very most on one neighbouring point.
 The only non-local computations concern the vertical physics
-(implicit diffusion, turbulent closure scheme, ...) (delocalization over the whole water column),
-and the solving of the elliptic equation associated with the surface pressure gradient computation
-(delocalization over the whole horizontal domain).
+(implicit diffusion, turbulent closure scheme, ...).
 Therefore, a pencil strategy is used for the data sub-structuration:
 the 3D initial domain is laid out on local processor memories following a 2D horizontal topological splitting.
@@ -267,201 +258,169 @@
 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 communication is done through the Message Passing Interface (MPI).
+the interior overlapping area to its neighbouring sub-domain (\ie\ the innermost of the two overlapping rows).
+Communications are first done according to the east-west direction and next according to the north-south direction.
+There is no specific communications for the corners.
+The communication is done through the Message Passing Interface (MPI) and requires \key{mpp\_mpi}.
+Use also \key{mpi2} if MPI3 is not available on your computer.
 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).
-It has to be pointed out that when using the MPP version of the model,
-the east-west cyclic boundary condition is done implicitly,
-whilst the south-symmetric boundary condition option is not available.
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+routines found in \mdl{lib\_mpp} module.
+The output file \textit{communication\_report.txt} provides the list of which routines do how
+many communications during 1 time step of the model.\\
+
 \begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=0.90\textwidth]{Fig_mpp}
-    \caption{
-      \protect\label{fig:mpp}
-      Positioning of a sub-domain when massively parallel processing is used.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{LBC_mpp}
+  \caption{Positioning of a sub-domain when massively parallel processing is used}
+  \label{fig:LBC_mpp}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-In the standard version of \NEMO, the splitting is regular and arithmetic.
-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).
-Each processor is independent and without message passing or synchronous process,
-programs run alone and access just its own local memory.
-For this reason, the main model dimensions are now the local dimensions of the subdomain (pencil) that
-are named \jp{jpi}, \jp{jpj}, \jp{jpk}.
+
+In \NEMO, the splitting is regular and arithmetic.
+The total number of subdomains corresponds to the number of MPI processes allocated to \NEMO\ when the model is launched
+(\ie\ mpirun -np x ./nemo will automatically give x subdomains).
+The i-axis is divided by \np{jpni}{jpni} and the j-axis by \np{jpnj}{jpnj}.
+These parameters are defined in \nam{mpp}{mpp} namelist.
+If \np{jpni}{jpni} and \np{jpnj}{jpnj} are < 1, they will be automatically redefined in the code to give the best domain decomposition
+(see bellow).
+
+Each processor is independent and without message passing or synchronous process, programs run alone and access just its own local memory.
+For this reason,
+the main model dimensions are now the local dimensions of the subdomain (pencil) that are named \jp{jpi}, \jp{jpj}, \jp{jpk}.
 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 number of rows to exchange (known as the halo) is usually set to one (nn\_hls=1, in \mdl{par\_oce},
+and must be kept to one until further notice).
+The whole domain dimensions are named \jp{jpiglo}, \jp{jpjglo} and \jp{jpk}.
 The relationship between the whole domain and a sub-domain is:
+\begin{gather*}
+  jpi = ( jpiglo-2\times nn\_hls + (jpni-1) ) / jpni + 2\times nn\_hls \\
+  jpj = ( jpjglo-2\times nn\_hls + (jpnj-1) ) / jpnj + 2\times nn\_hls
+\end{gather*}
+
+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 (\autoref{fig:LBC_mpp}). Note that since the version 4, there is no more extra-halo area as defined in \autoref{fig:LBC_mpp} so \jp{jpi} is now always equal to nlci and \jp{jpj} equal to nlcj.
+
+An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$,
+a global array (whole domain) by the relationship:
 \[
-  jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci
-  jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj
-\]
-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. 
-An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$,
-a global array (whole domain) by the relationship: 
-\[
-  % \label{eq:lbc_nimpp}
+  % \label{eq:LBC_nimpp}
   T_{g} (i+nimpp-1,j+njmpp-1,k) = T_{l} (i,j,k),
 \]
-with  $1 \leq i \leq jpi$, $1  \leq j \leq jpj $ , and  $1  \leq k \leq jpk$.
-
-Processors are numbered from 0 to $jpnij-1$, the number is saved in the variable nproc.
-In the standard version, a processor has no more than
-four neighbouring processors named nono (for north), noea (east), noso (south) and nowe (west) and
-two variables, nbondi and nbondj, indicate the relative position of the processor:
-\begin{itemize}
-\item 		nbondi = -1 	an east neighbour, no west processor,
-\item 		nbondi =  0	an east neighbour, a west neighbour,
-\item 		nbondi =  1 	no east processor, a west neighbour,
-\item 		nbondi =  2 	no splitting following the i-axis.
-\end{itemize}
-During the simulation, processors exchange data with their neighbours.
-If there is effectively a neighbour, the processor receives variables from this processor on its overlapping row,
-and sends the data issued from internal domain corresponding to the overlapping row of the other processor.
-
-
-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. 
-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.
-For this reason, a pre-processing tool can be used to choose the mpp domain decomposition with a maximum number of
-only land points processors, which can then be eliminated (\autoref{fig:mppini2})
-(For example, the mpp\_optimiz tools, available from the DRAKKAR web site).
-This optimisation is dependent on the specific bathymetry employed.
-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,
-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 
-routine should be suppressed from the code.}
-
-When land processors are eliminated,
-the value corresponding to these locations in the model output files is undefined.
-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}).
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+with $1 \leq i \leq jpi$, $1  \leq j \leq jpj $ , and  $1  \leq k \leq jpk$.
+
+The 1-d arrays $mig(1:\jp{jpi})$ and $mjg(1:\jp{jpj})$, defined in \rou{dom\_glo} routine (\mdl{domain} module), should be used to get global domain indices from local domain indices. The 1-d arrays, $mi0(1:\jp{jpiglo})$, $mi1(1:\jp{jpiglo})$ and $mj0(1:\jp{jpjglo})$, $mj1(1:\jp{jpjglo})$ have the reverse purpose and should be used to define loop indices expressed in global domain indices (see examples in \mdl{dtastd} module).\\
+
+The \NEMO\ model computes equation terms with the help of mask arrays (0 on land points and 1 on sea points). It is therefore possible that an MPI subdomain contains only land points. To save ressources, we try to supress from the computational domain as much land subdomains as possible. For example if $N_{mpi}$ processes are allocated to NEMO, the domain decomposition will be given by the following equation:
+\[
+  N_{mpi} = jpni \times jpnj - N_{land} + N_{useless}
+\]
+$N_{land}$ is the total number of land subdomains in the domain decomposition defined by \np{jpni}{jpni} and \np{jpnj}{jpnj}. $N_{useless}$ is the number of land subdomains that are kept in the compuational domain in order to make sure that $N_{mpi}$ MPI processes are indeed allocated to a given subdomain. The values of $N_{mpi}$, \np{jpni}{jpni}, \np{jpnj}{jpnj},  $N_{land}$ and $N_{useless}$ are printed in the output file \texttt{ocean.output}. $N_{useless}$ must, of course, be as small as possible to limit the waste of ressources. A warning is issued in  \texttt{ocean.output} if $N_{useless}$ is not zero. Note that non-zero value of $N_{useless}$ is uselly required when using AGRIF as, up to now, the parent grid and each of the child grids must use all the $N_{mpi}$ processes.
+
+If the domain decomposition is automatically defined (when \np{jpni}{jpni} and \np{jpnj}{jpnj} are < 1), the decomposition chosen by the model will minimise the sub-domain size (defined as $max_{all domains}(jpi \times jpj)$) and maximize the number of eliminated land subdomains. This means that no other domain decomposition (a set of \np{jpni}{jpni} and \np{jpnj}{jpnj} values) will use less processes than $(jpni  \times  jpnj - N_{land})$ and get a smaller subdomain size.
+In order to specify $N_{mpi}$ properly (minimize $N_{useless}$), you must run the model once with \np{ln_list}{ln\_list} activated. In this case, the model will start the initialisation phase, print the list of optimum decompositions ($N_{mpi}$, \np{jpni}{jpni} and \np{jpnj}{jpnj}) in \texttt{ocean.output} and directly abort. The maximum value of $N_{mpi}$ tested in this list is given by $max(N_{MPI\_tasks}, jpni \times jpnj)$. For example, run the model on 40 nodes with ln\_list activated and $jpni = 10000$ and $jpnj = 1$, will print the list of optimum domains decomposition from 1 to about 10000.
+
+Processors are numbered from 0 to $N_{mpi} - 1$. Subdomains containning some ocean points are numbered first from 0 to $jpni * jpnj - N_{land} -1$. The remaining $N_{useless}$ land subdomains are numbered next, which means that, for a given (\np{jpni}{jpni}, \np{jpnj}{jpnj}), the numbers attributed to he ocean subdomains do not vary with $N_{useless}$.
+
+When land processors are eliminated, the value corresponding to these locations in the model output files is undefined. \np{ln_mskland}{ln\_mskland} must be activated in order avoid Not a Number values in output files. Note that it is better to not eliminate land processors when creating a meshmask file (\ie\ when setting a non-zero value to \np{nn_msh}{nn\_msh}).
+
 \begin{figure}[!ht]
-  \begin{center}
-    \includegraphics[width=0.90\textwidth]{Fig_mppini2}
-    \caption {
-      \protect\label{fig:mppini2}
-      Example of Atlantic domain defined for the CLIPPER projet.
-      Initial grid is composed of 773 x 1236 horizontal points.
-      (a) the domain is split onto 9 \time 20 subdomains (jpni=9, jpnj=20).
-      52 subdomains are land areas.
-      (b) 52 subdomains are eliminated (white rectangles) and
-      the resulting number of processors really used during the computation is jpnij=128.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{LBC_mppini2}
+  \caption[Atlantic domain defined for the CLIPPER projet]{
+    Example of Atlantic domain defined for the CLIPPER projet.
+    Initial grid is composed of 773 x 1236 horizontal points.
+    (a) the domain is split onto 9 $times$ 20 subdomains (jpni=9, jpnj=20).
+    52 subdomains are land areas.
+    (b) 52 subdomains are eliminated (white rectangles) and
+    the resulting number of processors really used during the computation is jpnij=128.}
+  \label{fig:LBC_mppini2}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-
-% ====================================================================
-% Unstructured open boundaries BDY 
-% ====================================================================
+
+%% =================================================================================================
 \section{Unstructured open boundary conditions (BDY)}
 \label{sec:LBC_bdy}
 
-%-----------------------------------------nambdy--------------------------------------------
-
-\nlst{nambdy} 
-%-----------------------------------------------------------------------------------------------
-%-----------------------------------------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 
-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
-a similar coding structure \citep{Chanut2005}.
+\begin{listing}
+  \nlst{nambdy}
+  \caption{\forcode{&nambdy}}
+  \label{lst:nambdy}
+\end{listing}
+
+\begin{listing}
+  \nlst{nambdy_dta}
+  \caption{\forcode{&nambdy_dta}}
+  \label{lst:nambdy_dta}
+\end{listing}
+
+Options are defined through the \nam{bdy}{bdy} and \nam{bdy_dta}{bdy\_dta} namelist variables.
+The BDY module is the core implementation of open boundary conditions for regional configurations on
+ocean temperature, salinity, barotropic-baroclinic velocities, ice-snow concentration, thicknesses, temperatures, salinity and melt ponds concentration and thickness.
+
+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 any type of setup, from regular boundaries to irregular contour (it includes the possibility to set an open boundary able to follow an isobath).
+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.
 
-%----------------------------------------------
+%% =================================================================================================
 \subsection{Namelists}
-\label{subsec:BDY_namelist}
-
-The BDY module is activated by setting \np{ln\_bdy}\forcode{ = .true.} .
+\label{subsec:LBC_bdy_namelist}
+
+The BDY module is activated by setting \np[=.true.]{ln_bdy}{ln\_bdy} .
 It is possible to define more than one boundary ``set'' and apply different boundary conditions to each set.
-The number of boundary sets is defined by \np{nb\_bdy}.
-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 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 number of boundary sets is defined by \np{nb_bdy}{nb\_bdy}.
+Each boundary set can be either defined as a series of straight line segments directly in the namelist
+(\np[=.false.]{ln_coords_file}{ln\_coords\_file}, and a namelist block \nam{bdy_index}{bdy\_index} must be included for each set) or read in from a file (\np[=.true.]{ln_coords_file}{ln\_coords\_file}, and a ``\ifile{coordinates.bdy}'' file must be provided).
+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.
-For more details of the definition of the boundary geometry see section \autoref{subsec:BDY_geometry}.
+the second is defined in the namelist.
+For more details of the definition of the boundary geometry see section \autoref{subsec:LBC_bdy_geometry}.
 
 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''), 
-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}.\\ 
+(``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 for sea-ice (``ice'').
+For each set of variables one has to choose an algorithm and the boundary data (set resp. by \np{cn_tra}{cn\_tra} and \np{nn_tra_dta}{nn\_tra\_dta} for tracers).\\
 
 The choice of algorithm is currently as follows:
 
 \begin{description}
-\item[\forcode{'none'}:] No boundary condition applied.
+\item [\forcode{'none'}:] No boundary condition applied.
   So the solution will ``see'' the land points around the edge of the edge of the domain.
-\item[\forcode{'specified'}:] Specified boundary condition applied (only available for baroclinic velocity and tracer variables).
-\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{'flather'}:] Flather radiation scheme for the barotropic variables only.
+\item [\forcode{'specified'}:] Specified boundary condition applied (only available for baroclinic velocity and tracer variables).
+\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{'flather'}:] Flather radiation scheme for the barotropic variables only.
 \end{description}
 
-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), 
-the bdy code can derived baroclinic and barotropic velocities by setting \np{ln\_full\_vel}\forcode{ = .true. }
+The boundary data is either set to initial conditions
+(\np[=0]{nn_tra_dta}{nn\_tra\_dta}) or forced with external data from a file (\np[=1]{nn_tra_dta}{nn\_tra\_dta}).
+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[=.true.]{ln_full_vel}{ln\_full\_vel}
 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
-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 
-and the second one is using data from intial condition (no namelist bloc needed).
+itself (\np[=2]{nn_dyn2d_dta}{nn\_dyn2d\_dta}) or in addition to other external data (\np[=3]{nn_dyn2d_dta}{nn\_dyn2d\_dta}).\\
+If not set to initial conditions, sea-ice salinity, temperatures and melt ponds data at the boundary can either be read in a file or defined as constant (by \np{rn_ice_sal}{rn\_ice\_sal}, \np{rn_ice_tem}{rn\_ice\_tem}, \np{rn_ice_apnd}{rn\_ice\_apnd}, \np{rn_ice_hpnd}{rn\_ice\_hpnd}). Ice age is constant and defined by \np{rn_ice_age}{rn\_ice\_age}.
+
+If external boundary data is required then the \nam{bdy_dta}{bdy\_dta} namelist must be defined.
+One \nam{bdy_dta}{bdy\_dta} namelist is required for each boundary set, adopting the same order of indexes 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 \nam{bdy_dta}{bdy\_dta} namelist shown above
+and the second one is using data from intial condition (no namelist block needed).
 The boundary data is read in using the fldread module,
-so the \ngn{nambdy\_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.
-Also whether or not time-interpolation is required and whether the data is climatological (time-cyclic) data.\\
+so the \nam{bdy_dta}{bdy\_dta} namelist is in the format required for fldread.
+For each required variable, the filename, the frequency of the files and
+the frequency of the data in the files are given.
+Also whether or not time-interpolation is required and whether the data is climatological (time-cyclic) data.
+For sea-ice salinity, temperatures and melt ponds, reading the files are skipped and constant values are used if filenames are defined as {'NOT USED'}.\\
 
 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}{nn\_bdy\_jpk}$<-1$, it is assumed that the lateral boundary data are already on the native grid.
+However, if \np{nn_bdy_jpk}{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.\\
 
-In the example namelists given, two boundary sets are defined.
+In the example of given namelists, two boundary sets are defined.
 The first set is defined via a file and applies FRS conditions to temperature and salinity and
 Flather conditions to the barotropic variables. No condition specified for the baroclinic velocity and sea-ice.
@@ -469,16 +428,16 @@
 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.
+
+%% =================================================================================================
 \subsection{Flow relaxation scheme}
-\label{subsec:BDY_FRS_scheme}
-
-The Flow Relaxation Scheme (FRS) \citep{Davies_QJRMS76,Engerdahl_Tel95},
+\label{subsec:LBC_bdy_FRS_scheme}
+
+The Flow Relaxation Scheme (FRS) \citep{davies_QJRMS76,engedahl_T95},
 applies a simple relaxation of the model fields to externally-specified values over
 a zone next to the edge of the model domain.
 Given a model prognostic variable $\Phi$
 \[
-  % \label{eq:bdy_frs1}
+  % \label{eq:LBC_bdy_frs1}
   \Phi(d) = \alpha(d)\Phi_{e}(d) + (1-\alpha(d))\Phi_{m}(d)\;\;\;\;\; d=1,N
 \]
@@ -489,10 +448,10 @@
 the prognostic equation for $\Phi$ of the form:
 \[
-  % \label{eq:bdy_frs2}
+  % \label{eq:LBC_bdy_frs2}
   -\frac{1}{\tau}\left(\Phi - \Phi_{e}\right)
 \]
 where the relaxation time scale $\tau$ is given by a function of $\alpha$ and the model time step $\Delta t$:
 \[
-  % \label{eq:bdy_frs3}
+  % \label{eq:LBC_bdy_frs3}
   \tau = \frac{1-\alpha}{\alpha}  \,\rdt
 \]
@@ -500,23 +459,24 @@
 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:
 \[
-  % \label{eq:bdy_frs4}
+  % \label{eq:LBC_bdy_frs4}
   \alpha(d) = 1 - \tanh\left(\frac{d-1}{2}\right),       \quad d=1,N
 \]
-The width of the FRS zone is specified in the namelist as \np{nn\_rimwidth}.
+The width of the FRS zone is specified in the namelist as \np{nn_rimwidth}{nn\_rimwidth}.
 This is typically set to a value between 8 and 10.
 
-%----------------------------------------------
+%% =================================================================================================
 \subsection{Flather radiation scheme}
-\label{subsec:BDY_flather_scheme}
-
-The \citet{Flather_JPO94} scheme is a radiation condition on the normal,
+\label{subsec:LBC_bdy_flather_scheme}
+
+The \citet{flather_JPO94} scheme is a radiation condition on the normal,
 depth-mean transport across the open boundary.
 It takes the form
-\begin{equation}  \label{eq:bdy_fla1}
-U = U_{e} + \frac{c}{h}\left(\eta - \eta_{e}\right),
+\begin{equation}
+  \label{eq:LBC_bdy_fla1}
+  U = U_{e} + \frac{c}{h}\left(\eta - \eta_{e}\right),
 \end{equation}
 where $U$ is the depth-mean velocity normal to the boundary and $\eta$ is the sea surface height,
@@ -527,19 +487,19 @@
 the external depth-mean normal velocity,
 plus a correction term that allows gravity waves generated internally to exit the model boundary.
-Note that the sea-surface height gradient in \autoref{eq:bdy_fla1} is a spatial gradient across the model boundary,
+Note that the sea-surface height gradient in \autoref{eq:LBC_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.
+
+%% =================================================================================================
 \subsection{Orlanski radiation scheme}
-\label{subsec:BDY_orlanski_scheme}
-
-The Orlanski scheme is based on the algorithm described by \citep{Marchesiello2001}, hereafter MMS.
+\label{subsec:LBC_bdy_orlanski_scheme}
+
+The Orlanski scheme is based on the algorithm described by \citep{marchesiello.mcwilliams.ea_OM01}, hereafter MMS.
 
 The adaptive Orlanski condition solves a wave plus relaxation equation at the boundary:
 \begin{equation}
-\frac{\partial\phi}{\partial t} + c_x \frac{\partial\phi}{\partial x} + c_y \frac{\partial\phi}{\partial y} =
-                                                -\frac{1}{\tau}(\phi - \phi^{ext})
-\label{eq:wave_continuous}
+  \label{eq:LBC_wave_continuous}
+  \frac{\partial\phi}{\partial t} + c_x \frac{\partial\phi}{\partial x} + c_y \frac{\partial\phi}{\partial y} =
+  -\frac{1}{\tau}(\phi - \phi^{ext})
 \end{equation}
 
@@ -547,14 +507,15 @@
 velocities are diagnosed from the model fields as:
 
-\begin{equation} \label{eq:cx}
-c_x = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial x}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2}
+\begin{equation}
+  \label{eq:LBC_cx}
+  c_x = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial x}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2}
 \end{equation}
 \begin{equation}
-\label{eq:cy}
-c_y = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial y}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2}
+  \label{eq:LBC_cy}
+  c_y = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial y}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2}
 \end{equation}
 
 (As noted by MMS, this is a circular diagnosis of the phase speeds which only makes sense on a discrete grid).
-Equation (\autoref{eq:wave_continuous}) is defined adaptively depending on the sign of the phase velocity normal to the boundary $c_x$.
+Equation (\autoref{eq:LBC_wave_continuous}) is defined adaptively depending on the sign of the phase velocity normal to the boundary $c_x$.
 For $c_x$ outward, we have
 
@@ -566,25 +527,25 @@
 
 \begin{equation}
-\tau = \tau_{in}\,\,\,;\,\,\, c_x = c_y = 0
-\label{eq:tau_in}
+  \label{eq:LBC_tau_in}
+  \tau = \tau_{in}\,\,\,;\,\,\, c_x = c_y = 0
 \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
-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 
-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
-(\autoref{eq:wave_continuous}) - (\autoref{eq:tau_in}) correspond to equations (13) - (15) and (2) - (3) in MMS.\\
-
-%----------------------------------------------
+Generally the relaxation time scale at inward propagation points (\np{rn_time_dmp}{rn\_time\_dmp}) is set much shorter than the time scale at outward propagation
+points (\np{rn_time_dmp_out}{rn\_time\_dmp\_out}) so that the solution is constrained more strongly by the external data at inward propagation points.
+See \autoref{subsec:LBC_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:LBC_wave_continuous}), but including
+this term in the denominator of equation (\autoref{eq:LBC_cx}). Both versions of the scheme are options in BDY. Equations
+(\autoref{eq:LBC_wave_continuous}) - (\autoref{eq:LBC_tau_in}) correspond to equations (13) - (15) and (2) - (3) in MMS.\\
+
+%% =================================================================================================
 \subsection{Relaxation at the boundary}
-\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. 
-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. 
-This time scale ($\alpha$) is weighted by the distance ($d$) from the boundary over \np{nn\_rimwidth} cells ($N$):
+\label{subsec:LBC_bdy_relaxation}
+
+In addition to a specific boundary condition specified as \np{cn_tra}{cn\_tra} and \np{cn_dyn3d}{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available.
+It is control by the namelist parameter \np{ln_tra_dmp}{ln\_tra\_dmp} and \np{ln_dyn3d_dmp}{ln\_dyn3d\_dmp} for each boundary set.
+
+The relaxation time scale value (\np{rn_time_dmp}{rn\_time\_dmp} and \np{rn_time_dmp_out}{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}{nn\_rimwidth} cells ($N$):
 
 \[
@@ -592,31 +553,31 @@
 \]
 
-The same scaling is applied in the Orlanski damping. 
-
-%----------------------------------------------
+The same scaling is applied in the Orlanski damping.
+
+%% =================================================================================================
 \subsection{Boundary geometry}
-\label{subsec:BDY_geometry}
+\label{subsec:LBC_bdy_geometry}
 
 Each open boundary set is defined as a list of points.
 The information is stored in the arrays $nbi$, $nbj$, and $nbr$ in the $idx\_bdy$ structure.
-The $nbi$ and $nbj$ arrays define the local $(i,j)$ indices of each point in the boundary zone and
-the $nbr$ array defines the discrete distance from the boundary with $nbr=1$ meaning that
-the point is next to the edge of the model domain and $nbr>1$ showing that
-the point is increasingly further away from the edge of the model domain.
+The $nbi$ and $nbj$ arrays define the local $(i,j)$ indexes of each point in the boundary zone and
+the $nbr$ array defines the discrete distance from the boundary: $nbr=1$ means that
+the boundary point is next to the edge of the model domain, while $nbr>1$ means that
+the boundary 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. 
+\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 block 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}.
+The code deduces the $U$ and $V$ points and also the points for $nbr\,>\, 1$ if \np[>1]{nn_rimwidth}{nn\_rimwidth}.
 
 The boundary geometry may also be defined from a ``\ifile{coordinates.bdy}'' file.
-Figure \autoref{fig:LBC_nc_header} gives an example of the header information from such a file.
+\autoref{fig:LBC_nc_header} gives an example of the header information from such a file, based on the description of geometrical setup given above.
 The file should contain the index arrays for each of the $T$, $U$ and $V$ grids.
 The arrays must be in order of increasing $nbr$.
@@ -624,28 +585,23 @@
 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
 are not part of the computational domain.
-For example if an open boundary is defined along an isobath, say at the shelf break,
+For example, if an open boundary is defined along an isobath, say at the shelf break,
 then the areas of ocean outside of this boundary will need to be masked out.
-This can be done by reading a mask file defined as \np{cn\_mask\_file} in the nam\_bdy namelist.
+This can be done by reading a mask file defined as \np{cn_mask_file}{cn\_mask\_file} in the nam\_bdy namelist.
 Only one mask file is used even if multiple boundary sets are defined.
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=1.0\textwidth]{Fig_LBC_bdy_geom}
-    \caption {
-      \protect\label{fig:LBC_bdy_geom}
-      Example of geometry of unstructured open boundary
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{LBC_bdy_geom}
+  \caption[Geometry of unstructured open boundary]{Example of geometry of unstructured open boundary}
+  \label{fig:LBC_bdy_geom}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-%----------------------------------------------
+
+%% =================================================================================================
 \subsection{Input boundary data files}
-\label{subsec:BDY_data}
+\label{subsec:LBC_bdy_data}
 
 The data files contain the data arrays in the order in which the points are defined in the $nbi$ and $nbj$ arrays.
@@ -653,6 +609,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
@@ -665,35 +621,31 @@
 \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}
 
 These restrictions mean that data files used with versions of the
 model prior to Version 3.4 may not work with Version 3.4 onwards.
-A \fortran utility {\it bdy\_reorder} exists in the TOOLS directory which
+A \fortran\ utility {\itshape bdy\_reorder} exists in the TOOLS directory which
 will re-order the data in old BDY data files.
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=1.0\textwidth]{Fig_LBC_nc_header}
-    \caption {
-      \protect\label{fig:LBC_nc_header}
-      Example of the header for a \protect\ifile{coordinates.bdy} file
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{LBC_nc_header}
+  \caption[Header for a \protect\ifile{coordinates.bdy} file]{
+    Example of the header for a \protect\ifile{coordinates.bdy} file}
+  \label{fig:LBC_nc_header}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-%----------------------------------------------
+
+%% =================================================================================================
 \subsection{Volume correction}
-\label{subsec:BDY_vol_corr}
+\label{subsec:LBC_bdy_vol_corr}
 
 There is an option to force the total volume in the regional model to be constant.
-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}). 
-If \np{nn\_volctl}\forcode{ = 0} then a correction is applied to the normal barotropic velocities around the boundary at
+This is controlled  by the \np{ln_vol}{ln\_vol} parameter in the namelist.
+A value of \np[=.false.]{ln_vol}{ln\_vol} indicates that this option is not used.
+Two options to control the volume are available (\np{nn_volctl}{nn\_volctl}).
+If \np[=0]{nn_volctl}{nn\_volctl} 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.
-If \np{nn\_volctl}\forcode{ = 1} then the calculation of the volume change on
+If \np[=1]{nn_volctl}{nn\_volctl} then the calculation of the volume change on
 the timestep includes the change due to the freshwater flux across the surface and
 the correction velocity corrects for this as well.
@@ -702,26 +654,27 @@
 applied to all boundaries at once.
 
-%----------------------------------------------
+%% =================================================================================================
 \subsection{Tidal harmonic forcing}
-\label{subsec:BDY_tides}
-
-%-----------------------------------------nambdy_tide--------------------------------------------
-
-\nlst{nambdy_tide} 
-%-----------------------------------------------------------------------------------------------
+\label{subsec:LBC_bdy_tides}
+
+\begin{listing}
+  \nlst{nambdy_tide}
+  \caption{\forcode{&nambdy_tide}}
+  \label{lst:nambdy_tide}
+\end{listing}
 
 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}{\_tide}, \np{ln_tide}{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}{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}{bdy\_tide} namelist parameters.\\
 
 The tidal harmonic data at open boundaries can be specified in two
 different ways, either on a two-dimensional grid covering the entire
 model domain or along open boundary segments; these two variants can
-be selected by setting \np{ln\_bdytide\_2ddta } to \forcode{.true.} or
+be selected by setting \np{ln_bdytide_2ddta }{ln\_bdytide\_2ddta } to \forcode{.true.} or
 \forcode{.false.}, respectively. In either case, the real and
 imaginary parts of SSH and the two barotropic velocity components for
@@ -729,19 +682,19 @@
 separately: when two-dimensional data is used, variables
 \textit{tcname\_z1} and \textit{tcname\_z2} for real and imaginary SSH,
-respectively, are expected in input file \np{filtide} with suffix
+respectively, are expected in input file \np{filtide}{filtide} with suffix
 \ifile{\_grid\_T}, variables \textit{tcname\_u1} and
 \textit{tcname\_u2} for real and imaginary u, respectively, are
-expected in input file \np{filtide} with suffix \ifile{\_grid\_U}, and
+expected in input file \np{filtide}{filtide} with suffix \ifile{\_grid\_U}, and
 \textit{tcname\_v1} and \textit{tcname\_v2} for real and imaginary v,
-respectively, are expected in input file \np{filtide} with suffix
+respectively, are expected in input file \np{filtide}{filtide} with suffix
 \ifile{\_grid\_V}; when data along open boundary segments is used,
 variables \textit{z1} and \textit{z2} (real and imaginary part of SSH)
-are expected to be available from file \np{filtide} with suffix
+are expected to be available from file \np{filtide}{filtide} with suffix
 \ifile{tcname\_grid\_T}, variables \textit{u1} and \textit{u2} (real
 and imaginary part of u) are expected to be available from file
-\np{filtide} with suffix \ifile{tcname\_grid\_U}, and variables
+\np{filtide}{filtide} with suffix \ifile{tcname\_grid\_U}, and variables
 \textit{v1} and \textit{v2} (real and imaginary part of v) are
-expected to be available from file \np{filtide} with suffix
-\ifile{tcname\_grid\_V}. If \np{ln\_bdytide\_conj} is set to
+expected to be available from file \np{filtide}{filtide} with suffix
+\ifile{tcname\_grid\_V}. If \np{ln_bdytide_conj}{ln\_bdytide\_conj} is set to
 \forcode{.true.}, the data is expected to be in complex conjugate
 form.
@@ -755,7 +708,5 @@
 direction of rotation). %, e.g. anticlockwise or clockwise.
 
-\biblio
-
-\pindex
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_LDF.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_LDF.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_LDF.tex	(revision 11831)
@@ -3,15 +3,27 @@
 \begin{document}
 
-% ================================================================
-% Chapter Lateral Ocean Physics (LDF)
-% ================================================================
 \chapter{Lateral Ocean Physics (LDF)}
 \label{chap:LDF}
 
-\minitoc
-
-\newpage
-
-The lateral physics terms in the momentum and tracer equations have been described in \autoref{eq:PE_zdf} and
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
+
+The lateral physics terms in the momentum and tracer equations have been described in \autoref{eq:MB_zdf} and
 their discrete formulation in \autoref{sec:TRA_ldf} and \autoref{sec:DYN_ldf}).
 In this section we further discuss each lateral physics option.
@@ -22,53 +34,69 @@
 (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).
-Note that this chapter describes the standard implementation of iso-neutral tracer mixing,
-and Griffies's implementation, which is used if \np{traldf\_grif}\forcode{ = .true.},
-is described in Appdx\autoref{apdx:triad}
-
-%-----------------------------------nam_traldf - nam_dynldf--------------------------------------------
-
-\nlst{namtra_ldf} 
-
-\nlst{namdyn_ldf} 
-%--------------------------------------------------------------------------------------------------------------
-
-
-% ================================================================
-% Direction of lateral Mixing
-% ================================================================
-\section{Direction of lateral mixing (\protect\mdl{ldfslp})}
+(see the \nam{tra_ldf}{tra\_ldf} and \nam{dyn_ldf}{dyn\_ldf} below).
+Note that this chapter describes the standard implementation of iso-neutral tracer mixing.
+Griffies's implementation, which is used if \np[=.true.]{ln_traldf_triad}{ln\_traldf\_triad},
+is described in \autoref{apdx:TRIADS}
+
+%% =================================================================================================
+\section[Lateral mixing operators]{Lateral mixing operators}
+\label{sec:LDF_op}
+We remind here the different lateral mixing operators that can be used. Further details can be found in \autoref{subsec:TRA_ldf_op} and  \autoref{sec:DYN_ldf}.
+
+%% =================================================================================================
+\subsection[No lateral mixing (\forcode{ln_traldf_OFF} \& \forcode{ln_dynldf_OFF})]{No lateral mixing (\protect\np{ln_traldf_OFF}{ln\_traldf\_OFF} \& \protect\np{ln_dynldf_OFF}{ln\_dynldf\_OFF})}
+
+It is possible to run without explicit lateral diffusion on tracers (\protect\np[=.true.]{ln_traldf_OFF}{ln\_traldf\_OFF}) and/or
+momentum (\protect\np[=.true.]{ln_dynldf_OFF}{ln\_dynldf\_OFF}). The latter option is even recommended if using the
+UBS advection scheme on momentum (\np[=.true.]{ln_dynadv_ubs}{ln\_dynadv\_ubs},
+see \autoref{subsec:DYN_adv_ubs}) and can be useful for testing purposes.
+
+%% =================================================================================================
+\subsection[Laplacian mixing (\forcode{ln_traldf_lap} \& \forcode{ln_dynldf_lap})]{Laplacian mixing (\protect\np{ln_traldf_lap}{ln\_traldf\_lap} \& \protect\np{ln_dynldf_lap}{ln\_dynldf\_lap})}
+Setting \protect\np[=.true.]{ln_traldf_lap}{ln\_traldf\_lap} and/or \protect\np[=.true.]{ln_dynldf_lap}{ln\_dynldf\_lap} enables
+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.
+
+%% =================================================================================================
+\subsection[Bilaplacian mixing (\forcode{ln_traldf_blp} \& \forcode{ln_dynldf_blp})]{Bilaplacian mixing (\protect\np{ln_traldf_blp}{ln\_traldf\_blp} \& \protect\np{ln_dynldf_blp}{ln\_dynldf\_blp})}
+Setting \protect\np[=.true.]{ln_traldf_blp}{ln\_traldf\_blp} and/or \protect\np[=.true.]{ln_dynldf_blp}{ln\_dynldf\_blp} 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.
+
+%% =================================================================================================
+\section[Direction of lateral mixing (\textit{ldfslp.F90})]{Direction of lateral mixing (\protect\mdl{ldfslp})}
 \label{sec:LDF_slp}
 
-%%%
-\gmcomment{
+\cmtgm{
   we should emphasize here that the implementation is a rather old one.
-  Better work can be achieved by using \citet{Griffies_al_JPO98, Griffies_Bk04} iso-neutral scheme.
+  Better work can be achieved by using \citet{griffies.gnanadesikan.ea_JPO98, griffies_bk04} iso-neutral scheme.
 }
 
 A direction for lateral mixing has to be defined when the desired operator does not act along the model levels.
 This occurs when $(a)$ horizontal mixing is required on tracer or momentum
-(\np{ln\_traldf\_hor} or \np{ln\_dynldf\_hor}) in $s$- or mixed $s$-$z$- coordinates,
+(\np{ln_traldf_hor}{ln\_traldf\_hor} or \np{ln_dynldf_hor}{ln\_dynldf\_hor}) in $s$- or mixed $s$-$z$- coordinates,
 and $(b)$ isoneutral mixing is required whatever the vertical coordinate is.
 This direction of mixing is defined by its slopes in the \textbf{i}- and \textbf{j}-directions at the face of
 the cell of the quantity to be diffused.
 For a tracer, this leads to the following four slopes:
-$r_{1u}$, $r_{1w}$, $r_{2v}$, $r_{2w}$ (see \autoref{eq:tra_ldf_iso}),
+$r_{1u}$, $r_{1w}$, $r_{2v}$, $r_{2w}$ (see \autoref{eq:TRA_ldf_iso}),
 while for momentum the slopes are  $r_{1t}$, $r_{1uw}$, $r_{2f}$, $r_{2uw}$ for $u$ and
-$r_{1f}$, $r_{1vw}$, $r_{2t}$, $r_{2vw}$ for $v$. 
-
-%gm% add here afigure of the slope in i-direction
-
+$r_{1f}$, $r_{1vw}$, $r_{2t}$, $r_{2vw}$ for $v$.
+
+\cmtgm{Add here afigure of the slope in i-direction}
+
+%% =================================================================================================
 \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
+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. 
-%gm { Steven : My version is obviously wrong since I'm left with an arbitrary constant which is the local vertical temperature gradient}
-
-\begin{equation}
-  \label{eq:ldfslp_geo}
+\ie\ a linear function of $z_T$, the depth of a $T$-point.
+\cmtgm{Steven : My version is obviously wrong since
+  I'm left with an arbitrary constant which is the local vertical temperature gradient}
+
+\begin{equation}
+  \label{eq:LDF_slp_geo}
   \begin{aligned}
     r_{1u} &= \frac{e_{3u}}{ \left( e_{1u}\;\overline{\overline{e_{3w}}}^{\,i+1/2,\,k} \right)}
@@ -85,9 +113,10 @@
 \end{equation}
 
-%gm%  caution I'm not sure the simplification was a good idea! 
-
-These slopes are computed once in \rou{ldfslp\_init} when \np{ln\_sco}\forcode{ = .true.}rue,
-and either \np{ln\_traldf\_hor}\forcode{ = .true.} or \np{ln\_dynldf\_hor}\forcode{ = .true.}. 
-
+\cmtgm{Caution I'm not sure the simplification was a good idea!}
+
+These slopes are computed once in \rou{ldf\_slp\_init} when \np[=.true.]{ln_sco}{ln\_sco},
+and either \np[=.true.]{ln_traldf_hor}{ln\_traldf\_hor} or \np[=.true.]{ln_dynldf_hor}{ln\_dynldf\_hor}.
+
+%% =================================================================================================
 \subsection{Slopes for tracer iso-neutral mixing}
 \label{subsec:LDF_slp_iso}
@@ -96,10 +125,10 @@
 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.
-So, substituting $T$ by $\rho$ in \autoref{eq:tra_ldf_iso} and setting the diffusive fluxes in
+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:
 
 \begin{equation}
-  \label{eq:ldfslp_iso}
+  \label{eq:LDF_slp_iso}
   \begin{split}
     r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac{\delta_{i+1/2}[\rho]}
@@ -116,43 +145,36 @@
 \end{equation}
 
-%gm% rewrite this as the explanation is not very clear !!!
-%In practice, \autoref{eq:ldfslp_iso} is of little help in evaluating the neutral surface slopes. Indeed, for an unsimplified equation of state, the density has a strong dependancy on pressure (here approximated as the depth), therefore applying \autoref{eq:ldfslp_iso} using the $in situ$ density, $\rho$, computed at T-points leads to a flattening of slopes as the depth increases. This is due to the strong increase of the $in situ$ density with depth. 
-
-%By definition, neutral surfaces are tangent to the local $in situ$ density \citep{McDougall1987}, therefore in \autoref{eq:ldfslp_iso}, all the derivatives have to be evaluated at the same local pressure (which in decibars is approximated by the depth in meters).
-
-%In the $z$-coordinate, the derivative of the  \autoref{eq:ldfslp_iso} numerator is evaluated at the same depth \nocite{as what?} ($T$-level, which is the same as the $u$- and $v$-levels), so  the $in situ$ density can be used for its evaluation. 
-
-As the mixing is performed along neutral surfaces, the gradient of $\rho$ in \autoref{eq:ldfslp_iso} has to
+\cmtgm{rewrite this as the explanation is not very clear !!!}
+%In practice, \autoref{eq:LDF_slp_iso} is of little help in evaluating the neutral surface slopes. Indeed, for an unsimplified equation of state, the density has a strong dependancy on pressure (here approximated as the depth), therefore applying \autoref{eq:LDF_slp_iso} using the $in situ$ density, $\rho$, computed at T-points leads to a flattening of slopes as the depth increases. This is due to the strong increase of the $in situ$ density with depth.
+
+%By definition, neutral surfaces are tangent to the local $in situ$ density \citep{mcdougall_JPO87}, therefore in \autoref{eq:LDF_slp_iso}, all the derivatives have to be evaluated at the same local pressure (which in decibars is approximated by the depth in meters).
+
+%In the $z$-coordinate, the derivative of the  \autoref{eq:LDF_slp_iso} numerator is evaluated at the same depth \nocite{as what?} ($T$-level, which is the same as the $u$- and $v$-levels), so  the $in situ$ density can be used for its evaluation.
+
+As the mixing is performed along neutral surfaces, the gradient of $\rho$ in \autoref{eq:LDF_slp_iso} has to
 be evaluated at the same local pressure
 (which, in decibars, is approximated by the depth in meters in the model).
-Therefore \autoref{eq:ldfslp_iso} cannot be used as such,
+Therefore \autoref{eq:LDF_slp_iso} cannot be used as such,
 but further transformation is needed depending on the vertical coordinate used:
 
 \begin{description}
-
-\item[$z$-coordinate with full step: ]
-  in \autoref{eq:ldfslp_iso} the densities appearing in the $i$ and $j$ derivatives  are taken at the same depth,
+\item [$z$-coordinate with full step:] in \autoref{eq:LDF_slp_iso} the densities appearing in the $i$ and $j$ derivatives  are taken at the same depth,
   thus the $in situ$ density can be used.
   This is not the case for the vertical derivatives: $\delta_{k+1/2}[\rho]$ is replaced by $-\rho N^2/g$,
-  where $N^2$ is the local Brunt-Vais\"{a}l\"{a} frequency evaluated following \citet{McDougall1987}
-  (see \autoref{subsec:TRA_bn2}). 
-
-\item[$z$-coordinate with partial step: ]
-  this case is identical to the full step case except that at partial step level,
+  where $N^2$ is the local Brunt-Vais\"{a}l\"{a} frequency evaluated following \citet{mcdougall_JPO87}
+  (see \autoref{subsec:TRA_bn2}).
+\item [$z$-coordinate with partial step:] this case is identical to the full step case except that at partial step level,
   the \emph{horizontal} density gradient is evaluated as described in \autoref{sec:TRA_zpshde}.
-
-\item[$s$- or hybrid $s$-$z$- coordinate: ]
-  in the current release of \NEMO, iso-neutral mixing is only employed for $s$-coordinates if
-  the Griffies scheme is used (\np{traldf\_grif}\forcode{ = .true.};
-  see Appdx \autoref{apdx:triad}).
+\item [$s$- or hybrid $s$-$z$- coordinate:] in the current release of \NEMO, iso-neutral mixing is only employed for $s$-coordinates if
+  the Griffies scheme is used (\np[=.true.]{ln_traldf_triad}{ln\_traldf\_triad};
+  see \autoref{apdx:TRIADS}).
   In other words, iso-neutral mixing will only be accurately represented with a linear equation of state
-  (\np{nn\_eos}\forcode{ = 1..2}).
-  In the case of a "true" equation of state, the evaluation of $i$ and $j$ derivatives in \autoref{eq:ldfslp_iso}
+  (\np[=.true.]{ln_seos}{ln\_seos}).
+  In the case of a "true" equation of state, the evaluation of $i$ and $j$ derivatives in \autoref{eq:LDF_slp_iso}
   will include a pressure dependent part, leading to the wrong evaluation of the neutral slopes.
 
-%gm% 
   Note: The solution for $s$-coordinate passes trough the use of different (and better) expression for
   the constraint on iso-neutral fluxes.
-  Following \citet{Griffies_Bk04}, instead of specifying directly that there is a zero neutral diffusive flux of
+  Following \citet{griffies_bk04}, instead of specifying directly that there is a zero neutral diffusive flux of
   locally referenced potential density, we stay in the $T$-$S$ plane and consider the balance between
   the neutral direction diffusive fluxes of potential temperature and salinity:
@@ -160,10 +182,10 @@
     \alpha \ \textbf{F}(T) = \beta \ \textbf{F}(S)
   \]
-  % gm{  where vector F is ....}
+  \cmtgm{where vector F is ....}
 
 This constraint leads to the following definition for the slopes:
 
 \[
-  % \label{eq:ldfslp_iso2}
+  % \label{eq:LDF_slp_iso2}
   \begin{split}
     r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac
@@ -193,95 +215,88 @@
 
 Note that such a formulation could be also used in the $z$-coordinate and $z$-coordinate with partial steps cases.
-
 \end{description}
 
 This implementation is a rather old one.
-It is similar to the one proposed by Cox [1987], except for the background horizontal diffusion.
-Indeed, the Cox implementation of isopycnal diffusion in GFDL-type models requires
+It is similar to the one proposed by \citet{cox_OM87}, except for the background horizontal diffusion.
+Indeed, the \citet{cox_OM87} implementation of isopycnal diffusion in GFDL-type models requires
 a minimum background horizontal diffusion for numerical stability reasons.
 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_al_JPO98}.
-Griffies's scheme is now available in \NEMO if \np{traldf\_grif\_iso} is set true; see Appdx \autoref{apdx:triad}.
-Here, another strategy is presented \citep{Lazar_PhD97}:
+the ocean model are modified \citep{weaver.eby_JPO97, griffies.gnanadesikan.ea_JPO98}.
+Griffies's scheme is now available in \NEMO\ if \np[=.true.]{ln_traldf_triad}{ln\_traldf\_triad}; see \autoref{apdx:TRIADS}.
+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
 grid point noise generated by the iso-neutral diffusion operator (\autoref{fig:LDF_ZDF1}).
 This allows an iso-neutral diffusion scheme without additional background horizontal mixing.
 This technique can be viewed as a diffusion operator that acts along large-scale
-(2~$\Delta$x) \gmcomment{2deltax doesnt seem very large scale} iso-neutral surfaces.
+(2~$\Delta$x) \cmtgm{2deltax doesnt seem very large scale} iso-neutral surfaces.
 The diapycnal diffusion required for numerical stability is thus minimized and its net effect on the flow is quite small when compared to the effect of an horizontal background mixing.
 
 Nevertheless, this iso-neutral operator does not ensure that variance cannot increase,
-contrary to the \citet{Griffies_al_JPO98} operator which has that property. 
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+contrary to the \citet{griffies.gnanadesikan.ea_JPO98} operator which has that property.
+
 \begin{figure}[!ht]
-  \begin{center}
-    \includegraphics[width=0.70\textwidth]{Fig_LDF_ZDF1}
-    \caption {
-      \protect\label{fig:LDF_ZDF1}
-      averaging procedure for isopycnal slope computation.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{LDF_ZDF1}
+  \caption{Averaging procedure for isopycnal slope computation}
+  \label{fig:LDF_ZDF1}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-%There are three additional questions about the slope calculation. 
-%First the expression for the rotation tensor has been obtain assuming the "small slope" approximation, so a bound has to be imposed on slopes. 
-%Second, numerical stability issues also require a bound on slopes. 
+
+%There are three additional questions about the slope calculation.
+%First the expression for the rotation tensor has been obtain assuming the "small slope" approximation, so a bound has to be imposed on slopes.
+%Second, numerical stability issues also require a bound on slopes.
 %Third, the question of boundary condition specified on slopes...
 
 %from griffies: chapter 13.1....
 
-
-
-% In addition and also for numerical stability reasons \citep{Cox1987, Griffies_Bk04}, 
-% the slopes are bounded by $1/100$ everywhere. This limit is decreasing linearly 
-% to zero fom $70$ meters depth and the surface (the fact that the eddies "feel" the 
+% In addition and also for numerical stability reasons \citep{cox_OM87, griffies_bk04},
+% the slopes are bounded by $1/100$ everywhere. This limit is decreasing linearly
+% to zero fom $70$ meters depth and the surface (the fact that the eddies "feel" the
 % surface motivates this flattening of isopycnals near the surface).
 
-For numerical stability reasons \citep{Cox1987, Griffies_Bk04}, the slopes must also be bounded by
-$1/100$ everywhere.
+For numerical stability reasons \citep{cox_OM87, griffies_bk04}, the slopes must also be bounded by
+the namelist scalar \np{rn_slpmax}{rn\_slpmax} (usually $1/100$) everywhere.
 This constraint is applied in a piecewise linear fashion, increasing from zero at the surface to
 $1/100$ at $70$ metres and thereafter decreasing to zero at the bottom of the ocean
 (the fact that the eddies "feel" the surface motivates this flattening of isopycnals near the surface).
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+\colorbox{yellow}{The way slopes are tapered has be checked. Not sure that this is still what is actually done.}
+
 \begin{figure}[!ht]
-  \begin{center}
-    \includegraphics[width=0.70\textwidth]{Fig_eiv_slp}
-    \caption{
-      \protect\label{fig:eiv_slp}
-      Vertical profile of the slope used for lateral mixing in the mixed layer:
-      \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:
-      wall boundary condition).
-      Nevertheless, the profile between the surface zero value and the interior iso-neutral one is unknown,
-      and especially the value at the base of the mixed layer;
-      \textit{(b)} profile of slope using a linear tapering of the slope near the surface and
-      imposing a maximum slope of 1/100;
-      \textit{(c)} profile of slope actually used in \NEMO: a linear decrease of the slope from
-      zero at the surface to its ocean interior value computed just below the mixed layer.
-      Note the huge change in the slope at the base of the mixed layer between \textit{(b)} and \textit{(c)}.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{LDF_eiv_slp}
+  \caption[Vertical profile of the slope used for lateral mixing in the mixed layer]{
+    Vertical profile of the slope used for lateral mixing in the mixed layer:
+    \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:
+    wall boundary condition).
+    Nevertheless,
+    the profile between the surface zero value and the interior iso-neutral one is unknown,
+    and especially the value at the base of the mixed layer;
+    \textit{(b)} profile of slope using a linear tapering of the slope near the surface and
+    imposing a maximum slope of 1/100;
+    \textit{(c)} profile of slope actually used in \NEMO:
+    a linear decrease of the slope from zero at the surface to
+    its ocean interior value computed just below the mixed layer.
+    Note the huge change in the slope at the base of the mixed layer between
+    \textit{(b)} and \textit{(c)}.}
+  \label{fig:LDF_eiv_slp}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
 \colorbox{yellow}{add here a discussion about the flattening of the slopes, vs tapering the coefficient.}
 
+%% =================================================================================================
 \subsection{Slopes for momentum iso-neutral mixing}
 
 The iso-neutral diffusion operator on momentum is the same as the one used on tracers but
 applied to each component of the velocity separately
-(see \autoref{eq:dyn_ldf_iso} in section~\autoref{subsec:DYN_ldf_iso}).
+(see \autoref{eq:DYN_ldf_iso} in section~\autoref{subsec:DYN_ldf_iso}).
 The slopes between the surface along which the diffusion operator acts and the surface of computation
 ($z$- or $s$-surfaces) are defined at $T$-, $f$-, and \textit{uw}- points for the $u$-component, and $T$-, $f$- and
 \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:LDF_slp_geo} and \autoref{eq:LDF_slp_iso}:
 
 \[
-  % \label{eq:ldfslp_dyn}
+  % \label{eq:LDF_slp_dyn}
   \begin{aligned}
     &r_{1t}\ \ = \overline{r_{1u}}^{\,i}       &&&    r_{1f}\ \ &= \overline{r_{1u}}^{\,i+1/2} \\
@@ -294,148 +309,177 @@
 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}).
 
-
-% ================================================================
-% Lateral Mixing Operator
-% ================================================================
-\section{Lateral mixing operators (\protect\mdl{traldf}, \protect\mdl{traldf}) }
-\label{sec:LDF_op}
-
-
-   
-% ================================================================
-% Lateral Mixing Coefficients
-% ================================================================
-\section{Lateral mixing coefficient (\protect\mdl{ldftra}, \protect\mdl{ldfdyn}) }
+%% =================================================================================================
+\section[Lateral mixing coefficient (\forcode{nn_aht_ijk_t} \& \forcode{nn_ahm_ijk_t})]{Lateral mixing coefficient (\protect\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})}
 \label{sec:LDF_coef}
 
-Introducing a space variation in the lateral eddy mixing coefficients changes the model core memory requirement,
-adding up to four extra three-dimensional arrays for the geopotential or isopycnal second order operator applied to 
-momentum.
-Six CPP keys control the space variation of eddy coefficients: three for momentum and three for tracer.
-The three choices allow:
-a space variation in the three space directions (\key{traldf\_c3d},  \key{dynldf\_c3d}),
-in the horizontal plane (\key{traldf\_c2d},  \key{dynldf\_c2d}),
-or in the vertical only (\key{traldf\_c1d},  \key{dynldf\_c1d}).
-The default option is a constant value over the whole ocean on both momentum and tracers. 
-   
-The number of additional arrays that have to be defined and the gridpoint position at which
-they are defined depend on both the space variation chosen and the type of operator used.
-The resulting eddy viscosity and diffusivity coefficients can be a function of more than one variable.
-Changes in the computer code when switching from one option to another have been minimized by
-introducing the eddy coefficients as statement functions
-(include file \textit{ldftra\_substitute.h90} and \textit{ldfdyn\_substitute.h90}).
-The functions are replaced by their actual meaning during the preprocessing step (CPP).
-The specification of the space variation of the coefficient is made in \mdl{ldftra} and \mdl{ldfdyn},
-or more precisely in include files \textit{traldf\_cNd.h90} and \textit{dynldf\_cNd.h90}, with N=1, 2 or 3.
-The user can modify these include files as he/she wishes.
-The way the mixing coefficient are set in the reference version can be briefly described as follows:
-
-\subsubsection{Constant mixing coefficients (default option)}
-When none of the \key{dynldf\_...} and \key{traldf\_...} keys are defined,
-a constant value is used over the whole ocean for momentum and tracers,
-which is specified through the \np{rn\_ahm0} and \np{rn\_aht0} namelist parameters.
-
-\subsubsection{Vertically varying mixing coefficients (\protect\key{traldf\_c1d} and \key{dynldf\_c1d})} 
-The 1D option is only available when using the $z$-coordinate with full step.
-Indeed in all the other types of vertical coordinate,
-the depth is a 3D function of (\textbf{i},\textbf{j},\textbf{k}) and therefore,
-introducing depth-dependent mixing coefficients will require 3D arrays.
-In the 1D option, a hyperbolic variation of the lateral mixing coefficient is introduced in which
-the surface value is \np{rn\_aht0} (\np{rn\_ahm0}), the bottom value is 1/4 of the surface value,
-and the transition takes place around z=300~m with a width of 300~m
-(\ie both the depth and the width of the inflection point are set to 300~m).
-This profile is hard coded in file \textit{traldf\_c1d.h90}, but can be easily modified by users.
-
-\subsubsection{Horizontally varying mixing coefficients (\protect\key{traldf\_c2d} and \protect\key{dynldf\_c2d})}
-By default the horizontal variation of the eddy coefficient depends on the local mesh size and
+The specification of the space variation of the coefficient is made in modules \mdl{ldftra} and \mdl{ldfdyn}.
+The way the mixing coefficients are set in the reference version can be described as follows:
+
+%% =================================================================================================
+\subsection[Mixing coefficients read from file (\forcode{=-20, -30})]{ Mixing coefficients read from file (\protect\np[=-20, -30]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=-20, -30]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})}
+
+Mixing coefficients can be read from file if a particular geographical variation is needed. For example, in the ORCA2 global ocean model,
+the laplacian viscosity operator uses $A^l$~= 4.10$^4$ m$^2$/s poleward of 20$^{\circ}$ north and south and
+decreases linearly to $A^l$~= 2.10$^3$ m$^2$/s at the equator \citep{madec.delecluse.ea_JPO96, delecluse.madec_icol99}.
+Similar modified horizontal variations can be found with the Antarctic or Arctic sub-domain options of ORCA2 and ORCA05.
+The provided fields can either be 2d (\np[=-20]{nn_aht_ijk_t}{nn\_aht\_ijk\_t}, \np[=-20]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}) or 3d (\np[=-30]{nn_aht_ijk_t}{nn\_aht\_ijk\_t},  \np[=-30]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}). They must be given at U, V points for tracers and T, F points for momentum (see \autoref{tab:LDF_files}).
+
+\begin{table}[htb]
+  \centering
+  \begin{tabular}{|l|l|l|l|}
+    \hline
+    Namelist parameter				            & Input filename	                             & dimensions	& variable names                      \\	\hline
+    \np[=-20]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}	    & \forcode{eddy_viscosity_2D.nc }            &     $(i,j)$	        & \forcode{ahmt_2d, ahmf_2d}  \\	\hline
+    \np[=-20]{nn_aht_ijk_t}{nn\_aht\_ijk\_t}           & \forcode{eddy_diffusivity_2D.nc }           &     $(i,j)$	        & \forcode{ahtu_2d, ahtv_2d}    \\	\hline
+    \np[=-30]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t} 	    & \forcode{eddy_viscosity_3D.nc }            &     $(i,j,k)$	        & \forcode{ahmt_3d, ahmf_3d}  \\	\hline
+    \np[=-30]{nn_aht_ijk_t}{nn\_aht\_ijk\_t}	    & \forcode{eddy_diffusivity_3D.nc }           &     $(i,j,k)$	        & \forcode{ahtu_3d, ahtv_3d}    \\	\hline
+  \end{tabular}
+  \caption{Description of expected input files if mixing coefficients are read from NetCDF files}
+  \label{tab:LDF_files}
+\end{table}
+
+%% =================================================================================================
+\subsection[Constant mixing coefficients (\forcode{=0})]{ Constant mixing coefficients (\protect\np[=0]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=0]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})}
+
+If constant, mixing coefficients are set thanks to a velocity and a length scales ($U_{scl}$, $L_{scl}$) such that:
+
+\begin{equation}
+  \label{eq:LDF_constantah}
+  A_o^l = \left\{
+    \begin{aligned}
+      & \frac{1}{2} U_{scl} L_{scl}  		     & \text{for laplacian operator } \\
+      & \frac{1}{12} U_{scl} L_{scl}^3                    & \text{for bilaplacian operator }
+    \end{aligned}
+  \right.
+\end{equation}
+
+ $U_{scl}$ and $L_{scl}$ are given by the namelist parameters \np{rn_Ud}{rn\_Ud}, \np{rn_Uv}{rn\_Uv}, \np{rn_Ld}{rn\_Ld} and \np{rn_Lv}{rn\_Lv}.
+
+%% =================================================================================================
+\subsection[Vertically varying mixing coefficients (\forcode{=10})]{Vertically varying mixing coefficients (\protect\np[=10]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=10]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})}
+
+In the vertically varying case, a hyperbolic variation of the lateral mixing coefficient is introduced in which
+the surface value is given by \autoref{eq:LDF_constantah}, the bottom value is 1/4 of the surface value,
+and the transition takes place around z=500~m with a width of 200~m.
+This profile is hard coded in module \mdl{ldfc1d\_c2d}, but can be easily modified by users.
+
+%% =================================================================================================
+\subsection[Mesh size dependent mixing coefficients (\forcode{=20})]{Mesh size dependent mixing coefficients (\protect\np[=20]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=20]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})}
+
+In that case, the horizontal variation of the eddy coefficient depends on the local mesh size and
 the type of operator used:
 \begin{equation}
-  \label{eq:title}
+  \label{eq:LDF_title}
   A_l = \left\{
     \begin{aligned}
-      & \frac{\max(e_1,e_2)}{e_{max}} A_o^l  			& \text{for laplacian operator } \\
-      & \frac{\max(e_1,e_2)^{3}}{e_{max}^{3}} A_o^l          & \text{for bilaplacian operator }
+      & \frac{1}{2} U_{scl}  \max(e_1,e_2)  			& \text{for laplacian operator } \\
+      & \frac{1}{12} U_{scl}  \max(e_1,e_2)^{3}             & \text{for bilaplacian operator }
     \end{aligned}
   \right.
 \end{equation}
-where $e_{max}$ is the maximum of $e_1$ and $e_2$ taken over the whole masked ocean domain,
-and $A_o^l$ is the \np{rn\_ahm0} (momentum) or \np{rn\_aht0} (tracer) namelist parameter.
+where $U_{scl}$ is a user defined velocity scale (\np{rn_Ud}{rn\_Ud}, \np{rn_Uv}{rn\_Uv}).
 This variation is intended to reflect the lesser need for subgrid scale eddy mixing where
 the grid size is smaller in the domain.
-It was introduced in the context of the DYNAMO modelling project \citep{Willebrand_al_PO01}.
-Note that such a grid scale dependance of mixing coefficients significantly increase the range of stability of
-model configurations presenting large changes in grid pacing such as global ocean models.
+It was introduced in the context of the DYNAMO modelling project \citep{willebrand.barnier.ea_PO01}.
+Note that such a grid scale dependance of mixing coefficients significantly increases the range of stability of
+model configurations presenting large changes in grid spacing such as global ocean models.
 Indeed, in such a case, a constant mixing coefficient can lead to a blow up of the model due to
-large coefficient compare to the smallest grid size (see \autoref{sec:STP_forward_imp}),
+large coefficient compare to the smallest grid size (see \autoref{sec:TD_forward_imp}),
 especially when using a bilaplacian operator.
 
-Other formulations can be introduced by the user for a given configuration.
-For example, in the ORCA2 global ocean model (see Configurations),
-the laplacian viscosity operator uses \np{rn\_ahm0}~= 4.10$^4$ m$^2$/s poleward of 20$^{\circ}$ north and south and
-decreases linearly to \np{rn\_aht0}~= 2.10$^3$ m$^2$/s at the equator \citep{Madec_al_JPO96, Delecluse_Madec_Bk00}.
-This modification can be found in routine \rou{ldf\_dyn\_c2d\_orca} defined in \mdl{ldfdyn\_c2d}.
-Similar modified horizontal variations can be found with the Antarctic or Arctic sub-domain options of
-ORCA2 and ORCA05 (see \&namcfg namelist).
-
-\subsubsection{Space varying mixing coefficients (\protect\key{traldf\_c3d} and \key{dynldf\_c3d})}
-
-The 3D space variation of the mixing coefficient is simply the combination of the 1D and 2D cases,
-\ie a hyperbolic tangent variation with depth associated with a grid size dependence of
-the magnitude of the coefficient. 
-
-\subsubsection{Space and time varying mixing coefficients}
-
-There is no default specification of space and time varying mixing coefficient. 
-The only case available is specific to the ORCA2 and ORCA05 global ocean configurations.
-It provides only a tracer mixing coefficient for eddy induced velocity (ORCA2) or both iso-neutral and
-eddy induced velocity (ORCA05) that depends on the local growth rate of baroclinic instability.
-This specification is actually used when an ORCA key and both \key{traldf\_eiv} and \key{traldf\_c2d} are defined.
+\colorbox{yellow}{CASE \np{nn_aht_ijk_t}{nn\_aht\_ijk\_t} = 21 to be added}
+
+%% =================================================================================================
+\subsection[Mesh size and depth dependent mixing coefficients (\forcode{=30})]{Mesh size and depth dependent mixing coefficients (\protect\np[=30]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=30]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})}
+
+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
+the magnitude of the coefficient.
+
+%% =================================================================================================
+\subsection[Velocity dependent mixing coefficients (\forcode{=31})]{Flow dependent mixing coefficients (\protect\np[=31]{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np[=31]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})}
+In that case, the eddy coefficient is proportional to the local velocity magnitude so that the Reynolds number $Re =  \lvert U \rvert  e / A_l$ is constant (and here hardcoded to $12$):
+\colorbox{yellow}{JC comment: The Reynolds is effectively set to 12 in the code for both operators but shouldn't it be 2 for Laplacian ?}
+
+\begin{equation}
+  \label{eq:LDF_flowah}
+  A_l = \left\{
+    \begin{aligned}
+      & \frac{1}{12} \lvert U \rvert e  			& \text{for laplacian operator } \\
+      & \frac{1}{12} \lvert U \rvert e^3 		        & \text{for bilaplacian operator }
+    \end{aligned}
+  \right.
+\end{equation}
+
+%% =================================================================================================
+\subsection[Deformation rate dependent viscosities (\forcode{nn_ahm_ijk_t=32})]{Deformation rate dependent viscosities (\protect\np[=32]{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})}
+
+This option refers to the \citep{smagorinsky_MW63} scheme which is here implemented for momentum only. Smagorinsky chose as a
+characteristic time scale $T_{smag}$ the deformation rate and for the lengthscale $L_{smag}$ the maximum wavenumber possible on the horizontal grid, e.g.:
+
+\begin{equation}
+  \label{eq:LDF_smag1}
+  \begin{split}
+    T_{smag}^{-1} & = \sqrt{\left( \partial_x u - \partial_y v\right)^2 + \left( \partial_y u + \partial_x v\right)^2  } \\
+    L_{smag} & = \frac{1}{\pi}\frac{e_1 e_2}{e_1 + e_2}
+  \end{split}
+\end{equation}
+
+Introducing a user defined constant $C$ (given in the namelist as \np{rn_csmc}{rn\_csmc}), one can deduce the mixing coefficients as follows:
+
+\begin{equation}
+  \label{eq:LDF_smag2}
+  A_{smag} = \left\{
+    \begin{aligned}
+      & C^2  T_{smag}^{-1}  L_{smag}^2			& \text{for laplacian operator } \\
+      & \frac{C^2}{8} T_{smag}^{-1} L_{smag}^4     	& \text{for bilaplacian operator }
+    \end{aligned}
+  \right.
+\end{equation}
+
+For stability reasons, upper and lower limits are applied on the resulting coefficient (see \autoref{sec:TD_forward_imp}) so that:
+\begin{equation}
+  \label{eq:LDF_smag3}
+    \begin{aligned}
+      & C_{min} \frac{1}{2}   \lvert U \rvert  e    < A_{smag} < C_{max} \frac{e^2}{   8\rdt}                 & \text{for laplacian operator } \\
+      & C_{min} \frac{1}{12} \lvert U \rvert  e^3 < A_{smag} < C_{max} \frac{e^4}{64 \rdt}                 & \text{for bilaplacian operator }
+    \end{aligned}
+\end{equation}
+
+where $C_{min}$ and $C_{max}$ are adimensional namelist parameters given by \np{rn_minfac}{rn\_minfac} and \np{rn_maxfac}{rn\_maxfac} respectively.
+
+%% =================================================================================================
+\subsection{About space and time varying mixing coefficients}
 
 The following points are relevant when the eddy coefficient varies spatially:
 
 (1) the momentum diffusion operator acting along model level surfaces is written in terms of curl and
-divergent components of the horizontal current (see \autoref{subsec:PE_ldf}).
+divergent components of the horizontal current (see \autoref{subsec:MB_ldf}).
 Although the eddy coefficient could be set to different values in these two terms,
-this option is not currently available. 
+this option is not currently available.
 
 (2) with an horizontally varying viscosity, the quadratic integral constraints on enstrophy and on the square of
 the horizontal divergence for operators acting along model-surfaces are no longer satisfied
-(\autoref{sec:dynldf_properties}).
-
-(3) for isopycnal diffusion on momentum or tracers, an additional purely horizontal background diffusion with
-uniform coefficient can be added by setting a non zero value of \np{rn\_ahmb0} or \np{rn\_ahtb0},
-a background horizontal eddy viscosity or diffusivity coefficient
-(namelist parameters whose default values are $0$).
-However, the technique used to compute the isopycnal slopes is intended to get rid of such a background diffusion,
-since it introduces spurious diapycnal diffusion (see \autoref{sec:LDF_slp}).
-
-(4) when an eddy induced advection term is used (\key{traldf\_eiv}),
-$A^{eiv}$, the eddy induced coefficient has to be defined.
-Its space variations are controlled by the same CPP variable as for the eddy diffusivity coefficient
-(\ie \key{traldf\_cNd}). 
-
-(5) the eddy coefficient associated with a biharmonic operator must be set to a \emph{negative} value.
-
-(6) it is possible to use both the laplacian and biharmonic operators concurrently.
-
-(7) it is possible to run without explicit lateral diffusion on momentum
-(\np{ln\_dynldf\_lap}\forcode{ = .?.}\np{ln\_dynldf\_bilap}\forcode{ = .false.}).
-This is recommended when using the UBS advection scheme on momentum (\np{ln\_dynadv\_ubs}\forcode{ = .true.},
-see \autoref{subsec:DYN_adv_ubs}) and can be useful for testing purposes.
-
-% ================================================================
-% Eddy Induced Mixing
-% ================================================================
-\section{Eddy induced velocity (\protect\mdl{traadv\_eiv}, \protect\mdl{ldfeiv})}
+(\autoref{sec:INVARIANTS_dynldf_properties}).
+
+%% =================================================================================================
+\section[Eddy induced velocity (\forcode{ln_ldfeiv})]{Eddy induced velocity (\protect\np{ln_ldfeiv}{ln\_ldfeiv})}
+
 \label{sec:LDF_eiv}
 
+\begin{listing}
+  \nlst{namtra_eiv}
+  \caption{\forcode{&namtra_eiv}}
+  \label{lst:namtra_eiv}
+\end{listing}
+
 %%gm  from Triad appendix  : to be incorporated....
-\gmcomment{
+\cmtgm{
   Values of iso-neutral diffusivity and GM coefficient are set as described in \autoref{sec:LDF_coef}.
   If none of the keys \key{traldf\_cNd}, N=1,2,3 is set (the default), spatially constant iso-neutral $A_l$ and
-  GM diffusivity $A_e$ are directly set by \np{rn\_aeih\_0} and \np{rn\_aeiv\_0}.
+  GM diffusivity $A_e$ are directly set by \np{rn_aeih_0}{rn\_aeih\_0} and \np{rn_aeiv_0}{rn\_aeiv\_0}.
   If 2D-varying coefficients are set with \key{traldf\_c2d} then $A_l$ is reduced in proportion with horizontal
   scale factor according to \autoref{eq:title}
@@ -450,16 +494,17 @@
     In this case, $A_e$ at low latitudes $|\theta|<20^{\circ}$ is further reduced by a factor $|f/f_{20}|$,
     where $f_{20}$ is the value of $f$ at $20^{\circ}$~N
-  } (\mdl{ldfeiv}) and \np{rn\_aeiv\_0} is ignored unless it is zero.
+  } (\mdl{ldfeiv}) and \np{rn_aeiv_0}{rn\_aeiv\_0} is ignored unless it is zero.
 }
 
-When Gent and McWilliams [1990] diffusion is used (\key{traldf\_eiv} defined),
+When  \citet{gent.mcwilliams_JPO90} diffusion is used (\np[=.true.]{ln_ldfeiv}{ln\_ldfeiv}),
 an eddy induced tracer advection term is added,
 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,
-and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $s$-coordinates.
-The eddy induced velocity is given by: 
-\begin{equation}
-  \label{eq:ldfeiv}
+\ie\ \autoref{eq:LDF_slp_geo} is used in $z$-coordinates,
+and the sum \autoref{eq:LDF_slp_geo} + \autoref{eq:LDF_slp_iso} in $s$-coordinates.
+
+If isopycnal mixing is used in the standard way, \ie\ \np[=.false.]{ln_traldf_triad}{ln\_traldf\_triad}, the eddy induced velocity is given by:
+\begin{equation}
+  \label{eq:LDF_eiv}
   \begin{split}
     u^* & = \frac{1}{e_{2u}e_{3u}}\; \delta_k \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right]\\
@@ -468,21 +513,36 @@
   \end{split}
 \end{equation}
-where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{rn\_aeiv},
-a \textit{nam\_traldf} namelist parameter.
-The three components of the eddy induced velocity are computed and
-add to the eulerian velocity in \mdl{traadv\_eiv}.
+where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{nn_aei_ijk_t}{nn\_aei\_ijk\_t} \nam{tra_eiv}{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.
 This has been preferred to a separate computation of the advective trends associated with the eiv velocity,
 since it allows us to take advantage of all the advection schemes offered for the tracers
 (see \autoref{sec:TRA_adv}) and not just the $2^{nd}$ order advection scheme as in
-previous releases of OPA \citep{Madec1998}.
+previous releases of OPA \citep{madec.delecluse.ea_NPM98}.
 This is particularly useful for passive tracers where \emph{positivity} of the advection scheme is of
-paramount importance. 
+paramount importance.
 
 At the surface, lateral and bottom boundaries, the eddy induced velocity,
-and thus the advective eddy fluxes of heat and salt, are set to zero. 
-
-\biblio
-
-\pindex
+and thus the advective eddy fluxes of heat and salt, are set to zero.
+The value of the eddy induced mixing coefficient and its space variation is controlled in a similar way as for lateral mixing coefficient described in the preceding subsection (\np{nn_aei_ijk_t}{nn\_aei\_ijk\_t}, \np{rn_Ue}{rn\_Ue}, \np{rn_Le}{rn\_Le} namelist parameters).
+\colorbox{yellow}{CASE \np{nn_aei_ijk_t}{nn\_aei\_ijk\_t} = 21 to be added}
+
+In case of setting \np[=.true.]{ln_traldf_triad}{ln\_traldf\_triad}, a skew form of the eddy induced advective fluxes is used, which is described in \autoref{apdx:TRIADS}.
+
+%% =================================================================================================
+\section[Mixed layer eddies (\forcode{ln_mle})]{Mixed layer eddies (\protect\np{ln_mle}{ln\_mle})}
+\label{sec:LDF_mle}
+
+\begin{listing}
+  \nlst{namtra_mle}
+  \caption{\forcode{&namtra_mle}}
+  \label{lst:namtra_mle}
+\end{listing}
+
+If  \np[=.true.]{ln_mle}{ln\_mle} in \nam{tra_mle}{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}
+
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_OBS.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_OBS.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_OBS.tex	(revision 11831)
@@ -2,25 +2,45 @@
 
 \begin{document}
-% ================================================================
-% Chapter observation operator (OBS)
-% ================================================================
+
 \chapter{Observation and Model Comparison (OBS)}
 \label{chap:OBS}
 
-Authors: D. Lea, M. Martin, K. Mogensen, A. Vidard, A. Weaver, A. Ryan, ...   % do we keep that ?
-
-\minitoc
-
-\newpage
-
-The observation and model comparison code (OBS) reads in observation files
-(profile temperature and salinity, sea surface temperature, sea level anomaly, sea ice concentration, and velocity) and calculates an interpolated model equivalent value at the observation location and nearest model timestep.
+%\subsubsection*{Changes record}
+%\begin{tabular}{l||l|m{0.65\linewidth}}
+%    Release   & Author        & Modifications \\
+%    {\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}  \\
+%    {\em --\texttt{"}--} & {\em ... K. Mogensen, A. Vidard, A. Weaver} & {\em ---\texttt{"}---}  \\
+%\end{tabular}
+
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
+
+The observation and model comparison code, the observation operator (OBS), reads in observation files
+(profile temperature and salinity, sea surface temperature, sea level anomaly, sea ice concentration, and velocity) and calculates an interpolated model equivalent value at the observation location and nearest model time step.
 The resulting data are saved in a ``feedback'' file (or files).
 The code was originally developed for use with the NEMOVAR data assimilation code,
 but can be used for validation or verification of the model or with any other data assimilation system.
 
-The OBS code is called from \mdl{nemogcm} for model initialisation and to calculate the model equivalent values for observations on the 0th timestep.
-The code is then called again after each timestep from \mdl{step}.
-The code is only activated if the namelist logical \np{ln\_diaobs} is set to true.
+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 \nam{obs}{obs} namelist logical \np{ln_diaobs}{ln\_diaobs} is set to true.
 
 For all data types a 2D horizontal interpolator or averager is needed to
@@ -28,92 +48,95 @@
 For {\em in situ} profiles, a 1D vertical interpolator is needed in addition to
 provide model fields at the observation depths.
-This now works in a generalised vertical coordinate system. 
-
-Some profile observation types (\eg tropical moored buoys) are made available as daily averaged quantities.
+This now works in a generalised vertical coordinate system.
+
+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.
+the \np{nn_profdavtypes}{nn\_profdavtypes} namelist array.
 Some SST observations are equivalent to a night-time average value and
 the observation operator code can calculate equivalent night-time average model SST fields by
-setting the namelist value \np{ln\_sstnight} to true.
-Otherwise the model value from the nearest timestep to the observation time is used.
-
-The code is controlled by the namelist \textit{namobs}.
+setting the namelist value \np{ln_sstnight}{ln\_sstnight} to true.
+Otherwise (by default) the model value from the nearest time step to the observation time is used.
+
+The code is controlled by the namelist \nam{obs}{obs}.
 See the following sections for more details on setting up the namelist.
 
-\autoref{sec:OBS_example} introduces a test example of the observation operator code including
+In \autoref{sec:OBS_example} a test example of the observation operator code is introduced, including
 where to obtain data and how to setup the namelist.
-\autoref{sec:OBS_details} introduces some more technical details of the different observation types used and
-also shows a more complete namelist.
-\autoref{sec:OBS_theory} introduces some of the theoretical aspects of the observation operator including
+In \autoref{sec:OBS_details} some more technical details of the different observation types used are introduced, and we
+also show a more complete namelist.
+In \autoref{sec:OBS_theory} some of the theoretical aspects of the observation operator are described including
 interpolation methods and running on multiple processors.
-\autoref{sec:OBS_ooo} describes the offline observation operator code.
-\autoref{sec:OBS_obsutils} introduces some utilities to help working with the files produced by the OBS code.
-
-% ================================================================
-% Example
-% ================================================================
+In \autoref{sec:OBS_sao} the standalone observation operator code is described.
+In \autoref{sec:OBS_obsutils} we describe some utilities to help work with the files produced by the OBS code.
+
+%% =================================================================================================
 \section{Running the observation operator code example}
 \label{sec:OBS_example}
 
-This section describes an example of running the observation operator code using
-profile data which can be freely downloaded.
-It shows how to adapt an existing run and build of NEMO to run the observation operator.
+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 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}.
   Choose observations which are valid for the period of your test run because
-  the observation operator compares the model and observations for a matching date and time. 
-
-\item Compile the OBSTOOLS code using: 
+  the observation operator compares the model and observations for a matching date and time.
+
+\item Compile the OBSTOOLS code in the \path{tools} directory using:
 \begin{cmds}
-./maketools -n OBSTOOLS -m [ARCH].
+./maketools -n OBSTOOLS -m [ARCH]
 \end{cmds}
 
-\item Convert the EN4 data into feedback format: 
+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:
 \begin{cmds}
 enact2fb.exe profiles_01.nc EN.4.1.1.f.profiles.g10.YYYYMM.nc
 \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.
-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.
+Options are defined through the \nam{obs}{obs} namelist variables.
+The options \np{ln_t3d}{ln\_t3d} and \np{ln_s3d}{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}{cn\_profbfiles} variable.
 The model grid points for a particular observation latitude and longitude are found using
 the grid searching part of the code.
 This can be expensive, particularly for large numbers of observations,
-setting \np{ln\_grid\_search\_lookup} allows the use of a lookup table which
-is saved into an ``xypos`` file (or files).
+setting \np{ln_grid_search_lookup}{ln\_grid\_search\_lookup} allows the use of a lookup table which
+is saved into an \np{cn_gridsearch}{cn\_gridsearch} file (or files).
 This will need to be generated the first time if it does not exist in the run directory.
 However, once produced it will significantly speed up future grid searches.
-Setting \np{ln\_grid\_global} means that the code distributes the observations evenly between processors.
+Setting \np{ln_grid_global}{ln\_grid\_global} means that the code distributes the observations evenly between processors.
 Alternatively each processor will work with observations located within the model subdomain
-(see section~\autoref{subsec:OBS_parallel}).
+(see \autoref{subsec:OBS_parallel}).
 
 A number of utilities are now provided to plot the feedback files, convert and recombine the files.
-These are explained in more detail in section~\autoref{sec:OBS_obsutils}.
-Utilites to convert other input data formats into the feedback format are also described in
-section~\autoref{sec:OBS_obsutils}.
-
+These are explained in more detail in \autoref{sec:OBS_obsutils}.
+Utilities to convert other input data formats into the feedback format are also described in
+\autoref{sec:OBS_obsutils}.
+
+%% =================================================================================================
 \section{Technical details (feedback type observation file headers)}
 \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}{obs} and also show the NetCDF headers of
 the observation files that may be used with the observation operator.
 
-%------------------------------------------namobs--------------------------------------------------------
-
-\nlst{namobs}
-%-------------------------------------------------------------------------------------------------------------
-
-The observation operator code uses the "feedback" observation file format for all data types.
+\begin{listing}
+  \nlst{namobs}
+  \caption{\forcode{&namobs}}
+  \label{lst:namobs}
+\end{listing}
+
+The observation operator code uses the feedback observation file format for all data types.
 All the observation files must be in NetCDF format.
 Some example headers (produced using \mbox{\textit{ncdump~-h}}) for profile data, sea level anomaly and
 sea surface temperature are in the following subsections.
 
-\subsection{Profile feedback}
+%% =================================================================================================
+\subsection{Profile feedback file}
 
 \begin{clines}
@@ -271,5 +294,6 @@
 \end{clines}
 
-\subsection{Sea level anomaly feedback}
+%% =================================================================================================
+\subsection{Sea level anomaly feedback file}
 
 \begin{clines}
@@ -395,5 +419,5 @@
 \end{clines}
 
-The mean dynamic topography (MDT) must be provided in a separate file defined on
+To use Sea Level Anomaly (SLA) data the mean dynamic topography (MDT) must be provided in a separate file defined on
 the model grid called \ifile{slaReferenceLevel}.
 The MDT is required in order to produce the model equivalent sea level anomaly from the model sea surface height.
@@ -417,5 +441,6 @@
 \end{clines}
 
-\subsection{Sea surface temperature feedback}
+%% =================================================================================================
+\subsection{Sea surface temperature feedback file}
 
 \begin{clines}
@@ -534,7 +559,9 @@
 \end{clines}
 
+%% =================================================================================================
 \section{Theoretical details}
 \label{sec:OBS_theory}
 
+%% =================================================================================================
 \subsection{Horizontal interpolation and averaging methods}
 
@@ -542,114 +569,122 @@
 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
-(for surface observation types only). 
-
-The main namelist option associated with the interpolation/averaging is \np{nn\_2dint}.
+\NEMO\ therefore has the capability to specify either an interpolation or an averaging
+(for surface observation types only).
+
+The main namelist option associated with the interpolation/averaging is \np{nn_2dint}{nn\_2dint}.
 This default option can be set to values from 0 to 6.
 Values between 0 to 4 are associated with interpolation while values 5 or 6 are associated with averaging.
 \begin{itemize}
-\item \np{nn\_2dint}\forcode{ = 0}: Distance-weighted interpolation
-\item \np{nn\_2dint}\forcode{ = 1}: Distance-weighted interpolation (small angle)
-\item \np{nn\_2dint}\forcode{ = 2}: Bilinear interpolation (geographical grid)
-\item \np{nn\_2dint}\forcode{ = 3}: Bilinear remapping interpolation (general grid)
-\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\_???\_avglamscl} in degrees or metres (set using \np{ln\_???\_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\_???\_avglamscl} and \np{rn\_???\_avgphiscl} in degrees or metres
-  (set using \np{ln\_???\_fp\_indegs})
+\item \np[=0]{nn_2dint}{nn\_2dint}: Distance-weighted interpolation
+\item \np[=1]{nn_2dint}{nn\_2dint}: Distance-weighted interpolation (small angle)
+\item \np[=2]{nn_2dint}{nn\_2dint}: Bilinear interpolation (geographical grid)
+\item \np[=3]{nn_2dint}{nn\_2dint}: Bilinear remapping interpolation (general grid)
+\item \np[=4]{nn_2dint}{nn\_2dint}: Polynomial interpolation
+\item \np[=5]{nn_2dint}{nn\_2dint}: Radial footprint averaging with diameter specified in the namelist as
+  \texttt{rn\_[var]\_avglamscl} in degrees or metres (set using \texttt{ln\_[var]\_fp\_indegs})
+\item \np[=6]{nn_2dint}{nn\_2dint}: Rectangular footprint averaging with E/W and N/S size specified in
+  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}
-The ??? in the last two options indicate these options should be specified for each observation type 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\_???} where ??? is one of sla,sst,sss,sic.
-
-Below is some more detail on the various options for interpolation and averaging available in NEMO.
-
+The \np{nn_2dint}{nn\_2dint} default option can be overridden for surface observation types using
+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}
 
-Consider an observation point ${\rm P}$ with with longitude and latitude $({\lambda_{}}_{\rm P}, \phi_{\rm P})$ and
-the four nearest neighbouring model grid points ${\rm A}$, ${\rm B}$, ${\rm C}$ and ${\rm D}$ with
-longitude and latitude ($\lambda_{\rm A}$, $\phi_{\rm A}$),($\lambda_{\rm B}$, $\phi_{\rm B}$) etc.
-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 ${\rm A}$, ${\rm B}$ etc.:
+Consider an observation point ${\mathrm P}$ with longitude and latitude (${\lambda_{}}_{\mathrm P}$, $\phi_{\mathrm P}$) and
+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
+a weighted linear combination of the values of the model variables at the grid points ${\mathrm A}$, ${\mathrm B}$ etc.:
+
 \begin{align*}
-  {x_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} &
-                                                   \frac{1}{w} \left( {w_{}}_{\rm A} {x_{}}_{\rm A} +
-                                                   {w_{}}_{\rm B} {x_{}}_{\rm B} +
-                                                   {w_{}}_{\rm C} {x_{}}_{\rm C} +
-                                                   {w_{}}_{\rm D} {x_{}}_{\rm D} \right)
+  {x_{}}_{\mathrm P} =
+\frac{1}{w} \left( {w_{}}_{\mathrm A} {x_{}}_{\mathrm A} +
+{w_{}}_{\mathrm B} {x_{}}_{\mathrm B} +
+{w_{}}_{\mathrm C} {x_{}}_{\mathrm C} +
+{w_{}}_{\mathrm D} {x_{}}_{\mathrm D} \right)
 \end{align*}
-where ${w_{}}_{\rm A}$, ${w_{}}_{\rm B}$ etc. are the respective weights for the model field at
-points ${\rm A}$, ${\rm B}$ etc., and $w = {w_{}}_{\rm A} + {w_{}}_{\rm B} + {w_{}}_{\rm C} + {w_{}}_{\rm D}$.
+
+where ${w_{}}_{\mathrm A}$, ${w_{}}_{\mathrm B}$ etc. are the respective weights for the model field at
+points ${\mathrm A}$, ${\mathrm B}$ etc., and $w = {w_{}}_{\mathrm A} + {w_{}}_{\mathrm B} + {w_{}}_{\mathrm C} + {w_{}}_{\mathrm D}$.
 
 Four different possibilities are available for computing the weights.
 
 \begin{enumerate}
-
-\item[1.] {\bf Great-Circle distance-weighted interpolation.}
+\item {\bfseries Great-Circle distance-weighted interpolation.}
   The weights are computed as a function of the great-circle distance $s(P, \cdot)$ between $P$ and
   the model grid points $A$, $B$ etc.
-  For example, the weight given to the field ${x_{}}_{\rm A}$ is specified as the product of the distances
-  from ${\rm P}$ to the other points:
-  \begin{align*}
-    {w_{}}_{\rm A} = s({\rm P}, {\rm B}) \, s({\rm P}, {\rm C}) \, s({\rm P}, {\rm D})
-  \end{align*}
-  where 
-  \begin{align*}
-    s\left ({\rm P}, {\rm M} \right ) 
-     & \hspace{-2mm} = \hspace{-2mm} & 
-      \cos^{-1} \! \left\{ 
-               \sin {\phi_{}}_{\rm P} \sin {\phi_{}}_{\rm M}
-             + \cos {\phi_{}}_{\rm P} \cos {\phi_{}}_{\rm M} 
-               \cos ({\lambda_{}}_{\rm M} - {\lambda_{}}_{\rm P}) 
+  For example, the weight given to the field ${x_{}}_{\mathrm A}$ is specified as the product of the distances
+  from ${\mathrm P}$ to the other points:
+
+  \begin{alignat*}{2}
+    {w_{}}_{\mathrm A} = s({\mathrm P}, {\mathrm B}) \, s({\mathrm P}, {\mathrm C}) \, s({\mathrm P}, {\mathrm D})
+  \end{alignat*}
+
+  where
+
+  \begin{alignat*}{2}
+    s\left({\mathrm P}, {\mathrm M} \right) & = & \hspace{0.25em} \cos^{-1} \! \left\{
+               \sin {\phi_{}}_{\mathrm P} \sin {\phi_{}}_{\mathrm M}
+             + \cos {\phi_{}}_{\mathrm P} \cos {\phi_{}}_{\mathrm M}
+               \cos ({\lambda_{}}_{\mathrm M} - {\lambda_{}}_{\mathrm P})
                    \right\}
-   \end{align*}
+   \end{alignat*}
+
    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}:
-   \begin{align*}
-     s\left( {\rm P}, {\rm M} \right) & \hspace{-2mm} = \hspace{-2mm} & \sin^{-1} \! \left\{ \sqrt{ 1 - x^2 } \right\}
-   \end{align*}
+   involves the arcsine function (\eg\ see p.~101 of \citet{daley.barker_bk01}:
+
+   \begin{alignat*}{2}
+     s\left( {\mathrm P}, {\mathrm M} \right) = \sin^{-1} \! \left\{ \sqrt{ 1 - x^2 } \right\}
+   \end{alignat*}
+
    where
-   \begin{align*}
-     x & \hspace{-2mm} = \hspace{-2mm} &
-                                         {a_{}}_{\rm M} {a_{}}_{\rm P} + {b_{}}_{\rm M} {b_{}}_{\rm P} + {c_{}}_{\rm M} {c_{}}_{\rm P}
-   \end{align*}
-   and 
-   \begin{align*}
-      {a_{}}_{\rm M} & \hspace{-2mm} = \hspace{-2mm} & \sin {\phi_{}}_{\rm M}, \\
-      {a_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & \sin {\phi_{}}_{\rm P}, \\
-      {b_{}}_{\rm M} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm M} \cos {\phi_{}}_{\rm M}, \\
-      {b_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm P} \cos {\phi_{}}_{\rm P}, \\
-      {c_{}}_{\rm M} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm M} \sin {\phi_{}}_{\rm M}, \\
-      {c_{}}_{\rm P} & \hspace{-2mm} = \hspace{-2mm} & \cos {\phi_{}}_{\rm P} \sin {\phi_{}}_{\rm P}.
-  \end{align*}
-
-\item[2.] {\bf Great-Circle distance-weighted interpolation with small angle approximation.}
+
+   \begin{alignat*}{2}
+     x = {a_{}}_{\mathrm M} {a_{}}_{\mathrm P} + {b_{}}_{\mathrm M} {b_{}}_{\mathrm P} + {c_{}}_{\mathrm M} {c_{}}_{\mathrm P}
+   \end{alignat*}
+
+   and
+
+   \begin{alignat*}{3}
+   & {a_{}}_{\mathrm M} & = && \quad \sin {\phi_{}}_{\mathrm M}, \\
+   & {a_{}}_{\mathrm P} & = && \quad \sin {\phi_{}}_{\mathrm P}, \\
+   & {b_{}}_{\mathrm M} & = && \quad \cos {\phi_{}}_{\mathrm M} \cos {\phi_{}}_{\mathrm M}, \\
+   & {b_{}}_{\mathrm P} & = && \quad \cos {\phi_{}}_{\mathrm P} \cos {\phi_{}}_{\mathrm P}, \\
+   & {c_{}}_{\mathrm M} & = && \quad \cos {\phi_{}}_{\mathrm M} \sin {\phi_{}}_{\mathrm M}, \\
+   & {c_{}}_{\mathrm P} & = && \quad \cos {\phi_{}}_{\mathrm P} \sin {\phi_{}}_{\mathrm P}.
+   \end{alignat*}
+
+\item {\bfseries Great-Circle distance-weighted interpolation with small angle approximation.}
   Similar to the previous interpolation but with the distance $s$ computed as
-  \begin{align*}
-    s\left( {\rm P}, {\rm M} \right)
-    & \hspace{-2mm} = \hspace{-2mm} &
-                                      \sqrt{ \left( {\phi_{}}_{\rm M} - {\phi_{}}_{\rm P} \right)^{2}
-                                      + \left( {\lambda_{}}_{\rm M} - {\lambda_{}}_{\rm P} \right)^{2}
-                                      \cos^{2} {\phi_{}}_{\rm M} }
-  \end{align*}
+  \begin{alignat*}{2}
+    s\left( {\mathrm P}, {\mathrm M} \right)
+    & = & \sqrt{ \left( {\phi_{}}_{\mathrm M} - {\phi_{}}_{\mathrm P} \right)^{2}
+                                      + \left( {\lambda_{}}_{\mathrm M} - {\lambda_{}}_{\mathrm P} \right)^{2}
+                                      \cos^{2} {\phi_{}}_{\mathrm M} }
+  \end{alignat*}
   where $M$ corresponds to $A$, $B$, $C$ or $D$.
 
-\item[3.] {\bf Bilinear interpolation for a regular spaced grid.}
+\item {\bfseries Bilinear interpolation for a regular spaced grid.}
   The interpolation is split into two 1D interpolations in the longitude and latitude directions, respectively.
 
-\item[4.] {\bf Bilinear remapping interpolation for a general grid.}
+\item {\bfseries Bilinear remapping interpolation for a general grid.}
   An iterative scheme that involves first mapping a quadrilateral cell into
   a cell with coordinates (0,0), (1,0), (0,1) and (1,1).
-  This method is based on the SCRIP interpolation package \citep{Jones_1998}.
-  
+  This method is based on the \href{https://github.com/SCRIP-Project/SCRIP}{SCRIP interpolation package}.
+
 \end{enumerate}
 
+%% =================================================================================================
 \subsubsection{Horizontal averaging}
 
@@ -658,8 +693,7 @@
 \item The standard grid-searching code is used to find the nearest model grid point to the observation location
   (see next subsection).
-\item The maximum number of grid points is calculated in the local grid domain for which
-  the averaging is likely need to cover.
-\item The lats/longs of the grid points surrounding the nearest model grid box are extracted using
-  existing mpi routines.
+\item The maximum number of grid points required for that observation in each local grid domain is calculated. Some of these points may later turn out to have zero weight depending on the shape of the footprint.
+\item The longitudes and latitudes of the grid points surrounding the nearest model grid box are extracted using
+  existing MPI routines.
 \item The weights for each grid point associated with each observation are calculated,
   either for radial or rectangular footprints.
@@ -673,76 +707,68 @@
 
 Examples of the weights calculated for an observation with rectangular and radial footprints are shown in
-Figs.~\autoref{fig:obsavgrec} and~\autoref{fig:obsavgrad}.
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+\autoref{fig:OBS_avgrec} and~\autoref{fig:OBS_avgrad}.
+
 \begin{figure}
-  \begin{center}
-    \includegraphics[width=0.90\textwidth]{Fig_OBS_avg_rec}
-    \caption{
-      \protect\label{fig:obsavgrec}
-      Weights associated with each model grid box (blue lines and numbers)
-      for an observation at -170.5\deg{E}, 56.0\deg{N} with a rectangular footprint of 1\deg x 1\deg.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{OBS_avg_rec}
+  \caption[Observational weights with a rectangular footprint]{
+    Weights associated with each model grid box (blue lines and numbers)
+    for an observation at -170.5\deg{E}, 56.0\deg{N} with a rectangular footprint of 1\deg\ x 1\deg.}
+  \label{fig:OBS_avgrec}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
 \begin{figure}
-  \begin{center}
-    \includegraphics[width=0.90\textwidth]{Fig_OBS_avg_rad}
-    \caption{
-      \protect\label{fig:obsavgrad}
-      Weights associated with each model grid box (blue lines and numbers)
-      for an observation at -170.5\deg{E}, 56.0\deg{N} with a radial footprint with diameter 1\deg.
-    } 
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{OBS_avg_rad}
+  \caption[Observational weights with a radial footprint]{
+    Weights associated with each model grid box (blue lines and numbers)
+    for an observation at -170.5\deg{E}, 56.0\deg{N} with a radial footprint with diameter 1\deg.}
+  \label{fig:OBS_avgrad}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-
+
+%% =================================================================================================
 \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 
+Before the interpolation can be performed, a search algorithm is then required to determine the corner points of
 the quadrilateral cell in which the observation is located.
-This is the most difficult and time consuming part of the 2D interpolation procedure. 
+This is the most difficult and time consuming part of the 2D interpolation procedure.
 A robust test for determining if an observation falls within a given quadrilateral cell is as follows.
-Let ${\rm P}({\lambda_{}}_{\rm P} ,{\phi_{}}_{\rm P} )$ denote the observation point,
-and let ${\rm A}({\lambda_{}}_{\rm A} ,{\phi_{}}_{\rm A} )$, ${\rm B}({\lambda_{}}_{\rm B} ,{\phi_{}}_{\rm B} )$,
-${\rm C}({\lambda_{}}_{\rm C} ,{\phi_{}}_{\rm C} )$ and ${\rm D}({\lambda_{}}_{\rm D} ,{\phi_{}}_{\rm D} )$
-denote the bottom left, bottom right, top left and top right corner points of the cell, respectively. 
-To determine if P is inside the cell, we verify that the cross-products 
+Let ${\mathrm P}({\lambda_{}}_{\mathrm P} ,{\phi_{}}_{\mathrm P} )$ denote the observation point,
+and let ${\mathrm A}({\lambda_{}}_{\mathrm A} ,{\phi_{}}_{\mathrm A} )$, ${\mathrm B}({\lambda_{}}_{\mathrm B} ,{\phi_{}}_{\mathrm B} )$,
+${\mathrm C}({\lambda_{}}_{\mathrm C} ,{\phi_{}}_{\mathrm C} )$ and ${\mathrm D}({\lambda_{}}_{\mathrm D} ,{\phi_{}}_{\mathrm D} )$
+denote the bottom left, bottom right, top left and top right corner points of the cell, respectively.
+To determine if P is inside the cell, we verify that the cross-products
 \begin{align*}
   \begin{array}{lllll}
-    {{\bf r}_{}}_{\rm PA} \times {{\bf r}_{}}_{\rm PC}
-    & = & [({\lambda_{}}_{\rm A}\; -\; {\lambda_{}}_{\rm P} )
-          ({\phi_{}}_{\rm C}   \; -\; {\phi_{}}_{\rm P} )
-          - ({\lambda_{}}_{\rm C}\; -\; {\lambda_{}}_{\rm P} )
-          ({\phi_{}}_{\rm A}   \; -\; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\
-    {{\bf r}_{}}_{\rm PB} \times {{\bf r}_{}}_{\rm PA}
-    & = & [({\lambda_{}}_{\rm B}\; -\; {\lambda_{}}_{\rm P} )
-          ({\phi_{}}_{\rm A}   \; -\; {\phi_{}}_{\rm P} )
-          - ({\lambda_{}}_{\rm A}\; -\; {\lambda_{}}_{\rm P} )
-          ({\phi_{}}_{\rm B}   \; -\; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\
-    {{\bf r}_{}}_{\rm PC} \times {{\bf r}_{}}_{\rm PD}
-    & = & [({\lambda_{}}_{\rm C}\; -\; {\lambda_{}}_{\rm P} )
-          ({\phi_{}}_{\rm D}   \; -\; {\phi_{}}_{\rm P} )
-          - ({\lambda_{}}_{\rm D}\; -\; {\lambda_{}}_{\rm P} )
-          ({\phi_{}}_{\rm C}   \; -\; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\
-    {{\bf r}_{}}_{\rm PD} \times {{\bf r}_{}}_{\rm PB}
-    & = & [({\lambda_{}}_{\rm D}\; -\; {\lambda_{}}_{\rm P} )
-          ({\phi_{}}_{\rm B}   \; -\; {\phi_{}}_{\rm P} )
-          - ({\lambda_{}}_{\rm B}\; -\; {\lambda_{}}_{\rm P} )
-          ({\phi_{}}_{\rm D}  \;  - \; {\phi_{}}_{\rm P} )] \; \widehat{\bf k} \\
+    {{\mathbf r}_{}}_{\mathrm PA} \times {{\mathbf r}_{}}_{\mathrm PC}
+    & = & [({\lambda_{}}_{\mathrm A}\; -\; {\lambda_{}}_{\mathrm P} )
+          ({\phi_{}}_{\mathrm C}   \; -\; {\phi_{}}_{\mathrm P} )
+          - ({\lambda_{}}_{\mathrm C}\; -\; {\lambda_{}}_{\mathrm P} )
+          ({\phi_{}}_{\mathrm A}   \; -\; {\phi_{}}_{\mathrm P} )] \; \widehat{\mathbf k} \\
+    {{\mathbf r}_{}}_{\mathrm PB} \times {{\mathbf r}_{}}_{\mathrm PA}
+    & = & [({\lambda_{}}_{\mathrm B}\; -\; {\lambda_{}}_{\mathrm P} )
+          ({\phi_{}}_{\mathrm A}   \; -\; {\phi_{}}_{\mathrm P} )
+          - ({\lambda_{}}_{\mathrm A}\; -\; {\lambda_{}}_{\mathrm P} )
+          ({\phi_{}}_{\mathrm B}   \; -\; {\phi_{}}_{\mathrm P} )] \; \widehat{\mathbf k} \\
+    {{\mathbf r}_{}}_{\mathrm PC} \times {{\mathbf r}_{}}_{\mathrm PD}
+    & = & [({\lambda_{}}_{\mathrm C}\; -\; {\lambda_{}}_{\mathrm P} )
+          ({\phi_{}}_{\mathrm D}   \; -\; {\phi_{}}_{\mathrm P} )
+          - ({\lambda_{}}_{\mathrm D}\; -\; {\lambda_{}}_{\mathrm P} )
+          ({\phi_{}}_{\mathrm C}   \; -\; {\phi_{}}_{\mathrm P} )] \; \widehat{\mathbf k} \\
+    {{\mathbf r}_{}}_{\mathrm PD} \times {{\mathbf r}_{}}_{\mathrm PB}
+    & = & [({\lambda_{}}_{\mathrm D}\; -\; {\lambda_{}}_{\mathrm P} )
+          ({\phi_{}}_{\mathrm B}   \; -\; {\phi_{}}_{\mathrm P} )
+          - ({\lambda_{}}_{\mathrm B}\; -\; {\lambda_{}}_{\mathrm P} )
+          ({\phi_{}}_{\mathrm D}  \;  - \; {\phi_{}}_{\mathrm P} )] \; \widehat{\mathbf k} \\
   \end{array}
-  % \label{eq:cross}
+  % \label{eq:OBS_cross}
 \end{align*}
-point in the opposite direction to the unit normal $\widehat{\bf k}$
-(\ie that the coefficients of $\widehat{\bf k}$ are negative),
-where ${{\bf r}_{}}_{\rm PA}$, ${{\bf r}_{}}_{\rm PB}$, etc. correspond to
+point in the opposite direction to the unit normal $\widehat{\mathbf k}$
+(\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..
-The method used is similar to the method used in the SCRIP interpolation package \citep{Jones_1998}.
+The method used is similar to the method used in the \href{https://github.com/SCRIP-Project/SCRIP}{SCRIP interpolation package}.
 
 In order to speed up the grid search, there is the possibility to construct a lookup table for a user specified resolution.
@@ -750,6 +776,7 @@
 be searched for on a regular grid.
 For each observation position, the closest point on the regular grid of this position is computed and
-the $i$ and $j$ ranges of this point searched to determine the precise four points surrounding the observation. 
-
+the $i$ and $j$ ranges of this point searched to determine the precise four points surrounding the observation.
+
+%% =================================================================================================
 \subsection{Parallel aspects of horizontal interpolation}
 \label{subsec:OBS_parallel}
@@ -757,38 +784,35 @@
 For horizontal interpolation, there is the basic problem that
 the observations are unevenly distributed on the globe.
-In numerical models, it is common to divide the model grid 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.
-This approach is used by \NEMO.
-
-For observations there is no natural distribution since the observations are not equally distributed on the globe. 
+
+For observations there is no natural distribution since the observations are not equally distributed on the globe.
 Two options have been made available:
 1) geographical distribution;
 and 2) round-robin.
 
+%% =================================================================================================
 \subsubsection{Geographical distribution of observations among processors}
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}
-  \begin{center}
-    \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_ASM_obsdist_local}
-    \caption{
-      \protect\label{fig:obslocal}
-      Example of the distribution of observations with the geographical distribution of observational data.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{OBS_obsdist_local}
+  \caption[Observations with the geographical distribution]{
+    Example of the distribution of observations with
+    the geographical distribution of observational data}
+  \label{fig:OBS_local}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
 This is the simplest option in which the observations are distributed according to
 the domain of the grid-point parallelization.
-\autoref{fig:obslocal} shows an example of the distribution of the {\em in situ} data on processors with
-a different colour for each observation on a given processor for a 4 $\times$ 2 decomposition with ORCA2. 
+\autoref{fig:OBS_local} shows an example of the distribution of the {\em in situ} data on processors with
+a different colour for each observation on a given processor for a 4 $\times$ 2 decomposition with ORCA2.
 The grid-point domain decomposition is clearly visible on the plot.
 
 The advantage of this approach is that all information needed for horizontal interpolation is available without
 any MPP communication.
-Of course, this is under the assumption that we are only using a $2 \times 2$ grid-point stencil for
-the interpolation (\eg bilinear interpolation).
+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).
 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.
@@ -796,28 +820,27 @@
 this could lead to load imbalance.
 
+%% =================================================================================================
 \subsubsection{Round-robin distribution of observations among processors}
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}
-  \begin{center}
-    \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_ASM_obsdist_global}
-    \caption{
-      \protect\label{fig:obsglobal}
-      Example of the distribution of observations with the round-robin distribution of observational data.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{OBS_obsdist_global}
+  \caption[Observations with the round-robin distribution]{
+    Example of the distribution of observations with
+    the round-robin distribution of observational data.}
+  \label{fig:OBS_global}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
 An alternative approach is to distribute the observations equally among processors and
 use message passing in order to retrieve the stencil for interpolation.
 The simplest distribution of the observations is to distribute them using a round-robin scheme.
-\autoref{fig:obsglobal} shows the distribution of the {\em in situ} data on processors for
+\autoref{fig:OBS_global} shows the distribution of the {\em in situ} data on processors for
 the round-robin distribution of observations with a different colour for each observation on a given processor for
-a 4 $\times$ 2 decomposition with ORCA2 for the same input data as in \autoref{fig:obslocal}.
+a 4 $\times$ 2 decomposition with ORCA2 for the same input data as in \autoref{fig:OBS_local}.
 The observations are now clearly randomly distributed on the globe.
 In order to be able to perform horizontal interpolation in this case,
 a subroutine has been developed that retrieves any grid points in the global space.
 
+%% =================================================================================================
 \subsection{Vertical interpolation operator}
 
@@ -827,87 +850,65 @@
 At the bottom boundary, this is done using the land-ocean mask.
 
-\newpage
-
-% ================================================================
-% Offline observation operator documentation
-% ================================================================
+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.
 
 %\usepackage{framed}
 
-\section{Offline observation operator}
-\label{sec:OBS_ooo}
-
+%% =================================================================================================
+\section{Standalone observation operator (\texttt{SAO})}
+\label{sec:OBS_sao}
+
+%% =================================================================================================
 \subsection{Concept}
 
-The obs oper maps model variables to observation space.
-It is possible to apply this mapping without running the model.
-The software which performs this functionality is known as the \textbf{offline obs oper}.
-The obs oper is divided into three stages.
-An initialisation phase, an interpolation phase and an output phase.
-The implementation of which is outlined in the previous sections.
-During the interpolation phase the offline obs oper populates the model arrays by
-reading saved model fields from disk.
-
-There are two ways of exploiting this offline capacity.
+The observation operator maps model variables to observation space. This is normally done while the model is running, i.e. online, it is possible to apply this mapping offline without running the model with the \textbf{standalone observation operator} (SAO). The process is divided into an initialisation phase, an interpolation phase and an output phase.
+During the interpolation phase the SAO populates the model arrays by
+reading saved model fields from disk. The interpolation and the output phases use the same OBS code described in the preceding sections.
+
+There are two ways of exploiting the standalone capacity.
 The first is to mimic the behaviour of the online system by supplying model fields at
 regular intervals between the start and the end of the run.
 This approach results in a single model counterpart per observation.
-This kind of usage produces feedback files the same file format as the online obs oper.
-The second is to take advantage of the offline setting in which
-multiple model counterparts can be calculated per observation.
+This kind of usage produces feedback files the same file format as the online observation operator.
+The second is to take advantage of the ability to run offline by calculating
+multiple model counterparts for each observation.
 In this case it is possible to consider all forecasts verifying at the same time.
-By forecast, I mean any method which produces an estimate of physical reality which is not an observed value.
-In the case of class 4 files this means forecasts, analyses, persisted analyses and
-climatological values verifying at the same time.
-Although the class 4 file format doesn't account for multiple ensemble members or
-multiple experiments per observation, it is possible to include these components in the same or multiple files.
-
-%--------------------------------------------------------------------------------------------------------
-% offline_oper.exe 
-%--------------------------------------------------------------------------------------------------------
-
-\subsection{Using the offline observation operator}
-
+By forecast, we mean any method which produces an estimate of physical reality which is not an observed value.
+
+% sao.exe
+
+%% =================================================================================================
+\subsection{Using the standalone observation operator}
+
+%% =================================================================================================
 \subsubsection{Building}
 
-In addition to \emph{OPA\_SRC} the offline obs oper requires the inclusion of the \emph{OOO\_SRC} directory.
-\emph{OOO\_SRC} contains a replacement \mdl{nemo} and \mdl{nemogcm} which
+In addition to \emph{OPA\_SRC} the SAO requires the inclusion of the \emph{SAO\_SRC} directory.
+\emph{SAO\_SRC} contains a replacement \mdl{nemo} and \mdl{nemogcm} which
 overwrites the resultant \textbf{nemo.exe}.
-This is the approach taken by \emph{SAS\_SRC} and \emph{OFF\_SRC}.
-
-%--------------------------------------------------------------------------------------------------------
-% Running 
-%--------------------------------------------------------------------------------------------------------
+Note this a similar approach to that taken by the standalone surface scheme \emph{SAS\_SRC} and the offline TOP model \emph{OFF\_SRC}.
+
+% Running
+%% =================================================================================================
 \subsubsection{Running}
 
-The simplest way to use the executable is to edit and append the \textbf{ooo.nml} namelist to
-a full NEMO namelist and then to run the executable as if it were nemo.exe. 
-
-\subsubsection{Quick script}
-
-A useful Python utility to control the namelist options can be found in \textbf{OBSTOOLS/OOO}.
-The functions which locate model fields and observation files can be manually specified.
-The package can be installed by appropriate use of the included setup.py script.
-
-Documentation can be auto-generated by Sphinx by running \emph{make html} in the \textbf{doc} directory.
-
-%--------------------------------------------------------------------------------------------------------
+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.
+
 % Configuration section
-%--------------------------------------------------------------------------------------------------------
-\subsection{Configuring the offline observation operator}
-The observation files and settings understood by \textbf{namobs} have been outlined in the online obs oper section.
-In addition there are two further namelists wich control the operation of the offline obs oper.
-\textbf{namooo} which controls the input model fields and \textbf{namcl4} which
-controls the production of class 4 files. 
-
+%% =================================================================================================
+\subsection{Configuring the standalone observation operator}
+The observation files and settings understood by \nam{obs}{obs} have been outlined in the online observation operator section.
+In addition is a further namelist \nam{sao}{sao} which used to set the input model fields for the SAO
+
+%% =================================================================================================
 \subsubsection{Single field}
 
-In offline mode model arrays are populated at appropriate time steps via input files.
-At present, \textbf{tsn} and \textbf{sshn} are populated by the default read routines. 
+In the SAO the model arrays are populated at appropriate time steps via input files.
+At present, \textbf{tsn} and \textbf{sshn} are populated by the default read routines.
 These routines will be expanded upon in future versions to allow the specification of any model variable.
 As such, input files must be global versions of the model domain with
 \textbf{votemper}, \textbf{vosaline} and optionally \textbf{sshn} present.
 
-For each field read there must be an entry in the \textbf{namooo} namelist specifying
+For each field read there must be an entry in the \nam{sao}{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.
@@ -915,17 +916,18 @@
 \begin{forlines}
 !----------------------------------------------------------------------
-!       namooo Offline obs_oper namelist
+!       namsao Standalone obs_oper namelist
 !----------------------------------------------------------------------
-!   ooo_files    specifies the files containing the model counterpart
-!   nn_ooo_idx   specifies the time_counter index within the model file
-&namooo
-   ooo_files = "foo.nc"
-   nn_ooo_idx = 2
+!   sao_files    specifies the files containing the model counterpart
+!   nn_sao_idx   specifies the time_counter index within the model file
+&namsao
+   sao_files = "foo.nc"
+   nn_sao_idx = 2
 /
 \end{forlines}
 
+%% =================================================================================================
 \subsubsection{Multiple fields per run}
 
-Model field iteration is controlled via \textbf{nn\_ooo\_freq} which
+Model field iteration is controlled via \textbf{nn\_sao\_freq} which
 specifies the number of model steps at which the next field gets read.
 For example, if 12 hourly fields are to be interpolated in a setup where 288 steps equals 24 hours.
@@ -933,13 +935,13 @@
 \begin{forlines}
 !----------------------------------------------------------------------
-!       namooo Offline obs_oper namelist
+!       namsao Standalone obs_oper namelist
 !----------------------------------------------------------------------
-!   ooo_files    specifies the files containing the model counterpart
-!   nn_ooo_idx   specifies the time_counter index within the model file
-!   nn_ooo_freq  specifies number of time steps between read operations
-&namooo
-   ooo_files = "foo.nc" "foo.nc"
-   nn_ooo_idx = 1 2
-   nn_ooo_freq = 144
+!   sao_files    specifies the files containing the model counterpart
+!   nn_sao_idx   specifies the time_counter index within the model file
+!   nn_sao_freq  specifies number of time steps between read operations
+&namsao
+   sao_files = "foo.nc" "foo.nc"
+   nn_sao_idx = 1 2
+   nn_sao_freq = 144
 /
 \end{forlines}
@@ -952,289 +954,79 @@
 %\end{framed}
 
-It is easy to see how a collection of fields taken fron a number of files at different indices can be combined at
+A collection of fields taken from a number of files at different indices can be combined at
 a particular frequency in time to generate a pseudo model evolution.
-As long as all that is needed is a single model counterpart at a regular interval then
-namooo is all that needs to be edited.
-However, a far more interesting approach can be taken in which multiple forecasts, analyses, persisted analyses and
-climatologies are considered against the same set of observations.
-For this a slightly more complicated approach is needed.
-It is referred to as \emph{Class 4} since it is the fourth metric defined by the GODAE intercomparison project.
-
-%--------------------------------------------------------------------------------------------------------
-% Class 4 file section
-%--------------------------------------------------------------------------------------------------------
-\subsubsection{Multiple model counterparts per observation a.k.a Class 4}
-
-A generalisation of feedback files to allow multiple model components per observation.
-For a single observation, as well as previous forecasts verifying at the same time
-there are also analyses, persisted analyses and climatologies. 
-
-
-The above namelist performs two basic functions.
-It organises the fields given in \textbf{namooo} into groups so that observations can be matched up multiple times.
-It also controls the metadata and the output variable of the class 4 file when a write routine is called.
-
-%\begin{framed}
-\textbf{Note: ln\_cl4} must be set to \forcode{.true.} in \textbf{namobs} to use class 4 outputs.
-%\end{framed}
-
-\subsubsection{Class 4 naming convention}
-
-The standard class 4 file naming convention is as follows.
-
-\noindent
-\linebreak
-\textbf{\$\{prefix\}\_\$\{yyyymmdd\}\_\$\{sys\}\_\$\{cfg\}\_\$\{vn\}\_\$\{kind\}\_\$\{nproc\}}.nc
-
-\noindent
-\linebreak
-Much of the namelist is devoted to specifying this convention.
-The following namelist settings control the elements of the output file names.
-Each should be specified as a single string of character data.
-
-\begin{description}
-\item[cl4\_prefix]
-  Prefix for class 4 files \eg class4
-\item[cl4\_date]
-  YYYYMMDD validity date
-\item[cl4\_sys]
-  The name of the class 4 model system \eg FOAM
-\item[cl4\_cfg]
-  The name of the class 4 model configuration \eg orca025
-\item[cl4\_vn]
-  The name of the class 4 model version \eg 12.0
-\end{description}
-
-\noindent
-The kind is specified by the observation type internally to the obs oper.
-The processor number is specified internally in NEMO. 
-
-\subsubsection{Class 4 file global attributes}
-
-Global attributes necessary to fulfill the class 4 file definition.
-These are also useful pieces of information when collaborating with external partners.
-
-\begin{description}
-\item[cl4\_contact]
-  Contact email for class 4 files.
-\item[cl4\_inst]
-  The name of the producers institution.
-\item[cl4\_cfg]
-  The name of the class 4 model configuration \eg orca025
-\item[cl4\_vn]
-  The name of the class 4 model version \eg 12.0
-\end{description}
-
-\noindent
-The obs\_type, creation date and validity time are specified internally to the obs oper.
-
-\subsubsection{Class 4 model counterpart configuration}
-
-As seen previously it is possible to perform a single sweep of the obs oper and
-specify a collection of model fields equally spaced along that sweep.
-In the class 4 case the single sweep is replaced with multiple sweeps and
-a certain ammount of book keeping is needed to ensure each model counterpart makes its way to
-the correct piece of memory in the output files.
-
-\noindent
-\linebreak
-In terms of book keeping, the offline obs oper needs to know how many full sweeps need to be performed.
-This is specified via the \textbf{cl4\_match\_len} variable and
-is the total number of model counterparts per observation.
-For example, a 3 forecasts plus 3 persistence fields plus an analysis field would be 7 counterparts per observation.
-
-\begin{forlines}
-   cl4_match_len = 7
-\end{forlines}
-
-Then to correctly allocate a class 4 file the forecast axis must be defined.
-This is controlled via \textbf{cl4\_fcst\_len}, which in out above example would be 3.
-
-\begin{forlines}
-   cl4_fcst_len = 3
-\end{forlines}
-
-Then for each model field it is necessary to designate what class 4 variable and index along
-the forecast dimension the model counterpart should be stored in the output file.
-As well as a value for that lead time in hours, this will be useful when interpreting the data afterwards. 
-
-\begin{forlines}
-   cl4_vars = "forecast" "forecast" "forecast" "persistence" "persistence"
-              "persistence" "best_estimate"
-   cl4_fcst_idx = 1 2 3 1 2 3 1
-   cl4_leadtime = 12 36 60 
-\end{forlines}
-
-In terms of files and indices of fields inside each file the class 4 approach makes use of
-the \textbf{namooo} namelist.
-If our fields are in separate files with a single field per file our example inputs will be specified.
-
-\begin{forlines}
-   ooo_files = "F.1.nc" "F.2.nc" "F.3.nc" "P.1.nc" "P.2.nc" "P.3.nc" "A.1.nc"
-   nn_ooo_idx = 1 1 1 1 1 1 1
-\end{forlines}
-
-When we combine all of the naming conventions, global attributes and i/o instructions the class 4 namelist becomes.
-
-\begin{forlines}
-!----------------------------------------------------------------------
-!       namooo Offline obs_oper namelist
-!----------------------------------------------------------------------
-!   ooo_files    specifies the files containing the model counterpart
-!   nn_ooo_idx   specifies the time_counter index within the model file
-!   nn_ooo_freq  specifies number of time steps between read operations
-&namooo
-   ooo_files = "F.1.nc" "F.2.nc" "F.3.nc" "P.1.nc" "P.2.nc" "P.3.nc" "A.1.nc"
-   nn_ooo_idx = 1 1 1 1 1 1 1
-/
-!----------------------------------------------------------------------
-!       namcl4 Offline obs_oper class 4 namelist
-!----------------------------------------------------------------------
-!
-!  Naming convention
-!  -----------------
-!  cl4_prefix    specifies the output file prefix
-!  cl4_date      specifies the output file validity date
-!  cl4_sys       specifies the model counterpart system
-!  cl4_cfg       specifies the model counterpart configuration
-!  cl4_vn        specifies the model counterpart version
-!  cl4_inst      specifies the model counterpart institute
-!  cl4_contact   specifies the file producers contact details
-!
-!  I/O specification
-!  -----------------
-!  cl4_vars      specifies the names of the output file netcdf variable
-!  cl4_fcst_idx  specifies output file forecast index
-!  cl4_fcst_len  specifies forecast axis length
-!  cl4_match_len specifies number of unique matches per observation
-!  cl4_leadtime  specifies the forecast axis lead time 
-!
-&namcl4
-   cl4_match_len = 7
-   cl4_fcst_len = 3
-   cl4_fcst_idx = 1 2 3 1 2 3 1
-   cl4_vars = "forecast" "forecast" "forecast" "persistence" "persistence"
-              "persistence" "best_estimate"
-   cl4_leadtime = 12 36 60
-   cl4_prefix = "class4"
-   cl4_date = "20130101"
-   cl4_vn = "12.0"
-   cl4_sys = "FOAM"
-   cl4_cfg = "AMM7"
-   cl4_contact = "example@example.com"
-   cl4_inst = "UK Met Office"
-/
-\end{forlines}
-
-\subsubsection{Climatology interpolation}
-
-The climatological counterpart is generated at the start of the run by
-restarting the model from climatology through appropriate use of \textbf{namtsd}.
-To override the offline observation operator read routine and to take advantage of the restart settings,
-specify the first entry in \textbf{cl4\_vars} as "climatology".
-This will then pipe the restart from climatology into the output class 4 file.
-As in every other class 4 matchup the input file, input index and output index must be specified.
-These can be replaced with dummy data since they are not used but
-they must be present to cycle through the matchups correctly. 
-
-\subsection{Advanced usage}
-
-In certain cases it may be desirable to include both multiple model fields per observation window with
-multiple match ups per observation.
-This can be achieved by specifying \textbf{nn\_ooo\_freq} as well as the class 4 settings.
-Care must be taken in generating the ooo\_files list such that the files are arranged into
-consecutive blocks of single match ups.
-For example, 2 forecast fields of 12 hourly data would result in 4 separate read operations but
-only 2 write operations, 1 per forecast.
-
-\begin{forlines}
-   ooo_files = "F1.nc" "F1.nc" "F2.nc" "F2.nc"
-...
-   cl4_fcst_idx = 1 2
-\end{forlines}
-
-The above notation reveals the internal split between match up iterators and file iterators.
-This technique has not been used before so experimentation is needed before results can be trusted.
-
-\newpage
-
+If all that is needed is a single model counterpart at a regular interval then
+the standard SAO is all that is required.
+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.
+
+%% =================================================================================================
 \section{Observation utilities}
 \label{sec:OBS_obsutils}
 
-Some tools for viewing and processing of observation and feedback files are provided in
-the NEMO repository for convenience.
-These include OBSTOOLS which are a collection of \fortran programs which are helpful to deal with feedback files.
+For convenience some tools for viewing and processing of observation and feedback files are provided in
+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,
 some basic statistical analysis of feedback files.
-The other tool is an IDL program called dataplot which uses a graphical interface to
+The other main tool is an IDL program called dataplot which uses a graphical interface to
 visualise observations and feedback files.
 OBSTOOLS and dataplot are described in more detail below.
 
+%% =================================================================================================
 \subsection{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 NEMO observation operator.
-The utilities are as follows
-
-\subsubsection{c4comb}
-
-The program c4comb combines multiple class 4 files produced by individual processors in
-an MPI run of NEMO offline obs\_oper into a single class 4 file.
-The program is called in the following way:
-
-
-\footnotesize
-\begin{cmds}
-c4comb.exe outputfile inputfile1 inputfile2 ...
-\end{cmds}
-
+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
+
+%% =================================================================================================
 \subsubsection{corio2fb}
 
 The program corio2fb converts profile observation files from the Coriolis format to the standard feedback format.
-The program is called in the following way:
-
-\footnotesize
+It is called in the following way:
+
 \begin{cmds}
 corio2fb.exe outputfile inputfile1 inputfile2 ...
 \end{cmds}
 
+%% =================================================================================================
 \subsubsection{enact2fb}
 
 The program enact2fb converts profile observation files from the ENACT format to the standard feedback format.
-The program is called in the following way:
-
-\footnotesize
+It is called in the following way:
+
 \begin{cmds}
 enact2fb.exe outputfile inputfile1 inputfile2 ...
 \end{cmds}
 
+%% =================================================================================================
 \subsubsection{fbcomb}
 
 The program fbcomb combines multiple feedback files produced by individual processors in
-an MPI run of NEMO into a single feedback file.
-The program is called in the following way:
-
-\footnotesize
+an MPI run of \NEMO\ into a single feedback file.
+It is called in the following way:
+
 \begin{cmds}
 fbcomb.exe outputfile inputfile1 inputfile2 ...
 \end{cmds}
 
+%% =================================================================================================
 \subsubsection{fbmatchup}
 
 The program fbmatchup will match observations from two feedback files.
-The program is called in the following way:
-
-\footnotesize
+It is called in the following way:
+
 \begin{cmds}
 fbmatchup.exe outputfile inputfile1 varname1 inputfile2 varname2 ...
 \end{cmds}
 
+%% =================================================================================================
 \subsubsection{fbprint}
 
 The program fbprint will print the contents of a feedback file or files to standard output.
 Selected information can be output using optional arguments.
-The program is called in the following way:
-
-\footnotesize
+It is called in the following way:
+
 \begin{cmds}
 fbprint.exe [options] inputfile
@@ -1246,11 +1038,11 @@
      -B            Select observations based on QC flags
      -u            unsorted
-     -s ID         select station ID  
+     -s ID         select station ID
      -t TYPE       select observation type
-     -v NUM1-NUM2  select variable range to print by number 
+     -v NUM1-NUM2  select variable range to print by number
                       (default all)
-     -a NUM1-NUM2  select additional variable range to print by number 
+     -a NUM1-NUM2  select additional variable range to print by number
                       (default all)
-     -e NUM1-NUM2  select extra variable range to print by number 
+     -e NUM1-NUM2  select extra variable range to print by number
                       (default all)
      -d            output date range
@@ -1259,41 +1051,41 @@
 \end{cmds}
 
+%% =================================================================================================
 \subsubsection{fbsel}
 
 The program fbsel will select or subsample observations.
-The program is called in the following way:
-
-\footnotesize
+It is called in the following way:
+
 \begin{cmds}
 fbsel.exe <input filename> <output filename>
 \end{cmds}
 
+%% =================================================================================================
 \subsubsection{fbstat}
 
 The program fbstat will output summary statistics in different global areas into a number of files.
-The program is called in the following way:
-
-\footnotesize
+It is called in the following way:
+
 \begin{cmds}
 fbstat.exe [-nmlev] <filenames>
 \end{cmds}
 
+%% =================================================================================================
 \subsubsection{fbthin}
 
 The program fbthin will thin the data to 1 degree resolution.
 The code could easily be modified to thin to a different resolution.
-The program is called in the following way:
-
-\footnotesize
+It is called in the following way:
+
 \begin{cmds}
 fbthin.exe inputfile outputfile
 \end{cmds}
 
+%% =================================================================================================
 \subsubsection{sla2fb}
 
 The program sla2fb will convert an AVISO SLA format file to feedback format.
-The program is called in the following way:
-
-\footnotesize
+It is called in the following way:
+
 \begin{cmds}
 sla2fb.exe [-s type] outputfile inputfile1 inputfile2 ...
@@ -1303,25 +1095,28 @@
 \end{cmds}
 
+%% =================================================================================================
 \subsubsection{vel2fb}
 
 The program vel2fb will convert TAO/PIRATA/RAMA currents files to feedback format.
-The program is called in the following way:
-
-\footnotesize
+It is called in the following way:
+
 \begin{cmds}
 vel2fb.exe outputfile inputfile1 inputfile2 ...
 \end{cmds}
 
+%% =================================================================================================
 \subsection{Building the obstools}
 
 To build the obstools use in the tools directory use ./maketools -n OBSTOOLS -m [ARCH].
 
+%% =================================================================================================
 \subsection{Dataplot}
 
 An IDL program called dataplot is included which uses a graphical interface to
-visualise observations and feedback files.
+visualise observations and feedback files. Note a similar package has recently developed in python (also called dataplot) which does some of the same things that the IDL dataplot does. Please contact the authors of the this chapter if you are interested in this.
+
 It is possible to zoom in, plot individual profiles and calculate some basic statistics.
 To plot some data run IDL and then:
-\footnotesize
+
 \begin{minted}{idl}
 IDL> dataplot, "filename"
@@ -1331,5 +1126,5 @@
 for example multiple feedback files from different processors or from different days,
 the easiest method is to use the spawn command to generate a list of files which can then be passed to dataplot.
-\footnotesize
+
 \begin{minted}{idl}
 IDL> spawn, 'ls profb*.nc', files
@@ -1337,5 +1132,5 @@
 \end{minted}
 
-\autoref{fig:obsdataplotmain} shows the main window which is launched when dataplot starts.
+\autoref{fig:OBS_dataplotmain} shows the main window which is launched when dataplot starts.
 This is split into three parts.
 At the top there is a menu bar which contains a variety of drop down menus.
@@ -1350,5 +1145,5 @@
 The plotting colour range can be changed by clicking on the colour bar.
 The title of the plot gives some basic information about the date range and depth range shown,
-the extreme values, and the mean and rms values.
+the extreme values, and the mean and RMS values.
 It is possible to zoom in using a drag-box.
 You may also zoom in or out using the mouse wheel.
@@ -1362,41 +1157,28 @@
 observation minus background value.
 The next group of radio buttons selects the map projection.
-This can either be regular latitude longitude grid, or north or south polar stereographic.
+This can either be regular longitude latitude grid, or north or south polar stereographic.
 The next group of radio buttons will plot bad observations, switch to salinity and
 plot density for profile observations.
 The rightmost group of buttons will print the plot window as a postscript, save it as png, or exit from dataplot.
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}
-  \begin{center}
-    % \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_OBS_dataplot_main}
-    \includegraphics[width=9cm,angle=-90.]{Fig_OBS_dataplot_main}
-    \caption{
-      \protect\label{fig:obsdataplotmain}
-      Main window of dataplot.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{OBS_dataplot_main}
+  \caption{Main window of dataplot}
+  \label{fig:OBS_dataplotmain}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
 If a profile point is clicked with the mouse button a plot of the observation and background values as
-a function of depth (\autoref{fig:obsdataplotprofile}).
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+a function of depth (\autoref{fig:OBS_dataplotprofile}).
+
 \begin{figure}
-  \begin{center}
-    % \includegraphics[width=10cm,height=12cm,angle=-90.]{Fig_OBS_dataplot_prof}
-    \includegraphics[width=7cm,angle=-90.]{Fig_OBS_dataplot_prof}
-    \caption{
-      \protect\label{fig:obsdataplotprofile}
-      Profile plot from dataplot produced by right clicking on a point in the main window.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{OBS_dataplot_prof}
+  \caption[Profile plot from dataplot]{
+    Profile plot from dataplot produced by right clicking on a point in the main window}
+  \label{fig:OBS_dataplotprofile}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-\biblio
-
-\pindex
+
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_SBC.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_SBC.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_SBC.tex	(revision 11831)
@@ -2,298 +2,272 @@
 
 \begin{document}
-% ================================================================
-% Chapter —— Surface Boundary Condition (SBC, ISF, ICB) 
-% ================================================================
-\chapter{Surface Boundary Condition (SBC, ISF, ICB) }
+
+\chapter{Surface Boundary Condition (SBC, SAS, ISF, ICB)}
 \label{chap:SBC}
-\minitoc
-
-\newpage
-
-%---------------------------------------namsbc--------------------------------------------------
-
-\nlst{namsbc}
-%--------------------------------------------------------------------------------------------------------------
-
-The ocean needs six fields as surface boundary condition:
+
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
+
+\begin{listing}
+  \nlst{namsbc}
+  \caption{\forcode{&namsbc}}
+  \label{lst:namsbc}
+\end{listing}
+
+The ocean needs seven fields as surface boundary condition:
+
 \begin{itemize}
-\item
-  the two components of the surface ocean stress $\left( {\tau_u \;,\;\tau_v} \right)$
-\item
-  the incoming solar and non solar heat fluxes $\left( {Q_{ns} \;,\;Q_{sr} } \right)$
-\item
-  the surface freshwater budget $\left( {\textit{emp}} \right)$
-\item
-  the surface salt flux associated with freezing/melting of seawater $\left( {\textit{sfx}} \right)$
+\item the two components of the surface ocean stress $\left( {\tau_u \;,\;\tau_v} \right)$
+\item the incoming solar and non solar heat fluxes $\left( {Q_{ns} \;,\;Q_{sr} } \right)$
+\item the surface freshwater budget $\left( {\textit{emp}} \right)$
+\item the surface salt flux associated with freezing/melting of seawater $\left( {\textit{sfx}} \right)$
+\item the atmospheric pressure at the ocean surface $\left( p_a \right)$
 \end{itemize}
-plus an optional field:
+
+Four different ways are available to provide the seven fields to the ocean. They are controlled by
+namelist \nam{sbc}{sbc} variables:
+
 \begin{itemize}
-	\item the atmospheric pressure at the ocean surface $\left( p_a \right)$
+\item a bulk formulation (\np[=.true.]{ln_blk}{ln\_blk} with four possible bulk algorithms),
+\item a flux formulation (\np[=.true.]{ln_flx}{ln\_flx}),
+\item a coupled or mixed forced/coupled formulation (exchanges with a atmospheric model via the OASIS coupler),
+(\np{ln_cpl}{ln\_cpl} or \np[=.true.]{ln_mixcpl}{ln\_mixcpl}),
+\item a user defined formulation (\np[=.true.]{ln_usr}{ln\_usr}).
 \end{itemize}
 
-Four different ways to provide the first six fields to the ocean are available which are controlled by
-namelist \ngn{namsbc} variables:
-an analytical formulation (\np{ln\_ana}\forcode{ = .true.}),
-a flux formulation (\np{ln\_flx}\forcode{ = .true.}),
-a bulk formulae formulation (CORE (\np{ln\_blk\_core}\forcode{ = .true.}),
-CLIO (\np{ln\_blk\_clio}\forcode{ = .true.}) bulk formulae) and
-a coupled or mixed forced/coupled formulation (exchanges with a atmospheric model via the OASIS coupler)
-(\np{ln\_cpl} or \np{ln\_mixcpl}\forcode{ = .true.}). 
-When used (\ie \np{ln\_apr\_dyn}\forcode{ = .true.}),
-the atmospheric pressure forces both ocean and ice dynamics.
-
-The frequency at which the forcing fields have to be updated is given by the \np{nn\_fsbc} namelist parameter.
-When the fields are supplied from data files (flux and bulk formulations),
-the input fields need not be supplied on the model grid.
-Instead a file of coordinates and weights can be supplied which maps the data from the supplied grid to
+The frequency at which the forcing fields have to be updated is given by the \np{nn_fsbc}{nn\_fsbc} namelist parameter.
+
+When the fields are supplied from data files (bulk, flux and mixed formulations),
+the input fields do not need to be supplied on the model grid.
+Instead, a file of coordinates and weights can be supplied to map the data from the input fields grid to
 the model points (so called "Interpolation on the Fly", see \autoref{subsec:SBC_iof}).
-If the Interpolation on the Fly option is used, input data belonging to land points (in the native grid),
-can be masked to avoid spurious results in proximity of the coasts as
+If the "Interpolation on the Fly" option is used, input data belonging to land points (in the native grid)
+should be masked or filled to avoid spurious results in proximity of the coasts, as
 large sea-land gradients characterize most of the atmospheric variables.
 
 In addition, the resulting fields can be further modified using several namelist options.
-These options control 
+These options control:
+
 \begin{itemize}
-\item
-  the rotation of vector components supplied relative to an east-north coordinate system onto
-  the local grid directions in the model;
-\item
-  the addition of a surface restoring term to observed SST and/or SSS (\np{ln\_ssr}\forcode{ = .true.});
-\item
-  the modification of fluxes below ice-covered areas (using observed ice-cover or a sea-ice model)
-  (\np{nn\_ice}\forcode{ = 0..3});
-\item
-  the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np{ln\_rnf}\forcode{ = .true.});
-\item
-  the addition of isf melting as lateral inflow (parameterisation) or
-  as fluxes applied at the land-ice ocean interface (\np{ln\_isf}) ; 
-\item
-  the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift
-  (\np{nn\_fwb}\forcode{ = 0..2});
-\item
-  the transformation of the solar radiation (if provided as daily mean) into a diurnal cycle
-  (\np{ln\_dm2dc}\forcode{ = .true.});
-\item
-  a neutral drag coefficient can be read from an external wave model (\np{ln\_cdgw}\forcode{ = .true.});
-\item
-  the Stokes drift rom an external wave model can be accounted (\np{ln\_sdw}\forcode{ = .true.}); 
-\item
-  the Stokes-Coriolis term can be included (\np{ln\_stcor}\forcode{ = .true.});
-\item
-  the surface stress felt by the ocean can be modified by surface waves (\np{ln\_tauwoc}\forcode{ = .true.}).
+\item the rotation of vector components supplied relative to an east-north coordinate system onto
+  the local grid directions in the model,
+\item the use of a land/sea mask for input fields (\np[=.true.]{nn_lsm}{nn\_lsm}),
+\item the addition of a surface restoring term to observed SST and/or SSS (\np[=.true.]{ln_ssr}{ln\_ssr}),
+\item the modification of fluxes below ice-covered areas (using climatological ice-cover or a sea-ice model)
+  (\np[=0..3]{nn_ice}{nn\_ice}),
+\item the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np[=.true.]{ln_rnf}{ln\_rnf}),
+\item the addition of ice-shelf melting as lateral inflow (parameterisation) or
+  as fluxes applied at the land-ice ocean interface (\np[=.true.]{ln_isf}{ln\_isf}),
+\item the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift
+  (\np[=0..2]{nn_fwb}{nn\_fwb}),
+\item the transformation of the solar radiation (if provided as daily mean) into an analytical diurnal cycle
+  (\np[=.true.]{ln_dm2dc}{ln\_dm2dc}),
+\item the activation of wave effects from an external wave model  (\np[=.true.]{ln_wave}{ln\_wave}),
+\item a neutral drag coefficient is read from an external wave model (\np[=.true.]{ln_cdgw}{ln\_cdgw}),
+\item the Stokes drift from an external wave model is accounted for (\np[=.true.]{ln_sdw}{ln\_sdw}),
+\item the choice of the Stokes drift profile parameterization (\np[=0..2]{nn_sdrift}{nn\_sdrift}),
+\item the surface stress given to the ocean is modified by surface waves (\np[=.true.]{ln_tauwoc}{ln\_tauwoc}),
+\item the surface stress given to the ocean is read from an external wave model (\np[=.true.]{ln_tauw}{ln\_tauw}),
+\item the Stokes-Coriolis term is included (\np[=.true.]{ln_stcor}{ln\_stcor}),
+\item the light penetration in the ocean (\np[=.true.]{ln_traqsr}{ln\_traqsr} with namelist \nam{tra_qsr}{tra\_qsr}),
+\item the atmospheric surface pressure gradient effect on ocean and ice dynamics (\np[=.true.]{ln_apr_dyn}{ln\_apr\_dyn} with namelist \nam{sbc_apr}{sbc\_apr}),
+\item the effect of sea-ice pressure on the ocean (\np[=.true.]{ln_ice_embd}{ln\_ice\_embd}).
 \end{itemize}
 
-In this chapter, we first discuss where the surface boundary condition appears in the model equations.
-Then we present the five ways of providing the surface boundary condition, 
-followed by the description of the atmospheric pressure and the river runoff. 
-Next the scheme for interpolation on the fly is described.
+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.
+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}),
+One of these is modification by icebergs (see \autoref{sec:SBC_ICB_icebergs}),
 which act as drifting sources of fresh water.
-Another example of modification is that due to the ice shelf melting/freezing (see \autoref{sec:SBC_isf}), 
+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.
 
-
-% ================================================================
-% Surface boundary condition for the ocean
-% ================================================================
+%% =================================================================================================
 \section{Surface boundary condition for the ocean}
-\label{sec:SBC_general}
+\label{sec:SBC_ocean}
 
 The surface ocean stress is the stress exerted by the wind and the sea-ice on the ocean.
 It is applied in \mdl{dynzdf} module as a surface boundary condition of the computation of
-the momentum vertical mixing trend (see \autoref{eq:dynzdf_sbc} in \autoref{sec:DYN_zdf}).
+the momentum vertical mixing trend (see \autoref{eq:DYN_zdf_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
-the heat content of the mass exchange with the atmosphere and sea-ice).
+(\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
 the first level temperature time evolution equation
-(see \autoref{eq:tra_sbc} and \autoref{eq:tra_sbc_lin} in \autoref{subsec:TRA_sbc}). 
+(see \autoref{eq:TRA_sbc} and \autoref{eq:TRA_sbc_lin} in \autoref{subsec:TRA_sbc}).
 The latter is the penetrative part of the heat flux.
-It is applied as a 3D trends of the temperature equation (\mdl{traqsr} module) when
-\np{ln\_traqsr}\forcode{ = .true.}.
+It is applied as a 3D trend of the temperature equation (\mdl{traqsr} module) when
+\np[=.true.]{ln_traqsr}{ln\_traqsr}.
 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.
 It represents the mass flux exchanged with the atmosphere (evaporation minus precipitation) and
 possibly with the sea-ice and ice shelves (freezing minus melting of ice).
-It affects both the ocean in two different ways:
-$(i)$  it changes the volume of the ocean and therefore appears in the sea surface height equation as
-a volume flux, and 
+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
 $(ii)$ it changes the surface temperature and salinity through the heat and salt contents of
-the mass exchanged with the atmosphere, the sea-ice and the ice shelves. 
-
+the mass exchanged with atmosphere, sea-ice and ice shelves.
 
 %\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
-%
-%\mdl{sbc\_oce} containt the definition in memory of the 7 fields (6+runoff), add 
+%Especially the \np{nn_fsbc}{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
 %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
-%
 %\colorbox{yellow}{End Miss }
 
 The ocean model provides, at each time step, to the surface module (\mdl{sbcmod})
-the surface currents, temperature and salinity.  
-These variables are averaged over \np{nn\_fsbc} time-step (\autoref{tab:ssm}), and
-it is these averaged fields which are used to computes the surface fluxes at a frequency of \np{nn\_fsbc} time-step.
-
-
-%-------------------------------------------------TABLE---------------------------------------------------
+the surface currents, temperature and salinity.
+These variables are averaged over \np{nn_fsbc}{nn\_fsbc} time-step (\autoref{tab:SBC_ssm}), and
+these averaged fields are used to compute the surface fluxes at the frequency of \np{nn_fsbc}{nn\_fsbc} time-steps.
+
 \begin{table}[tb]
-  \begin{center}
-    \begin{tabular}{|l|l|l|l|}
-      \hline
-      Variable description					& Model variable	& Units	& point \\	\hline
-      i-component of the surface current	& ssu\_m	& $m.s^{-1}$	& U \\	\hline
-      j-component of the surface current	& ssv\_m	& $m.s^{-1}$	& V \\	\hline
-      Sea surface temperature				& sst\_m	& \r{}$K$		& T \\	\hline
-      Sea surface salinty					& sss\_m	& $psu$			& T \\	\hline
-    \end{tabular}
-    \caption{
-      \protect\label{tab:ssm}
-      Ocean variables provided by the ocean to the surface module (SBC).
-      The variable are averaged over nn{\_}fsbc time step,
-      \ie the frequency of computation of surface fluxes.
-    }
-  \end{center}
+  \centering
+  \begin{tabular}{|l|l|l|l|}
+    \hline
+    Variable description			                  & Model variable	& Units	& point                 \\
+    \hline
+    i-component of the surface current	& ssu\_m	              & $m.s^{-1}$	    & U     \\
+    \hline
+    j-component of the surface current	& ssv\_m	              & $m.s^{-1}$	    & V     \\
+    \hline
+    Sea surface temperature			         & sst\_m	              & \r{}$K$	             & T     \\\hline
+    Sea surface salinty			                  & sss\_m	              & $psu$		        & T     \\	\hline
+  \end{tabular}
+  \caption[Ocean variables provided to the surface module)]{
+    Ocean variables provided to the surface module (\texttt{SBC}).
+    The variable are averaged over \protect\np{nn_fsbc}{nn\_fsbc} time-step,
+    \ie\ the frequency of computation of surface fluxes.}
+  \label{tab:SBC_ssm}
 \end{table}
-%--------------------------------------------------------------------------------------------------------------
-
-%\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
+
+%% =================================================================================================
 \section{Input data generic interface}
 \label{sec:SBC_input}
 
 A generic interface has been introduced to manage the way input data
-(2D or 3D fields, like surface forcing or ocean T and S) are specify in \NEMO.
-This task is archieved by \mdl{fldread}.
-The module was design with four main objectives in mind: 
+(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:
 \begin{enumerate}
-\item
-  optionally provide a time interpolation of the input data at model time-step, whatever their input frequency is,
+\item optionally provide a time interpolation of the input data every specified model time-step, whatever their input frequency is,
   and according to the different calendars available in the model.
-\item
-  optionally provide an on-the-fly space interpolation from the native input data grid to the model grid.
-\item
-  make the run duration independent from the period cover by the input files.
-\item
-  provide a simple user interface and a rather simple developer interface by
-  limiting the number of prerequisite information. 
-\end{enumerate}  
-
-As a results the user have only to fill in for each variable a structure in the namelist file to
+\item optionally provide an on-the-fly space interpolation from the native input data grid to the model grid.
+\item make the run duration independent from the period cover by the input files.
+\item provide a simple user interface and a rather simple developer interface by
+  limiting the number of prerequisite informations.
+\end{enumerate}
+
+As a result, the user has only to fill in for each variable a structure in the namelist file to
 define the input data file and variable names, the frequency of the data (in hours or months),
 whether its is climatological data or not, the period covered by the input file (one year, month, week or day),
-and three additional parameters for on-the-fly interpolation.
+and three additional parameters for the on-the-fly interpolation.
 When adding a new input variable, the developer has to add the associated structure in the namelist,
 read this information by mirroring the namelist read in \rou{sbc\_blk\_init} for example,
 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}).
 
 Note that when an input data is archived on a disc which is accessible directly from the workspace where
-the code is executed, then the use can set the \np{cn\_dir} to the pathway leading to the data.
-By default, the data are assumed to have been copied so that cn\_dir='./'.
-
-% -------------------------------------------------------------------------------------------------------------
-% Input Data specification (\mdl{fldread})
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Input data specification (\protect\mdl{fldread})}
+the code is executed, then the user can set the \np{cn_dir}{cn\_dir} to the pathway leading to the data.
+By default, the data are assumed to be in the same directory as the executable, so that cn\_dir='./'.
+
+%% =================================================================================================
+\subsection[Input data specification (\textit{fldread.F90})]{Input data specification (\protect\mdl{fldread})}
 \label{subsec:SBC_fldread}
 
 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}  
-\item[File name]:
-  the stem name of the NetCDF file to be open.
+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:SBC_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).
-
-%--------------------------------------------------TABLE--------------------------------------------------
   \begin{table}[htbp]
-    \begin{center}
-      \begin{tabular}{|l|c|c|c|}
-        \hline
-        & daily or weekLLL	        & monthly                   &   yearly          \\   \hline
-        \np{clim}\forcode{ = .false.}	& fn\_yYYYYmMMdDD.nc  &   fn\_yYYYYmMM.nc   &   fn\_yYYYY.nc  \\   \hline
-        \np{clim}\forcode{ = .true.}	 	   & not possible 	              &  fn\_m??.nc             &   fn                \\   \hline
-      \end{tabular}
-    \end{center}
-    \caption{
-      \protect\label{tab:fldread}
-      naming nomenclature for climatological or interannual input file, as a function of the Open/close frequency.
+    \centering
+    \begin{tabular}{|l|c|c|c|}
+      \hline
+                                  &  daily or weekLL     &  monthly           &  yearly        \\
+      \hline
+      \np[=.false.]{clim}{clim} &  fn\_yYYYYmMMdDD.nc  &  fn\_yYYYYmMM.nc   &  fn\_yYYYY.nc  \\
+      \hline
+      \np[=.true.]{clim}{clim}  &  not possible        &  fn\_m??.nc        &  fn            \\
+      \hline
+    \end{tabular}
+    \caption[Naming nomenclature for climatological or interannual input file]{
+      Naming nomenclature for climatological or interannual input file,
+      as a function of the open/close frequency.
       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').
-      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',
+      (\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',
       where 'PPPP' is the process number coded with 4 digits;
-      (2) when using AGRIF, the prefix '\_N' is added to files, where 'N'  is the child grid number.
+      (2) when using AGRIF, the prefix '\_N' is added to files, where 'N' is the child grid number.
     }
+    \label{tab:SBC_fldread}
   \end{table}
-%--------------------------------------------------------------------------------------------------------------
-  
-
-\item[Record frequency]:
-  the frequency of the records contained in the input file.
+\item [Record frequency]: the frequency of the records contained in the input file.
   Its unit is in hours if it is positive (for example 24 for daily forcing) or in months if negative
   (for example -1 for monthly forcing or -12 for annual forcing).
-  Note that this frequency must really be an integer and not a real.
-  On some computers, seting it to '24.' can be interpreted as 240!
-
-\item[Variable name]:
-  the name of the variable to be read in the input NetCDF file.
-
-\item[Time interpolation]:
-  a logical to activate, or not, the time interpolation.
+  Note that this frequency must REALLY be an integer and not a real.
+  On some computers, setting it to '24.' can be interpreted as 240!
+\item [Variable name]: the name of the variable to be read in the input NetCDF file.
+\item [Time interpolation]: a logical to activate, or not, the time interpolation.
   If set to 'false', the forcing will have a steplike shape remaining constant during each forcing period.
   For example, when using a daily forcing without time interpolation, the forcing remaining constant from
   00h00'00'' to 23h59'59".
   If set to 'true', the forcing will have a broken line shape.
-  Records are assumed to be dated the middle of the forcing period.
+  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. 
-
-\item[Climatological forcing]:
-  a logical to specify if a input file contains climatological forcing which can be cycle in time,
+  linear interpolation will be performed between mid-day of two consecutive days.
+\item [Climatological forcing]: a logical to specify if a input file contains climatological forcing which can be cycle in time,
   or an interannual forcing which will requires additional files if
-  the period covered by the simulation exceed the one of the file.
-  See the above the file naming strategy which impacts the expected name of the file to be opened. 
-
-\item[Open/close frequency]:
-  the frequency at which forcing files must be opened/closed.
+  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.
+\item [Open/close frequency]: the frequency at which forcing files must be opened/closed.
   Four cases are coded:
   'daily', 'weekLLL' (with 'LLL' the first 3 letters of the first day of the week), 'monthly' and 'yearly' which
@@ -301,10 +275,7 @@
   Files are assumed to contain data from the beginning of the open/close period.
   For example, the first record of a yearly file containing daily data is Jan 1st even if
-  the experiment is not starting at the beginning of the year. 
-
-\item[Others]:
-  'weights filename', 'pairing rotation' and 'land/sea mask' are associated with
+  the experiment is not starting at the beginning of the year.
+\item [Others]:  'weights filename', 'pairing rotation' and 'land/sea mask' are associated with
   on-the-fly interpolation which is described in \autoref{subsec:SBC_iof}.
-
 \end{description}
 
@@ -313,39 +284,36 @@
 The only tricky point is therefore to specify the date at which we need to do the interpolation and
 the date of the records read in the input files.
-Following \citet{Leclair_Madec_OM09}, the date of a time step is set at the middle of the time step.
-For example, for an experiment starting at 0h00'00" with a one hour time-step,
+Following \citet{leclair.madec_OM09}, the date of a time step is set at the middle of the time step.
+For example, for an experiment starting at 0h00'00" with a one-hour time-step,
 a time interpolation will be performed at the following time: 0h30'00", 1h30'00", 2h30'00", etc.
 However, for forcing data related to the surface module,
-values are not needed at every time-step but at every \np{nn\_fsbc} time-step.
-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 be at the middle of \np{nn\_fsbc} time-step period.
-In the previous example, this leads to: 1h30'00", 4h30'00", 7h30'00", etc. \\ 
+values are not needed at every time-step but at every \np{nn_fsbc}{nn\_fsbc} time-step.
+For example with \np[=3]{nn_fsbc}{nn\_fsbc}, 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}{nn\_fsbc} time-step period.
+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
 user in the record frequency, the open/close frequency and the type of temporal interpolation.
 For example, the first record of a yearly file containing daily data that will be interpolated in time is assumed to
-be start Jan 1st at 12h00'00" and end Dec 31st at 12h00'00". \\
+start Jan 1st at 12h00'00" and end Dec 31st at 12h00'00". \\
 (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".
 If the forcing is climatological, Dec and Jan will be keep-up from the same year.
 However, if the forcing is not climatological, at the end of
-the open/close period the code will automatically close the current file and open the next one.
+the open/close period, the code will automatically close the current file and open the next one.
 Note that, if the experiment is starting (ending) at the beginning (end) of
-an open/close period we do accept that the previous (next) file is not existing.
+an open/close period, we do accept that the previous (next) file is not existing.
 In this case, the time interpolation will be performed between two identical values.
 For example, when starting an experiment on Jan 1st of year Y with yearly files and daily data to be interpolated,
 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.
 
-
-% -------------------------------------------------------------------------------------------------------------
-% Interpolation on the Fly
-% -------------------------------------------------------------------------------------------------------------
+%% =================================================================================================
 \subsection{Interpolation on-the-fly}
 \label{subsec:SBC_iof}
@@ -353,11 +321,11 @@
 Interpolation on the Fly allows the user to supply input files required for the surface forcing on
 grids other than the model grid.
-To do this he or she must supply, in addition to the source data file, a file of weights to be used to
+To do this, he or she must supply, in addition to the source data file(s), a file of weights to be used to
 interpolate from the data grid to the model grid.
 The original development of this code used the SCRIP package
 (freely available \href{http://climate.lanl.gov/Software/SCRIP}{here} under a copyright agreement).
-In principle, any package can be used to generate the weights, but the variables in
+In principle, any package such as CDO can be used to generate the weights, but the variables in
 the input weights file must have the same names and meanings as assumed by the model.
-Two methods are currently available: bilinear and bicubic interpolation.
+Two methods are currently available: bilinear and bicubic interpolations.
 Prior to the interpolation, providing a land/sea mask file, the user can decide to remove land points from
 the input file and substitute the corresponding values with the average of the 8 neighbouring points in
@@ -365,9 +333,10 @@
 Only "sea points" are considered for the averaging.
 The land/sea mask file must be provided in the structure associated with the input variable.
-The netcdf land/sea mask variable name must be 'LSM' it must have the same horizontal and vertical dimensions of
-the associated variable and should be equal to 1 over land and 0 elsewhere.
-The procedure can be recursively applied setting nn\_lsm > 1 in namsbc namelist.
-Note that nn\_lsm=0 forces the code to not apply the procedure even if a file for land/sea mask is supplied.
-
+The netcdf land/sea mask variable name must be 'LSM' and must have the same horizontal and vertical dimensions as
+the associated variables and should be equal to 1 over land and 0 elsewhere.
+The procedure can be recursively applied by setting nn\_lsm > 1 in namsbc namelist.
+Note that nn\_lsm=0 forces the code to not apply the procedure, even if a land/sea mask file is supplied.
+
+%% =================================================================================================
 \subsubsection{Bilinear interpolation}
 \label{subsec:SBC_iof_bilinear}
@@ -375,5 +344,5 @@
 The input weights file in this case has two sets of variables:
 src01, src02, src03, src04 and wgt01, wgt02, wgt03, wgt04.
-The "src" variables correspond to the point in the input grid to which the weight "wgt" is to be applied.
+The "src" variables correspond to the point in the input grid to which the weight "wgt" is applied.
 Each src value is an integer corresponding to the index of a point in the input grid when
 written as a one dimensional array.
@@ -391,9 +360,10 @@
 and wgt(1) corresponds to variable "wgt01" for example.
 
+%% =================================================================================================
 \subsubsection{Bicubic interpolation}
 \label{subsec:SBC_iof_bicubic}
 
-Again there are two sets of variables: "src" and "wgt".
-But in this case there are 16 of each.
+Again, there are two sets of variables: "src" and "wgt".
+But in this case, there are 16 of each.
 The symbolic algorithm used to calculate values on the model grid is now:
 
@@ -401,12 +371,13 @@
   \begin{split}
     f_{m}(i,j) =  f_{m}(i,j) +& \sum_{k=1}^{4} {wgt(k)f(idx(src(k)))}
-    +   \sum_{k=5}^{8} {wgt(k)\left.\frac{\partial f}{\partial i}\right| _{idx(src(k))} }    \\
-    +& \sum_{k=9}^{12} {wgt(k)\left.\frac{\partial f}{\partial j}\right| _{idx(src(k))} }
-    +   \sum_{k=13}^{16} {wgt(k)\left.\frac{\partial ^2 f}{\partial i \partial j}\right| _{idx(src(k))} }
+    +  \sum_{k=5 }^{8 } {wgt(k)\left.\frac{\partial f}{\partial i}\right| _{idx(src(k))} }    \\
+    +& \sum_{k=9 }^{12} {wgt(k)\left.\frac{\partial f}{\partial j}\right| _{idx(src(k))} }
+    +  \sum_{k=13}^{16} {wgt(k)\left.\frac{\partial ^2 f}{\partial i \partial j}\right| _{idx(src(k))} }
   \end{split}
 \]
 The gradients here are taken with respect to the horizontal indices and not distances since
-the spatial dependency has been absorbed into the weights.
-
+the spatial dependency has been included into the weights.
+
+%% =================================================================================================
 \subsubsection{Implementation}
 \label{subsec:SBC_iof_imp}
@@ -420,12 +391,12 @@
 inspecting a global attribute stored in the weights input file.
 This attribute must be called "ew\_wrap" and be of integer type.
-If it is negative, the input non-model grid is assumed not to be cyclic.
+If it is negative, the input non-model grid is assumed to be not cyclic.
 If zero or greater, then the value represents the number of columns that overlap.
 $E.g.$ if the input grid has columns at longitudes 0, 1, 2, .... , 359, then ew\_wrap should be set to 0;
 if longitudes are 0.5, 2.5, .... , 358.5, 360.5, 362.5, ew\_wrap should be 2.
 If the model does not find attribute ew\_wrap, then a value of -999 is assumed.
-In this case the \rou{fld\_read} routine defaults ew\_wrap to value 0 and
+In this case, the \rou{fld\_read} routine defaults ew\_wrap to value 0 and
 therefore the grid is assumed to be cyclic with no overlapping columns.
-(In fact this only matters when bicubic interpolation is required.)
+(In fact, this only matters when bicubic interpolation is required.)
 Note that no testing is done to check the validity in the model,
 since there is no way of knowing the name used for the longitude variable,
@@ -444,23 +415,20 @@
 or is a copy of one from the first few columns on the opposite side of the grid (cyclical case).
 
+%% =================================================================================================
 \subsubsection{Limitations}
 \label{subsec:SBC_iof_lim}
 
-\begin{enumerate}  
-\item
-  The case where input data grids are not logically rectangular has not been tested.
-\item
-  This code is not guaranteed to produce positive definite answers from positive definite inputs when
+\begin{enumerate}
+\item The case where input data grids are not logically rectangular (irregular grid case) has not been tested.
+\item This code is not guaranteed to produce positive definite answers from positive definite inputs when
   a bicubic interpolation method is used.
-\item
-  The cyclic condition is only applied on left and right columns, and not to top and bottom rows.
-\item
-  The gradients across the ends of a cyclical grid assume that the grid spacing between
+\item The cyclic condition is only applied on left and right columns, and not to top and bottom rows.
+\item The gradients across the ends of a cyclical grid assume that the grid spacing between
   the two columns involved are consistent with the weights used.
-\item
-  Neither interpolation scheme is conservative. (There is a conservative scheme available in SCRIP,
+\item Neither interpolation scheme is conservative. (There is a conservative scheme available in SCRIP,
   but this has not been implemented.)
 \end{enumerate}
 
+%% =================================================================================================
 \subsubsection{Utilities}
 \label{subsec:SBC_iof_util}
@@ -470,65 +438,47 @@
 (see the directory NEMOGCM/TOOLS/WEIGHTS).
 
-% -------------------------------------------------------------------------------------------------------------
-% Standalone Surface Boundary Condition Scheme
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Standalone surface boundary condition scheme}
-\label{subsec:SAS_iof}
-
-%---------------------------------------namsbc_ana--------------------------------------------------
-
-\nlst{namsbc_sas}
-%--------------------------------------------------------------------------------------------------------------
-
-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.  
+%% =================================================================================================
+\subsection{Standalone surface boundary condition scheme (SAS)}
+\label{subsec:SBC_SAS}
+
+\begin{listing}
+  \nlst{namsbc_sas}
+  \caption{\forcode{&namsbc_sas}}
+  \label{lst:namsbc_sas}
+\end{listing}
+
+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.
 For example:
 
 \begin{itemize}
-\item
-  Multiple runs of the model are required in code development to
+\item Multiple runs of the model are required in code development to
   see the effect of different algorithms in the bulk formulae.
-\item
-  The effect of different parameter sets in the ice model is to be examined.
-\item
-  Development of sea-ice algorithms or parameterizations.
-\item
-  Spinup of the iceberg floats
-\item
-  Ocean/sea-ice simulation with both media running in parallel (\np{ln\_mixcpl}\forcode{ = .true.})
+\item The effect of different parameter sets in the ice model is to be examined.
+\item Development of sea-ice algorithms or parameterizations.
+\item Spinup of the iceberg floats
+\item Ocean/sea-ice simulation with both models running in parallel (\np[=.true.]{ln_mixcpl}{ln\_mixcpl})
 \end{itemize}
 
-The StandAlone Surface scheme provides this utility.
-Its options are defined through the \ngn{namsbc\_sas} namelist variables.
+The Standalone Surface scheme provides this capacity.
+Its options are defined through the \nam{sbc_sas}{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:
 
 \begin{itemize}
-\item
-  \mdl{nemogcm}:
-  This routine initialises the rest of the model and repeatedly calls the stp time stepping routine (\mdl{step}).
+\item \mdl{nemogcm}: This routine initialises the rest of the model and repeatedly calls the stp time stepping routine (\mdl{step}).
   Since the ocean state is not calculated all associated initialisations have been removed.
-\item
-  \mdl{step}:
-  The main time stepping routine now only needs to call the sbc routine (and a few utility functions).
-\item
-  \mdl{sbcmod}:
-  This has been cut down and now only calculates surface forcing and the ice model required.
+\item \mdl{step}: The main time stepping routine now only needs to call the sbc routine (and a few utility functions).
+\item \mdl{sbcmod}: 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).
-\item
-  \mdl{daymod}:
-  No ocean restarts are read or written (though the ice model restarts are retained),
+  (\eg\ icebergs).
+\item \mdl{daymod}: No ocean restarts are read or written (though the ice model restarts are retained),
   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 make sure that nn{\_}date0 in the model namelist is correct for his or her purposes.
-\item
-  \mdl{stpctl}:
-  Since there is no free surface solver, references to it have been removed from \rou{stp\_ctl} module.
-\item
-  \mdl{diawri}:
-  All 3D data have been removed from the output.
+  so the user must check that nn\_date0 in the model namelist is correct for his or her purposes.
+\item \mdl{stpctl}: Since there is no free surface solver, references to it have been removed from \rou{stp\_ctl} module.
+\item \mdl{diawri}: All 3D data have been removed from the output.
   The surface temperature, salinity and velocity components (which have been read in) are written along with
   relevant forcing and ice data.
@@ -538,10 +488,8 @@
 
 \begin{itemize}
-\item
-  \mdl{sbcsas}:
-  This module initialises the input files needed for reading temperature, salinity and
+\item \mdl{sbcsas}: 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.
-  Unfortunately because of limitations with the \mdl{iom} module,
+  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,
   before using just the top level.
@@ -549,49 +497,20 @@
 \end{itemize}
 
-
-% Missing the description of the 2 following variables:
-%   ln_3d_uve   = .true.    !  specify whether we are supplying a 3D u,v and e3 field
-%   ln_read_frq = .false.    !  specify whether we must read frq or not
-
-
-
-% ================================================================
-% Analytical formulation (sbcana module) 
-% ================================================================
-\section{Analytical formulation (\protect\mdl{sbcana})}
-\label{sec:SBC_ana}
-
-%---------------------------------------namsbc_ana--------------------------------------------------
-%
-%\nlst{namsbc_ana}
-%--------------------------------------------------------------------------------------------------------------
-
-The analytical formulation of the surface boundary condition is the default scheme.
-In this case, all the six fluxes needed by the ocean are assumed to be uniform in space.
-They take constant values given in the namelist \ngn{namsbc{\_}ana} by
-the variables \np{rn\_utau0}, \np{rn\_vtau0}, \np{rn\_qns0}, \np{rn\_qsr0}, and \np{rn\_emp0}
-($\textit{emp}=\textit{emp}_S$).
-The runoff is set to zero.
-In addition, the wind is allowed to reach its nominal value within a given number of time steps (\np{nn\_tau000}).
-
-If a user wants to apply a different analytical forcing,
-the \mdl{sbcana} module can be modified to use another scheme.
-As an example, the \mdl{sbc\_ana\_gyre} routine provides the analytical forcing for the GYRE configuration
-(see GYRE configuration manual, in preparation).
-
-
-% ================================================================
-% Flux formulation 
-% ================================================================
-\section{Flux formulation (\protect\mdl{sbcflx})}
+The user can also choose in the \nam{sbc_sas}{sbc\_sas} namelist to read the mean (nn\_fsbc time-step) fraction of solar net radiation absorbed in the 1st T level using
+ (\np[=.true.]{ln_flx}{ln\_flx}) and to provide 3D oceanic velocities instead of 2D ones (\np{ln_flx}{ln\_flx}\forcode{=.true.}). In that last case, only the 1st level will be read in.
+
+%% =================================================================================================
+\section[Flux formulation (\textit{sbcflx.F90})]{Flux formulation (\protect\mdl{sbcflx})}
 \label{sec:SBC_flx}
-%------------------------------------------namsbc_flx----------------------------------------------------
-
-\nlst{namsbc_flx} 
-%-------------------------------------------------------------------------------------------------------------
-
-In the flux formulation (\np{ln\_flx}\forcode{ = .true.}),
+
+\begin{listing}
+  \nlst{namsbc_flx}
+  \caption{\forcode{&namsbc_flx}}
+  \label{lst:namsbc_flx}
+\end{listing}
+
+In the flux formulation (\np[=.true.]{ln_flx}{ln\_flx}),
 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}{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.
@@ -601,67 +520,58 @@
 See \autoref{subsec:SBC_ssr} for its specification.
 
-
-% ================================================================
-% Bulk formulation
-% ================================================================
-\section[Bulk formulation {(\textit{sbcblk\{\_core,\_clio\}.F90})}]
-                        {Bulk formulation {(\protect\mdl{sbcblk\_core}, \protect\mdl{sbcblk\_clio})}}
+%% =================================================================================================
+\section[Bulk formulation (\textit{sbcblk.F90})]{Bulk formulation (\protect\mdl{sbcblk})}
 \label{sec:SBC_blk}
 
-In the bulk formulation, the surface boundary condition fields are computed using bulk formulae and atmospheric fields and ocean (and ice) variables.
+\begin{listing}
+  \nlst{namsbc_blk}
+  \caption{\forcode{&namsbc_blk}}
+  \label{lst:namsbc_blk}
+\end{listing}
+
+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}{nn\_fsbc} time-step.
 
 The atmospheric fields used depend on the bulk formulae used.
-Two bulk formulations are available:
-the CORE and the CLIO bulk formulea.
+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}):
+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:
-\np{ln\_core} or \np{ln\_clio}.
-
-Note:
-in forced mode, when a sea-ice model is used, a bulk formulation (CLIO or CORE) have to be used.
-Therefore the two bulk (CLIO and CORE) formulea include the computation of the fluxes over
-both an ocean and an ice surface. 
-
-% -------------------------------------------------------------------------------------------------------------
-%        CORE Bulk formulea
-% -------------------------------------------------------------------------------------------------------------
-\subsection{CORE formulea (\protect\mdl{sbcblk\_core}, \protect\np{ln\_core}\forcode{ = .true.})}
-\label{subsec:SBC_blk_core}
-%------------------------------------------namsbc_core----------------------------------------------------
-%
-%\nlst{namsbc_core}
-%-------------------------------------------------------------------------------------------------------------
-
-The CORE bulk formulae have been developed by \citet{Large_Yeager_Rep04}.
-They have been designed to handle the CORE forcing, a mixture of NCEP reanalysis and satellite data.
-They use an inertial dissipative method to compute the turbulent transfer coefficients
-(momentum, sensible heat and evaporation) from the 10 metre wind speed, air temperature and specific humidity.
-This \citet{Large_Yeager_Rep04} dataset is available through
-the \href{http://nomads.gfdl.noaa.gov/nomads/forms/mom4/CORE.html}{GFDL web site}.
-
-Note that substituting ERA40 to NCEP reanalysis fields does not require changes in the bulk formulea themself.
-This is the so-called DRAKKAR Forcing Set (DFS) \citep{Brodeau_al_OM09}.
-
-Options are defined through the  \ngn{namsbc\_core} namelist variables.
-The required 8 input fields are:
-
-%--------------------------------------------------TABLE--------------------------------------------------
+ \np{ln_NCAR}{ln\_NCAR}, \np{ln_COARE_3p0}{ln\_COARE\_3p0},  \np{ln_COARE_3p5}{ln\_COARE\_3p5} and  \np{ln_ECMWF}{ln\_ECMWF}.
+For sea-ice, three possibilities can be selected:
+a constant transfer coefficient (1.4e-3; default value), \citet{lupkes.gryanik.ea_JGR12} (\np{ln_Cd_L12}{ln\_Cd\_L12}), and \citet{lupkes.gryanik_JGR15} (\np{ln_Cd_L15}{ln\_Cd\_L15}) parameterizations
+
+Common options are defined through the \nam{sbc_blk}{sbc\_blk} namelist variables.
+The required 9 input fields are:
+
 \begin{table}[htbp]
-  \label{tab:CORE}
-  \begin{center}
-    \begin{tabular}{|l|c|c|c|}
-      \hline
-      Variable desciption					& Model variable	& Units	 & point \\		\hline
-      i-component of the 10m air velocity	& utau		& $m.s^{-1}$			& T  \\ 	\hline
-      j-component of the 10m air velocity	& vtau		& $m.s^{-1}$			& T  \\	\hline
-      10m air temperature					& tair		& \r{}$K$				& T 	\\	\hline
-      Specific humidity					& humi		& \%					& T \\		\hline
-      Incoming long wave radiation		& qlw		& $W.m^{-2}$			& T \\		\hline
-      Incoming short wave radiation		& qsr		& $W.m^{-2}$			& T \\		\hline
-      Total precipitation (liquid + solid)	& precip	& $Kg.m^{-2}.s^{-1}$	& T \\ 	\hline
-      Solid precipitation					& snow		& $Kg.m^{-2}.s^{-1}$	& T \\	\hline
+  \centering
+  \begin{tabular}{|l|c|c|c|}
+    \hline
+    Variable description                 & Model variable & Units              & point \\
+    \hline
+    i-component of the 10m air velocity  & utau           & $m.s^{-1}$         & T     \\
+    \hline
+    j-component of the 10m air velocity  & vtau           & $m.s^{-1}$         & T     \\
+    \hline
+    10m air temperature                  & tair           & \r{}$K$            & T     \\
+    \hline
+    Specific humidity                    & humi           & \%                 & T     \\
+    \hline
+    Incoming long wave radiation         & qlw            & $W.m^{-2}$         & T     \\
+    \hline
+    Incoming short wave radiation        & qsr            & $W.m^{-2}$         & T     \\
+    \hline
+    Total precipitation (liquid + solid) & precip         & $Kg.m^{-2}.s^{-1}$ & T     \\
+    \hline
+    Solid precipitation                  & snow           & $Kg.m^{-2}.s^{-1}$ & T     \\
+    \hline
+    Mean sea-level pressure              & slp            & $hPa$              & T     \\
+    \hline
     \end{tabular}
-  \end{center}
+  \label{tab:SBC_BULK}
 \end{table}
-%--------------------------------------------------------------------------------------------------------------
 
 Note that the air velocity is provided at a tracer ocean point, not at a velocity ocean point ($u$- and $v$-points).
@@ -669,115 +579,120 @@
 the ocean grid size is the same or larger than the one of the input atmospheric fields.
 
-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). 
-
-\np{cn\_dir} is the directory of location of bulk files
-\np{ln\_taudif} is the flag to specify if we use Hight Frequency (HF) tau information (.true.) or not (.false.)
-\np{rn\_zqt}: is the height of humidity and temperature measurements (m)
-\np{rn\_zu}: is the height of wind measurements (m)
-
-Three multiplicative factors are availables: 
-\np{rn\_pfac} and \np{rn\_efac} allows to adjust (if necessary) the global freshwater budget by
+The \np{sn_wndi}{sn\_wndi}, \np{sn_wndj}{sn\_wndj}, \np{sn_qsr}{sn\_qsr}, \np{sn_qlw}{sn\_qlw}, \np{sn_tair}{sn\_tair}, \np{sn_humi}{sn\_humi}, \np{sn_prec}{sn\_prec},
+\np{sn_snow}{sn\_snow}, \np{sn_tdif}{sn\_tdif} parameters describe the fields and the way they have to be used
+(spatial and temporal interpolations).
+
+\np{cn_dir}{cn\_dir} is the directory of location of bulk files
+\np{ln_taudif}{ln\_taudif} is the flag to specify if we use Hight Frequency (HF) tau information (.true.) or not (.false.)
+\np{rn_zqt}{rn\_zqt}: is the height of humidity and temperature measurements (m)
+\np{rn_zu}{rn\_zu}: is the height of wind measurements (m)
+
+Three multiplicative factors are available:
+\np{rn_pfac}{rn\_pfac} and \np{rn_efac}{rn\_efac} allow to adjust (if necessary) the global freshwater budget by
 increasing/reducing the precipitations (total and snow) and or evaporation, respectively.
-The third one,\np{rn\_vfac}, control to which extend the ice/ocean velocities are taken into account in
+The third one,\np{rn_vfac}{rn\_vfac}, control to which extend the ice/ocean velocities are taken into account in
 the calculation of surface wind stress.
-Its range should be between zero and one, and it is recommended to set it to 0.
-
-% -------------------------------------------------------------------------------------------------------------
-%        CLIO Bulk formulea
-% -------------------------------------------------------------------------------------------------------------
-\subsection{CLIO formulea (\protect\mdl{sbcblk\_clio}, \protect\np{ln\_clio}\forcode{ = .true.})}
-\label{subsec:SBC_blk_clio}
-%------------------------------------------namsbc_clio----------------------------------------------------
-%
-%\nlst{namsbc_clio}
-%-------------------------------------------------------------------------------------------------------------
-
-The CLIO bulk formulae were developed several years ago for the Louvain-la-neuve coupled ice-ocean model
-(CLIO, \cite{Goosse_al_JGR99}). 
-They are simpler bulk formulae.
-They assume the stress to be known and compute the radiative fluxes from a climatological cloud cover. 
-
-Options are defined through the  \ngn{namsbc\_clio} namelist variables.
-The required 7 input fields are:
-
-%--------------------------------------------------TABLE--------------------------------------------------
-\begin{table}[htbp]
-  \label{tab:CLIO}
-  \begin{center}
-    \begin{tabular}{|l|l|l|l|}
-      \hline
-      Variable desciption				& Model variable	& Units				& point \\	\hline
-      i-component of the ocean stress		& utau			& $N.m^{-2}$			& U \\	\hline
-      j-component of the ocean stress		& vtau			& $N.m^{-2}$			& V \\	\hline
-      Wind speed module					& vatm			& $m.s^{-1}$			& T \\	\hline
-      10m air temperature					& tair			& \r{}$K$				& T \\	\hline
-      Specific humidity						& humi			& \%					& T \\	\hline
-      Cloud cover							& 				& \%					& T \\	\hline
-      Total precipitation (liquid + solid)	& precip		& $Kg.m^{-2}.s^{-1}$	& T \\	\hline
-      Solid precipitation 					& snow			& $Kg.m^{-2}.s^{-1}$	& T \\	\hline
-    \end{tabular}
-  \end{center}
-\end{table}
-%--------------------------------------------------------------------------------------------------------------
+Its range must be between zero and one, and it is recommended to set it to 0 at low-resolution (ORCA2 configuration).
 
 As for the flux formulation, information about the input data required by the model is provided in
-the namsbc\_blk\_core or namsbc\_blk\_clio namelist (see \autoref{subsec:SBC_fldread}). 
-
-% ================================================================
-% Coupled formulation
-% ================================================================
-\section{Coupled formulation (\protect\mdl{sbccpl})}
+the namsbc\_blk namelist (see \autoref{subsec:SBC_fldread}).
+
+%% =================================================================================================
+\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
+their neutral transfer coefficients relationships with neutral wind.
+\begin{itemize}
+\item NCAR (\np[=.true.]{ln_NCAR}{ln\_NCAR}): The NCAR bulk formulae have been developed by \citet{large.yeager_rpt04}.
+  They have been designed to handle the NCAR forcing, a mixture of NCEP reanalysis and satellite data.
+  They use an inertial dissipative method to compute the turbulent transfer coefficients
+  (momentum, sensible heat and evaporation) from the 10m wind speed, air temperature and specific humidity.
+  This \citet{large.yeager_rpt04} dataset is available through
+  the \href{http://nomads.gfdl.noaa.gov/nomads/forms/mom4/NCAR.html}{GFDL web site}.
+  Note that substituting ERA40 to NCEP reanalysis fields does not require changes in the bulk formulea themself.
+  This is the so-called DRAKKAR Forcing Set (DFS) \citep{brodeau.barnier.ea_OM10}.
+\item COARE 3.0 (\np[=.true.]{ln_COARE_3p0}{ln\_COARE\_3p0}): See \citet{fairall.bradley.ea_JC03} for more details
+\item COARE 3.5 (\np[=.true.]{ln_COARE_3p5}{ln\_COARE\_3p5}): See \citet{edson.jampana.ea_JPO13} for more details
+\item ECMWF (\np[=.true.]{ln_ECMWF}{ln\_ECMWF}): 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}
+
+%% =================================================================================================
+\subsection{Ice-Atmosphere Bulk formulae}
+\label{subsec:SBC_blk_ice}
+
+Surface turbulent fluxes between sea-ice and the atmosphere can be computed in three different ways:
+
+\begin{itemize}
+\item Constant value (\np[ Cd_ice=1.4e-3 ]{constant value}{constant\ value}):
+  default constant value used for momentum and heat neutral transfer coefficients
+\item \citet{lupkes.gryanik.ea_JGR12} (\np[=.true.]{ln_Cd_L12}{ln\_Cd\_L12}):
+  This scheme adds a dependency on edges at leads, melt ponds and flows
+  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)
+  starting at 1.5e-3 for A=0, reaching 1.97e-3 for A=0.5 and going down 1.4e-3 for A=1.
+  It is theoretically applicable to all ice conditions (not only MIZ).
+\item \citet{lupkes.gryanik_JGR15} (\np[=.true.]{ln_Cd_L15}{ln\_Cd\_L15}):
+  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.
+  Compared to Lupkes2012 scheme, it considers specific skin and form drags
+  to compute neutral transfer coefficients for both heat and momentum fluxes.
+  Atmospheric stability effect on transfer coefficient is also taken into account.
+\end{itemize}
+
+%% =================================================================================================
+\section[Coupled formulation (\textit{sbccpl.F90})]{Coupled formulation (\protect\mdl{sbccpl})}
 \label{sec:SBC_cpl}
-%------------------------------------------namsbc_cpl----------------------------------------------------
-
-\nlst{namsbc_cpl} 
-%-------------------------------------------------------------------------------------------------------------
+
+\begin{listing}
+  \nlst{namsbc_cpl}
+  \caption{\forcode{&namsbc_cpl}}
+  \label{lst:namsbc_cpl}
+\end{listing}
 
 In the coupled formulation of the surface boundary condition,
-the fluxes are provided by the OASIS coupler at a frequency which is defined in the OASIS coupler,
+the fluxes are provided by the OASIS coupler at a frequency which is defined in the OASIS coupler namelist,
 while sea and ice surface temperature, ocean and ice albedo, and ocean currents are sent to
 the atmospheric component.
 
 A generalised coupled interface has been developed.
-It is currently interfaced with OASIS-3-MCT (\key{oasis3}).
-It has been successfully used to interface \NEMO to most of the European atmospheric GCM
+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
 (ARPEGE, ECHAM, ECMWF, HadAM, HadGAM, LMDz), as well as to \href{http://wrf-model.org/}{WRF}
 (Weather Research and Forecasting Model).
 
-Note that in addition to the setting of \np{ln\_cpl} to true, the \key{coupled} have to be defined.
-The CPP key is mainly used in sea-ice to ensure that the atmospheric fluxes are actually received by
-the ice-ocean system (no calculation of ice sublimation in coupled mode).
-When PISCES biogeochemical model (\key{top} and \key{pisces}) is also used in the coupled system, 
-the whole carbon cycle is computed by defining \key{cpl\_carbon\_cycle}.
+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}{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 namsbc{\_}cpl the number of categories will be determined by
+When indicating a multi-category coupling field in \nam{sbc_cpl}{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
+In some limited cases, it may be possible to specify single category coupling fields even when
 the sea ice model is running with multiple categories -
-in this case the user should examine the code to be sure the assumptions made are satisfactory.
-In cases where this is definitely not possible the model should abort with an error message.
-The new code has been tested using ECHAM with LIM2, and HadGAM3 with CICE but
-although it will compile with \key{lim3} additional minor code changes may be required to run using LIM3.
-
-
-% ================================================================
-%        Atmospheric pressure
-% ================================================================
-\section{Atmospheric pressure (\protect\mdl{sbcapr})}
+in this case, the user should examine the code to be sure the assumptions made are satisfactory.
+In cases where this is definitely not possible, the model should abort with an error message.
+
+%% =================================================================================================
+\section[Atmospheric pressure (\textit{sbcapr.F90})]{Atmospheric pressure (\protect\mdl{sbcapr})}
 \label{sec:SBC_apr}
-%------------------------------------------namsbc_apr----------------------------------------------------
-
-\nlst{namsbc_apr} 
-%-------------------------------------------------------------------------------------------------------------
+
+\begin{listing}
+  \nlst{namsbc_apr}
+  \caption{\forcode{&namsbc_apr}}
+  \label{lst:namsbc_apr}
+\end{listing}
 
 The optional atmospheric pressure can be used to force ocean and ice dynamics
-(\np{ln\_apr\_dyn}\forcode{ = .true.}, \textit{\ngn{namsbc}} namelist).
-The input atmospheric forcing defined via \np{sn\_apr} structure (\textit{namsbc\_apr} namelist)
+(\np[=.true.]{ln_apr_dyn}{ln\_apr\_dyn}, \nam{sbc}{sbc} namelist).
+The input atmospheric forcing defined via \np{sn_apr}{sn\_apr} structure (\nam{sbc_apr}{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
@@ -788,109 +703,106 @@
 \]
 where $P_{atm}$ is the atmospheric pressure and $P_o$ a reference atmospheric pressure.
-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 step.
+A value of $101,000~N/m^2$ is used unless \np{ln_ref_apr}{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.
 
 The gradient of $\eta_{ib}$ is added to the RHS of the ocean momentum equation (see \mdl{dynspg} for the ocean).
 For sea-ice, the sea surface height, $\eta_m$, which is provided to the sea ice model is set to $\eta - \eta_{ib}$
 (see \mdl{sbcssr} module).
-$\eta_{ib}$ can be set in the output.
+$\eta_{ib}$ can be written in the output.
 This can simplify altimetry data and model comparison as
 inverse barometer sea surface height is usually removed from these date prior to their distribution.
 
 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: 
-\np{ln\_apr\_obc}  might be set to true.
-
-% ================================================================
-%        Surface Tides Forcing
-% ================================================================
-\section{Surface tides (\protect\mdl{sbctide})}
+the equivalent inverse barometer sea surface height $\eta_{ib}$ can be added to BDY ssh data:
+\np{ln_apr_obc}{ln\_apr\_obc}  might be set to true.
+
+%% =================================================================================================
+\section[Surface tides (\textit{sbctide.F90})]{Surface tides (\protect\mdl{sbctide})}
 \label{sec:SBC_tide}
 
-%------------------------------------------nam_tide---------------------------------------
-
-\nlst{nam_tide}
-%-----------------------------------------------------------------------------------------
+\begin{listing}
+  \nlst{nam_tide}
+  \caption{\forcode{&nam_tide}}
+  \label{lst:nam_tide}
+\end{listing}
 
 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}.
-This translates as an additional barotropic force in the momentum equations \ref{eq:PE_dyn} such that:
+is activated if \np{ln_tide}{ln\_tide} and \np{ln_tide_pot}{ln\_tide\_pot} are both set to \forcode{.true.} in \nam{_tide}{\_tide}.
+This translates as an additional barotropic force in the momentum \autoref{eq:MB_PE_dyn} such that:
 \[
-  % \label{eq:PE_dyn_tides}
-  \frac{\partial {\rm {\bf U}}_h }{\partial t}= ...
+  % \label{eq:SBC_PE_dyn_tides}
+  \frac{\partial {\mathrm {\mathbf U}}_h }{\partial t}= ...
   +g\nabla (\Pi_{eq} + \Pi_{sal})
 \]
 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 \rou{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}
-and \textit{S2}). Optionally, when \np{ln\_tide\_ramp} is set to
+\np{clname}{clname} in \nam{_tide}{\_tide} (e.g., \np{clname}{clname}\forcode{(1)='M2', }
+\np{clname}{clname}\forcode{(2)='S2'} to select solely the tidal consituents \textit{M2}
+and \textit{S2}). Optionally, when \np{ln_tide_ramp}{ln\_tide\_ramp} is set to
 \forcode{.true.}, the equilibrium tidal forcing can be ramped up
-linearly from zero during the initial \np{rdttideramp} days of the
+linearly from zero during the initial \np{rdttideramp}{rdttideramp} days of the
 model run.
 
 The SAL term should in principle be computed online as it depends on
-the model tidal prediction itself (see \citet{Arbic2004} for a
+the model tidal prediction itself (see \citet{arbic.garner.ea_DSR04} for a
 discussion about the practical implementation of this term).
 Nevertheless, the complex calculations involved would make this
-computationally too expensive.  Here, two options are available:
+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[=.true.]{ln_read_load}{ln\_read\_load}), or a ``scalar approximation'' can be
+used (\np[=.true.]{ln_scal_load}{ln\_scal\_load}). In the latter case
 \[
   \Pi_{sal} = \beta \eta,
 \]
-where $\beta$ (\np{rn\_scal\_load} with a default value of 0.094) is a
+where $\beta$ (\np{rn_scal_load}{rn\_scal\_load} with a default value of 0.094) is a
 spatially constant scalar, often chosen to minimize tidal prediction
-errors. Setting both \np{ln\_read\_load} and \np{ln\_scal\_load} to
+errors. Setting both \np{ln_read_load}{ln\_read\_load} and \np{ln_scal_load}{ln\_scal\_load} to
 \forcode{.false.} removes the SAL contribution.
 
-% ================================================================
-%        River runoffs
-% ================================================================
-\section{River runoffs (\protect\mdl{sbcrnf})}
+%% =================================================================================================
+\section[River runoffs (\textit{sbcrnf.F90})]{River runoffs (\protect\mdl{sbcrnf})}
 \label{sec:SBC_rnf}
-%------------------------------------------namsbc_rnf----------------------------------------------------
-
-\nlst{namsbc_rnf} 
-%-------------------------------------------------------------------------------------------------------------
-
-%River runoff generally enters the ocean at a nonzero depth rather than through the surface. 
+
+\begin{listing}
+  \nlst{namsbc_rnf}
+  \caption{\forcode{&namsbc_rnf}}
+  \label{lst:namsbc_rnf}
+\end{listing}
+
+%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_al_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 
+%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
 %emp or emps and the changes made are below:
-
 
 %Rachel:
 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
-  properly represent the diurnal cycle \citep{Bernie_al_JC05}.
+  properly represent the diurnal cycle \citep{bernie.woolnough.ea_JC05}.
   see also \autoref{fig:SBC_dcy}.}.
 
@@ -900,21 +812,21 @@
 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
-\np{ln\_rnf\_temp} control whether the river attributes (depth, salinity and temperature) are read in and used.
+Namelist variables in \nam{sbc_rnf}{sbc\_rnf}, \np{ln_rnf_depth}{ln\_rnf\_depth}, \np{ln_rnf_sal}{ln\_rnf\_sal} and
+\np{ln_rnf_temp}{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.
 After the user specified depth is read ini,
-the number of grid boxes this corresponds to is calculated and stored in the variable \np{nz\_rnf}.
+the number of grid boxes this corresponds to is calculated and stored in the variable \np{nz_rnf}{nz\_rnf}.
 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
@@ -922,5 +834,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.
@@ -935,5 +847,5 @@
 As such the volume of water does not change, but the water is diluted.
 
-For the non-linear free surface case (\key{vvl}), no flux is allowed through the surface.
+For the non-linear free surface case, no flux is allowed through the surface.
 Instead in the surface box (as well as water moving up from the boxes below) a volume of runoff water is added with
 no corresponding heat and salt addition and so as happens in the lower boxes there is a dilution effect.
@@ -944,5 +856,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),
@@ -953,11 +865,10 @@
 
 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.}
@@ -969,115 +880,120 @@
 %ENDIF
 
-%\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.  
-
-%The depth option makes it possible to have the river water affecting just the surface layer, throughout depth, or some specified point in between.
-
-%To do this we need to treat evaporation/precipitation fluxes and river runoff differently in the tra_sbc module.  We decided to separate them throughout the code, so that the variable 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:
-
-%}
-% ================================================================
-%        Ice shelf melting
-% ================================================================
-\section{Ice shelf melting (\protect\mdl{sbcisf})}
+\cmtgm{  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.
+
+The depth option makes it possible to have the river water affecting just the surface layer,
+throughout depth, or some specified point in between.
+
+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 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/m^2s$ 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:}
+
+%% =================================================================================================
+\section[Ice shelf melting (\textit{sbcisf.F90})]{Ice shelf melting (\protect\mdl{sbcisf})}
 \label{sec:SBC_isf}
-%------------------------------------------namsbc_isf----------------------------------------------------
-
-\nlst{namsbc_isf}
-%--------------------------------------------------------------------------------------------------------
-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{Mathiot2017}. 
+
+\begin{listing}
+  \nlst{namsbc_isf}
+  \caption{\forcode{&namsbc_isf}}
+  \label{lst:namsbc_isf}
+\end{listing}
+
+The namelist variable in \nam{sbc}{sbc}, \np{nn_isf}{nn\_isf}, controls the ice shelf representation.
+Description and result of sensitivity test to \np{nn_isf}{nn\_isf} are presented in \citet{mathiot.jenkins.ea_GMD17}.
 The different options are illustrated in \autoref{fig:SBC_isf}.
 
 \begin{description}
-\item[\np{nn\_isf}\forcode{ = 1}]:
-  The ice shelf cavity is represented (\np{ln\_isfcav}\forcode{ = .true.} needed).
+  \item [{\np[=1]{nn_isf}{nn\_isf}}]: The ice shelf cavity is represented (\np[=.true.]{ln_isfcav}{ln\_isfcav} needed).
   The fwf and heat flux are depending of the local water properties.
+
   Two different bulk formulae are available:
 
-	\begin{description}
-	\item[\np{nn\_isfblk}\forcode{ = 1}]:
-     The melt rate is based on a balance between the upward ocean heat flux and
-     the latent heat flux at the ice shelf base. A complete description is available in \citet{Hunter2006}.
-	\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 complete description is available in \citet{Jenkins1991}.
-	\end{description}
-
-     Temperature and salinity used to compute the melt are the average temperature in the top boundary layer \citet{Losch2008}. 
-     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.
-     Then, the fluxes are spread over the same thickness (ie over one or several cells).
-     If \np{rn\_hisf\_tbl} larger than top $e_{3}t$, there is no more feedback between the freezing point at the interface and the the top cell temperature.
-     This can lead to super-cool temperature in the top cell under melting condition.
-     If \np{rn\_hisf\_tbl} smaller than top $e_{3}t$, the top boundary layer thickness is set to the top cell thickness.\\
-
-     Each melt bulk formula depends on a exchange coeficient ($\Gamma^{T,S}$) between the ocean and the ice. 
-     There are 3 different ways to compute the exchange coeficient:
-	\begin{description}
-        \item[\np{nn\_gammablk}\forcode{ = 0}]:
-     The salt and heat exchange coefficients are constant and defined by \np{rn\_gammas0} and \np{rn\_gammat0}. 
-\[
-  % \label{eq:sbc_isf_gamma_iso}
-\gamma^{T} = \np{rn\_gammat0}
-\]
-\[
-\gamma^{S} = \np{rn\_gammas0}
-\]
-     This is the recommended formulation for ISOMIP.
-	\item[\np{nn\_gammablk}\forcode{ = 1}]:
-     The salt and heat exchange coefficients are velocity dependent and defined as
-\[
-\gamma^{T} = \np{rn\_gammat0} \times u_{*} 
-\]
-\[
-\gamma^{S} = \np{rn\_gammas0} \times u_{*}
-\]
-     where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters).
-     See \citet{Jenkins2010} for all the details on this formulation. It is the recommended formulation for realistic application.
-	\item[\np{nn\_gammablk}\forcode{ = 2}]:
-     The salt and heat exchange coefficients are velocity and stability dependent and defined as:
-\[
-\gamma^{T,S} = \frac{u_{*}}{\Gamma_{Turb} + \Gamma^{T,S}_{Mole}} 
-\]
-     where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters),
-     $\Gamma_{Turb}$ the contribution of the ocean stability and
-     $\Gamma^{T,S}_{Mole}$ the contribution of the molecular diffusion.
-     See \citet{Holland1999} 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}]:
-   The ice shelf cavity is not represented.
-   The fwf and heat flux are computed using the \citet{Beckmann2003} parameterisation of isf melting.
-   The fluxes are distributed along the ice shelf edge between the depth of the average grounding line (GL)
-   (\np{sn\_depmax\_isf}) and the base of the ice shelf along the calving front
-   (\np{sn\_depmin\_isf}) as in (\np{nn\_isf}\forcode{ = 3}).
-   The effective melting length (\np{sn\_Leff\_isf}) is read from a file.
- \item[\np{nn\_isf}\forcode{ = 3}]:
-   The ice shelf cavity is not represented.
-   The fwf (\np{sn\_rnfisf}) is prescribed and distributed along the ice shelf edge between
-   the depth of the average grounding line (GL) (\np{sn\_depmax\_isf}) and
-   the base of the ice shelf along the calving front (\np{sn\_depmin\_isf}).
-   The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$.
- \item[\np{nn\_isf}\forcode{ = 4}]:
-   The ice shelf cavity is opened (\np{ln\_isfcav}\forcode{ = .true.} needed).
-   However, the fwf is not computed but specified from file \np{sn\_fwfisf}).
-   The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$.
-   As in \np{nn\_isf}\forcode{ = 1}, the fluxes are spread over the top boundary layer thickness (\np{rn\_hisf\_tbl})\\
+  \begin{description}
+  \item [{\np[=1]{nn_isfblk}{nn\_isfblk}}]: The melt rate is based on a balance between the upward ocean heat flux and
+    the latent heat flux at the ice shelf base. A complete description is available in \citet{hunter_rpt06}.
+  \item [{\np[=2]{nn_isfblk}{nn\_isfblk}}]: The melt rate and the heat flux are based on a 3 equations formulation
+    (a heat flux budget at the ice base, a salt flux budget at the ice base and a linearised freezing point temperature equation).
+    A complete description is available in \citet{jenkins_JGR91}.
+  \end{description}
+
+  Temperature and salinity used to compute the melt are the average temperature in the top boundary layer \citet{losch_JGR08}.
+  Its thickness is defined by \np{rn_hisf_tbl}{rn\_hisf\_tbl}.
+  The fluxes and friction velocity are computed using the mean temperature, salinity and velocity in the the first \np{rn_hisf_tbl}{rn\_hisf\_tbl} m.
+  Then, the fluxes are spread over the same thickness (ie over one or several cells).
+  If \np{rn_hisf_tbl}{rn\_hisf\_tbl} larger than top $e_{3}t$, there is no more feedback between the freezing point at the interface and the the top cell temperature.
+  This can lead to super-cool temperature in the top cell under melting condition.
+  If \np{rn_hisf_tbl}{rn\_hisf\_tbl} smaller than top $e_{3}t$, the top boundary layer thickness is set to the top cell thickness.\\
+
+  Each melt bulk formula depends on a exchange coeficient ($\Gamma^{T,S}$) between the ocean and the ice.
+  There are 3 different ways to compute the exchange coeficient:
+  \begin{description}
+  \item [{\np[=0]{nn_gammablk}{nn\_gammablk}}]: The salt and heat exchange coefficients are constant and defined by \np{rn_gammas0}{rn\_gammas0} and \np{rn_gammat0}{rn\_gammat0}.
+    \begin{gather*}
+       % \label{eq:SBC_isf_gamma_iso}
+      \gamma^{T} = rn\_gammat0 \\
+      \gamma^{S} = rn\_gammas0
+    \end{gather*}
+    This is the recommended formulation for ISOMIP.
+  \item [{\np[=1]{nn_gammablk}{nn\_gammablk}}]: The salt and heat exchange coefficients are velocity dependent and defined as
+    \begin{gather*}
+      \gamma^{T} = rn\_gammat0 \times u_{*} \\
+      \gamma^{S} = rn\_gammas0 \times u_{*}
+    \end{gather*}
+    where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_hisf_tbl}{rn\_hisf\_tbl} meters).
+    See \citet{jenkins.nicholls.ea_JPO10} for all the details on this formulation. It is the recommended formulation for realistic application.
+  \item [{\np[=2]{nn_gammablk}{nn\_gammablk}}]: The salt and heat exchange coefficients are velocity and stability dependent and defined as:
+    \[
+      \gamma^{T,S} = \frac{u_{*}}{\Gamma_{Turb} + \Gamma^{T,S}_{Mole}}
+    \]
+    where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_hisf_tbl}{rn\_hisf\_tbl} meters),
+    $\Gamma_{Turb}$ the contribution of the ocean stability and
+    $\Gamma^{T,S}_{Mole}$ the contribution of the molecular diffusion.
+    See \citet{holland.jenkins_JPO99} for all the details on this formulation.
+    This formulation has not been extensively tested in \NEMO\ (not recommended).
+  \end{description}
+\item [{\np[=2]{nn_isf}{nn\_isf}}]: The ice shelf cavity is not represented.
+  The fwf and heat flux are computed using the \citet{beckmann.goosse_OM03} parameterisation of isf melting.
+  The fluxes are distributed along the ice shelf edge between the depth of the average grounding line (GL)
+  (\np{sn_depmax_isf}{sn\_depmax\_isf}) and the base of the ice shelf along the calving front
+  (\np{sn_depmin_isf}{sn\_depmin\_isf}) as in (\np[=3]{nn_isf}{nn\_isf}).
+  The effective melting length (\np{sn_Leff_isf}{sn\_Leff\_isf}) is read from a file.
+\item [{\np[=3]{nn_isf}{nn\_isf}}]: The ice shelf cavity is not represented.
+  The fwf (\np{sn_rnfisf}{sn\_rnfisf}) is prescribed and distributed along the ice shelf edge between
+  the depth of the average grounding line (GL) (\np{sn_depmax_isf}{sn\_depmax\_isf}) and
+  the base of the ice shelf along the calving front (\np{sn_depmin_isf}{sn\_depmin\_isf}).
+  The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$.
+\item [{\np[=4]{nn_isf}{nn\_isf}}]: The ice shelf cavity is opened (\np[=.true.]{ln_isfcav}{ln\_isfcav} needed).
+  However, the fwf is not computed but specified from file \np{sn_fwfisf}{sn\_fwfisf}).
+  The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$.
+  As in \np[=1]{nn_isf}{nn\_isf}, the fluxes are spread over the top boundary layer thickness (\np{rn_hisf_tbl}{rn\_hisf\_tbl})
 \end{description}
 
-$\bullet$ \np{nn\_isf}\forcode{ = 1} and \np{nn\_isf}\forcode{ = 2} compute a melt rate based on
+$\bullet$ \np[=1]{nn_isf}{nn\_isf} and \np[=2]{nn_isf}{nn\_isf} compute a melt rate based on
 the water mass properties, ocean velocities and depth.
 This flux is thus highly dependent of the model resolution (horizontal and vertical),
 realism of the water masses onto the shelf ...\\
 
-$\bullet$ \np{nn\_isf}\forcode{ = 3} and \np{nn\_isf}\forcode{ = 4} read the melt rate from a file.
+$\bullet$ \np[=3]{nn_isf}{nn\_isf} and \np[=4]{nn_isf}{nn\_isf} read the melt rate from a file.
 You have total control of the fwf forcing.
 This can be useful if the water masses on the shelf are not realistic or
 the resolution (horizontal/vertical) are too coarse to have realistic melting or
-for studies where you need to control your heat and fw input.\\ 
+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.
@@ -1086,52 +1002,49 @@
 See the runoff section \autoref{sec:SBC_rnf} for all the details about the divergence correction.\\
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=0.8\textwidth]{Fig_SBC_isf}
-    \caption{
-      \protect\label{fig:SBC_isf}
-      Illustration the location where the fwf is injected and whether or not the fwf is interactif or not depending of \np{nn\_isf}.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{SBC_isf}
+  \caption[Ice shelf location and fresh water flux definition]{
+    Illustration of the location where the fwf is injected and
+    whether or not the fwf is interactif or not depending of \protect\np{nn_isf}{nn\_isf}.}
+  \label{fig:SBC_isf}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
+
+%% =================================================================================================
 \section{Ice sheet coupling}
 \label{sec:SBC_iscpl}
-%------------------------------------------namsbc_iscpl----------------------------------------------------
-
-\nlst{namsbc_iscpl}
-%--------------------------------------------------------------------------------------------------------
+
+\begin{listing}
+  \nlst{namsbc_iscpl}
+  \caption{\forcode{&namsbc_iscpl}}
+  \label{lst:namsbc_iscpl}
+\end{listing}
+
 Ice sheet/ocean coupling is done through file exchange at the restart step.
 At each restart step:
-\begin{description}
-\item[Step 1]: the ice sheet model send a new bathymetry and ice shelf draft netcdf file.
-\item[Step 2]: a new domcfg.nc file is built using the DOMAINcfg tools.
-\item[Step 3]: NEMO run for a specific period and output the average melt rate over the period.
-\item[Step 4]: the ice sheet model run using the melt rate outputed in step 4.
-\item[Step 5]: go back to 1.
-\end{description}
-
-If \np{ln\_iscpl}\forcode{ = .true.}, the isf draft is assume to be different at each restart step with
+
+\begin{enumerate}
+\item the ice sheet model send a new bathymetry and ice shelf draft netcdf file.
+\item a new domcfg.nc file is built using the DOMAINcfg tools.
+\item \NEMO\ run for a specific period and output the average melt rate over the period.
+\item the ice sheet model run using the melt rate outputed in step 4.
+\item go back to 1.
+\end{enumerate}
+
+If \np[=.true.]{ln_iscpl}{ln\_iscpl}, the isf draft is assume to be different at each restart step with
 potentially some new wet/dry cells due to the ice sheet dynamics/thermodynamics.
 The wetting and drying scheme applied on the restart is very simple and described below for the 6 different possible cases:
+
 \begin{description}
-\item[Thin a cell down]:
-  T/S/ssh are unchanged and U/V in the top cell are corrected to keep the barotropic transport (bt) constant
+\item [Thin a cell down]: T/S/ssh are unchanged and U/V in the top cell are corrected to keep the barotropic transport (bt) constant
   ($bt_b=bt_n$).
-\item[Enlarge  a cell]:
-  See case "Thin a cell down"
-\item[Dry a cell]:
-  mask, T/S, U/V and ssh are set to 0.
+\item [Enlarge  a cell]: See case "Thin a cell down"
+\item [Dry a cell]: mask, T/S, U/V and ssh are set to 0.
   Furthermore, U/V into the water column are modified to satisfy ($bt_b=bt_n$).
-\item[Wet a cell]: 
-  mask is set to 1, T/S is extrapolated from neighbours, $ssh_n = ssh_b$ and U/V set to 0.
-  If no neighbours, T/S is extrapolated from old top cell value. 
+\item [Wet a cell]: mask is set to 1, T/S is extrapolated from neighbours, $ssh_n = ssh_b$ and U/V set to 0.
+  If no neighbours, T/S is extrapolated from old top cell value.
   If no neighbours along i,j and k (both previous test failed), T/S/U/V/ssh and mask are set to 0.
-\item[Dry a column]:
-	mask, T/S, U/V are set to 0 everywhere in the column and ssh set to 0.
-\item[Wet a column]:
-  set mask to 1, T/S is extrapolated from neighbours, ssh is extrapolated from neighbours and U/V set to 0.
+\item [Dry a column]: mask, T/S, U/V are set to 0 everywhere in the column and ssh set to 0.
+\item [Wet a column]: set mask to 1, T/S is extrapolated from neighbours, ssh is extrapolated from neighbours and U/V set to 0.
   If no neighbour, T/S/U/V and mask set to 0.
 \end{description}
@@ -1140,51 +1053,48 @@
 the restart time step is prescribed to be an euler time step instead of a leap frog and $fields_b = fields_n$.\\
 
-The horizontal extrapolation to fill new cell with realistic value is called \np{nn\_drown} times.
-It means that if the grounding line retreat by more than \np{nn\_drown} cells between 2 coupling steps,
+The horizontal extrapolation to fill new cell with realistic value is called \np{nn_drown}{nn\_drown} times.
+It means that if the grounding line retreat by more than \np{nn_drown}{nn\_drown} cells between 2 coupling steps,
 the code will be unable to fill all the new wet cells properly.
 The 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.\\
 
 In order to remove the trend and keep the conservation level as close to 0 as possible,
-a simple conservation scheme is available with \np{ln\_hsb}\forcode{ = .true.}.
+a simple conservation scheme is available with \np[=.true.]{ln_hsb}{ln\_hsb}.
 The heat/salt/vol. gain/loss is diagnosed, as well as the location.
-A correction increment is computed and apply each time step during the next \np{rn\_fiscpl} time steps. 
-For safety, it is advised to set \np{rn\_fiscpl} equal to the coupling period (smallest increment possible).
+A correction increment is computed and apply each time step during the next \np{rn_fiscpl}{rn\_fiscpl} time steps.
+For safety, it is advised to set \np{rn_fiscpl}{rn\_fiscpl} equal to the coupling period (smallest increment possible).
 The corrective increment is apply into the cell itself (if it is a wet cell), the neigbouring cells or the closest wet cell (if the cell is now dry).
 
-%
-% ================================================================
-%        Handling of icebergs
-% ================================================================
+%% =================================================================================================
 \section{Handling of icebergs (ICB)}
-\label{sec:ICB_icebergs}
-%------------------------------------------namberg----------------------------------------------------
-
-\nlst{namberg}
-%-------------------------------------------------------------------------------------------------------------
-
-Icebergs are modelled as lagrangian particles in NEMO \citep{Marsh_GMD2015}.
-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).
+\label{sec:SBC_ICB_icebergs}
+
+\begin{listing}
+  \nlst{namberg}
+  \caption{\forcode{&namberg}}
+  \label{lst:namberg}
+\end{listing}
+
+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).
 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}.
-Each class has an associated scaling (\np{rn\_mass\_scaling}),
+described in the \nam{berg}{berg} namelist: \np{rn_initial_mass}{rn\_initial\_mass} and \np{rn_initial_thickness}{rn\_initial\_thickness}.
+Each class has an associated scaling (\np{rn_mass_scaling}{rn\_mass\_scaling}),
 which is an integer representing how many icebergs of this class are being described as one lagrangian point
 (this reduces the numerical problem of tracking every single iceberg).
-They are enabled by setting \np{ln\_icebergs}\forcode{ = .true.}.
+They are enabled by setting \np[=.true.]{ln_icebergs}{ln\_icebergs}.
 
 Two initialisation schemes are possible.
 \begin{description}
-\item[\np{nn\_test\_icebergs}~$>$~0]
-  In this scheme, the value of \np{nn\_test\_icebergs} represents the class of iceberg to generate
-  (so between 1 and 10), and \np{nn\_test\_icebergs} provides a lon/lat box in the domain at each grid point of
+\item [{\np{nn_test_icebergs}{nn\_test\_icebergs}~$>$~0}] In this scheme, the value of \np{nn_test_icebergs}{nn\_test\_icebergs} represents the class of iceberg to generate
+  (so between 1 and 10), and \np{nn_test_icebergs}{nn\_test\_icebergs} provides a lon/lat box in the domain at each grid point of
   which an iceberg is generated at the beginning of the run.
-  (Note that this happens each time the timestep equals \np{nn\_nit000}.)
-  \np{nn\_test\_icebergs} is defined by four numbers in \np{nn\_test\_box} representing the corners of
+  (Note that this happens each time the timestep equals \np{nn_nit000}{nn\_nit000}.)
+  \np{nn_test_icebergs}{nn\_test\_icebergs} is defined by four numbers in \np{nn_test_box}{nn\_test\_box} representing the corners of
   the geographical box: lonmin,lonmax,latmin,latmax
-\item[\np{nn\_test\_icebergs}\forcode{ = -1}]
-  In this scheme the model reads a calving file supplied in the \np{sn\_icb} parameter.
+\item [{\np[=-1]{nn_test_icebergs}{nn\_test\_icebergs}}] In this scheme, the model reads a calving file supplied in the \np{sn_icb}{sn\_icb} parameter.
   This should be a file with a field on the configuration grid (typically ORCA)
   representing ice accumulation rate at each model point.
@@ -1194,5 +1104,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}
@@ -1201,20 +1111,20 @@
 The latter act to disintegrate the iceberg.
 This is either all melted freshwater,
-or (if \np{rn\_bits\_erosion\_fraction}~$>$~0) into melt and additionally small ice bits
+or (if \np{rn_bits_erosion_fraction}{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.
 Separate output files are maintained for human-readable iceberg information.
-A separate file is produced for each processor (independent of \np{ln\_ctl}).
+A separate file is produced for each processor (independent of \np{ln_ctl}{ln\_ctl}).
 The amount of information is controlled by two integer parameters:
 \begin{description}
-\item[\np{nn\_verbose\_level}] takes a value between one and four and
+\item [{\np{nn_verbose_level}{nn\_verbose\_level}}] takes a value between one and four and
   represents an increasing number of points in the code at which variables are written,
   and an increasing level of obscurity.
-\item[\np{nn\_verbose\_write}] is the number of timesteps between writes
+\item [{\np{nn_verbose_write}{nn\_verbose\_write}}] is the number of timesteps between writes
 \end{description}
 
-Iceberg trajectories can also be written out and this is enabled by setting \np{nn\_sample\_rate}~$>$~0.
+Iceberg trajectories can also be written out and this is enabled by setting \np{nn_sample_rate}{nn\_sample\_rate}~$>$~0.
 A non-zero value represents how many timesteps between writes of information into the output file.
 These output files are in NETCDF format.
@@ -1224,66 +1134,59 @@
 since its trajectory data may be spread across multiple files.
 
-% -------------------------------------------------------------------------------------------------------------
-%        Interactions with waves (sbcwave.F90, ln_wave)
-% -------------------------------------------------------------------------------------------------------------
-\section{Interactions with waves (\protect\mdl{sbcwave}, \protect\np{ln\_wave})}
+%% =================================================================================================
+\section[Interactions with waves (\textit{sbcwave.F90}, \forcode{ln_wave})]{Interactions with waves (\protect\mdl{sbcwave}, \protect\np{ln_wave}{ln\_wave})}
 \label{sec:SBC_wave}
-%------------------------------------------namsbc_wave--------------------------------------------------------
-
-\nlst{namsbc_wave}
-%-------------------------------------------------------------------------------------------------------------
-
-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 
+
+\begin{listing}
+  \nlst{namsbc_wave}
+  \caption{\forcode{&namsbc_wave}}
+  \label{lst:namsbc_wave}
+\end{listing}
+
+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 
-different porcesses should be activated as explained in the following sections.
+Physical processes related to ocean surface waves can be accounted by setting the logical variable
+\np[=.true.]{ln_wave}{ln\_wave} in \nam{sbc}{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}{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[=.true.]{ln_cpl}{ln\_cpl}
+in \nam{sbc}{sbc} namelist and filling the \nam{sbc_cpl}{sbc\_cpl} namelist.
 \end{description}
 
-
-% ================================================================
-% Neutral drag coefficient from wave model (ln_cdgw)
-
-% ================================================================
-\subsection{Neutral drag coefficient from wave model (\protect\np{ln\_cdgw})}
+%% =================================================================================================
+\subsection[Neutral drag coefficient from wave model (\forcode{ln_cdgw})]{Neutral drag coefficient from wave model (\protect\np{ln_cdgw}{ln\_cdgw})}
 \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{turb\_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_Rep04}. 
-
-
-% ================================================================
-% 3D Stokes Drift (ln_sdw, nn_sdrift)
-% ================================================================
-\subsection{3D Stokes Drift (\protect\np{ln\_sdw, nn\_sdrift})}
+The neutral surface drag coefficient provided from an external data source (\ie\ a wave model),
+can be used by setting the logical variable \np[=.true.]{ln_cdgw}{ln\_cdgw} in \nam{sbc}{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}.
+
+%% =================================================================================================
+\subsection[3D Stokes Drift (\forcode{ln_sdw} \& \forcode{nn_sdrift})]{3D Stokes Drift (\protect\np{ln_sdw}{ln\_sdw} \& \np{nn_sdrift}{nn\_sdrift})}
 \label{subsec:SBC_wave_sdw}
 
-The Stokes drift is a wave driven mechanism of mass and momentum transport \citep{Stokes_1847}. 
-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.
-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 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:
 
 \[
-  % \label{eq:sbc_wave_sdw}
+  % \label{eq:SBC_wave_sdw}
   \mathbf{U}_{st} = \frac{16{\pi^3}} {g}
   \int_0^\infty \int_{-\pi}^{\pi} (cos{\theta},sin{\theta}) {f^3}
@@ -1291,25 +1194,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}{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 
-\citet{Breivik_al_JPO2014}:
+\item [{\np{nn_sdrift}{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} 
+  % \label{eq:SBC_wave_sdw_0a}
+  \mathbf{U}_{st} \cong \mathbf{U}_{st |_{z=0}} \frac{\mathrm{e}^{-2k_ez}} {1-8k_ez}
 \]
 
@@ -1317,18 +1220,18 @@
 
 \[
-  % \label{eq:sbc_wave_sdw_0b}
+  % \label{eq:SBC_wave_sdw_0b}
   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 
-reasonable estimate of the part of the spectrum most contributing to the Stokes drift velocity near the surface
-\citep{Breivik_al_OM2016}:
+\item [{\np{nn_sdrift}{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}:
 
 \[
-  % \label{eq:sbc_wave_sdw_1}
+  % \label{eq:SBC_wave_sdw_1}
   \mathbf{U}_{st} \cong \mathbf{U}_{st |_{z=0}} \Big[exp(2k_pz)-\beta \sqrt{-2 \pi k_pz}
   \textit{ erf } \Big(\sqrt{-2 k_pz}\Big)\Big]
@@ -1337,61 +1240,55 @@
 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}{nn\_sdrift} = 2}]: velocity profile based on the Phillips spectrum as for \np{nn_sdrift}{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:
 
 \[
-  % \label{eq:sbc_wave_eta_sdw}
+  % \label{eq:SBC_wave_eta_sdw}
   \frac{\partial{\eta}}{\partial{t}} =
   -\nabla_h \int_{-H}^{\eta} (\mathbf{U} + \mathbf{U}_{st}) dz
 \]
 
-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:
 
 \[
-  % \label{eq:sbc_wave_tra_sdw}
+  % \label{eq:SBC_wave_tra_sdw}
   \frac{\partial{c}}{\partial{t}} =
   - (\mathbf{U} + \mathbf{U}_{st}) \cdot \nabla{c}
 \]
 
-
-% ================================================================
-% Stokes-Coriolis term (ln_stcor)
-% ================================================================
-\subsection{Stokes-Coriolis term (\protect\np{ln\_stcor})}
+%% =================================================================================================
+\subsection[Stokes-Coriolis term (\forcode{ln_stcor})]{Stokes-Coriolis term (\protect\np{ln_stcor}{ln\_stcor})}
 \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}), 
-\np{ln\_stcor}\forcode{ = .true.} has to be set.
-
-
-% ================================================================
-% Waves modified stress (ln_tauwoc, ln_tauw)
-% ================================================================
-\subsection{Wave modified sress (\protect\np{ln\_tauwoc, ln\_tauw})} 
+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[=.true.]{ln_stcor}{ln\_stcor} has to be set.
+
+%% =================================================================================================
+\subsection[Wave modified stress (\forcode{ln_tauwoc} \& \forcode{ln_tauw})]{Wave modified sress (\protect\np{ln_tauwoc}{ln\_tauwoc} \& \np{ln_tauw}{ln\_tauw})}
 \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_al_TM13}. 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:
 
 \[
-  % \label{eq:sbc_wave_tauoc}
+  % \label{eq:SBC_wave_tauoc}
   \tau_{oc,a} = \tau_a - \tau_w
 \]
@@ -1401,89 +1298,72 @@
 
 \[
-  % \label{eq:sbc_wave_tauw}
+  % \label{eq:SBC_wave_tauw}
   \tau_w = \rho g \int {\frac{dk}{c_p} (S_{in}+S_{nl}+S_{diss})}
 \]
 
 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 
-meridional stress components by setting \np{ln\_tauw}\forcode{ = .true.}.
-
-
-% ================================================================
-% Miscellanea options
-% ================================================================
+The wave stress derived from an external wave model can be provided either through the normalized
+wave stress into the ocean by setting \np[=.true.]{ln_tauwoc}{ln\_tauwoc}, or through the zonal and
+meridional stress components by setting \np[=.true.]{ln_tauw}{ln\_tauw}.
+
+%% =================================================================================================
 \section{Miscellaneous options}
 \label{sec:SBC_misc}
 
-% -------------------------------------------------------------------------------------------------------------
-%        Diurnal cycle
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Diurnal cycle (\protect\mdl{sbcdcy})}
+%% =================================================================================================
+\subsection[Diurnal cycle (\textit{sbcdcy.F90})]{Diurnal cycle (\protect\mdl{sbcdcy})}
 \label{subsec:SBC_dcy}
-%------------------------------------------namsbc_rnf----------------------------------------------------
-%
-\nlst{namsbc} 
-%-------------------------------------------------------------------------------------------------------------
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
 \begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=0.8\textwidth]{Fig_SBC_diurnal}
-    \caption{
-      \protect\label{fig:SBC_diurnal}
-      Example of recontruction of the diurnal cycle variation of short wave flux from daily mean values.
-      The reconstructed diurnal cycle (black line) is chosen as
-      the mean value of the analytical cycle (blue line) over a time step,
-      not as the mid time step value of the analytically cycle (red square).
-      From \citet{Bernie_al_CD07}.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{SBC_diurnal}
+  \caption[Reconstruction of the diurnal cycle variation of short wave flux]{
+    Example of reconstruction of the diurnal cycle variation of short wave flux from
+    daily mean values.
+    The reconstructed diurnal cycle (black line) is chosen as
+    the mean value of the analytical cycle (blue line) over a time step,
+    not as the mid time step value of the analytically cycle (red square).
+    From \citet{bernie.guilyardi.ea_CD07}.}
+  \label{fig:SBC_diurnal}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-\cite{Bernie_al_JC05} have shown that to capture 90$\%$ of the diurnal variability of SST requires a vertical resolution in upper ocean of 1~m or better and a temporal resolution of the surface fluxes of 3~h or less.
-Unfortunately high frequency forcing fields are rare, not to say inexistent.
-Nevertheless, it is possible to obtain a reasonable diurnal cycle of the SST knowning only short wave flux (SWF) at
-high frequency \citep{Bernie_al_CD07}.
+
+\cite{bernie.woolnough.ea_JC05} have shown that to capture 90$\%$ of the diurnal variability of SST requires a vertical resolution in upper ocean of 1~m or better and a temporal resolution of the surface fluxes of 3~h or less.
+%Unfortunately high frequency forcing fields are rare, not to say inexistent. GS: not true anymore !
+Nevertheless, it is possible to obtain a reasonable diurnal cycle of the SST knowning only short wave flux (SWF) at high frequency \citep{bernie.guilyardi.ea_CD07}.
 Furthermore, only the knowledge of daily mean value of SWF is needed,
 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_al_CD07} reconstruction algorithm is available in \NEMO by
-setting \np{ln\_dm2dc}\forcode{ = .true.} (a \textit{\ngn{namsbc}} namelist variable) when
-using CORE bulk formulea (\np{ln\_blk\_core}\forcode{ = .true.}) or
-the flux formulation (\np{ln\_flx}\forcode{ = .true.}).
+The \cite{bernie.guilyardi.ea_CD07} reconstruction algorithm is available in \NEMO\ by
+setting \np[=.true.]{ln_dm2dc}{ln\_dm2dc} (a \textit{\nam{sbc}{sbc}} namelist variable) when
+using a bulk formulation (\np[=.true.]{ln_blk}{ln\_blk}) or
+the flux formulation (\np[=.true.]{ln_flx}{ln\_flx}).
 The reconstruction is performed in the \mdl{sbcdcy} module.
-The detail of the algoritm used can be found in the appendix~A of \cite{Bernie_al_CD07}.
-The algorithm preserve the daily mean incoming SWF as the reconstructed SWF at
+The detail of the algoritm used can be found in the appendix~A of \cite{bernie.guilyardi.ea_CD07}.
+The algorithm preserves the daily mean incoming SWF as the reconstructed SWF at
 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 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 step per day,
+(\ie\ a frequency of 24 hours and a time interpolation set to true in \np{sn_qsr}{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$.
 An example of recontructed SWF is given in \autoref{fig:SBC_dcy} for a 12 reconstructed diurnal cycle,
 one every 2~hours (from 1am to 11pm).
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=0.7\textwidth]{Fig_SBC_dcy}
-    \caption{
-      \protect\label{fig:SBC_dcy}
-      Example of recontruction of the diurnal cycle variation of short wave flux from
-      daily mean values on an ORCA2 grid with a time sampling of 2~hours (from 1am to 11pm).
-      The display is on (i,j) plane.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{SBC_dcy}
+  \caption[Reconstruction of the diurnal cycle variation of short wave flux on an ORCA2 grid]{
+    Example of reconstruction of the diurnal cycle variation of short wave flux from
+    daily mean values on an ORCA2 grid with a time sampling of 2~hours (from 1am to 11pm).
+    The display is on (i,j) plane.}
+  \label{fig:SBC_dcy}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
 Note also that the setting a diurnal cycle in SWF is highly recommended when
@@ -1491,17 +1371,14 @@
 an inconsistency between the scale of the vertical resolution and the forcing acting on that scale.
 
-% -------------------------------------------------------------------------------------------------------------
-%        Rotation of vector pairs onto the model grid directions
-% -------------------------------------------------------------------------------------------------------------
+%% =================================================================================================
 \subsection{Rotation of vector pairs onto the model grid directions}
 \label{subsec:SBC_rotation}
 
-When using a flux (\np{ln\_flx}\forcode{ = .true.}) or
-bulk (\np{ln\_clio}\forcode{ = .true.} or \np{ln\_core}\forcode{ = .true.}) formulation,
+When using a flux (\np[=.true.]{ln_flx}{ln\_flx}) or bulk (\np[=.true.]{ln_blk}{ln\_blk}) formulation,
 pairs of vector components can be rotated from east-north directions onto the local grid directions.
 This is particularly useful when interpolation on the fly is used since here any vectors are likely to
 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".  
+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 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
@@ -1511,19 +1388,19 @@
 The rot\_rep routine from the \mdl{geo2ocean} module is used to perform the rotation.
 
-% -------------------------------------------------------------------------------------------------------------
-%        Surface restoring to observed SST and/or SSS
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Surface restoring to observed SST and/or SSS (\protect\mdl{sbcssr})}
+%% =================================================================================================
+\subsection[Surface restoring to observed SST and/or SSS (\textit{sbcssr.F90})]{Surface restoring to observed SST and/or SSS (\protect\mdl{sbcssr})}
 \label{subsec:SBC_ssr}
-%------------------------------------------namsbc_ssr----------------------------------------------------
-
-\nlst{namsbc_ssr} 
-%-------------------------------------------------------------------------------------------------------------
-
-IOptions are defined through the \ngn{namsbc\_ssr} namelist variables.
-On forced mode using a flux formulation (\np{ln\_flx}\forcode{ = .true.}),
+
+\begin{listing}
+  \nlst{namsbc_ssr}
+  \caption{\forcode{&namsbc_ssr}}
+  \label{lst:namsbc_ssr}
+\end{listing}
+
+Options are defined through the \nam{sbc_ssr}{sbc\_ssr} namelist variables.
+On forced mode using a flux formulation (\np[=.true.]{ln_flx}{ln\_flx}),
 a feedback term \emph{must} be added to the surface heat flux $Q_{ns}^o$:
 \[
-  % \label{eq:sbc_dmp_q}
+  % \label{eq:SBC_dmp_q}
   Q_{ns} = Q_{ns}^o + \frac{dQ}{dT} \left( \left. T \right|_{k=1} - SST_{Obs} \right)
 \]
@@ -1531,6 +1408,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.
@@ -1538,5 +1415,5 @@
 
 \begin{equation}
-  \label{eq:sbc_dmp_emp}
+  \label{eq:SBC_dmp_emp}
   \textit{emp} = \textit{emp}_o + \gamma_s^{-1} e_{3t}  \frac{  \left(\left.S\right|_{k=1}-SSS_{Obs}\right)}
   {\left.S\right|_{k=1}}
@@ -1546,15 +1423,13 @@
 (observed, climatological or an atmospheric model product),
 \textit{SSS}$_{Obs}$ is a sea surface salinity
-(usually a time interpolation of the monthly mean Polar Hydrographic Climatology \citep{Steele2001}),
+(usually a time interpolation of the monthly mean Polar Hydrographic Climatology \citep{steele.morley.ea_JC01}),
 $\left.S\right|_{k=1}$ is the model surface layer salinity and
 $\gamma_s$ is a negative feedback coefficient which is provided as a namelist parameter.
-Unlike heat flux, there is no physical justification for the feedback term in \autoref{eq:sbc_dmp_emp} as
-the atmosphere does not care about ocean surface salinity \citep{Madec1997}.
+Unlike heat flux, there is no physical justification for the feedback term in \autoref{eq:SBC_dmp_emp} as
+the atmosphere does not care about ocean surface salinity \citep{madec.delecluse_IWN97}.
 The SSS restoring term should be viewed as a flux correction on freshwater fluxes to
 reduce the uncertainties we have on the observed freshwater budget.
 
-% -------------------------------------------------------------------------------------------------------------
-%        Handling of ice-covered area
-% -------------------------------------------------------------------------------------------------------------
+%% =================================================================================================
 \subsection{Handling of ice-covered area  (\textit{sbcice\_...})}
 \label{subsec:SBC_ice-cover}
@@ -1562,13 +1437,11 @@
 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}{nn\_ice} namelist parameter found in \nam{sbc}{sbc} namelist.
 \begin{description}
-\item[nn{\_}ice = 0]
-  there will never be sea-ice in the computational domain.
+\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]
-  sea-ice can exist in the computational domain, but no sea-ice model is used.
+\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.
   Below this area, the SST is restored to the freezing point and
@@ -1578,43 +1451,44 @@
   This prevents deep convection to occur when trying to reach the freezing point
   (and so ice covered area condition) while the SSS is too large.
-  This manner of managing sea-ice area, just by using si IF case,
+  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]
-  A full sea ice model is used.
+  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,
   that are combined with the air-sea fluxes using the ice fraction of each model cell to
-  provide the surface ocean fluxes.
-  Note that the activation of a sea-ice model is is done by defining a CPP key (\key{lim3} or \key{cice}).
-  The activation automatically overwrites the read value of nn{\_}ice to its appropriate value
-  (\ie $2$ for LIM-3 or $3$ for CICE).
+  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).
 \end{description}
 
 % {Description of Ice-ocean interface to be added here or in LIM 2 and 3 doc ?}
-
-\subsection{Interface to CICE (\protect\mdl{sbcice\_cice})}
+%GS: ocean-ice (SI3) interface is not located in SBC directory anymore, so it should be included in SI3 doc
+
+%% =================================================================================================
+\subsection[Interface to CICE (\textit{sbcice\_cice.F90})]{Interface to CICE (\protect\mdl{sbcice\_cice})}
 \label{subsec:SBC_cice}
 
-It is now 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 CORE forcing option for NEMO
-(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
-(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
+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
+(with \textit{calc\_strair}\forcode{=.false.} and \textit{calc\_Tsfc}\forcode{=false}).
+The code is intended to be used with \np{nn_fsbc}{nn\_fsbc} set to 1
 (although coupling ocean and ice less frequently should work,
 it is possible the calculation of some of the ocean-ice fluxes needs to be modified slightly -
 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
@@ -1623,54 +1497,47 @@
 there is no sea ice.
 
-% -------------------------------------------------------------------------------------------------------------
-%        Freshwater budget control 
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Freshwater budget control (\protect\mdl{sbcfwb})}
+%% =================================================================================================
+\subsection[Freshwater budget control (\textit{sbcfwb.F90})]{Freshwater budget control (\protect\mdl{sbcfwb})}
 \label{subsec:SBC_fwb}
 
-For global ocean simulation it can be useful to introduce a control of the mean sea level in order to
+For global ocean simulation, it can be useful to introduce a control of the mean sea level in order to
 prevent unrealistic drift of the sea surface height due to inaccuracy in the freshwater fluxes.
-In \NEMO, two way of controlling the the freshwater budget. 
+In \NEMO, two way of controlling the freshwater budget are proposed:
+
 \begin{description}
-\item[\np{nn\_fwb}\forcode{ = 0}]
-  no control at all.
+\item [{\np[=0]{nn_fwb}{nn\_fwb}}] no control at all.
   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. 
-%Note that with a sea-ice model, this technique only control the mean sea level with linear free surface (\key{vvl} not defined) 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
+\item [{\np[=1]{nn_fwb}{nn\_fwb}}] 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).
+\item [{\np[=2]{nn_fwb}{nn\_fwb}}] 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. 
-
-\biblio
-
-\pindex
+% 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.
+
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_STO.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_STO.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_STO.tex	(revision 11831)
@@ -2,56 +2,72 @@
 
 \begin{document}
-% ================================================================
-% Chapter stochastic parametrization of EOS (STO)
-% ================================================================
+
 \chapter{Stochastic Parametrization of EOS (STO)}
 \label{chap:STO}
 
-Authors: P.-A. Bouttier
-
-\minitoc
-
-\newpage
-
-The stochastic parametrization module aims to explicitly simulate uncertainties in the model.
-More particularly, \cite{Brankart_OM2013} has shown that,
-because of the nonlinearity of the seawater equation of state, unresolved scales represent a major source of
-uncertainties in the computation of the large scale horizontal density gradient (from T/S large scale fields),
-and that the impact of these uncertainties can be simulated by
-random processes representing unresolved T/S fluctuations.
-
-The stochastic formulation of the equation of state can be written as:
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+% \vfill
+% \begin{figure}[b]
+%% =================================================================================================
+% \subsubsection*{Changes record}
+% \begin{tabular}{l||l|m{0.65\linewidth}}
+%    Release   & Author        & Modifications \\
+%    {\em 4.0.1} & {\em C. Levy} & {\em 4.0.1 update}  \\
+%    {\em 3.6} & {\em P.-A. Bouttier} & {\em initial version}  \\
+% \end{tabular}
+% \end{figure}
+
+\clearpage
+
+As a result of the nonlinearity of the seawater equation of state, unresolved scales represent a major source of uncertainties in the computation of the large-scale horizontal density gradient from the large-scale temperature and salinity fields. Following  \cite{brankart_OM13}, the impact of these uncertainties can be simulated by random processes representing unresolved T/S fluctuations. The Stochastic Parametrization of EOS (STO) module implements this parametrization.
+
+As detailed in \cite{brankart_OM13}, the stochastic formulation of the equation of state can be written as:
 \begin{equation}
-  \label{eq:eos_sto}
+  \label{eq:STO_eos_sto}
   \rho = \frac{1}{2} \sum_{i=1}^m\{ \rho[T+\Delta T_i,S+\Delta S_i,p_o(z)] + \rho[T-\Delta T_i,S-\Delta S_i,p_o(z)] \}
 \end{equation}
 where $p_o(z)$ is the reference pressure depending on the depth and,
-$\Delta T_i$ and $\Delta S_i$ are a set of T/S perturbations defined as
+$\Delta T_i$ and $\Delta S_i$ (i=1,m) is a set of T/S perturbations defined as
 the scalar product of the respective local T/S gradients with random walks $\mathbf{\xi}$:
 \begin{equation}
-  \label{eq:sto_pert}
+  \label{eq:STO_sto_pert}
   \Delta T_i = \mathbf{\xi}_i \cdot \nabla T \qquad \hbox{and} \qquad \Delta S_i = \mathbf{\xi}_i \cdot \nabla S
 \end{equation}
-$\mathbf{\xi}_i$ are produced by a first-order autoregressive processes (AR-1) with
+$\mathbf{\xi}_i$ are produced by a first-order autoregressive process (AR-1) with
 a parametrized decorrelation time scale, and horizontal and vertical standard deviations $\sigma_s$.
 $\mathbf{\xi}$ are uncorrelated over the horizontal and fully correlated along the vertical.
 
-
+%% =================================================================================================
 \section{Stochastic processes}
 \label{sec:STO_the_details}
 
-The starting point of our implementation of stochastic parameterizations in NEMO is to observe that
-many existing parameterizations are based on autoregressive processes,
+There are many existing parameterizations based on autoregressive processes,
 which are used as a basic source of randomness to transform a deterministic model into a probabilistic model.
-A generic approach is thus to add one single new module in NEMO,
-generating processes with appropriate statistics to simulate each kind of uncertainty in the model
-(see \cite{Brankart_al_GMD2015} for more details).
-
-In practice, at every model grid point,
+The generic approach here is to a new STO module,
+generating processes features with appropriate statistics to simulate these uncertainties in the model
+(see \cite{brankart.candille.ea_GMD15} for more details).
+
+In practice, at each model grid point,
 independent Gaussian autoregressive processes~$\xi^{(i)},\,i=1,\ldots,m$ are first generated using
 the same basic equation:
 
 \begin{equation}
-  \label{eq:autoreg}
+  \label{eq:STO_autoreg}
   \xi^{(i)}_{k+1} = a^{(i)} \xi^{(i)}_k + b^{(i)} w^{(i)} + c^{(i)}
 \end{equation}
@@ -63,10 +79,9 @@
 
 \begin{itemize}
-\item
-  for order~1 processes, $w^{(i)}$ is a Gaussian white noise, with zero mean and standard deviation equal to~1,
+\item for order~1 processes, $w^{(i)}$ is a Gaussian white noise, with zero mean and standard deviation equal to~1,
   and the parameters $a^{(i)}$, $b^{(i)}$, $c^{(i)}$ are given by:
 
   \[
-    % \label{eq:ord1}
+    % \label{eq:STO_ord1}
     \left\{
       \begin{array}{l}
@@ -78,6 +93,5 @@
   \]
 
-\item
-  for order~$n>1$ processes, $w^{(i)}$ is an order~$n-1$ autoregressive process, with zero mean,
+\item for order~$n>1$ processes, $w^{(i)}$ is an order~$n-1$ autoregressive process, with zero mean,
   standard deviation equal to~$\sigma^{(i)}$;
   correlation timescale equal to~$\tau^{(i)}$;
@@ -85,5 +99,5 @@
 
   \begin{equation}
-    \label{eq:ord2}
+    \label{eq:STO_ord2}
     \left\{
       \begin{array}{l}
@@ -101,41 +115,39 @@
 \noindent
 In this way, higher order processes can be easily generated recursively using the same piece of code implementing
-(\autoref{eq:autoreg}), and using succesively processes from order $0$ to~$n-1$ as~$w^{(i)}$.
-The parameters in (\autoref{eq:ord2}) are computed so that this recursive application of
-(\autoref{eq:autoreg}) leads to processes with the required standard deviation and correlation timescale,
+\autoref{eq:STO_autoreg}, and using successive processes from order $0$ to~$n-1$ as~$w^{(i)}$.
+The parameters in \autoref{eq:STO_ord2} are computed so that this recursive application of
+\autoref{eq:STO_autoreg} leads to processes with the required standard deviation and correlation timescale,
 with the additional condition that the $n-1$ first derivatives of the autocorrelation function are equal to
-zero at~$t=0$, so that the resulting processes become smoother and smoother as $n$ is increased.
+zero at~$t=0$, so that the resulting processes become smoother and smoother as $n$ increases.
 
 Overall, this method provides quite a simple and generic way of generating a wide class of stochastic processes.
 However, this also means that new model parameters are needed to specify each of these stochastic processes.
-As in any parameterization of lacking physics, a very important issues then to tune these new parameters using
+As in any parameterization, the main issue is to tune the parameters using
 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.
+The set of parameters will need further investigation to find appropriate values
+for any other configuration or resolution of the model.
+
+%% =================================================================================================
 \section{Implementation details}
 \label{sec:STO_thech_details}
 
-%---------------------------------------namsbc--------------------------------------------------
-
-\nlst{namsto}
-%--------------------------------------------------------------------------------------------------------------
-
-The computer code implementing stochastic parametrisations can be found in the STO directory.
-It involves three modules : 
-\begin{description}
-\item[\mdl{stopar}:]
-  define the Stochastic parameters and their time evolution.
-\item[\mdl{storng}:]
-  a random number generator based on (and includes) the 64-bit KISS (Keep It Simple Stupid) random number generator
-  distributed by George Marsaglia
-  (see \href{https://groups.google.com/forum/#!searchin/comp.lang.fortran/64-bit$20KISS$20RNGs}{here})
-\item[\mdl{stopts}:]
-  stochastic parametrisation associated with the non-linearity of the equation of seawater,
-  implementing \autoref{eq:sto_pert} and specific piece of code in
-  the equation of state implementing \autoref{eq:eos_sto}.
-\end{description}
-
-The \mdl{stopar} module has 3 public routines to be called by the model (in our case, NEMO):
-
-The first routine (\rou{sto\_par}) is a direct implementation of (\autoref{eq:autoreg}),
+The code implementing stochastic parametrisation is located in the src/OCE/STO directory.
+It contains three modules :
+% \begin{description}
+
+\mdl{stopar} : define the Stochastic parameters and their time evolution
+
+\mdl{storng} : random number generator based on and including the 64-bit KISS (Keep It Simple Stupid) random number generator distributed by George Marsaglia
+
+\mdl{stopts} : stochastic parametrisation associated with the non-linearity of the equation of
+ seawater, implementing \autoref{eq:STO_sto_pert} so as specifics in the equation of state
+ implementing \autoref{eq:STO_eos_sto}.
+% \end{description}
+
+The \mdl{stopar} module includes three public routines called in the model:
+
+(\rou{sto\_par}) is a direct implementation of \autoref{eq:STO_autoreg},
 applied at each model grid point (in 2D or 3D), and called at each model time step ($k$) to
 update every autoregressive process ($i=1,\ldots,m$).
@@ -143,35 +155,55 @@
 to introduce a spatial correlation between the stochastic processes.
 
-The second routine (\rou{sto\_par\_init}) is an initialization routine mainly dedicated to
-the computation of parameters $a^{(i)}, b^{(i)}, c^{(i)}$ for each autoregressive process,
+(\rou{sto\_par\_init}) is the initialization routine computing
+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). 
-
-Parameters for the processes can be specified through the following \ngn{namsto} namelist parameters:
-\begin{description}
-\item[\np{nn\_sto\_eos}:]   number of independent random walks
-\item[\np{rn\_eos\_stdxy}:] random walk horz. standard deviation (in grid points)
-\item[\np{rn\_eos\_stdz}:]  random walk vert. standard deviation (in grid points)
-\item[\np{rn\_eos\_tcor}:]  random walk time correlation (in timesteps)
-\item[\np{nn\_eos\_ord}:]   order of autoregressive processes
-\item[\np{nn\_eos\_flt}:]   passes of Laplacian filter
-\item[\np{rn\_eos\_lim}:]   limitation factor (default = 3.0)
-\end{description}
+(mean, standard deviation, time correlation, order of the process,\ldots).
 This routine also includes the initialization (seeding) of the random number generator.
 
-The third routine (\rou{sto\_rst\_write}) writes a restart file
-(which suffix name is given by \np{cn\_storst\_out} namelist parameter) containing the current value of
-all autoregressive processes to allow restarting a simulation from where it has been interrupted.
-This file also contains the current state of the random number generator.
-When \np{ln\_rststo} is set to \forcode{.true.}),
-the restart file (which suffix name is given by \np{cn\_storst\_in} namelist parameter) is read by
+(\rou{sto\_rst\_write}) writes a restart file
+(which suffix name is given by \np{cn_storst_out}{cn\_storst\_out} namelist parameter) containing the current value of
+all autoregressive processes to allow creating the file needed for a restart.
+This restart file also contains the current state of the random number generator.
+When \np{ln_rststo}{ln\_rststo} is set to \forcode{.true.}),
+the restart file (which suffix name is given by \np{cn_storst_in}{cn\_storst\_in} namelist parameter) is read by
 the initialization routine (\rou{sto\_par\_init}).
 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.
-
-\biblio
-
-\pindex
+when \np{ln_rstseed}{ln\_rstseed} is set to \forcode{.true.},
+\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. \\
+
+Options and parameters \\
+
+The \np{ln_sto_eos}{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}{sto} namelist
+(only the subset for equation of state stochastic parametrisation is listed below):
+
+\begin{listing}
+  \nlst{namsto}
+  \caption{\forcode{&namsto}}
+  \label{lst:namsto}
+\end{listing}
+
+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}{nn\_sto\_eos}:}]     number of independent random walks
+\item [{\np{rn_eos_stdxy}{rn\_eos\_stdxy}:}] random walk horizontal standard deviation
+  (in grid points)
+\item [{\np{rn_eos_stdz}{rn\_eos\_stdz}:}]   random walk vertical standard deviation
+  (in grid points)
+\item [{\np{rn_eos_tcor}{rn\_eos\_tcor}:}]   random walk time correlation (in timesteps)
+\item [{\np{nn_eos_ord}{nn\_eos\_ord}:}]     order of autoregressive processes
+\item [{\np{nn_eos_flt}{nn\_eos\_flt}:}]     passes of Laplacian filter
+\item [{\np{rn_eos_lim}{rn\_eos\_lim}:}]     limitation factor (default = 3.0)
+\end{description}
+
+The first four parameters define the stochastic part of equation of state.
+
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_TRA.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_TRA.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_TRA.tex	(revision 11831)
@@ -2,22 +2,37 @@
 
 \begin{document}
-% ================================================================
-% Chapter 1 ——— Ocean Tracers (TRA)
-% ================================================================
+
 \chapter{Ocean Tracers (TRA)}
 \label{chap:TRA}
 
-\minitoc
-
-% missing/update 
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release          & Author(s)                                   & Modifications       \\
+    \hline
+    {\em        4.0} & {\em Christian \'{E}th\'{e}               } & {\em Review       } \\
+    {\em        3.6} & {\em Gurvan Madec                         } & {\em Update       } \\
+    {\em $\leq$ 3.4} & {\em Gurvan Madec and S\'{e}bastien Masson} & {\em First version} \\
+  \end{tabularx}
+}
+
+\clearpage
+
+% 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
 the tracer equations are available depending on the vertical coordinate used and on the physics used.
 In all the equations presented here, the masking has been omitted for simplicity.
-One must be aware that all the quantities are masked fields and that each time a mean or
-difference operator is used, the resulting field is multiplied by a mask.
+One must be aware that all the quantities are masked fields and that
+each time a mean or difference operator is used, the resulting field is multiplied by a mask.
 
 The two active tracers are potential temperature and salinity.
@@ -30,47 +45,49 @@
 NXT stands for next, referring to the time-stepping.
 From left to right, the terms on the rhs of the tracer equations are the advection (ADV),
-the lateral diffusion (LDF), the vertical diffusion (ZDF), the contributions from the external forcings
-(SBC: Surface Boundary Condition, QSR: penetrative Solar Radiation, and BBC: Bottom Boundary Condition),
-the contribution from the bottom boundary Layer (BBL) parametrisation, and an internal damping (DMP) term.
+the lateral diffusion (LDF), the vertical diffusion (ZDF),
+the contributions from the external forcings (SBC: Surface Boundary Condition,
+QSR: penetrative Solar Radiation, and BBC: Bottom Boundary Condition),
+the contribution from the bottom boundary Layer (BBL) parametrisation,
+and an internal damping (DMP) term.
 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.
-Note that \mdl{tranpc}, the non-penetrative convection module, although located in
-the \path{./src/OCE/TRA} directory as it directly modifies the tracer fields,
+Note that \mdl{tranpc}, the non-penetrative convection module,
+although located in the \path{./src/OCE/TRA} directory as it directly modifies the tracer fields,
 is described with the model vertical physics (ZDF) together with
 other available parameterization of convection.
 
-In the present chapter we also describe the diagnostic equations used to compute the sea-water properties
-(density, Brunt-V\"{a}is\"{a}l\"{a} frequency, specific heat and freezing point with
-associated modules \mdl{eosbn2} and \mdl{phycst}).
-
-The different options available to the user are managed by namelist logicals or CPP keys.
+In the present chapter we also describe the diagnostic equations used to
+compute the sea-water properties (density, Brunt-V\"{a}is\"{a}l\"{a} frequency, specific heat and
+freezing point with associated modules \mdl{eosbn2} and \mdl{phycst}).
+
+The different options available to the user are managed by namelist logicals.
 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 equivalent code can be found in the \textit{traTTT} or \textit{traTTT\_xxx} module,
 in the \path{./src/OCE/TRA} directory.
 
 The user has the option of extracting each tendency term on the RHS of the tracer equation for output
-(\np{ln\_tra\_trd} or \np{ln\_tra\_mxl}~\forcode{= .true.}), as described in \autoref{chap:DIA}.
-
-% ================================================================
-% Tracer Advection
-% ================================================================
-\section{Tracer advection (\protect\mdl{traadv})}
+(\np{ln_tra_trd}{ln\_tra\_trd} or \np[=.true.]{ln_tra_mxl}{ln\_tra\_mxl}),
+as described in \autoref{chap:DIA}.
+
+%% =================================================================================================
+\section[Tracer advection (\textit{traadv.F90})]{Tracer advection (\protect\mdl{traadv})}
 \label{sec:TRA_adv}
-%------------------------------------------namtra_adv-----------------------------------------------------
-
-\nlst{namtra_adv}
-%-------------------------------------------------------------------------------------------------------------
-
-When considered (\ie when \np{ln\_traadv\_NONE} is not set to \forcode{.true.}),
+
+\begin{listing}
+  \nlst{namtra_adv}
+  \caption{\forcode{&namtra_adv}}
+  \label{lst:namtra_adv}
+\end{listing}
+
+When considered (\ie\ when \np{ln_traadv_OFF}{ln\_traadv\_OFF} 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.
-Its discrete expression is given by :
-\begin{equation}
-  \label{eq:tra_adv}
+\ie\ as the divergence of the advective fluxes.
+Its discrete expression is given by:
+\begin{equation}
+  \label{eq:TRA_adv}
   ADV_\tau = - \frac{1}{b_t} \Big(   \delta_i [ e_{2u} \, e_{3u} \; u \; \tau_u]
                                    + \delta_j [ e_{1v} \, e_{3v} \; v \; \tau_v] \Big)
@@ -78,38 +95,38 @@
 \end{equation}
 where $\tau$ is either T or S, and $b_t = e_{1t} \, e_{2t} \, e_{3t}$ is the volume of $T$-cells.
-The flux form in \autoref{eq:tra_adv} implicitly requires the use of the continuity equation.
-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.}).
-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
-the continuous equations.
-In other words, by setting $\tau = 1$ in (\autoref{eq:tra_adv}) we recover the discrete form of
-the continuity equation which is used to calculate the vertical velocity.
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!t]
-  \begin{center}
-    \includegraphics[]{Fig_adv_scheme}
-    \caption{
-      \protect\label{fig:adv_scheme}
-      Schematic representation of some ways used to evaluate the tracer value at $u$-point and
-      the amount of tracer exchanged between two neighbouring grid points.
-      Upsteam biased scheme (ups):
-      the upstream value is used and the black area is exchanged.
-      Piecewise parabolic method (ppm):
-      a parabolic interpolation is used and the black and dark grey areas are exchanged.
-      Monotonic upstream scheme for conservative laws (muscl):
-      a parabolic interpolation is used and black, dark grey and grey areas are exchanged.
-      Second order scheme (cen2):
-      the mean value is used and black, dark grey, grey and light grey areas are exchanged.
-      Note that this illustration does not include the flux limiter used in ppm and muscl schemes.
-    }
-  \end{center}
+The flux form in \autoref{eq:TRA_adv} implicitly requires the use of the continuity equation.
+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[=.true.]{ln_linssh}{ln\_linssh}).
+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 the continuous equations.
+In other words, by setting $\tau = 1$ in (\autoref{eq:TRA_adv}) we recover
+the discrete form of the continuity equation which is used to calculate the vertical velocity.
+\begin{figure}
+  \centering
+  \includegraphics[width=0.66\textwidth]{TRA_adv_scheme}
+  \caption[Ways to evaluate the tracer value and the amount of tracer exchanged]{
+    Schematic representation of some ways used to evaluate the tracer value at $u$-point and
+    the amount of tracer exchanged between two neighbouring grid points.
+    Upsteam biased scheme (ups):
+    the upstream value is used and the black area is exchanged.
+    Piecewise parabolic method (ppm):
+    a parabolic interpolation is used and the black and dark grey areas are exchanged.
+    Monotonic upstream scheme for conservative laws (muscl):
+    a parabolic interpolation is used and black, dark grey and grey areas are exchanged.
+    Second order scheme (cen2):
+    the mean value is used and black, dark grey, grey and light grey areas are exchanged.
+    Note that this illustration does not include the flux limiter used in ppm and muscl schemes.}
+  \label{fig:TRA_adv_scheme}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-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}).
+
+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:TRA_adv_scheme}).
 
 Along solid lateral and bottom boundaries a zero tracer flux is automatically specified,
@@ -118,125 +135,136 @@
 
 \begin{description}
-\item[linear free surface:]
-  (\np{ln\_linssh}~\forcode{= .true.})
+\item [linear free surface] (\np[=.true.]{ln_linssh}{ln\_linssh})
   the first level thickness is constant in time:
-  the vertical boundary condition is applied at the fixed surface $z = 0$ rather than on
-  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
-  the first level tracer value.
-\item[non-linear free surface:]
-  (\np{ln\_linssh}~\forcode{= .false.})
+  the vertical boundary condition is applied at the fixed surface $z = 0$ rather than
+  on 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 the first level tracer value.
+\item [non-linear free surface] (\np[=.false.]{ln_linssh}{ln\_linssh})
   convergence/divergence in the first ocean level moves the free surface up/down.
-  There is no tracer advection through it so that the advective fluxes through the surface are also zero.
+  There is no tracer advection through it so that
+  the advective fluxes through the surface are also zero.
 \end{description}
 
 In all cases, this boundary condition retains local conservation of tracer.
-Global conservation is obtained in non-linear free surface case, but \textit{not} in the linear free surface case.
-Nevertheless, in the latter case, it is achieved to a good approximation since
-the non-conservative term is the product of the time derivative of the tracer and the free surface height,
-two quantities that are not correlated \citep{Roullet_Madec_JGR00, Griffies_al_MWR01, Campin2004}.
-
-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
+Global conservation is obtained in non-linear free surface case,
+but \textit{not} in the linear free surface case.
+Nevertheless, in the latter case,
+it is achieved to a good approximation since the non-conservative term is
+the product of the time derivative of the tracer and the free surface height,
+two quantities that are not correlated
+\citep{roullet.madec_JGR00, griffies.pacanowski.ea_MWR01, campin.adcroft.ea_OM04}.
+
+The velocity field that appears in (\autoref{eq:TRA_adv} is
+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
 (see \autoref{chap:LDF}).
 
-Several tracer advection scheme are proposed, namely a $2^{nd}$ or $4^{th}$ order centred schemes (CEN),
-a $2^{nd}$ or $4^{th}$ order Flux Corrected Transport scheme (FCT), a Monotone Upstream Scheme for
-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 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.}.
-If the user does not select an advection scheme in the configuration namelist (\textit{namelist\_cfg}),
-the tracers will \textit{not} be advected!
+Several tracer advection scheme are proposed,
+namely a $2^{nd}$ or $4^{th}$ order \textbf{CEN}tred schemes (CEN),
+a $2^{nd}$ or $4^{th}$ order \textbf{F}lux \textbf{C}orrected \textbf{T}ransport scheme (FCT),
+a \textbf{M}onotone \textbf{U}pstream \textbf{S}cheme for
+\textbf{C}onservative \textbf{L}aws scheme (MUSCL),
+a $3^{rd}$ \textbf{U}pstream \textbf{B}iased \textbf{S}cheme (UBS, also often called UP3),
+and a \textbf{Q}uadratic \textbf{U}pstream \textbf{I}nterpolation for
+\textbf{C}onvective \textbf{K}inematics with
+\textbf{E}stimated \textbf{S}treaming \textbf{T}erms scheme (QUICKEST).
+The choice is made in the \nam{tra_adv}{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.}.
+If the user does not select an advection scheme in the configuration namelist
+(\textit{namelist\_cfg}), the tracers will \textit{not} be advected!
 
 Details of the advection schemes are given below.
-The choosing an advection scheme is a complex matter which depends on the model physics, model resolution,
-type of tracer, as well as the issue of numerical cost. In particular, we note that
+The choosing an advection scheme is a complex matter which depends on the
+model physics, model resolution, type of tracer, as well as the issue of numerical cost.
+In particular, we note that
 
 \begin{enumerate}
-\item
-  CEN and FCT schemes require an explicit diffusion operator while the other schemes are diffusive enough so that
-  they do not necessarily need additional diffusion;
-\item
-  CEN and UBS are not \textit{positive} schemes
-  \footnote{negative values can appear in an initially strictly positive tracer field which is advected},
+\item CEN and FCT schemes require an explicit diffusion operator while
+  the other schemes are diffusive enough so that they do not necessarily need additional diffusion;
+\item CEN and UBS are not \textit{positive} schemes \footnote{negative values can appear in
+    an initially strictly positive tracer field which is advected},
   implying that false extrema are permitted.
   Their use is not recommended on passive tracers;
-\item
-  It is recommended that the same advection-diffusion scheme is used on both active and passive tracers.
+\item It is recommended that the same advection-diffusion scheme is used on
+  both active and passive tracers.
 \end{enumerate}
 
-Indeed, if a source or sink of a passive tracer depends on an active one, the difference of treatment of active and
-passive tracers can create very nice-looking frontal structures that are pure numerical artefacts.
+Indeed, if a source or sink of a passive tracer depends on an active one,
+the difference of treatment of active and passive tracers can create
+very nice-looking frontal structures that are pure numerical artefacts.
 Nevertheless, most of our users set a different treatment on passive and active tracers,
 that's the reason why this possibility is offered.
-We strongly suggest them to perform a sensitivity experiment using a same treatment to assess the robustness of
-their results.
-
-% -------------------------------------------------------------------------------------------------------------
-%        2nd and 4th order centred schemes
-% -------------------------------------------------------------------------------------------------------------
-\subsection{CEN: Centred scheme (\protect\np{ln\_traadv\_cen}~\forcode{= .true.})}
+We strongly suggest them to perform a sensitivity experiment using a same treatment to
+assess the robustness of their results.
+
+%% =================================================================================================
+\subsection[CEN: Centred scheme (\forcode{ln_traadv_cen})]{CEN: Centred scheme (\protect\np{ln_traadv_cen}{ln\_traadv\_cen})}
 \label{subsec:TRA_adv_cen}
 
-%        2nd order centred scheme  
-
-The centred advection scheme (CEN) is used when \np{ln\_traadv\_cen}~\forcode{= .true.}.
-Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level) and vertical direction by
-setting \np{nn\_cen\_h} and \np{nn\_cen\_v} to $2$ or $4$.
+%        2nd order centred scheme
+
+The \textbf{CEN}tred advection scheme (CEN) is used when \np[=.true.]{ln_traadv_cen}{ln\_traadv\_cen}.
+Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on
+horizontal (iso-level) and vertical direction by
+setting \np{nn_cen_h}{nn\_cen\_h} and \np{nn_cen_v}{nn\_cen\_v} to $2$ or $4$.
 CEN implementation can be found in the \mdl{traadv\_cen} module.
 
-In the $2^{nd}$ order centred formulation (CEN2), the tracer at velocity points is evaluated as the mean of
-the two neighbouring $T$-point values.
+In the $2^{nd}$ order centred formulation (CEN2), the tracer at velocity points is evaluated as
+the mean of the two neighbouring $T$-point values.
 For example, in the $i$-direction :
 \begin{equation}
-  \label{eq:tra_adv_cen2}
+  \label{eq:TRA_adv_cen2}
   \tau_u^{cen2} = \overline T ^{i + 1/2}
 \end{equation}
 
-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.
-The associated time-stepping is performed using a leapfrog scheme in conjunction with an Asselin time-filter,
-so $T$ in (\autoref{eq:tra_adv_cen2}) is the \textit{now} tracer value.
+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.
+The associated time-stepping is performed using
+a leapfrog scheme in conjunction with an Asselin time-filter,
+so $T$ in (\autoref{eq:TRA_adv_cen2}) is the \textit{now} tracer value.
 
 Note that using the CEN2, the overall tracer advection is of second order accuracy since
-both (\autoref{eq:tra_adv}) and (\autoref{eq:tra_adv_cen2}) have this order of accuracy.
-
-%        4nd order centred scheme  
-
-In the $4^{th}$ order formulation (CEN4), tracer values are evaluated at u- and v-points as
-a $4^{th}$ order interpolation, and thus depend on the four neighbouring $T$-points.
+both (\autoref{eq:TRA_adv}) and (\autoref{eq:TRA_adv_cen2}) have this order of accuracy.
+
+%        4nd order centred scheme
+
+In the $4^{th}$ order formulation (CEN4),
+tracer values are evaluated at u- and v-points as a $4^{th}$ order interpolation,
+and thus depend on the four neighbouring $T$-points.
 For example, in the $i$-direction:
 \begin{equation}
-  \label{eq:tra_adv_cen4}
+  \label{eq:TRA_adv_cen4}
   \tau_u^{cen4} = \overline{T - \frac{1}{6} \, \delta_i \Big[ \delta_{i + 1/2}[T] \, \Big]}^{\,i + 1/2}
 \end{equation}
-In the vertical direction (\np{nn\_cen\_v}~\forcode{= 4}),
-a $4^{th}$ COMPACT interpolation has been prefered \citep{Demange_PhD2014}.
-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_JCP1992}. 
+In the vertical direction (\np[=4]{nn_cen_v}{nn\_cen\_v}),
+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}.
 
 Strictly speaking, the CEN4 scheme is not a $4^{th}$ order advection scheme but
 a $4^{th}$ order evaluation of advective fluxes,
-since the divergence of advective fluxes \autoref{eq:tra_adv} is kept at $2^{nd}$ order.
-The expression \textit{$4^{th}$ order scheme} used in oceanographic literature is usually associated with
-the scheme presented here.
-Introducing a \forcode{.true.} $4^{th}$ order advection scheme is feasible but, for consistency reasons,
-it requires changes in the discretisation of the tracer advection together with changes in the continuity equation,
-and the momentum advection and pressure terms.
+since the divergence of advective fluxes \autoref{eq:TRA_adv} is kept at $2^{nd}$ order.
+The expression \textit{$4^{th}$ order scheme} used in oceanographic literature is
+usually associated with the scheme presented here.
+Introducing a ``true'' $4^{th}$ order advection scheme is feasible but, for consistency reasons,
+it requires changes in the discretisation of the tracer advection together with
+changes in the continuity equation, and the momentum advection and pressure terms.
 
 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.
-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,
-so $T$ in (\autoref{eq:tra_adv_cen4}) is the \textit{now} tracer.
+\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, so $T$ in (\autoref{eq:TRA_adv_cen4}) is the \textit{now} tracer.
 
 At a $T$-grid cell adjacent to a boundary (coastline, bottom and surface),
@@ -244,23 +272,23 @@
 This hypothesis usually reduces the order of the scheme.
 Here we choose to set the gradient of $T$ across the boundary to zero.
-Alternative conditions can be specified, such as a reduction to a second order scheme for
-these near boundary grid points.
-
-% -------------------------------------------------------------------------------------------------------------
-%        FCT scheme  
-% -------------------------------------------------------------------------------------------------------------
-\subsection{FCT: Flux Corrected Transport scheme (\protect\np{ln\_traadv\_fct}~\forcode{= .true.})}
+Alternative conditions can be specified,
+such as a reduction to a second order scheme for these near boundary grid points.
+
+%% =================================================================================================
+\subsection[FCT: Flux Corrected Transport scheme (\forcode{ln_traadv_fct})]{FCT: Flux Corrected Transport scheme (\protect\np{ln_traadv_fct}{ln\_traadv\_fct})}
 \label{subsec:TRA_adv_tvd}
 
-The Flux Corrected Transport schemes (FCT) is used when \np{ln\_traadv\_fct}~\forcode{= .true.}.
-Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level) and vertical direction by
-setting \np{nn\_fct\_h} and \np{nn\_fct\_v} to $2$ or $4$.
+The \textbf{F}lux \textbf{C}orrected \textbf{T}ransport schemes (FCT) is used when
+\np[=.true.]{ln_traadv_fct}{ln\_traadv\_fct}.
+Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on
+horizontal (iso-level) and vertical direction by
+setting \np{nn_fct_h}{nn\_fct\_h} and \np{nn_fct_v}{nn\_fct\_v} to $2$ or $4$.
 FCT implementation can be found in the \mdl{traadv\_fct} module.
 
-In FCT formulation, the tracer at velocity points is evaluated using a combination of an upstream and
-a centred scheme.
+In FCT formulation, the tracer at velocity points is evaluated using
+a combination of an upstream and a centred scheme.
 For example, in the $i$-direction :
 \begin{equation}
-  \label{eq:tra_adv_fct}
+  \label{eq:TRA_adv_fct}
   \begin{split}
     \tau_u^{ups} &=
@@ -268,6 +296,5 @@
                      T_{i + 1} & \text{if~} u_{i + 1/2} <    0 \\
                      T_i       & \text{if~} u_{i + 1/2} \geq 0 \\
-    \end{cases}
-    \\
+    \end{cases} \\
     \tau_u^{fct} &= \tau_u^{ups} + c_u \, \big( \tau_u^{cen} - \tau_u^{ups} \big)
   \end{split}
@@ -275,114 +302,109 @@
 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}{nn\_fct\_h} and \np{nn_fct_v}{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}.
 It can be used on both active and passive tracers.
-A comparison of FCT-2 with MUSCL and a MPDATA scheme can be found in \citet{Levy_al_GRL01}.
-
-An additional option has been added controlled by \np{nn\_fct\_zts}.
-By setting this integer to a value larger than zero,
-a $2^{nd}$ order FCT scheme is used on both horizontal and vertical direction, but on the latter,
-a split-explicit time stepping is used, with a number of sub-timestep equals to \np{nn\_fct\_zts}.
-This option can be useful when the size of the timestep is limited by vertical advection \citep{Lemarie_OM2015}.
-Note that in this case, a similar split-explicit time stepping should be used on vertical advection of momentum to
-insure a better stability (see \autoref{subsec:DYN_zad}).
-
-For stability reasons (see \autoref{chap:STP}),
-$\tau_u^{cen}$ is evaluated in (\autoref{eq:tra_adv_fct}) using the \textit{now} tracer while
+A comparison of FCT-2 with MUSCL and a MPDATA scheme can be found in \citet{levy.estublier.ea_GRL01}.
+
+For stability reasons (see \autoref{chap:TD}),
+$\tau_u^{cen}$ is evaluated in (\autoref{eq:TRA_adv_fct}) using the \textit{now} tracer while
 $\tau_u^{ups}$ is evaluated using the \textit{before} tracer.
-In other words, the advective part of the scheme is time stepped with a leap-frog scheme
-while a forward scheme is used for the diffusive part.
-
-% -------------------------------------------------------------------------------------------------------------
-%        MUSCL scheme  
-% -------------------------------------------------------------------------------------------------------------
-\subsection{MUSCL: Monotone Upstream Scheme for Conservative Laws (\protect\np{ln\_traadv\_mus}~\forcode{= .true.})}
+In other words, the advective part of the scheme is time stepped with a leap-frog scheme while
+a forward scheme is used for the diffusive part.
+
+%% =================================================================================================
+\subsection[MUSCL: Monotone Upstream Scheme for Conservative Laws (\forcode{ln_traadv_mus})]{MUSCL: Monotone Upstream Scheme for Conservative Laws (\protect\np{ln_traadv_mus}{ln\_traadv\_mus})}
 \label{subsec:TRA_adv_mus}
 
-The Monotone Upstream Scheme for Conservative Laws (MUSCL) is used when \np{ln\_traadv\_mus}~\forcode{= .true.}.
+The \textbf{M}onotone \textbf{U}pstream \textbf{S}cheme for \textbf{C}onservative \textbf{L}aws
+(MUSCL) is used when \np[=.true.]{ln_traadv_mus}{ln\_traadv\_mus}.
 MUSCL implementation can be found in the \mdl{traadv\_mus} module.
 
-MUSCL has been first implemented in \NEMO by \citet{Levy_al_GRL01}.
-In its formulation, the tracer at velocity points is evaluated assuming a linear tracer variation between
-two $T$-points (\autoref{fig:adv_scheme}).
+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:TRA_adv_scheme}).
 For example, in the $i$-direction :
-\begin{equation}
-  % \label{eq:tra_adv_mus}
+\[
+  % \label{eq:TRA_adv_mus}
   \tau_u^{mus} = \lt\{
   \begin{split}
-                       \tau_i         &+ \frac{1}{2} \lt( 1 - \frac{u_{i + 1/2} \, \rdt}{e_{1u}} \rt)
-                       \widetilde{\partial_i         \tau} & \text{if~} u_{i + 1/2} \geqslant 0 \\
-                       \tau_{i + 1/2} &+ \frac{1}{2} \lt( 1 + \frac{u_{i + 1/2} \, \rdt}{e_{1u}} \rt)
-                       \widetilde{\partial_{i + 1/2} \tau} & \text{if~} u_{i + 1/2} <         0
+    \tau_i        &+ \frac{1}{2} \lt( 1 - \frac{u_{i + 1/2} \, \rdt}{e_{1u}} \rt)
+    \widetilde{\partial_i        \tau} & \text{if~} u_{i + 1/2} \geqslant 0 \\
+    \tau_{i + 1/2} &+ \frac{1}{2} \lt( 1 + \frac{u_{i + 1/2} \, \rdt}{e_{1u}} \rt)
+    \widetilde{\partial_{i + 1/2} \tau} & \text{if~} u_{i + 1/2} <         0
   \end{split}
                                                                                                       \rt.
-\end{equation}
-where $\widetilde{\partial_i \tau}$ is the slope of the tracer on which a limitation is imposed to
-ensure the \textit{positive} character of the scheme.
-
-The time stepping is performed using a forward scheme, that is the \textit{before} tracer field is used to
-evaluate $\tau_u^{mus}$.
+\]
+where $\widetilde{\partial_i \tau}$ is the slope of the tracer on which
+a limitation is imposed to ensure the \textit{positive} character of the scheme.
+
+The time stepping is performed using a forward scheme,
+that is the \textit{before} tracer field is used to evaluate $\tau_u^{mus}$.
 
 For an ocean grid point adjacent to land and where the ocean velocity is directed toward land,
 an upstream flux is used.
 This choice ensure the \textit{positive} character of the scheme.
-In addition, fluxes round a grid-point where a runoff is applied can optionally be computed using upstream fluxes
-(\np{ln\_mus\_ups}~\forcode{= .true.}).
-
-% -------------------------------------------------------------------------------------------------------------
-%        UBS scheme  
-% -------------------------------------------------------------------------------------------------------------
-\subsection{UBS a.k.a. UP3: Upstream-Biased Scheme (\protect\np{ln\_traadv\_ubs}~\forcode{= .true.})}
+In addition, fluxes round a grid-point where a runoff is applied can optionally be computed using
+upstream fluxes (\np[=.true.]{ln_mus_ups}{ln\_mus\_ups}).
+
+%% =================================================================================================
+\subsection[UBS a.k.a. UP3: Upstream-Biased Scheme (\forcode{ln_traadv_ubs})]{UBS a.k.a. UP3: Upstream-Biased Scheme (\protect\np{ln_traadv_ubs}{ln\_traadv\_ubs})}
 \label{subsec:TRA_adv_ubs}
 
-The Upstream-Biased Scheme (UBS) is used when \np{ln\_traadv\_ubs}~\forcode{= .true.}.
+The \textbf{U}pstream-\textbf{B}iased \textbf{S}cheme (UBS) is used when
+\np[=.true.]{ln_traadv_ubs}{ln\_traadv\_ubs}.
 UBS implementation can be found in the \mdl{traadv\_mus} module.
 
 The UBS scheme, often called UP3, is also known as the Cell Averaged QUICK scheme
-(Quadratic Upstream Interpolation for Convective Kinematics).
+(\textbf{Q}uadratic \textbf{U}pstream \textbf{I}nterpolation for
+\textbf{C}onvective \textbf{K}inematics).
 It is an upstream-biased third order scheme based on an upstream-biased parabolic interpolation.
 For example, in the $i$-direction:
 \begin{equation}
-  \label{eq:tra_adv_ubs}
+  \label{eq:TRA_adv_ubs}
   \tau_u^{ubs} = \overline T ^{i + 1/2} - \frac{1}{6}
     \begin{cases}
-                                                      \tau"_i       & \text{if~} u_{i + 1/2} \geqslant 0 \\
-                                                      \tau"_{i + 1} & \text{if~} u_{i + 1/2} <         0
+      \tau"_i       & \text{if~} u_{i + 1/2} \geqslant 0 \\
+      \tau"_{i + 1} & \text{if~} u_{i + 1/2} <         0
     \end{cases}
-  \quad
-  \text{where~} \tau"_i = \delta_i \lt[ \delta_{i + 1/2} [\tau] \rt]
+  \quad \text{where~} \tau"_i = \delta_i \lt[ \delta_{i + 1/2} [\tau] \rt]
 \end{equation}
 
 This results in a dissipatively dominant (i.e. hyper-diffusive) truncation error
-\citep{Shchepetkin_McWilliams_OM05}.
-The overall performance of the advection scheme is similar to that reported in \cite{Farrow1995}.
+\citep{shchepetkin.mcwilliams_OM05}.
+The overall performance of the advection scheme is similar to that reported in
+\cite{farrow.stevens_JPO95}.
 It is a relatively good compromise between accuracy and smoothness.
 Nevertheless the scheme is not \textit{positive}, meaning that false extrema are permitted,
 but the amplitude of such are significantly reduced over the centred second or fourth order method.
-Therefore it is not recommended that it should be applied to a passive tracer that requires positivity.
+Therefore it is not recommended that it should be applied to
+a passive tracer that requires positivity.
 
 The intrinsic diffusion of UBS makes its use risky in the vertical direction where
 the control of artificial diapycnal fluxes is of paramount importance
-\citep{Shchepetkin_McWilliams_OM05, Demange_PhD2014}.
-Therefore the vertical flux is evaluated using either a $2^nd$ order FCT scheme or a $4^th$ order COMPACT scheme
-(\np{nn\_cen\_v}~\forcode{= 2 or 4}).
-
-For stability reasons (see \autoref{chap:STP}), the first term  in \autoref{eq:tra_adv_ubs}
-(which corresponds to a second order centred scheme)
-is evaluated using the \textit{now} tracer (centred in time) while the second term
-(which is the diffusive part of the scheme),
+\citep{shchepetkin.mcwilliams_OM05, demange_phd14}.
+Therefore the vertical flux is evaluated using either a $2^nd$ order FCT scheme or
+a $4^th$ order COMPACT scheme (\np[=2 or 4]{nn_ubs_v}{nn\_ubs\_v}).
+
+For stability reasons (see \autoref{chap:TD}),
+the first term  in \autoref{eq:TRA_adv_ubs} (which corresponds to a second order centred scheme)
+is evaluated using the \textit{now}    tracer (centred in time) while
+the second term (which is the diffusive part of the scheme),
 is evaluated using the \textit{before} tracer (forward in time).
-This choice is discussed by \citet{Webb_al_JAOT98} in the context of the QUICK advection scheme.
+This choice is discussed by \citet{webb.de-cuevas.ea_JAOT98} in
+the context of the QUICK advection scheme.
 UBS and QUICK schemes only differ by one coefficient.
-Replacing 1/6 with 1/8 in \autoref{eq:tra_adv_ubs} leads to the QUICK advection scheme \citep{Webb_al_JAOT98}.
+Replacing 1/6 with 1/8 in \autoref{eq:TRA_adv_ubs} leads to the QUICK advection scheme
+\citep{webb.de-cuevas.ea_JAOT98}.
 This option is not available through a namelist parameter, since the 1/6 coefficient is hard coded.
-Nevertheless it is quite easy to make the substitution in the \mdl{traadv\_ubs} module and obtain a QUICK scheme.
-
-Note that it is straightforward to rewrite \autoref{eq:tra_adv_ubs} as follows:
+Nevertheless it is quite easy to make the substitution in the \mdl{traadv\_ubs} module and
+obtain a QUICK scheme.
+
+Note that it is straightforward to rewrite \autoref{eq:TRA_adv_ubs} as follows:
 \begin{gather}
-  \label{eq:traadv_ubs2}
+  \label{eq:TRA_adv_ubs2}
   \tau_u^{ubs} = \tau_u^{cen4} + \frac{1}{12}
     \begin{cases}
@@ -391,31 +413,34 @@
     \end{cases}
   \intertext{or equivalently}
-  % \label{eq:traadv_ubs2b}
+  % \label{eq:TRA_adv_ubs2b}
   u_{i + 1/2} \ \tau_u^{ubs} = u_{i + 1/2} \, \overline{T - \frac{1}{6} \, \delta_i \Big[ \delta_{i + 1/2}[T] \Big]}^{\,i + 1/2}
                              - \frac{1}{2} |u|_{i + 1/2} \, \frac{1}{6} \, \delta_{i + 1/2} [\tau"_i] \nonumber
 \end{gather}
 
-\autoref{eq:traadv_ubs2} has several advantages.
+\autoref{eq:TRA_adv_ubs2} has several advantages.
 Firstly, it clearly reveals that the UBS scheme is based on the fourth order scheme to which
 an upstream-biased diffusion term is added.
-Secondly, this emphasises that the $4^{th}$ order part (as well as the $2^{nd}$ order part as stated above) has to
-be evaluated at the \textit{now} time step using \autoref{eq:tra_adv_ubs}.
-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  
-% -------------------------------------------------------------------------------------------------------------
-\subsection{QCK: QuiCKest scheme (\protect\np{ln\_traadv\_qck}~\forcode{= .true.})}
+Secondly,
+this emphasises that the $4^{th}$ order part (as well as the $2^{nd}$ order part as stated above) has to be evaluated at the \textit{now} time step using \autoref{eq:TRA_adv_ubs}.
+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}.
+
+%% =================================================================================================
+\subsection[QCK: QuiCKest scheme (\forcode{ln_traadv_qck})]{QCK: QuiCKest scheme (\protect\np{ln_traadv_qck}{ln\_traadv\_qck})}
 \label{subsec:TRA_adv_qck}
 
-The Quadratic Upstream Interpolation for Convective Kinematics with Estimated Streaming Terms (QUICKEST) scheme
-proposed by \citet{Leonard1979} is used when \np{ln\_traadv\_qck}~\forcode{= .true.}.
+The \textbf{Q}uadratic \textbf{U}pstream \textbf{I}nterpolation for
+\textbf{C}onvective \textbf{K}inematics with \textbf{E}stimated \textbf{S}treaming \textbf{T}erms
+(QUICKEST) scheme proposed by \citet{leonard_CMAME79} is used when
+\np[=.true.]{ln_traadv_qck}{ln\_traadv\_qck}.
 QUICKEST implementation can be found in the \mdl{traadv\_qck} module.
 
 QUICKEST is the third order Godunov scheme which is associated with the ULTIMATE QUICKEST limiter
-\citep{Leonard1991}.
-It has been implemented in NEMO by G. Reffray (MERCATOR-ocean) and can be found in the \mdl{traadv\_qck} module.
+\citep{leonard_CMAME91}.
+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.
@@ -424,25 +449,29 @@
 Therefore the vertical flux is evaluated using the CEN2 scheme.
 This no longer guarantees the positivity of the scheme.
-The use of FCT in the vertical direction (as for the UBS case) should be implemented to restore this property.
-
-%%%gmcomment   :  Cross term are missing in the current implementation....
-
-% ================================================================
-% Tracer Lateral Diffusion
-% ================================================================
-\section{Tracer lateral diffusion (\protect\mdl{traldf})}
+The use of FCT in the vertical direction (as for the UBS case) should be implemented to
+restore this property.
+
+\cmtgm{Cross term are missing in the current implementation....}
+
+%% =================================================================================================
+\section[Tracer lateral diffusion (\textit{traldf.F90})]{Tracer lateral diffusion (\protect\mdl{traldf})}
 \label{sec:TRA_ldf}
-%-----------------------------------------nam_traldf------------------------------------------------------
-
-\nlst{namtra_ldf}
-%-------------------------------------------------------------------------------------------------------------
- 
-Options are defined through the \ngn{namtra\_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
-$(iv)$  the specification of eddy diffusivity coefficient (either constant or variable in space and time).
-Item $(iv)$ will be described in \autoref{chap:LDF}.
+
+\begin{listing}
+  \nlst{namtra_ldf}
+  \caption{\forcode{&namtra_ldf}}
+  \label{lst:namtra_ldf}
+\end{listing}
+
+Options are defined through the \nam{tra_ldf}{tra\_ldf} namelist variables.
+They are regrouped in four items, allowing to specify
+\begin{enumerate*}[label=(\textit{\roman*})]
+\item the type of operator used (none, laplacian, bilaplacian),
+\item the direction along which the operator acts (iso-level, horizontal, iso-neutral),
+\item some specific options related to the rotated operators (\ie\ non-iso-level operator), and
+\item the specification of eddy diffusivity coefficient
+  (either constant or variable in space and time).
+\end{enumerate*}
+Item (iv) will be described in \autoref{chap:LDF}.
 The direction along which the operators act is defined through the slope between
 this direction and the iso-level surfaces.
@@ -450,14 +479,14 @@
 
 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}).
-When \np{ln\_traldf\_msc}~\forcode{= .true.}, a Method of Stabilizing Correction is used in which
-the pure vertical component is split into an explicit and an implicit part \citep{Lemarie_OM2012}.
-
-% -------------------------------------------------------------------------------------------------------------
-%        Type of operator
-% -------------------------------------------------------------------------------------------------------------
-\subsection[Type of operator (\protect\np{ln\_traldf}\{\_NONE,\_lap,\_blp\}\})]{Type of operator (\protect\np{ln\_traldf\_NONE}, \protect\np{ln\_traldf\_lap}, or \protect\np{ln\_traldf\_blp}) } 
+This latter component is solved implicitly together with the vertical diffusion term
+(see \autoref{chap:TD}).
+When \np[=.true.]{ln_traldf_msc}{ln\_traldf\_msc},
+a Method of Stabilizing Correction is used in which the pure vertical component is split into
+an explicit and an implicit part \citep{lemarie.debreu.ea_OM12}.
+
+%% =================================================================================================
+\subsection[Type of operator (\forcode{ln_traldf_}\{\forcode{OFF,lap,blp}\})]{Type of operator (\protect\np{ln_traldf_OFF}{ln\_traldf\_OFF}, \protect\np{ln_traldf_lap}{ln\_traldf\_lap}, or \protect\np{ln_traldf_blp}{ln\_traldf\_blp})}
 \label{subsec:TRA_ldf_op}
 
@@ -465,18 +494,19 @@
 
 \begin{description}
-\item[\np{ln\_traldf\_NONE}~\forcode{= .true.}:]
-  no operator selected, the lateral diffusive tendency will not be applied to the tracer equation.
-  This option can be used when the selected advection scheme is diffusive enough (MUSCL scheme for example).
-\item[\np{ln\_traldf\_lap}~\forcode{= .true.}:]
-  a laplacian operator is selected.
-  This harmonic operator takes the following expression:  $\mathpzc{L}(T) = \nabla \cdot A_{ht} \; \nabla T $,
+\item [{\np[=.true.]{ln_traldf_OFF}{ln\_traldf\_OFF}}] no operator selected,
+  the lateral diffusive tendency will not be applied to the tracer equation.
+  This option can be used when the selected advection scheme is diffusive enough
+  (MUSCL scheme for example).
+\item [{\np[=.true.]{ln_traldf_lap}{ln\_traldf\_lap}}] a laplacian operator is selected.
+  This harmonic operator takes the following expression:
+  $\mathcal{L}(T) = \nabla \cdot A_{ht} \; \nabla T $,
   where the gradient operates along the selected direction (see \autoref{subsec:TRA_ldf_dir}),
   and $A_{ht}$ is the eddy diffusivity coefficient expressed in $m^2/s$ (see \autoref{chap:LDF}).
-\item[\np{ln\_traldf\_blp}~\forcode{= .true.}]:
-  a bilaplacian operator is selected.
+\item [{\np[=.true.]{ln_traldf_blp}{ln\_traldf\_blp}}] a bilaplacian operator is selected.
   This biharmonic operator takes the following expression:
-  $\mathpzc{B} = - \mathpzc{L}(\mathpzc{L}(T)) = - \nabla \cdot b \nabla (\nabla \cdot b \nabla T)$
+  $\mathcal{B} = - \mathcal{L}(\mathcal{L}(T)) = - \nabla \cdot b \nabla (\nabla \cdot b \nabla T)$
   where the gradient operats along the selected direction,
-  and $b^2 = B_{ht}$ is the eddy diffusivity coefficient expressed in $m^4/s$ (see \autoref{chap:LDF}).
+  and $b^2 = B_{ht}$ is the eddy diffusivity coefficient expressed in $m^4/s$
+  (see \autoref{chap:LDF}).
   In the code, the bilaplacian operator is obtained by calling the laplacian twice.
 \end{description}
@@ -486,28 +516,27 @@
 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
-disturbances of wavelength $\lambda$ (so that short waves damped more rapidelly than long ones),
+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}$.
 
-% -------------------------------------------------------------------------------------------------------------
-%        Direction of action
-% -------------------------------------------------------------------------------------------------------------
-\subsection[Action direction (\protect\np{ln\_traldf}\{\_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}) } 
+%% =================================================================================================
+\subsection[Action direction (\forcode{ln_traldf_}\{\forcode{lev,hor,iso,triad}\})]{Direction of action (\protect\np{ln_traldf_lev}{ln\_traldf\_lev}, \protect\np{ln_traldf_hor}{ln\_traldf\_hor}, \protect\np{ln_traldf_iso}{ln\_traldf\_iso}, or \protect\np{ln_traldf_triad}{ln\_traldf\_triad})}
 \label{subsec:TRA_ldf_dir}
 
 The choice of a direction of action determines the form of operator used.
 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
-(\np{ln\_traldf\_hor} and \np{ln\_zco} equal \forcode{.true.}).
+iso-level option is used (\np[=.true.]{ln_traldf_lev}{ln\_traldf\_lev}) or when
+a horizontal (\ie\ geopotential) operator is demanded in \textit{z}-coordinate
+(\np{ln_traldf_hor}{ln\_traldf\_hor} and \np[=.true.]{ln_zco}{ln\_zco}).
 The associated code can be found in the \mdl{traldf\_lap\_blp} module.
 The operator is a rotated (re-entrant) laplacian when
 the direction along which it acts does not coincide with the iso-level surfaces,
 that is when standard or triad iso-neutral option is used
-(\np{ln\_traldf\_iso} or \np{ln\_traldf\_triad} equals \forcode{.true.},
+(\np{ln_traldf_iso}{ln\_traldf\_iso} or \np{ln_traldf_triad}{ln\_traldf\_triad} = \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
-(\np{ln\_traldf\_hor} and \np{ln\_sco} equal \forcode{.true.})
-\footnote{In this case, the standard iso-neutral operator will be automatically selected}.
+when a horizontal (\ie\ geopotential) operator is demanded in \textit{s}-coordinate
+(\np{ln_traldf_hor}{ln\_traldf\_hor} and \np{ln_sco}{ln\_sco} = \forcode{.true.}) \footnote{
+  In this case, the standard iso-neutral operator will be automatically selected}.
 In that case, a rotation is applied to the gradient(s) that appears in the operator so that
 diffusive fluxes acts on the three spatial direction.
@@ -516,13 +545,11 @@
 the next two sub-sections.
 
-% -------------------------------------------------------------------------------------------------------------
-%       iso-level operator
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Iso-level (bi -)laplacian operator ( \protect\np{ln\_traldf\_iso}) }
+%% =================================================================================================
+\subsection[Iso-level (bi-)laplacian operator (\forcode{ln_traldf_iso})]{Iso-level (bi-)laplacian operator ( \protect\np{ln_traldf_iso}{ln\_traldf\_iso})}
 \label{subsec:TRA_ldf_lev}
 
-The laplacian diffusion operator acting along the model (\textit{i,j})-surfaces is given by: 
-\begin{equation}
-  \label{eq:tra_ldf_lap}
+The laplacian diffusion operator acting along the model (\textit{i,j})-surfaces is given by:
+\begin{equation}
+  \label{eq:TRA_ldf_lap}
   D_t^{lT} = \frac{1}{b_t} \Bigg(   \delta_{i} \lt[ A_u^{lT} \; \frac{e_{2u} \, e_{3u}}{e_{1u}} \; \delta_{i + 1/2} [T] \rt]
                                   + \delta_{j} \lt[ A_v^{lT} \; \frac{e_{1v} \, e_{3v}}{e_{2v}} \; \delta_{j + 1/2} [T] \rt] \Bigg)
@@ -531,34 +558,37 @@
 where zero diffusive fluxes is assumed across solid boundaries,
 first (and third in bilaplacian case) horizontal tracer derivative are masked.
-It is implemented in the \rou{traldf\_lap} subroutine found in the \mdl{traldf\_lap} module.
-The module also contains \rou{traldf\_blp}, the subroutine calling twice \rou{traldf\_lap} in order to
+It is implemented in the \rou{tra\_ldf\_lap} subroutine found in the \mdl{traldf\_lap\_blp} module.
+The module also contains \rou{tra\_ldf\_blp},
+the subroutine calling twice \rou{tra\_ldf\_lap} in order to
 compute the iso-level bilaplacian operator.
 
 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.},
-we have \np{ln\_traldf\_lev}~\forcode{= .true.} or \np{ln\_traldf\_hor}~=~\np{ln\_zco}~\forcode{= .true.}.
+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}{ln\_traldf\_lap} or \np[=.true.]{ln_traldf_blp}{ln\_traldf\_blp},
+we have \np[=.true.]{ln_traldf_lev}{ln\_traldf\_lev} or
+\np[=]{ln_traldf_hor}{ln\_traldf\_hor}\np[=.true.]{ln_zco}{ln\_zco}.
 In both cases, it significantly contributes to diapycnal mixing.
 It is therefore never recommended, even when using it in the bilaplacian case.
 
-Note that in the partial step $z$-coordinate (\np{ln\_zps}~\forcode{= .true.}),
+Note that in the partial step $z$-coordinate (\np[=.true.]{ln_zps}{ln\_zps}),
 tracers in horizontally adjacent cells are located at different depths in the vicinity of the bottom.
-In this case, horizontal derivatives in (\autoref{eq:tra_ldf_lap}) at the bottom level require a specific treatment.
+In this case,
+horizontal derivatives in (\autoref{eq:TRA_ldf_lap}) at the bottom level require a specific treatment.
 They are calculated in the \mdl{zpshde} module, described in \autoref{sec:TRA_zpshde}.
 
-% -------------------------------------------------------------------------------------------------------------
-%         Rotated laplacian operator
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Standard and triad (bi -)laplacian operator}
+%% =================================================================================================
+\subsection{Standard and triad (bi-)laplacian operator}
 \label{subsec:TRA_ldf_iso_triad}
 
-%&&    Standard rotated (bi -)laplacian operator
-%&& ----------------------------------------------
-\subsubsection{Standard rotated (bi -)laplacian operator (\protect\mdl{traldf\_iso})}
+%% =================================================================================================
+\subsubsection[Standard rotated (bi-)laplacian operator (\textit{traldf\_iso.F90})]{Standard rotated (bi-)laplacian operator (\protect\mdl{traldf\_iso})}
 \label{subsec:TRA_ldf_iso}
-The general form of the second order lateral tracer subgrid scale physics (\autoref{eq:PE_zdf})
-takes the following semi -discrete space form in $z$- and $s$-coordinates:
-\begin{equation}
-  \label{eq:tra_ldf_iso}
+
+The general form of the second order lateral tracer subgrid scale physics (\autoref{eq:MB_zdf})
+takes the following semi-discrete space form in $z$- and $s$-coordinates:
+\begin{equation}
+  \label{eq:TRA_ldf_iso}
   \begin{split}
     D_T^{lT} = \frac{1}{b_t} \Bigg[ \quad &\delta_i A_u^{lT} \lt( \frac{e_{2u} e_{3u}}{e_{1u}}                      \, \delta_{i + 1/2} [T]
@@ -573,87 +603,85 @@
 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).
-It is thus used when, in addition to \np{ln\_traldf\_lap}~\forcode{= .true.},
-we have \np{ln\_traldf\_iso}~\forcode{= .true.},
-or both \np{ln\_traldf\_hor}~\forcode{= .true.} and \np{ln\_zco}~\forcode{= .true.}.
+the surface along which the diffusion operator acts (\ie\ horizontal or iso-neutral surfaces).
+It is thus used when, in addition to \np[=.true.]{ln_traldf_lap}{ln\_traldf\_lap},
+we have \np[=.true.]{ln_traldf_iso}{ln\_traldf\_iso},
+or both \np[=.true.]{ln_traldf_hor}{ln\_traldf\_hor} and \np[=.true.]{ln_zco}{ln\_zco}.
 The way these slopes are evaluated is given in \autoref{sec:LDF_slp}.
-At the surface, bottom and lateral boundaries, the turbulent fluxes of heat and salt are set to zero using
-the mask technique (see \autoref{sec:LBC_coast}).
-
-The operator in \autoref{eq:tra_ldf_iso} involves both lateral and vertical derivatives.
-For numerical stability, the vertical second derivative must be solved using the same implicit time scheme as that
-used in the vertical physics (see \autoref{sec:TRA_zdf}).
+At the surface, bottom and lateral boundaries,
+the turbulent fluxes of heat and salt are set to zero using the mask technique
+(see \autoref{sec:LBC_coast}).
+
+The operator in \autoref{eq:TRA_ldf_iso} involves both lateral and vertical derivatives.
+For numerical stability, the vertical second derivative must be solved using
+the same implicit time scheme as that used in the vertical physics (see \autoref{sec:TRA_zdf}).
 For computer efficiency reasons, this term is not computed in the \mdl{traldf\_iso} module,
 but in the \mdl{trazdf} module where, if iso-neutral mixing is used,
-the vertical mixing coefficient is simply increased by $\frac{e_{1w} e_{2w}}{e_{3w}}(r_{1w}^2 + r_{2w}^2)$.
+the vertical mixing coefficient is simply increased by
+$\frac{e_{1w} e_{2w}}{e_{3w}}(r_{1w}^2 + r_{2w}^2)$.
 
 This formulation conserves the tracer but does not ensure the decrease of the tracer variance.
-Nevertheless the treatment performed on the slopes (see \autoref{chap:LDF}) allows the model to run safely without
-any additional background horizontal diffusion \citep{Guilyardi_al_CD01}.
-
-Note that in the partial step $z$-coordinate (\np{ln\_zps}~\forcode{= .true.}),
-the horizontal derivatives at the bottom level in \autoref{eq:tra_ldf_iso} require a specific treatment.
+Nevertheless the treatment performed on the slopes (see \autoref{chap:LDF}) allows the model to
+run safely without any additional background horizontal diffusion \citep{guilyardi.madec.ea_CD01}.
+
+Note that in the partial step $z$-coordinate (\np[=.true.]{ln_zps}{ln\_zps}),
+the horizontal derivatives at the bottom level in \autoref{eq:TRA_ldf_iso} require
+a specific treatment.
 They are calculated in module zpshde, described in \autoref{sec:TRA_zpshde}.
 
-%&&     Triad rotated (bi -)laplacian operator
-%&&  -------------------------------------------
-\subsubsection{Triad rotated (bi -)laplacian operator (\protect\np{ln\_traldf\_triad})}
+%% =================================================================================================
+\subsubsection[Triad rotated (bi-)laplacian operator (\forcode{ln_traldf_triad})]{Triad rotated (bi-)laplacian operator (\protect\np{ln_traldf_triad}{ln\_traldf\_triad})}
 \label{subsec:TRA_ldf_triad}
 
-If the Griffies triad scheme is employed (\np{ln\_traldf\_triad}~\forcode{= .true.}; see \autoref{apdx:triad})
-
-An alternative scheme developed by \cite{Griffies_al_JPO98} which ensures tracer variance decreases
-is also available in \NEMO (\np{ln\_traldf\_grif}~\forcode{= .true.}).
-A complete description of the algorithm is given in \autoref{apdx:triad}.
-
-The lateral fourth order bilaplacian operator on tracers is obtained by applying (\autoref{eq:tra_ldf_lap}) twice.
+An alternative scheme developed by \cite{griffies.gnanadesikan.ea_JPO98} which
+ensures tracer variance decreases is also available in \NEMO\
+(\np[=.true.]{ln_traldf_triad}{ln\_traldf\_triad}).
+A complete description of the algorithm is given in \autoref{apdx:TRIADS}.
+
+The lateral fourth order bilaplacian operator on tracers is obtained by
+applying (\autoref{eq:TRA_ldf_lap}) twice.
 The operator requires an additional assumption on boundary conditions:
 both first and third derivative terms normal to the coast are set to zero.
 
-The lateral fourth order operator formulation on tracers is obtained by applying (\autoref{eq:tra_ldf_iso}) twice.
+The lateral fourth order operator formulation on tracers is obtained by
+applying (\autoref{eq:TRA_ldf_iso}) twice.
 It requires an additional assumption on boundary conditions:
 first and third derivative terms normal to the coast,
 normal to the bottom and normal to the surface are set to zero.
 
-%&&    Option for the rotated operators
-%&& ----------------------------------------------
+%% =================================================================================================
 \subsubsection{Option for the rotated operators}
 \label{subsec:TRA_ldf_options}
 
-\begin{itemize}
-\item \np{ln\_traldf\_msc} = Method of Stabilizing Correction (both operators)
-\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{ln\_botmix\_triad} = lateral mixing on bottom (triad only)
-\end{itemize}
-
-% ================================================================
-% Tracer Vertical Diffusion
-% ================================================================
-\section{Tracer vertical diffusion (\protect\mdl{trazdf})}
+\begin{labeling}{{\np{ln_botmix_triad}{ln\_botmix\_triad}}}
+\item [{\np{ln_traldf_msc}{ln\_traldf\_msc}    }] Method of Stabilizing Correction (both operators)
+\item [{\np{rn_slpmax}{rn\_slpmax}             }] Slope limit (both operators)
+\item [{\np{ln_triad_iso}{ln\_triad\_iso}      }] Pure horizontal mixing in ML (triad only)
+\item [{\np{rn_sw_triad}{rn\_sw\_triad}        }] \forcode{=1} switching triad;
+  \forcode{= 0} all 4 triads used (triad only)
+\item [{\np{ln_botmix_triad}{ln\_botmix\_triad}}] Lateral mixing on bottom (triad only)
+\end{labeling}
+
+%% =================================================================================================
+\section[Tracer vertical diffusion (\textit{trazdf.F90})]{Tracer vertical diffusion (\protect\mdl{trazdf})}
 \label{sec:TRA_zdf}
-%--------------------------------------------namzdf---------------------------------------------------------
-
-\nlst{namzdf}
-%--------------------------------------------------------------------------------------------------------------
-
-Options are defined through the \ngn{namzdf} 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.
-The vertical diffusion operator given by (\autoref{eq:PE_zdf}) takes the following semi -discrete space form:
-\begin{gather*}
-  % \label{eq:tra_zdf}
-    D^{vT}_T = \frac{1}{e_{3t}} \, \delta_k \lt[ \, \frac{A^{vT}_w}{e_{3w}} \delta_{k + 1/2}[T] \, \rt] \\
-    D^{vS}_T = \frac{1}{e_{3t}} \; \delta_k \lt[ \, \frac{A^{vS}_w}{e_{3w}} \delta_{k + 1/2}[S] \, \rt]
-\end{gather*}
-where $A_w^{vT}$ and $A_w^{vS}$ are the vertical eddy diffusivity coefficients on temperature and salinity,
-respectively.
+
+Options are defined through the \nam{zdf}{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.
+The vertical diffusion operator given by (\autoref{eq:MB_zdf}) takes
+the following semi-discrete space form:
+\[
+  % \label{eq:TRA_zdf}
+  D^{vT}_T = \frac{1}{e_{3t}} \, \delta_k \lt[ \, \frac{A^{vT}_w}{e_{3w}} \delta_{k + 1/2}[T] \, \rt] \quad
+  D^{vS}_T = \frac{1}{e_{3t}} \; \delta_k \lt[ \, \frac{A^{vS}_w}{e_{3w}} \delta_{k + 1/2}[S] \, \rt]
+\]
+where $A_w^{vT}$ and $A_w^{vS}$ are the vertical eddy diffusivity coefficients on
+temperature and salinity, respectively.
 Generally, $A_w^{vT} = A_w^{vS}$ except when double diffusive mixing is parameterised
-(\ie \key{zdfddm} is defined).
+(\ie\ \np[=.true.]{ln_zdfddm}{ln\_zdfddm},).
 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
-$\frac{e_{1w} e_{2w}}{e_{3w} }({r_{1w}^2 + r_{2w}^2})$ to account for the vertical second derivative of
-\autoref{eq:tra_ldf_iso}.
+Furthermore, when iso-neutral mixing is used,
+both mixing coefficients are increased by $\frac{e_{1w} e_{2w}}{e_{3w} }({r_{1w}^2 + r_{2w}^2})$ to
+account for the vertical second derivative of \autoref{eq:TRA_ldf_iso}.
 
 At the surface and bottom boundaries, the turbulent fluxes of heat and salt must be specified.
@@ -662,23 +690,15 @@
 a geothermal flux forcing is prescribed as a bottom boundary condition (see \autoref{subsec:TRA_bbc}).
 
-The large eddy coefficient found in the mixed layer together with high vertical resolution implies that
-in the case of explicit time stepping (\np{ln\_zdfexp}~\forcode{= .true.})
-there would be too restrictive a constraint on the time step.
-Therefore, the default implicit time stepping is preferred for the vertical diffusion since
+The large eddy coefficient found in the mixed layer together with high vertical resolution implies
+that there would be too restrictive constraint on the time step if we use explicit time stepping.
+Therefore an implicit time stepping is preferred for the vertical diffusion since
 it overcomes the stability constraint.
-A forward time differencing scheme (\np{ln\_zdfexp}~\forcode{= .true.}) using
-a time splitting technique (\np{nn\_zdfexp} $> 1$) is provided as an alternative.
-Namelist variables \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics.
-
-% ================================================================
-% External Forcing
-% ================================================================
+
+%% =================================================================================================
 \section{External forcing}
 \label{sec:TRA_sbc_qsr_bbc}
 
-% -------------------------------------------------------------------------------------------------------------
-%        surface boundary condition
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Surface boundary condition (\protect\mdl{trasbc})}
+%% =================================================================================================
+\subsection[Surface boundary condition (\textit{trasbc.F90})]{Surface boundary condition (\protect\mdl{trasbc})}
 \label{subsec:TRA_sbc}
 
@@ -690,83 +710,84 @@
 
 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
-both to the heat and salt fluxes crossing the sea surface (not linked with $F_{mass}$) and
+(\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.
 They are both included directly in $Q_{ns}$, the surface heat flux,
 and $F_{salt}$, the surface salt flux (see \autoref{chap:SBC} for further details).
-By doing this, the forcing formulation is the same for any tracer (including temperature and salinity).
-
-The surface module (\mdl{sbcmod}, see \autoref{chap:SBC}) provides the following forcing fields (used on tracers):
-
-\begin{itemize}
-\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
-  penetrates into the water column, see \autoref{subsec:TRA_qsr})
+By doing this, the forcing formulation is the same for any tracer
+(including temperature and salinity).
+
+The surface module (\mdl{sbcmod}, see \autoref{chap:SBC}) provides the following forcing fields
+(used on tracers):
+
+\begin{labeling}{\textit{fwfisf}}
+\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 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.
-\item
-  $\textit{sfx}$, the salt flux resulting from ice-ocean mass exchange (freezing, melting, ridging...)
-\item
-  \textit{emp}, the mass flux exchanged with the atmosphere (evaporation minus precipitation) and
+\item [\textit{sfx}] The salt flux resulting from ice-ocean mass exchange
+  (freezing, melting, ridging...)
+\item [\textit{emp}] The mass flux exchanged with the atmosphere (evaporation minus precipitation) and
   possibly with the sea-ice and ice-shelves.
-\item
-  \textit{rnf}, the mass flux associated with runoff
+\item [\textit{rnf}] The mass flux associated with runoff
   (see \autoref{sec:SBC_rnf} for further detail of how it acts on temperature and salinity tendencies)
-\item
-  \textit{fwfisf}, the mass flux associated with ice shelf melt,
+\item [\textit{fwfisf}] The mass flux associated with ice shelf melt,
   (see \autoref{sec:SBC_isf} for further details on how the ice shelf melt is computed and applied).
-\end{itemize}
+\end{labeling}
 
 The surface boundary condition on temperature and salinity is applied as follows:
 \begin{equation}
-  \label{eq:tra_sbc}
-  \begin{alignedat}{2}
-    F^T &= \frac{1}{C_p} &\frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}} &\overline{Q_{ns}      }^t \\
-    F^S &=               &\frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}} &\overline{\textit{sfx}}^t
-  \end{alignedat}
+  \label{eq:TRA_sbc}
+    F^T = \frac{1}{C_p} \frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}} \overline{Q_{ns}      }^t \qquad
+    F^S =               \frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}} \overline{\textit{sfx}}^t
 \end{equation}
 where $\overline x^t$ means that $x$ is averaged over two consecutive time steps
 ($t - \rdt / 2$ and $t + \rdt / 2$).
-Such time averaging prevents the divergence of odd and even time step (see \autoref{chap:STP}).
-
-In the linear free surface case (\np{ln\_linssh}~\forcode{= .true.}), an additional term has to be added on
-both temperature and salinity.
-On temperature, this term remove the heat content associated with mass exchange that has been added to $Q_{ns}$.
-On salinity, this term mimics the concentration/dilution effect that would have resulted from a change in
-the volume of the first level.
+Such time averaging prevents the divergence of odd and even time step (see \autoref{chap:TD}).
+
+In the linear free surface case (\np[=.true.]{ln_linssh}{ln\_linssh}),
+an additional term has to be added on both temperature and salinity.
+On temperature, this term remove the heat content associated with
+mass exchange that has been added to $Q_{ns}$.
+On salinity, this term mimics the concentration/dilution effect that would have resulted from
+a change in the volume of the first level.
 The resulting surface boundary condition is applied as follows:
 \begin{equation}
-  \label{eq:tra_sbc_lin}
-  \begin{alignedat}{2}
-    F^T &= \frac{1}{C_p} &\frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}}
-          &\overline{(Q_{ns}       - C_p \, \textit{emp} \lt. T \rt|_{k = 1})}^t \\
-    F^S &=               &\frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}}
-          &\overline{(\textit{sfx} -        \textit{emp} \lt. S \rt|_{k = 1})}^t
-  \end{alignedat}
-\end{equation} 
-Note that an exact conservation of heat and salt content is only achieved with non-linear free surface.
+  \label{eq:TRA_sbc_lin}
+    F^T = \frac{1}{C_p} \frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}}
+          \overline{(Q_{ns}       - C_p \, \textit{emp} \lt. T \rt|_{k = 1})}^t \qquad
+    F^S =               \frac{1}{\rho_o \lt. e_{3t} \rt|_{k = 1}}
+          \overline{(\textit{sfx} -        \textit{emp} \lt. S \rt|_{k = 1})}^t
+\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.
-The imbalance is larger than the imbalance associated with the Asselin time filter \citep{Leclair_Madec_OM09}.
-This is the reason why the modified filter is not applied in the linear free surface case (see \autoref{chap:STP}).
-
-% -------------------------------------------------------------------------------------------------------------
-%        Solar Radiation Penetration 
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Solar radiation penetration (\protect\mdl{traqsr})}
+The imbalance is larger than the imbalance associated with the Asselin time filter
+\citep{leclair.madec_OM09}.
+This is the reason why the modified filter is not applied in the linear free surface case
+(see \autoref{chap:TD}).
+
+%% =================================================================================================
+\subsection[Solar radiation penetration (\textit{traqsr.F90})]{Solar radiation penetration (\protect\mdl{traqsr})}
 \label{subsec:TRA_qsr}
-%--------------------------------------------namqsr--------------------------------------------------------
-
-\nlst{namtra_qsr}
-%--------------------------------------------------------------------------------------------------------------
-
-Options are defined through the \ngn{namtra\_qsr} namelist variables.
-When the penetrative solar radiation option is used (\np{ln\_flxqsr}~\forcode{= .true.}),
+
+\begin{listing}
+  \nlst{namtra_qsr}
+  \caption{\forcode{&namtra_qsr}}
+  \label{lst:namtra_qsr}
+\end{listing}
+
+Options are defined through the \nam{tra_qsr}{tra\_qsr} namelist variables.
+When the penetrative solar radiation option is used (\np[=.true.]{ln_traqsr}{ln\_traqsr}),
 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 
-heat flux:
-\begin{equation}
-  \label{eq:PE_qsr}
+If it is not used (\np[=.false.]{ln_traqsr}{ln\_traqsr}) 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:MB_PE_tra_T} and the surface boundary condition is modified to
+take into account only the non-penetrative part of the surface heat flux:
+\begin{equation}
+  \label{eq:TRA_PE_qsr}
   \begin{gathered}
     \pd[T]{t} = \ldots + \frac{1}{\rho_o \, C_p \, e_3} \; \pd[I]{k} \\
@@ -774,72 +795,75 @@
   \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:
-\begin{equation}
-  \label{eq:tra_qsr}
+The additional term in \autoref{eq:TRA_PE_qsr} is discretized as follows:
+\begin{equation}
+  \label{eq:TRA_qsr}
   \frac{1}{\rho_o \, C_p \, e_3} \, \pd[I]{k} \equiv \frac{1}{\rho_o \, C_p \, e_{3t}} \delta_k [I_w]
 \end{equation}
 
 The shortwave radiation, $Q_{sr}$, consists of energy distributed across a wide spectral range.
-The ocean is strongly absorbing for wavelengths longer than 700~nm and these wavelengths contribute to
-heating the upper few tens of centimetres.
-The fraction of $Q_{sr}$ that resides in these almost non-penetrative wavebands, $R$, is $\sim 58\%$
-(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).
-For shorter wavelengths (400-700~nm), the ocean is more transparent, and solar energy propagates to
-larger depths where it contributes to local heating.
-The way this second part of the solar energy penetrates into the ocean depends on which formulation is chosen.
-In the simple 2-waveband light penetration scheme (\np{ln\_qsr\_2bd}~\forcode{= .true.})
+The ocean is strongly absorbing for wavelengths longer than 700 $nm$ and
+these wavelengths contribute to heat the upper few tens of centimetres.
+The fraction of $Q_{sr}$ that resides in these almost non-penetrative wavebands, $R$, is $\sim$ 58\%
+(specified through namelist parameter \np{rn_abs}{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}{rn\_si0} in the \nam{tra_qsr}{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.
+The way this second part of the solar energy penetrates into
+the ocean depends on which formulation is chosen.
+In the simple 2-waveband light penetration scheme (\np[=.true.]{ln_qsr_2bd}{ln\_qsr\_2bd})
 a chlorophyll-independent monochromatic formulation is chosen for the shorter wavelengths,
-leading to the following expression \citep{Paulson1977}:
+leading to the following expression \citep{paulson.simpson_JPO77}:
 \[
-  % \label{eq:traqsr_iradiance}
+  % \label{eq:TRA_qsr_iradiance}
   I(z) = Q_{sr} \lt[ Re^{- z / \xi_0} + (1 - R) e^{- z / \xi_1} \rt]
 \]
 where $\xi_1$ is the second extinction length scale associated with the shorter wavelengths.
-It is usually chosen to be 23~m by setting the \np{rn\_si0} namelist parameter.
-The set of default values ($\xi_0, \xi_1, R$) corresponds to a Type I water in Jerlov's (1968) classification
-(oligotrophic waters).
+It is usually chosen to be 23~m by setting the \np{rn_si0}{rn\_si0} namelist parameter.
+The set of default values ($\xi_0, \xi_1, R$) corresponds to
+a Type I water in Jerlov's (1968) classification (oligotrophic waters).
 
 Such assumptions have been shown to provide a very crude and simplistic representation of
-observed light penetration profiles (\cite{Morel_JGR88}, see also \autoref{fig:traqsr_irradiance}).
+observed light penetration profiles (\cite{morel_JGR88}, see also \autoref{fig:TRA_qsr_irradiance}).
 Light absorption in the ocean depends on particle concentration and is spectrally selective.
-\cite{Morel_JGR88} has shown that an accurate representation of light penetration can be provided by
+\cite{morel_JGR88} has shown that an accurate representation of light penetration can be provided by
 a 61 waveband formulation.
 Unfortunately, such a model is very computationally expensive.
-Thus, \cite{Lengaigne_al_CD07} have constructed a simplified version of this formulation in which
-visible light is split into three wavebands: blue (400-500 nm), green (500-600 nm) and red (600-700nm).
-For each wave-band, the chlorophyll-dependent attenuation coefficient is fitted to the coefficients computed from
-the full spectral model of \cite{Morel_JGR88} (as modified by \cite{Morel_Maritorena_JGR01}),
-assuming the same power-law relationship.
-As shown in \autoref{fig:traqsr_irradiance}, this formulation, called RGB (Red-Green-Blue),
+Thus, \cite{lengaigne.menkes.ea_CD07} have constructed a simplified version of
+this formulation in which visible light is split into three wavebands:
+blue (400-500 $nm$), green (500-600 $nm$) and red (600-700 $nm$).
+For each wave-band, the chlorophyll-dependent attenuation coefficient is fitted to
+the coefficients computed from the full spectral model of \cite{morel_JGR88}
+(as modified by \cite{morel.maritorena_JGR01}), assuming the same power-law relationship.
+As shown in \autoref{fig:TRA_qsr_irradiance}, this formulation,
+called RGB (\textbf{R}ed-\textbf{G}reen-\textbf{B}lue),
 reproduces quite closely the light penetration profiles predicted by the full spectal model,
 but with much greater computational efficiency.
 The 2-bands formulation does not reproduce the full model very well.
 
-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
-61 nonuniform chlorophyll classes ranging from 0.01 to 10 g.Chl/L
+The RGB formulation is used when \np[=.true.]{ln_qsr_rgb}{ln\_qsr\_rgb}.
+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).
 Four types of chlorophyll can be chosen in the RGB formulation:
 
 \begin{description}
-\item[\np{nn\_chdta}~\forcode{= 0}]
-  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
-  the vertical direction;
-\item[\np{nn\_chdta}~\forcode{= 2}]
-  same as previous case except that a vertical profile of chlorophyl is used.
-  Following \cite{Morel_Berthon_LO89}, the profile is computed from the local surface chlorophyll value;
-\item[\np{ln\_qsr\_bio}~\forcode{= .true.}]
-  simulated time varying chlorophyll by TOP biogeochemical model.
-  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} 
-
-The trend in \autoref{eq:tra_qsr} associated with the penetration of the solar radiation is added to
+\item [{\np[=0]{nn_chldta}{nn\_chldta}}] a constant 0.05 $g.Chl/L$ value everywhere;
+\item [{\np[=1]{nn_chldta}{nn\_chldta}}] an observed time varying chlorophyll deduced from
+  satellite surface ocean color measurement spread uniformly in the vertical direction;
+\item [{\np[=2]{nn_chldta}{nn\_chldta}}] same as previous case except that
+  a vertical profile of chlorophyl is used.
+  Following \cite{morel.berthon_LO89},
+  the profile is computed from the local surface chlorophyll value;
+\item [{\np[=.true.]{ln_qsr_bio}{ln\_qsr\_bio}}] simulated time varying chlorophyll by
+  \TOP\ biogeochemical model.
+  In this case, the RGB formulation is used to calculate both
+  the phytoplankton light limitation in \PISCES\ and the oceanic heating rate.
+\end{description}
+
+The trend in \autoref{eq:TRA_qsr} associated with the penetration of the solar radiation is added to
 the temperature trend, and the surface heat flux is modified in routine \mdl{traqsr}.
 
@@ -847,77 +871,77 @@
 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.
+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).
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!t]
-  \begin{center}
-    \includegraphics[]{Fig_TRA_Irradiance}
-    \caption{
-      \protect\label{fig:traqsr_irradiance}
-      Penetration profile of the downward solar irradiance calculated by four models.
-      Two waveband chlorophyll-independent formulation (blue),
-      a chlorophyll-dependent monochromatic formulation (green),
-      4 waveband RGB formulation (red),
-      61 waveband Morel (1988) formulation (black) for a chlorophyll concentration of
-      (a) Chl=0.05 mg/m$^3$ and (b) Chl=0.5 mg/m$^3$.
-      From \citet{Lengaigne_al_CD07}.
-    }
-  \end{center}
+(\ie\ $I$ is masked).
+
+\begin{figure}
+  \centering
+  \includegraphics[width=0.66\textwidth]{TRA_Irradiance}
+  \caption[Penetration profile of the downward solar irradiance calculated by four models]{
+    Penetration profile of the downward solar irradiance calculated by four models.
+    Two waveband chlorophyll-independent formulation (blue),
+    a chlorophyll-dependent monochromatic formulation (green),
+    4 waveband RGB formulation (red),
+    61 waveband Morel (1988) formulation (black) for a chlorophyll concentration of
+    (a) Chl=0.05 $mg/m^3$ and (b) Chl=0.5 $mg/m^3$.
+    From \citet{lengaigne.menkes.ea_CD07}.}
+  \label{fig:TRA_qsr_irradiance}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-% -------------------------------------------------------------------------------------------------------------
-%        Bottom Boundary Condition
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Bottom boundary condition (\protect\mdl{trabbc})}
+
+%% =================================================================================================
+\subsection[Bottom boundary condition (\textit{trabbc.F90}) - \forcode{ln_trabbc})]{Bottom boundary condition (\protect\mdl{trabbc} - \protect\np{ln_trabbc}{ln\_trabbc})}
 \label{subsec:TRA_bbc}
-%--------------------------------------------nambbc--------------------------------------------------------
-
-\nlst{nambbc}
-%--------------------------------------------------------------------------------------------------------------
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!t]
-  \begin{center}
-    \includegraphics[]{Fig_TRA_geoth}
-    \caption{
-      \protect\label{fig:geothermal}
-      Geothermal Heat flux (in $mW.m^{-2}$) used by \cite{Emile-Geay_Madec_OS09}.
-      It is inferred from the age of the sea floor and the formulae of \citet{Stein_Stein_Nat92}.
-    }
-  \end{center}
+
+\begin{listing}
+  \nlst{nambbc}
+  \caption{\forcode{&nambbc}}
+  \label{lst:nambbc}
+\end{listing}
+
+\begin{figure}
+  \centering
+  \includegraphics[width=0.66\textwidth]{TRA_geoth}
+  \caption[Geothermal heat flux]{
+    Geothermal Heat flux (in $mW.m^{-2}$) used by \cite{emile-geay.madec_OS09}.
+    It is inferred from the age of the sea floor and the formulae of \citet{stein.stein_N92}.}
+  \label{fig:TRA_geothermal}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
 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.
-This flux is weak compared to surface fluxes (a mean global value of $\sim 0.1 \, W/m^2$ \citep{Stein_Stein_Nat92}),
+However, there is a non-zero heat flux across the seafloor that
+is associated with solid earth cooling.
+This flux is weak compared to surface fluxes
+(a mean global value of $\sim 0.1 \, W/m^2$ \citep{stein.stein_N92}),
 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.
-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
-the \np{nn\_geoflx\_cst}, which is also a namelist parameter.
-When \np{nn\_geoflx} is set to 2, a spatially varying geothermal heat flux is introduced which is provided in
-the \ifile{geothermal\_heating} NetCDF file (\autoref{fig:geothermal}) \citep{Emile-Geay_Madec_OS09}.
-
-% ================================================================
-% Bottom Boundary Layer
-% ================================================================
-\section{Bottom boundary layer (\protect\mdl{trabbl} - \protect\key{trabbl})}
+(\ie\ the one associated with the Antarctic Bottom Water) by
+a few Sverdrups \citep{emile-geay.madec_OS09}.
+
+Options are defined through the \nam{bbc}{bbc} namelist variables.
+The presence of geothermal heating is controlled by
+setting the namelist parameter \np{ln_trabbc}{ln\_trabbc} to true.
+Then, when \np{nn_geoflx}{nn\_geoflx} is set to 1, a constant geothermal heating is introduced whose
+value is given by the \np{rn_geoflx_cst}{rn\_geoflx\_cst}, which is also a namelist parameter.
+When \np{nn_geoflx}{nn\_geoflx} is set to 2,
+a spatially varying geothermal heat flux is introduced which is provided in
+the \ifile{geothermal\_heating} NetCDF file
+(\autoref{fig:TRA_geothermal}) \citep{emile-geay.madec_OS09}.
+
+%% =================================================================================================
+\section[Bottom boundary layer (\textit{trabbl.F90} - \forcode{ln_trabbl})]{Bottom boundary layer (\protect\mdl{trabbl} - \protect\np{ln_trabbl}{ln\_trabbl})}
 \label{sec:TRA_bbl}
-%--------------------------------------------nambbl---------------------------------------------------------
-
-\nlst{nambbl}
-%--------------------------------------------------------------------------------------------------------------
-
-Options are defined through the \ngn{nambbl} namelist variables.
+
+\begin{listing}
+  \nlst{nambbl}
+  \caption{\forcode{&nambbl}}
+  \label{lst:nambbl}
+\end{listing}
+
+Options are defined through the \nam{bbl}{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.
@@ -925,63 +949,66 @@
 where dense water formed in marginal seas flows into a basin filled with less dense water,
 or along the continental slope when dense water masses are formed on a continental shelf.
-The amount of entrainment that occurs in these gravity plumes is critical in determining the density and
-volume flux of the densest waters of the ocean, such as Antarctic Bottom Water, or North Atlantic Deep Water.
+The amount of entrainment that occurs in these gravity plumes is critical in
+determining the density and volume flux of the densest waters of the ocean,
+such as Antarctic Bottom Water, or North Atlantic Deep Water.
 $z$-coordinate models tend to overestimate the entrainment,
-because the gravity flow is mixed vertically by convection as it goes ''downstairs'' following the step topography,
+because the gravity flow is mixed vertically by convection as
+it goes ''downstairs'' following the step topography,
 sometimes over a thickness much larger than the thickness of the observed gravity plume.
-A similar problem occurs in the $s$-coordinate when the thickness of the bottom level varies rapidly downstream of
-a sill \citep{Willebrand_al_PO01}, and the thickness of the plume is not resolved.
-
-The idea of the bottom boundary layer (BBL) parameterisation, first introduced by \citet{Beckmann_Doscher1997},
+A similar problem occurs in the $s$-coordinate when
+the thickness of the bottom level varies rapidly downstream of a sill
+\citep{willebrand.barnier.ea_PO01}, and the thickness of the plume is not resolved.
+
+The idea of the bottom boundary layer (BBL) parameterisation, first introduced by
+\citet{beckmann.doscher_JPO97},
 is to allow a direct communication between two adjacent bottom cells at different levels,
 whenever the densest water is located above the less dense water.
-The communication can be by a diffusive flux (diffusive BBL), an advective flux (advective BBL), or both.
+The communication can be by a diffusive flux (diffusive BBL),
+an advective flux (advective BBL), or both.
 In the current implementation of the BBL, only the tracers are modified, not the velocities.
-Furthermore, it only connects ocean bottom cells, and therefore does not include all the improvements introduced by
-\citet{Campin_Goosse_Tel99}.
-
-% -------------------------------------------------------------------------------------------------------------
-%        Diffusive BBL
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Diffusive bottom boundary layer (\protect\np{nn\_bbl\_ldf}~\forcode{= 1})}
+Furthermore, it only connects ocean bottom cells,
+and therefore does not include all the improvements introduced by \citet{campin.goosse_T99}.
+
+%% =================================================================================================
+\subsection[Diffusive bottom boundary layer (\forcode{nn_bbl_ldf=1})]{Diffusive bottom boundary layer (\protect\np[=1]{nn_bbl_ldf}{nn\_bbl\_ldf})}
 \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[=.true.]{ln_trabbl}{ln\_trabbl} and \np{nn_bbl_ldf}{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}
+  % \label{eq:TRA_bbl_diff}
   \vect F_\sigma = A_l^\sigma \, \nabla_\sigma T
 \]
-with $\nabla_\sigma$ the lateral gradient operator taken between bottom cells, and
-$A_l^\sigma$ the lateral diffusivity in the BBL.
-Following \citet{Beckmann_Doscher1997}, the latter is prescribed with a spatial dependence,
-\ie in the conditional form
-\begin{equation}
-  \label{eq:tra_bbl_coef}
+with $\nabla_\sigma$ the lateral gradient operator taken between bottom cells,
+and $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
+\begin{equation}
+  \label{eq:TRA_bbl_coef}
   A_l^\sigma (i,j,t) =
       \begin{cases}
         A_{bbl} & \text{if~} \nabla_\sigma \rho \cdot \nabla H < 0 \\
-        \\
-        0      & \text{otherwise} \\
+        0      & \text{otherwise}
       \end{cases}
 \end{equation}
-where $A_{bbl}$ is the BBL diffusivity coefficient, given by the namelist parameter \np{rn\_ahtbbl} and
+where $A_{bbl}$ is the BBL diffusivity coefficient,
+given by the namelist parameter \np{rn_ahtbbl}{rn\_ahtbbl} and
 usually set to a value much larger than the one used for lateral mixing in the open ocean.
-The constraint in \autoref{eq:tra_bbl_coef} implies that sigma-like diffusion only occurs when
+The constraint in \autoref{eq:TRA_bbl_coef} implies that sigma-like diffusion only occurs when
 the density above the sea floor, at the top of the slope, is larger than in the deeper ocean
-(see green arrow in \autoref{fig:bbl}).
+(see green arrow in \autoref{fig:TRA_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}
+  % \label{eq:TRA_bbl_Drho}
   \nabla_\sigma \rho / \rho = \alpha \, \nabla_\sigma T + \beta \, \nabla_\sigma S
 \]
-where $\rho$, $\alpha$ and $\beta$ are functions of $\overline T^\sigma$, $\overline S^\sigma$ and
-$\overline H^\sigma$, the along bottom mean temperature, salinity and depth, respectively.
-
-% -------------------------------------------------------------------------------------------------------------
-%        Advective BBL
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Advective bottom boundary layer  (\protect\np{nn\_bbl\_adv}~\forcode{= 1..2})}
+where $\rho$, $\alpha$ and $\beta$ are functions of
+$\overline T^\sigma$, $\overline S^\sigma$ and $\overline H^\sigma$,
+the along bottom mean temperature, salinity and depth, respectively.
+
+%% =================================================================================================
+\subsection[Advective bottom boundary layer (\forcode{nn_bbl_adv=1,2})]{Advective bottom boundary layer (\protect\np[=1,2]{nn_bbl_adv}{nn\_bbl\_adv})}
 \label{subsec:TRA_bbl_adv}
 
@@ -991,20 +1018,18 @@
 %}
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!t]
-  \begin{center}
-    \includegraphics[]{Fig_BBL_adv}
-    \caption{
-      \protect\label{fig:bbl}
-      Advective/diffusive Bottom Boundary Layer.
-      The BBL parameterisation is activated when $\rho^i_{kup}$ is larger than $\rho^{i + 1}_{kdnw}$.
-      Red arrows indicate the additional overturning circulation due to the advective BBL.
-      The transport of the downslope flow is defined either as the transport of the bottom ocean cell (black arrow),
-      or as a function of the along slope density gradient.
-      The green arrow indicates the diffusive BBL flux directly connecting $kup$ and $kdwn$ ocean bottom cells.
-    }
-  \end{center}
+\begin{figure}
+  \centering
+  \includegraphics[width=0.33\textwidth]{TRA_BBL_adv}
+  \caption[Advective/diffusive bottom boundary layer]{
+    Advective/diffusive Bottom Boundary Layer.
+    The BBL parameterisation is activated when $\rho^i_{kup}$ is larger than $\rho^{i + 1}_{kdnw}$.
+    Red arrows indicate the additional overturning circulation due to the advective BBL.
+    The transport of the downslope flow is defined either
+    as the transport of the bottom ocean cell (black arrow),
+    or as a function of the along slope density gradient.
+    The green arrow indicates the diffusive BBL flux directly connecting
+    $kup$ and $kdwn$ ocean bottom cells.}
+  \label{fig:TRA_bbl}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
 %!!      nn_bbl_adv = 1   use of the ocean velocity as bbl velocity
@@ -1012,57 +1037,56 @@
 %!!        i.e. transport proportional to the along-slope density gradient
 
-%%%gmcomment   :  this section has to be really written
-
-When applying an advective BBL (\np{nn\_bbl\_adv}~\forcode{= 1..2}), an overturning circulation is added which
-connects two adjacent bottom grid-points only if dense water overlies less dense water on the slope.
+\cmtgm{This section has to be really written}
+
+When applying an advective BBL (\np[=1..2]{nn_bbl_adv}{nn\_bbl\_adv}),
+an overturning circulation is added which connects two adjacent bottom grid-points only if
+dense water overlies less dense water on the slope.
 The density difference causes dense water to move down the slope.
 
-\np{nn\_bbl\_adv}~\forcode{= 1}:
-the downslope velocity is chosen to be the Eulerian ocean velocity just above the topographic step
-(see black arrow in \autoref{fig:bbl}) \citep{Beckmann_Doscher1997}.
-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$).
-
-\np{nn\_bbl\_adv}~\forcode{= 2}:
-the downslope velocity is chosen to be proportional to $\Delta \rho$,
-the density difference between the higher cell and lower cell densities \citep{Campin_Goosse_Tel99}.
-The advection is allowed only  if dense water overlies less dense water on the slope
-(\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:
-\[
-  % \label{eq:bbl_Utr}
-  u^{tr}_{bbl} = \gamma g \frac{\Delta \rho}{\rho_o} e_{1u} \, min ({e_{3u}}_{kup},{e_{3u}}_{kdwn})
-\]
-where $\gamma$, expressed in seconds, is the coefficient of proportionality provided as \np{rn\_gambbl},
-a namelist parameter, and \textit{kup} and \textit{kdwn} are the vertical index of the higher and lower cells,
-respectively.
-The parameter $\gamma$ should take a different value for each bathymetric step, but for simplicity,
-and because no direct estimation of this parameter is available, a uniform value has been assumed.
-The possible values for $\gamma$ range between 1 and $10~s$ \citep{Campin_Goosse_Tel99}.
-
-Scalar properties are advected by this additional transport $(u^{tr}_{bbl},v^{tr}_{bbl})$ using the upwind scheme.
-Such a diffusive advective scheme has been chosen to mimic the entrainment between the downslope plume and
-the surrounding water at intermediate depths.
+\begin{description}
+\item [{\np[=1]{nn_bbl_adv}{nn\_bbl\_adv}}] the downslope velocity is chosen to
+  be the Eulerian ocean velocity just above the topographic step
+  (see black arrow in \autoref{fig:TRA_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$).
+\item [{\np[=2]{nn_bbl_adv}{nn\_bbl\_adv}}] the downslope velocity is chosen to be proportional to
+  $\Delta \rho$, 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$).
+  For example, the resulting transport of the downslope flow, here in the $i$-direction
+  (\autoref{fig:TRA_bbl}), is simply given by the following expression:
+  \[
+    % \label{eq:TRA_bbl_Utr}
+    u^{tr}_{bbl} = \gamma g \frac{\Delta \rho}{\rho_o} e_{1u} \, min ({e_{3u}}_{kup},{e_{3u}}_{kdwn})
+  \]
+  where $\gamma$, expressed in seconds, is the coefficient of proportionality provided as
+  \np{rn_gambbl}{rn\_gambbl}, a namelist parameter, and
+  \textit{kup} and \textit{kdwn} are the vertical index of the higher and lower cells, respectively.
+  The parameter $\gamma$ should take a different value for each bathymetric step, but for simplicity,
+  and because no direct estimation of this parameter is available, a uniform value has been assumed.
+  The possible values for $\gamma$ range between 1 and $10~s$ \citep{campin.goosse_T99}.
+\end{description}
+
+Scalar properties are advected by this additional transport $(u^{tr}_{bbl},v^{tr}_{bbl})$ using
+the upwind scheme.
+Such a diffusive advective scheme has been chosen to mimic the entrainment between
+the downslope plume and the surrounding water at intermediate depths.
 The entrainment is replaced by the vertical mixing implicit in the advection scheme.
-Let us consider as an example the case displayed in \autoref{fig:bbl} where
+Let us consider as an example the case displayed in \autoref{fig:TRA_bbl} where
 the density at level $(i,kup)$ is larger than the one at level $(i,kdwn)$.
-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: 
-\begin{alignat}{3}
-  \label{eq:bbl_dw}
-  \partial_t T^{do}_{kdw} &\equiv \partial_t T^{do}_{kdw}
-                                &&+ \frac{u^{tr}_{bbl}}{{b_t}^{do}_{kdw}} &&\lt( T^{sh}_{kup} - T^{do}_{kdw} \rt) \\
-  \label{eq:bbl_hor}
-  \partial_t T^{sh}_{kup} &\equiv \partial_t T^{sh}_{kup}
-                                &&+ \frac{u^{tr}_{bbl}}{{b_t}^{sh}_{kup}} &&\lt( T^{do}_{kup} - T^{sh}_{kup} \rt) \\
-  %
-  \intertext{and for $k =kdw-1,\;..., \; kup$ :}
-  %
-  \label{eq:bbl_up}
-  \partial_t T^{do}_{k} &\equiv \partial_t S^{do}_{k}
-                                &&+ \frac{u^{tr}_{bbl}}{{b_t}^{do}_{k}}   &&\lt( T^{do}_{k +1} - T^{sh}_{k}   \rt)
+The advective BBL scheme modifies the tracer time tendency of
+the ocean cells near the topographic step by the downslope flow \autoref{eq:TRA_bbl_dw},
+the horizontal \autoref{eq:TRA_bbl_hor} and the upward \autoref{eq:TRA_bbl_up} return flows as follows:
+\begin{alignat}{5}
+  \label{eq:TRA_bbl_dw}
+  \partial_t T^{do}_{kdw} &\equiv \partial_t T^{do}_{kdw} &&+ \frac{u^{tr}_{bbl}}{{b_t}^{do}_{kdw}} &&\lt( T^{sh}_{kup} - T^{do}_{kdw} \rt) \\
+  \label{eq:TRA_bbl_hor}
+  \partial_t T^{sh}_{kup} &\equiv \partial_t T^{sh}_{kup} &&+ \frac{u^{tr}_{bbl}}{{b_t}^{sh}_{kup}} &&\lt( T^{do}_{kup} - T^{sh}_{kup} \rt) \\
+  \shortintertext{and for $k =kdw-1,\;..., \; kup$ :}
+  \label{eq:TRA_bbl_up}
+  \partial_t T^{do}_{k}   &\equiv \partial_t S^{do}_{k}   &&+ \frac{u^{tr}_{bbl}}{{b_t}^{do}_{k}}   &&\lt( T^{do}_{k +1} - T^{sh}_{k}   \rt)
 \end{alignat}
 where $b_t$ is the $T$-cell volume.
@@ -1071,330 +1095,322 @@
 It has to be used to compute the effective velocity as well as the effective overturning circulation.
 
-% ================================================================
-% Tracer damping
-% ================================================================
-\section{Tracer damping (\protect\mdl{tradmp})}
+%% =================================================================================================
+\section[Tracer damping (\textit{tradmp.F90})]{Tracer damping (\protect\mdl{tradmp})}
 \label{sec:TRA_dmp}
-%--------------------------------------------namtra_dmp-------------------------------------------------
-
-\nlst{namtra_dmp}
-%--------------------------------------------------------------------------------------------------------------
-
-In some applications it can be useful to add a Newtonian damping term into the temperature and salinity equations:
-\begin{equation}
-  \label{eq:tra_dmp}
-  \begin{gathered}
-    \pd[T]{t} = \cdots - \gamma (T - T_o) \\
-    \pd[S]{t} = \cdots - \gamma (S - S_o)
-  \end{gathered}
-\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.
-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},
+
+\begin{listing}
+  \nlst{namtra_dmp}
+  \caption{\forcode{&namtra_dmp}}
+  \label{lst:namtra_dmp}
+\end{listing}
+
+In some applications it can be useful to add a Newtonian damping term into
+the temperature and salinity equations:
+\begin{equation}
+  \label{eq:TRA_dmp}
+    \pd[T]{t} = \cdots - \gamma (T - T_o) \qquad \pd[S]{t} = \cdots - \gamma (S - S_o)
+\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 \nam{tra_dmp}{tra\_dmp} namelist variables.
+The restoring term is added when the namelist parameter \np{ln_tradmp}{ln\_tradmp} is set to true.
+It also requires that both \np{ln_tsd_init}{ln\_tsd\_init} and
+\np{ln_tsd_dmp}{ln\_tsd\_dmp} are set to true in \nam{tsd}{tsd} namelist as well as
+\np{sn_tem}{sn\_tem} and \np{sn_sal}{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.
-The file name is specified by the namelist variable \np{cn\_resto}.
-The DMP\_TOOLS tool is provided to allow users to generate the netcdf file.
-
-The two main cases in which \autoref{eq:tra_dmp} is used are
-\textit{(a)} the specification of the boundary conditions along artificial walls of a limited domain basin and
-\textit{(b)} the computation of the velocity field associated with a given $T$-$S$ field
-(for example to build the initial state of a prognostic simulation,
-or to use the resulting velocity field for a passive tracer study).
+The restoring coefficient $\gamma$ is a three-dimensional array read in during
+the \rou{tra\_dmp\_init} routine.
+The file name is specified by the namelist variable \np{cn_resto}{cn\_resto}.
+The \texttt{DMP\_TOOLS} are provided to allow users to generate the netcdf file.
+
+The two main cases in which \autoref{eq:TRA_dmp} is used are
+\begin{enumerate*}[label=(\textit{\alph*})]
+\item the specification of the boundary conditions along
+  artificial walls of a limited domain basin and
+\item the computation of the velocity field associated with a given $T$-$S$ field
+  (for example to build the initial state of a prognostic simulation,
+  or to use the resulting velocity field for a passive tracer study).
+\end{enumerate*}
 The first case applies to regional models that have artificial walls instead of open boundaries.
-In the vicinity of these walls, $\gamma$ takes large values (equivalent to a time scale of a few days) whereas
-it is zero in the interior of the model domain.
-The second case corresponds to the use of the robust diagnostic method \citep{Sarmiento1982}.
+In the vicinity of these walls, $\gamma$ takes large values (equivalent to a time scale of a few days)
+whereas it is zero in the interior of the model domain.
+The second case corresponds to the use of the robust diagnostic method \citep{sarmiento.bryan_JGR82}.
 It allows us to find the velocity field consistent with the model dynamics whilst
 having a $T$, $S$ field close to a given climatological field ($T_o$, $S_o$).
 
-The robust diagnostic method is very efficient in preventing temperature drift in intermediate waters but
-it produces artificial sources of heat and salt within the ocean.
+The robust diagnostic method is very efficient in preventing temperature drift in
+intermediate waters but it produces artificial sources of heat and salt within the ocean.
 It also has undesirable effects on the ocean convection.
-It tends to prevent deep convection and subsequent deep-water formation, by stabilising the water column too much.
-
-The namelist parameter \np{nn\_zdmp} sets whether the damping should be applied in the whole water column or
-only below the mixed layer (defined either on a density or $S_o$ criterion).
+It tends to prevent deep convection and subsequent deep-water formation,
+by stabilising the water column too much.
+
+The namelist parameter \np{nn_zdmp}{nn\_zdmp} sets whether the damping should be applied in
+the whole water column or only below the mixed layer (defined either on a density or $S_o$ criterion).
 It is common to set the damping to zero in the mixed layer as the adjustment time scale is short here
-\citep{Madec_al_JPO96}.
-
-For generating \ifile{resto}, see the documentation for the DMP tool provided with the source code under
-\path{./tools/DMP_TOOLS}.
-
-% ================================================================
-% Tracer time evolution
-% ================================================================
-\section{Tracer time evolution (\protect\mdl{tranxt})}
+\citep{madec.delecluse.ea_JPO96}.
+
+For generating \ifile{resto},
+see the documentation for the DMP tools provided with the source code under \path{./tools/DMP_TOOLS}.
+
+%% =================================================================================================
+\section[Tracer time evolution (\textit{tranxt.F90})]{Tracer time evolution (\protect\mdl{tranxt})}
 \label{sec:TRA_nxt}
-%--------------------------------------------namdom-----------------------------------------------------
-
-\nlst{namdom}
-%--------------------------------------------------------------------------------------------------------------
-
-Options are defined through the \ngn{namdom} 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}):
-\begin{equation}
-  \label{eq:tra_nxt}
-  \begin{alignedat}{3}
+
+Options are defined through the \nam{dom}{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:TD_mLF}):
+\begin{equation}
+  \label{eq:TRA_nxt}
+  \begin{alignedat}{5}
     &(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} 
-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).
-$\gamma$ is initialized as \np{rn\_atfp} (\textbf{namelist} parameter).
-Its default value is \np{rn\_atfp}~\forcode{= 10.e-3}.
+\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).
+$\gamma$ is initialized as \np{rn_atfp}{rn\_atfp}, its default value is \forcode{10.e-3}.
 Note that the forcing correction term in the filter is not applied in linear free surface
-(\jp{lk\_vvl}~\forcode{= .false.}) (see \autoref{subsec:TRA_sbc}).
-Not also that in constant volume case, the time stepping is performed on $T$, not on its content, $e_{3t}T$.
-
-When the vertical mixing is solved implicitly, the update of the \textit{next} tracer fields is done in
-\mdl{trazdf} module.
+(\jp{ln\_linssh}\forcode{=.true.}) (see \autoref{subsec:TRA_sbc}).
+Not also that in constant volume case, the time stepping is performed on $T$,
+not on its content, $e_{3t}T$.
+
+When the vertical mixing is solved implicitly,
+the update of the \textit{next} tracer fields is done in \mdl{trazdf} module.
 In this case only the swapping of arrays and the Asselin filtering is done in the \mdl{tranxt} module.
 
-In order to prepare for the computation of the \textit{next} time step, a swap of tracer arrays is performed:
-$T^{t - \rdt} = T^t$ and $T^t = T_f$.
-
-% ================================================================
-% Equation of State (eosbn2) 
-% ================================================================
-\section{Equation of state (\protect\mdl{eosbn2}) }
+In order to prepare for the computation of the \textit{next} time step,
+a swap of tracer arrays is performed: $T^{t - \rdt} = T^t$ and $T^t = T_f$.
+
+%% =================================================================================================
+\section[Equation of state (\textit{eosbn2.F90})]{Equation of state (\protect\mdl{eosbn2})}
 \label{sec:TRA_eosbn2}
-%--------------------------------------------nameos-----------------------------------------------------
-
-\nlst{nameos}
-%--------------------------------------------------------------------------------------------------------------
-
-% -------------------------------------------------------------------------------------------------------------
-%        Equation of State
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Equation of seawater (\protect\np{nn\_eos}~\forcode{= -1..1})}
+
+\begin{listing}
+  \nlst{nameos}
+  \caption{\forcode{&nameos}}
+  \label{lst:nameos}
+\end{listing}
+
+%% =================================================================================================
+\subsection[Equation of seawater (\forcode{ln_}\{\forcode{teos10,eos80,seos}\})]{Equation of seawater (\protect\np{ln_teos10}{ln\_teos10}, \protect\np{ln_teos80}{ln\_teos80}, or \protect\np{ln_seos}{ln\_seos})}
 \label{subsec:TRA_eos}
 
-The Equation Of Seawater (EOS) is an empirical nonlinear thermodynamic relationship linking seawater density,
-$\rho$, to a number of state variables, most typically temperature, salinity and pressure.
+The \textbf{E}quation \textbf{O}f \textbf{S}eawater (EOS) is
+an empirical nonlinear thermodynamic relationship linking
+seawater density, $\rho$, to a number of state variables,
+most typically temperature, salinity and pressure.
 Because density gradients control the pressure gradient force through the hydrostatic balance,
-the equation of state provides a fundamental bridge between the distribution of active tracers and
-the fluid dynamics.
+the equation of state provides a fundamental bridge between
+the distribution of active tracers and the fluid dynamics.
 Nonlinearities of the EOS are of major importance, in particular influencing the circulation through
 determination of the static stability below the mixed layer,
-thus controlling rates of exchange between the atmosphere and the ocean interior \citep{Roquet_JPO2015}.
-Therefore an accurate EOS based on either the 1980 equation of state (EOS-80, \cite{UNESCO1983}) or
-TEOS-10 \citep{TEOS10} standards should be used anytime a simulation of the real ocean circulation is attempted
-\citep{Roquet_JPO2015}.
+thus controlling rates of exchange between the atmosphere and the ocean interior
+\citep{roquet.madec.ea_JPO15}.
+Therefore an accurate EOS based on either the 1980 equation of state
+(EOS-80, \cite{fofonoff.millard_bk83}) or TEOS-10 \citep{ioc.iapso_bk10} standards should
+be used anytime a simulation of the real ocean circulation is attempted \citep{roquet.madec.ea_JPO15}.
 The use of TEOS-10 is highly recommended because
-\textit{(i)}   it is the new official EOS,
-\textit{(ii)}  it is more accurate, being based on an updated database of laboratory measurements, and
-\textit{(iii)} it uses Conservative Temperature and Absolute Salinity (instead of potential temperature and
-practical salinity for EOS-980, both variables being more suitable for use as model variables
-\citep{TEOS10, Graham_McDougall_JPO13}.
-EOS-80 is an obsolescent feature of the NEMO system, kept only for backward compatibility.
+\begin{enumerate*}[label=(\textit{\roman*})]
+\item it is the new official EOS,
+\item it is more accurate, being based on an updated database of laboratory measurements, and
+\item it uses Conservative Temperature and Absolute Salinity
+  (instead of potential temperature and practical salinity for EOS-80),
+  both variables being more suitable for use as model variables
+  \citep{ioc.iapso_bk10, graham.mcdougall_JPO13}.
+\end{enumerate*}
+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{Vallis06} is also available.
-
-In the computer code, a density anomaly, $d_a = \rho / \rho_o - 1$, is computed, with $\rho_o$ a reference density.
-Called \textit{rau0} in the code, $\rho_o$ is set in \mdl{phycst} to a value of $1,026~Kg/m^3$.
-This is a sensible choice for the reference density used in a Boussinesq ocean climate model, as,
-with the exception of only a small percentage of the ocean,
-density in the World Ocean varies by no more than 2$\%$ from that value \citep{Gill1982}.
-
-Options are defined through the \ngn{nameos} 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).
+To that purposed, a simplified EOS (S-EOS) inspired by \citet{vallis_bk06} is also available.
+
+In the computer code, a density anomaly, $d_a = \rho / \rho_o - 1$, is computed,
+with $\rho_o$ a reference density.
+Called \textit{rau0} in the code,
+$\rho_o$ is set in \mdl{phycst} to a value of \texttt{1,026} $Kg/m^3$.
+This is a sensible choice for the reference density used in a Boussinesq ocean climate model,
+as, with the exception of only a small percentage of the ocean,
+density in the World Ocean varies by no more than 2\% from that value \citep{gill_bk82}.
+
+Options which control the EOS used are defined through the \nam{eos}{eos} namelist variables.
 
 \begin{description}
-\item[\np{nn\_eos}~\forcode{= -1}]
-  the polyTEOS10-bsq equation of seawater \citep{Roquet_OM2015} is used.
+\item [{\np[=.true.]{ln_teos10}{ln\_teos10}}] the polyTEOS10-bsq equation of seawater
+  \citep{roquet.madec.ea_OM15} is used.
   The accuracy of this approximation is comparable to the TEOS-10 rational function approximation,
-  but it is optimized for a boussinesq fluid and the polynomial expressions have simpler and
-  more computationally efficient expressions for their derived quantities which make them more adapted for
-  use in ocean models.
-  Note that a slightly higher precision polynomial form is now used replacement of
-  the TEOS-10 rational function approximation for hydrographic data analysis \citep{TEOS10}.
+  but it is optimized for a Boussinesq fluid and
+  the polynomial expressions have simpler and more computationally efficient expressions for
+  their derived quantities which make them more adapted for use in ocean models.
+  Note that a slightly higher precision polynomial form is now used
+  replacement of the TEOS-10 rational function approximation for hydrographic data analysis
+  \citep{ioc.iapso_bk10}.
   A key point is that conservative state variables are used:
-  Absolute Salinity (unit: g/kg, notation: $S_A$) and Conservative Temperature (unit: \deg{C}, notation: $\Theta$).
+  Absolute Salinity (unit: $g/kg$, notation: $S_A$) and
+  Conservative Temperature (unit: $\deg{C}$, notation: $\Theta$).
   The pressure in decibars is approximated by the depth in meters.
   With TEOS10, the specific heat capacity of sea water, $C_p$, is a constant.
-  It is set to $C_p = 3991.86795711963~J\,Kg^{-1}\,^{\circ}K^{-1}$, according to \citet{TEOS10}.
+  It is set to $C_p$ = 3991.86795711963 $J.Kg^{-1}.\deg{K}^{-1}$,
+  according to \citet{ioc.iapso_bk10}.
   Choosing polyTEOS10-bsq implies that the state variables used by the model are $\Theta$ and $S_A$.
-  In particular, the initial state deined by the user have to be given as \textit{Conservative} Temperature and
-  \textit{Absolute} Salinity.
-  In addition, setting \np{ln\_useCT} to \forcode{.true.} convert the Conservative SST to potential SST prior to
+  In particular, the initial state defined by the user have to be given as
+  \textit{Conservative} Temperature and \textit{Absolute} Salinity.
+  In addition, when using TEOS10, the Conservative SST is converted to potential SST prior to
   either computing the air-sea and ice-sea fluxes (forced mode) or
   sending the SST field to the atmosphere (coupled mode).
-\item[\np{nn\_eos}~\forcode{= 0}]
-  the polyEOS80-bsq equation of seawater is used.
-  It takes the same polynomial form as the polyTEOS10, but the coefficients have been optimized to
-  accurately fit EOS80 (Roquet, personal comm.).
+\item [{\np[=.true.]{ln_eos80}{ln\_eos80}}] the polyEOS80-bsq equation of seawater is used.
+  It takes the same polynomial form as the polyTEOS10,
+  but the coefficients have been optimized to accurately fit EOS80 (Roquet, personal comm.).
   The state variables used in both the EOS80 and the ocean model are:
-  the Practical Salinity ((unit: psu, notation: $S_p$)) and
-  Potential Temperature (unit: $^{\circ}C$, notation: $\theta$).
+  the Practical Salinity (unit: $psu$, notation: $S_p$) and
+  Potential Temperature (unit: $\deg{C}$, notation: $\theta$).
   The pressure in decibars is approximated by the depth in meters.
-  With thsi EOS, the specific heat capacity of sea water, $C_p$, is a function of temperature, salinity and
-  pressure \citep{UNESCO1983}.
+  With EOS, the specific heat capacity of sea water, $C_p$, is a function of
+  temperature, salinity and pressure \citep{fofonoff.millard_bk83}.
   Nevertheless, a severe assumption is made in order to have a heat content ($C_p T_p$) which
   is conserved by the model: $C_p$ is set to a constant value, the TEOS10 value.
-\item[\np{nn\_eos}~\forcode{= 1}]
-  a simplified EOS (S-EOS) inspired by \citet{Vallis06} is chosen,
-  the coefficients of which has been optimized to fit the behavior of TEOS10
-  (Roquet, personal comm.) (see also \citet{Roquet_JPO2015}).
+\item [{\np[=.true.]{ln_seos}{ln\_seos}}] a simplified EOS (S-EOS) inspired by
+  \citet{vallis_bk06} is chosen,
+  the coefficients of which has been optimized to fit the behavior of TEOS10 (Roquet, personal comm.)
+  (see also \citet{roquet.madec.ea_JPO15}).
   It provides a simplistic linear representation of both cabbeling and thermobaricity effects which
-  is enough for a proper treatment of the EOS in theoretical studies \citep{Roquet_JPO2015}.
-  With such an equation of state there is no longer a distinction between
-  \textit{conservative} and \textit{potential} temperature,
-  as well as between \textit{absolute} and \textit{practical} salinity.
+  is enough for a proper treatment of the EOS in theoretical studies \citep{roquet.madec.ea_JPO15}.
+  With such an equation of state there is no longer a distinction between \textit{conservative} and
+  \textit{potential} temperature, as well as between \textit{absolute} and
+  \textit{practical} salinity.
   S-EOS takes the following expression:
   \begin{gather*}
-    % \label{eq:tra_S-EOS}
-    \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       \\  
-    &                              \big. &- \nu \;                           T_a                  &S_a \big] \\
-    \end{alignedat}
-    \\
+    % \label{eq:TRA_S-EOS}
+    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
+                                  \big. - \nu \;                           T_a                  S_a \big] \\
     \text{with~} T_a = T - 10 \, ; \, S_a = S - 35 \, ; \, \rho_o = 1026~Kg/m^3
   \end{gather*}
-  where the computer name of the coefficients as well as their standard value are given in \autoref{tab:SEOS}.
+  where the computer name of the coefficients as well as their standard value are given in
+  \autoref{tab:TRA_SEOS}.
   In fact, when choosing S-EOS, various approximation of EOS can be specified simply by
   changing the associated coefficients.
-  Setting to zero the two thermobaric coefficients $(\mu_1,\mu_2)$ remove thermobaric effect from S-EOS.
-  setting to zero the three cabbeling coefficients $(\lambda_1,\lambda_2,\nu)$ remove cabbeling effect from
-  S-EOS.
+  Setting to zero the two thermobaric coefficients $(\mu_1,\mu_2)$
+  remove thermobaric effect from S-EOS.
+  Setting to zero the three cabbeling coefficients $(\lambda_1,\lambda_2,\nu)$
+  remove   cabbeling effect from S-EOS.
   Keeping non-zero value to $a_0$ and $b_0$ provide a linear EOS function of T and S.
 \end{description}
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{table}[!tb]
-  \begin{center}
-    \begin{tabular}{|l|l|l|l|}
-      \hline
-      coeff.	   & computer name   & S-EOS		      & description		                 \\
-      \hline
-      $a_0$       & \np{rn\_a0}     & $1.6550~10^{-1}$ & linear thermal expansion coeff. \\
-      \hline
-      $b_0$	      & \np{rn\_b0} 	   & $7.6554~10^{-1}$ & linear haline  expansion coeff. \\
-      \hline
-      $\lambda_1$	& \np{rn\_lambda1}& $5.9520~10^{-2}$ & cabbeling coeff. in $T^2$ 	     \\
-      \hline
-      $\lambda_2$	& \np{rn\_lambda2}& $5.4914~10^{-4}$ & cabbeling coeff. in $S^2$	 	  \\
-      \hline
-      $\nu$       & \np{rn\_nu}     & $2.4341~10^{-3}$ & cabbeling coeff. in $T \, S$ 	  \\
-      \hline
-      $\mu_1$     & \np{rn\_mu1} 	& $1.4970~10^{-4}$ & thermobaric coeff. in T    	  \\
-      \hline
-      $\mu_2$     & \np{rn\_mu2} 	& $1.1090~10^{-5}$ & thermobaric coeff. in S   	     \\
-      \hline
-    \end{tabular}
-    \caption{
-      \protect\label{tab:SEOS}
-      Standard value of S-EOS coefficients.
-    }
-\end{center}
+\begin{table}
+  \centering
+  \begin{tabular}{|l|l|l|l|}
+    \hline
+    coeff.      & computer name                & S-EOS            & description                     \\
+    \hline
+    $a_0      $ & \np{rn_a0}{rn\_a0}           & $1.6550~10^{-1}$ & linear thermal expansion coeff. \\
+    \hline
+    $b_0      $ & \np{rn_b0}{rn\_b0}           & $7.6554~10^{-1}$ & linear haline  expansion coeff. \\
+    \hline
+    $\lambda_1$ & \np{rn_lambda1}{rn\_lambda1} & $5.9520~10^{-2}$ & cabbeling coeff. in $T^2$       \\
+    \hline
+    $\lambda_2$ & \np{rn_lambda2}{rn\_lambda2} & $5.4914~10^{-4}$ & cabbeling coeff. in $S^2$       \\
+    \hline
+    $\nu      $ & \np{rn_nu}{rn\_nu}           & $2.4341~10^{-3}$ & cabbeling coeff. in $T \, S$    \\
+    \hline
+    $\mu_1    $ & \np{rn_mu1}{rn\_mu1}         & $1.4970~10^{-4}$ & thermobaric coeff. in T         \\
+    \hline
+    $\mu_2    $ & \np{rn_mu2}{rn\_mu2}         & $1.1090~10^{-5}$ & thermobaric coeff. in S         \\
+    \hline
+  \end{tabular}
+  \caption{Standard value of S-EOS coefficients}
+  \label{tab:TRA_SEOS}
 \end{table}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-% -------------------------------------------------------------------------------------------------------------
-%        Brunt-V\"{a}is\"{a}l\"{a} Frequency
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Brunt-V\"{a}is\"{a}l\"{a} frequency (\protect\np{nn\_eos}~\forcode{= 0..2})}
+
+%% =================================================================================================
+\subsection[Brunt-V\"{a}is\"{a}l\"{a} frequency]{Brunt-V\"{a}is\"{a}l\"{a} frequency}
 \label{subsec:TRA_bn2}
 
-An accurate computation of the ocean stability (i.e. of $N$, the brunt-V\"{a}is\"{a}l\"{a} frequency) is of
-paramount importance as determine the ocean stratification and is used in several ocean parameterisations
+An accurate computation of the ocean stability (i.e. of $N$, the Brunt-V\"{a}is\"{a}l\"{a} frequency) is of paramount importance as determine the ocean stratification and
+is used in several ocean parameterisations
 (namely TKE, GLS, Richardson number dependent vertical diffusion, enhanced vertical diffusion,
 non-penetrative convection, tidal mixing  parameterisation, iso-neutral diffusion).
 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}
+  % \label{eq:TRA_bn2}
   N^2 = \frac{g}{e_{3w}} \lt( \beta \; \delta_{k + 1/2}[S] - \alpha \; \delta_{k + 1/2}[T] \rt)
 \]
 where $(T,S) = (\Theta,S_A)$ for TEOS10, $(\theta,S_p)$ for TEOS-80, or $(T,S)$ for S-EOS, and,
 $\alpha$ and $\beta$ are the thermal and haline expansion coefficients.
-The coefficients are a polynomial function of temperature, salinity and depth which expression depends on
-the chosen EOS.
-They are computed through \textit{eos\_rab}, a \fortran function that can be found in \mdl{eosbn2}.
-
-% -------------------------------------------------------------------------------------------------------------
-%        Freezing Point of Seawater
-% -------------------------------------------------------------------------------------------------------------
+The coefficients are a polynomial function of temperature, salinity and depth which
+expression depends on the chosen EOS.
+They are computed through \textit{eos\_rab}, a \fortran\ function that can be found in \mdl{eosbn2}.
+
+%% =================================================================================================
 \subsection{Freezing point of seawater}
 \label{subsec:TRA_fzp}
 
-The freezing point of seawater is a function of salinity and pressure \citep{UNESCO1983}:
-\begin{equation}
-  \label{eq:tra_eos_fzp}
-  \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{and~} d = -7.53~10^{-3}
-    \end{split}
-\end{equation}
-
-\autoref{eq:tra_eos_fzp} is only used to compute the potential freezing point of sea water
-(\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 of seawater is a function of salinity and pressure \citep{fofonoff.millard_bk83}:
+\begin{equation}
+  \label{eq:TRA_eos_fzp}
+  \begin{gathered}
+    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{and~} d = -7.53~10^{-3}
+    \end{gathered}
+\end{equation}
+
+\autoref{eq:TRA_eos_fzp} is only used to compute the potential freezing point of sea water
+(\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},
-a \fortran function that can be found in \mdl{eosbn2}.
-
-% -------------------------------------------------------------------------------------------------------------
-%        Potential Energy     
-% -------------------------------------------------------------------------------------------------------------
+a \fortran\ function that can be found in \mdl{eosbn2}.
+
+%% =================================================================================================
 %\subsection{Potential Energy anomalies}
 %\label{subsec:TRA_bn2}
 
 %    =====>>>>> TO BE written
-%
-
-% ================================================================
-% Horizontal Derivative in zps-coordinate 
-% ================================================================
-\section{Horizontal derivative in \textit{zps}-coordinate (\protect\mdl{zpshde})}
+
+%% =================================================================================================
+\section[Horizontal derivative in \textit{zps}-coordinate (\textit{zpshde.F90})]{Horizontal derivative in \textit{zps}-coordinate (\protect\mdl{zpshde})}
 \label{sec:TRA_zpshde}
 
-\gmcomment{STEVEN: to be consistent with earlier discussion of differencing and averaging operators, 
+\cmtgm{STEVEN: to be consistent with earlier discussion of differencing and averaging operators,
 I've changed "derivative" to "difference" and "mean" to "average"}
 
-With partial cells (\np{ln\_zps}~\forcode{= .true.}) at bottom and top (\np{ln\_isfcav}~\forcode{= .true.}),
+With partial cells (\np[=.true.]{ln_zps}{ln\_zps}) at bottom and top
+(\np[=.true.]{ln_isfcav}{ln\_isfcav}),
 in general, tracers in horizontally adjacent cells live at different depths.
-Horizontal gradients of tracers are needed for horizontal diffusion (\mdl{traldf} module) and
-the hydrostatic pressure gradient calculations (\mdl{dynhpg} module).
-The partial cell properties at the top (\np{ln\_isfcav}~\forcode{= .true.}) are computed in the same way as
-for the bottom.
+Horizontal gradients of tracers are needed for horizontal diffusion
+(\mdl{traldf} module) and the hydrostatic pressure gradient calculations (\mdl{dynhpg} module).
+The partial cell properties at the top (\np[=.true.]{ln_isfcav}{ln\_isfcav}) are computed in
+the same way as for the bottom.
 So, only the bottom interpolation is explained below.
 
 Before taking horizontal gradients between the tracers next to the bottom,
 a linear interpolation in the vertical is used to approximate the deeper tracer as if
-it actually lived at the depth of the shallower tracer point (\autoref{fig:Partial_step_scheme}).
-For example, for temperature in the $i$-direction the needed interpolated temperature, $\widetilde T$, is:
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!p]
-  \begin{center}
-    \includegraphics[]{Fig_partial_step_scheme}
-    \caption{
-      \protect\label{fig:Partial_step_scheme}
-      Discretisation of the horizontal difference and average of tracers in the $z$-partial step coordinate
-      (\protect\np{ln\_zps}~\forcode{= .true.}) in the case $(e3w_k^{i + 1} - e3w_k^i) > 0$.
-      A linear interpolation is used to estimate $\widetilde T_k^{i + 1}$,
-      the tracer value at the depth of the shallower tracer point of the two adjacent bottom $T$-points.
-      The horizontal difference is then given by: $\delta_{i + 1/2} T_k = \widetilde T_k^{\, i + 1} -T_k^{\, i}$ and
-      the average by: $\overline T_k^{\, i + 1/2} = (\widetilde T_k^{\, i + 1/2} - T_k^{\, i}) / 2$.
-    }
-  \end{center}
+it actually lived at the depth of the shallower tracer point (\autoref{fig:TRA_Partial_step_scheme}).
+For example, for temperature in the $i$-direction the needed interpolated temperature,
+$\widetilde T$, is:
+
+\begin{figure}
+  \centering
+  \includegraphics[width=0.33\textwidth]{TRA_partial_step_scheme}
+  \caption[Discretisation of the horizontal difference and average of tracers in
+  the $z$-partial step coordinate]{
+    Discretisation of the horizontal difference and average of tracers in
+    the $z$-partial step coordinate (\protect\np[=.true.]{ln_zps}{ln\_zps}) in
+    the case $(e3w_k^{i + 1} - e3w_k^i) > 0$.
+    A linear interpolation is used to estimate $\widetilde T_k^{i + 1}$,
+    the tracer value at the depth of the shallower tracer point of the two adjacent bottom $T$-points.
+    The horizontal difference is then given by:
+    $\delta_{i + 1/2} T_k = \widetilde T_k^{\, i + 1} -T_k^{\, i}$ and the average by:
+    $\overline T_k^{\, i + 1/2} = (\widetilde T_k^{\, i + 1/2} - T_k^{\, i}) / 2$.}
+  \label{fig:TRA_Partial_step_scheme}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
 \[
   \widetilde T = \lt\{
     \begin{alignedat}{2}
       &T^{\, i + 1} &-\frac{ \lt( e_{3w}^{i + 1} -e_{3w}^i \rt) }{ e_{3w}^{i + 1} } \; \delta_k T^{i + 1}
-      & \quad \text{if $e_{3w}^{i + 1} \geq e_{3w}^i$} \\ \\
+      & \quad \text{if $e_{3w}^{i + 1} \geq e_{3w}^i$} \\
       &T^{\, i}     &+\frac{ \lt( e_{3w}^{i + 1} -e_{3w}^i \rt )}{e_{3w}^i       } \; \delta_k T^{i + 1}
       & \quad \text{if $e_{3w}^{i + 1} <    e_{3w}^i$}
@@ -1402,20 +1418,18 @@
   \rt.
 \]
-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}
+and the resulting forms for the horizontal difference and the horizontal average value of
+$T$ at a $U$-point are:
+\begin{equation}
+  \label{eq:TRA_zps_hde}
   \begin{split}
     \delta_{i + 1/2} T       &=
     \begin{cases}
-                                \widetilde T - T^i          & \text{if~} e_{3w}^{i + 1} \geq e_{3w}^i \\
-                                \\
-                                T^{\, i + 1} - \widetilde T & \text{if~} e_{3w}^{i + 1} <    e_{3w}^i
-    \end{cases}
-    \\
+      \widetilde T - T^i          & \text{if~} e_{3w}^{i + 1} \geq e_{3w}^i \\
+      T^{\, i + 1} - \widetilde T & \text{if~} e_{3w}^{i + 1} <    e_{3w}^i
+    \end{cases} \\
     \overline T^{\, i + 1/2} &=
     \begin{cases}
-                                (\widetilde T - T^{\, i}   ) / 2 & \text{if~} e_{3w}^{i + 1} \geq e_{3w}^i \\
-                                \\
-                                (T^{\, i + 1} - \widetilde T) / 2 & \text{if~} e_{3w}^{i + 1} <   e_{3w}^i
+      (\widetilde T - T^{\, i}    ) / 2 & \text{if~} e_{3w}^{i + 1} \geq e_{3w}^i \\
+      (T^{\, i + 1} - \widetilde T) / 2 & \text{if~} e_{3w}^{i + 1} <   e_{3w}^i
     \end{cases}
   \end{split}
@@ -1424,35 +1438,33 @@
 The computation of horizontal derivative of tracers as well as of density is performed once for all at
 each time step in \mdl{zpshde} module and stored in shared arrays to be used when needed.
-It has to be emphasized that the procedure used to compute the interpolated density, $\widetilde \rho$,
-is not the same as that used for $T$ and $S$.
-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}): 
+It has to be emphasized that the procedure used to compute the interpolated density,
+$\widetilde \rho$, is not the same as that used for $T$ and $S$.
+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}):
 \[
-  % \label{eq:zps_hde_rho}
+  % \label{eq:TRA_zps_hde_rho}
   \widetilde \rho = \rho (\widetilde T,\widetilde S,z_u) \quad \text{where~} z_u = \min \lt( z_T^{i + 1},z_T^i \rt)
 \]
 
 This is a much better approximation as the variation of $\rho$ with depth (and thus pressure)
-is highly non-linear with a true equation of state and thus is badly approximated with a linear interpolation.
-This approximation is used to compute both the horizontal pressure gradient (\autoref{sec:DYN_hpg}) and
-the slopes of neutral surfaces (\autoref{sec:LDF_slp}).
-
-Note that in almost all the advection schemes presented in this Chapter,
+is highly non-linear with a true equation of state and thus is badly approximated with
+a linear interpolation.
+This approximation is used to compute both the horizontal pressure gradient (\autoref{sec:DYN_hpg})
+and the slopes of neutral surfaces (\autoref{sec:LDF_slp}).
+
+Note that in almost all the advection schemes presented in this chapter,
 both averaging and differencing operators appear.
-Yet \autoref{eq:zps_hde} has not been used in these schemes:
+Yet \autoref{eq:TRA_zps_hde} has not been used in these schemes:
 in contrast to diffusion and pressure gradient computations,
 no correction for partial steps is applied for advection.
 The main motivation is to preserve the domain averaged mean variance of the advected field when
 using the $2^{nd}$ order centred scheme.
-Sensitivity of the advection schemes to the way horizontal averages are performed in the vicinity of
-partial cells should be further investigated in the near future.
-%%%
-\gmcomment{gm :   this last remark has to be done}
-%%%
-
-\biblio
-
-\pindex
+Sensitivity of the advection schemes to the way horizontal averages are performed in
+the vicinity of partial cells should be further investigated in the near future.
+\cmtgm{gm :   this last remark has to be done}
+
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_ZDF.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_ZDF.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_ZDF.tex	(revision 11831)
@@ -1,22 +1,37 @@
 \documentclass[../main/NEMO_manual]{subfiles}
 
+%% Custom aliases
+\newcommand{\cf}{\ensuremath{C\kern-0.14em f}}
+
 \begin{document}
-% ================================================================
-% Chapter  Vertical Ocean Physics (ZDF)
-% ================================================================
+
 \chapter{Vertical Ocean Physics (ZDF)}
 \label{chap:ZDF}
 
-\minitoc
-
-%gm% Add here a small introduction to ZDF and naming of the different physics (similar to what have been written for TRA and DYN.
-
-\newpage
-
-% ================================================================
-% Vertical Mixing
-% ================================================================
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
+
+\cmtgm{ Add here a small introduction to ZDF and naming of the different physics
+(similar to what have been written for TRA and DYN).}
+
+%% =================================================================================================
 \section{Vertical mixing}
-\label{sec:ZDF_zdf}
+\label{sec:ZDF}
 
 The discrete form of the ocean subgrid scale physics has been presented in
@@ -25,7 +40,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 \key{trabbl} defined,
+unless a geothermal flux forcing is prescribed as a bottom boundary condition (\ie\ \np{ln_trabbc}{ln\_trabbc} defined,
 see \autoref{subsec:TRA_bbc}), and specified through a bottom friction parameterisation for momentum
-(see \autoref{sec:ZDF_bfr}).
+(see \autoref{sec:ZDF_drg}).
 
 In this section we briefly discuss the various choices offered to compute the vertical eddy viscosity and
@@ -33,29 +48,29 @@
 respectively (see \autoref{sec:TRA_zdf} and \autoref{sec:DYN_zdf}).
 These coefficients can be assumed to be either constant, or a function of the local Richardson number,
-or computed from a turbulent closure model (either TKE or GLS formulation).
-The computation of these coefficients is initialized in the \mdl{zdfini} module and performed in
-the \mdl{zdfric}, \mdl{zdftke} or \mdl{zdfgls} modules.
+or computed from a turbulent closure model (either TKE or GLS or OSMOSIS formulation).
+The computation of these coefficients is initialized in the \mdl{zdfphy} module and performed in
+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. 
-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
-(\np{ln\_zdfexp}\forcode{ = .false.}) depending on the magnitude of the mixing coefficients,
-and thus of the formulation used (see \autoref{chap:STP}).
-
-% -------------------------------------------------------------------------------------------------------------
-%        Constant 
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Constant (\protect\key{zdfcst})}
+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[=.true.]{ln_zdfexp}{ln\_zdfexp}) or a backward time stepping scheme
+%(\np[=.false.]{ln_zdfexp}{ln\_zdfexp}) depending on the magnitude of the mixing coefficients,
+%and thus of the formulation used (see \autoref{chap:TD}).
+
+\begin{listing}
+  \nlst{namzdf}
+  \caption{\forcode{&namzdf}}
+  \label{lst:namzdf}
+\end{listing}
+
+%% =================================================================================================
+\subsection[Constant (\forcode{ln_zdfcst})]{Constant (\protect\np{ln_zdfcst}{ln\_zdfcst})}
 \label{subsec:ZDF_cst}
-%--------------------------------------------namzdf---------------------------------------------------------
-
-\nlst{namzdf}
-%--------------------------------------------------------------------------------------------------------------
-
-Options are defined through the \ngn{namzdf} namelist variables.
-When \key{zdfcst} is defined, the momentum and tracer vertical eddy coefficients are set to
+
+Options are defined through the \nam{zdf}{zdf} namelist variables.
+When \np{ln_zdfcst}{ln\_zdfcst} is defined, the momentum and tracer vertical eddy coefficients are set to
 constant values over the whole ocean.
 This is the crudest way to define the vertical ocean physics.
-It is recommended that this option is only used in process studies, not in basin scale simulations.
+It is recommended to use this option only in process studies, not in basin scale simulations.
 Typical values used in this case are:
 \begin{align*}
@@ -64,30 +79,29 @@
 \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}{rn\_avm0} and \np{rn_avt0}{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
 $\sim10^{-9}~m^2.s^{-1}$ for salinity.
 
-% -------------------------------------------------------------------------------------------------------------
-%        Richardson Number Dependent
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Richardson number dependent (\protect\key{zdfric})}
+%% =================================================================================================
+\subsection[Richardson number dependent (\forcode{ln_zdfric})]{Richardson number dependent (\protect\np{ln_zdfric}{ln\_zdfric})}
 \label{subsec:ZDF_ric}
 
-%--------------------------------------------namric---------------------------------------------------------
-
-\nlst{namzdf_ric}
-%--------------------------------------------------------------------------------------------------------------
-
-When \key{zdfric} is defined, 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. 
+\begin{listing}
+  \nlst{namzdf_ric}
+  \caption{\forcode{&namzdf_ric}}
+  \label{lst:namzdf_ric}
+\end{listing}
+
+When \np[=.true.]{ln_zdfric}{ln\_zdfric}, a local Richardson number dependent formulation for the vertical momentum and
+tracer eddy coefficients is set through the \nam{zdf_ric}{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).
-Following \citet{Pacanowski_Philander_JPO81}, the following formulation has been implemented:
-\[
-  % \label{eq:zdfric}
+(\ie\ the ratio of stratification to vertical shear).
+Following \citet{pacanowski.philander_JPO81}, the following formulation has been implemented:
+\[
+  % \label{eq:ZDF_ric}
   \left\{
     \begin{aligned}
@@ -98,13 +112,13 @@
 \]
 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
 can be reached by the coefficient when $Ri\leq 0$, $a=5$ and $n=2$.
-The last three values can be modified by setting the \np{rn\_avmri}, \np{rn\_alp} and
-\np{nn\_ric} namelist parameters, respectively.
+The last three values can be modified by setting the \np{rn_avmri}{rn\_avmri}, \np{rn_alp}{rn\_alp} and
+\np{nn_ric}{nn\_ric} namelist parameters, respectively.
 
 A simple mixing-layer model to transfer and dissipate the atmospheric forcings
-(wind-stress and buoyancy fluxes) can be activated setting the \np{ln\_mldw}\forcode{ = .true.} in the namelist.
+(wind-stress and buoyancy fluxes) can be activated setting the \np[=.true.]{ln_mldw}{ln\_mldw} in the namelist.
 
 In this case, the local depth of turbulent wind-mixing or "Ekman depth" $h_{e}(x,y,t)$ is evaluated and
@@ -122,31 +136,30 @@
 \]
 is computed from the wind stress vector $|\tau|$ and the reference density $ \rho_o$.
-The final $h_{e}$ is further constrained by the adjustable bounds \np{rn\_mldmin} and \np{rn\_mldmax}.
+The final $h_{e}$ is further constrained by the adjustable bounds \np{rn_mldmin}{rn\_mldmin} and \np{rn_mldmax}{rn\_mldmax}.
 Once $h_{e}$ is computed, the vertical eddy coefficients within $h_{e}$ are set to
-the empirical values \np{rn\_wtmix} and \np{rn\_wvmix} \citep{Lermusiaux2001}.
-
-% -------------------------------------------------------------------------------------------------------------
-%        TKE Turbulent Closure Scheme 
-% -------------------------------------------------------------------------------------------------------------
-\subsection{TKE turbulent closure scheme (\protect\key{zdftke})}
+the empirical values \np{rn_wtmix}{rn\_wtmix} and \np{rn_wvmix}{rn\_wvmix} \citep{lermusiaux_JMS01}.
+
+%% =================================================================================================
+\subsection[TKE turbulent closure scheme (\forcode{ln_zdftke})]{TKE turbulent closure scheme (\protect\np{ln_zdftke}{ln\_zdftke})}
 \label{subsec:ZDF_tke}
 
-%--------------------------------------------namzdf_tke--------------------------------------------------
-
-\nlst{namzdf_tke}
-%--------------------------------------------------------------------------------------------------------------
+\begin{listing}
+  \nlst{namzdf_tke}
+  \caption{\forcode{&namzdf_tke}}
+  \label{lst:namzdf_tke}
+\end{listing}
 
 The vertical eddy viscosity and diffusivity coefficients are computed from a TKE turbulent closure model based on
 a prognostic equation for $\bar{e}$, the turbulent kinetic energy,
 and a closure assumption for the turbulent length scales.
-This turbulent closure model has been developed by \citet{Bougeault1989} in the atmospheric case,
-adapted by \citet{Gaspar1990} for the oceanic case, and embedded in OPA, the ancestor of NEMO,
-by \citet{Blanke1993} for equatorial Atlantic simulations.
-Since then, significant modifications have been introduced by \citet{Madec1998} in both the implementation and
+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,
+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
 the formulation of the mixing length scale.
 The time evolution of $\bar{e}$ is the result of the production of $\bar{e}$ through vertical shear,
-its destruction through stratification, its vertical diffusion, and its dissipation of \citet{Kolmogorov1942} type:
+its destruction through stratification, its vertical diffusion, and its dissipation of \citet{kolmogorov_IANS42} type:
 \begin{equation}
-  \label{eq:zdftke_e}
+  \label{eq:ZDF_tke_e}
   \frac{\partial \bar{e}}{\partial t} =
   \frac{K_m}{{e_3}^2 }\;\left[ {\left( {\frac{\partial u}{\partial k}} \right)^2
@@ -158,5 +171,5 @@
 \end{equation}
 \[
-  % \label{eq:zdftke_kz}
+  % \label{eq:ZDF_tke_kz}
   \begin{split}
     K_m &= C_k\  l_k\  \sqrt {\bar{e}\; }  	\\
@@ -164,13 +177,13 @@
   \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{Gaspar1990}. 
-They are set through namelist parameters \np{nn\_ediff} and \np{nn\_ediss}.
-$P_{rt}$ can be set to unity or, following \citet{Blanke1993}, be a function of the local Richardson number, $R_i$:
+vertical mixing at any depth \citep{gaspar.gregoris.ea_JGR90}.
+They are set through namelist parameters \np{nn_ediff}{nn\_ediff} and \np{nn_ediss}{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$:
 \begin{align*}
-  % \label{eq:prt}
+  % \label{eq:ZDF_prt}
   P_{rt} =
   \begin{cases}
@@ -180,71 +193,66 @@
   \end{cases}
 \end{align*}
-Options are defined through the  \ngn{namzdfy\_tke} namelist variables.
-The choice of $P_{rt}$ is controlled by the \np{nn\_pdl} namelist variable.
+The choice of $P_{rt}$ is controlled by the \np{nn_pdl}{nn\_pdl} namelist variable.
 
 At the sea surface, the value of $\bar{e}$ is prescribed from the wind stress field as
-$\bar{e}_o = e_{bb} |\tau| / \rho_o$, with $e_{bb}$ the \np{rn\_ebb} namelist parameter.
-The default value of $e_{bb}$ is 3.75. \citep{Gaspar1990}), however a much larger value can be used when
+$\bar{e}_o = e_{bb} |\tau| / \rho_o$, with $e_{bb}$ the \np{rn_ebb}{rn\_ebb} namelist parameter.
+The default value of $e_{bb}$ is 3.75. \citep{gaspar.gregoris.ea_JGR90}), however a much larger value can be used when
 taking into account the surface wave breaking (see below Eq. \autoref{eq:ZDF_Esbc}).
 The bottom value of TKE is assumed to be equal to the value of the level just above.
 The time integration of the $\bar{e}$ equation may formally lead to negative values because
 the numerical scheme does not ensure its positivity.
-To overcome this problem, a cut-off in the minimum value of $\bar{e}$ is used (\np{rn\_emin} namelist parameter).
-Following \citet{Gaspar1990}, the cut-off value is set to $\sqrt{2}/2~10^{-6}~m^2.s^{-2}$.
-This allows the subsequent formulations to match that of \citet{Gargett1984} for the diffusion in
+To overcome this problem, a cut-off in the minimum value of $\bar{e}$ is used (\np{rn_emin}{rn\_emin} namelist parameter).
+Following \citet{gaspar.gregoris.ea_JGR90}, the cut-off value is set to $\sqrt{2}/2~10^{-6}~m^2.s^{-2}$.
+This allows the subsequent formulations to match that of \citet{gargett_JMR84} for the diffusion in
 the thermocline and deep ocean :  $K_\rho = 10^{-3} / N$.
 In addition, a cut-off is applied on $K_m$ and $K_\rho$ to avoid numerical instabilities associated with
 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} (namzdf namelist, see \autoref{subsec:ZDF_cst}).
-
+They must be specified at least larger than the molecular values, and are set through \np{rn_avm0}{rn\_avm0} and
+\np{rn_avt0}{rn\_avt0} (\nam{zdf}{zdf} namelist, see \autoref{subsec:ZDF_cst}).
+
+%% =================================================================================================
 \subsubsection{Turbulent length scale}
 
 For computational efficiency, the original formulation of the turbulent length scales proposed by
-\citet{Gaspar1990} has been simplified.
-Four formulations are proposed, the choice of which is controlled by the \np{nn\_mxl} namelist parameter.
-The first two are based on the following first order approximation \citep{Blanke1993}:
+\citet{gaspar.gregoris.ea_JGR90} has been simplified.
+Four formulations are proposed, the choice of which is controlled by the \np{nn_mxl}{nn\_mxl} namelist parameter.
+The first two are based on the following first order approximation \citep{blanke.delecluse_JPO93}:
 \begin{equation}
-  \label{eq:tke_mxl0_1}
+  \label{eq:ZDF_tke_mxl0_1}
   l_k = l_\epsilon = \sqrt {2 \bar{e}\; } / N
 \end{equation}
 which is valid in a stable stratified region with constant values of the Brunt-Vais\"{a}l\"{a} frequency.
 The resulting length scale is bounded by the distance to the surface or to the bottom
-(\np{nn\_mxl}\forcode{ = 0}) or by the local vertical scale factor (\np{nn\_mxl}\forcode{ = 1}).
-\citet{Blanke1993} notice that this simplification has two major drawbacks:
+(\np[=0]{nn_mxl}{nn\_mxl}) or by the local vertical scale factor (\np[=1]{nn_mxl}{nn\_mxl}).
+\citet{blanke.delecluse_JPO93} notice that this simplification has two major drawbacks:
 it makes no sense for locally unstable stratification and the computation no longer uses all
 the information contained in the vertical density profile.
-To overcome these drawbacks, \citet{Madec1998} introduces the \np{nn\_mxl}\forcode{ = 2..3} cases,
+To overcome these drawbacks, \citet{madec.delecluse.ea_NPM98} introduces the \np[=2, 3]{nn_mxl}{nn\_mxl} cases,
 which add an extra assumption concerning the vertical gradient of the computed length scale.
-So, the length scales are first evaluated as in \autoref{eq:tke_mxl0_1} and then bounded such that:
+So, the length scales are first evaluated as in \autoref{eq:ZDF_tke_mxl0_1} and then bounded such that:
 \begin{equation}
-  \label{eq:tke_mxl_constraint}
+  \label{eq:ZDF_tke_mxl_constraint}
   \frac{1}{e_3 }\left| {\frac{\partial l}{\partial k}} \right| \leq 1
   \qquad \text{with }\  l =  l_k = l_\epsilon
 \end{equation}
-\autoref{eq:tke_mxl_constraint} means that the vertical variations of the length scale cannot be larger than
+\autoref{eq:ZDF_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{Gaspar1990} 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
 to the ocean bottom but also by the distance to a strongly stratified portion of the water column such as
-the thermocline (\autoref{fig:mixing_length}).
-In order to impose the \autoref{eq:tke_mxl_constraint} constraint, we introduce two additional length scales:
+the thermocline (\autoref{fig:ZDF_mixing_length}).
+In order to impose the \autoref{eq:ZDF_tke_mxl_constraint} constraint, we introduce two additional length scales:
 $l_{up}$ and $l_{dwn}$, the upward and downward length scales, and
 evaluate the dissipation and mixing length scales as
 (and note that here we use numerical indexing):
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=1.00\textwidth]{Fig_mixing_length}
-    \caption{
-      \protect\label{fig:mixing_length}
-      Illustration of the mixing length computation.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{ZDF_mixing_length}
+  \caption[Mixing length computation]{Illustration of the mixing length computation}
+  \label{fig:ZDF_mixing_length}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\[
-  % \label{eq:tke_mxl2}
+\[
+  % \label{eq:ZDF_tke_mxl2}
   \begin{aligned}
     l_{up\ \ }^{(k)} &= \min \left(  l^{(k)} \ , \ l_{up}^{(k+1)} + e_{3t}^{(k)}\ \ \ \;  \right)
@@ -254,11 +262,11 @@
   \end{aligned}
 \]
-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:
-$ l_k=  l_\epsilon = \min \left(\ l_{up} \;,\;  l_{dwn}\ \right)$, while in the \np{nn\_mxl}\forcode{ = 3} case,
-the dissipation and mixing turbulent length scales are give as in \citet{Gaspar1990}:
-\[
-  % \label{eq:tke_mxl_gaspar}
+where $l^{(k)}$ is computed using \autoref{eq:ZDF_tke_mxl0_1}, \ie\ $l^{(k)} = \sqrt {2 {\bar e}^{(k)} / {N^2}^{(k)} }$.
+
+In the \np[=2]{nn_mxl}{nn\_mxl} case, the dissipation and mixing length scales take the same value:
+$ l_k=  l_\epsilon = \min \left(\ l_{up} \;,\;  l_{dwn}\ \right)$, while in the \np[=3]{nn_mxl}{nn\_mxl} case,
+the dissipation and mixing turbulent length scales are give as in \citet{gaspar.gregoris.ea_JGR90}:
+\[
+  % \label{eq:ZDF_tke_mxl_gaspar}
   \begin{aligned}
     & l_k          = \sqrt{\  l_{up} \ \ l_{dwn}\ }  	\\
@@ -267,28 +275,28 @@
 \]
 
-At the ocean surface, a non zero length scale is set through the  \np{rn\_mxl0} namelist parameter.
+At the ocean surface, a non zero length scale is set through the  \np{rn_mxl0}{rn\_mxl0} namelist parameter.
 Usually the surface scale is given by $l_o = \kappa \,z_o$ where $\kappa = 0.4$ is von Karman's constant and
 $z_o$ the roughness parameter of the surface.
-Assuming $z_o=0.1$~m \citep{Craig_Banner_JPO94} leads to a 0.04~m, the default value of \np{rn\_mxl0}.
+Assuming $z_o=0.1$~m \citep{craig.banner_JPO94} leads to a 0.04~m, the default value of \np{rn_mxl0}{rn\_mxl0}.
 In the ocean interior a minimum length scale is set to recover the molecular viscosity when
 $\bar{e}$ reach its minimum value ($1.10^{-6}= C_k\, l_{min} \,\sqrt{\bar{e}_{min}}$ ).
 
+%% =================================================================================================
 \subsubsection{Surface wave breaking parameterization}
-%-----------------------------------------------------------------------%
-
-Following \citet{Mellor_Blumberg_JPO04}, the TKE turbulence closure model has been modified to
+
+Following \citet{mellor.blumberg_JPO04}, the TKE turbulence closure model has been modified to
 include the effect of surface wave breaking energetics.
 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 formulea and is not discussed here. 
-
-Following \citet{Craig_Banner_JPO94}, the boundary condition on surface TKE value is :
+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.
+
+Following \citet{craig.banner_JPO94}, the boundary condition on surface TKE value is :
 \begin{equation}
   \label{eq:ZDF_Esbc}
   \bar{e}_o = \frac{1}{2}\,\left(  15.8\,\alpha_{CB} \right)^{2/3} \,\frac{|\tau|}{\rho_o}
 \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}. 
+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}.
 The boundary condition on the turbulent length scale follows the Charnock's relation:
 \begin{equation}
@@ -297,17 +305,17 @@
 \end{equation}
 where $\kappa=0.40$ is the von Karman constant, and $\beta$ is the Charnock's constant.
-\citet{Mellor_Blumberg_JPO04} suggest $\beta = 2.10^{5}$ the value chosen by
-\citet{Stacey_JPO99} citing observation evidence, and
+\citet{mellor.blumberg_JPO04} suggest $\beta = 2.10^{5}$ the value chosen by
+\citet{stacey_JPO99} citing observation evidence, and
 $\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}{rn\_ebb} namelist parameter, setting \np[=67.83]{rn_ebb}{rn\_ebb} corresponds
 to $\alpha_{CB} = 100$.
-Further setting  \np{ln\_mxl0} to true applies \autoref{eq:ZDF_Lsbc} as surface boundary condition on length scale,
+Further setting  \np[=.true.]{ln_mxl0}{ln\_mxl0},  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
+Note that a minimal threshold of \np{rn_emin0}{rn\_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters) is applied on the
 surface $\bar{e}$ value.
 
+%% =================================================================================================
 \subsubsection{Langmuir cells}
-%--------------------------------------%
 
 Langmuir circulations (LC) can be described as ordered large-scale vertical motions in
@@ -315,24 +323,24 @@
 Although LC have nothing to do with convection, the circulation pattern is rather similar to
 so-called convective rolls in the atmospheric boundary layer.
-The detailed physics behind LC is described in, for example, \citet{Craik_Leibovich_JFM76}.
+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
-\citep{Axell_JGR02} for a $k-\epsilon$ turbulent closure.
+\citep{axell_JGR02} for a $k-\epsilon$ turbulent closure.
 The parameterization, tuned against large-eddy simulation, includes the whole effect of LC in
-an extra source terms 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 namtke namelist.
- 
-By making an analogy with the characteristic convective velocity scale (\eg, \citet{D'Alessio_al_JPO98}),
-$P_{LC}$ is assumed to be : 
+an extra source term of TKE, $P_{LC}$.
+The presence of $P_{LC}$ in \autoref{eq:ZDF_tke_e}, the TKE equation, is controlled by setting \np{ln_lc}{ln\_lc} to
+\forcode{.true.} in the \nam{zdf_tke}{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}(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 
-\footnote{Following \citet{Li_Garrett_JMR93}, the surface Stoke drift velocity may be expressed as
+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}|$.
   Assuming an air density of $\rho_a=1.22 \,Kg/m^3$ and a drag coefficient of
@@ -341,5 +349,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 :
 \[
@@ -350,29 +358,29 @@
   \end{cases}
 \]
-where $c_{LC} = 0.15$ has been chosen by \citep{Axell_JGR02} as a good compromise to fit LES data.
+where $c_{LC} = 0.15$ has been chosen by \citep{axell_JGR02} as a good compromise to fit LES data.
 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}. 
+The value of $c_{LC}$ is set through the \np{rn_lc}{rn\_lc} namelist parameter,
+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 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 
+$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
 \[
 - \int_{-H_{LC}}^0 { N^2\;z  \;dz} = \frac{1}{2} u_s^2
 \]
 
+%% =================================================================================================
 \subsubsection{Mixing just below the mixed layer}
-%--------------------------------------------------------------%
 
 Vertical mixing parameterizations commonly used in ocean general circulation models tend to
 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_2014}. 
-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[=1]{nn_etau}{nn\_etau}),
 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,
@@ -383,58 +391,391 @@
 \end{equation}
 where $z$ is the depth, $e_s$ is TKE surface boundary condition, $f_r$ is the fraction of the surface TKE that
-penetrate in the ocean, $h_\tau$ is a vertical mixing length scale that controls exponential shape of
+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$, that is 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
+(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}{rn\_efr} namelist parameter.
+The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np[=0]{nn_etau}{nn\_etau}) 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}). 
-
-Note that two other option existe, \np{nn\_etau}\forcode{ = 2..3}.
+(\np[=1]{nn_etau}{nn\_etau}).
+
+Note that two other option exist, \np[=2, 3]{nn_etau}{nn\_etau}.
 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 penetrate 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. 
-
-% 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).
+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}{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).
+
+%% =================================================================================================
+\subsection[GLS: Generic Length Scale (\forcode{ln_zdfgls})]{GLS: Generic Length Scale (\protect\np{ln_zdfgls}{ln\_zdfgls})}
+\label{subsec:ZDF_gls}
+
+\begin{listing}
+  \nlst{namzdf_gls}
+  \caption{\forcode{&namzdf_gls}}
+  \label{lst:namzdf_gls}
+\end{listing}
+
+The Generic Length Scale (GLS) scheme is a turbulent closure scheme based on two prognostic equations:
+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}$,
+where the triplet $(p, m, n)$ value given in Tab.\autoref{tab:ZDF_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}).
+The GLS scheme is given by the following set of equations:
+\begin{equation}
+  \label{eq:ZDF_gls_e}
+  \frac{\partial \bar{e}}{\partial t} =
+  \frac{K_m}{\sigma_e e_3 }\;\left[ {\left( \frac{\partial u}{\partial k} \right)^2
+      +\left( \frac{\partial v}{\partial k} \right)^2} \right]
+  -K_\rho \,N^2
+  +\frac{1}{e_3}\,\frac{\partial}{\partial k} \left[ \frac{K_m}{e_3}\,\frac{\partial \bar{e}}{\partial k} \right]
+  - \epsilon
+\end{equation}
+
+\[
+  % \label{eq:ZDF_gls_psi}
+  \begin{split}
+    \frac{\partial \psi}{\partial t} =& \frac{\psi}{\bar{e}} \left\{
+      \frac{C_1\,K_m}{\sigma_{\psi} {e_3}}\;\left[ {\left( \frac{\partial u}{\partial k} \right)^2
+          +\left( \frac{\partial v}{\partial k} \right)^2} \right]
+      - C_3 \,K_\rho\,N^2   - C_2 \,\epsilon \,Fw   \right\}             \\
+    &+\frac{1}{e_3}  \;\frac{\partial }{\partial k}\left[ {\frac{K_m}{e_3 }
+        \;\frac{\partial \psi}{\partial k}} \right]\;
+  \end{split}
+\]
+
+\[
+  % \label{eq:ZDF_gls_kz}
+  \begin{split}
+    K_m    &= C_{\mu} \ \sqrt {\bar{e}} \ l         \\
+    K_\rho &= C_{\mu'}\ \sqrt {\bar{e}} \ l
+  \end{split}
+\]
+
+\[
+  % \label{eq:ZDF_gls_eps}
+  {\epsilon} = C_{0\mu} \,\frac{\bar {e}^{3/2}}{l} \;
+\]
+where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}) and
+$\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:ZDF_GLS}).
+They are made available through the \np{nn_clo}{nn\_clo} namelist parameter.
+
+\begin{table}[htbp]
+  \centering
+  % \begin{tabular}{cp{70pt}cp{70pt}cp{70pt}cp{70pt}cp{70pt}cp{70pt}c}
+  \begin{tabular}{ccccc}
+    &   $k-kl$   & $k-\epsilon$ & $k-\omega$ &   generic   \\
+    % & \citep{mellor.yamada_RG82} &  \citep{rodi_JGR87}       & \citep{wilcox_AJ88} &                 \\
+    \hline
+    \hline
+    \np{nn_clo}{nn\_clo}     & \textbf{0} &   \textbf{1}  &   \textbf{2}   &    \textbf{3}   \\
+    \hline
+    $( p , n , m )$	       &   ( 0 , 1 , 1 )   & ( 3 , 1.5 , -1 )   & ( -1 , 0.5 , -1 )    &  ( 2 , 1 , -0.67 )  \\
+    $\sigma_k$      &    2.44         &     1.              &      2.                &      0.8          \\
+    $\sigma_\psi$  &    2.44         &     1.3            &      2.                 &       1.07       \\
+    $C_1$              &      0.9         &     1.44          &      0.555          &       1.           \\
+    $C_2$              &      0.5         &     1.92          &      0.833          &       1.22       \\
+    $C_3$              &      1.           &     1.              &      1.                &       1.           \\
+    $F_{wall}$        &      Yes        &       --             &     --                  &      --          \\
+    \hline
+    \hline
+  \end{tabular}
+  \caption[Set of predefined GLS parameters or equivalently predefined turbulence models available]{
+    Set of predefined GLS parameters, or equivalently predefined turbulence models available with
+    \protect\np[=.true.]{ln_zdfgls}{ln\_zdfgls} and controlled by
+    the \protect\np{nn_clos}{nn\_clos} namelist variable in \protect\nam{zdf_gls}{zdf\_gls}.}
+  \label{tab:ZDF_GLS}
+\end{table}
+
+In the Mellor-Yamada model, the negativity of $n$ allows to use a wall function to force the convergence of
+the mixing length towards $\kappa z_b$ ($\kappa$ is the Von Karman constant and $z_b$ the rugosity length scale) value near physical boundaries
+(logarithmic boundary layer law).
+$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[=0, 3]{nn_stab_func}{nn\_stab\_func}, resp.).
+The value of $C_{0\mu}$ depends on the choice of the stability function.
+
+The surface and bottom boundary condition on both $\bar{e}$ and $\psi$ can be calculated thanks to Dirichlet or
+Neumann condition through \np{nn_bc_surf}{nn\_bc\_surf} and \np{nn_bc_bot}{nn\_bc\_bot}, resp.
+As for TKE closure, the wave effect on the mixing is considered when
+\np[ > 0.]{rn_crban}{rn\_crban} \citep{craig.banner_JPO94, mellor.blumberg_JPO04}.
+The \np{rn_crban}{rn\_crban} namelist parameter is $\alpha_{CB}$ in \autoref{eq:ZDF_Esbc} and
+\np{rn_charn}{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
+almost all authors apply a clipping of the length scale as an \textit{ad hoc} remedy.
+With this clipping, the maximum permissible length scale is determined by $l_{max} = c_{lim} \sqrt{2\bar{e}}/ N$.
+A value of $c_{lim} = 0.53$ is often used \citep{galperin.kantha.ea_JAS88}.
+\cite{umlauf.burchard_CSR05} show that the value of the clipping factor is of crucial importance for
+the entrainment depth predicted in stably stratified situations,
+and that its value has to be chosen in accordance with the algebraic model for the turbulent fluxes.
+The clipping is only activated if \np[=.true.]{ln_length_lim}{ln\_length\_lim},
+and the $c_{lim}$ is set to the \np{rn_clim_galp}{rn\_clim\_galp} value.
+
+The time and space discretization of the GLS equations follows the same energetic consideration as for
+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.
 
 % -------------------------------------------------------------------------------------------------------------
-%        TKE discretization considerations
+%        OSM OSMOSIS BL Scheme
 % -------------------------------------------------------------------------------------------------------------
-\subsection{TKE discretization considerations (\protect\key{zdftke})}
-\label{subsec:ZDF_tke_ene}
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+\subsection[OSM: OSMOSIS boundary layer scheme (\forcode{ln_zdfosm = .true.})]
+{OSM: OSMOSIS boundary layer scheme (\protect\np{ln_zdfosm}{ln\_zdfosm})}
+\label{subsec:ZDF_osm}
+
+\begin{listing}
+  \nlst{namzdf_osm}
+  \caption{\forcode{&namzdf_osm}}
+  \label{lst:namzdf_osm}
+\end{listing}
+
+%--------------------------------------------------------------------------------------------------------------
+\paragraph{Namelist choices}
+Most of the namelist options refer to how to specify the Stokes
+surface drift and penetration depth. There are three options:
+\begin{description}
+  \item \protect\np[=0]{nn_osm_wave}{nn\_osm\_wave} Default value in \texttt{namelist\_ref}. In this case the Stokes drift is
+      assumed to be parallel to the surface wind stress, with
+      magnitude consistent with a constant turbulent Langmuir number
+    $\mathrm{La}_t=$ \protect\np{rn_m_la} {rn\_m\_la} i.e.\
+    $u_{s0}=\tau/(\mathrm{La}_t^2\rho_0)$.  Default value of
+    \protect\np{rn_m_la}{rn\_m\_la} is 0.3. The Stokes penetration
+      depth $\delta = $ \protect\np{rn_osm_dstokes}{rn\_osm\_dstokes}; this has default value
+      of 5~m.
+
+  \item \protect\np[=1]{nn_osm_wave}{nn\_osm\_wave} In this case the Stokes drift is
+      assumed to be parallel to the surface wind stress, with
+      magnitude as in the classical Pierson-Moskowitz wind-sea
+      spectrum.  Significant wave height and
+      wave-mean period taken from this spectrum are used to calculate the Stokes penetration
+      depth, following the approach set out in  \citet{breivik.janssen.ea_JPO14}.
+
+    \item \protect\np[=2]{nn_osm_wave}{nn\_osm\_wave} In this case the Stokes drift is
+      taken from  ECMWF wave model output, though only the component parallel
+      to the wind stress is retained. Significant wave height and
+      wave-mean period from ECMWF wave model output are used to calculate the Stokes penetration
+      depth, again following \citet{breivik.janssen.ea_JPO14}.
+
+    \end{description}
+
+    Others refer to the treatment of diffusion and viscosity beneath
+    the surface boundary layer:
+\begin{description}
+   \item \protect\np{ln_kpprimix} {ln\_kpprimix}  Default is \np{.true.}. Switches on KPP-style Ri \#-dependent
+     mixing below the surface boundary layer. If this is set
+     \texttt{.true.}  the following variable settings are honoured:
+    \item \protect\np{rn_riinfty}{rn\_riinfty} Critical value of local Ri \# below which
+      shear instability increases vertical mixing from background value.
+    \item \protect\np{rn_difri} {rn\_difri} Maximum value of Ri \#-dependent mixing at $\mathrm{Ri}=0$.
+    \item \protect\np{ln_convmix}{ln\_convmix} If \texttt{.true.} then, where water column is unstable, specify
+       diffusivity equal to \protect\np{rn_dif_conv}{rn\_dif\_conv} (default value is 1 m~s$^{-2}$).
+ \end{description}
+ Diagnostic output is controlled by:
+  \begin{description}
+    \item \protect\np{ln_dia_osm}{ln\_dia\_osm} Default is \np{.false.}; allows XIOS output of OSMOSIS internal fields.
+  \end{description}
+Obsolete namelist parameters include:
+\begin{description}
+   \item \protect\np{ln_use_osm_la}\np{ln\_use\_osm\_la} With \protect\np[=0]{nn_osm_wave}{nn\_osm\_wave},
+      \protect\np{rn_osm_dstokes} {rn\_osm\_dstokes} is always used to specify the Stokes
+      penetration depth.
+   \item \protect\np{nn_ave} {nn\_ave} Choice of averaging method for KPP-style Ri \#
+      mixing. Not taken account of.
+   \item \protect\np{rn_osm_hbl0} {rn\_osm\_hbl0} Depth of initial boundary layer is now set
+     by a density criterion similar to that used in calculating \emph{hmlp} (output as \texttt{mldr10\_1}) in \mdl{zdfmxl}.
+\end{description}
+
+\subsubsection{Summary}
+Much of the time the turbulent motions in the ocean surface boundary
+layer (OSBL) are not given by
+classical shear turbulence. Instead they are in a regime known as
+`Langmuir turbulence',  dominated by an
+interaction between the currents and the Stokes drift of the surface waves \citep[e.g.][]{mcwilliams.ea_JFM97}.
+This regime is characterised by strong vertical turbulent motion, and appears when the surface Stokes drift $u_{s0}$ is much greater than the friction velocity $u_{\ast}$. More specifically Langmuir turbulence is thought to be crucial where the turbulent Langmuir number $\mathrm{La}_{t}=(u_{\ast}/u_{s0}) > 0.4$.
+
+The OSMOSIS model is fundamentally based on results of Large Eddy
+Simulations (LES) of Langmuir turbulence and aims to fully describe
+this Langmuir regime. The description in this section is of necessity incomplete and further details are available in Grant. A (2019); in prep.
+
+The OSMOSIS turbulent closure scheme is a similarity-scale scheme in
+the same spirit as the K-profile
+parameterization (KPP) scheme of \citet{large.ea_RG97}.
+A specified shape of diffusivity, scaled by the (OSBL) depth
+$h_{\mathrm{BL}}$ and a turbulent velocity scale, is imposed throughout the
+boundary layer
+$-h_{\mathrm{BL}}<z<\eta$. The turbulent closure model
+also includes fluxes of tracers and momentum that are``non-local'' (independent of the local property gradient).
+
+Rather than the OSBL
+depth being diagnosed in terms of a bulk Richardson number criterion,
+as in KPP, it is set by a prognostic equation that is informed by
+energy budget considerations reminiscent of the classical mixed layer
+models of \citet{kraus.turner_tellus67}.
+The model also includes an explicit parametrization of the structure
+of the pycnocline (the stratified region at the bottom of the OSBL).
+
+Presently, mixing below the OSBL is handled by the Richardson
+number-dependent mixing scheme used in \citet{large.ea_RG97}.
+
+Convective parameterizations such as described in \ref{sec:ZDF_conv}
+below should not be used with the OSMOSIS-OBL model: instabilities
+within the OSBL are part of the model, while instabilities below the
+ML are handled by the Ri \# dependent scheme.
+
+\subsubsection{Depth and velocity scales}
+The model supposes a boundary layer of thickness $h_{\mathrm{bl}}$ enclosing a well-mixed layer of thickness $h_{\mathrm{ml}}$ and a relatively thin pycnocline at the base of thickness $\Delta h$; Fig.~\ref{fig: OSBL_structure} shows typical (a) buoyancy structure and (b) turbulent buoyancy flux profile for the unstable boundary layer (losing buoyancy at the surface; e.g.\ cooling).
 \begin{figure}[!t]
   \begin{center}
-    \includegraphics[width=1.00\textwidth]{Fig_ZDF_TKE_time_scheme}
+    %\includegraphics[width=0.7\textwidth]{ZDF_OSM_structure_of_OSBL}
     \caption{
-      \protect\label{fig:TKE_time_scheme}
-      Illustration of the TKE time integration and its links to the momentum and tracer time integration.
+      \protect\label{fig: OSBL_structure}
+     The structure of the entraining  boundary layer. (a) Mean buoyancy profile. (b) Profile of the buoyancy flux.
     }
-  \end{center}  
+  \end{center}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+The pycnocline in the OSMOSIS scheme is assumed to have a finite thickness, and may include a number of model levels. This means that the OSMOSIS scheme must parametrize both the thickness of the pycnocline, and the turbulent fluxes within the pycnocline.
+
+Consideration of the power input by wind acting on the Stokes drift suggests that the Langmuir turbulence has velocity scale:
+\begin{equation}\label{eq:w_La}
+w_{*L}= \left(u_*^2 u_{s\,0}\right)^{1/3};
+\end{equation}
+but at times the Stokes drift may be weak due to e.g.\ ice cover, short fetch, misalignment with the surface stress, etc.\ so  a composite velocity scale is assumed for the stable (warming) boundary layer:
+\begin{equation}\label{eq:composite-nu}
+  \nu_{\ast}= \left\{ u_*^3 \left[1-\exp(-.5 \mathrm{La}_t^2)\right]+w_{*L}^3\right\}^{1/3}.
+\end{equation}
+For the unstable boundary layer this is merged with the standard convective velocity scale $w_{*C}=\left(\overline{w^\prime b^\prime}_0 \,h_\mathrm{ml}\right)^{1/3}$, where $\overline{w^\prime b^\prime}_0$ is the upwards surface buoyancy flux, to give:
+\begin{equation}\label{eq:vel-scale-unstable}
+\omega_* = \left(\nu_*^3 + 0.5 w_{*C}^3\right)^{1/3}.
+\end{equation}
+
+\subsubsection{The flux gradient model}
+The flux-gradient relationships used in the OSMOSIS scheme take the form:
+%
+\begin{equation}\label{eq:flux-grad-gen}
+\overline{w^\prime\chi^\prime}=-K\frac{\partial\overline{\chi}}{\partial z} + N_{\chi,s} +N_{\chi,b} +N_{\chi,t},
+\end{equation}
+%
+where $\chi$ is a general variable and $N_{\chi,s}, N_{\chi,b} \mathrm{and} N_{\chi,t}$  are the non-gradient terms, and represent the effects of the different terms in the turbulent flux-budget on the transport of $\chi$. $N_{\chi,s}$ represents the effects that the Stokes shear has on the transport of $\chi$, $N_{\chi,b}$  the effect of buoyancy, and $N_{\chi,t}$ the effect of the turbulent transport.  The same general form for the flux-gradient relationship is used to parametrize the transports of momentum, heat and salinity.
+
+In terms of the non-dimensionalized depth variables
+%
+\begin{equation}\label{eq:sigma}
+\sigma_{\mathrm{ml}}= -z/h_{\mathrm{ml}}; \;\sigma_{\mathrm{bl}}= -z/h_{\mathrm{bl}},
+\end{equation}
+%
+in unstable conditions the eddy diffusivity ($K_d$) and eddy viscosity ($K_\nu$) profiles are parametrized as:
+%
+\begin{align}\label{eq:diff-unstable}
+K_d=&0.8\, \omega_*\, h_{\mathrm{ml}} \, \sigma_{\mathrm{ml}} \left(1-\beta_d \sigma_{\mathrm{ml}}\right)^{3/2}
+\\\label{eq:visc-unstable}
+K_\nu =& 0.3\, \omega_* \,h_{\mathrm{ml}}\, \sigma_{\mathrm{ml}} \left(1-\beta_\nu \sigma_{\mathrm{ml}}\right)\left(1-\tfrac{1}{2}\sigma_{\mathrm{ml}}^2\right)
+\end{align}
+%
+where $\beta_d$ and $\beta_\nu$ are parameters that are determined by matching Eqs \ref{eq:diff-unstable} and \ref{eq:visc-unstable} to the eddy diffusivity and viscosity at the base of the well-mixed layer, given by
+%
+\begin{equation}\label{eq:diff-wml-base}
+K_{d,\mathrm{ml}}=K_{\nu,\mathrm{ml}}=\,0.16\,\omega_* \Delta h.
+\end{equation}
+%
+For stable conditions the eddy diffusivity/viscosity profiles are given by:
+%
+\begin{align}\label{diff-stable}
+K_d= & 0.75\,\, \nu_*\, h_{\mathrm{ml}}\,\,  \exp\left[-2.8 \left(h_{\mathrm{bl}}/L_L\right)^2\right]\sigma_{\mathrm{ml}} \left(1-\sigma_{\mathrm{ml}}\right)^{3/2} \\\label{eq:visc-stable}
+K_\nu = & 0.375\,\,  \nu_*\, h_{\mathrm{ml}} \,\, \exp\left[-2.8 \left(h_{\mathrm{bl}}/L_L\right)^2\right] \sigma_{\mathrm{ml}} \left(1-\sigma_{\mathrm{ml}}\right)\left(1-\tfrac{1}{2}\sigma_{\mathrm{ml}}^2\right).
+\end{align}
+%
+The shape of the eddy viscosity and diffusivity profiles is the same as the shape in the unstable OSBL. The eddy diffusivity/viscosity depends on the stability parameter $h_{\mathrm{bl}}/{L_L}$ where $ L_L$ is analogous to the Obukhov length, but for Langmuir turbulence:
+\begin{equation}\label{eq:L_L}
+  L_L=-w_{*L}^3/\left<\overline{w^\prime b^\prime}\right>_L,
+\end{equation}
+with the mean turbulent buoyancy flux averaged over the boundary layer given in terms of its surface value $\overline{w^\prime b^\prime}_0$ and (downwards) )solar irradiance $I(z)$ by
+\begin{equation} \label{eq:stable-av-buoy-flux}
+\left<\overline{w^\prime b^\prime}\right>_L = \tfrac{1}{2} {\overline{w^\prime b^\prime}}_0-g\alpha_E\left[\tfrac{1}{2}(I(0)+I(-h))-\left<I\right>\right].
+\end{equation}
+%
+In unstable conditions the eddy diffusivity and viscosity depend on stability through the velocity scale $\omega_*$, which depends on the two velocity scales $\nu_*$ and $w_{*C}$.
+
+Details of the non-gradient terms in \eqref{eq:flux-grad-gen} and of the fluxes within the pycnocline $-h_{\mathrm{bl}}<z<h_{\mathrm{ml}}$ can be found in Grant (2019).
+
+\subsubsection{Evolution of the boundary layer depth}
+
+The prognostic equation for the depth of the neutral/unstable boundary layer is given by \citep{grant+etal18},
+
+\begin{equation} \label{eq:dhdt-unstable}
+%\frac{\partial h_\mathrm{bl}}{\partial t} + \mathbf{U}_b\cdot\nabla h_\mathrm{bl}= W_b - \frac{{\overline{w^\prime b^\prime}}_\mathrm{ent}}{\Delta B_\mathrm{bl}}
+\frac{\partial h_\mathrm{bl}}{\partial t} = W_b - \frac{{\overline{w^\prime b^\prime}}_\mathrm{ent}}{\Delta B_\mathrm{bl}}
+\end{equation}
+where $h_\mathrm{bl}$ is the horizontally-varying depth of the OSBL,
+$\mathbf{U}_b$ and $W_b$ are the mean horizontal and vertical
+velocities at the base of the OSBL, ${\overline{w^\prime
+    b^\prime}}_\mathrm{ent}$ is the buoyancy flux due to entrainment
+and $\Delta B_\mathrm{bl}$ is the difference between the buoyancy
+averaged over the depth of the OSBL (i.e.\ including the ML and
+pycnocline) and the buoyancy just below the base of the OSBL. This
+equation for the case when the pycnocline has a finite thickness,
+based on the potential energy budget of the OSBL, is the leading term
+\citep{grant+etal18} of a generalization of that used in mixed-layer
+models e.g.\ \citet{kraus.turner_tellus67}, in which the thickness of the pycnocline is taken to be zero.
+
+The entrainment flux for the combination of convective and Langmuir turbulence is given by
+\begin{equation} \label{eq:entrain-flux}
+  {\overline{w^\prime b^\prime}}_\mathrm{ent} = -\alpha_{\mathrm{B}} {\overline{w^\prime b^\prime}}_0 - \alpha_{\mathrm{S}} \frac{u_*^3}{h_{\mathrm{ml}}}
+  + G\left(\delta/h_{\mathrm{ml}} \right)\left[\alpha_{\mathrm{S}}e^{-1.5\, \mathrm{La}_t}-\alpha_{\mathrm{L}} \frac{w_{\mathrm{*L}}^3}{h_{\mathrm{ml}}}\right]
+\end{equation}
+where the factor $G\equiv 1 - \mathrm{e}^ {-25\delta/h_{\mathrm{bl}}}(1-4\delta/h_{\mathrm{bl}})$ models the lesser efficiency of Langmuir mixing when the boundary-layer depth is much greater than the Stokes depth, and $\alpha_{\mathrm{B}}$, $\alpha_{S}$  and $\alpha_{\mathrm{L}}$ depend on the ratio of the appropriate eddy turnover time to the inertial timescale $f^{-1}$. Results from the LES suggest $\alpha_{\mathrm{B}}=0.18 F(fh_{\mathrm{bl}}/w_{*C})$, $\alpha_{S}=0.15 F(fh_{\mathrm{bl}}/u_*$  and $\alpha_{\mathrm{L}}=0.035 F(fh_{\mathrm{bl}}/u_{*L})$, where $F(x)\equiv\tanh(x^{-1})^{0.69}$.
+
+For the stable boundary layer, the equation for the depth of the OSBL is:
+
+\begin{equation}\label{eq:dhdt-stable}
+\max\left(\Delta B_{bl},\frac{w_{*L}^2}{h_\mathrm{bl}}\right)\frac{\partial h_\mathrm{bl}}{\partial t} = \left(0.06 + 0.52\,\frac{ h_\mathrm{bl}}{L_L}\right) \frac{w_{*L}^3}{h_\mathrm{bl}} +\left<\overline{w^\prime b^\prime}\right>_L.
+\end{equation}
+
+Equation. \ref{eq:dhdt-unstable} always leads to the depth of the entraining OSBL increasing (ignoring the effect of the mean vertical motion), but the change in the thickness of the stable OSBL given by Eq. \ref{eq:dhdt-stable} can be positive or negative, depending on the magnitudes of $\left<\overline{w^\prime b^\prime}\right>_L$ and $h_\mathrm{bl}/L_L$. The rate at which the depth of the OSBL can decrease is limited by choosing an effective buoyancy $w_{*L}^2/h_\mathrm{bl}$, in place of $\Delta B_{bl}$ which will be $\approx 0$ for the collapsing OSBL.
+
+
+%% =================================================================================================
+\subsection[ Discrete energy conservation for TKE and GLS schemes]{Discrete energy conservation for TKE and GLS schemes}
+\label{subsec:ZDF_tke_ene}
+
+\begin{figure}[!t]
+  \centering
+  \includegraphics[width=0.66\textwidth]{ZDF_TKE_time_scheme}
+  \caption[Subgrid kinetic energy integration in GLS and TKE schemes]{
+    Illustration of the subgrid kinetic energy integration in GLS and TKE schemes and
+    its links to the momentum and tracer time integration.}
+  \label{fig:ZDF_TKE_time_scheme}
+\end{figure}
 
 The production of turbulence by vertical shear (the first term of the right hand side of
-\autoref{eq:zdftke_e}) should balance the loss of kinetic energy associated with the vertical momentum diffusion
-(first line in \autoref{eq:PE_zdf}).
-To do so a special care have to be taken for both the time and space discretization of
-the TKE equation \citep{Burchard_OM02,Marsaleix_al_OM08}.
-
-Let us first address the time stepping issue. \autoref{fig:TKE_time_scheme} shows how
+\autoref{eq:ZDF_tke_e}) and  \autoref{eq:ZDF_gls_e}) should balance the loss of kinetic energy associated with the vertical momentum diffusion
+(first line in \autoref{eq:MB_zdf}).
+To do so a special care has to be taken for both the time and space discretization of
+the kinetic energy equation \citep{burchard_OM02,marsaleix.auclair.ea_OM08}.
+
+Let us first address the time stepping issue. \autoref{fig:ZDF_TKE_time_scheme} shows how
 the two-level Leap-Frog time stepping of the momentum and tracer equations interplays with
-the one-level forward time stepping of TKE equation.
+the one-level forward time stepping of the equation for $\bar{e}$.
 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}
+  \label{eq:ZDF_energ1}
   \begin{split}
     \int_{-H}^{\eta}  u^t \,\partial_z &\left( {K_m}^t \,(\partial_z u)^{t+\rdt}  \right) \,dz   \\
@@ -444,11 +785,11 @@
 \end{equation}
 Here, the vertical diffusion of momentum is discretized backward in time with a coefficient, $K_m$,
-known at time $t$ (\autoref{fig:TKE_time_scheme}), as it is required when using the TKE scheme
-(see \autoref{sec:STP_forward_imp}).
-The first term of the right hand side of \autoref{eq:energ1} represents the kinetic energy transfer at
+known at time $t$ (\autoref{fig:ZDF_TKE_time_scheme}), as it is required when using the TKE scheme
+(see \autoref{sec:TD_forward_imp}).
+The first term of the right hand side of \autoref{eq:ZDF_energ1} represents the kinetic energy transfer at
 the surface (atmospheric forcing) and at the bottom (friction effect).
 The second term is always negative.
 It is the dissipation rate of kinetic energy, and thus minus the shear production rate of $\bar{e}$.
-\autoref{eq:energ1} implies that, to be energetically consistent,
+\autoref{eq:ZDF_energ1} implies that, to be energetically consistent,
 the production rate of $\bar{e}$ used to compute $(\bar{e})^t$ (and thus ${K_m}^t$) should be expressed as
 ${K_m}^{t-\rdt}\,(\partial_z u)^{t-\rdt} \,(\partial_z u)^t$
@@ -456,10 +797,10 @@
 
 A similar consideration applies on the destruction rate of $\bar{e}$ due to stratification
-(second term of the right hand side of \autoref{eq:zdftke_e}).
+(second term of the right hand side of \autoref{eq:ZDF_tke_e} and \autoref{eq:ZDF_gls_e}).
 This term must balance the input of potential energy resulting from vertical mixing.
-The rate of change of potential energy (in 1D for the demonstration) due vertical mixing is obtained by
-multiplying vertical density diffusion tendency by $g\,z$ and and summing the result vertically:
+The rate of change of potential energy (in 1D for the demonstration) due to vertical mixing is obtained by
+multiplying the vertical density diffusion tendency by $g\,z$ and and summing the result vertically:
 \begin{equation}
-  \label{eq:energ2}
+  \label{eq:ZDF_energ2}
   \begin{split}
     \int_{-H}^{\eta} g\,z\,\partial_z &\left( {K_\rho}^t \,(\partial_k \rho)^{t+\rdt}   \right) \,dz    \\
@@ -470,22 +811,22 @@
   \end{split}
 \end{equation}
-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
+where we use $N^2 = -g \,\partial_k \rho / (e_3 \rho)$.
+The first term of the right hand side of \autoref{eq:ZDF_energ2} is always zero because
 there is no diffusive flux through the ocean surface and bottom).
 The second term is minus the destruction rate of  $\bar{e}$ due to stratification.
-Therefore \autoref{eq:energ1} implies that, to be energetically consistent,
-the product ${K_\rho}^{t-\rdt}\,(N^2)^t$ should be used in \autoref{eq:zdftke_e}, the TKE equation.
+Therefore \autoref{eq:ZDF_energ1} implies that, to be energetically consistent,
+the product ${K_\rho}^{t-\rdt}\,(N^2)^t$ should be used in \autoref{eq:ZDF_tke_e} and  \autoref{eq:ZDF_gls_e}.
 
 Let us now address the space discretization issue.
 The vertical eddy coefficients are defined at $w$-point whereas the horizontal velocity components are in
-the centre of the side faces of a $t$-box in staggered C-grid (\autoref{fig:cell}).
+the centre of the side faces of a $t$-box in staggered C-grid (\autoref{fig:DOM_cell}).
 A space averaging is thus required to obtain the shear TKE production term.
-By redoing the \autoref{eq:energ1} in the 3D case, it can be shown that the product of eddy coefficient by
+By redoing the \autoref{eq:ZDF_energ1} in the 3D case, it can be shown that the product of eddy coefficient by
 the shear at $t$ and $t-\rdt$ must be performed prior to the averaging.
-Furthermore, the possible time variation of $e_3$ (\key{vvl} case) have to be taken into account.
+Furthermore, the time variation of $e_3$ has be taken into account.
 
 The above energetic considerations leads to the following final discrete form for the TKE equation:
 \begin{equation}
-  \label{eq:zdftke_ene}
+  \label{eq:ZDF_tke_ene}
   \begin{split}
     \frac { (\bar{e})^t - (\bar{e})^{t-\rdt} } {\rdt}  \equiv
@@ -504,155 +845,16 @@
   \end{split}
 \end{equation}
-where the last two terms in \autoref{eq:zdftke_ene} (vertical diffusion and Kolmogorov dissipation)
-are time stepped using a backward scheme (see\autoref{sec:STP_forward_imp}).
+where the last two terms in \autoref{eq:ZDF_tke_ene} (vertical diffusion and Kolmogorov dissipation)
+are time stepped using a backward scheme (see\autoref{sec:TD_forward_imp}).
 Note that the Kolmogorov term has been linearized in time in order to render the implicit computation possible.
-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. 
-
-% -------------------------------------------------------------------------------------------------------------
-%        GLS Generic Length Scale Scheme 
-% -------------------------------------------------------------------------------------------------------------
-\subsection{GLS: Generic Length Scale (\protect\key{zdfgls})}
-\label{subsec:ZDF_gls}
-
-%--------------------------------------------namzdf_gls---------------------------------------------------------
-
-\nlst{namzdf_gls}
-%--------------------------------------------------------------------------------------------------------------
-
-The Generic Length Scale (GLS) scheme is a turbulent closure scheme based on two prognostic equations:
-one for the turbulent kinetic energy $\bar {e}$, and another for the generic length scale,
-$\psi$ \citep{Umlauf_Burchard_JMS03, Umlauf_Burchard_CSR05}.
-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_1982}, $k$-$\epsilon$ \citep{Rodi_1987},
-$k$-$\omega$ \citep{Wilcox_1988} among others \citep{Umlauf_Burchard_JMS03,Kantha_Carniel_CSR05}). 
-The GLS scheme is given by the following set of equations:
-\begin{equation}
-  \label{eq:zdfgls_e}
-  \frac{\partial \bar{e}}{\partial t} =
-  \frac{K_m}{\sigma_e e_3 }\;\left[ {\left( \frac{\partial u}{\partial k} \right)^2
-      +\left( \frac{\partial v}{\partial k} \right)^2} \right]
-  -K_\rho \,N^2
-  +\frac{1}{e_3}\,\frac{\partial}{\partial k} \left[ \frac{K_m}{e_3}\,\frac{\partial \bar{e}}{\partial k} \right]
-  - \epsilon
-\end{equation}
-
-\[
-  % \label{eq:zdfgls_psi}
-  \begin{split}
-    \frac{\partial \psi}{\partial t} =& \frac{\psi}{\bar{e}} \left\{
-      \frac{C_1\,K_m}{\sigma_{\psi} {e_3}}\;\left[ {\left( \frac{\partial u}{\partial k} \right)^2
-          +\left( \frac{\partial v}{\partial k} \right)^2} \right]
-      - C_3 \,K_\rho\,N^2   - C_2 \,\epsilon \,Fw   \right\}             \\
-    &+\frac{1}{e_3}  \;\frac{\partial }{\partial k}\left[ {\frac{K_m}{e_3 }
-        \;\frac{\partial \psi}{\partial k}} \right]\;
-  \end{split}
-\]
-
-\[
-  % \label{eq:zdfgls_kz}
-  \begin{split}
-    K_m    &= C_{\mu} \ \sqrt {\bar{e}} \ l         \\
-    K_\rho &= C_{\mu'}\ \sqrt {\bar{e}} \ l
-  \end{split}
-\]
-
-\[
-  % \label{eq:zdfgls_eps}
-  {\epsilon} = C_{0\mu} \,\frac{\bar {e}^{3/2}}{l} \;
-\]
-where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}) and
-$\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 (Tab.\autoref{tab:GLS}).
-They are made available through the \np{nn\_clo} namelist parameter. 
-
-%--------------------------------------------------TABLE--------------------------------------------------
-\begin{table}[htbp]
-  \begin{center}
-    % \begin{tabular}{cp{70pt}cp{70pt}cp{70pt}cp{70pt}cp{70pt}cp{70pt}c}
-    \begin{tabular}{ccccc}
-      &   $k-kl$   & $k-\epsilon$ & $k-\omega$ &   generic   \\
-      % & \citep{Mellor_Yamada_1982} &  \citep{Rodi_1987}       & \citep{Wilcox_1988} &                 \\
-      \hline
-      \hline
-      \np{nn\_clo}     & \textbf{0} &   \textbf{1}  &   \textbf{2}   &    \textbf{3}   \\
-      \hline
-      $( p , n , m )$	       &   ( 0 , 1 , 1 )   & ( 3 , 1.5 , -1 )   & ( -1 , 0.5 , -1 )    &  ( 2 , 1 , -0.67 )  \\
-      $\sigma_k$      &    2.44         &     1.              &      2.                &      0.8          \\
-      $\sigma_\psi$  &    2.44         &     1.3            &      2.                 &       1.07       \\
-      $C_1$              &      0.9         &     1.44          &      0.555          &       1.           \\
-      $C_2$              &      0.5         &     1.92          &      0.833          &       1.22       \\
-      $C_3$              &      1.           &     1.              &      1.                &       1.           \\
-      $F_{wall}$        &      Yes        &       --             &     --                  &      --          \\
-      \hline
-      \hline
-    \end{tabular}
-    \caption{
-      \protect\label{tab:GLS}
-      Set of predefined GLS parameters, or equivalently predefined turbulence models available with
-      \protect\key{zdfgls} and controlled by the \protect\np{nn\_clos} namelist variable in \protect\ngn{namzdf\_gls}.
-    }
-  \end{center}
-\end{table}
-%--------------------------------------------------------------------------------------------------------------
-
-In the Mellor-Yamada model, the negativity of $n$ allows to use a wall function to force the convergence of
-the mixing length towards $K z_b$ ($K$: Kappa and $z_b$: rugosity length) value near physical boundaries
-(logarithmic boundary layer law).
-$C_{\mu}$ and $C_{\mu'}$ are calculated from stability function proposed by \citet{Galperin_al_JAS88},
-or by \citet{Kantha_Clayson_1994} or one of the two functions suggested by \citet{Canuto_2001}
-(\np{nn\_stab\_func}\forcode{ = 0..3}, resp.). 
-The value of $C_{0\mu}$ depends of the choice of the stability function.
-
-The surface and bottom boundary condition on both $\bar{e}$ and $\psi$ can be calculated thanks to Dirichlet or
-Neumann condition through \np{nn\_tkebc\_surf} and \np{nn\_tkebc\_bot}, resp.
-As for TKE closure, the wave effect on the mixing is considered when
-\np{ln\_crban}\forcode{ = .true.} \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}. 
-
-The $\psi$ equation is known to fail in stably stratified flows, and for this reason
-almost all authors apply a clipping of the length scale as an \textit{ad hoc} remedy.
-With this clipping, the maximum permissible length scale is determined by $l_{max} = c_{lim} \sqrt{2\bar{e}}/ N$.
-A value of $c_{lim} = 0.53$ is often used \citep{Galperin_al_JAS88}.
-\cite{Umlauf_Burchard_CSR05} show that the value of the clipping factor is of crucial importance for
-the entrainment depth predicted in stably stratified situations,
-and that its value has to be chosen in accordance with the algebraic model for the turbulent fluxes.
-The clipping is only activated if \np{ln\_length\_lim}\forcode{ = .true.},
-and the $c_{lim}$ is set to the \np{rn\_clim\_galp} value.
-
-The time and space discretization of the GLS equations follows the same energetic consideration as for
-the TKE case described in \autoref{subsec:ZDF_tke_ene} \citep{Burchard_OM02}.
-Examples of performance of the 4 turbulent closure scheme can be found in \citet{Warner_al_OM05}.
-
-% -------------------------------------------------------------------------------------------------------------
-%        OSM OSMOSIS BL Scheme 
-% -------------------------------------------------------------------------------------------------------------
-\subsection{OSM: OSMOSIS boundary layer scheme (\protect\key{zdfosm})}
-\label{subsec:ZDF_osm}
-
-%--------------------------------------------namzdf_osm---------------------------------------------------------
-
-\nlst{namzdf_osm}
-%--------------------------------------------------------------------------------------------------------------
-
-The OSMOSIS turbulent closure scheme is based on......   TBC
-
-% ================================================================
-% Convection
-% ================================================================
+%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:ZDF_tke_ene}.
+%For the latter, it is in fact the ratio $\sqrt{\bar{e}}/l_\epsilon$ which is stored.
+
+%% =================================================================================================
 \section{Convection}
 \label{sec:ZDF_conv}
 
-%--------------------------------------------namzdf--------------------------------------------------------
-
-\nlst{namzdf}
-%--------------------------------------------------------------------------------------------------------------
-
-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.
@@ -661,45 +863,34 @@
 or/and the use of a turbulent closure scheme.
 
-% -------------------------------------------------------------------------------------------------------------
-%       Non-Penetrative Convective Adjustment 
-% -------------------------------------------------------------------------------------------------------------
-\subsection[Non-penetrative convective adjmt (\protect\np{ln\_tranpc}\forcode{ = .true.})]
-				{Non-penetrative convective adjustment (\protect\np{ln\_tranpc}\forcode{ = .true.})}
+%% =================================================================================================
+\subsection[Non-penetrative convective adjustment (\forcode{ln_tranpc})]{Non-penetrative convective adjustment (\protect\np{ln_tranpc}{ln\_tranpc})}
 \label{subsec:ZDF_npc}
 
-%--------------------------------------------namzdf--------------------------------------------------------
-
-\nlst{namzdf}
-%--------------------------------------------------------------------------------------------------------------
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!htb]
-  \begin{center}
-    \includegraphics[width=0.90\textwidth]{Fig_npc}
-    \caption{
-      \protect\label{fig:npc}
-      Example of an unstable density profile treated by the non penetrative convective adjustment algorithm.
-      $1^{st}$ step: the initial profile is checked from the surface to the bottom.
-      It is found to be unstable between levels 3 and 4.
-      They are mixed.
-      The resulting $\rho$ is still larger than $\rho$(5): levels 3 to 5 are mixed.
-      The resulting $\rho$ is still larger than $\rho$(6): levels 3 to 6 are mixed.
-      The $1^{st}$ step ends since the density profile is then stable below the level 3.
-      $2^{nd}$ step: the new $\rho$ profile is checked following the same procedure as in $1^{st}$ step:
-      levels 2 to 5 are mixed.
-      The new density profile is checked.
-      It is found stable: end of algorithm.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{ZDF_npc}
+  \caption[Unstable density profile treated by the non penetrative convective adjustment algorithm]{
+    Example of an unstable density profile treated by
+    the non penetrative convective adjustment algorithm.
+    $1^{st}$ step: the initial profile is checked from the surface to the bottom.
+    It is found to be unstable between levels 3 and 4.
+    They are mixed.
+    The resulting $\rho$ is still larger than $\rho$(5): levels 3 to 5 are mixed.
+    The resulting $\rho$ is still larger than $\rho$(6): levels 3 to 6 are mixed.
+    The $1^{st}$ step ends since the density profile is then stable below the level 3.
+    $2^{nd}$ step: the new $\rho$ profile is checked following the same procedure as in $1^{st}$ step:
+    levels 2 to 5 are mixed.
+    The new density profile is checked.
+    It is found stable: end of algorithm.}
+  \label{fig:ZDF_npc}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-Options are defined through the \ngn{namzdf} 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
+
+Options are defined through the \nam{zdf}{zdf} namelist variables.
+The non-penetrative convective adjustment is used when \np[=.true.]{ln_zdfnpc}{ln\_zdfnpc}.
+It is applied at each \np{nn_npc}{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)
-\citep{Madec_al_JPO91}.
-The associated algorithm is an iterative process used in the following way (\autoref{fig:npc}):
+(\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:ZDF_npc}):
 starting from the top of the ocean, the first instability is found.
 Assume in the following that the instability is located between levels $k$ and $k+1$.
@@ -716,16 +907,16 @@
 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{Killworth1989}:
+This property is of paramount importance as pointed out by \citet{killworth_iprc89}:
 it avoids the existence of permanent and unrealistic static instabilities at the sea surface.
 This non-penetrative convective algorithm has been proved successful in studies of the deep water formation in
-the north-western Mediterranean Sea \citep{Madec_al_JPO91, Madec_al_DAO91, Madec_Crepon_Bk91}.
+the north-western Mediterranean Sea \citep{madec.delecluse.ea_JPO91, madec.chartier.ea_DAO91, madec.crepon_iprc91}.
 
 The current implementation has been modified in order to deal with any non linear equation of seawater
 (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 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.
@@ -733,49 +924,39 @@
 having to recompute the expansion coefficients at each mixing iteration.
 
-% -------------------------------------------------------------------------------------------------------------
-%       Enhanced Vertical Diffusion 
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Enhanced vertical diffusion (\protect\np{ln\_zdfevd}\forcode{ = .true.})}
+%% =================================================================================================
+\subsection[Enhanced vertical diffusion (\forcode{ln_zdfevd})]{Enhanced vertical diffusion (\protect\np{ln_zdfevd}{ln\_zdfevd})}
 \label{subsec:ZDF_evd}
 
-%--------------------------------------------namzdf--------------------------------------------------------
-
-\nlst{namzdf}
-%--------------------------------------------------------------------------------------------------------------
-
-Options are defined through the  \ngn{namzdf} namelist variables.
-The enhanced vertical diffusion parameterisation is used when \np{ln\_zdfevd}\forcode{ = .true.}.
+Options are defined through the  \nam{zdf}{zdf} namelist variables.
+The enhanced vertical diffusion parameterisation is used when \np[=.true.]{ln_zdfevd}{ln\_zdfevd}.
 In this case, the vertical eddy mixing coefficients are assigned very large values
-(a typical value is $10\;m^2s^{-1})$ in regions where the stratification is unstable
-(\ie when $N^2$ the Brunt-Vais\"{a}l\"{a} frequency is negative) \citep{Lazar_PhD97, Lazar_al_JPO99}.
-This is done either on tracers only (\np{nn\_evdm}\forcode{ = 0}) or
-on both momentum and tracers (\np{nn\_evdm}\forcode{ = 1}).
-
-In practice, where $N^2\leq 10^{-12}$, $A_T^{vT}$ and $A_T^{vS}$, and if \np{nn\_evdm}\forcode{ = 1},
+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}.
+This is done either on tracers only (\np[=0]{nn_evdm}{nn\_evdm}) or
+on both momentum and tracers (\np[=1]{nn_evdm}{nn\_evdm}).
+
+In practice, where $N^2\leq 10^{-12}$, $A_T^{vT}$ and $A_T^{vS}$, and if \np[=1]{nn_evdm}{nn\_evdm},
 the four neighbouring $A_u^{vm} \;\mbox{and}\;A_v^{vm}$ values also, are set equal to
-the namelist parameter \np{rn\_avevd}.
+the namelist parameter \np{rn_avevd}{rn\_avevd}.
 A typical value for $rn\_avevd$ is between 1 and $100~m^2.s^{-1}$.
 This parameterisation of convective processes is less time consuming than
 the convective adjustment algorithm presented above when mixing both tracers and
 momentum in the case of static instabilities.
-It requires the use of an implicit time stepping on vertical diffusion terms
-(\ie np{ln\_zdfexp}\forcode{ = .false.}).
 
 Note that the stability test is performed on both \textit{before} and \textit{now} values of $N^2$.
 This removes a potential source of divergence of odd and even time step in
-a leapfrog environment \citep{Leclair_PhD2010} (see \autoref{sec:STP_mLF}).
-
-% -------------------------------------------------------------------------------------------------------------
-%       Turbulent Closure Scheme 
-% -------------------------------------------------------------------------------------------------------------
-\subsection[Turbulent closure scheme (\protect\key{zdf}\{tke,gls,osm\})]{Turbulent Closure Scheme (\protect\key{zdftke}, \protect\key{zdfgls} or \protect\key{zdfosm})}
+a leapfrog environment \citep{leclair_phd10} (see \autoref{sec:TD_mLF}).
+
+%% =================================================================================================
+\subsection[Handling convection with turbulent closure schemes (\forcode{ln_zdf_}\{\forcode{tke,gls,osm}\})]{Handling convection with turbulent closure schemes (\forcode{ln_zdf{tke,gls,osm}})}
 \label{subsec:ZDF_tcs}
 
-The turbulent closure scheme presented in \autoref{subsec:ZDF_tke} and \autoref{subsec:ZDF_gls}
-(\key{zdftke} or \key{zdftke} is defined) in theory solves the problem of statically unstable density profiles.
+The turbulent closure schemes presented in \autoref{subsec:ZDF_tke}, \autoref{subsec:ZDF_gls} and
+\autoref{subsec:ZDF_osm} (\ie\ \np{ln_zdftke}{ln\_zdftke} or \np{ln_zdfgls}{ln\_zdfgls} or \np{ln_zdfosm}{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 the four neighbouring $A_u^{vm} {and}\;A_v^{vm}$
-(up to $1\;m^2s^{-1}$).
+\autoref{eq:ZDF_tke_e} or \autoref{eq:ZDF_gls_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
 the enhanced vertical diffusion parameterisation (\autoref{subsec:ZDF_evd}).
@@ -784,35 +965,30 @@
 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
-defining the turbulent closure CPP key all together.
-
-The KPP turbulent closure scheme already includes enhanced vertical diffusion in the case of convection,
-as governed by the variables $bvsqcon$ and $difcon$ found in \mdl{zdfkpp},
-therefore \np{ln\_zdfevd}\forcode{ = .false.} should be used with the KPP scheme.
+\ie\ setting the \np{ln_zdfnpc}{ln\_zdfnpc} namelist parameter to true and
+defining the turbulent closure (\np{ln_zdftke}{ln\_zdftke} or \np{ln_zdfgls}{ln\_zdfgls} = \forcode{.true.}) all together.
+
+The OSMOSIS turbulent closure scheme already includes enhanced vertical diffusion in the case of convection,
+%as governed by the variables $bvsqcon$ and $difcon$ found in \mdl{zdfkpp},
+therefore \np[=.false.]{ln_zdfevd}{ln\_zdfevd} should be used with the OSMOSIS scheme.
 % gm%  + one word on non local flux with KPP scheme trakpp.F90 module...
 
-% ================================================================
-% Double Diffusion Mixing
-% ================================================================
-\section{Double diffusion mixing (\protect\key{zdfddm})}
-\label{sec:ZDF_ddm}
-
-%-------------------------------------------namzdf_ddm-------------------------------------------------
-%
+%% =================================================================================================
+\section[Double diffusion mixing (\forcode{ln_zdfddm})]{Double diffusion mixing (\protect\np{ln_zdfddm}{ln\_zdfddm})}
+\label{subsec:ZDF_ddm}
+
 %\nlst{namzdf_ddm}
-%--------------------------------------------------------------------------------------------------------------
-
-Options are defined through the  \ngn{namzdf\_ddm} namelist variables.
+
+This parameterisation has been introduced in \mdl{zdfddm} module and is controlled by the namelist parameter
+\np{ln_zdfddm}{ln\_zdfddm} in \nam{zdf}{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{Merryfield1999} 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.
-This parameterisation has been introduced in \mdl{zdfddm} module and is controlled by the \key{zdfddm} CPP key.
-
-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}
+  % \label{eq:ZDF_ddm_Kz}
   &A^{vT} = A_o^{vT}+A_f^{vT}+A_d^{vT}	\\
   &A^{vS} = A_o^{vS}+A_f^{vS}+A_d^{vS}
@@ -826,5 +1002,5 @@
 (1981):
 \begin{align}
-  \label{eq:zdfddm_f}
+  \label{eq:ZDF_ddm_f}
   A_f^{vS} &=
              \begin{cases}
@@ -832,34 +1008,33 @@
                0 				  					    &\text{otherwise}
              \end{cases}
-  \\ 		    \label{eq:zdfddm_f_T}
-  A_f^{vT} &= 0.7 \ A_f^{vS} / R_\rho 
+  \\ 		    \label{eq:ZDF_ddm_f_T}
+  A_f^{vT} &= 0.7 \ A_f^{vS} / R_\rho
 \end{align}
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=0.99\textwidth]{Fig_zdfddm}
-    \caption{
-      \protect\label{fig:zdfddm}
-      From \citet{Merryfield1999} :
-      (a) Diapycnal diffusivities $A_f^{vT}$ and $A_f^{vS}$ for temperature and salt in regions of salt fingering.
-      Heavy curves denote $A^{\ast v} = 10^{-3}~m^2.s^{-1}$ and thin curves $A^{\ast v} = 10^{-4}~m^2.s^{-1}$;
-      (b) diapycnal diffusivities $A_d^{vT}$ and $A_d^{vS}$ for temperature and salt in regions of
-      diffusive convection.
-      Heavy curves denote the Federov parameterisation and thin curves the Kelley parameterisation.
-      The latter is not implemented in \NEMO.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{ZDF_ddm}
+  \caption[Diapycnal diffusivities for temperature and salt in regions of salt fingering and
+  diffusive convection]{
+    From \citet{merryfield.holloway.ea_JPO99}:
+    (a) Diapycnal diffusivities $A_f^{vT}$ and $A_f^{vS}$ for temperature and salt in
+    regions of salt fingering.
+    Heavy curves denote $A^{\ast v} = 10^{-3}~m^2.s^{-1}$ and
+    thin curves $A^{\ast v} = 10^{-4}~m^2.s^{-1}$;
+    (b) diapycnal diffusivities $A_d^{vT}$ and $A_d^{vS}$ for temperature and salt in
+    regions of diffusive convection.
+    Heavy curves denote the Federov parameterisation and thin curves the Kelley parameterisation.
+    The latter is not implemented in \NEMO.}
+  \label{fig:ZDF_ddm}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-The factor 0.7 in \autoref{eq:zdfddm_f_T} reflects the measured ratio $\alpha F_T /\beta F_S \approx  0.7$ of
-buoyancy flux of heat to buoyancy flux of salt (\eg, \citet{McDougall_Taylor_JMR84}).
-Following  \citet{Merryfield1999}, we adopt $R_c = 1.6$, $n = 6$, and $A^{\ast v} = 10^{-4}~m^2.s^{-1}$.
+
+The factor 0.7 in \autoref{eq:ZDF_ddm_f_T} reflects the measured ratio $\alpha F_T /\beta F_S \approx  0.7$ of
+buoyancy flux of heat to buoyancy flux of salt (\eg, \citet{mcdougall.taylor_JMR84}).
+Following  \citet{merryfield.holloway.ea_JPO99}, we adopt $R_c = 1.6$, $n = 6$, and $A^{\ast v} = 10^{-4}~m^2.s^{-1}$.
 
 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}
+  % \label{eq:ZDF_ddm_d}
   A_d^{vT} &=
              \begin{cases}
@@ -869,5 +1044,5 @@
              \end{cases}
                                        \nonumber \\
-  \label{eq:zdfddm_d_S}
+  \label{eq:ZDF_ddm_d_S}
   A_d^{vS} &=
              \begin{cases}
@@ -878,35 +1053,43 @@
 \end{align}
 
-The dependencies of \autoref{eq:zdfddm_f} to \autoref{eq:zdfddm_d_S} on $R_\rho$ are illustrated in
-\autoref{fig:zdfddm}.
+The dependencies of \autoref{eq:ZDF_ddm_f} to \autoref{eq:ZDF_ddm_d_S} on $R_\rho$ are illustrated in
+\autoref{fig:ZDF_ddm}.
 Implementing this requires computing $R_\rho$ at each grid point on every time step.
 This is done in \mdl{eosbn2} at the same time as $N^2$ is computed.
 This avoids duplication in the computation of $\alpha$ and $\beta$ (which is usually quite expensive).
 
-% ================================================================
-% Bottom Friction
-% ================================================================
-\section{Bottom and top friction (\protect\mdl{zdfbfr})}
-\label{sec:ZDF_bfr}
-
-%--------------------------------------------nambfr--------------------------------------------------------
-%
-%\nlst{nambfr}
-%--------------------------------------------------------------------------------------------------------------
-
-Options to define the top and bottom friction are defined through the \ngn{nambfr} namelist variables.
+%% =================================================================================================
+\section[Bottom and top friction (\textit{zdfdrg.F90})]{Bottom and top friction (\protect\mdl{zdfdrg})}
+\label{sec:ZDF_drg}
+
+\begin{listing}
+  \nlst{namdrg}
+  \caption{\forcode{&namdrg}}
+  \label{lst:namdrg}
+\end{listing}
+\begin{listing}
+  \nlst{namdrg_top}
+  \caption{\forcode{&namdrg_top}}
+  \label{lst:namdrg_top}
+\end{listing}
+\begin{listing}
+  \nlst{namdrg_bot}
+  \caption{\forcode{&namdrg_bot}}
+  \label{lst:namdrg_bot}
+\end{listing}
+
+Options to define the top and bottom friction are defined through the \nam{drg}{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 bottom are treated in similar way,
-only the bottom friction is described in detail below.
-
+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.
 
 Both the surface momentum flux (wind stress) and the bottom momentum flux (bottom friction) enter the equations as
 a condition on the vertical diffusive flux.
 For the bottom boundary layer, one has:
-\[
-  % \label{eq:zdfbfr_flux}
-  A^{vm} \left( \partial {\textbf U}_h / \partial z \right) = {{\cal F}}_h^{\textbf U}
-\]
+ \[
+   % \label{eq:ZDF_bfr_flux}
+   A^{vm} \left( \partial {\textbf U}_h / \partial z \right) = {{\cal F}}_h^{\textbf U}
+ \]
 where ${\cal F}_h^{\textbf U}$ is represents the downward flux of horizontal momentum outside
 the logarithmic turbulent boundary layer (thickness of the order of 1~m in the ocean).
@@ -916,5 +1099,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
@@ -922,5 +1105,5 @@
 To illustrate this, consider the equation for $u$ at $k$, the last ocean level:
 \begin{equation}
-  \label{eq:zdfbfr_flux2}
+  \label{eq:ZDF_drg_flux2}
   \frac{\partial u_k}{\partial t} = \frac{1}{e_{3u}} \left[ \frac{A_{uw}^{vm}}{e_{3uw}} \delta_{k+1/2}\;[u] - {\cal F}^u_h \right] \approx - \frac{{\cal F}^u_{h}}{e_{3u}}
 \end{equation}
@@ -935,138 +1118,134 @@
 
 In the code, the bottom friction is imposed by adding the trend due to the bottom friction to
-the general momentum trend in \mdl{dynbfr}.
+ the general momentum trend in \mdl{dynzdf}.
 For the time-split surface pressure gradient algorithm, the momentum trend due to
 the barotropic component needs to be handled separately.
 For this purpose it is convenient to compute and store coefficients which can be simply combined with
 bottom velocities and geometric values to provide the momentum trend due to bottom friction.
-These coefficients are computed in \mdl{zdfbfr} and generally take the form $c_b^{\textbf U}$ where:
+ These coefficients are computed in \mdl{zdfdrg} and generally take the form $c_b^{\textbf U}$ where:
 \begin{equation}
-  \label{eq:zdfbfr_bdef}
+  \label{eq:ZDF_bfr_bdef}
   \frac{\partial {\textbf U_h}}{\partial t} =
   - \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.
-
-% -------------------------------------------------------------------------------------------------------------
-%       Linear Bottom Friction
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Linear bottom friction (\protect\np{nn\_botfr}\forcode{ = 0..1})}
-\label{subsec:ZDF_bfr_linear}
-
-The linear bottom friction parameterisation (including the special case of a free-slip condition) assumes that
-the bottom friction is proportional to the interior velocity (\ie the velocity of the last model level):
-\[
-  % \label{eq:zdfbfr_linear}
+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.
+
+%% =================================================================================================
+\subsection[Linear top/bottom friction (\forcode{ln_lin})]{Linear top/bottom friction (\protect\np{ln_lin}{ln\_lin})}
+\label{subsec:ZDF_drg_linear}
+
+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):
+\[
+  % \label{eq:ZDF_bfr_linear}
   {\cal F}_h^\textbf{U} = \frac{A^{vm}}{e_3} \; \frac{\partial \textbf{U}_h}{\partial k} = r \; \textbf{U}_h^b
 \]
-where $r$ is a friction coefficient expressed in ms$^{-1}$.
-This coefficient is generally estimated by setting a typical decay time $\tau$ in the deep ocean, 
+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,
 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}.
+Commonly accepted values of $\tau$ are of the order of 100 to 200 days \citep{weatherly_JMR84}.
 A value $\tau^{-1} = 10^{-7}$~s$^{-1}$ equivalent to 115 days, is usually used in quasi-geostrophic models.
 One may consider the linear friction as an approximation of quadratic friction, $r \approx 2\;C_D\;U_{av}$
-(\citet{Gill1982}, Eq. 9.6.6).
+(\citet{gill_bk82}, Eq. 9.6.6).
 For example, with a drag coefficient $C_D = 0.002$, a typical speed of tidal currents of $U_{av} =0.1$~m\;s$^{-1}$,
 and assuming an ocean depth $H = 4000$~m, the resulting friction coefficient is $r = 4\;10^{-4}$~m\;s$^{-1}$.
 This is the default value used in \NEMO. It corresponds to a decay time scale of 115~days.
-It can be changed by specifying \np{rn\_bfri1} (namelist parameter).
-
-For the linear friction case the coefficients defined in the general expression \autoref{eq:zdfbfr_bdef} are: 
-\[
-  % \label{eq:zdfbfr_linbfr_b}
-  \begin{split}
-    c_b^u &= - r\\
-    c_b^v &= - r\\
-  \end{split}
-\]
-When \np{nn\_botfr}\forcode{ = 1}, the value of $r$ used is \np{rn\_bfri1}.
-Setting \np{nn\_botfr}\forcode{ = 0} is equivalent to setting $r=0$ and
-leads to a free-slip bottom boundary condition.
-These values are assigned in \mdl{zdfbfr}.
-From v3.2 onwards there is support for local enhancement of these values via an externally defined 2D mask array
-(\np{ln\_bfr2d}\forcode{ = .true.}) given in the \ifile{bfr\_coef} input NetCDF file.
+It can be changed by specifying \np{rn_Uc0}{rn\_Uc0} (namelist parameter).
+
+ For the linear friction case the drag coefficient used in the general expression \autoref{eq:ZDF_bfr_bdef} is:
+\[
+  % \label{eq:ZDF_bfr_linbfr_b}
+    c_b^T = - r
+\]
+When \np[=.true.]{ln_lin}{ln\_lin}, the value of $r$ used is \np{rn_Uc0}{rn\_Uc0}*\np{rn_Cd0}{rn\_Cd0}.
+Setting \np[=.true.]{ln_OFF}{ln\_OFF} (and \forcode{ln_lin=.true.}) is equivalent to setting $r=0$ and leads to a free-slip boundary condition.
+
+These values are assigned in \mdl{zdfdrg}.
+Note that there is support for local enhancement of these values via an externally defined 2D mask array
+(\np[=.true.]{ln_boost}{ln\_boost}) given in the \ifile{bfr\_coef} input NetCDF file.
 The mask values should vary from 0 to 1.
 Locations with a non-zero mask value will have the friction coefficient increased by
-$mask\_value$*\np{rn\_bfrien}*\np{rn\_bfri1}.
-
-% -------------------------------------------------------------------------------------------------------------
-%       Non-Linear Bottom Friction
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Non-linear bottom friction (\protect\np{nn\_botfr}\forcode{ = 2})}
-\label{subsec:ZDF_bfr_nonlinear}
-
-The non-linear bottom friction parameterisation assumes that the bottom friction is quadratic: 
-\[
-  % \label{eq:zdfbfr_nonlinear}
+$mask\_value$ * \np{rn_boost}{rn\_boost} * \np{rn_Cd0}{rn\_Cd0}.
+
+%% =================================================================================================
+\subsection[Non-linear top/bottom friction (\forcode{ln_non_lin})]{Non-linear top/bottom friction (\protect\np{ln_non_lin}{ln\_non\_lin})}
+\label{subsec:ZDF_drg_nonlinear}
+
+The non-linear bottom friction parameterisation assumes that the top/bottom friction is quadratic:
+\[
+  % \label{eq:ZDF_drg_nonlinear}
   {\cal F}_h^\textbf{U} = \frac{A^{vm}}{e_3 }\frac{\partial \textbf {U}_h
   }{\partial k}=C_D \;\sqrt {u_b ^2+v_b ^2+e_b } \;\; \textbf {U}_h^b
 \]
-where $C_D$ is a drag coefficient, and $e_b $ a bottom turbulent kinetic energy due to tides,
+where $C_D$ is a drag coefficient, and $e_b $ a top/bottom turbulent kinetic energy due to tides,
 internal waves breaking and other short time scale currents.
 A typical value of the drag coefficient is $C_D = 10^{-3} $.
-As an example, the CME experiment \citep{Treguier_JGR92} uses $C_D = 10^{-3}$ and
-$e_b = 2.5\;10^{-3}$m$^2$\;s$^{-2}$, while the FRAM experiment \citep{Killworth1992} uses $C_D = 1.4\;10^{-3}$ and
+As an example, the CME experiment \citep{treguier_JGR92} uses $C_D = 10^{-3}$ and
+$e_b = 2.5\;10^{-3}$m$^2$\;s$^{-2}$, while the FRAM experiment \citep{killworth_JPO92} uses $C_D = 1.4\;10^{-3}$ and
 $e_b =2.5\;\;10^{-3}$m$^2$\;s$^{-2}$.
-The CME choices have been set as default values (\np{rn\_bfri2} and \np{rn\_bfeb2} namelist parameters).
-
-As for the linear case, the bottom friction is imposed in the code by adding the trend due to
-the bottom friction to the general momentum trend in \mdl{dynbfr}.
-For the non-linear friction case the terms computed in \mdl{zdfbfr} are:
-\[
-  % \label{eq:zdfbfr_nonlinbfr}
-  \begin{split}
-    c_b^u &= - \; C_D\;\left[ u^2 + \left(\bar{\bar{v}}^{i+1,j}\right)^2 + e_b \right]^{1/2}\\
-    c_b^v &= - \; C_D\;\left[  \left(\bar{\bar{u}}^{i,j+1}\right)^2 + v^2 + e_b \right]^{1/2}\\
-  \end{split}
-\]
-
-The coefficients that control the strength of the non-linear bottom friction are initialised as namelist parameters:
-$C_D$= \np{rn\_bfri2}, and $e_b$ =\np{rn\_bfeb2}.
-Note for applications which treat tides explicitly a low or even zero value of \np{rn\_bfeb2} is recommended.
-From v3.2 onwards a local enhancement of $C_D$ is possible via an externally defined 2D mask array
-(\np{ln\_bfr2d}\forcode{ = .true.}).
-This works in the same way as for the linear bottom friction case with non-zero masked locations increased by
-$mask\_value$*\np{rn\_bfrien}*\np{rn\_bfri2}.
-
-% -------------------------------------------------------------------------------------------------------------
-%       Bottom Friction Log-layer
-% -------------------------------------------------------------------------------------------------------------
-\subsection[Log-layer btm frict enhncmnt (\protect\np{nn\_botfr}\forcode{ = 2}, \protect\np{ln\_loglayer}\forcode{ = .true.})]
-				{Log-layer bottom friction enhancement (\protect\np{nn\_botfr}\forcode{ = 2}, \protect\np{ln\_loglayer}\forcode{ = .true.})}
-\label{subsec:ZDF_bfr_loglayer}
-
-In the non-linear bottom friction case, the drag coefficient, $C_D$, can be optionally enhanced using
-a "law of the wall" scaling.
-If  \np{ln\_loglayer} = .true., $C_D$ is no longer constant but is related to the thickness of
-the last wet layer in each column by:
-\[
-  C_D = \left ( {\kappa \over {\rm log}\left ( 0.5e_{3t}/rn\_bfrz0 \right ) } \right )^2
-\]
-
-\noindent where $\kappa$ is the von-Karman constant and \np{rn\_bfrz0} is a roughness length provided via
-the namelist.
-
-For stability, the drag coefficient is bounded such that it is kept greater or equal to
-the base \np{rn\_bfri2} value and it is not allowed to exceed the value of an additional namelist parameter:
-\np{rn\_bfri2\_max}, \ie
-\[
-  rn\_bfri2 \leq C_D \leq rn\_bfri2\_max
-\]
-
-\noindent Note also that a log-layer enhancement can also be applied to the top boundary friction if
-under ice-shelf cavities are in use (\np{ln\_isfcav}\forcode{ = .true.}).
-In this case, the relevant namelist parameters are \np{rn\_tfrz0}, \np{rn\_tfri2} and \np{rn\_tfri2\_max}.
-
-% -------------------------------------------------------------------------------------------------------------
-%       Bottom Friction stability
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Bottom friction stability considerations}
-\label{subsec:ZDF_bfr_stability}
-
-Some care needs to exercised over the choice of parameters to ensure that the implementation of
-bottom friction does not induce numerical instability.
-For the purposes of stability analysis, an approximation to \autoref{eq:zdfbfr_flux2} is:
+The CME choices have been set as default values (\np{rn_Cd0}{rn\_Cd0} and \np{rn_ke0}{rn\_ke0} namelist parameters).
+
+As for the linear case, the friction is imposed in the code by adding the trend due to
+the friction to the general momentum trend in \mdl{dynzdf}.
+For the non-linear friction case the term computed in \mdl{zdfdrg} is:
+\[
+  % \label{eq:ZDF_drg_nonlinbfr}
+    c_b^T = - \; C_D\;\left[ \left(\bar{u_b}^{i}\right)^2 + \left(\bar{v_b}^{j}\right)^2 + e_b \right]^{1/2}
+\]
+
+The coefficients that control the strength of the non-linear friction are initialised as namelist parameters:
+$C_D$= \np{rn_Cd0}{rn\_Cd0}, and $e_b$ =\np{rn_bfeb2}{rn\_bfeb2}.
+Note that for applications which consider tides explicitly, a low or even zero value of \np{rn_bfeb2}{rn\_bfeb2} is recommended. A local enhancement of $C_D$ is again possible via an externally defined 2D mask array
+(\np[=.true.]{ln_boost}{ln\_boost}).
+This works in the same way as for the linear friction case with non-zero masked locations increased by
+$mask\_value$ * \np{rn_boost}{rn\_boost} * \np{rn_Cd0}{rn\_Cd0}.
+
+%% =================================================================================================
+\subsection[Log-layer top/bottom friction (\forcode{ln_loglayer})]{Log-layer top/bottom friction (\protect\np{ln_loglayer}{ln\_loglayer})}
+\label{subsec:ZDF_drg_loglayer}
+
+In the non-linear friction case, the drag coefficient, $C_D$, can be optionally enhanced using
+a "law of the wall" scaling. This assumes that the model vertical resolution can capture the logarithmic layer which typically occur for layers thinner than 1 m or so.
+If  \np[=.true.]{ln_loglayer}{ln\_loglayer}, $C_D$ is no longer constant but is related to the distance to the wall (or equivalently to the half of the top/bottom layer thickness):
+\[
+  C_D = \left ( {\kappa \over {\mathrm log}\left ( 0.5 \; e_{3b} / rn\_{z0} \right ) } \right )^2
+\]
+
+\noindent where $\kappa$ is the von-Karman constant and \np{rn_z0}{rn\_z0} is a roughness length provided via the namelist.
+
+The drag coefficient is bounded such that it is kept greater or equal to
+the base \np{rn_Cd0}{rn\_Cd0} value which occurs where layer thicknesses become large and presumably logarithmic layers are not resolved at all. For stability reason, it is also not allowed to exceed the value of an additional namelist parameter:
+\np{rn_Cdmax}{rn\_Cdmax}, \ie
+\[
+  rn\_Cd0 \leq C_D \leq rn\_Cdmax
+\]
+
+\noindent The log-layer enhancement can also be applied to the top boundary friction if
+under ice-shelf cavities are activated (\np[=.true.]{ln_isfcav}{ln\_isfcav}).
+%In this case, the relevant namelist parameters are \np{rn_tfrz0}{rn\_tfrz0}, \np{rn_tfri2}{rn\_tfri2} and \np{rn_tfri2_max}{rn\_tfri2\_max}.
+
+%% =================================================================================================
+\subsection[Explicit top/bottom friction (\forcode{ln_drgimp=.false.})]{Explicit top/bottom friction (\protect\np[=.false.]{ln_drgimp}{ln\_drgimp})}
+\label{subsec:ZDF_drg_stability}
+
+Setting \np[=.false.]{ln_drgimp}{ln\_drgimp} means that bottom friction is treated explicitly in time, which has the advantage of simplifying the interaction with the split-explicit free surface (see \autoref{subsec:ZDF_drg_ts}). The latter does indeed require the knowledge of bottom stresses in the course of the barotropic sub-iteration, which becomes less straightforward in the implicit case. In the explicit case, top/bottom stresses can be computed using \textit{before} velocities and inserted in the overall momentum tendency budget. This reads:
+
+At the top (below an ice shelf cavity):
+\[
+  \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{t}
+  = c_{t}^{\textbf{U}}\textbf{u}^{n-1}_{t}
+\]
+
+At the bottom (above the sea floor):
+\[
+  \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{b}
+  = c_{b}^{\textbf{U}}\textbf{u}^{n-1}_{b}
+\]
+
+Since this is conditionally stable, some care needs to exercised over the choice of parameters to ensure that the implementation of explicit top/bottom friction does not induce numerical instability.
+For the purposes of stability analysis, an approximation to \autoref{eq:ZDF_drg_flux2} is:
 \begin{equation}
-  \label{eq:Eqn_bfrstab}
+  \label{eq:ZDF_Eqn_drgstab}
   \begin{split}
     \Delta u &= -\frac{{{\cal F}_h}^u}{e_{3u}}\;2 \rdt    \\
@@ -1074,10 +1253,10 @@
   \end{split}
 \end{equation}
-\noindent where linear bottom friction and a leapfrog timestep have been assumed.
-To ensure that the bottom friction cannot reverse the direction of flow it is necessary to have:
-\[
-  |\Delta u| < \;|u| 
-\]
-\noindent which, using \autoref{eq:Eqn_bfrstab}, gives:
+\noindent where linear friction and a leapfrog timestep have been assumed.
+To ensure that the friction cannot reverse the direction of flow it is necessary to have:
+\[
+  |\Delta u| < \;|u|
+\]
+\noindent which, using \autoref{eq:ZDF_Eqn_drgstab}, gives:
 \[
   r\frac{2\rdt}{e_{3u}} < 1 \qquad  \Rightarrow \qquad r < \frac{e_{3u}}{2\rdt}\\
@@ -1092,295 +1271,103 @@
 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. 
-To ensure stability limits are imposed on the bottom friction coefficients both
+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.
-Checks at initialisation are made in \mdl{zdfbfr} (assuming a 1 m.s$^{-1}$ velocity in the non-linear case).
+Checks at initialisation are made in \mdl{zdfdrg} (assuming a 1 m.s$^{-1}$ velocity in the non-linear case).
 The number of breaches of the stability criterion are reported as well as
 the minimum and maximum values that have been set.
-The criterion is also checked at each time step, using the actual velocity, in \mdl{dynbfr}.
-Values of the bottom friction coefficient are reduced as necessary to ensure stability;
+The criterion is also checked at each time step, using the actual velocity, in \mdl{dynzdf}.
+Values of the friction coefficient are reduced as necessary to ensure stability;
 these changes are not reported.
 
-Limits on the bottom friction coefficient are not imposed if the user has elected to
-handle the bottom friction implicitly (see \autoref{subsec:ZDF_bfr_imp}).
+Limits on the top/bottom friction coefficient are not imposed if the user has elected to
+handle the friction implicitly (see \autoref{subsec:ZDF_drg_imp}).
 The number of potential breaches of the explicit stability criterion are still reported for information purposes.
 
-% -------------------------------------------------------------------------------------------------------------
-%       Implicit Bottom Friction
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Implicit bottom friction (\protect\np{ln\_bfrimp}\forcode{ = .true.})}
-\label{subsec:ZDF_bfr_imp}
+%% =================================================================================================
+\subsection[Implicit top/bottom friction (\forcode{ln_drgimp=.true.})]{Implicit top/bottom friction (\protect\np[=.true.]{ln_drgimp}{ln\_drgimp})}
+\label{subsec:ZDF_drg_imp}
 
 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\_bfrimp} to \forcode{.true.} in the \textit{nambfr} namelist.
-This option requires \np{ln\_zdfexp} to be \forcode{.false.} in the \textit{namzdf} namelist. 
-
-This implementation is realised in \mdl{dynzdf\_imp} and \mdl{dynspg\_ts}. In \mdl{dynzdf\_imp},
-the bottom boundary condition is implemented implicitly.
-
-\[
-  % \label{eq:dynzdf_bfr}
-  \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{mbk}
-  = \binom{c_{b}^{u}u^{n+1}_{mbk}}{c_{b}^{v}v^{n+1}_{mbk}}
-\]
-
-where $mbk$ is the layer number of the bottom wet layer.
-Superscript $n+1$ means the velocity used in the friction formula is to be calculated, so, it is implicit.
-
-If split-explicit time splitting is used, care must be taken to avoid the double counting of the bottom friction in
-the 2-D barotropic momentum equations.
-As NEMO only updates the barotropic pressure gradient and Coriolis' forcing terms in the 2-D barotropic calculation,
-we need to remove the bottom friction induced by these two terms which has been included in the 3-D momentum trend 
-and update it with the latest value.
-On the other hand, the bottom friction contributed by the other terms
-(\eg the advection term, viscosity term) has been included in the 3-D momentum equations and
-should not be added in the 2-D barotropic mode.
-
-The implementation of the implicit bottom friction in \mdl{dynspg\_ts} is done in two steps as the following:
-
-\[
-  % \label{eq:dynspg_ts_bfr1}
-  \frac{\textbf{U}_{med}-\textbf{U}^{m-1}}{2\Delta t}=-g\nabla\eta-f\textbf{k}\times\textbf{U}^{m}+c_{b}
-  \left(\textbf{U}_{med}-\textbf{U}^{m-1}\right)
-\]
-\[
-  \frac{\textbf{U}^{m+1}-\textbf{U}_{med}}{2\Delta t}=\textbf{T}+
-  \left(g\nabla\eta^{'}+f\textbf{k}\times\textbf{U}^{'}\right)-
-  2\Delta t_{bc}c_{b}\left(g\nabla\eta^{'}+f\textbf{k}\times\textbf{u}_{b}\right)
-\]
-
-where $\textbf{T}$ is the vertical integrated 3-D momentum trend.
-We assume the leap-frog time-stepping is used here.
-$\Delta t$ is the barotropic mode time step and $\Delta t_{bc}$ is the baroclinic mode time step.
-$c_{b}$ is the friction coefficient.
-$\eta$ is the sea surface level calculated in the barotropic loops while $\eta^{'}$ is the sea surface level used in
-the 3-D baroclinic mode.
-$\textbf{u}_{b}$ is the bottom layer horizontal velocity.
-
-% -------------------------------------------------------------------------------------------------------------
-%       Bottom Friction with split-explicit time splitting
-% -------------------------------------------------------------------------------------------------------------
-\subsection[Bottom friction w/ split-explicit time splitting (\protect\np{ln\_bfrimp})]
-				{Bottom friction with split-explicit time splitting (\protect\np{ln\_bfrimp})}
-\label{subsec:ZDF_bfr_ts}
-
-When calculating the momentum trend due to bottom friction in \mdl{dynbfr},
-the bottom velocity at the before time step is used.
-This velocity includes both the baroclinic and barotropic components which is appropriate when
-using either the explicit or filtered surface pressure gradient algorithms
-(\key{dynspg\_exp} or \key{dynspg\_flt}).
-Extra attention is required, however, when using split-explicit time stepping (\key{dynspg\_ts}).
-In this case the free surface equation is solved with a small time step \np{rn\_rdt}/\np{nn\_baro},
-while the three dimensional prognostic variables are solved with the longer time step of \np{rn\_rdt} seconds.
-The trend in the barotropic momentum due to bottom friction appropriate to this method is that given by
-the selected parameterisation (\ie linear or non-linear bottom friction) computed with
-the evolving velocities at each barotropic timestep. 
-
-In the case of non-linear bottom friction, we have elected to partially linearise the problem by
-keeping the coefficients fixed throughout the barotropic time-stepping to those computed in
-\mdl{zdfbfr} using the now timestep.
-This decision allows an efficient use of the $c_b^{\vect{U}}$ coefficients to:
-
+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}{ln\_drgimp} to \forcode{.true.} in the \nam{drg}{drg} namelist.
+%This option requires \np{ln_zdfexp}{ln\_zdfexp} to be \forcode{.false.} in the \nam{zdf}{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):
+\[
+  % \label{eq:ZDF_dynZDF__drg_top}
+  \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{t}
+  = c_{t}^{\textbf{U}}\textbf{u}^{n+1}_{t}
+\]
+
+At the bottom (above the sea floor):
+\[
+  % \label{eq:ZDF_dynZDF__drg_bot}
+  \left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{b}
+  = c_{b}^{\textbf{U}}\textbf{u}^{n+1}_{b}
+\]
+
+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.
+
+%% =================================================================================================
+\subsection[Bottom friction with split-explicit free surface]{Bottom friction with split-explicit free surface}
+\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[=.false.]{ln_drgimp}{ln\_drgimp} 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[=.true.]{ln_drgimp}{ln\_drgimp},  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 On entry to \rou{dyn\_spg\_ts}, remove the contribution of the before barotropic velocity to
-  the bottom friction component of the vertically integrated momentum trend.
-  Note the same stability check that is carried out on the bottom friction coefficient in \mdl{dynbfr} has to
-  be applied here to ensure that the trend removed matches that which was added in \mdl{dynbfr}.
-\item At each barotropic step, compute the contribution of the current barotropic velocity to
-  the trend due to bottom friction.
-  Add this contribution to the vertically integrated momentum trend.
-  This contribution is handled implicitly which eliminates the need to impose a stability criteria on
-  the values of the bottom friction coefficient within the barotropic loop. 
+\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 the use of an implicit formulation within the barotropic loop for the bottom friction trend means that
-any limiting of the bottom friction coefficient in \mdl{dynbfr} does not adversely affect the solution when
-using split-explicit time splitting.
-This is because the major contribution to bottom friction is likely to come from the barotropic component which
-uses the unrestricted value of the coefficient.
-However, if the limiting is thought to be having a major effect
-(a more likely prospect in coastal and shelf seas applications) then
-the fully implicit form of the bottom friction should be used (see \autoref{subsec:ZDF_bfr_imp})
-which can be selected by setting \np{ln\_bfrimp} $=$ \forcode{.true.}.
-
-Otherwise, the implicit formulation takes the form:
-\[
-  % \label{eq:zdfbfr_implicitts}
-  \bar{U}^{t+ \rdt} = \; \left [ \bar{U}^{t-\rdt}\; + 2 \rdt\;RHS \right ] / \left [ 1 - 2 \rdt \;c_b^{u} / H_e \right ]
-\]
-where $\bar U$ is the barotropic velocity, $H_e$ is the full depth (including sea surface height), 
-$c_b^u$ is the bottom friction coefficient as calculated in \rou{zdf\_bfr} and
-$RHS$ represents all the components to the vertically integrated momentum trend except for
-that due to bottom friction.
-
-% ================================================================
-% Tidal Mixing
-% ================================================================
-\section{Tidal mixing (\protect\key{zdftmx})}
-\label{sec:ZDF_tmx}
-
-%--------------------------------------------namzdf_tmx--------------------------------------------------
-%
-%\nlst{namzdf_tmx}
-%--------------------------------------------------------------------------------------------------------------
-
-
-% -------------------------------------------------------------------------------------------------------------
-%        Bottom intensified tidal mixing 
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Bottom intensified tidal mixing}
-\label{subsec:ZDF_tmx_bottom}
-
-Options are defined through the  \ngn{namzdf\_tmx} namelist variables.
-The parameterization of tidal mixing follows the general formulation for the vertical eddy diffusivity proposed by
-\citet{St_Laurent_al_GRL02} and first introduced in an OGCM by \citep{Simmons_al_OM04}. 
-In this formulation an additional vertical diffusivity resulting from internal tide breaking,
-$A^{vT}_{tides}$ is expressed as a function of $E(x,y)$,
-the energy transfer from barotropic tides to baroclinic tides:
-\begin{equation}
-  \label{eq:Ktides}
-  A^{vT}_{tides} =  q \,\Gamma \,\frac{ E(x,y) \, F(z) }{ \rho \, N^2 }
-\end{equation}
-where $\Gamma$ is the mixing efficiency, $N$ the Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}),
-$\rho$ the density, $q$ the tidal dissipation efficiency, and $F(z)$ the vertical structure function. 
-
-The mixing efficiency of turbulence is set by $\Gamma$ (\np{rn\_me} namelist parameter) and
-is usually taken to be the canonical value of $\Gamma = 0.2$ (Osborn 1980). 
-The tidal dissipation efficiency is given by the parameter $q$ (\np{rn\_tfe} namelist parameter)
-represents the part of the internal wave energy flux $E(x, y)$ that is dissipated locally,
-with the remaining $1-q$ radiating away as low mode internal waves and
-contributing to the background internal wave field.
-A value of $q=1/3$ is typically used \citet{St_Laurent_al_GRL02}.
-The vertical structure function $F(z)$ models the distribution of the turbulent mixing in the vertical.
-It is implemented as a simple exponential decaying upward away from the bottom,
-with a vertical scale of $h_o$ (\np{rn\_htmx} namelist parameter,
-with a typical value of $500\,m$) \citep{St_Laurent_Nash_DSR04}, 
-\[
-  % \label{eq:Fz}
-  F(i,j,k) = \frac{ e^{ -\frac{H+z}{h_o} } }{ h_o \left( 1- e^{ -\frac{H}{h_o} } \right) }
-\]
-and is normalized so that vertical integral over the water column is unity. 
-
-The associated vertical viscosity is calculated from the vertical diffusivity assuming a Prandtl number of 1,
-\ie $A^{vm}_{tides}=A^{vT}_{tides}$.
-In the limit of $N \rightarrow 0$ (or becoming negative), the vertical diffusivity is capped at $300\,cm^2/s$ and
-impose a lower limit on $N^2$ of \np{rn\_n2min} usually set to $10^{-8} s^{-2}$.
-These bounds are usually rarely encountered.
-
-The internal wave energy map, $E(x, y)$ in \autoref{eq:Ktides}, is derived from a barotropic model of
-the tides utilizing a parameterization of the conversion of barotropic tidal energy into internal waves.
-The essential goal of the parameterization is to represent the momentum exchange between the barotropic tides and
-the unrepresented internal waves induced by the tidal flow over rough topography in a stratified ocean.
-In the current version of \NEMO, the map is built from the output of
-the barotropic global ocean tide model MOG2D-G \citep{Carrere_Lyard_GRL03}.
-This model provides the dissipation associated with internal wave energy for the M2 and K1 tides component
-(\autoref{fig:ZDF_M2_K1_tmx}).
-The S2 dissipation is simply approximated as being $1/4$ of the M2 one.
-The internal wave energy is thus : $E(x, y) = 1.25 E_{M2} + E_{K1}$.
-Its global mean value is $1.1$ TW,
-in agreement with independent estimates \citep{Egbert_Ray_Nat00, Egbert_Ray_JGR01}. 
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=0.90\textwidth]{Fig_ZDF_M2_K1_tmx}
-    \caption{
-      \protect\label{fig:ZDF_M2_K1_tmx}
-      (a) M2 and (b) K1 internal wave drag energy from \citet{Carrere_Lyard_GRL03} ($W/m^2$).
-    }
-  \end{center}
-\end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
- 
-% -------------------------------------------------------------------------------------------------------------
-%        Indonesian area specific treatment 
-% -------------------------------------------------------------------------------------------------------------
-\subsection{Indonesian area specific treatment (\protect\np{ln\_zdftmx\_itf})}
-\label{subsec:ZDF_tmx_itf}
-
-When the Indonesian Through Flow (ITF) area is included in the model domain,
-a specific treatment of tidal induced mixing in this area can be used.
-It is activated through the namelist logical \np{ln\_tmx\_itf}, and the user must provide an input NetCDF file,
-\ifile{mask\_itf}, which contains a mask array defining the ITF area where the specific treatment is applied.
-
-When \np{ln\_tmx\_itf}\forcode{ = .true.}, the two key parameters $q$ and $F(z)$ are adjusted following
-the parameterisation developed by \citet{Koch-Larrouy_al_GRL07}:
-
-First, the Indonesian archipelago is a complex geographic region with a series of
-large, deep, semi-enclosed basins connected via numerous narrow straits.
-Once generated, internal tides remain confined within this semi-enclosed area and hardly radiate away.
-Therefore all the internal tides energy is consumed within this area.
-So it is assumed that $q = 1$, \ie all the energy generated is available for mixing.
-Note that for test purposed, the ITF tidal dissipation efficiency is a namelist parameter (\np{rn\_tfe\_itf}).
-A value of $1$ or close to is this recommended for this parameter.
-
-Second, the vertical structure function, $F(z)$, is no more associated with a bottom intensification of the mixing,
-but with a maximum of energy available within the thermocline.
-\citet{Koch-Larrouy_al_GRL07} have suggested that the vertical distribution of
-the energy dissipation proportional to $N^2$ below the core of the thermocline and to $N$ above. 
-The resulting $F(z)$ is:
-\[
-  % \label{eq:Fz_itf}
-  F(i,j,k) \sim     \left\{
-    \begin{aligned}
-      \frac{q\,\Gamma E(i,j) } {\rho N \, \int N     dz}    \qquad \text{when $\partial_z N < 0$} \\
-      \frac{q\,\Gamma E(i,j) } {\rho     \, \int N^2 dz}    \qquad \text{when $\partial_z N > 0$}
-    \end{aligned}
-  \right.
-\]
-
-Averaged over the ITF area, the resulting tidal mixing coefficient is $1.5\,cm^2/s$, 
-which agrees with the independent estimates inferred from observations.
-Introduced in a regional OGCM, the parameterization improves the water mass characteristics in
-the different Indonesian seas, suggesting that the horizontal and vertical distributions of
-the mixing are adequately prescribed \citep{Koch-Larrouy_al_GRL07, Koch-Larrouy_al_OD08a, Koch-Larrouy_al_OD08b}.
-Note also that such a parameterisation has a significant impact on the behaviour of
-global coupled GCMs \citep{Koch-Larrouy_al_CD10}.
-
-% ================================================================
-% Internal wave-driven mixing
-% ================================================================
-\section{Internal wave-driven mixing (\protect\key{zdftmx\_new})}
-\label{sec:ZDF_tmx_new}
-
-%--------------------------------------------namzdf_tmx_new------------------------------------------
-%
-%\nlst{namzdf_tmx_new}
-%--------------------------------------------------------------------------------------------------------------
+Note that other strategies are possible, like considering vertical diffusion step in advance, \ie\ prior barotropic integration.
+
+%% =================================================================================================
+\section[Internal wave-driven mixing (\forcode{ln_zdfiwm})]{Internal wave-driven mixing (\protect\np{ln_zdfiwm}{ln\_zdfiwm})}
+\label{subsec:ZDF_tmx_new}
+
+\begin{listing}
+  \nlst{namzdf_iwm}
+  \caption{\forcode{&namzdf_iwm}}
+  \label{lst:namzdf_iwm}
+\end{listing}
 
 The parameterization of mixing induced by breaking internal waves is a generalization of
-the approach originally proposed by \citet{St_Laurent_al_GRL02}.
+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 
-\[
-  % \label{eq:Kwave}
+and the resulting diffusivity is obtained as
+\[
+  % \label{eq:ZDF_Kwave}
   A^{vT}_{wave} =  R_f \,\frac{ \epsilon }{ \rho \, N^2 }
 \]
 where $R_f$ is the mixing efficiency and $\epsilon$ is a specified three dimensional distribution of
 the energy available for mixing.
-If the \np{ln\_mevar} namelist parameter is set to false, the mixing efficiency is taken as constant and
-equal to 1/6 \citep{Osborn_JPO80}.
+If the \np{ln_mevar}{ln\_mevar} namelist parameter is set to \forcode{.false.}, the mixing efficiency is taken as constant and
+equal to 1/6 \citep{osborn_JPO80}.
 In the opposite (recommended) case, $R_f$ is instead a function of
 the turbulence intensity parameter $Re_b = \frac{ \epsilon}{\nu \, N^2}$,
-with $\nu$ the molecular viscosity of seawater, following the model of \cite{Bouffard_Boegman_DAO2013} and
-the implementation of \cite{de_lavergne_JPO2016_efficiency}.
+with $\nu$ the molecular viscosity of seawater, following the model of \cite{bouffard.boegman_DAO13} and
+the implementation of \cite{de-lavergne.madec.ea_JPO16}.
 Note that $A^{vT}_{wave}$ is bounded by $10^{-2}\,m^2/s$, a limit that is often reached when
 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 true, a recommended choice. 
-This parameterization of differential mixing, due to \cite{Jackson_Rehmann_JPO2014},
-is implemented as in \cite{de_lavergne_JPO2016_efficiency}.
+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}{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}.
 
 The three-dimensional distribution of the energy available for mixing, $\epsilon(i,j,k)$,
 is constructed from three static maps of column-integrated internal wave energy dissipation,
-$E_{cri}(i,j)$, $E_{pyc}(i,j)$, and $E_{bot}(i,j)$, combined to three corresponding vertical structures
-(de Lavergne et al., in prep):
+$E_{cri}(i,j)$, $E_{pyc}(i,j)$, and $E_{bot}(i,j)$, combined to three corresponding vertical structures:
+
 \begin{align*}
   F_{cri}(i,j,k) &\propto e^{-h_{ab} / h_{cri} }\\
-  F_{pyc}(i,j,k) &\propto N^{n\_p}\\
+  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
@@ -1388,18 +1375,273 @@
   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\_tmx\_new} namelist)
+The $n_p$ parameter (given by \np{nn_zpyc}{nn\_zpyc} in \nam{zdf_iwm}{zdf\_iwm} namelist)
 controls the stratification-dependence of the pycnocline-intensified dissipation.
-It can take values of 1 (recommended) or 2.
+It can take values of $1$ (recommended) or $2$.
 Finally, the vertical structures $F_{cri}$ and $F_{bot}$ require the specification of
 the decay scales $h_{cri}(i,j)$ and $h_{bot}(i,j)$, which are defined by two additional input maps.
 $h_{cri}$ is related to the large-scale topography of the ocean (etopo2) and
 $h_{bot}$ is a function of the energy flux $E_{bot}$, the characteristic horizontal scale of
-the abyssal hill topography \citep{Goff_JGR2010} and the latitude.
-
-% ================================================================
-
-\biblio
-
-\pindex
+the abyssal hill topography \citep{goff_JGR10} and the latitude.
+% Jc: input files names ?
+
+%% =================================================================================================
+\section[Surface wave-induced mixing (\forcode{ln_zdfswm})]{Surface wave-induced mixing (\protect\np{ln_zdfswm}{ln\_zdfswm})}
+\label{subsec:ZDF_swm}
+
+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
+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
+is provided  as a function of wave amplitude, Stokes Drift and wave-number:
+
+\begin{equation}
+  \label{eq:ZDF_Bv}
+  B_{v} = \alpha {A} {U}_{st} {exp(3kz)}
+\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
+numerical experiments and is set to be 1.
+
+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.}
+(see \autoref{subsec:SBC_wave_sdw})
+and the needed wave fields can be provided either in forcing or coupled mode
+(for more information on wave parameters and settings see \autoref{sec:SBC_wave})
+
+%% =================================================================================================
+\section[Adaptive-implicit vertical advection (\forcode{ln_zad_Aimp})]{Adaptive-implicit vertical advection(\protect\np{ln_zad_Aimp}{ln\_zad\_Aimp})}
+\label{subsec:ZDF_aimp}
+
+The adaptive-implicit vertical advection option in NEMO is based on the work of
+\citep{shchepetkin_OM15}.  In common with most ocean models, the timestep used with NEMO
+needs to satisfy multiple criteria associated with different physical processes in order
+to maintain numerical stability. \citep{shchepetkin_OM15} pointed out that the vertical
+CFL criterion is commonly the most limiting. \citep{lemarie.debreu.ea_OM15} examined the
+constraints for a range of time and space discretizations and provide the CFL stability
+criteria for a range of advection schemes. The values for the Leap-Frog with Robert
+asselin filter time-stepping (as used in NEMO) are reproduced in
+\autoref{tab:ZDF_zad_Aimp_CFLcrit}. Treating the vertical advection implicitly can avoid these
+restrictions but at the cost of large dispersive errors and, possibly, large numerical
+viscosity. The adaptive-implicit vertical advection option provides a targetted use of the
+implicit scheme only when and where potential breaches of the vertical CFL condition
+occur. In many practical applications these events may occur remote from the main area of
+interest or due to short-lived conditions such that the extra numerical diffusion or
+viscosity does not greatly affect the overall solution. With such applications, setting:
+\forcode{ln_zad_Aimp=.true.} should allow much longer model timesteps to be used whilst
+retaining the accuracy of the high order explicit schemes over most of the domain.
+
+\begin{table}[htbp]
+  \centering
+  % \begin{tabular}{cp{70pt}cp{70pt}cp{70pt}cp{70pt}}
+  \begin{tabular}{r|ccc}
+    \hline
+    spatial discretization  & 2$^nd$ order centered & 3$^rd$ order upwind & 4$^th$ order compact \\
+    advective CFL criterion &                 0.904 &              0.472  &                0.522 \\
+    \hline
+  \end{tabular}
+  \caption[Advective CFL criteria for the leapfrog with Robert Asselin filter time-stepping]{
+    The advective CFL criteria for a range of spatial discretizations for
+    the leapfrog with Robert Asselin filter time-stepping
+    ($\nu=0.1$) as given in \citep{lemarie.debreu.ea_OM15}.}
+  \label{tab:ZDF_zad_Aimp_CFLcrit}
+\end{table}
+
+In particular, the advection scheme remains explicit everywhere except where and when
+local vertical velocities exceed a threshold set just below the explicit stability limit.
+Once the threshold is reached a tapered transition towards an implicit scheme is used by
+partitioning the vertical velocity into a part that can be treated explicitly and any
+excess that must be treated implicitly. The partitioning is achieved via a Courant-number
+dependent weighting algorithm as described in \citep{shchepetkin_OM15}.
+
+The local cell Courant number ($Cu$) used for this partitioning is:
+
+\begin{equation}
+  \label{eq:ZDF_Eqn_zad_Aimp_Courant}
+  \begin{split}
+    Cu &= {2 \rdt \over e^n_{3t_{ijk}}} \bigg (\big [ \texttt{Max}(w^n_{ijk},0.0) - \texttt{Min}(w^n_{ijk+1},0.0) \big ]    \\
+       &\phantom{=} +\big [ \texttt{Max}(e_{{2_u}ij}e^n_{{3_{u}}ijk}u^n_{ijk},0.0) - \texttt{Min}(e_{{2_u}i-1j}e^n_{{3_{u}}i-1jk}u^n_{i-1jk},0.0) \big ]
+                     \big / e_{{1_t}ij}e_{{2_t}ij}            \\
+       &\phantom{=} +\big [ \texttt{Max}(e_{{1_v}ij}e^n_{{3_{v}}ijk}v^n_{ijk},0.0) - \texttt{Min}(e_{{1_v}ij-1}e^n_{{3_{v}}ij-1k}v^n_{ij-1k},0.0) \big ]
+                     \big / e_{{1_t}ij}e_{{2_t}ij} \bigg )    \\
+  \end{split}
+\end{equation}
+
+\noindent and the tapering algorithm follows \citep{shchepetkin_OM15} as:
+
+\begin{align}
+  \label{eq:ZDF_Eqn_zad_Aimp_partition}
+Cu_{min} &= 0.15 \nonumber \\
+Cu_{max} &= 0.3  \nonumber \\
+Cu_{cut} &= 2Cu_{max} - Cu_{min} \nonumber \\
+Fcu    &= 4Cu_{max}*(Cu_{max}-Cu_{min}) \nonumber \\
+\cf &=
+     \begin{cases}
+        0.0                                                        &\text{if $Cu \leq Cu_{min}$} \\
+        (Cu - Cu_{min})^2 / (Fcu +  (Cu - Cu_{min})^2)             &\text{else if $Cu < Cu_{cut}$} \\
+        (Cu - Cu_{max}) / Cu                                       &\text{else}
+     \end{cases}
+\end{align}
+
+\begin{figure}[!t]
+  \centering
+  \includegraphics[width=0.66\textwidth]{ZDF_zad_Aimp_coeff}
+  \caption[Partitioning coefficient used to partition vertical velocities into parts]{
+    The value of the partitioning coefficient (\cf) used to partition vertical velocities into
+    parts to be treated implicitly and explicitly for a range of typical Courant numbers
+    (\forcode{ln_zad_Aimp=.true.}).}
+  \label{fig:ZDF_zad_Aimp_coeff}
+\end{figure}
+
+\noindent The partitioning coefficient is used to determine the part of the vertical
+velocity that must be handled implicitly ($w_i$) and to subtract this from the total
+vertical velocity ($w_n$) to leave that which can continue to be handled explicitly:
+
+\begin{align}
+  \label{eq:ZDF_Eqn_zad_Aimp_partition2}
+    w_{i_{ijk}} &= \cf_{ijk} w_{n_{ijk}}     \nonumber \\
+    w_{n_{ijk}} &= (1-\cf_{ijk}) w_{n_{ijk}}
+\end{align}
+
+\noindent Note that the coefficient is such that the treatment is never fully implicit;
+the three cases from \autoref{eq:ZDF_Eqn_zad_Aimp_partition} can be considered as:
+fully-explicit; mixed explicit/implicit and mostly-implicit.  With the settings shown the
+coefficient (\cf) varies as shown in \autoref{fig:ZDF_zad_Aimp_coeff}. Note with these values
+the $Cu_{cut}$ boundary between the mixed implicit-explicit treatment and 'mostly
+implicit' is 0.45 which is just below the stability limited given in
+\autoref{tab:ZDF_zad_Aimp_CFLcrit}  for a 3rd order scheme.
+
+The $w_i$ component is added to the implicit solvers for the vertical mixing in
+\mdl{dynzdf} and \mdl{trazdf} in a similar way to \citep{shchepetkin_OM15}.  This is
+sufficient for the flux-limited advection scheme (\forcode{ln_traadv_mus}) but further
+intervention is required when using the flux-corrected scheme (\forcode{ln_traadv_fct}).
+For these schemes the implicit upstream fluxes must be added to both the monotonic guess
+and to the higher order solution when calculating the antidiffusive fluxes. The implicit
+vertical fluxes are then removed since they are added by the implicit solver later on.
+
+The adaptive-implicit vertical advection option is new to NEMO at v4.0 and has yet to be
+used in a wide range of simulations. The following test simulation, however, does illustrate
+the potential benefits and will hopefully encourage further testing and feedback from users:
+
+\begin{figure}[!t]
+  \centering
+  \includegraphics[width=0.66\textwidth]{ZDF_zad_Aimp_overflow_frames}
+  \caption[OVERFLOW: time-series of temperature vertical cross-sections]{
+    A time-series of temperature vertical cross-sections for the OVERFLOW test case.
+    These results are for the default settings with \forcode{nn_rdt=10.0} and
+    without adaptive implicit vertical advection (\forcode{ln_zad_Aimp=.false.}).}
+  \label{fig:ZDF_zad_Aimp_overflow_frames}
+\end{figure}
+
+%% =================================================================================================
+\subsection{Adaptive-implicit vertical advection in the OVERFLOW test-case}
+
+The \href{https://forge.ipsl.jussieu.fr/nemo/chrome/site/doc/NEMO/guide/html/test\_cases.html\#overflow}{OVERFLOW test case}
+provides a simple illustration of the adaptive-implicit advection in action. The example here differs from the basic test case
+by only a few extra physics choices namely:
+
+\begin{verbatim}
+     ln_dynldf_OFF = .false.
+     ln_dynldf_lap = .true.
+     ln_dynldf_hor = .true.
+     ln_zdfnpc     = .true.
+     ln_traadv_fct = .true.
+        nn_fct_h   =  2
+        nn_fct_v   =  2
+\end{verbatim}
+
+\noindent which were chosen to provide a slightly more stable and less noisy solution. The
+result when using the default value of \forcode{nn_rdt=10.} without adaptive-implicit
+vertical velocity is illustrated in \autoref{fig:ZDF_zad_Aimp_overflow_frames}. The mass of
+cold water, initially sitting on the shelf, moves down the slope and forms a
+bottom-trapped, dense plume. Even with these extra physics choices the model is close to
+stability limits and attempts with \forcode{nn_rdt=30.} will fail after about 5.5 hours
+with excessively high horizontal velocities. This time-scale corresponds with the time the
+plume reaches the steepest part of the topography and, although detected as a horizontal
+CFL breach, the instability originates from a breach of the vertical CFL limit. This is a good
+candidate, therefore, for use of the adaptive-implicit vertical advection scheme.
+
+The results with \forcode{ln_zad_Aimp=.true.} and a variety of model timesteps
+are shown in \autoref{fig:ZDF_zad_Aimp_overflow_all_rdt} (together with the equivalent
+frames from the base run).  In this simple example the use of the adaptive-implicit
+vertcal advection scheme has enabled a 12x increase in the model timestep without
+significantly altering the solution (although at this extreme the plume is more diffuse
+and has not travelled so far).  Notably, the solution with and without the scheme is
+slightly different even with \forcode{nn_rdt=10.}; suggesting that the base run was
+close enough to instability to trigger the scheme despite completing successfully.
+To assist in diagnosing how active the scheme is, in both location and time, the 3D
+implicit and explicit components of the vertical velocity are available via XIOS as
+\texttt{wimp} and \texttt{wexp} respectively.  Likewise, the partitioning coefficient
+(\cf) is also available as \texttt{wi\_cff}. For a quick oversight of
+the schemes activity the global maximum values of the absolute implicit component
+of the vertical velocity and the partitioning coefficient are written to the netCDF
+version of the run statistics file (\texttt{run.stat.nc}) if this is active (see
+\autoref{sec:MISC_opt} for activation details).
+
+\autoref{fig:ZDF_zad_Aimp_maxCf} shows examples of the maximum partitioning coefficient for
+the various overflow tests.  Note that the adaptive-implicit vertical advection scheme is
+active even in the base run with \forcode{nn_rdt=10.0s} adding to the evidence that the
+test case is close to stability limits even with this value. At the larger timesteps, the
+vertical velocity is treated mostly implicitly at some location throughout the run. The
+oscillatory nature of this measure appears to be linked to the progress of the plume front
+as each cusp is associated with the location of the maximum shifting to the adjacent cell.
+This is illustrated in \autoref{fig:ZDF_zad_Aimp_maxCf_loc} where the i- and k- locations of the
+maximum have been overlaid for the base run case.
+
+\medskip
+\noindent Only limited tests have been performed in more realistic configurations. In the
+ORCA2\_ICE\_PISCES reference configuration the scheme does activate and passes
+restartability and reproducibility tests but it is unable to improve the model's stability
+enough to allow an increase in the model time-step. A view of the time-series of maximum
+partitioning coefficient (not shown here)  suggests that the default time-step of 5400s is
+already pushing at stability limits, especially in the initial start-up phase. The
+time-series does not, however, exhibit any of the 'cuspiness' found with the overflow
+tests.
+
+\medskip
+\noindent A short test with an eORCA1 configuration promises more since a test using a
+time-step of 3600s remains stable with \forcode{ln_zad_Aimp=.true.} whereas the
+time-step is limited to 2700s without.
+
+\begin{figure}[!t]
+  \centering
+  \includegraphics[width=0.66\textwidth]{ZDF_zad_Aimp_overflow_all_rdt}
+  \caption[OVERFLOW: sample temperature vertical cross-sections from mid- and end-run]{
+    Sample temperature vertical cross-sections from mid- and end-run using
+    different values for \forcode{nn_rdt} and with or without adaptive implicit vertical advection.
+    Without the adaptive implicit vertical advection
+    only the run with the shortest timestep is able to run to completion.
+    Note also that the colour-scale has been chosen to confirm that
+    temperatures remain within the original range of 10$^o$ to 20$^o$.}
+  \label{fig:ZDF_zad_Aimp_overflow_all_rdt}
+\end{figure}
+
+\begin{figure}[!t]
+  \centering
+  \includegraphics[width=0.66\textwidth]{ZDF_zad_Aimp_maxCf}
+  \caption[OVERFLOW: maximum partitioning coefficient during a series of test runs]{
+    The maximum partitioning coefficient during a series of test runs with
+    increasing model timestep length.
+    At the larger timesteps,
+    the vertical velocity is treated mostly implicitly at some location throughout the run.}
+  \label{fig:ZDF_zad_Aimp_maxCf}
+\end{figure}
+
+\begin{figure}[!t]
+  \centering
+  \includegraphics[width=0.66\textwidth]{ZDF_zad_Aimp_maxCf_loc}
+  \caption[OVERFLOW: maximum partitioning coefficient for the case overlaid]{
+    The maximum partitioning coefficient for the \forcode{nn_rdt=10.0} case overlaid with
+    information on the gridcell i- and k-locations of the maximum value.}
+  \label{fig:ZDF_zad_Aimp_maxCf_loc}
+\end{figure}
+
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_cfgs.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_cfgs.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_cfgs.tex	(revision 11831)
@@ -0,0 +1,296 @@
+\documentclass[../main/NEMO_manual]{subfiles}
+
+\begin{document}
+
+\chapter{Configurations}
+\label{chap:CFGS}
+
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
+
+%% =================================================================================================
+\section{Introduction}
+\label{sec:CFGS_intro}
+
+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.
+This form of verification is critical as one adopts the code for his or her particular research purposes.
+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 \nam{cfg}{cfg} namelist variables.
+
+\begin{listing}
+  \nlst{namcfg}
+  \caption{\forcode{&namcfg}}
+  \label{lst:namcfg}
+\end{listing}
+
+%% =================================================================================================
+\section[C1D: 1D Water column model (\texttt{\textbf{key\_c1d}})]{C1D: 1D Water column model (\protect\key{c1d})}
+\label{sec:CFGS_c1d}
+
+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 \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;
+\textit{(b)} to investigate suitable parameterisations of unresolved turbulence
+(surface wave breaking, Langmuir circulation, ...);
+\textit{(c)} to compare the behaviour of different vertical mixing schemes;
+\textit{(d)} to perform sensitivity studies on the vertical diffusion at a particular point of an ocean domain;
+\textit{(d)} to produce extra diagnostics, without the large memory requirement of the full 3D model.
+
+The methodology is based on the configuration of the smallest possible domain:
+a 3x3 domain with 75 vertical levels.
+
+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:
+\begin{enumerate}
+\item a simplified \rou{stp} routine is used (\rou{stp\_c1d}, see \mdl{step\_c1d} module) in which
+  both lateral tendancy terms and lateral physics are not called;
+\item the vertical velocity is zero
+  (so far, no attempt at introducing a Ekman pumping velocity has been made);
+\item a simplified treatment of the Coriolis term is performed as $U$- and $V$-points are the same
+  (see \mdl{dyncor\_c1d}).
+\end{enumerate}
+All the relevant \textit{\_c1d} modules can be found in the src/OCE/C1D directory of
+the \NEMO\ distribution.
+
+% to be added:  a test case on the yearlong Ocean Weather Station (OWS) Papa dataset of Martin (1985)
+
+%% =================================================================================================
+\section{ORCA family: global ocean with tripolar grid}
+\label{sec:CFGS_orca}
+
+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.
+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: \\
+https://doi.org/10.5281/zenodo.2640723
+
+In this namelist\_cfg the name of domain input file is set in \nam{cfg}{cfg} block of namelist.
+
+\begin{figure}[!t]
+  \centering
+  \includegraphics[width=0.66\textwidth]{CFGS_ORCA_NH_mesh}
+  \caption[ORCA mesh conception]{
+    ORCA mesh conception.
+    The departure from an isotropic Mercator grid start poleward of 20\deg{N}.
+    The two "north pole" are the foci of a series of embedded ellipses (blue curves) which
+    are determined analytically and form the i-lines of the ORCA mesh (pseudo latitudes).
+    Then, following \citet{madec.imbard_CD96},
+    the normal to the series of ellipses (red curves) is computed which
+    provides the j-lines of the mesh (pseudo longitudes).}
+  \label{fig:CFGS_ORCA_msh}
+\end{figure}
+
+%% =================================================================================================
+\subsection{ORCA tripolar grid}
+\label{subsec:CFGS_orca_grid}
+
+The ORCA grid is a tripolar grid based on the semi-analytical method of \citet{madec.imbard_CD96}.
+It allows to construct a global orthogonal curvilinear ocean mesh which has no singularity point inside
+the computational domain since two north mesh poles are introduced and placed on lands.
+The method involves defining an analytical set of mesh parallels in the stereographic polar plan,
+computing the associated set of mesh meridians, and projecting the resulting mesh onto the sphere.
+The set of mesh parallels used is a series of embedded ellipses which foci are the two mesh north poles
+(\autoref{fig:CFGS_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.
+\begin{figure}[!tbp]
+  \centering
+  \includegraphics[width=0.66\textwidth]{CFGS_ORCA_NH_msh05_e1_e2}
+  \includegraphics[width=0.66\textwidth]{CFGS_ORCA_aniso}
+  \caption[Horizontal scale factors and ratio of anisotropy for ORCA 0.5\deg\ mesh]{
+    \textit{Top}: Horizontal scale factors ($e_1$, $e_2$) and
+    \textit{Bottom}: ratio of anisotropy ($e_1 / e_2$)
+    for ORCA 0.5\deg\ mesh.
+    South of 20\deg{N} a Mercator grid is used ($e_1 = e_2$) so that the anisotropy ratio is 1.
+    Poleward of 20\deg{N},
+    the two "north pole" introduce a weak anisotropy over the ocean areas ($< 1.2$) except in
+    vicinity of Victoria Island (Canadian Arctic Archipelago).}
+  \label{fig:CFGS_ORCA_e1e2}
+\end{figure}
+
+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)
+is a compromise between maintaining the ratio of mesh anisotropy ($e_1 / e_2$) close to one in the ocean
+(especially in area of strong eddy activities such as the Gulf Stream) and keeping the smallest scale factor in
+the northern hemisphere larger than the smallest one in the southern hemisphere.
+The resulting mesh is shown in \autoref{fig:CFGS_ORCA_msh} and \autoref{fig:CFGS_ORCA_e1e2} for
+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.
+
+%% =================================================================================================
+\subsection{ORCA pre-defined resolution}
+\label{subsec:CFGS_orca_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
+(\autoref{tab:CFGS_ORCA}).
+
+\begin{table}[!t]
+  \centering
+  \begin{tabular}{p{4cm} c c c c}
+    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[Domain size of ORCA family configurations]{
+    Domain size of ORCA family configurations.
+    The flag for configurations of ORCA family need to be set in \textit{domain\_cfg} file.}
+  \label{tab:CFGS_ORCA}
+\end{table}
+
+The ORCA\_R2 configuration has the following specificity: starting from a 2\deg\ ORCA mesh,
+local mesh refinements were applied to the Mediterranean, Red, Black and Caspian Seas,
+so that the resolution is 1\deg\ there.
+A local transformation were also applied with in the Tropics in order to refine the meridional resolution up to
+0.5\deg\ at the Equator.
+
+The ORCA\_R1 configuration has only a local tropical transformation to refine the meridional resolution up to
+1/3\deg\ at the Equator.
+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.
+
+For ORCA\_R1 and R025, setting the configuration key to 75 allows to use 75 vertical levels, otherwise 46 are used.
+In the other ORCA configurations, 31 levels are used
+(see \autoref{tab:CFGS_ORCA}). %\sfcomment{HERE I need to put new table for ORCA2 values} and \autoref{fig:DOM_zgr_e3}).
+
+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}.
+
+This version of ORCA\_R2 has 31 levels in the vertical, with the highest resolution (10m) in the upper 150m
+(see \autoref{tab:CFGS_ORCA} and \autoref{fig:DOM_zgr_e3}).
+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_ocean}),
+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.
+
+A regional Arctic or peri-Antarctic configuration is extracted from an ORCA\_R2 or R05 configurations using
+sponge layers at open boundaries.
+
+%% =================================================================================================
+\section{GYRE family: double gyre basin}
+\label{sec:CFGS_gyre}
+
+The GYRE configuration \citep{levy.klein.ea_OM10} has been built to
+simulate the seasonal cycle of a double-gyre box model.
+It consists in an idealized domain similar to that used in the studies of \citet{drijfhout_JPO94} and
+\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.
+
+The GYRE configuration run together with the PISCES biogeochemical model (GYRE-PISCES).
+The domain geometry is a closed rectangular basin on the $\beta$-plane centred at $\sim$ 30\deg{N} and
+rotated by 45\deg, 3180~km long, 2120~km wide and 4~km deep (\autoref{fig:MISC_strait_hand}).
+The domain is bounded by vertical walls and by a flat bottom.
+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 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
+a small recirculation gyre in the southern corner.
+The net heat flux takes the form of a restoring toward a zonal apparent air temperature profile.
+A portion of the net heat flux which comes from the solar radiation is allowed to penetrate within the water column.
+The fresh water flux is also prescribed and varies zonally.
+It is determined such as, at each time step, the basin-integrated flux is zero.
+The basin is initialised at rest with vertical profiles of temperature and salinity uniformly applied to
+the whole domain.
+
+The GYRE configuration is set like an analytical configuration.
+Through \np[=.false.]{ln_read_cfg}{ln\_read\_cfg} in \nam{cfg}{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}{nn\_GYRE} in \nam{usr_def}{usr\_def}: \\
+
+\jp{jpiglo} $= 30 \times$ \np{nn_GYRE}{nn\_GYRE} + 2   \\
+
+\jp{jpjglo} $= 20 \times$ \np{nn_GYRE}{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).
+In the vertical, GYRE uses the default 30 ocean levels (\jp{jpk}\forcode{ = 31}) (\autoref{fig:DOM_zgr_e3}).
+
+The GYRE configuration is also used in benchmark test as it is very simple to increase its resolution and
+as it does not requires any input file.
+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[=.true.]{ln_bench}{ln\_bench} in \nam{usr_def}{usr\_def} in
+namelist \path{./cfgs/GYRE_PISCES/EXPREF/namelist_cfg}.
+
+\begin{figure}[!t]
+  \centering
+  \includegraphics[width=0.66\textwidth]{CFGS_GYRE}
+  \caption[Snapshot of relative vorticity at the surface of the model domain in GYRE R9, R27 and R54]{
+    Snapshot of relative vorticity at the surface of the model domain in GYRE R9, R27 and R54.
+    From \citet{levy.klein.ea_OM10}.}
+  \label{fig:CFGS_GYRE}
+\end{figure}
+
+%% =================================================================================================
+\section{AMM: atlantic margin configuration}
+\label{sec:CFGS_config_AMM}
+
+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 \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.
+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.
+Also specific to the AMM configuration is the use of the GLS turbulence scheme (\np[=.true.]{ln_zdfgls}{ln\_zdfgls}).
+
+In addition to the tidal boundary condition the model may also take open boundary conditions from
+a North Atlantic model.
+Boundaries may be completely omitted by setting \np{ln_bdy}{ln\_bdy} to false.
+Sample surface fluxes, river forcing and a sample initial restart file are included to test a realistic model run.
+The Baltic boundary is included within the river input file and is specified as a river source.
+Unlike ordinary river points the Baltic inputs also include salinity and temperature data.
+
+\subinc{\input{../../global/epilogue}}
+
+\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_conservation.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_conservation.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_conservation.tex	(revision 11831)
@@ -3,10 +3,25 @@
 \begin{document}
 
-% ================================================================
-% Invariant of the Equations
-% ================================================================
 \chapter{Invariants of the Primitive Equations}
-\label{chap:Invariant}
-\minitoc
+\label{chap:CONS}
+
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
 
 The continuous equations of motion have many analytic properties.
@@ -21,11 +36,11 @@
 horizontal kinetic energy and/or potential enstrophy of horizontally non-divergent flow,
 and variance of temperature and salinity will be conserved in the absence of dissipative effects and forcing.
-\citet{Arakawa1966} has first pointed out the advantage of this approach.
+\citet{arakawa_JCP66} has first pointed out the advantage of this approach.
 He showed that if integral constraints on energy are maintained,
 the computation will be free of the troublesome "non linear" instability originally pointed out by
-\citet{Phillips1959}.
+\citet{phillips_TAMS59}.
 A consistent formulation of the energetic properties is also extremely important in carrying out
 long-term numerical simulations for an oceanographic model.
-Such a formulation avoids systematic errors that accumulate with time \citep{Bryan1997}.
+Such a formulation avoids systematic errors that accumulate with time \citep{bryan_JCP97}.
 
 The general philosophy of OPA which has led to the discrete formulation presented in {\S}II.2 and II.3 is to
@@ -35,15 +50,13 @@
 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.
 In that case, and in that case only, the advective scheme used for passive tracer is a flux correction scheme
-\citep{Marti1992, Levy1996, Levy1998}.
-
-% -------------------------------------------------------------------------------------------------------------
-%       Conservation Properties on Ocean Dynamics
-% -------------------------------------------------------------------------------------------------------------
+\citep{Marti1992?, Levy1996?, Levy1998?}.
+
+%% =================================================================================================
 \section{Conservation properties on ocean dynamics}
-\label{sec:Invariant_dyn}
+\label{sec:CONS_Invariant_dyn}
 
 The non linear term of the momentum equations has been split into a vorticity term,
@@ -63,11 +76,11 @@
 The continuous formulation of the vorticity term satisfies following integral constraints:
 \[
-  % \label{eq:vor_vorticity}
+  % \label{eq:CONS_vor_vorticity}
   \int_D {{\textbf {k}}\cdot \frac{1}{e_3 }\nabla \times \left( {\varsigma
-        \;{\rm {\bf k}}\times {\textbf {U}}_h } \right)\;dv} =0
-\]
-
-\[
-  % \label{eq:vor_enstrophy}
+        \;{\mathrm {\mathbf k}}\times {\textbf {U}}_h } \right)\;dv} =0
+\]
+
+\[
+  % \label{eq:CONS_vor_enstrophy}
   if\quad \chi =0\quad \quad \int\limits_D {\varsigma \;{\textbf{k}}\cdot
     \frac{1}{e_3 }\nabla \times \left( {\varsigma {\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} =-\int\limits_D {\frac{1}{2}\varsigma ^2\,\chi \;dv}
@@ -76,5 +89,5 @@
 
 \[
-  % \label{eq:vor_energy}
+  % \label{eq:CONS_vor_energy}
   \int_D {{\textbf{U}}_h \times \left( {\varsigma \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} =0
 \]
@@ -88,5 +101,5 @@
 Using the symmetry or anti-symmetry properties of the operators (Eqs II.1.10 and 11),
 it can be shown that the scheme (II.2.11) satisfies (II.4.1b) but not (II.4.1c),
-while scheme (II.2.12) satisfies (II.4.1c) but not (II.4.1b) (see appendix C). 
+while scheme (II.2.12) satisfies (II.4.1c) but not (II.4.1b) (see appendix C).
 Note that the enstrophy conserving scheme on total vorticity has been chosen as the standard discrete form of
 the vorticity term.
@@ -102,12 +115,12 @@
 the horizontal gradient of horizontal kinetic energy:
 
-\begin{equation} \label{eq:keg_zad}
-\int_D {{\textbf{U}}_h \cdot \nabla _h \left( {1/2\;{\textbf{U}}_h ^2} \right)\;dv} =-\int_D {{\textbf{U}}_h \cdot \frac{w}{e_3 }\;\frac{\partial 
+\begin{equation} \label{eq:CONS_keg_zad}
+\int_D {{\textbf{U}}_h \cdot \nabla _h \left( {1/2\;{\textbf{U}}_h ^2} \right)\;dv} =-\int_D {{\textbf{U}}_h \cdot \frac{w}{e_3 }\;\frac{\partial
 {\textbf{U}}_h }{\partial k}\;dv}
 \end{equation}
 
 Using the discrete form given in {\S}II.2-a and the symmetry or anti-symmetry properties of
-the mean and difference operators, \autoref{eq:keg_zad} is demonstrated in the Appendix C.
-The main point here is that satisfying \autoref{eq:keg_zad} links the choice of the discrete forms of
+the mean and difference operators, \autoref{eq:CONS_keg_zad} is demonstrated in the Appendix C.
+The main point here is that satisfying \autoref{eq:CONS_keg_zad} links the choice of the discrete forms of
 the vertical advection and of the horizontal gradient of horizontal kinetic energy.
 Choosing one imposes the other.
@@ -122,10 +135,10 @@
 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:
 
 \[
-  % \label{eq:hpg_pe}
+  % \label{eq:CONS_hpg_pe}
   \int_D {-\frac{1}{\rho_o }\left. {\nabla p^h} \right|_z \cdot {\textbf {U}}_h \;dv} \;=\;\int_D {\nabla .\left( {\rho \,{\textbf{U}}} \right)\;g\;z\;\;dv}
 \]
@@ -133,5 +146,5 @@
 Using the discrete form given in {\S}~II.2-a and the symmetry or anti-symmetry properties of
 the mean and difference operators, (II.4.3) is demonstrated in the Appendix C.
-The main point here is that satisfying (II.4.3) strongly constraints the discrete expression of the depth of 
+The main point here is that satisfying (II.4.3) strongly constraints the discrete expression of the depth of
 $T$-points and of the term added to the pressure gradient in $s-$coordinates: the depth of a $T$-point, $z_T$,
 is defined as the sum the vertical scale factors at $w$-points starting from the surface.
@@ -145,8 +158,8 @@
 Nevertheless, the $\psi$-equation is solved numerically by an iterative solver (see {\S}~III.5),
 thus the property is only satisfied with the accuracy required on the solver.
-In addition, with the rigid-lid approximation, the change of horizontal kinetic energy due to the work of 
+In addition, with the rigid-lid approximation, the change of horizontal kinetic energy due to the work of
 surface pressure forces is exactly zero:
 \[
-  % \label{eq:spg}
+  % \label{eq:CONS_spg}
   \int_D {-\frac{1}{\rho_o }\nabla _h } \left( {p_s } \right)\cdot {\textbf{U}}_h \;dv=0
 \]
@@ -157,14 +170,12 @@
 otherwise there is no guarantee that the surface pressure force work vanishes.
 
-% -------------------------------------------------------------------------------------------------------------
-%       Conservation Properties on Ocean Thermodynamics
-% -------------------------------------------------------------------------------------------------------------
+%% =================================================================================================
 \section{Conservation properties on ocean thermodynamics}
-\label{sec:Invariant_tra}
+\label{sec:CONS_Invariant_tra}
 
 In continuous formulation, the advective terms of the tracer equations conserve the tracer content and
 the quadratic form of the tracer, \ie
 \[
-  % \label{eq:tra_tra2}
+  % \label{eq:CONS_tra_tra2}
   \int_D {\nabla .\left( {T\;{\textbf{U}}} \right)\;dv} =0
   \;\text{and}
@@ -176,11 +187,9 @@
 Note that in both continuous and discrete formulations, there is generally no strict conservation of mass,
 since the equation of state is non linear with respect to $T$ and $S$.
-In practice, the mass is conserved with a very good accuracy. 
-
-% -------------------------------------------------------------------------------------------------------------
-%       Conservation Properties on Momentum Physics
-% -------------------------------------------------------------------------------------------------------------
+In practice, the mass is conserved with a very good accuracy.
+
+%% =================================================================================================
 \subsection{Conservation properties on momentum physics}
-\label{subsec:Invariant_dyn_physics}
+\label{subsec:CONS_Invariant_dyn_physics}
 
 \textbf{* lateral momentum diffusion term}
@@ -188,39 +197,38 @@
 The continuous formulation of the horizontal diffusion of momentum satisfies the following integral constraints~:
 \[
-  % \label{eq:dynldf_dyn}
-  \int\limits_D {\frac{1}{e_3 }{\rm {\bf k}}\cdot \nabla \times \left[ {\nabla
+  % \label{eq:CONS_dynldf_dyn}
+  \int\limits_D {\frac{1}{e_3 }{\mathrm {\mathbf k}}\cdot \nabla \times \left[ {\nabla
         _h \left( {A^{lm}\;\chi } \right)-\nabla _h \times \left( {A^{lm}\;\zeta
-            \;{\rm {\bf k}}} \right)} \right]\;dv} =0
-\]
-
-\[
-  % \label{eq:dynldf_div}
+            \;{\mathrm {\mathbf k}}} \right)} \right]\;dv} =0
+\]
+
+\[
+  % \label{eq:CONS_dynldf_div}
   \int\limits_D {\nabla _h \cdot \left[ {\nabla _h \left( {A^{lm}\;\chi }
-        \right)-\nabla _h \times \left( {A^{lm}\;\zeta \;{\rm {\bf k}}} \right)}
+        \right)-\nabla _h \times \left( {A^{lm}\;\zeta \;{\mathrm {\mathbf k}}} \right)}
     \right]\;dv} =0
 \]
 
 \[
-  % \label{eq:dynldf_curl}
-  \int_D {{\rm {\bf U}}_h \cdot \left[ {\nabla _h \left( {A^{lm}\;\chi }
-        \right)-\nabla _h \times \left( {A^{lm}\;\zeta \;{\rm {\bf k}}} \right)}
+  % \label{eq:CONS_dynldf_curl}
+  \int_D {{\mathrm {\mathbf U}}_h \cdot \left[ {\nabla _h \left( {A^{lm}\;\chi }
+        \right)-\nabla _h \times \left( {A^{lm}\;\zeta \;{\mathrm {\mathbf k}}} \right)}
     \right]\;dv} \leqslant 0
 \]
 
 \[
-  % \label{eq:dynldf_curl2}
-  \mbox{if}\quad A^{lm}=cste\quad \quad \int_D {\zeta \;{\rm {\bf k}}\cdot
+  % \label{eq:CONS_dynldf_curl2}
+  \mbox{if}\quad A^{lm}=cste\quad \quad \int_D {\zeta \;{\mathrm {\mathbf k}}\cdot
     \nabla \times \left[ {\nabla _h \left( {A^{lm}\;\chi } \right)-\nabla _h
-        \times \left( {A^{lm}\;\zeta \;{\rm {\bf k}}} \right)} \right]\;dv}
+        \times \left( {A^{lm}\;\zeta \;{\mathrm {\mathbf k}}} \right)} \right]\;dv}
   \leqslant 0
 \]
 
 \[
-  % \label{eq:dynldf_div2}
+  % \label{eq:CONS_dynldf_div2}
   \mbox{if}\quad A^{lm}=cste\quad \quad \int_D {\chi \;\nabla _h \cdot \left[
       {\nabla _h \left( {A^{lm}\;\chi } \right)-\nabla _h \times \left(
-          {A^{lm}\;\zeta \;{\rm {\bf k}}} \right)} \right]\;dv} \leqslant 0
-\]
-
+          {A^{lm}\;\zeta \;{\mathrm {\mathbf k}}} \right)} \right]\;dv} \leqslant 0
+\]
 
 (II.4.6a) and (II.4.6b) means that the horizontal diffusion of momentum conserve both the potential vorticity and
@@ -250,5 +258,5 @@
 
 \[
-  % \label{eq:dynzdf_dyn}
+  % \label{eq:CONS_dynzdf_dyn}
   \begin{aligned}
     & \int_D {\frac{1}{e_3 }}  \frac{\partial }{\partial k}\left( \frac{A^{vm}}{e_3 }\frac{\partial {\textbf{U}}_h }{\partial k} \right) \;dv = \overrightarrow{\textbf{0}} \\
@@ -258,23 +266,23 @@
 conservation of vorticity, dissipation of enstrophy
 \[
-  % \label{eq:dynzdf_vor}
-  \begin{aligned}
-    & \int_D {\frac{1}{e_3 }{\rm {\bf k}}\cdot \nabla \times \left( {\frac{1}{e_3
-          }\frac{\partial }{\partial k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\rm
-                  {\bf U}}_h }{\partial k}} \right)} \right)\;dv} =0 \\
-    & \int_D {\zeta \,{\rm {\bf k}}\cdot \nabla \times \left( {\frac{1}{e_3
-          }\frac{\partial }{\partial k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\rm
-                  {\bf U}}_h }{\partial k}} \right)} \right)\;dv} \leq 0 \\
+  % \label{eq:CONS_dynzdf_vor}
+  \begin{aligned}
+    & \int_D {\frac{1}{e_3 }{\mathrm {\mathbf k}}\cdot \nabla \times \left( {\frac{1}{e_3
+          }\frac{\partial }{\partial k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\mathrm
+                  {\mathbf U}}_h }{\partial k}} \right)} \right)\;dv} =0 \\
+    & \int_D {\zeta \,{\mathrm {\mathbf k}}\cdot \nabla \times \left( {\frac{1}{e_3
+          }\frac{\partial }{\partial k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\mathrm
+                  {\mathbf U}}_h }{\partial k}} \right)} \right)\;dv} \leq 0 \\
   \end{aligned}
 \]
 conservation of horizontal divergence, dissipation of square of the horizontal divergence
 \[
-  % \label{eq:dynzdf_div}
+  % \label{eq:CONS_dynzdf_div}
   \begin{aligned}
     &\int_D {\nabla \cdot \left( {\frac{1}{e_3 }\frac{\partial }{\partial
-            k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\rm {\bf U}}_h }{\partial k}}
+            k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\mathrm {\mathbf U}}_h }{\partial k}}
           \right)} \right)\;dv} =0 \\
     & \int_D {\chi \;\nabla \cdot \left( {\frac{1}{e_3 }\frac{\partial }{\partial
-            k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\rm {\bf U}}_h }{\partial k}}
+            k}\left( {\frac{A^{vm}}{e_3 }\frac{\partial {\mathrm {\mathbf U}}_h }{\partial k}}
           \right)} \right)\;dv} \leq 0 \\
   \end{aligned}
@@ -283,24 +291,22 @@
 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.
-
-% -------------------------------------------------------------------------------------------------------------
-%       Conservation Properties on Tracer Physics
-% -------------------------------------------------------------------------------------------------------------
+\ie\ the vertical momentum physics conserve momentum, potential vorticity, and horizontal divergence.
+
+%% =================================================================================================
 \subsection{Conservation properties on tracer physics}
-\label{subsec:Invariant_tra_physics}
+\label{subsec:CONS_Invariant_tra_physics}
 
 The numerical schemes used for tracer subgridscale physics are written in such a way that
 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. 
-
-\textbf{* lateral physics: }conservation of tracer, dissipation of tracer 
+in practice, the mass is conserved with a very good accuracy.
+
+\textbf{* lateral physics: }conservation of tracer, dissipation of tracer
 variance, i.e.
 
 \[
-  % \label{eq:traldf_t_t2}
+  % \label{eq:CONS_traldf_t_t2}
   \begin{aligned}
     &\int_D \nabla\, \cdot\, \left( A^{lT} \,\Re \,\nabla \,T \right)\;dv = 0 \\
@@ -312,5 +318,5 @@
 
 \[
-  % \label{eq:trazdf_t_t2}
+  % \label{eq:CONS_trazdf_t_t2}
   \begin{aligned}
     & \int_D \frac{1}{e_3 } \frac{\partial }{\partial k}\left( \frac{A^{vT}}{e_3 }  \frac{\partial T}{\partial k}  \right)\;dv = 0 \\
@@ -328,7 +334,5 @@
 It has not been implemented.
 
-\biblio
-
-\pindex
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_misc.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_misc.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_misc.tex	(revision 11831)
@@ -2,17 +2,28 @@
 
 \begin{document}
-% ================================================================
-% Chapter --- Miscellaneous Topics
-% ================================================================
+
 \chapter{Miscellaneous Topics}
 \label{chap:MISC}
 
-\minitoc
-
-\newpage
-
-% ================================================================
-% Representation of Unresolved Straits
-% ================================================================
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
+
+%% =================================================================================================
 \section{Representation of unresolved straits}
 \label{sec:MISC_strait}
@@ -27,80 +38,91 @@
 balance the net evaporation occurring over the Mediterranean region.
 This problem occurs even in eddy permitting simulations.
-For example, in ORCA 1/4\deg several straits of the Indonesian archipelago (Ombai, Lombok...)
+For example, in ORCA 1/4\deg\ several straits of the Indonesian archipelago (Ombai, Lombok...)
 are much narrow than even a single ocean grid-point.
 
-We describe briefly here the three methods that can be used in \NEMO to handle such improperly resolved straits.
-The first two consist of opening the strait by hand while ensuring that the mass exchanges through
-the strait are not too large by either artificially reducing the surface of the strait grid-cells or,
-locally increasing the lateral friction.
-In the third one, the strait is closed but exchanges of mass, heat and salt across the land are allowed.
-Note that such modifications are so specific to a given configuration that no attempt has been made to
-set them in a generic way.
-However, examples of how they can be set up is given in the ORCA 2\deg and 0.5\deg configurations.
-For example, for details of implementation in ORCA2, search: \texttt{IF( cp\_cfg == "orca" .AND. jp\_cfg == 2 )}
-
-% -------------------------------------------------------------------------------------------------------------
-%       Hand made geometry changes
-% -------------------------------------------------------------------------------------------------------------
+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
+reducing the cross-sectional area of the strait grid-cells or, locally increasing the
+lateral friction.
+
+%% =================================================================================================
 \subsection{Hand made geometry changes}
 \label{subsec:MISC_strait_hand}
 
-$\bullet$ reduced scale factor in the cross-strait direction to a value in better agreement with
-the true mean width of the strait (\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 volume of the $T$-cell.
-Indeed, reducing the volume of strait $T$-cell can easily produce a numerical instability at
-that grid point that would require a reduction of the model time step.
-The changes associated with strait management are done in \mdl{domhgr},
-just after the definition or reading of the horizontal scale factors. 
-
-$\bullet$ increase of the viscous boundary layer thickness by local increase of the fmask value at the coast
-(\autoref{fig:MISC_strait_hand}).
-This is done in \mdl{dommsk} together with the setting of the coastal value of fmask (see  \autoref{sec:LBC_coast}).
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+The first method involves reducing the scale factor in the cross-strait direction to a
+value in better agreement with the true mean width of the strait
+(\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
+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
+time step.  Thus to instigate a local change in the width of a Strait requires two steps:
+
+\begin{itemize}
+
+\item Add \texttt{e1e2u} and \texttt{e1e2v} arrays to the \np{cn_domcfg}{cn\_domcfg} file. These 2D
+arrays should contain the products of the unaltered values of: $\texttt{e1u}*\texttt{e2u}$
+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
+\np{cn_domcfg}{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
+routine should also return \texttt{e1e2u} and \texttt{e1e2v} and set the integer return
+argument \texttt{ie1e2u\_v} to a non-zero value. Values other than 0 for this argument
+will suppress the calculation of the areas.
+
+\item Change values of \texttt{e2u} or \texttt{e1v} (either in the \np{cn_domcfg}{cn\_domcfg} file or
+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
+Lombok).
+
+\end{itemize}
+
+The second method is to increase the viscous boundary layer thickness by a local increase
+of the fmask value at the coast. This method can also be effective in wider passages.  The
+concept is illustarted in the second part of  \autoref{fig:MISC_strait_hand} and changes
+to specific locations can be coded in \mdl{usrdef\_fmask}. The \forcode{usr_def_fmask}
+routine is always called after \texttt{fmask} has been defined according to the choice of
+lateral boundary condition as discussed in \autoref{sec:LBC_coast}. The default version of
+\mdl{usrdef\_fmask} contains settings specific to ORCA2 and ORCA1 configurations. These are
+meant as examples only; it is up to the user to verify settings and provide alternatives
+for their own configurations. The default \forcode{usr_def_fmask} makes no changes to
+\texttt{fmask} for any other configuration.
+
 \begin{figure}[!tbp]
-  \begin{center}
-    \includegraphics[width=0.80\textwidth]{Fig_Gibraltar}
-    \includegraphics[width=0.80\textwidth]{Fig_Gibraltar2}
-    \caption{
-      \protect\label{fig:MISC_strait_hand}
-      Example of the Gibraltar strait defined in a $1^{\circ} \times 1^{\circ}$ mesh.
-      \textit{Top}: using partially open cells.
-      The meridional scale factor at $v$-point is reduced on both sides of the strait to account for
-      the real width of the strait (about 20 km).
-      Note that the scale factors of the strait $T$-point remains unchanged.
-      \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
-      allows a reduced transport through the strait.
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{MISC_Gibraltar}
+  \includegraphics[width=0.66\textwidth]{MISC_Gibraltar2}
+  \caption[Two methods to defined the Gibraltar strait]{
+    Example of the Gibraltar strait defined in a 1\deg\ $\times$ 1\deg\ mesh.
+    \textit{Top}: using partially open cells.
+    The meridional scale factor at $v$-point is reduced on both sides of the strait to
+    account for the real width of the strait (about 20 km).
+    Note that the scale factors of the strait $T$-point remains unchanged.
+    \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 allows a reduced transport through the strait.}
+  \label{fig:MISC_strait_hand}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
 \begin{figure}[!tbp]
-  \begin{center}
-    \includegraphics[width=1.0\textwidth]{Fig_closea_mask_example}
-    \caption{
-      \protect\label{fig:closea_mask_example}
-      Example of mask fields for the closea module. \textit{Left}: a
-      closea\_mask field; \textit{Right}: a closea\_mask\_rnf
-      field. In this example, if ln\_closea is set to .true., the mean
-      freshwater flux over each of the American Great Lakes will be
-      set to zero, and the total residual for all the lakes, if
-      negative, will be put into the St Laurence Seaway in the area
-      shown. 
-    }
-  \end{center}
+  \centering
+  \includegraphics[width=0.66\textwidth]{MISC_closea_mask_example}
+  \caption[Mask fields for the \protect\mdl{closea} module]{
+    Example of mask fields for the \protect\mdl{closea} module.
+    \textit{Left}: a closea\_mask field;
+    \textit{Right}: a closea\_mask\_rnf field.
+    In this example, if \protect\np{ln_closea}{ln\_closea} is set to \forcode{.true.},
+    the mean freshwater flux over each of the American Great Lakes will be set to zero,
+    and the total residual for all the lakes, if negative, will be put into
+    the St Laurence Seaway in the area shown.}
+  \label{fig:MISC_closea_mask_example}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-% ================================================================
-% Closed seas
-% ================================================================
-\section{Closed seas (\protect\mdl{closea})}
+
+%% =================================================================================================
+\section[Closed seas (\textit{closea.F90})]{Closed seas (\protect\mdl{closea})}
 \label{sec:MISC_closea}
 
@@ -116,14 +138,14 @@
 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.
 
 \begin{enumerate}
-\item{{\bf No ``closea\_mask'' field is included in domain configuration
+\item {{\bfseries No ``closea\_mask'' field is included in domain configuration
   file.} In this case the closea module does nothing.}
 
-\item{{\bf A field called closea\_mask is included in the domain
+\item {{\bfseries A field called closea\_mask is included in the domain
 configuration file and ln\_closea=.false. in namelist namcfg.} In this
 case the inland seas defined by the closea\_mask field are filled in
@@ -131,8 +153,8 @@
 closea\_mask that is nonzero is set to be a land point.}
 
-\item{{\bf A field called closea\_mask is included in the domain
+\item {{\bfseries A field called closea\_mask is included in the domain
 configuration file and ln\_closea=.true. in namelist namcfg.} Each
 inland sea or group of inland seas is set to a positive integer value
-in the closea\_mask field (see Figure \ref{fig:closea_mask_example}
+in the closea\_mask field (see \autoref{fig:MISC_closea_mask_example}
 for an example). The net surface flux over each inland sea or group of
 inland seas is set to zero each timestep and the residual flux is
@@ -140,5 +162,5 @@
 closea\_mask is zero).}
 
-\item{{\bf Fields called closea\_mask and closea\_mask\_rnf are
+\item {{\bfseries Fields called closea\_mask and closea\_mask\_rnf are
 included in the domain configuration file and ln\_closea=.true. in
 namelist namcfg.} This option works as for option 3, except that if
@@ -149,10 +171,10 @@
 by the closea\_mask\_rnf field. Each mapping is defined by a positive
 integer value for the inland sea(s) and the corresponding runoff
-points. An example is given in Figure
-\ref{fig:closea_mask_example}. If no mapping is provided for a
+points. An example is given in
+\autoref{fig:MISC_closea_mask_example}. If no mapping is provided for a
 particular inland sea then the residual is spread over the global
 ocean.}
 
-\item{{\bf Fields called closea\_mask and closea\_mask\_emp are
+\item {{\bfseries Fields called closea\_mask and closea\_mask\_emp are
 included in the domain configuration file and ln\_closea=.true. in
 namelist namcfg.} This option works the same as option 4 except that
@@ -164,83 +186,80 @@
 
 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.
+
+%% =================================================================================================
 \section{Sub-domain functionality}
 \label{sec:MISC_zoom}
 
+%% =================================================================================================
 \subsection{Simple subsetting of input files via NetCDF attributes}
 
-The extended grids for use with the under-shelf ice cavities will result in redundant rows around Antarctica if
-the ice cavities are not active.
-A simple mechanism for subsetting input files associated with the extended domains has been implemented to
-avoid the need to maintain different sets of input fields for use with or without active ice cavities.
-The existing 'zoom' options are overly complex for this task and marked for deletion anyway.
-This alternative 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:
-consider an ORCA1 configuration using the extended grid bathymetry and coordinate files:
-\vspace{-10pt}
-\ifile{eORCA1\_bathymetry\_v2}
-\ifile{eORCA1\_coordinates}
-\noindent These files define a horizontal domain of 362x332.
-Assuming the first row with open ocean wet points in the non-isf bathymetry for this set is row 42
-(\fortran indexing) then the formally correct setting for \np{open\_ocean\_jstart} is 41.
-Using this value as the first row to be read will result in a 362x292 domain which is the same size as
-the original ORCA1 domain.
-Thus the extended coordinates and bathymetry files can be used with all the original input files for ORCA1 if
-the ice cavities are not active (\np{ln\_isfcav = .false.}).
-Full instructions for achieving this are:
-
-\noindent Add the new attribute to any input files requiring a j-row offset, i.e:
-\vspace{-10pt}
+The extended grids for use with the under-shelf ice cavities will result in redundant rows
+around Antarctica if the ice cavities are not active.  A simple mechanism for subsetting
+input files associated with the extended domains has been implemented to avoid the need to
+maintain different sets of input fields for use with or without active ice cavities.  This
+subsetting operates for the j-direction only and works by optionally looking for and using
+a global file attribute (named: \np{open_ocean_jstart}{open\_ocean\_jstart}) to determine the starting j-row
+for input.  The use of this option is best explained with an example:
+\medskip
+
+\noindent Consider an ORCA1
+configuration using the extended grid domain configuration file: \ifile{eORCA1\_domcfg.nc}
+This file define a horizontal domain of 362x332.  The first row with
+open ocean wet points in the non-isf bathymetry for this set is row 42 (\fortran\ indexing)
+then the formally correct setting for \np{open_ocean_jstart}{open\_ocean\_jstart} is 41.  Using this value as
+the first row to be read will result in a 362x292 domain which is the same size as the
+original ORCA1 domain.  Thus the extended domain configuration file can be used with all
+the original input files for ORCA1 if the ice cavities are not active (\np{ln\_isfcav =
+.false.}).  Full instructions for achieving this are:
+
+\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_coordinates.nc 
-ncatted  -a open_ocean_jstart,global,a,d,41 eORCA1_bathymetry_v2.nc
+ncatted  -a open_ocean_jstart,global,a,d,41 eORCA1_domcfg.nc
 \end{cmds}
- 
-\noindent Add the logical switch to \ngn{namcfg} in the configuration namelist and set true:
-%--------------------------------------------namcfg--------------------------------------------------------
-
-\nlst{namcfg}
-%--------------------------------------------------------------------------------------------------------------
-
-\noindent Note the j-size of the global domain is the (extended j-size minus \np{open\_ocean\_jstart} + 1 ) and
-this must match the size of all datasets other than bathymetry and coordinates currently.
-However the option can be extended to any global, 2D and 3D, netcdf, input field by adding the:
-\vspace{-10pt}
+
+\item Add the logical switch \np{ln_use_jattr}{ln\_use\_jattr} to \nam{cfg}{cfg} in the configuration
+namelist (if it is not already there) and set \forcode{.true.}
+\end{itemize}
+
+\noindent Note that with this option, the j-size of the global domain is (extended
+j-size minus \np{open_ocean_jstart}{open\_ocean\_jstart} + 1 ) and this must match the \texttt{jpjglo} value
+for the configuration. This means an alternative version of \ifile{eORCA1\_domcfg.nc} must
+be created for when \np{ln_use_jattr}{ln\_use\_jattr} is active. The \texttt{ncap2} tool provides a
+convenient way of achieving this:
+
+\begin{cmds}
+ncap2 -s 'jpjglo=292' eORCA1_domcfg.nc nORCA1_domcfg.nc
+\end{cmds}
+
+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}{iom\_get}.
+
 \begin{forlines}
 lrowattr=ln_use_jattr
 \end{forlines}
-optional argument to the appropriate \np{iom\_get} call and the \np{open\_ocean\_jstart} attribute to
-the corresponding input files.
-It remains the users responsibility to set \np{jpjdta} and \np{jpjglo} values in
-the \np{namelist\_cfg} file according to their needs.
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!ht]
-  \begin{center}
-    \includegraphics[width=0.90\textwidth]{Fig_LBC_zoom}
-    \caption{
-      \protect\label{fig:LBC_zoom}
-      Position of a model domain compared to the data input domain when the zoom functionality is used.
-    }
-  \end{center}
-\end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-
-% ================================================================
-% Accuracy and Reproducibility
-% ================================================================
-\section{Accuracy and reproducibility (\protect\mdl{lib\_fortran})}
+
+Currently, only the domain configuration variables make use of this optional argument so
+this facility is of little practical use except for tests where no other external input
+files are needed or you wish to use an extended domain configuration with inputs from
+earlier, non-extended configurations. Alternatively, it should be possible to exclude
+empty rows for extended domain, forced ocean runs using interpolation on the fly, by
+adding the optional argument to \texttt{iom\_get} calls for the weights and initial
+conditions. Experimenting with this remains an exercise for the user.
+
+%% =================================================================================================
+\section[Accuracy and reproducibility (\textit{lib\_fortran.F90})]{Accuracy and reproducibility (\protect\mdl{lib\_fortran})}
 \label{sec:MISC_fortran}
 
-\subsection{Issues with intrinsinc SIGN function (\protect\key{nosignedzero})}
+%% =================================================================================================
+\subsection[Issues with intrinsinc SIGN function (\texttt{\textbf{key\_nosignedzero}})]{Issues with intrinsinc SIGN function (\protect\key{nosignedzero})}
 \label{subsec:MISC_sign}
 
-The SIGN(A, B) is the \fortran intrinsic function delivers the magnitude of A with the sign of B.
+The SIGN(A, B) is the \fortran\ intrinsic function delivers the magnitude of A with the sign of B.
 For example, SIGN(-3.0,2.0) has the value 3.0.
 The problematic case is when the second argument is zero, because, on platforms that support IEEE arithmetic,
@@ -254,5 +273,5 @@
 and the processor is capable of distinguishing between positive and negative zero,
 and B is negative real zero.
-Then SIGN delivers a negative result where, under \fninety rules, it used to return a positive result.
+Then SIGN delivers a negative result where, under \fninety\ rules, it used to return a positive result.
 This change may be especially sensitive for the ice model,
 so we overwrite the intrinsinc function with our own function simply performing :   \\
@@ -264,15 +283,15 @@
 some computers/compilers.
 
-
+%% =================================================================================================
 \subsection{MPP reproducibility}
 \label{subsec:MISC_glosum}
 
 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_JSC01} review of different technics,
+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$.
@@ -292,6 +311,7 @@
 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}
 \label{subsec:MISC_mppsca}
@@ -313,21 +333,22 @@
 be set at all the locations actually required by each individual for the fold operation.
 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 ({\bf nammpp}).
+is recommended for large values of \np{jpni}{jpni}.
+The new method is activated by setting \np{ln_nnogather}{ln\_nnogather} to be true (\nam{mpp}{mpp}).
 The reproducibility of results using the two methods should be confirmed for each new,
 non-reference configuration.
 
-% ================================================================
-% Model optimisation, Control Print and Benchmark
-% ================================================================
+%% =================================================================================================
 \section{Model optimisation, control print and benchmark}
 \label{sec:MISC_opt}
-%--------------------------------------------namctl-------------------------------------------------------
-
-\nlst{namctl} 
-%--------------------------------------------------------------------------------------------------------------
-
-Options are defined through the  \ngn{namctl} namelist variables.
-
+
+\begin{listing}
+  \nlst{namctl}
+  \caption{\forcode{&namctl}}
+  \label{lst:namctl}
+\end{listing}
+
+Options are defined through the  \nam{ctl}{ctl} namelist variables.
+
+%% =================================================================================================
 \subsection{Vector optimisation}
 
@@ -335,24 +356,25 @@
 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}
 
-The \np{ln\_ctl} switch was originally used as a debugging option in two modes:
+The \np{ln_ctl}{ln\_ctl} switch was originally used as a debugging option in two modes:
 
 \begin{enumerate}
-\item{\np{ln\_ctl}: compute and print the trends averaged over the interior domain in all TRA, DYN, LDF and
+\item {\np{ln_ctl}{ln\_ctl}: compute and print the trends averaged over the interior domain in all TRA, DYN, LDF and
 ZDF modules.
 This option is very helpful when diagnosing the origin of an undesired change in model results. }
 
-\item{also \np{ln\_ctl} but using the nictl and njctl namelist parameters to check the source of differences between
+\item {also \np{ln_ctl}{ln\_ctl} but using the nictl and njctl namelist parameters to check the source of differences between
 mono and multi processor runs.}
 \end{enumerate}
 
 However, in recent versions it has also been used to force all processors to assume the
-reporting role. Thus when \np{ln\_ctl} is true all processors produce their own versions
+reporting role. Thus when \np{ln_ctl}{ln\_ctl} is true all processors produce their own versions
 of files such as: ocean.output, layout.dat, etc.  All such files, beyond the the normal
 reporting processor (narea == 1), are named with a \_XXXX extension to their name, where
@@ -360,5 +382,5 @@
 such as run.stat (and its netCDF counterpart: run.stat.nc) and tracer.stat contain global
 information and are only ever produced by the reporting master (narea == 1). For version
-4.0 a start has been made to return \np{ln\_ctl} to its original function by introducing
+4.0 a start has been made to return \np{ln_ctl}{ln\_ctl} to its original function by introducing
 a new control structure which allows finer control over which files are produced. This
 feature is still evolving but it does already allow the user to: select individually the
@@ -386,15 +408,12 @@
 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.
 
-% ================================================================
-\biblio
-
-\pindex
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_model_basics.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_model_basics.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_model_basics.tex	(revision 11831)
@@ -3,87 +3,97 @@
 \begin{document}
 
-% ================================================================
-% Chapter 1  Model Basics
-% ================================================================
 \chapter{Model Basics}
-\label{chap:PE}
-\minitoc
-
-\newpage
-
-% ================================================================
-% Primitive Equations
-% ================================================================
+\label{chap:MB}
+
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabular}{l||l|l}
+    Release          & Author(s)                                   & Modifications       \\
+    \hline
+    {\em        4.0} & {\em Mike Bell                            } & {\em Review       } \\
+    {\em        3.6} & {\em Tim Graham and Gurvan Madec          } & {\em Updates      } \\
+    {\em $\leq$ 3.4} & {\em Gurvan Madec and S\'{e}bastien Masson} & {\em First version} \\
+  \end{tabular}
+}
+
+\clearpage
+
+%% =================================================================================================
 \section{Primitive equations}
-\label{sec:PE_PE}
-
-% -------------------------------------------------------------------------------------------------------------
-%        Vector Invariant Formulation 
-% -------------------------------------------------------------------------------------------------------------
-
+\label{sec:MB_PE}
+
+%% =================================================================================================
 \subsection{Vector invariant formulation}
-\label{subsec:PE_Vector}
+\label{subsec:MB_PE_vector}
 
 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:
 
-\begin{enumerate}
-\item
-  \textit{spherical earth approximation}: the geopotential surfaces are assumed to be spheres so that
-  gravity (local vertical) is parallel to the earth's radius
-\item
-  \textit{thin-shell approximation}: the ocean depth is neglected compared to the earth's radius
-\item
-  \textit{turbulent closure hypothesis}: the turbulent fluxes
+\begin{labeling}{Neglect of additional Coriolis terms}
+\item [\textit{Spherical Earth approximation}] The geopotential surfaces are assumed to
+  be oblate spheroids 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}.
+\item [\textit{Thin-shell approximation}] The ocean depth is neglected compared to the earth's radius
+\item [\textit{Turbulent closure hypothesis}] The turbulent fluxes
   (which represent the effect of small scale processes on the large-scale)
   are expressed in terms of large-scale features
-\item
-  \textit{Boussinesq hypothesis}: density variations are neglected except in their contribution to
-  the buoyancy force
+\item [\textit{Boussinesq hypothesis}] Density variations are neglected except in
+  their contribution to the buoyancy force
   \begin{equation}
-    \label{eq:PE_eos}
+    \label{eq:MB_PE_eos}
     \rho = \rho \ (T,S,p)
   \end{equation}
-\item
-  \textit{Hydrostatic hypothesis}: the vertical momentum equation is reduced to a balance between
-  the vertical pressure gradient and the buoyancy force
+\item [\textit{Hydrostatic hypothesis}] The vertical momentum equation is reduced to
+  a balance between the vertical pressure gradient and the buoyancy force
   (this removes convective processes from the initial Navier-Stokes equations and so
   convective processes must be parameterized instead)
   \begin{equation}
-    \label{eq:PE_hydrostatic}
+    \label{eq:MB_PE_hydrostatic}
     \pd[p]{z} = - \rho \ g
   \end{equation}
-\item
-  \textit{Incompressibility hypothesis}: the three dimensional divergence of the velocity vector $\vect U$
-  is assumed to be zero.
+\item [\textit{Incompressibility hypothesis}] The three dimensional divergence of
+  the velocity vector $\vect U$ is assumed to be zero.
   \begin{equation}
-    \label{eq:PE_continuity}
+    \label{eq:MB_PE_continuity}
     \nabla \cdot \vect U = 0
   \end{equation}
-\end{enumerate}
+\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-V\"{a}is\"{a}l\"{a} 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.
+\end{labeling}
 
 Because the gravitational force is so dominant in the equations of large-scale motions,
-it is useful to choose an orthogonal set of unit vectors $(i,j,k)$ linked to the earth such that
+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.
-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), 
+\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),
 $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
 the following equations:
 \begin{subequations}
-  \label{eq:PE}
+  \label{eq:MB_PE}
   \begin{gather}
-    \intertext{$-$ the momentum balance}
-    \label{eq:PE_dyn}
-    \pd[\vect U_h]{t} = - \lt[ (\nabla \times \vect U) \times \vect U + \frac{1}{2} \nabla \lt( \vect U^2 \rt) \rt]_h
-                        - f \; k \times \vect U_h - \frac{1}{\rho_o} \nabla_h p
-                        + \vect D^{\vect U} + \vect F^{\vect U} \\
-    \intertext{$-$ the heat and salt conservation equations}
-    \label{eq:PE_tra_T}
+    \shortintertext{$-$ the momentum balance}
+    \label{eq:MB_PE_dyn}
+    \pd[\vect U_h]{t} = - \lt[ (\nabla \times \vect U) \times \vect U + \frac{1}{2} \nabla \lt( \vect U^2 \rt) \rt]_h - f \; k \times \vect U_h - \frac{1}{\rho_o} \nabla_h p + \vect D^{\vect U} + \vect F^{\vect U}
+    \shortintertext{$-$ the heat and salt conservation equations}
+    \label{eq:MB_PE_tra_T}
     \pd[T]{t} = - \nabla \cdot (T \ \vect U) + D^T + F^T \\
-    \label{eq:PE_tra_S}
+    \label{eq:MB_PE_tra_S}
     \pd[S]{t} = - \nabla \cdot (S \ \vect U) + D^S + F^S
   \end{gather}
@@ -91,198 +101,193 @@
 where $\nabla$ is the generalised derivative vector operator in $(i,j,k)$ directions, $t$ is the time,
 $z$ is the vertical coordinate, $\rho$ is the \textit{in situ} density given by the equation of state
-(\autoref{eq:PE_eos}), $\rho_o$ is a reference density, $p$ the pressure,
+(\autoref{eq:MB_PE_eos}), $\rho_o$ is a reference density, $p$ the pressure,
 $f = 2 \vect \Omega \cdot k$ is the Coriolis acceleration
-(where $\vect \Omega$ is the Earth's angular velocity vector), and $g$ is the gravitational acceleration.
+(where $\vect \Omega$ is the Earth's angular velocity vector),
+and $g$ is the gravitational acceleration.
 $\vect D^{\vect U}$, $D^T$ and $D^S$ are the parameterisations of small-scale physics for momentum,
 temperature and salinity, and $\vect F^{\vect U}$, $F^T$ and $F^S$ surface forcing terms.
-Their nature and formulation are discussed in \autoref{sec:PE_zdf_ldf} and \autoref{subsec:PE_boundary_condition}.
-
-% -------------------------------------------------------------------------------------------------------------
-% Boundary condition
-% -------------------------------------------------------------------------------------------------------------
+Their nature and formulation are discussed in \autoref{sec:MB_zdf_ldf} and
+\autoref{subsec:MB_boundary_condition}.
+
+%% =================================================================================================
 \subsection{Boundary conditions}
-\label{subsec:PE_boundary_condition}
+\label{subsec:MB_boundary_condition}
 
 An ocean is bounded by complex coastlines, bottom topography at its base and
 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.
-Both $H$ and $\eta$ are usually referenced to a given surface, $z = 0$, chosen as a mean sea surface
-(\autoref{fig:ocean_bc}).
-Through these two boundaries, the ocean can exchange fluxes of heat, fresh water, salt, and momentum with
-the solid earth, the continental margins, the sea ice and the atmosphere.
-However, some of these fluxes are so weak that even on climatic time scales of thousands of years
-they can be neglected.
+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:MB_ocean_bc}).
+Through these two boundaries, the ocean can exchange fluxes of heat, fresh water, salt,
+and momentum with the solid earth, the continental margins, the sea ice and the atmosphere.
+However, some of these fluxes are so weak that
+even on climatic time scales of thousands of years they can be neglected.
 In the following, we briefly review the fluxes exchanged at the interfaces between the ocean and
 the other components of the earth system.
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!ht]
-  \begin{center}
-    \includegraphics[]{Fig_I_ocean_bc}
-    \caption{
-      \protect\label{fig:ocean_bc}
-      The ocean is bounded by two surfaces, $z = - H(i,j)$ and $z = \eta(i,j,t)$,
-      where $H$ is the depth of the sea floor and $\eta$ the height of the sea surface.
-      Both $H$ and $\eta$ are referenced to $z = 0$.
-    }
-  \end{center}
+\begin{figure}
+  \centering
+  \includegraphics[width=0.66\textwidth]{MB_ocean_bc}
+  \caption[Ocean boundary conditions]{
+    The ocean is bounded by two surfaces, $z = - H(i,j)$ and $z = \eta(i,j,t)$,
+    where $H$ is the depth of the sea floor and $\eta$ the height of the sea surface.
+    Both $H$ and $\eta$ are referenced to $z = 0$.}
+  \label{fig:MB_ocean_bc}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
 \begin{description}
-\item[Land - ocean interface:]
-  the major flux between continental margins and the ocean is a mass exchange of fresh water through river runoff.
+\item [Land - ocean] The major flux between continental margins and the ocean is a mass exchange of
+  fresh water through river runoff.
   Such an exchange modifies the sea surface salinity especially in the vicinity of major river mouths.
-  It can be neglected for short range integrations but has to be taken into account for long term integrations as
+  It can be neglected for short range integrations but
+  has to be taken into account for long term integrations as
   it influences the characteristics of water masses formed (especially at high latitudes).
   It is required in order to close the water cycle of the climate system.
-  It is usually specified as a fresh water flux at the air-sea interface in the vicinity of river mouths.
-\item[Solid earth - ocean interface:]
-  heat and salt fluxes through the sea floor are small, except in special areas of little extent.
-  They are usually neglected in the model
-  \footnote{
+  It is usually specified as a fresh water flux at the air-sea interface in
+  the vicinity of river mouths.
+\item [Solid earth - ocean] Heat and salt fluxes through the sea floor are small,
+  except in special areas of little extent.
+  They are usually neglected in the model \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
-    (see \autoref{subsec:TRA_bbc}).
+    (\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,
-  the bottom velocity is parallel to solid boundaries). This kinematic boundary condition
-  can be expressed as:
+  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, the bottom velocity is parallel to solid boundaries).
+  This kinematic boundary condition can be expressed as:
   \begin{equation}
-    \label{eq:PE_w_bbc}
+    \label{eq:MB_w_bbc}
     w = - \vect U_h \cdot \nabla_h (H)
   \end{equation}
   In addition, the ocean exchanges momentum with the earth through frictional processes.
   Such momentum transfer occurs at small scales in a boundary layer.
-  It must be parameterized in terms of turbulent fluxes using bottom and/or lateral boundary conditions.
+  It must be parameterized in terms of turbulent fluxes using
+  bottom and/or lateral boundary conditions.
   Its specification depends on the nature of the physical parameterisation used for
-  $\vect D^{\vect U}$ in \autoref{eq:PE_dyn}.
-  It is discussed in \autoref{eq:PE_zdf}.% and Chap. III.6 to 9.
-\item[Atmosphere - ocean interface:]
-  the kinematic surface condition plus the mass flux of fresh water PE (the precipitation minus evaporation budget)
-  leads to:
+  $\vect D^{\vect U}$ in \autoref{eq:MB_PE_dyn}.
+  It is discussed in \autoref{eq:MB_zdf}. % and Chap. III.6 to 9.
+\item [Atmosphere - ocean] The kinematic surface condition plus the mass flux of fresh water PE
+  (the precipitation minus evaporation budget) leads to:
   \[
-    % \label{eq:PE_w_sbc}
+    % \label{eq:MB_w_sbc}
     w = \pd[\eta]{t} + \lt. \vect U_h \rt|_{z = \eta} \cdot \nabla_h (\eta) + P - E
   \]
-  The dynamic boundary condition, neglecting the surface tension (which removes capillary waves from the system)
-  leads to the continuity of pressure across the interface $z = \eta$.
+  The dynamic boundary condition, neglecting the surface tension
+  (which removes capillary waves from the system) leads to
+  the continuity of pressure across the interface $z = \eta$.
   The atmosphere and ocean also exchange horizontal momentum (wind stress), and heat.
-\item[Sea ice - ocean interface:]
-  the ocean and sea ice exchange heat, salt, fresh water and momentum.
+\item [Sea ice - ocean] The ocean and sea ice exchange heat, salt, fresh water and momentum.
   The sea surface temperature is constrained to be at the freezing point at the interface.
   Sea ice salinity is very low ($\sim4-6 \, psu$) compared to those of the ocean ($\sim34 \, psu$).
-  The cycle of freezing/melting is associated with fresh water and salt fluxes that cannot be neglected.
+  The cycle of freezing/melting is associated with fresh water and salt fluxes that
+  cannot be neglected.
 \end{description}
 
-% ================================================================
-% The Horizontal Pressure Gradient
-% ================================================================
+%% =================================================================================================
 \section{Horizontal pressure gradient}
-\label{sec:PE_hor_pg}
-
-% -------------------------------------------------------------------------------------------------------------
-% Pressure Formulation
-% -------------------------------------------------------------------------------------------------------------
+\label{sec:MB_hor_pg}
+
+%% =================================================================================================
 \subsection{Pressure formulation}
-\label{subsec:PE_p_formulation}
+\label{subsec:MB_p_formulation}
 
 The total pressure at a given depth $z$ is composed of a surface pressure $p_s$ at
 a reference geopotential surface ($z = 0$) and a hydrostatic pressure $p_h$ such that:
 $p(i,j,k,t) = p_s(i,j,t) + p_h(i,j,k,t)$.
-The latter is computed by integrating (\autoref{eq:PE_hydrostatic}),
-assuming that pressure in decibars can be approximated by depth in meters in (\autoref{eq:PE_eos}).
+The latter is computed by integrating (\autoref{eq:MB_PE_hydrostatic}),
+assuming that pressure in decibars can be approximated by depth in meters in (\autoref{eq:MB_PE_eos}).
 The hydrostatic pressure is then given by:
 \[
-  % \label{eq:PE_pressure}
+  % \label{eq:MB_pressure}
   p_h (i,j,z,t) = \int_{\varsigma = z}^{\varsigma = 0} g \; \rho (T,S,\varsigma) \; d \varsigma
 \]
 Two strategies can be considered for the surface pressure term:
-$(a)$ introduce of a  new variable $\eta$, the free-surface elevation,
+\begin{enumerate*}[label=(\textit{\alph*})]
+\item introduce of a new variable $\eta$, the free-surface elevation,
 for which a prognostic equation can be established and solved;
-$(b)$ assume that the ocean surface is a rigid lid,
+\item assume that the ocean surface is a rigid lid,
 on which the pressure (or its horizontal gradient) can be diagnosed.
+\end{enumerate*}
 When the former strategy is used, one solution of the free-surface elevation consists of
 the excitation of external gravity waves.
 The flow is barotropic and the surface moves up and down with gravity as the restoring force.
 The phase speed of such waves is high (some hundreds of metres per second) so that
-the time step would have to be very short if they were present in the model.
+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.
-Only the free surface formulation is now described in the this document (see the next sub-section).
-
-% -------------------------------------------------------------------------------------------------------------
-% Free Surface Formulation
-% -------------------------------------------------------------------------------------------------------------
+It has been available until the release 3.1 of \NEMO,
+and it has been removed in release 3.2 and followings.
+Only the free surface formulation is now described in this document (see the next sub-section).
+
+%% =================================================================================================
 \subsection{Free surface formulation}
-\label{subsec:PE_free_surface}
+\label{subsec:MB_free_surface}
 
 In the free surface formulation, a variable $\eta$, the sea-surface height,
 is introduced which describes the shape of the air-sea interface.
-This variable is solution of a prognostic equation which is established by forming the vertical average of
-the kinematic surface condition (\autoref{eq:PE_w_bbc}):
+This variable is solution of a prognostic equation which is established by
+forming the vertical average of the kinematic surface condition (\autoref{eq:MB_w_bbc}):
 \begin{equation}
-  \label{eq:PE_ssh}
+  \label{eq:MB_ssh}
   \pd[\eta]{t} = - D + P - E \quad \text{where} \quad D = \nabla \cdot \lt[ (H + \eta) \; \overline{U}_h \, \rt]
 \end{equation}
-and using (\autoref{eq:PE_hydrostatic}) the surface pressure is given by: $p_s = \rho \, g \, \eta$.
-
-Allowing the air-sea interface to move introduces the external gravity waves (EGWs) as
+and using (\autoref{eq:MB_PE_hydrostatic}) the surface pressure is given by:
+$p_s = \rho \, g \, \eta$.
+
+Allowing the air-sea interface to move introduces
+the \textbf{E}xternal \textbf{G}ravity \textbf{W}aves (EGWs) as
 a class of solution of the primitive equations.
-These waves are barotropic because of hydrostatic assumption, 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.
 
 Two choices can be made regarding the implementation of the free surface in the model,
 depending on the physical processes of interest.
-
-$\bullet$ If one is interested in EGWs, in particular the tides and their interaction with
-the baroclinic structure of the ocean (internal waves) possibly in shallow seas,
-then a non linear free surface is the most appropriate.
-This means that no approximation is made in \autoref{eq:PE_ssh} and that
-the variation of the ocean volume is fully taken into account.
-Note that in order to study the fast time scales associated with EGWs it is necessary to
-minimize time filtering effects
-(use an explicit time scheme with very small time step, or a split-explicit scheme with reasonably small time step,
-see \autoref{subsec:DYN_spg_exp} or \autoref{subsec:DYN_spg_ts}).
-
-$\bullet$ If one is not interested in EGW but rather sees them as high frequency noise,
-it is possible to apply an explicit filter to slow down the fastest waves while
-not altering the slow barotropic Rossby waves.
-If further, an approximative conservation of heat and salt contents is sufficient for the problem solved,
-then it is sufficient to solve a linearized version of \autoref{eq:PE_ssh},
-which still allows to take into account freshwater fluxes applied at the ocean surface \citep{Roullet_Madec_JGR00}.
-Nevertheless, with the linearization, an exact conservation of heat and salt contents is lost.
-
-The filtering of EGWs in models with a free surface is usually a matter of discretisation of
-the temporal derivatives,
-using a split-explicit method \citep{Killworth_al_JPO91, Zhang_Endoh_JGR92} or
-the implicit scheme \citep{Dukowicz1994} or
-the addition of a filtering force in the momentum equation \citep{Roullet_Madec_JGR00}.
-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}
-(see \autoref{subsec:DYN_spg_ts}).
-
-% ================================================================
-% Curvilinear z-coordinate System
-% ================================================================
-\section{Curvilinear \textit{z-}coordinate system}
-\label{sec:PE_zco}
-
-% -------------------------------------------------------------------------------------------------------------
-% Tensorial Formalism
-% -------------------------------------------------------------------------------------------------------------
+\begin{itemize}
+\item If one is interested in EGWs, in particular the tides and their interaction with
+  the baroclinic structure of the ocean (internal waves) possibly in shallow seas,
+  then a non linear free surface is the most appropriate.
+  This means that no approximation is made in \autoref{eq:MB_ssh} and that
+  the variation of the ocean volume is fully taken into account.
+  Note that in order to study the fast time scales associated with EGWs it is necessary to
+  minimize time filtering effects
+  (use an explicit time scheme with very small time step,
+  or a split-explicit scheme with reasonably small time step,
+  see \autoref{subsec:DYN_spg_exp} or \autoref{subsec:DYN_spg_ts}).
+\item If one is not interested in EGWs but rather sees them as high frequency noise,
+  it is possible to apply an explicit filter to slow down the fastest waves while
+  not altering the slow barotropic Rossby waves.
+  If further, an approximative conservation of heat and salt contents is sufficient for
+  the problem solved, then it is sufficient to solve a linearized version of \autoref{eq:MB_ssh},
+  which still allows to take into account freshwater fluxes applied at the ocean surface
+  \citep{roullet.madec_JGR00}.
+  Nevertheless, with the linearization, an exact conservation of heat and salt contents is lost.
+\end{itemize}
+The filtering of EGWs in models with a free surface is usually
+a matter of discretisation of the temporal derivatives,
+using a split-explicit method \citep{killworth.webb.ea_JPO91, zhang.endoh_JGR92} or
+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 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} (see \autoref{subsec:DYN_spg_ts}).
+
+%% =================================================================================================
+\section{Curvilinear \textit{z}-coordinate system}
+\label{sec:MB_zco}
+
+%% =================================================================================================
 \subsection{Tensorial formalism}
-\label{subsec:PE_tensorial}
+\label{subsec:MB_tensorial}
 
 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.
@@ -292,11 +297,15 @@
 cannot be easily treated in a global model without filtering.
 A solution consists of introducing an appropriate coordinate transformation that
-shifts the singular point onto land \citep{Madec_Imbard_CD96, Murray_JCP96}.
-As a consequence, it is important to solve the primitive equations in various curvilinear coordinate systems.
-An efficient way of introducing an appropriate coordinate transform can be found when using a tensorial formalism.
+shifts the singular point onto land \citep{madec.imbard_CD96, murray_JCP96}.
+As a consequence,
+it is important to solve the primitive equations in various curvilinear coordinate systems.
+An efficient way of introducing an appropriate coordinate transform can be found when
+using a tensorial formalism.
 This formalism is suited to any multidimensional curvilinear coordinate system.
-Ocean modellers mainly use three-dimensional orthogonal grids on the sphere (spherical earth approximation),
-with preservation of the local vertical. Here we give the simplified equations for this particular case.
-The general case is detailed by \citet{Eiseman1980} in their survey of the conservation laws of fluid dynamics.
+Ocean modellers mainly use three-dimensional orthogonal grids on the sphere
+(spherical earth approximation), with preservation of the local vertical.
+Here we give the simplified equations for this particular case.
+The general case is detailed by \citet{eiseman.stone_SR80} in
+their survey of the conservation laws of fluid dynamics.
 
 Let $(i,j,k)$ be a set of orthogonal curvilinear coordinates on
@@ -304,157 +313,132 @@
 $(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:MB_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
 the distance from the centre of the earth $a + z(k)$ where $a$ is the earth's radius and
-$z$ the altitude above a reference sea level (\autoref{fig:referential}).
+$z$ the altitude above a reference sea level (\autoref{fig:MB_referential}).
 The local deformation of the curvilinear coordinate system is given by $e_1$, $e_2$ and $e_3$,
 the three scale factors:
 \begin{equation}
-  \label{eq:scale_factors}
-  \begin{aligned}
-    e_1 &= (a + z) \lt[ \lt( \pd[\lambda]{i} \cos \varphi \rt)^2 + \lt( \pd[\varphi]{i} \rt)^2 \rt]^{1/2} \\
-    e_2 &= (a + z) \lt[ \lt( \pd[\lambda]{j} \cos \varphi \rt)^2 + \lt( \pd[\varphi]{j} \rt)^2 \rt]^{1/2} \\
-    e_3 &= \lt( \pd[z]{k} \rt)
-  \end{aligned}
+  \label{eq:MB_scale_factors}
+    e_1 = (a + z) \lt[ \lt( \pd[\lambda]{i} \cos \varphi \rt)^2 + \lt( \pd[\varphi]{i} \rt)^2 \rt]^{1/2} \quad e_2 = (a + z) \lt[ \lt( \pd[\lambda]{j} \cos \varphi \rt)^2 + \lt( \pd[\varphi]{j} \rt)^2 \rt]^{1/2} \quad e_3 = \lt( \pd[z]{k} \rt)
 \end{equation}
 
-% >>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!tb]
-  \begin{center}
-    \includegraphics[]{Fig_I_earth_referential}
-    \caption{
-      \protect\label{fig:referential}
-      the geographical coordinate system $(\lambda,\varphi,z)$ and the curvilinear
-      coordinate system $(i,j,k)$.
-    }
-  \end{center}
+\begin{figure}
+  \centering
+  \includegraphics[width=0.33\textwidth]{MB_earth_referential}
+  \caption[Geographical and curvilinear coordinate systems]{
+    the geographical coordinate system $(\lambda,\varphi,z)$ and the curvilinear
+    coordinate system $(i,j,k)$.}
+  \label{fig:MB_referential}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
 Since the ocean depth is far smaller than the earth's radius, $a + z$, can be replaced by $a$ in
-(\autoref{eq:scale_factors}) (thin-shell approximation).
+(\autoref{eq:MB_scale_factors}) (thin-shell approximation).
 The resulting horizontal scale factors $e_1$, $e_2$  are independent of $k$ while
 the vertical scale factor is a single function of $k$ as $k$ is parallel to $z$.
 The scalar and vector operators that appear in the primitive equations
-(\autoref{eq:PE_dyn} to \autoref{eq:PE_eos}) can be written in the tensorial form,
+(\autoref{eq:MB_PE_dyn} to \autoref{eq:MB_PE_eos}) can then be written in the tensorial form,
 invariant in any orthogonal horizontal curvilinear coordinate system transformation:
 \begin{subequations}
-  % \label{eq:PE_discrete_operators}
-  \begin{gather}
-    \label{eq:PE_grad}
-    \nabla q =   \frac{1}{e_1} \pd[q]{i} \; \vect i
-               + \frac{1}{e_2} \pd[q]{j} \; \vect j
-               + \frac{1}{e_3} \pd[q]{k} \; \vect k \\
-    \label{eq:PE_div}
-    \nabla \cdot \vect A =   \frac{1}{e_1 \; e_2} \lt[ \pd[(e_2 \; a_1)]{\partial i} + \pd[(e_1 \; a_2)]{j} \rt]
-                           + \frac{1}{e_3} \lt[ \pd[a_3]{k} \rt]
-  \end{gather}
-  \begin{multline}
-    \label{eq:PE_curl}
-      \nabla \times \vect{A} =   \lt[ \frac{1}{e_2} \pd[a_3]{j} - \frac{1}{e_3} \pd[a_2]{k}   \rt] \vect i \\
-                               + \lt[ \frac{1}{e_3} \pd[a_1]{k} - \frac{1}{e_1} \pd[a_3]{i}   \rt] \vect j \\
-                               + \frac{1}{e_1 e_2} \lt[ \pd[(e_2 a_2)]{i} - \pd[(e_1 a_1)]{j} \rt] \vect k
-  \end{multline}
-  \begin{gather}
-    \label{eq:PE_lap}
-    \Delta q = \nabla \cdot (\nabla q) \\
-    \label{eq:PE_lap_vector}
-    \Delta \vect A = \nabla (\nabla \cdot \vect A) - \nabla \times (\nabla \times \vect A)
-  \end{gather}
+  % \label{eq:MB_discrete_operators}
+  \begin{align}
+    \label{eq:MB_grad}
+    \nabla q &=   \frac{1}{e_1} \pd[q]{i} \; \vect i + \frac{1}{e_2} \pd[q]{j} \; \vect j + \frac{1}{e_3} \pd[q]{k} \; \vect k \\
+    \label{eq:MB_div}
+    \nabla \cdot \vect A &=   \frac{1}{e_1 \; e_2} \lt[ \pd[(e_2 \; a_1)]{\partial i} + \pd[(e_1 \; a_2)]{j} \rt] + \frac{1}{e_3} \lt[ \pd[a_3]{k} \rt] \\
+    \label{eq:MB_curl}
+      \nabla \times \vect{A} &=   \lt[ \frac{1}{e_2} \pd[a_3]{j} - \frac{1}{e_3} \pd[a_2]{k}   \rt] \vect i + \lt[ \frac{1}{e_3} \pd[a_1]{k} - \frac{1}{e_1} \pd[a_3]{i}   \rt] \vect j + \frac{1}{e_1 e_2} \lt[ \pd[(e_2 a_2)]{i} - \pd[(e_1 a_1)]{j} \rt] \vect k \\
+    \label{eq:MB_lap}
+    \Delta q &= \nabla \cdot (\nabla q) \\
+    \label{eq:MB_lap_vector}
+    \Delta \vect A &= \nabla (\nabla \cdot \vect A) - \nabla \times (\nabla \times \vect A)
+  \end{align}
 \end{subequations}
-where $q$ is a scalar quantity and $\vect A = (a_1,a_2,a_3)$ a vector in the $(i,j,k)$ coordinates system.
-
-% -------------------------------------------------------------------------------------------------------------
-% Continuous Model Equations
-% -------------------------------------------------------------------------------------------------------------
+where $q$ is a scalar quantity and
+$\vect A = (a_1,a_2,a_3)$ a vector in the $(i,j,k)$ coordinates system.
+
+%% =================================================================================================
 \subsection{Continuous model equations}
-\label{subsec:PE_zco_Eq}
+\label{subsec:MB_zco_Eq}
 
 In order to express the Primitive Equations in tensorial formalism,
-it is necessary to compute the horizontal component of the non-linear and viscous terms of the equation using
-\autoref{eq:PE_grad}) to \autoref{eq:PE_lap_vector}.
-Let us set $\vect U = (u,v,w) = \vect U_h + w \; \vect k $, the velocity in the $(i,j,k)$ coordinates system and
-define the relative vorticity $\zeta$ and the divergence of the horizontal velocity field $\chi$, by:
+it is necessary to compute the horizontal component of the non-linear and viscous terms of
+the equation using \autoref{eq:MB_grad}) to \autoref{eq:MB_lap_vector}.
+Let us set $\vect U = (u,v,w) = \vect U_h + w \; \vect k $,
+the velocity in the $(i,j,k)$ coordinates system,
+and define the relative vorticity $\zeta$ and the divergence of the horizontal velocity field $\chi$,
+by:
 \begin{gather}
-  \label{eq:PE_curl_Uh}
+  \label{eq:MB_curl_Uh}
   \zeta = \frac{1}{e_1 e_2} \lt[ \pd[(e_2 \, v)]{i} - \pd[(e_1 \, u)]{j} \rt] \\
-  \label{eq:PE_div_Uh}
+  \label{eq:MB_div_Uh}
   \chi  = \frac{1}{e_1 e_2} \lt[ \pd[(e_2 \, u)]{i} + \pd[(e_1 \, v)]{j} \rt]
 \end{gather}
 
-Using the fact that the horizontal scale factors $e_1$ and $e_2$ are independent of $k$ and that
+Using again the fact that the horizontal scale factors $e_1$ and $e_2$ are independent of $k$ and that
 $e_3$  is a function of the single variable $k$,
-$NLT$ the nonlinear term of \autoref{eq:PE_dyn} can be transformed as follows:
-\begin{alignat*}{2}
-  &NLT &=   &\lt[ (\nabla \times {\vect U}) \times {\vect U} + \frac{1}{2} \nabla \lt( {\vect U}^2 \rt) \rt]_h \\
-  &    &=   &\lt(
-    \begin{array}{*{20}c}
-                \lt[ \frac{1}{e_3} \pd[u]{k} - \frac{1}{e_1} \pd[w]{i} \rt] w - \zeta \; v   \\
-                \zeta \; u - \lt[ \frac{1}{e_2} \pd[w]{j} - \frac{1}{e_3} \pd[v]{k} \rt] \ w
-    \end{array}
-                                                                                             \rt)
-          + \frac{1}{2} \lt(
-	 \begin{array}{*{20}c}
-                             \frac{1}{e_1} \pd[(u^2 + v^2 + w^2)]{i} \\
-                             \frac{1}{e_2} \pd[(u^2 + v^2 + w^2)]{j}
-    \end{array}
-                                                                     \rt) \\
-  &    &=   &\lt(
-    \begin{array}{*{20}c}
-                  -\zeta \; v \\
-                   \zeta \; u
-    \end{array}
-                              \rt)
-          + \frac{1}{2} \lt(
-	 \begin{array}{*{20}c}
-                             \frac{1}{e_1} \pd[(u^2 + v^2)]{i} \\
-                             \frac{1}{e_2} \pd[(u^2 + v^2)]{j}
-    \end{array}
-                                                               \rt) \\
-  &    &  &+ \frac{1}{e_3} \lt(
-	 \begin{array}{*{20}c}
-                                w \; \pd[u]{k} \\
-                                w \; \pd[v]{k}
-    \end{array}
-                                               \rt)
-           - \lt(
-	 \begin{array}{*{20}c}
-	               \frac{w}{e_1} \pd[w]{i} - \frac{1}{2 e_1} \pd[w^2]{i} \\
-                  \frac{w}{e_2} \pd[w]{j} - \frac{1}{2 e_2} \pd[w^2]{j}
-    \end{array}
-                                                                        \rt)
-\end{alignat*}
-The last term of the right hand side is obviously zero, and thus the nonlinear term of
-\autoref{eq:PE_dyn} is written in the $(i,j,k)$ coordinate system:
+$NLT$ the nonlinear term of \autoref{eq:MB_PE_dyn} can be transformed as follows:
+\begin{align*}
+  NLT &= \lt[ (\nabla \times {\vect U}) \times {\vect U} + \frac{1}{2} \nabla \lt( {\vect U}^2 \rt) \rt]_h \\
+      &= \lt(
+        \begin{array}{*{20}c}
+          \lt[ \frac{1}{e_3} \pd[u]{k} - \frac{1}{e_1} \pd[w]{i} \rt] w - \zeta \; v   \\
+          \zeta \; u - \lt[ \frac{1}{e_2} \pd[w]{j} - \frac{1}{e_3} \pd[v]{k} \rt] \ w
+        \end{array}
+  \rt)
+  + \frac{1}{2} \lt(
+  \begin{array}{*{20}c}
+    \frac{1}{e_1} \pd[(u^2 + v^2 + w^2)]{i} \\
+    \frac{1}{e_2} \pd[(u^2 + v^2 + w^2)]{j}
+  \end{array}
+  \rt) \\
+      &= \lt(
+        \begin{array}{*{20}c}
+          -\zeta \; v \\
+          \zeta \; u
+        \end{array}
+  \rt)
+  + \frac{1}{2} \lt(
+  \begin{array}{*{20}c}
+    \frac{1}{e_1} \pd[(u^2 + v^2)]{i} \\
+    \frac{1}{e_2} \pd[(u^2 + v^2)]{j}
+  \end{array}
+  \rt)
+  + \frac{1}{e_3} \lt(
+  \begin{array}{*{20}c}
+    w \; \pd[u]{k} \\
+    w \; \pd[v]{k}
+  \end{array}
+  \rt)
+  - \lt(
+  \begin{array}{*{20}c}
+    \frac{w}{e_1} \pd[w]{i} - \frac{1}{2 e_1} \pd[w^2]{i} \\
+    \frac{w}{e_2} \pd[w]{j} - \frac{1}{2 e_2} \pd[w^2]{j}
+  \end{array}
+  \rt)
+\end{align*}
+The last term of the right hand side is obviously zero,
+and thus the \textbf{N}on\textbf{L}inear \textbf{T}erm ($NLT$) of \autoref{eq:MB_PE_dyn} is written in
+the $(i,j,k)$ coordinate system:
 \begin{equation}
-  \label{eq:PE_vector_form}
-  NLT =   \zeta \; \vect k \times \vect U_h + \frac{1}{2} \nabla_h \lt( \vect U_h^2 \rt)
-        + \frac{1}{e_3} w \pd[\vect U_h]{k}
+  \label{eq:MB_vector_form}
+  NLT = \zeta \; \vect k \times \vect U_h + \frac{1}{2} \nabla_h \lt( \vect U_h^2 \rt) + \frac{1}{e_3} w \pd[\vect U_h]{k}
 \end{equation}
 
 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.
-For example, the first component of \autoref{eq:PE_vector_form} (the $i$-component) is transformed as follows:
-\begin{alignat*}{2}
+\ie\ to write it as the divergence of fluxes.
+For example,
+the first component of \autoref{eq:MB_vector_form} (the $i$-component) is transformed as follows:
+\begin{alignat*}{3}
   &NLT_i &= &- \zeta \; v + \frac{1}{2 \; e_1} \pd[ (u^2 + v^2) ]{i} + \frac{1}{e_3} w \ \pd[u]{k} \\
-  &      &=  &\frac{1}{e_1 \; e_2} \lt( -v \pd[(e_2 \, v)]{i} + v \pd[(e_1 \, u)]{j} \rt)
-            + \frac{1}{e_1 e_2} \lt( e_2 \; u \pd[u]{i} + e_2 \; v \pd[v]{i} \rt) \\
-  &      & &+ \frac{1}{e_3} \lt( w \; \pd[u]{k} \rt) \\
-  &      &=  &\frac{1}{e_1 \; e_2} \lt[ - \lt( v^2 \pd[e_2]{i} + e_2 \, v \pd[v]{i} \rt)
-                                     + \lt( \pd[ \lt( e_1 \, u \, v \rt)]{j} -         e_1 \, u \pd[v]{j} \rt) \rt. \\
-  &      &                       &\lt. + \lt( \pd[ \lt( e_2 \, u \, u \rt)]{i} - u \pd[ \lt( e_2 u \rt)]{i} \rt)
-                                     + e_2 v \pd[v]{i}                                                         \rt] \\
+  &      &= &\frac{1}{e_1 \; e_2} \lt( -v \pd[(e_2 \, v)]{i} + v \pd[(e_1 \, u)]{j} \rt) + \frac{1}{e_1 e_2} \lt( e_2 \; u \pd[u]{i} + e_2 \; v \pd[v]{i} \rt) + \frac{1}{e_3} \lt( w \; \pd[u]{k} \rt) \\
+  &      &= &\frac{1}{e_1 \; e_2} \lt[ - \lt( v^2 \pd[e_2]{i} + e_2 \, v \pd[v]{i} \rt) + \lt( \pd[ \lt( e_1 \, u \, v \rt)]{j} - e_1 \, u \pd[v]{j} \rt) \rt. \lt. + \lt( \pd[ \lt( e_2 \, u \, u \rt)]{i} - u \pd[ \lt( e_2 u \rt)]{i} \rt) + e_2 v \pd[v]{i} \rt] \\
   &      & &+ \frac{1}{e_3} \lt( \pd[(w \, u)]{k} - u \pd[w]{k} \rt) \\
-  &      &=  &\frac{1}{e_1 \; e_2} \lt( \pd[(e_2 \, u \, u)]{i} + \pd[(e_1 \, u \, v)]{j} \rt)
-            + \frac{1}{e_3} \pd[(w \, u)]{k} \\
-  &      & &+ \frac{1}{e_1 e_2} \lt[ - u \lt( \pd[(e_1 v)]{j} - v \, \pd[e_1]{j} \rt)
-                                  - u \pd[(e_2 u)]{i}                              \rt]
-            - \frac{1}{e_3} \pd[w]{k} u \\
+  &      &= &\frac{1}{e_1 \; e_2} \lt( \pd[(e_2 \, u \, u)]{i} + \pd[(e_1 \, u \, v)]{j} \rt) + \frac{1}{e_3} \pd[(w \, u)]{k} + \frac{1}{e_1 e_2} \lt[ - u \lt( \pd[(e_1 v)]{j} - v \, \pd[e_1]{j} \rt) - u \pd[(e_2 u)]{i} \rt] - \frac{1}{e_3} \pd[w]{k} u \\
   &      & &+ \frac{1}{e_1 e_2} \lt( - v^2 \pd[e_2]{i} \rt) \\
-  &      &= &\nabla \cdot (\vect U \, u) - (\nabla \cdot \vect U) \ u
-            + \frac{1}{e_1 e_2} \lt( -v^2 \pd[e_2]{i} + u v \, \pd[e_1]{j} \rt) \\
-  \intertext{as $\nabla \cdot {\vect U} \; = 0$ (incompressibility) it comes:}
+  &      &= &\nabla \cdot (\vect U \, u) - (\nabla \cdot \vect U) \ u + \frac{1}{e_1 e_2} \lt( -v^2 \pd[e_2]{i} + u v \, \pd[e_1]{j} \rt) \\
+  \shortintertext{as $\nabla \cdot {\vect U} \; = 0$ (incompressibility) it becomes:}
   &      &= &\, \nabla \cdot (\vect U \, u) + \frac{1}{e_1 e_2} \lt( v \; \pd[e_2]{i} - u \; \pd[e_1]{j} \rt) (-v)
 \end{alignat*}
@@ -462,25 +446,27 @@
 The flux form of the momentum advection term is therefore given by:
 \begin{equation}
-  \label{eq:PE_flux_form}
-  NLT =   \nabla \cdot \lt(
-    \begin{array}{*{20}c}
-                            \vect U \, u \\
-                            \vect U \, v
-    \end{array}
-                                         \rt)
-        + \frac{1}{e_1 e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \vect k \times \vect U_h
+  \label{eq:MB_flux_form}
+  NLT = \nabla \cdot \lt(
+  \begin{array}{*{20}c}
+    \vect U \, u \\
+    \vect U \, v
+  \end{array}
+  \rt)
+  + \frac{1}{e_1 e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \vect k \times \vect U_h
 \end{equation}
 
 The flux form has two terms,
-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 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:
 \[
-  % \label{eq:PE_cor+metric}
+  % \label{eq:MB_cor+metric}
   f \to f + \frac{1}{e_1 e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt)
 \]
 
 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$.
 
@@ -488,77 +474,59 @@
 the following tensorial formalism:
 
-\begin{itemize}
-\item
-  \textbf{Vector invariant form of the momentum equations}:
+\begin{description}
+\item [Vector invariant form of the momentum equations]
   \begin{equation}
-    \label{eq:PE_dyn_vect}
-    \begin{split}
-    % \label{eq:PE_dyn_vect_u}
-      \pd[u]{t} = &+ (\zeta + f) \, v - \frac{1}{2 e_1} \pd[]{i} (u^2 + v^2)
-                   - \frac{1}{e_3} w \pd[u]{k} - \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) \\
-                  &+ 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) \\ 
-                  &+ D_v^{\vect U} + F_v^{\vect U}
-    \end{split}
+    \label{eq:MB_dyn_vect}
+    \begin{gathered}
+    % \label{eq:MB_dyn_vect_u}
+      \pd[u]{t} = + (\zeta + f) \, v - \frac{1}{2 e_1} \pd[]{i} (u^2 + v^2) - \frac{1}{e_3} w \pd[u]{k} - \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) + 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) + D_v^{\vect U} + F_v^{\vect U}
+    \end{gathered}
   \end{equation}
-\item
-  \textbf{flux form of the momentum equations}:
-  % \label{eq:PE_dyn_flux}
-  \begin{multline*}
-    % \label{eq:PE_dyn_flux_u}
-    \pd[u]{t} = + \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, v \\
-                - \frac{1}{e_1 \; e_2} \lt( \pd[(e_2 \, u \, u)]{i} + \pd[(e_1 \, v \, u)]{j} \rt) \\
-                - \frac{1}{e_3} \pd[(w \, u)]{k} - \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt)
-                + D_u^{\vect U} + F_u^{\vect U}
-  \end{multline*}
-  \begin{multline*}
-    % \label{eq:PE_dyn_flux_v}
-    \pd[v]{t} = - \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, u \\
-                + \frac{1}{e_1 \; e_2} \lt( \pd[(e_2 \, u \, v)]{i} + \pd[(e_1 \, v \, v)]{j} \rt) \\
-                - \frac{1}{e_3} \pd[(w \, 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{multline*}
-  where $\zeta$, the relative vorticity, is given by \autoref{eq:PE_curl_Uh} and $p_s$, the surface pressure,
-  is given by:
+\item [Flux form of the momentum equations]
+  % \label{eq:MB_dyn_flux}
+  \begin{alignat*}{2}
+    % \label{eq:MB_dyn_flux_u}
+    \pd[u]{t} = &+ \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, v - \frac{1}{e_1 \; e_2} \lt( \pd[(e_2 \, u \, u)]{i} + \pd[(e_1 \, v \, u)]{j} \rt) - \frac{1}{e_3} \pd[(w \, u)]{k} \\
+    &- \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) + D_u^{\vect U} + F_u^{\vect U}
+  \end{alignat*}
+  \begin{alignat*}{2}
+    % \label{eq:MB_dyn_flux_v}
+    \pd[v]{t} = &- \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, u - \frac{1}{e_1 \; e_2} \lt( \pd[(e_2 \, u \, v)]{i} + \pd[(e_1 \, v \, v)]{j} \rt) - \frac{1}{e_3} \pd[(w \, 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{alignat*}
+  where $\zeta$, the relative vorticity, is given by \autoref{eq:MB_curl_Uh} and
+  $p_s$, the surface pressure, is given by:
   \[
-  % \label{eq:PE_spg}
+  % \label{eq:MB_spg}
     p_s = \rho \,g \, \eta
   \]
-  with $\eta$ is solution of \autoref{eq:PE_ssh}.
+  and $\eta$ is the solution of \autoref{eq:MB_ssh}.
 
   The vertical velocity and the hydrostatic pressure are diagnosed from the following equations:
   \[
-  % \label{eq:w_diag}
-    \pd[w]{k} = - \chi \; e_3 \qquad 
-  % \label{eq:hp_diag}
+  % \label{eq:MB_w_diag}
+    \pd[w]{k} = - \chi \; e_3 \qquad
+  % \label{eq:MB_hp_diag}
     \pd[p_h]{k} = - \rho \; g \; e_3
   \]
-  where the divergence of the horizontal velocity, $\chi$ is given by \autoref{eq:PE_div_Uh}.
-\item \textit{tracer equations}:
-  \[
-    %\label{eq:S}
-    \pd[T]{t} = - \frac{1}{e_1 e_2} \lt[ \pd[(e_2 T \, u)]{i} + \pd[(e_1 T \, v)]{j} \rt]
-                - \frac{1}{e_3} \pd[(T \, w)]{k} + D^T + F^T \\
-    %\label{eq:T}
-    \pd[S]{t} = - \frac{1}{e_1 e_2} \lt[ \pd[(e_2 S \, u)]{i} + \pd[(e_1 S \, v)]{j} \rt]
-                - \frac{1}{e_3} \pd[(S \, w)]{k} + D^S + F^S
-    %\label{eq:rho}
+  where the divergence of the horizontal velocity, $\chi$ is given by \autoref{eq:MB_div_Uh}.
+\item [Tracer equations]
+  \begin{gather*}
+    \pd[T]{t} = - \frac{1}{e_1 e_2} \lt[ \pd[(e_2 T \, u)]{i} + \pd[(e_1 T \, v)]{j} \rt] - \frac{1}{e_3} \pd[(T \, w)]{k} + D^T + F^T \\
+    \pd[S]{t} = - \frac{1}{e_1 e_2} \lt[ \pd[(e_2 S \, u)]{i} + \pd[(e_1 S \, v)]{j} \rt] - \frac{1}{e_3} \pd[(S \, w)]{k} + D^S + F^S \\
     \rho = \rho \big( T,S,z(k) \big)
-  \]
-\end{itemize}
-
-The expression of $\vect D^{U}$, $D^{S}$ and $D^{T}$ depends on the subgrid scale parameterisation used.
-It will be defined in \autoref{eq:PE_zdf}.
+  \end{gather*}
+\end{description}
+
+The expression of $\vect D^{U}$, $D^{S}$ and $D^{T}$ depends on
+the subgrid scale parameterisation used.
+It will be defined in \autoref{eq:MB_zdf}.
 The nature and formulation of $\vect F^{\vect U}$, $F^T$ and $F^S$, the surface forcing terms,
 are discussed in \autoref{chap:SBC}.
 
-\newpage
-
-% ================================================================
-% Curvilinear generalised vertical coordinate System
-% ================================================================
+%% =================================================================================================
 \section{Curvilinear generalised vertical coordinate system}
-\label{sec:PE_gco}
+\label{sec:MB_gco}
 
 The ocean domain presents a huge diversity of situation in the vertical.
@@ -567,47 +535,51 @@
 varying from more than 6,000 meters in abyssal trenches to zero at the coast.
 Last but not least, the ocean stratification exerts a strong barrier to vertical motions and mixing.
-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;
-for the second point, a space variation to fit the change of bottom topography
-\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.
-
-In order to satisfy two or more constrains one can even be tempted to mixed these coordinate systems, as in
-HYCOM (mixture of $z$-coordinate at the surface, isopycnic coordinate in the ocean interior and $\sigma$ at
-the ocean bottom) \citep{Chassignet_al_JPO03} or
-OPA (mixture of $z$-coordinate in vicinity the surface and steep topography areas and $\sigma$-coordinate elsewhere)
-\citep{Madec_al_JPO96} among others.
+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;
+for the second point,
+a space variation to fit the change of bottom topography
+\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.
+
+In order to satisfy two or more constraints one can even be tempted to mixed these coordinate systems,
+as in HYCOM (mixture of $z$-coordinate at the surface, isopycnic coordinate in the ocean interior and
+$\sigma$ at the ocean bottom) \citep{chassignet.smith.ea_JPO03} or
+OPA (mixture of $z$-coordinate in vicinity the surface and steep topography areas and
+$\sigma$-coordinate elsewhere) \citep{madec.delecluse.ea_JPO96} among others.
 
 In fact one is totally free to choose any space and time vertical coordinate by
 introducing an arbitrary vertical coordinate :
 \begin{equation}
-  \label{eq:PE_s}
+  \label{eq:MB_s}
   s = s(i,j,k,t)
 \end{equation}
-with the restriction that the above equation gives a single-valued monotonic relationship between $s$ and $k$,
-when $i$, $j$ and $t$ are held fixed.
-\autoref{eq:PE_s} is a transformation from the $(i,j,k,t)$ coordinate system with independent variables into
+with the restriction that the above equation gives a single-valued monotonic relationship between
+$s$ and $k$, when $i$, $j$ and $t$ are held fixed.
+\autoref{eq:MB_s} is a transformation from
+the $(i,j,k,t)$ coordinate system with independent variables into
 the $(i,j,s,t)$ generalised coordinate system with $s$ depending on the other three variables through
-\autoref{eq:PE_s}.
-This so-called \textit{generalised vertical coordinate} \citep{Kasahara_MWR74} is in fact
-an Arbitrary Lagrangian--Eulerian (ALE) coordinate.
-Indeed, choosing an expression for $s$ is an arbitrary choice that determines
-which part of the vertical velocity (defined from a fixed referential) will cross the levels (Eulerian part) and
-which part will be used to move them (Lagrangian part).
-The coordinate is also sometime referenced as an adaptive coordinate \citep{Hofmeister_al_OM09},
-since the coordinate system is adapted in the course of the simulation.
+\autoref{eq:MB_s}.
+This so-called \textit{generalised vertical coordinate} \citep{kasahara_MWR74} is in fact
+an \textbf{A}rbitrary \textbf{L}agrangian--\textbf{E}ulerian (ALE) coordinate.
+Indeed, one has a great deal of freedom in the choice of expression for $s$.
+The choice determines which part of the vertical velocity (defined from a fixed referential)
+will cross the levels (Eulerian part) and which part will be used to move them (Lagrangian part).
+The coordinate is also sometimes referenced as an adaptive coordinate
+\citep{hofmeister.burchard.ea_OM10}, since the coordinate system is adapted in
+the course of the simulation.
 Its most often used implementation is via an ALE algorithm,
 in which a pure lagrangian step is followed by regridding and remapping steps,
-the later step implicitly embedding the vertical advection
-\citep{Hirt_al_JCP74, Chassignet_al_JPO03, White_al_JCP09}.
-Here we follow the \citep{Kasahara_MWR74} strategy:
-a regridding step (an update of the vertical coordinate) followed by an eulerian step with
+the latter step implicitly embedding the vertical advection
+\citep{hirt.amsden.ea_JCP74, chassignet.smith.ea_JPO03, white.adcroft.ea_JCP09}.
+Here we follow the \citep{kasahara_MWR74} strategy:
+a regridding step (an update of the vertical coordinate) followed by an Eulerian step with
 an explicit computation of vertical advection relative to the moving s-surfaces.
 
-%\gmcomment{
-%A key point here is that the $s$-coordinate depends on $(i,j)$ ==> horizontal pressure gradient...
-the generalized vertical coordinates used in ocean modelling are not orthogonal,
+\cmtgm{A key point here is that the $s$-coordinate depends on $(i,j)$
+  ==> horizontal pressure gradient...}
+The generalized vertical coordinates used in ocean modelling are not orthogonal,
 which contrasts with many other applications in mathematical physics.
 Hence, it is useful to keep in mind the following properties that may seem odd on initial encounter.
@@ -615,9 +587,10 @@
 The horizontal velocity in ocean models measures motions in the horizontal plane,
 perpendicular to the local gravitational field.
-That is, horizontal velocity is mathematically the same regardless the vertical coordinate, be it geopotential,
-isopycnal, pressure, or terrain following.
+That is, horizontal velocity is mathematically the same regardless of the vertical coordinate,
+be it geopotential, isopycnal, pressure, or terrain following.
 The key motivation for maintaining the same horizontal velocity component is that
 the hydrostatic and geostrophic balances are dominant in the large-scale ocean.
-Use of an alternative quasi -horizontal velocity, for example one oriented parallel to the generalized surface,
+Use of an alternative quasi -horizontal velocity,
+for example one oriented parallel to the generalized surface,
 would lead to unacceptable numerical errors.
 Correspondingly, the vertical direction is anti -parallel to the gravitational force in
@@ -626,12 +599,14 @@
 the surface of a constant generalized vertical coordinate.
 
-It is the method used to measure transport across the generalized vertical coordinate surfaces which differs between
-the vertical coordinate choices.
-That is, computation of the dia-surface velocity component represents the fundamental distinction between
+It is the method used to measure transport across the generalized vertical coordinate surfaces which
+differs between the vertical coordinate choices.
+That is,
+computation of the dia-surface velocity component represents the fundamental distinction between
 the various coordinates.
-In some models, such as geopotential, pressure, and terrain following, this transport is typically diagnosed from
-volume or mass conservation.
-In other models, such as isopycnal layered models, this transport is prescribed based on assumptions about
-the physical processes producing a flux across the layer interfaces.
+In some models, such as geopotential, pressure, and terrain following,
+this transport is typically diagnosed from volume or mass conservation.
+In other models, such as isopycnal layered models,
+this transport is prescribed based on assumptions about the physical processes producing
+a flux across the layer interfaces.
 
 In this section we first establish the PE in the generalised vertical $s$-coordinate,
@@ -639,89 +614,71 @@
 %}
 
-% -------------------------------------------------------------------------------------------------------------
-% The s-coordinate Formulation
-% -------------------------------------------------------------------------------------------------------------
+%% =================================================================================================
 \subsection{\textit{S}-coordinate formulation}
 
-Starting from the set of equations established in \autoref{sec:PE_zco} for the special case $k = z$ and
-thus $e_3 = 1$, we introduce an arbitrary vertical coordinate $s = s(i,j,k,t)$,
+Starting from the set of equations established in \autoref{sec:MB_zco} for
+the special case $k = z$ and thus $e_3 = 1$,
+we introduce an arbitrary vertical coordinate $s = s(i,j,k,t)$,
 which includes $z$-, \zstar- and $\sigma$-coordinates as special cases
 ($s = z$, $s = \zstar$, and $s = \sigma = z / H$ or $ = z / \lt( H + \eta \rt)$, resp.).
-A formal derivation of the transformed equations is given in \autoref{apdx:A}.
-Let us define the vertical scale factor by $e_3 = \partial_s z$  ($e_3$ is now a function of $(i,j,k,t)$ ),
+A formal derivation of the transformed equations is given in \autoref{apdx:SCOORD}.
+Let us define the vertical scale factor by $e_3 = \partial_s z$
+($e_3$ is now a function of $(i,j,k,t)$ ),
 and the slopes in the $(i,j)$ directions between $s$- and $z$-surfaces by:
 \begin{equation}
-  \label{eq:PE_sco_slope}
+  \label{eq:MB_sco_slope}
   \sigma_1 = \frac{1}{e_1} \; \lt. \pd[z]{i} \rt|_s \quad \text{and} \quad
   \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 
-relative to the moving $s$-surfaces and normal to them:
+We also introduce $\omega$, a dia-surface velocity component,
+defined as the velocity relative to the moving $s$-surfaces and normal to them:
 \[
-  % \label{eq:PE_sco_w}
-  \omega = w - e_3 \, \pd[s]{t} - \sigma_1 \, u - \sigma_2 \, v
+  % \label{eq:MB_sco_w}
+  \omega = w -  \, \lt. \pd[z]{t} \rt|_s - \sigma_1 \, u - \sigma_2 \, v
 \]
 
-The equations solved by the ocean model \autoref{eq:PE} in $s$-coordinate can be written as follows
-(see \autoref{sec:A_momentum}):
-
-\begin{itemize}
-\item \textbf{Vector invariant form of the momentum equation}:
-  \begin{multline*}
-  % \label{eq:PE_sco_u_vector}
-    \pd[u]{t} = + (\zeta + f) \, v - \frac{1}{2 \, e_1} \pd[]{i} (u^2 + v^2) - \frac{1}{e_3} \omega \pd[u]{k} \\
-                - \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) + g \frac{\rho}{\rho_o} \sigma_1
-                + D_u^{\vect U} + F_u^{\vect U}
-  \end{multline*}
-  \begin{multline*}
-  % \label{eq:PE_sco_v_vector}
-    \pd[v]{t} = - (\zeta + f) \, u - \frac{1}{2 \, e_2} \pd[]{j}(u^2 + v^2) - \frac{1}{e_3} \omega \pd[v]{k} \\
-                - \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) + g \frac{\rho}{\rho_o} \sigma_2
-                + D_v^{\vect U} + F_v^{\vect U}
-  \end{multline*}
-\item \textbf{Flux form of the momentum equation}:
-  \begin{multline*}
-  % \label{eq:PE_sco_u_flux}
-    \frac{1}{e_3} \pd[(e_3 \, u)]{t} = + \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, v \\
-                                       - \frac{1}{e_1 \; e_2 \; e_3} \lt( \pd[(e_2 \, e_3 \, u \, u)]{i} + \pd[(e_1 \, e_3 \, v \, u)]{j} \rt) \\
-                                       - \frac{1}{e_3} \pd[(\omega \, u)]{k}
-                                       - \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt)
-                                       + g \frac{\rho}{\rho_o} \sigma_1 + D_u^{\vect U} + F_u^{\vect U}
-  \end{multline*}
-  \begin{multline*}
-  % \label{eq:PE_sco_v_flux}
-    \frac{1}{e_3} \pd[(e_3 \, v)]{t} = - \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, u \\
-                                       - \frac{1}{e_1 \; e_2 \; e_3} \lt( \pd[( e_2 \; e_3 \, u \, v)]{i} + \pd[(e_1 \; e_3 \, v \, v)]{j} \rt) \\
-                                       - \frac{1}{e_3} \pd[(\omega \, v)]{k}
-                                       - \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt)
-                                       + g \frac{\rho}{\rho_o}\sigma_2 + D_v^{\vect U} + F_v^{\vect U}
-  \end{multline*}
+The equations solved by the ocean model \autoref{eq:MB_PE} in $s$-coordinate can be written as follows
+(see \autoref{sec:SCOORD_momentum}):
+
+\begin{description}
+\item [Vector invariant form of the momentum equation]
+  \begin{gather*}
+    % \label{eq:MB_sco_u_vector}
+    \pd[u]{t} = + (\zeta + f) \, v - \frac{1}{2 \, e_1} \pd[]{i} (u^2 + v^2) - \frac{1}{e_3} \omega \pd[u]{k} - \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) - g \frac{\rho}{\rho_o} \sigma_1 + D_u^{\vect U} + F_u^{\vect U} \\
+    % \label{eq:MB_sco_v_vector}
+    \pd[v]{t} = - (\zeta + f) \, u - \frac{1}{2 \, e_2} \pd[]{j} (u^2 + v^2) - \frac{1}{e_3} \omega \pd[v]{k} - \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) - g \frac{\rho}{\rho_o} \sigma_2 + D_v^{\vect U} + F_v^{\vect U}
+  \end{gather*}
+\item [Flux form of the momentum equation]
+  \begin{alignat*}{2}
+    % \label{eq:MB_sco_u_flux}
+    \frac{1}{e_3} \pd[(e_3 \, u)]{t} = &+ \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, v - \frac{1}{e_1 \; e_2 \; e_3} \lt( \pd[(e_2 \, e_3 \, u \, u)]{i} + \pd[(e_1 \, e_3 \, v \, u)]{j} \rt) - \frac{1}{e_3} \pd[(\omega \, u)]{k} \\
+    &- \frac{1}{e_1} \pd[]{i} \lt( \frac{p_s + p_h}{\rho_o} \rt) - g \frac{\rho}{\rho_o} \sigma_1 + D_u^{\vect U} + F_u^{\vect U}
+  \end{alignat*}
+  \begin{alignat*}{2}
+  % \label{eq:MB_sco_v_flux}
+    \frac{1}{e_3} \pd[(e_3 \, v)]{t} = &- \lt[ f + \frac{1}{e_1 \; e_2} \lt( v \pd[e_2]{i} - u \pd[e_1]{j} \rt) \rt] \, u - \frac{1}{e_1 \; e_2 \; e_3} \lt( \pd[( e_2 \; e_3 \, u \, v)]{i} + \pd[(e_1 \; e_3 \, v \, v)]{j} \rt) - \frac{1}{e_3} \pd[(\omega \, v)]{k} \\
+    &- \frac{1}{e_2} \pd[]{j} \lt( \frac{p_s + p_h}{\rho_o} \rt) - g \frac{\rho}{\rho_o}\sigma_2 + D_v^{\vect U} + F_v^{\vect U}
+  \end{alignat*}
   where the relative vorticity, $\zeta$, the surface pressure gradient,
   and the hydrostatic pressure have the same expressions as in $z$-coordinates although
   they do not represent exactly the same quantities.
-  $\omega$ is provided by the continuity equation (see \autoref{apdx:A}):
+  $\omega$ is provided by the continuity equation (see \autoref{apdx:SCOORD}):
   \[
-  % \label{eq:PE_sco_continuity}
+  % \label{eq:MB_sco_continuity}
     \pd[e_3]{t} + e_3 \; \chi + \pd[\omega]{s} = 0 \quad \text{with} \quad
     \chi = \frac{1}{e_1 e_2 e_3} \lt( \pd[(e_2 e_3 \, u)]{i} + \pd[(e_1 e_3 \, v)]{j} \rt)
   \]
-\item \textit{tracer equations}:
-  \begin{multline*}
-  % \label{eq:PE_sco_t}
-    \frac{1}{e_3} \pd[(e_3 \, T)]{t} = - \frac{1}{e_1 e_2 e_3} \lt(   \pd[(e_2 e_3 \, u \, T)]{i}
-                                                                    + \pd[(e_1 e_3 \, v \, T)]{j} \rt) \\
-                                       - \frac{1}{e_3} \pd[(T \, \omega)]{k} + D^T + F^S
-  \end{multline*}
-  \begin{multline}
-  % \label{eq:PE_sco_s}
-    \frac{1}{e_3} \pd[(e_3 \, S)]{t} = - \frac{1}{e_1 e_2 e_3} \lt(   \pd[(e_2 e_3 \, u \, S)]{i}
-                                                                    + \pd[(e_1 e_3 \, v \, S)]{j} \rt) \\
-                                       - \frac{1}{e_3} \pd[(S \, \omega)]{k} + D^S + F^S
-  \end{multline}
-\end{itemize}
+\item [Tracer equations]
+  \begin{gather*}
+    % \label{eq:MB_sco_t}
+    \frac{1}{e_3} \pd[(e_3 \, T)]{t} = - \frac{1}{e_1 e_2 e_3} \lt(   \pd[(e_2 e_3 \, u \, T)]{i} + \pd[(e_1 e_3 \, v \, T)]{j} \rt) - \frac{1}{e_3} \pd[(T \, \omega)]{k} + D^T + F^S \\
+    % \label{eq:MB_sco_s}
+    \frac{1}{e_3} \pd[(e_3 \, S)]{t} = - \frac{1}{e_1 e_2 e_3} \lt(   \pd[(e_2 e_3 \, u \, S)]{i} + \pd[(e_1 e_3 \, v \, S)]{j} \rt) - \frac{1}{e_3} \pd[(S \, \omega)]{k} + D^S + F^S
+  \end{gather*}
+\end{description}
 The equation of state has the same expression as in $z$-coordinate,
 and similar expressions are used for mixing and forcing terms.
 
-\gmcomment{
+\cmtgm{
   \colorbox{yellow}{ to be updated $= = >$}
   Add a few works on z and zps and s and underlies the differences between all of them
@@ -729,118 +686,110 @@
 }
 
-% -------------------------------------------------------------------------------------------------------------
-% Curvilinear \zstar-coordinate System
-% -------------------------------------------------------------------------------------------------------------
+%% =================================================================================================
 \subsection{Curvilinear \zstar-coordinate system}
-\label{subsec:PE_zco_star}
-
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!b]
-  \begin{center}
-    \includegraphics[]{Fig_z_zstar}
-    \caption{
-      \protect\label{fig:z_zstar}
-      (a) $z$-coordinate in linear free-surface case ;
-      (b) $z$-coordinate in non-linear free surface case ;
-      (c) re-scaled height coordinate
-      (become popular as the \zstar-coordinate \citep{Adcroft_Campin_OM04}).
-    }
-  \end{center}
+\label{subsec:MB_zco_star}
+
+\begin{figure}
+  \centering
+  \includegraphics[width=0.66\textwidth]{MB_z_zstar}
+  \caption[Curvilinear z-coordinate systems (\{non-\}linear free-surface cases and re-scaled \zstar)]{
+    \begin{enumerate*}[label=(\textit{\alph*})]
+    \item $z$-coordinate in linear free-surface case;
+    \item $z$-coordinate in non-linear free surface case;
+    \item re-scaled height coordinate
+      (become popular as the \zstar-coordinate \citep{adcroft.campin_OM04}).
+    \end{enumerate*}
+  }
+  \label{fig:MB_z_zstar}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-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{Levier2007} available on the \NEMO web site.
-
-The \zstar coordinate approach is an unapproximated, non-linear free surface implementation which allows one to
-deal with large amplitude free-surface variations relative to the vertical resolution \citep{Adcroft_Campin_OM04}.
-In the \zstar formulation,
-the variation of the column thickness due to sea-surface undulations is not concentrated in the surface level,
-as in the $z$-coordinate formulation, but is equally distributed over the full water column.
+
+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.
+
+The \zstar\ coordinate approach is an unapproximated, non-linear free surface implementation which
+allows one to deal with large amplitude free-surface variations relative to the vertical resolution
+\citep{adcroft.campin_OM04}.
+In the \zstar\ formulation, the variation of the column thickness due to sea-surface undulations is
+not concentrated in the surface level, as in the $z$-coordinate formulation,
+but is equally distributed over the full water column.
 Thus vertical levels naturally follow sea-surface variations, with a linear attenuation with depth,
-as illustrated by \autoref{fig:z_zstar}.
-Note that with a flat bottom, such as in \autoref{fig:z_zstar}, the bottom-following $z$ coordinate and \zstar are equivalent.
+as illustrated by \autoref{fig:MB_z_zstar}.
+Note that with a flat bottom, such as in \autoref{fig:MB_z_zstar},
+the bottom-following $z$ coordinate and \zstar\ are equivalent.
 The definition and modified oceanic equations for the rescaled vertical coordinate \zstar,
 including the treatment of fresh-water flux at the surface, are detailed in Adcroft and Campin (2004).
 The major points are summarized here.
-The position (\zstar) and vertical discretization (\zstar) are expressed as:
+The position (\zstar) and vertical discretization ($\delta \zstar$) are expressed as:
 \[
-  % \label{eq:z-star}
-  H + \zstar = (H + z)  / r \quad \text{and}  \quad \delta \zstar
-              = \delta z / r \quad \text{with} \quad r
-              = \frac{H + \eta}{H}
+  % \label{eq:MB_z-star}
+  H + \zstar = (H + z)  / r \quad \text{and}  \quad \delta \zstar = \delta z / r \quad \text{with} \quad r = \frac{H + \eta}{H}
+\]
+Simple re-organisation of the above expressions gives
+\[
+  % \label{eq:MB_zstar_2}
+  \zstar = H \lt( \frac{z - \eta}{H + \eta} \rt)
 \]
 Since the vertical displacement of the free surface is incorporated in the vertical coordinate \zstar,
-the upper and lower boundaries are at fixed  \zstar position,
+the upper and lower boundaries are at fixed \zstar\ position,
 $\zstar = 0$ and $\zstar = -H$ respectively.
 Also the divergence of the flow field is no longer zero as shown by the continuity equation:
 \[
-  \pd[r]{t} = \nabla_{\zstar} \cdot \lt( r \; \vect U_h \rt) (r \; w *) = 0
+  \pd[r]{t} = \nabla_{\zstar} \cdot \lt( r \; \vect U_h \rt) + \pd[r \; w^*]{\zstar} = 0
 \]
-
-% from MOM4p1 documentation
-To overcome problems with vanishing surface and/or bottom cells, we consider the zstar coordinate 
-\[
-  % \label{eq:PE_}
-  \zstar = H \lt( \frac{z - \eta}{H + \eta} \rt)
-\]
-
-This coordinate is closely related to the "eta" coordinate used in many atmospheric models
-(see Black (1994) for a review of eta coordinate atmospheric models).
+This \zstar\ coordinate is closely related to the $\eta$ coordinate used in many atmospheric models
+(see Black (1994) for a review of $\eta$ coordinate atmospheric models).
 It was originally used in ocean models by Stacey et al. (1995) for studies of tides next to shelves,
 and it has been recently promoted by Adcroft and Campin (2004) for global climate modelling.
 
-The surfaces of constant \zstar are quasi -horizontal.
-Indeed, the \zstar coordinate reduces to $z$ when $\eta$ is zero.
+The surfaces of constant \zstar\ are quasi-horizontal.
+Indeed, the \zstar\ coordinate reduces to $z$ when $\eta$ is zero.
 In general, when noting the large differences between
 undulations of the bottom topography versus undulations in the surface height,
-it is clear that surfaces constant \zstar are very similar to the depth surfaces.
+it is clear that surfaces constant \zstar\ 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}.
-Additionally, since \zstar when $\eta = 0$,
-no flow is spontaneously generated in an unforced ocean starting from rest, regardless the bottom topography.
-This behaviour is in contrast to the case with "s"-models, where pressure gradient errors in the presence of
-nontrivial topographic variations can generate nontrivial spontaneous flow from a resting state,
+terrain following sigma models discussed in \autoref{subsec:MB_sco}.
+Additionally, since $\zstar = z$ when $\eta = 0$,
+no flow is spontaneously generated in an unforced ocean starting from rest,
+regardless the bottom topography.
+This behaviour is in contrast to the case with ``s''-models,
+where pressure gradient errors in the presence of nontrivial topographic variations can generate
+nontrivial spontaneous flow from a resting state,
 depending on the sophistication of the pressure gradient solver.
-The quasi -horizontal nature of the coordinate surfaces also facilitates the implementation of
-neutral physics parameterizations in \zstar models using the same techniques as in $z$-models
-(see Chapters 13-16 of \cite{Griffies_Bk04}) for a discussion of neutral physics in $z$-models,
+The quasi-horizontal nature of the coordinate surfaces also facilitates the implementation of
+neutral physics parameterizations in \zstar\ models using the same techniques as in $z$-models
+(see Chapters 13-16 of \cite{griffies_bk04}) for a discussion of neutral physics in $z$-models,
 as well as \autoref{sec:LDF_slp} in this document for treatment in \NEMO).
 
-The range over which \zstar varies is time independent $-H \leq \zstar \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$.
-
-Because \zstar 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.
-The \zstar coordinate is therefore invisible to undulations of the free surface,
+The range over which \zstar\ varies is time independent $-H \leq \zstar \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$.
+
+Because \zstar\ has a time independent range, all grid cells have static increments ds,
+and the sum of the vertical increments yields the time independent ocean depth. %k ds = H.
+The \zstar\ coordinate is therefore invisible to undulations of the free surface,
 since it moves along with the free surface.
-This proper ty means that no spurious vertical transport is induced across surfaces of constant \zstar by
-the motion of external gravity waves.
-Such spurious transpor t can be a problem in z-models, especially those with tidal forcing.
-Quite generally, the time independent range for the \zstar coordinate is a very convenient property that
-allows for a nearly arbitrary ver tical resolution even in the presence of large amplitude fluctuations of
-the surface height, again so long as $\eta > -H$.
+This property means that no spurious vertical transport is induced across
+surfaces of constant \zstar\  by the motion of external gravity waves.
+Such spurious transport can be a problem in z-models, especially those with tidal forcing.
+Quite generally,
+the time independent range for the \zstar\ 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$.
 %end MOM doc %%%
 
-\newpage 
-
-% -------------------------------------------------------------------------------------------------------------
-% Terrain following  coordinate System
-% -------------------------------------------------------------------------------------------------------------
+%% =================================================================================================
 \subsection{Curvilinear terrain-following \textit{s}--coordinate}
-\label{subsec:PE_sco}
-
-% -------------------------------------------------------------------------------------------------------------
-% Introduction
-% -------------------------------------------------------------------------------------------------------------
-\subsubsection{Introduction}
+\label{subsec:MB_sco}
 
 Several important aspects of the ocean circulation are influenced by bottom topography.
-Of course, the most important is that bottom topography determines deep ocean sub-basins, barriers, sills and
-channels that strongly constrain the path of water masses, but more subtle effects exist.
-For example, the topographic $\beta$-effect is usually larger than the planetary one along continental slopes.
+Of course, the most important is that bottom topography determines deep ocean sub-basins, barriers,
+sills and channels that strongly constrain the path of water masses, but more subtle effects exist.
+For example,
+the topographic $\beta$-effect is usually larger than the planetary one along continental slopes.
 Topographic Rossby waves can be excited and can interact with the mean current.
-In the $z$-coordinate system presented in the previous section (\autoref{sec:PE_zco}),
+In the $z$-coordinate system presented in the previous section (\autoref{sec:MB_zco}),
 $z$-surfaces are geopotential surfaces.
 The bottom topography is discretised by steps.
@@ -848,97 +797,107 @@
 large localized depth gradients associated with large localized vertical velocities.
 The response to such a velocity field often leads to numerical dispersion effects.
-One solution to strongly reduce this error is to use a partial step representation of bottom topography instead of
-a full step one \cite{Pacanowski_Gnanadesikan_MWR98}.
+One solution to strongly reduce this error is to use a partial step representation of
+bottom topography instead of a full step one \cite{pacanowski.gnanadesikan_MWR98}.
 Another solution is to introduce a terrain-following coordinate system (hereafter $s$-coordinate).
 
-The $s$-coordinate avoids the discretisation error in the depth field since the layers of
-computation are gradually adjusted with depth to the ocean bottom.
-Relatively small topographic features as well as  gentle, large-scale slopes of the sea floor in the deep ocean,
-which would be ignored in typical $z$-model applications with the largest grid spacing at greatest depths,
+The $s$-coordinate avoids the discretisation error in the depth field since
+the layers of computation are gradually adjusted with depth to the ocean bottom.
+Relatively small topographic features as well as
+gentle, large-scale slopes of the sea floor in the deep ocean,
+which would be ignored in typical $z$-model applications with
+the largest grid spacing at greatest depths,
 can easily be represented (with relatively low vertical resolution).
-A terrain-following model (hereafter $s$-model) also facilitates the modelling of the boundary layer flows over
-a large depth range, which in the framework of the $z$-model would require high vertical resolution over
+A terrain-following model (hereafter $s$-model) also facilitates
+the modelling of the boundary layer flows over a large depth range,
+which in the framework of the $z$-model would require high vertical resolution over
 the whole depth range.
-Moreover, with a $s$-coordinate it is possible, at least in principle, to have the bottom and the sea surface as
+Moreover,
+with a $s$-coordinate it is possible, at least in principle, to have the bottom and the sea surface as
 the only boundaries of the domain (no more lateral boundary condition to specify).
-Nevertheless, a $s$-coordinate also has its drawbacks. Perfectly adapted to a homogeneous ocean,
+Nevertheless, a $s$-coordinate also has its drawbacks.
+Perfectly adapted to a homogeneous ocean,
 it has strong limitations as soon as stratification is introduced.
 The main two problems come from the truncation error in the horizontal pressure gradient and
 a possibly increased diapycnal diffusion.
-The horizontal pressure force in $s$-coordinate consists of two terms (see \autoref{apdx:A}),
-
+The horizontal pressure force in $s$-coordinate consists of two terms (see \autoref{apdx:SCOORD}),
 \begin{equation}
-  \label{eq:PE_p_sco}
-  \nabla p |_z = \nabla p |_s - \pd[p]{s} \nabla z |_s
+  \label{eq:MB_p_sco}
+  \nabla p |_z = \nabla p |_s - \frac{1}{e_3} \pd[p]{s} \nabla z |_s
 \end{equation}
 
-The second term in \autoref{eq:PE_p_sco} depends on the tilt of the coordinate surface and
-introduces a truncation error that is not present in a $z$-model.
-In the special case of a $\sigma$-coordinate (i.e. a depth-normalised coordinate system $\sigma = z/H$),
-\citet{Haney1991} and \citet{Beckmann1993} have given estimates of the magnitude of this truncation error.
-It depends on topographic slope, stratification, horizontal and vertical resolution, the equation of state,
-and the finite difference scheme.
+The second term in \autoref{eq:MB_p_sco} depends on the tilt of the coordinate surface and
+leads to a truncation error that is not present in a $z$-model.
+In the special case of a $\sigma$-coordinate
+(i.e. a depth-normalised coordinate system $\sigma = z/H$),
+\citet{haney_JPO91} and \citet{beckmann.haidvogel_JPO93} have given estimates of
+the magnitude of this truncation error.
+It depends on topographic slope, stratification, horizontal and vertical resolution,
+the equation of state, and the finite difference scheme.
 This error limits the possible topographic slopes that a model can handle at
 a given horizontal and vertical resolution.
 This is a severe restriction for large-scale applications using realistic bottom topography.
-The large-scale slopes require high horizontal resolution, and the computational cost becomes prohibitive.
+The large-scale slopes require high horizontal resolution,
+and the computational cost becomes prohibitive.
 This problem can be at least partially overcome by mixing $s$-coordinate and
-step-like representation of bottom topography \citep{Gerdes1993a,Gerdes1993b,Madec_al_JPO96}.
+step-like representation of bottom topography
+\citep{gerdes_JGR93*a,gerdes_JGR93*b,madec.delecluse.ea_JPO96}.
 However, the definition of the model domain vertical coordinate becomes then a non-trivial thing for
 a realistic bottom topography:
-a envelope topography is defined in $s$-coordinate on which a full or
-partial step bottom topography is then applied in order to adjust the model depth to the observed one
-(see \autoref{sec:DOM_zgr}.
-
-For numerical reasons a minimum of diffusion is required along the coordinate surfaces of
-any finite difference model.
+an envelope topography is defined in $s$-coordinate on which
+a full or partial step bottom topography is then applied in order to
+adjust the model depth to the observed one (see \autoref{subsec:DOM_zgr}).
+
+For numerical reasons a minimum of diffusion is required along
+the coordinate surfaces of any finite difference model.
 It causes spurious diapycnal mixing when coordinate surfaces do not coincide with isoneutral surfaces.
 This is the case for a $z$-model as well as for a $s$-model.
-However, density varies more strongly on $s$-surfaces than on horizontal surfaces in regions of
-large topographic slopes, implying larger diapycnal diffusion in a $s$-model than in a $z$-model.
-Whereas such a diapycnal diffusion in a $z$-model tends to weaken horizontal density (pressure) gradients and thus
-the horizontal circulation, it usually reinforces these gradients in a $s$-model, creating spurious circulation.
-For example, imagine an isolated bump of topography in an ocean at rest with a horizontally uniform stratification.
+However, density varies more strongly on $s$-surfaces than on horizontal surfaces in
+regions of large topographic slopes,
+implying larger diapycnal diffusion in a $s$-model than in a $z$-model.
+Whereas such a diapycnal diffusion in a $z$-model tends to
+weaken horizontal density (pressure) gradients and thus the horizontal circulation,
+it usually reinforces these gradients in a $s$-model, creating spurious circulation.
+For example, imagine an isolated bump of topography in
+an ocean at rest with a horizontally uniform stratification.
 Spurious diffusion along $s$-surfaces will induce a bump of isoneutral surfaces over the topography,
 and thus will generate there a baroclinic eddy.
 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_al_JPO96}.
-An alternate solution consists of rotating the lateral diffusive tensor to geopotential or to isoneutral surfaces
-(see \autoref{subsec:PE_ldf}).
+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}.
+An alternate solution consists of rotating the lateral diffusive tensor to
+geopotential or to isoneutral surfaces (see \autoref{subsec:MB_ldf}).
 Unfortunately, the slope of isoneutral surfaces relative to the $s$-surfaces can very large,
-strongly exceeding the stability limit of such a operator when it is discretized (see \autoref{chap:LDF}).
-
-The $s$-coordinates introduced here \citep{Lott_al_OM90,Madec_al_JPO96} differ mainly in two aspects from
-similar models:
-it allows a representation of bottom topography with mixed full or partial step-like/terrain following topography;
+strongly exceeding the stability limit of such a operator when it is discretized
+(see \autoref{chap:LDF}).
+
+The $s$-coordinates introduced here \citep{lott.madec.ea_OM90,madec.delecluse.ea_JPO96}
+differ mainly in two aspects from similar models:
+it allows a representation of bottom topography with
+mixed full or partial step-like/terrain following topography;
 It also offers a completely general transformation, $s=s(i,j,z)$ for the vertical coordinate.
 
-% -------------------------------------------------------------------------------------------------------------
-% Curvilinear z-tilde coordinate System
-% -------------------------------------------------------------------------------------------------------------
-\subsection{\texorpdfstring{Curvilinear \ztilde-coordinate}{}}
-\label{subsec:PE_zco_tilde}
-
-The \ztilde -coordinate has been developed by \citet{Leclair_Madec_OM11}.
-It is available in \NEMO since the version 3.4.
+%% =================================================================================================
+\subsection{Curvilinear \ztilde-coordinate}
+\label{subsec:MB_zco_tilde}
+
+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.
 Nevertheless, it is currently not robust enough to be used in all possible configurations.
 Its use is therefore not recommended.
 
-\newpage 
-
-% ================================================================
-% Subgrid Scale Physics
-% ================================================================
+%% =================================================================================================
 \section{Subgrid scale physics}
-\label{sec:PE_zdf_ldf}
-
-The primitive equations describe the behaviour of a geophysical fluid at space and time scales larger than
-a few kilometres in the horizontal, a few meters in the vertical and a few minutes.
-They are usually solved at larger scales: the specified grid spacing and time step of the numerical model.
+\label{sec:MB_zdf_ldf}
+
+The hydrostatic primitive equations describe the behaviour of a geophysical fluid at
+space and time scales larger than a few kilometres in the horizontal,
+a few meters in the vertical and a few minutes.
+They are usually solved at larger scales: the specified grid spacing and time step of
+the numerical model.
 The effects of smaller scale motions (coming from the advective terms in the Navier-Stokes equations)
 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.
@@ -947,22 +906,23 @@
 small scale processes \textit{in fine} balance the surface input of kinetic energy and heat.
 
-The control exerted by gravity on the flow induces a strong anisotropy between the lateral and vertical motions.
+The control exerted by gravity on the flow induces a strong anisotropy between
+the lateral and vertical motions.
 Therefore subgrid-scale physics \textbf{D}$^{\vect U}$, $D^{S}$ and $D^{T}$  in
-\autoref{eq:PE_dyn}, \autoref{eq:PE_tra_T} and \autoref{eq:PE_tra_S} are divided into
-a lateral part \textbf{D}$^{l \vect U}$, $D^{l S}$ and $D^{l T}$ and
+\autoref{eq:MB_PE_dyn}, \autoref{eq:MB_PE_tra_T} and \autoref{eq:MB_PE_tra_S} are divided into
+a  lateral part \textbf{D}$^{l \vect U}$, $D^{l S}$ and $D^{l T}$ and
 a vertical part \textbf{D}$^{v \vect U}$, $D^{v S}$ and $D^{v T}$.
-The formulation of these terms and their underlying physics are briefly discussed in the next two subsections.
-
-% -------------------------------------------------------------------------------------------------------------
-% Vertical Subgrid Scale Physics
-% -------------------------------------------------------------------------------------------------------------
+The formulation of these terms and their underlying physics are briefly discussed in
+the next two subsections.
+
+%% =================================================================================================
 \subsection{Vertical subgrid scale physics}
-\label{subsec:PE_zdf}
-
-The model resolution is always larger than the scale at which the major sources of vertical turbulence occur
-(shear instability, internal wave breaking...).
+\label{subsec:MB_zdf}
+
+The model resolution is always larger than the scale at which
+the major sources of vertical turbulence occur (shear instability, internal wave breaking...).
 Turbulent motions are thus never explicitly solved, even partially, but always parameterized.
-The vertical turbulent fluxes are assumed to depend linearly on the gradients of large-scale quantities
-(for example, the turbulent heat flux is given by $\overline{T' w'} = -A^{v T} \partial_z \overline T$,
+The vertical turbulent fluxes are assumed to depend linearly on
+the gradients of large-scale quantities (for example,
+the turbulent heat flux is given by $\overline{T' w'} = -A^{v T} \partial_z \overline T$,
 where $A^{v T}$ is an eddy coefficient).
 This formulation is analogous to that of molecular diffusion and dissipation.
@@ -972,56 +932,61 @@
 The resulting vertical momentum and tracer diffusive operators are of second order:
 \begin{equation}
-  \label{eq:PE_zdf}
+  \label{eq:MB_zdf}
   \begin{gathered}
-    \vect D^{v \vect U} = \pd[]{z} \lt( A^{vm} \pd[\vect U_h]{z} \rt) \ , \\
-          D^{vT}       = \pd[]{z} \lt( A^{vT} \pd[T]{z}         \rt) \quad \text{and} \quad
+    \vect D^{v \vect U} = \pd[]{z} \lt( A^{vm} \pd[\vect U_h]{z} \rt) \text{,} \
+          D^{vT}       = \pd[]{z} \lt( A^{vT} \pd[T]{z}         \rt) \ \text{and} \
           D^{vS}       = \pd[]{z} \lt( A^{vT} \pd[S]{z}         \rt)
   \end{gathered}
 \end{equation}
-where $A^{vm}$ and $A^{vT}$ are the vertical eddy viscosity and diffusivity coefficients, respectively.
+where $A^{vm}$ and $A^{vT}$ are the vertical eddy viscosity and diffusivity coefficients,
+respectively.
 At the sea surface and at the bottom, turbulent fluxes of momentum, heat and salt must be specified
 (see \autoref{chap:SBC} and \autoref{chap:ZDF} and \autoref{sec:TRA_bbl}).
 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...),
+(\eg\ Richardson number, Brunt-V\"{a}is\"{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}).
-
-% -------------------------------------------------------------------------------------------------------------
-% Lateral Diffusive and Viscous Operators Formulation
-% -------------------------------------------------------------------------------------------------------------
+The choices available in \NEMO\ are discussed in \autoref{chap:ZDF}).
+
+%% =================================================================================================
 \subsection{Formulation of the lateral diffusive and viscous operators}
-\label{subsec:PE_ldf}
+\label{subsec:MB_ldf}
 
 Lateral turbulence can be roughly divided into a mesoscale turbulence associated with eddies
 (which can be solved explicitly if the resolution is sufficient since
 their underlying physics are included in the primitive equations),
-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).
+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).
 
 In non-eddy-resolving configurations, the closure is similar to that used for the vertical physics.
-The lateral turbulent fluxes are assumed to depend linearly on the lateral gradients of large-scale quantities.
+The lateral turbulent fluxes are assumed to depend linearly on
+the lateral gradients of large-scale quantities.
 The resulting lateral diffusive and dissipative operators are of second order.
-Observations show that lateral mixing induced by mesoscale turbulence tends to be along isopycnal surfaces
-(or more precisely neutral surfaces \cite{McDougall1987}) 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.
+Observations show that
+lateral mixing induced by mesoscale turbulence tends to be along isopycnal surfaces
+(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.
 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
+This assumption can be relaxed:
+the eddy-induced turbulent fluxes can be better approached by assuming that
 they depend linearly on the gradients of large-scale quantities computed along neutral surfaces.
 In such a case, the diffusive operator is an isoneutral second order operator and
 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
+However, 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{Gent1990} have proposed a parameterisation of mesoscale eddy-induced turbulence which
+\citet{gent.mcwilliams_JPO90} proposed a parameterisation of mesoscale eddy-induced turbulence which
 associates an eddy-induced velocity to the isoneutral diffusion.
 Its mean effect is to reduce the mean potential energy of the ocean.
-This leads to a formulation of lateral subgrid-scale physics made up of an isoneutral second order operator and
-an eddy induced advective part.
+This leads to a formulation of lateral subgrid-scale physics made up of
+an isoneutral second order operator and an eddy induced advective part.
 In all these lateral diffusive formulations,
 the specification of the lateral eddy coefficients remains the problematic point as
-there is no really satisfactory formulation of these coefficients as a function of large-scale features.
+there is no really satisfactory formulation of these coefficients as
+a function of large-scale features.
 
 In eddy-resolving configurations, a second order operator can be used,
@@ -1032,39 +997,44 @@
 not interfering with the resolved mesoscale activity.
 Another approach is becoming more and more popular:
-instead of specifying explicitly a sub-grid scale term in the momentum and tracer time evolution equations,
-one uses a advective scheme which is diffusive enough to maintain the model stability.
-It must be emphasised that then, all the sub-grid scale physics is included in the formulation of
-the advection scheme.
+instead of specifying explicitly a sub-grid scale term in
+the momentum and tracer time evolution equations,
+one uses an advective scheme which is diffusive enough to maintain the model stability.
+It must be emphasised that then,
+all the sub-grid scale physics is included in the formulation of the advection scheme.
 
 All these parameterisations of subgrid scale physics have advantages and drawbacks.
-There are not all available in \NEMO. For active tracers (temperature and salinity) the main ones are:
+They are not all available in \NEMO.
+For active tracers (temperature and salinity) the main ones are:
 Laplacian and bilaplacian operators acting along geopotential or iso-neutral surfaces,
-\citet{Gent1990} parameterisation, and various slightly diffusive advection schemes.
-For momentum, the main ones are: Laplacian and bilaplacian operators acting along geopotential surfaces,
+\citet{gent.mcwilliams_JPO90} parameterisation, and various slightly diffusive advection schemes.
+For momentum, the main ones are:
+Laplacian and bilaplacian operators acting along geopotential surfaces,
 and UBS advection schemes when flux form is chosen for the momentum advection.
 
+%% =================================================================================================
 \subsubsection{Lateral laplacian tracer diffusive operator}
 
-The lateral Laplacian tracer diffusive operator is defined by (see \autoref{apdx:B}):
+The lateral Laplacian tracer diffusive operator is defined by (see \autoref{apdx:DIFFOPERS}):
 \begin{equation}
-  \label{eq:PE_iso_tensor}
-  D^{lT} = \nabla \vect . \lt( A^{lT} \; \Re \; \nabla T \rt) \quad \text{with} \quad
-  \Re =
-    \begin{pmatrix}
-      1    & 0    & -r_1          \\
-      0    & 1    & -r_2          \\
-      -r_1 & -r_2 & r_1^2 + r_2^2 \\
-    \end{pmatrix}
+  \label{eq:MB_iso_tensor}
+  D^{lT} = \nabla \vect . \lt( A^{lT} \; \Re \; \nabla T \rt) \quad \text{with} \quad \Re =
+  \begin{pmatrix}
+    1    & 0    & -r_1          \\
+    0    & 1    & -r_2          \\
+    -r_1 & -r_2 & r_1^2 + r_2^2 \\
+  \end{pmatrix}
 \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).
-Note that the formulation \autoref{eq:PE_iso_tensor} is exact for
+the model level (\eg\ $z$- or $s$-surfaces).
+Note that the formulation \autoref{eq:MB_iso_tensor} is exact for
 the rotation between geopotential and $s$-surfaces,
 while it is only an approximation for the rotation between isoneutral and $z$- or $s$-surfaces.
-Indeed, in the latter case, two assumptions are made to simplify \autoref{eq:PE_iso_tensor} \citep{Cox1987}.
-First, the horizontal contribution of the dianeutral mixing is neglected since the ratio between iso and
-dia-neutral diffusive coefficients is known to be several orders of magnitude smaller than unity.
+Indeed, in the latter case, two assumptions are made to simplify \autoref{eq:MB_iso_tensor}
+\citep{cox_OM87}.
+First, the horizontal contribution of the dianeutral mixing is neglected since
+the ratio between iso and dia-neutral diffusive coefficients is known to be
+several orders of magnitude smaller than unity.
 Second, the two isoneutral directions of diffusion are assumed to be independent since
-the slopes are generally less than $10^{-2}$ in the ocean (see \autoref{apdx:B}).
+the slopes are generally less than $10^{-2}$ in the ocean (see \autoref{apdx:DIFFOPERS}).
 
 For \textit{iso-level} diffusion, $r_1$ and $r_2 $ are zero.
@@ -1073,39 +1043,43 @@
 For \textit{geopotential} diffusion,
 $r_1$ and $r_2 $ are the slopes between the geopotential and computational surfaces:
-they are equal to $\sigma_1$ and $\sigma_2$, respectively (see \autoref{eq:PE_sco_slope}).
-
-For \textit{isoneutral} diffusion $r_1$ and $r_2$ are the slopes between the isoneutral and computational surfaces.
+they are equal to $\sigma_1$ and $\sigma_2$, respectively (see \autoref{eq:MB_sco_slope}).
+
+For \textit{isoneutral} diffusion $r_1$ and $r_2$ are the slopes between
+the isoneutral and computational surfaces.
 Therefore, they are different quantities, but have similar expressions in $z$- and $s$-coordinates.
 In $z$-coordinates:
 \begin{equation}
-  \label{eq:PE_iso_slopes}
-  r_1 = \frac{e_3}{e_1}	\lt( \pd[\rho]{i} \rt) \lt( \pd[\rho]{k} \rt)^{-1} \quad
-  r_2 = \frac{e_3}{e_2}	\lt( \pd[\rho]{j} \rt) \lt( \pd[\rho]{k} \rt)^{-1}
+  \label{eq:MB_iso_slopes}
+  r_1 = \frac{e_3}{e_1} \lt( \pd[\rho]{i} \rt) \lt( \pd[\rho]{k} \rt)^{-1} \quad
+  r_2 = \frac{e_3}{e_2} \lt( \pd[\rho]{j} \rt) \lt( \pd[\rho]{k} \rt)^{-1}
 \end{equation}
 while in $s$-coordinates $\pd[]{k}$ is replaced by $\pd[]{s}$.
 
+%% =================================================================================================
 \subsubsection{Eddy induced velocity}
 
-When the \textit{eddy induced velocity} parametrisation (eiv) \citep{Gent1990} is used,
+When the \textit{eddy induced velocity} parametrisation (eiv) \citep{gent.mcwilliams_JPO90} is used,
 an additional tracer advection is introduced in combination with the isoneutral diffusion of tracers:
 \[
-  % \label{eq:PE_iso+eiv}
+  % \label{eq:MB_iso+eiv}
   D^{lT} = \nabla \cdot \lt( A^{lT} \; \Re \; \nabla T \rt) + \nabla \cdot \lt( \vect U^\ast \, T \rt)
 \]
 where $ \vect U^\ast = \lt( u^\ast,v^\ast,w^\ast \rt)$ is a non-divergent,
 eddy-induced transport velocity. This velocity field is defined by:
-\begin{gather}
-  % \label{eq:PE_eiv}
-  u^\ast =   \frac{1}{e_3}            \pd[]{k} \lt( A^{eiv} \;        \tilde{r}_1 \rt) \\
-  v^\ast =   \frac{1}{e_3}            \pd[]{k} \lt( A^{eiv} \;        \tilde{r}_2 \rt) \\
+\[
+  % \label{eq:MB_eiv}
+  u^\ast =   \frac{1}{e_3}            \pd[]{k} \lt( A^{eiv} \;        \tilde{r}_1 \rt) \quad
+  v^\ast =   \frac{1}{e_3}            \pd[]{k} \lt( A^{eiv} \;        \tilde{r}_2 \rt) \quad
   w^\ast = - \frac{1}{e_1 e_2} \lt[   \pd[]{i} \lt( A^{eiv} \; e_2 \, \tilde{r}_1 \rt)
                                      + \pd[]{j} \lt( A^{eiv} \; e_1 \, \tilde{r}_2 \rt) \rt]
-\end{gather}
+\]
 where $A^{eiv}$ is the eddy induced velocity coefficient
 (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: 
-\begin{align}
-  \label{eq:PE_slopes_eiv}
+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:
+\begin{equation}
+  \label{eq:MB_slopes_eiv}
   \tilde{r}_n =
     \begin{cases}
@@ -1114,63 +1088,67 @@
     \end{cases}
   \quad \text{where~} n = 1, 2
-\end{align}
+\end{equation}
 
 The normal component of the eddy induced velocity is zero at all the boundaries.
-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}).
-
+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}).
+
+%% =================================================================================================
 \subsubsection{Lateral bilaplacian tracer diffusive operator}
 
 The lateral bilaplacian tracer diffusive operator is defined by:
 \[
-  % \label{eq:PE_bilapT}
+  % \label{eq:MB_bilapT}
   D^{lT}= - \Delta \; (\Delta T) \quad \text{where} \quad
   \Delta \bullet = \nabla \lt( \sqrt{B^{lT}} \; \Re \; \nabla \bullet \rt)
 \]
-It is the Laplacian operator given by \autoref{eq:PE_iso_tensor} applied twice with
+It is the Laplacian operator given by \autoref{eq:MB_iso_tensor} applied twice with
 the harmonic eddy diffusion coefficient set to the square root of the biharmonic one.
 
+%% =================================================================================================
 \subsubsection{Lateral Laplacian momentum diffusive operator}
 
 The Laplacian momentum diffusive operator along $z$- or $s$-surfaces is found by
-applying \autoref{eq:PE_lap_vector} to the horizontal velocity vector (see \autoref{apdx:B}):
+applying \autoref{eq:MB_lap_vector} to the horizontal velocity vector (see \autoref{apdx:DIFFOPERS}):
 \begin{align*}
-  % \label{eq:PE_lapU}
+  % \label{eq:MB_lapU}
   \vect D^{l \vect U} &=   \nabla_h        \big( A^{lm}    \chi             \big)
                          - \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)
 \end{align*}
 
-Such a formulation ensures a complete separation between the vorticity and horizontal divergence fields
-(see \autoref{apdx:C}).
+Such a formulation ensures a complete separation between
+the vorticity and horizontal divergence fields (see \autoref{apdx:INVARIANTS}).
 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),
-the $u$ and $v$-fields are considered as independent scalar fields, so that the diffusive operator is given by:
-\begin{gather*}
-  % \label{eq:PE_lapU_iso}
-    D_u^{l \vect U} = \nabla . \lt( A^{lm} \; \Re \; \nabla u \rt) \\
+(\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:
+\[
+  % \label{eq:MB_lapU_iso}
+    D_u^{l \vect U} = \nabla . \lt( A^{lm} \; \Re \; \nabla u \rt) \quad
     D_v^{l \vect U} = \nabla . \lt( A^{lm} \; \Re \; \nabla v \rt)
-\end{gather*}
-where $\Re$ is given by \autoref{eq:PE_iso_tensor}.
+\]
+where $\Re$ is given by \autoref{eq:MB_iso_tensor}.
 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_al_JGR03}.
-
-\subsubsection{lateral bilaplacian momentum diffusive operator}
-
-As for tracers, the bilaplacian order momentum diffusive operator is a re-entering Laplacian operator with
+a geographical coordinate system \citep{lengaigne.madec.ea_JGR03}.
+
+%% =================================================================================================
+\subsubsection{Lateral bilaplacian momentum diffusive operator}
+
+As for tracers,
+the bilaplacian order momentum diffusive operator is a re-entering Laplacian operator with
 the harmonic eddy diffusion coefficient set to the square root of the biharmonic one.
 Nevertheless it is currently not available in the iso-neutral case.
 
-\biblio
-
-\pindex
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_model_basics_zstar.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_model_basics_zstar.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_model_basics_zstar.tex	(revision 11831)
@@ -2,21 +2,33 @@
 
 \begin{document}
-% ================================================================
-% Chapter 1 Model Basics
-% ================================================================
-% ================================================================
-% Curvilinear \zstar- \sstar-coordinate System
-% ================================================================
+
 \chapter{ essai \zstar \sstar}
+
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{\textwidth}{l||X|X}
+    Release & Author(s) & Modifications \\
+    \hline
+    {\em   4.0} & {\em ...} & {\em ...} \\
+    {\em   3.6} & {\em ...} & {\em ...} \\
+    {\em   3.4} & {\em ...} & {\em ...} \\
+    {\em <=3.4} & {\em ...} & {\em ...}
+  \end{tabularx}
+}
+
+\clearpage
+
+%% =================================================================================================
 \section{Curvilinear \zstar- or \sstar coordinate system}
 
-% -------------------------------------------------------------------------------------------------------------
-% ????
-% -------------------------------------------------------------------------------------------------------------
-
 \colorbox{yellow}{ to be updated }
 
 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{Levier2007} 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,7 +36,7 @@
 % from MOM4p1 documentation
 
-To overcome problems with vanishing surface and/or bottom cells, we consider the zstar coordinate 
-\[
-  % \label{eq:PE_}
+To overcome problems with vanishing surface and/or bottom cells, we consider the zstar coordinate
+\[
+  % \label{eq:MBZ_PE_}
   z^\star = H \left( \frac{z-\eta}{H+\eta} \right)
 \]
@@ -40,5 +52,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:MB_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 +61,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,39 +76,32 @@
 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$.
+
 %  essai update time splitting...
-%%%
-
-% ================================================================
-% Surface Pressure Gradient and Sea Surface Height
-% ================================================================
-\section{Surface pressure gradient and sea surface heigth (\protect\mdl{dynspg})}
-\label{sec:DYN_hpg_spg}
-%-----------------------------------------nam_dynspg----------------------------------------------------
-
-%\nlst{nam_dynspg} 
-%------------------------------------------------------------------------------------------------------------
-Options are defined through the \ngn{nam\_dynspg} namelist variables.
-The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}).
+
+%% =================================================================================================
+\section[Surface pressure gradient and sea surface heigth (\textit{dynspg.F90})]{Surface pressure gradient and sea surface heigth (\protect\mdl{dynspg})}
+\label{sec:MBZ_dyn_hpg_spg}
+
+%\nlst{nam_dynspg}
+Options are defined through the \nam{_dynspg}{\_dynspg} namelist variables.
+The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:MB_hor_pg}).
 The main distinction is between the fixed volume case (linear free surface or rigid lid) and
 the variable volume case (nonlinear free surface, \key{vvl} is active).
-In the linear free surface case (\autoref{subsec:PE_free_surface}) and rigid lid (\autoref{PE_rigid_lid}),
+In the linear free surface case (\autoref{subsec:MB_free_surface}) and rigid lid (\autoref{PE_rigid_lid}),
 the vertical scale factors $e_{3}$ are fixed in time,
-while in the nonlinear case (\autoref{subsec:PE_free_surface}) they are time-dependent.
+while in the nonlinear case (\autoref{subsec:MB_free_surface}) they are time-dependent.
 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}),
+the filtered free surface, which is a modification of the continuous equations %(see \autoref{eq:MB_flt?}),
 and the split-explicit free surface described below.
 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}.
 
-%-------------------------------------------------------------
 % Explicit
-%-------------------------------------------------------------
-\subsubsection{Explicit (\protect\key{dynspg\_exp})}
-\label{subsec:DYN_spg_exp}
+%% =================================================================================================
+\subsubsection[Explicit (\texttt{\textbf{key\_dynspg\_exp}})]{Explicit (\protect\key{dynspg\_exp})}
+\label{subsec:MBZ_dyn_spg_exp}
 
 In the explicit free surface formulation, the model time step is chosen small enough to
@@ -104,5 +109,5 @@
 The sea surface height is given by:
 \begin{equation}
-  \label{eq:dynspg_ssh}
+  \label{eq:MBZ_dynspg_ssh}
   \frac{\partial \eta }{\partial t}\equiv \frac{\text{EMP}}{\rho_w }+\frac{1}{e_{1T}
     e_{2T} }\sum\limits_k {\left( {\delta_i \left[ {e_{2u} e_{3u} u}
@@ -114,9 +119,9 @@
 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:DYN_spg_ssh}) is centred in time (\textit{now} velocity).
 
 The surface pressure gradient, also evaluated using a leap-frog scheme, is then simply given by:
 \begin{equation}
-  \label{eq:dynspg_exp}
+  \label{eq:MBZ_dynspg_exp}
   \left\{
     \begin{aligned}
@@ -125,52 +130,46 @@
     \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:DYN_spg_exp}).
+
 % Split-explicit time-stepping
-%-------------------------------------------------------------
-\subsubsection{Split-explicit time-stepping (\protect\key{dynspg\_ts})}
-\label{subsec:DYN_spg_ts}
-%--------------------------------------------namdom----------------------------------------------------
-
-\nlst{namdom} 
-%--------------------------------------------------------------------------------------------------------------
-The split-explicit free surface formulation used in OPA follows the one proposed by \citet{Griffies2004}.
+%% =================================================================================================
+\subsubsection[Split-explicit time-stepping (\texttt{\textbf{key\_dynspg\_ts}})]{Split-explicit time-stepping (\protect\key{dynspg\_ts})}
+\label{subsec:MBZ_dyn_spg_ts}
+
+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}{rdtbt} in the \nam{dom}{dom} namelist (Figure III.3).
+
 \begin{figure}[!t]
-  \begin{center}
-    \includegraphics[width=0.90\textwidth]{Fig_DYN_dynspg_ts}
-    \caption{
-      \protect\label{fig:DYN_dynspg_ts}
-      Schematic of the split-explicit time stepping scheme for the barotropic and baroclinic modes,
-      after \citet{Griffies2004}.
-      Time increases to the right.
-      Baroclinic time steps are denoted by $t-\Delta t$, $t, t+\Delta t$, and $t+2\Delta t$.
-      The curved line represents a leap-frog time step,
-      and the smaller barotropic time steps $N \Delta t=2\Delta t$ are denoted by the zig-zag line.
-      The vertically integrated forcing \textbf{M}(t) computed at
-      baroclinic time step t represents the interaction between the barotropic and baroclinic motions.
-      While keeping the total depth, tracer, and freshwater forcing fields fixed,
-      a leap-frog integration carries the surface height and vertically integrated velocity from
-      t to $t+2 \Delta t$ using N barotropic time steps of length $\Delta t$.
-      Time averaging the barotropic fields over the N+1 time steps (endpoints included)
-      centers the vertically integrated velocity at the baroclinic timestep $t+\Delta t$.
-      A baroclinic leap-frog time step carries the surface height to $t+\Delta t$ using the convergence of
-      the time averaged vertically integrated velocity taken from baroclinic time step t.
-    }
-  \end{center}
+  \centering
+  %\includegraphics[width=0.66\textwidth]{MBZ_DYN_dynspg_ts}
+  \caption[Schematic of the split-explicit time stepping scheme for
+  the barotropic and baroclinic modes, after \citet{Griffies2004?}]{
+    Schematic of the split-explicit time stepping scheme for the barotropic and baroclinic modes,
+    after \citet{Griffies2004?}.
+    Time increases to the right.
+    Baroclinic time steps are denoted by $t-\Delta t$, $t, t+\Delta t$, and $t+2\Delta t$.
+    The curved line represents a leap-frog time step,
+    and the smaller barotropic time steps $N \Delta t=2\Delta t$ are denoted by the zig-zag line.
+    The vertically integrated forcing \textbf{M}(t) computed at
+    baroclinic time step t represents the interaction between the barotropic and baroclinic motions.
+    While keeping the total depth, tracer, and freshwater forcing fields fixed,
+    a leap-frog integration carries the surface height and vertically integrated velocity from
+    t to $t+2 \Delta t$ using N barotropic time steps of length $\Delta t$.
+    Time averaging the barotropic fields over the N+1 time steps (endpoints included)
+    centers the vertically integrated velocity at the baroclinic timestep $t+\Delta t$.
+    A baroclinic leap-frog time step carries the surface height to $t+\Delta t$ using
+    the convergence of the time averaged vertically integrated velocity taken from
+    baroclinic time step t.}
+  \label{fig:MBZ_dyn_dynspg_ts}
 \end{figure}
-%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >
 
 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{Levier2007} in
-the case of an analytical barotropic Kelvin wave. 
+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.
 
 %from griffies book: .....   copy past !
@@ -183,10 +182,10 @@
 We have
 \[
-  % \label{eq:DYN_spg_ts_eta}
+  % \label{eq:MBZ_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*}
-  % \label{eq:DYN_spg_ts_u}
+  % \label{eq:MBZ_dyn_spg_ts_u}
   \textbf{U}^{(b)}(\tau,t_{n+1}) - \textbf{U}^{(b)}(\tau,t_{n-1})  \\
   = 2\Delta t \left[ - f \textbf{k} \times \textbf{U}^{(b)}(\tau,t_{n})
@@ -202,13 +201,13 @@
 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 
-\[
-  % \label{eq:DYN_spg_ts_t}
-  t_n=\tau+n\Delta t   
+This is also the time that sets the barotropic time steps via
+\[
+  % \label{eq:MBZ_dyn_spg_ts_t}
+  t_n=\tau+n\Delta t
 \]
 with $n$ an integer.
-The density scaled surface pressure is evaluated via 
-\[
-  % \label{eq:DYN_spg_ts_ps}
+The density scaled surface pressure is evaluated via
+\[
+  % \label{eq:MBZ_dyn_spg_ts_ps}
   p_s^{(b)}(\tau,t_{n}) =
   \begin{cases}
@@ -217,7 +216,7 @@
   \end{cases}
 \]
-To get started, we assume the following initial conditions 
-\[
-  % \label{eq:DYN_spg_ts_eta}
+To get started, we assume the following initial conditions
+\[
+  % \label{eq:MBZ_dyn_spg_ts_eta}
   \begin{split}
     \eta^{(b)}(\tau,t_{n=0}) &= \overline{\eta^{(b)}(\tau)} \\
@@ -225,7 +224,7 @@
   \end{split}
 \]
-with 
-\[
-  % \label{eq:DYN_spg_ts_etaF}
+with
+\[
+  % \label{eq:MBZ_dyn_spg_ts_etaF}
   \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\Delta t,t_{n})
 \]
@@ -233,27 +232,27 @@
 Likewise,
 \[
-  % \label{eq:DYN_spg_ts_u}
+  % \label{eq:MBZ_dyn_spg_ts_u}
   \textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)}	\\ \\
   \textbf{U}(\tau,t_{n=1}) = \textbf{U}^{(b)}(\tau,t_{n=0}) + \Delta t \ \text{RHS}_{n=0}
 \]
-with 
-\[
-  % \label{eq:DYN_spg_ts_u}
+with
+\[
+  % \label{eq:MBZ_dyn_spg_ts_u}
   \overline{\textbf{U}^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau-\Delta t,t_{n})
 \]
 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$ 
-\[
-  % \label{eq:DYN_spg_ts_u}
+produce the updated vertically integrated velocity at baroclinic time $\tau + \Delta \tau$
+\[
+  % \label{eq:MBZ_dyn_spg_ts_u}
   \textbf{U}(\tau+\Delta t) = \overline{\textbf{U}^{(b)}(\tau+\Delta t)}
   = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau,t_{n})
 \]
 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}
+  \label{eq:MBZ_dyn_spg_ts_ssh}
   \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\Delta t \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right]
 \end{equation}
@@ -261,20 +260,20 @@
 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}.
+the leap-frog splitting mode in equation \autoref{eq:MBZ_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}
-  \label{eq:DYN_spg_ts_sshf}
+  \label{eq:MBZ_dyn_spg_ts_sshf}
   \eta^{F}(\tau-\Delta) =  \overline{\eta^{(b)}(\tau)}
 \end{equation}
-Another approach tried was 
-
-\[
-  % \label{eq:DYN_spg_ts_sshf2}
+Another approach tried was
+
+\[
+  % \label{eq:MBZ_dyn_spg_ts_sshf2}
   \eta^{F}(\tau-\Delta) = \eta(\tau)
   + (\alpha/2) \left[\overline{\eta^{(b)}}(\tau+\Delta t)
@@ -285,36 +284,32 @@
 This isolation allows for an easy check that tracer conservation is exact when 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. 
-
-%-------------------------------------------------------------
-% Filtered formulation 
-%-------------------------------------------------------------
-\subsubsection{Filtered formulation (\protect\key{dynspg\_flt})}
-\label{subsec:DYN_spg_flt}
-
-The filtered formulation follows the \citet{Roullet2000} implementation.
+However, in the general case with a non-zero $\alpha$, the filter \autoref{eq:MBZ_dyn_spg_ts_sshf} was found to
+be more conservative, and so is recommended.
+
+% Filtered formulation
+%% =================================================================================================
+\subsubsection[Filtered formulation (\texttt{\textbf{key\_dynspg\_flt}})]{Filtered formulation (\protect\key{dynspg\_flt})}
+\label{subsec:MBZ_dyn_spg_flt}
+
+The filtered formulation follows the \citet{Roullet2000?} implementation.
 The extra term introduced in the equations (see {\S}I.2.2) is solved implicitly.
 The elliptic solvers available in the code are documented in \autoref{chap:MISC}.
-The amplitude of the extra term is given by the namelist variable \np{rnu}.
-The default value is 1, as recommended by \citet{Roullet2000}
-
-\colorbox{red}{\np{rnu}\forcode{ = 1} to be suppressed from namelist !}
-
-%-------------------------------------------------------------
-% Non-linear free surface formulation 
-%-------------------------------------------------------------
-\subsection{Non-linear free surface formulation (\protect\key{vvl})}
-\label{subsec:DYN_spg_vvl}
+The amplitude of the extra term is given by the namelist variable \np{rnu}{rnu}.
+The default value is 1, as recommended by \citet{Roullet2000?}
+
+\colorbox{red}{\np[=1]{rnu}{rnu} to be suppressed from namelist !}
+
+% Non-linear free surface formulation
+%% =================================================================================================
+\subsection[Non-linear free surface formulation (\texttt{\textbf{key\_vvl}})]{Non-linear free surface formulation (\protect\key{vvl})}
+\label{subsec:MBZ_dyn_spg_vvl}
 
 In the non-linear free surface formulation, the variations of volume are fully taken into account.
-This option is presented in a report \citep{Levier2007} 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.
+\autoref{?:DYN_spg_linear?} except that the ocean depth is now time-dependent.
 In particular, this means that in filtered case, the matrix to be inverted has to be recomputed at each time-step.
 
-\biblio
-
-\pindex
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_time_domain.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_time_domain.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/chap_time_domain.tex	(revision 11831)
@@ -3,48 +3,63 @@
 \begin{document}
 
-% ================================================================
-% Chapter 2 ——— Time Domain (step.F90)
-% ================================================================
-\chapter{Time Domain (STP)}
-\label{chap:STP}
-\minitoc
+\chapter{Time Domain}
+\label{chap:TD}
+
+\thispagestyle{plain}
+
+\chaptertoc
+
+\paragraph{Changes record} ~\\
+
+{\footnotesize
+  \begin{tabularx}{0.5\textwidth}{l||X|X}
+    Release          & Author(s)                                       &
+    Modifications                                                      \\
+    \hline
+    {\em        4.0} & {\em J\'{e}r\^{o}me Chanut \newline Tim Graham} &
+    {\em Review \newline Update                                      } \\
+    {\em        3.6} & {\em Christian \'{E}th\'{e}                   } &
+    {\em Update                                                      } \\
+    {\em $\leq$ 3.4} & {\em Gurvan Madec                             } &
+    {\em First version                                               } \\
+  \end{tabularx}
+}
+
+\clearpage
 
 % Missing things:
-%	- daymod: definition of the time domain (nit000, nitend andd the calendar)
-
-\gmcomment{STEVEN :maybe a picture of the directory structure in the introduction which could be referred to here,
-  would help  ==> to be added}
-%%%%
-
-\newpage
-
-Having defined the continuous equations in \autoref{chap:PE}, we need now to choose a time discretization,
+% - daymod: definition of the time domain (nit000, nitend and the calendar)
+
+\cmtgm{STEVEN :maybe a picture of the directory structure in the introduction which
+could be referred to here, would help  ==> to be added}
+
+Having defined the continuous equations in \autoref{chap:MB},
+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.
 
-% ================================================================
-% Time Discretisation
-% ================================================================
+%% =================================================================================================
 \section{Time stepping environment}
-\label{sec:STP_environment}
-
-The time stepping used in \NEMO is a three level scheme that can be represented as follows:
+\label{sec:TD_environment}
+
+The time stepping used in \NEMO\ is a three level scheme that can be represented as follows:
 \begin{equation}
-  \label{eq:STP}
+  \label{eq:TD}
   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;
+RHS is the \textbf{R}ight-\textbf{H}and-\textbf{S}ide of the corresponding time evolution equation;
 $\rdt$ is the time step;
 and the superscripts indicate the time at which a quantity is evaluated.
-Each term of the RHS is evaluated at a specific time step depending on the physics with which it is associated.
-
-The choice of the time step used for this evaluation is discussed below as well as
+Each term of the RHS is evaluated at a specific time stepping depending on
+the physics with which it is associated.
+
+The choice of the time stepping used for this evaluation is discussed below as well as
 the implications for starting or restarting a model simulation.
 Note that the time stepping calculation is generally performed in a single operation.
-With such a complex and nonlinear system of equations it would be dangerous to let a prognostic variable evolve in
-time for each term separately.
+With such a complex and nonlinear system of equations it would be dangerous to
+let a prognostic variable evolve in time for each term separately.
 
 The three level scheme requires three arrays for each prognostic variable.
@@ -52,70 +67,73 @@
 The third array, although referred to as $x_a$ (after) in the code,
 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.
-Generally, the time stepping is performed once at each time step in the \mdl{tranxt} and \mdl{dynnxt} modules,
-except when using implicit vertical diffusion or calculating sea surface height in which
-case time-splitting options are used.
-
-% -------------------------------------------------------------------------------------------------------------
-%        Non-Diffusive Part---Leapfrog Scheme
-% -------------------------------------------------------------------------------------------------------------
+but rather it is used to store the time derivative (RHS in \autoref{eq:TD})
+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.
+
+%% =================================================================================================
 \section{Non-diffusive part --- Leapfrog scheme}
-\label{sec:STP_leap_frog}
-
-The time stepping used for processes other than diffusion is the well-known leapfrog scheme
-\citep{Mesinger_Arakawa_Bk76}.
+\label{sec:TD_leap_frog}
+
+The time stepping used for processes other than diffusion is
+the well-known \textbf{L}eap\textbf{F}rog (LF) scheme \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:TD} 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.
 It is an efficient method that achieves second-order accuracy with
 just one right hand side evaluation per time step.
-Moreover, it does not artificially damp linear oscillatory motion nor does it produce instability by
-amplifying the oscillations.
+Moreover, it does not artificially damp linear oscillatory motion
+nor does it produce instability by amplifying the oscillations.
 These advantages are somewhat diminished by the large phase-speed error of the leapfrog scheme,
-and the unsuitability of leapfrog differencing for the representation of diffusion and Rayleigh damping processes.
+and the unsuitability of leapfrog differencing for the representation of diffusion and
+Rayleigh damping processes.
 However, the scheme allows the coexistence of a numerical and a physical mode due to
 its leading third order dispersive error.
 In other words a divergence of odd and even time steps may occur.
-To prevent it, the leapfrog scheme is often used in association with a Robert-Asselin time filter
-(hereafter the LF-RA scheme).
-This filter, first designed by \citet{Robert_JMSJ66} and more comprehensively studied by \citet{Asselin_MWR72},
+To prevent it, the leapfrog scheme is often used in association with
+a \textbf{R}obert-\textbf{A}sselin time filter (hereafter the LF-RA scheme).
+This filter,
+first designed by \citet{robert_JMSJ66} and more comprehensively studied by \citet{asselin_MWR72},
 is a kind of laplacian diffusion in time that mixes odd and even time steps:
 \begin{equation}
-  \label{eq:STP_asselin}
+  \label{eq:TD_asselin}
   x_F^t = x^t + \gamma \, \lt[ x_F^{t - \rdt} - 2 x^t + x^{t + \rdt} \rt]
 \end{equation}
 where the subscript $F$ denotes filtered values and $\gamma$ is the Asselin coefficient.
-$\gamma$ is initialized as \np{rn\_atfp} (namelist parameter).
-Its default value is \np{rn\_atfp}~\forcode{= 10.e-3} (see \autoref{sec:STP_mLF}),
-causing only a weak dissipation of high frequency motions (\citep{Farge1987}).
+$\gamma$ is initialized as \np{rn_atfp}{rn\_atfp} (namelist parameter).
+Its default value is \np[=10.e-3]{rn_atfp}{rn\_atfp} (see \autoref{sec:TD_mLF}),
+causing only a weak dissipation of high frequency motions (\citep{farge-coulombier_phd87}).
 The addition of a time filter degrades the accuracy of the calculation from second to first order.
 However, the second order truncation error is proportional to $\gamma$, which is small compared to 1.
 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.
-When used with the 2nd order space centred discretisation of the advection terms in
+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.
+When used with the 2$^nd$ 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 
-filter parameter and the viscosity and diffusion coefficients.
-
-% -------------------------------------------------------------------------------------------------------------
-%        Diffusive Part---Forward or Backward Scheme
-% -------------------------------------------------------------------------------------------------------------
+diffusion is set explicitly by the user through the Robert-Asselin filter parameter and
+the viscosity and diffusion coefficients.
+
+%% =================================================================================================
 \section{Diffusive part --- Forward or backward scheme}
-\label{sec:STP_forward_imp}
-
-The leapfrog differencing scheme is unsuitable for the representation of diffusion and damping processes.
-For a tendancy $D_x$, representing a diffusion term or a restoring term to a tracer climatology
+\label{sec:TD_forward_imp}
+
+The leapfrog differencing scheme is unsuitable for
+the representation of diffusion and damping processes.
+For a tendency $D_x$, representing a diffusion term or a restoring term to a tracer climatology
 (when present, see \autoref{sec:TRA_dmp}), a forward time differencing scheme is used :
 \[
-  %\label{eq:STP_euler}
+  %\label{eq:TD_euler}
   x^{t + \rdt} = x^{t - \rdt} + 2 \, \rdt \ D_x^{t - \rdt}
 \]
 
 This is diffusive in time and conditionally stable.
-The conditions for stability of second and fourth order horizontal diffusion schemes are \citep{Griffies_Bk04}:
+The conditions for stability of second and fourth order horizontal diffusion schemes are
+\citep{griffies_bk04}:
 \begin{equation}
-  \label{eq:STP_euler_stability}
+  \label{eq:TD_euler_stability}
   A^h <
   \begin{cases}
@@ -124,42 +142,26 @@
   \end{cases}
 \end{equation}
-where $e$ is the smallest grid size in the two horizontal directions and $A^h$ is the mixing coefficient.
-The linear constraint \autoref{eq:STP_euler_stability} is a necessary condition, but not sufficient.
+where $e$ is the smallest grid size in the two horizontal directions and
+$A^h$ is the mixing coefficient.
+The linear constraint \autoref{eq:TD_euler_stability} is a necessary condition, but not sufficient.
 If it is not satisfied, even mildly, then the model soon becomes wildly unstable.
-The instability can be removed by either reducing the length of the time steps or reducing the mixing coefficient.
+The instability can be removed by either reducing the length of the time steps or
+reducing the mixing coefficient.
 
 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.
-Two solutions are available in \NEMO to overcome the stability constraint:
-$(a)$ a forward time differencing scheme using a time splitting technique (\np{ln\_zdfexp}~\forcode{= .true.}) or
-$(b)$ a backward (or implicit) time differencing scheme                   (\np{ln\_zdfexp}~\forcode{= .false.}).
-In $(a)$, the master time step $\Delta$t is cut into $N$ fractional time steps so that
-the stability criterion is reduced by a factor of $N$.
-The computation is performed as follows:
-\begin{alignat*}{2}
-  % \label{eq:STP_ts}
-  &x_\ast^{t - \rdt}                      &= &x^{t - \rdt} \\
-  &x_\ast^{t - \rdt + L \frac{2 \rdt}{N}} &=   &x_\ast ^{t - \rdt + (L - 1) \frac{2 \rdt}{N}}
-                                             + \frac{2 \rdt}{N} \; DF^{t - \rdt + (L - 1) \frac{2 \rdt}{N}}
-  \quad \text{for $L = 1$ to $N$} \\
-  &x^{t + \rdt}                           &= &x_\ast^{t + \rdt}
-\end{alignat*}
-with DF a vertical diffusion term.
-The number of fractional time steps, $N$, is given by setting \np{nn\_zdfexp}, (namelist parameter).
-The scheme $(b)$ is unconditionally stable but diffusive. It can be written as follows:
+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}
-  \label{eq:STP_imp}
+  \label{eq:TD_imp}
   x^{t + \rdt} = x^{t - \rdt} + 2 \, \rdt \ \text{RHS}_x^{t + \rdt}
 \end{equation}
 
-%%gm
-%%gm   UPDATE the next paragraphs with time varying thickness ...
-%%gm
-
-This scheme is rather time consuming since it requires a matrix inversion,
-but it becomes attractive since a value of 3 or more is needed for N in the forward time differencing scheme.
+\cmtgm{UPDATE the next paragraphs with time varying thickness ...}
+
+This scheme is rather time consuming since it requires a matrix inversion.
 For example, the finite difference approximation of the temperature equation is:
 \[
-  % \label{eq:STP_imp_zdf}
+  % \label{eq:TD_imp_zdf}
   \frac{T(k)^{t + 1} - T(k)^{t - 1}}{2 \; \rdt}
   \equiv
@@ -167,132 +169,143 @@
 \]
 where RHS is the right hand side of the equation except for the vertical diffusion term.
-We rewrite \autoref{eq:STP_imp} as:
+We rewrite \autoref{eq:TD_imp} as:
 \begin{equation}
-  \label{eq:STP_imp_mat}
+  \label{eq:TD_imp_mat}
   -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*} 
-  c(k) &= A_w^{vT} (k) \, / \, e_{3w} (k)     \\
-  d(k) &= e_{3t}   (k)       \, / \, (2 \rdt) + c_k + c_{k + 1}    \\
-  b(k) &= e_{3t}   (k) \; \lt( T^{t - 1}(k) \, / \, (2 \rdt) + \text{RHS} \rt)
-\end{align*}
-
-\autoref{eq:STP_imp_mat} is a linear system of equations with an associated matrix which is tridiagonal.
-Moreover,
-$c(k)$ and $d(k)$ are positive and the diagonal term is greater than the sum of the two extra-diagonal terms,
+where
+\[
+  c(k) = A_w^{vT} (k) \, / \, e_{3w} (k) \text{,} \quad
+  d(k) = e_{3t}   (k)       \, / \, (2 \rdt) + c_k + c_{k + 1} \quad \text{and} \quad
+  b(k) = e_{3t}   (k) \; \lt( T^{t - 1}(k) \, / \, (2 \rdt) + \text{RHS} \rt)
+\]
+
+\autoref{eq:TD_imp_mat} is a linear system of equations with
+an associated matrix which is tridiagonal.
+Moreover, $c(k)$ and $d(k)$ are positive and
+the diagonal term is greater than the sum of the two extra-diagonal terms,
 therefore a special adaptation of the Gauss elimination procedure is used to find the solution
-(see for example \citet{Richtmyer1967}).
-
-% -------------------------------------------------------------------------------------------------------------
-%        Surface Pressure gradient
-% -------------------------------------------------------------------------------------------------------------
+(see for example \citet{richtmyer.morton_bk67}).
+
+%% =================================================================================================
 \section{Surface pressure gradient}
-\label{sec:STP_spg_ts}
-
-===>>>>  TO BE written....  :-)
-
-%\gmcomment{ 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!t]
-  \begin{center}
-    \includegraphics[]{Fig_TimeStepping_flowchart}
-    \caption{
-      \protect\label{fig:TimeStep_flowchart}
-      Sketch of the leapfrog time stepping sequence in \NEMO from \citet{Leclair_Madec_OM09}.
-      The use of a semi -implicit computation of the hydrostatic pressure gradient requires the tracer equation to
-      be stepped forward prior to the momentum equation.
-      The need for knowledge of the vertical scale factor (here denoted as $h$) requires the sea surface height and
-      the continuity equation to be stepped forward prior to the computation of the tracer equation.
-      Note that the method for the evaluation of the surface pressure gradient $\nabla p_s$ is not presented here
-      (see \autoref{sec:DYN_spg}).
-    }
-  \end{center}
+\label{sec:TD_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[=.true.]{ln_dynspg_exp}{ln\_dynspg\_exp}).
+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[=.true.]{ln_dynspg_ts}{ln\_dynspg\_ts}) 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:TD_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.
+
+%\cmtgm{
+\begin{figure}
+  \centering
+  \includegraphics[width=0.66\textwidth]{TD_TimeStepping_flowchart_v4}
+  \caption[Leapfrog time stepping sequence with split-explicit free surface]{
+    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}.}
+  \label{fig:TD_TimeStep_flowchart}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 %}
 
-% -------------------------------------------------------------------------------------------------------------
-%        The Modified Leapfrog -- Asselin Filter scheme
-% -------------------------------------------------------------------------------------------------------------
-\section{Modified Leapfrog -- Asselin filter scheme}
-\label{sec:STP_mLF}
-
-Significant changes have been introduced by \cite{Leclair_Madec_OM09} in the LF-RA scheme in order to
-ensure tracer conservation and to allow the use of a much smaller value of the Asselin filter parameter.
+%% =================================================================================================
+\section{Modified LeapFrog -- Robert Asselin filter scheme (LF-RA)}
+\label{sec:TD_mLF}
+
+Significant changes have been introduced by \cite{leclair.madec_OM09} in
+the LF-RA scheme in order to ensure tracer conservation and to
+allow the use of a much smaller value of the Asselin filter parameter.
 The modifications affect both the forcing and filtering treatments in the LF-RA scheme.
 
-In a classical LF-RA environment, the forcing term is centred in time,
-\ie it is time-stepped over a $2 \rdt$ period:
+In a classical LF-RA environment,
+the forcing term is centred in time, \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.
+and the time filter is given by \autoref{eq:TD_asselin} so that
+$Q$ is redistributed over several time step.
 In the modified LF-RA environment, these two formulations have been replaced by:
 \begin{gather}
-  \label{eq:STP_forcing}
+  \label{eq:TD_forcing}
   x^{t + \rdt} = x^{t - \rdt} + \rdt \lt( Q^{t - \rdt / 2} + Q^{t + \rdt / 2} \rt)  \\
-  \label{eq:STP_RA}
+  \label{eq:TD_RA}
   x_F^t       = x^t + \gamma \, \lt( x_F^{t - \rdt} - 2 x^t + x^{t + \rdt} \rt)
                     - \gamma \, \rdt \, \lt( Q^{t + \rdt / 2} - Q^{t - \rdt / 2} \rt)
 \end{gather}
-The change in the forcing formulation given by \autoref{eq:STP_forcing} (see \autoref{fig:MLF_forcing})
-has a significant effect:
-the forcing term no longer excites the divergence of odd and even time steps \citep{Leclair_Madec_OM09}.
+The change in the forcing formulation given by \autoref{eq:TD_forcing}
+(see \autoref{fig:TD_MLF_forcing}) has a significant effect:
+the forcing term no longer excites the divergence of odd and even time steps
+\citep{leclair.madec_OM09}.
 % forcing seen by the model....
-This property improves the LF-RA scheme in two respects.
+This property improves the LF-RA scheme in two aspects.
 First, the LF-RA can now ensure the local and global conservation of tracers.
 Indeed, time filtering is no longer required on the forcing part.
-The influence of the Asselin filter on the forcing is be removed by adding a new term in the filter
-(last term in \autoref{eq:STP_RA} compared to \autoref{eq:STP_asselin}).
+The influence of the Asselin filter on the forcing is explicitly removed by
+adding a new term in the filter (last term in \autoref{eq:TD_RA} compared to \autoref{eq:TD_asselin}).
 Since the filtering of the forcing was the source of non-conservation in the classical LF-RA scheme,
-the modified formulation becomes conservative \citep{Leclair_Madec_OM09}.
-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}),
-the two other main sources of time step divergence,
+the modified formulation becomes conservative \citep{leclair.madec_OM09}.
+Second, the LF-RA becomes a truly quasi-second order scheme.
+Indeed, \autoref{eq:TD_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})
+(the two other main sources of time step divergence),
 allows a reduction by two orders of magnitude of the Asselin filter parameter.
 
 Note that the forcing is now provided at the middle of a time step:
 $Q^{t + \rdt / 2}$ is the forcing applied over the $[t,t + \rdt]$ time interval.
-This and the change in the time filter, \autoref{eq:STP_RA},
-allows an exact evaluation of the contribution due to the forcing term between any two time steps,
+This and the change in the time filter, \autoref{eq:TD_RA},
+allows for an exact evaluation of the contribution due to the forcing term between any two time steps,
 even if separated by only $\rdt$ since the time filter is no longer applied to the forcing term.
 
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!t]
-  \begin{center}
-    \includegraphics[]{Fig_MLF_forcing}
-    \caption{
-      \protect\label{fig:MLF_forcing}
-      Illustration of forcing integration methods.
-      (top) ''Traditional'' formulation:
-      the forcing is defined at the same time as the variable to which it is applied
-      (integer value of the time step index) and it is applied over a $2 \rdt$ period.
-      (bottom)  modified formulation:
-      the forcing is defined in the middle of the time (integer and a half value of the time step index) and
-      the mean of two successive forcing values ($n - 1 / 2$, $n + 1 / 2$) is applied over a $2 \rdt$ period.
-    }
-  \end{center}
+\begin{figure}
+  \centering
+  \includegraphics[width=0.66\textwidth]{TD_MLF_forcing}
+  \caption[Forcing integration methods for modified leapfrog (top and bottom)]{
+    Illustration of forcing integration methods.
+    (top) ''Traditional'' formulation:
+    the forcing is defined at the same time as the variable to which it is applied
+    (integer value of the time step index) and it is applied over a $2 \rdt$ period.
+    (bottom)  modified formulation:
+    the forcing is defined in the middle of the time
+    (integer and a half value of the time step index) and
+    the mean of two successive forcing values ($n - 1 / 2$, $n + 1 / 2$) is applied over
+    a $2 \rdt$ period.}
+  \label{fig:TD_MLF_forcing}
 \end{figure}
-%>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
-% -------------------------------------------------------------------------------------------------------------
-%        Start/Restart strategy
-% -------------------------------------------------------------------------------------------------------------
+
+%% =================================================================================================
 \section{Start/Restart strategy}
-\label{sec:STP_rst}
-
-%--------------------------------------------namrun-------------------------------------------
-\nlst{namrun}
-%--------------------------------------------------------------------------------------------------------------
-
-The first time step of this three level scheme when starting from initial conditions is a forward step
-(Euler time integration):
+\label{sec:TD_rst}
+
+\begin{listing}
+  \nlst{namrun}
+  \caption{\forcode{&namrun}}
+  \label{lst:namrun}
+\end{listing}
+
+The first time step of this three level scheme when starting from initial conditions is
+a forward step (Euler time integration):
 \[
-  % \label{eq:DOM_euler}
+  % \label{eq:TD_DOM_euler}
   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:TD} 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 $\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.
@@ -301,53 +314,42 @@
 running the model for $2N$ time steps in one go,
 or by performing two consecutive experiments of $N$ steps with a restart.
-This requires saving two time levels and many auxiliary data in the restart files in machine precision.
-
-Note that when a semi -implicit scheme is used to evaluate the hydrostatic pressure gradient
-(see \autoref{subsec:DYN_hpg_imp}), an extra three-dimensional field has to
-be added to the restart file to ensure an exact restartability.
-This is done optionally via the  \np{nn\_dynhpg\_rst} namelist parameter,
-so that the size of the restart file can be reduced when restartability is not a key issue
-(operational oceanography or in ensemble simulations for seasonal forecasting).
-
-Note the size of the time step used, $\rdt$, is also saved in the restart file.
-When restarting, if the the time step has been changed, a restart using an Euler time stepping scheme is imposed.
-Options are defined through the  \ngn{namrun} namelist variables.
-%%%
-\gmcomment{
+This requires saving two time levels and many auxiliary data in
+the restart files in machine precision.
+
+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[=0]{nn_euler}{nn\_euler}.
+Other options to control the time integration of the model are defined through
+the \nam{run}{run} namelist variables.
+
+\cmtgm{
 add here how to force the restart to contain only one time step for operational purposes
 
 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 parameters are truly described
 
 a word on the check of restart  .....
 }
-%%%
-
-\gmcomment{       % add a subsection here  
-
-%-------------------------------------------------------------------------------------------------------------
-%        Time Domain
-% -------------------------------------------------------------------------------------------------------------
+
+\cmtgm{       % add a subsection here
+
+%% =================================================================================================
 \subsection{Time domain}
-\label{subsec:STP_time}
-%--------------------------------------------namrun-------------------------------------------
-
-\nlst{namdom}         
-%--------------------------------------------------------------------------------------------------------------
-
-Options are defined through the  \ngn{namdom} namelist variables.
+\label{subsec:TD_time}
+
+Options are defined through the\nam{dom}{dom} namelist variables.
  \colorbox{yellow}{add here a few word on nit000 and nitend}
 
  \colorbox{yellow}{Write documentation on the calendar and the key variable adatrj}
 
-add a description of daymod, and the model calandar (leap-year and co)
-
-}     	%% end add
-
-
-
-%%
-\gmcomment{       % add implicit in vvl case  and Crant-Nicholson scheme   
+add a description of daymod, and the model calendar (leap-year and co)
+
+}     %% end add
+
+\cmtgm{       % add implicit in vvl case  and Crant-Nicholson scheme
 
 Implicit time stepping in case of variable volume thickness.
@@ -398,10 +400,7 @@
 \end{flalign*}
 
-%%
 }
 
-\biblio
-
-\pindex
+\subinc{\input{../../global/epilogue}}
 
 \end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/foreword.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/foreword.tex	(revision 11086)
+++ 	(revision )
@@ -1,81 +1,0 @@
-\documentclass[../main/NEMO_manual]{subfiles}
-
-\begin{document}
-
-% ================================================================
-% Chapter Foreword
-% ================================================================
-\chapter*{Foreword}
-
-% ================================================================
-% Abstract
-% ================================================================
-\section*{Abstract}
-
-The ocean engine of NEMO (Nucleus for European Modelling of the Ocean) is a primitive equation model adapted to
-regional and global ocean circulation problems.
-It is intended to be a flexible tool for studying the ocean and its interactions with the others components of
-the earth climate system over a wide range of space and time scales.
-
-Prognostic variables are the three-dimensional velocity field, a non-linear sea surface height,
-the \textit{Conservative} Temperature and the \textit{Absolute} Salinity.
-In the horizontal direction, the model uses a curvilinear orthogonal grid and in the vertical direction,
-a full or partial step $z$-coordinate, or $s$-coordinate, or a mixture of the two.
-The distribution of variables is a three-dimensional Arakawa C-type grid.
-Various physical choices are available to describe ocean physics, including TKE, and GLS vertical physics.
-
-Within NEMO, the ocean is interfaced with a sea-ice model (SI$^3$)
- %or \href{https://github.com/CICE-Consortium/CICE}{CICE}),
-passive tracer and biogeochemical models (TOP-PISCES) and,
-via the \href{https://portal.enes.org/oasis}{OASIS} coupler, with several atmospheric general circulation models.
-It also support two-way grid embedding via the \href{http://agrif.imag.fr}{AGRIF} software.
-
-
-% ================================================================
-% Disclaimer
-% ================================================================
-\section*{Disclaimer}
-
-Like all components of NEMO, the ocean component is developed under
-the \href{http://www.cecill.info}{CECILL license}, which is a French adaptation of the GNU GPL
-(General Public License).
-Anyone may use it freely for research purposes, and is encouraged to communicate back to the NEMO team
-its own developments and improvements.
-
-The model and the present document have been made available as a service to the community.
-We cannot certify that the code and its manual are free of errors.
-Bugs are inevitable and some have undoubtedly survived the testing phase.
-Users are encouraged to bring them to our attention.
-
-The author assumes no responsibility for problems, errors, or incorrect usage of NEMO.
-
-% ================================================================
-% Citation
-% ================================================================
-\section*{Citation}
-
-Reference for papers and other publications is as follows:
-\vspace{0.5cm}
-
-{\sffamily
-NEMO ocean engine,
-Madec Gurvan and NEMO System Team, NEMO Consortium,
-Issue 27, Notes du Pôle de modélisation de l'Institut Pierre-Simon Laplace (IPSL), ISSN 1288-1619,
-\href{http://doi.org/10.5281/zenodo.1464816}{doi:10.5281/zenodo.1464816}
-}
-
-% ================================================================
-% External resources
-% ================================================================
-\section*{External resources}
-
-Additional information can be found on the \href{http://www.nemo-ocean.eu}{website} of the project and
-the \href{http://forge.ipsl.jussieu.fr/nemo}{forge platform} of the source code.
-A \href{http://listes.ipsl.fr/sympa/info/nemo-newsletter}{newsletter list} is also open for subscription to
-receive top-down communication from the consortium (announcements, job opportunities, ...).
-
-\biblio
-
-\pindex
-
-\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/introduction.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/introduction.tex	(revision 11086)
+++ 	(revision )
@@ -1,350 +1,0 @@
-\documentclass[../main/NEMO_manual]{subfiles}
-
-\begin{document}
-
-% ================================================================
-% INTRODUCTION
-% ================================================================
-
-\chapter{Introduction}
-
-The Nucleus for European Modelling of the Ocean (\NEMO) is a framework of ocean related engines,
-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 
-(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
-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 
-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, 
-described in \citet{Madec1998}.
-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,
-the vertical coordinates used, and the subgrid scale physics.
-This part deals with the continuous equations of the model
-(primitive equations, with temperature, salinity and an equation of seawater).
-The equations are written in a curvilinear coordinate system, with a choice of vertical coordinates
-($z$, $s$, \zstar, \sstar, \ztilde, \stilde, and a mix of them).
-Momentum equations are formulated in vector invariant or flux form.
-Dimensional units in the meter, kilogram, second (MKS) international system are used throughout.
-
-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 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 
-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 
-(level position are then fixed in time).
-In non-linear free surface, the corresponding rescaled height coordinate formulation (\zstar or \sstar) is used
-(the level position then vary in time as a function of the sea surface heigh).
-The following two chapters (\autoref{chap:TRA} and \autoref{chap:DYN}) describe the discretisation of
-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 
-(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 
-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
-a biogeochemistry model (PISCES).
-Interactive coupling to Atmospheric models is possible via the OASIS coupler \citep{OASIS2006}.
-Two-way nesting is also available through an interface to the AGRIF package
-(Adaptative Grid Refinement in \fortran) \citep{Debreu_al_CG2008}.
-% Needs to be reviewed
-%The interface code for coupling to an alternative sea ice model (CICE, \citet{Hunke2008}) has now been upgraded so
-%that it works for both global and regional domains, although AGRIF is still not available.
-
-Other model characteristics are the lateral boundary conditions (\autoref{chap:LBC}).
-Global configurations of the model make use of the ORCA tripolar grid, with special north fold boundary condition.
-Free-slip or no-slip boundary conditions are allowed at land boundaries.
-Closed basin geometries as well as periodic domains and open boundary conditions are possible.
-
-Physical parameterisations are described in \autoref{chap:LDF} and \autoref{chap:ZDF}.
-The model includes an implicit treatment of vertical viscosity and diffusivity.
-The lateral Laplacian and biharmonic viscosity and diffusion can be rotated following
-a geopotential or neutral direction.
-There is an optional eddy induced velocity \citep{Gent1990} with a space and time variable coefficient
-\citet{Treguier1997}.
-The model has vertical harmonic viscosity and diffusion with a space and time variable coefficient,
-with options to compute the coefficients with \citet{Blanke1993}, \citet{Pacanowski_Philander_JPO81}, or 
-\citet{Umlauf_Burchard_JMS03} 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)
-%%      http://en.wikibooks.org/wiki/LaTeX/Glossary
-\noindent CPP keys and namelists are used as inputs to the code.
-
-\noindent \index{CPP keys} CPP keys
-
-Some CPP keys are implemented in the \fortran code to allow code selection at compiling step.
-This selection of code at compilation time reduces the reliability of the whole platform since
-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: 
-
-\begin{forlines}
-#if defined key_option1
-	! This part of the \fortran code will be active
-	! only if key_option1 is activated at compiling step
-#endif
-\end{forlines}
-
-\noindent \index{Namelist} Namelists
-
-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...)
-containing all the \fortran namelists needed.
-The implementation in NEMO uses a 2-step process. 
-For each \fortran namelist, two files are read:
-
-\begin{enumerate}
-\item
-  A reference namelist (in \path{./cfgs/SHARED/namelist_ref}) is read first.
-  This file contains all the namelist variables which are initialised to default values
-\item
-  A configuration namelist (in \path{./cfgs/CFG_NAME/EXP00/namelist_cfg}) is read aferwards.
-  This file contains only the namelist variables which are changed from default values, and overwrites those.
-\end{enumerate}
-A template can be found in \path{NEMO/OPA_SRC/module.example}.
-The effective namelist, taken in account during the run, is stored at execution time in
-an \texttt{output\_namelist\_dyn} (or \texttt{\_ice} or \texttt{\_top}) file.
-%%gm  end
-
-Model outputs management and specific online diagnostics are described in \autoref{chap:DIA}.
-The diagnostics includes the output of all the tendencies of the momentum and tracers equations,
-the output of tracers tendencies averaged over the time evolving mixed layer,
-the output of the tendencies of the barotropic vorticity equation,
-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) 
-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.
-\autoref{chap:ASM} describes how increments produced by data assimilation may be applied to the model equations.
-Finally, \autoref{chap:CFG} provides a brief introduction to the pre-defined model configurations
-(water column model, ORCA and GYRE families of configurations).
-
-%%nm: Add some words on the NEMO dependencies
-The model is implemented in \fninety, with preprocessing (C pre-processor).
-It runs under UNIX.
-It is optimized for vector computers and parallelised by domain decomposition with MPI.
-All input and output is done in NetCDF (Network Common Data Format) with a optional direct access format for output.
-To ensure the clarity and readability of the code it is necessary to follow coding rules.
-The coding rules for OPA include conventions for naming variables,
-with different starting letters for different types of variables (real, integer, parameter\ldots).
-Those rules are briefly presented in \autoref{apdx:D} and a more complete document is available .
-
-The model is organized with a high internal modularity based on physics.
-For example, each trend (\ie, a term in the RHS of the prognostic equation) for momentum and tracers
-is computed in a dedicated module.
-To make it easier for the user to find his way around the code, the module names follow a three-letter rule.
-For example, \mdl{traldf} is a module related to the TRAcers equation, computing the Lateral DiFfussion.
-%The complete list of module names is presented in \autoref{apdx:D}.      %====>>>> to be done !
-Furthermore, modules are organized in a few directories that correspond to their category,
-as indicated by the first three letters of their name (\autoref{tab:chapters}).
-
-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 
-(\autoref{tab:chapters}).
-
-%--------------------------------------------------TABLE--------------------------------------------------
-\begin{table}[!t]	
-  \caption{
-    \protect\label{tab:chapters}
-    Organization of Chapters mimicking the one of the model directories.
-  }
-  \begin{center}
-    \begin{tabular}{|l|l|l|}
-      \hline
-      \autoref{chap:STP}  & -   & model time STePping environment \\
-      \hline
-      \autoref{chap:DOM}  & DOM & model DOMain \\
-      \hline
-      \autoref{chap:TRA}  & TRA & TRAcer equations (potential temperature and salinity) \\
-      \hline
-      \autoref{chap:DYN}  & DYN & DYNamic equations (momentum) \\
-      \hline
-      \autoref{chap:SBC}  & SBC & Surface Boundary Conditions \\
-      \hline
-      \autoref{chap:LBC}  & LBC & Lateral Boundary Conditions (also OBC and BDY)  \\
-      \hline
-      \autoref{chap:LDF}  & LDF & Lateral DiFfusion (parameterisations) \\
-      \hline
-      \autoref{chap:ZDF}  & ZDF & vertical (Z) DiFfusion (parameterisations)  \\
-      \hline
-      \autoref{chap:DIA}  & DIA & I/O and DIAgnostics (also IOM, FLO and TRD) \\
-      \hline
-      \autoref{chap:OBS}  & OBS & OBServation and model comparison  \\
-      \hline
-      \autoref{chap:ASM}  & ASM & ASsiMilation increment  \\
-      \hline
-      \autoref{chap:MISC} & SOL & Miscellaneous  topics (including solvers)  \\
-      \hline
-      \autoref{chap:CFG}  & -   & predefined configurations (including C1D) \\
-      \hline
-    \end{tabular}
-  \end{center}
-\end{table}
-%--------------------------------------------------------------------------------------------------------------
-
-%% 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.
-This release differs significantly from version 8, documented in \citet{Madec1998}. \\
-
-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
-  \citep{Barnier_al_OD06, Le_Sommer_al_OM09, Penduff_al_OS07};
-\item
-  partial reactivation of a terrain-following vertical coordinate ($s$- and hybrid $s$-$z$) with
-  the addition of several options for pressure gradient computation
-  \footnote{
-    Partial support of $s$-coordinate: there is presently no support for neutral physics in
-    $s$-coordinate and for the new options for horizontal pressure gradient computation with
-    a non-linear equation of state.
-  }
-  ;
-\item
-  more choices for the treatment of the free surface: full explicit, split-explicit or filtered schemes,
-  and suppression of the rigid-lid option;
-\item
-  non linear free surface associated with the rescaled height coordinate \zstar or $s$;
-\item
-  additional schemes for vector and flux forms of the momentum advection;
-\item
-  additional advection schemes for tracers;
-\item
-  implementation of the AGRIF package (Adaptative Grid Refinement in \fortran) \citep{Debreu_al_CG2008};
-\item
-  online diagnostics : tracers trend in the mixed layer and vorticity balance;
-\item
-  rewriting of the I/O management with the use of an I/O server;
-\item
-  generalized ocean-ice-atmosphere-CO2 coupling interface, interfaced with OASIS 3 coupler;
-\item
-  surface module (SBC) that simplify the way the ocean is forced and include two bulk formulea (CLIO and CORE) and
-  which includes an on-the-fly interpolation of input forcing fields;
-\item
-  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},
-  the \citet{Mellor_Blumberg_JPO04} surface wave breaking parameterization, and has a time discretization which
-  is energetically consistent with the ocean model equations \citep{Burchard_OM02, Marsaleix_al_OM08};
-\item
-  tidal mixing parametrisation (bottom intensification) + Indonesian specific tidal mixing
-  \citep{Koch-Larrouy_al_GRL07};
-\item
-  introduction of LIM-3, the new Louvain-la-Neuve sea-ice model
-  (C-grid rheology and new thermodynamics including bulk ice salinity)
-  \citep{Vancoppenolle_al_OM09a, Vancoppenolle_al_OM09b}
-\end{itemize}
-
-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}; 
-\item
-  additional scheme for iso-neutral mixing \citep{Griffies_al_JPO98}, although it is still a "work in progress";
-\item
-  a rewriting of the bottom boundary layer scheme, following \citet{Campin_Goosse_Tel99};
-\item
-  addition of a Generic Length Scale vertical mixing scheme, following \citet{Umlauf_Burchard_JMS03};
-\item
-  addition of the atmospheric pressure as an external forcing on both ocean and sea-ice dynamics;
-\item
-  addition of a diurnal cycle on solar radiation \citep{Bernie_al_CD07};
-\item
-  river runoffs added through a non-zero depth, and having its own temperature and salinity;
-\item
-  CORE II normal year forcing set as the default forcing of ORCA2-LIM configuration;
-\item
-  generalisation of the use of \mdl{fldread} for all input fields (ocean climatology, sea-ice damping...);
-\item
-  addition of an on-line observation and model comparison (thanks to NEMOVAR project);
-\item
-  optional application of an assimilation increment (thanks to NEMOVAR project);
-\item
-  coupling interface adjusted for WRF atmospheric model;
-\item
-  C-grid ice rheology now available fro both LIM-2 and LIM-3 \citep{Bouillon_al_OM09};
-\item
-  LIM-3 ice-ocean momentum coupling applied to LIM-2;
-\item
-  a deep re-writting and simplification of the off-line tracer component (OFF\_SRC);
-\item
-  the merge of passive and active advection and diffusion modules;
-\item
-  Use of the Flexible Configuration Manager (FCM) to build configurations,
-  generate the Makefile and produce the executable;
-\item
-  Linear-tangent and Adjoint component (TAM) added, phased with v3.0
-\end{itemize}
-
-\vspace{1cm}
-
-In addition, several minor modifications in the coding have been introduced with the constant concern of
-improving the model performance.
-
-The main modifications from NEMO/OPA v3.3 and v3.4 are:
-
-\begin{itemize}
-\item finalisation of above iso-neutral mixing \citep{Griffies_al_JPO98}";
-\item "Neptune effect" parametrisation;
-\item horizontal pressure gradient suitable for s-coordinate;
-\item semi -implicit bottom friction;
-\item finalisation of the merge of passive and active tracers advection-diffusion modules;
-\item a new bulk formulae (so-called MFS);
-\item use fldread for the off-line tracer component (OFF\_SRC);
-\item use MPI point to point communications for north fold;
-\item diagnostic of transport;
-\end{itemize}
-
-The main modifications from NEMO/OPA v3.4 and v3.6 are:
-
-\begin{itemize}
- \item ...;
-\end{itemize}
-
-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 ...;
-\end{itemize}
-
-\biblio
-
-\pindex
-
-\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/keys.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/keys.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/keys.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/keys.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/modules.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/modules.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/modules.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/modules.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/parameters.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/parameters.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/parameters.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/parameters.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/subroutines.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/subroutines.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/NEMO/subfiles/subroutines.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/subroutines.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/SI3_manual.bib
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/SI3_manual.bib	(revision 11086)
+++ 	(revision )
@@ -1,676 +1,0 @@
-
-@Article{	  assur_1958,
-  author	= {Assur, A},
-  year		= {1958},
-  month		= {01},
-  pages		= {106-138},
-  title		= {Composition of sea ice and its tensile strength},
-  volume	= {598},
-  journal	= {Arctic Sea Ice}
-}
-
-@Article{	  babko_2002,
-  author	= {Babko, O.},
-  title		= {Role of rafting in the mechanical redistribution of sea
-		  ice thickness},
-  year		= 2002,
-  volume	= 107,
-  number	= {C8},
-  issn		= {0148-0227},
-  doi		= {10.1029/1999jc000190},
-  url		= {http://dx.doi.org/10.1029/1999JC000190},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  bitz_1999,
-  author	= {Bitz, C. M. and Lipscomb, William H.},
-  title		= {An energy-conserving thermodynamic model of sea ice},
-  year		= 1999,
-  volume	= 104,
-  number	= {C7},
-  month		= {Jul},
-  pages		= {15669–15677},
-  issn		= {0148-0227},
-  doi		= {10.1029/1999jc900100},
-  url		= {http://dx.doi.org/10.1029/1999jc900100},
-  journal	= {Journal of Geophysical Research: Oceans},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  bitz_2001,
-  author	= {Bitz, C. M. and Holland, M. M. and Weaver, A. J. and Eby,
-		  M.},
-  title		= {Simulating the ice-thickness distribution in a coupled
-		  climate model},
-  year		= 2001,
-  volume	= 106,
-  number	= {C2},
-  month		= {Feb},
-  pages		= {2441–2463},
-  issn		= {0148-0227},
-  doi		= {10.1029/1999jc000113},
-  url		= {http://dx.doi.org/10.1029/1999jc000113},
-  journal	= {Journal of Geophysical Research: Oceans},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  bouillon_2013,
-  author	= {Bouillon, Sylvain and Fichefet, Thierry and Legat, Vincent
-		  and Madec, Gurvan},
-  title		= {The elastic–viscous–plastic method revisited},
-  year		= 2013,
-  volume	= 71,
-  month		= {Nov},
-  pages		= {2–12},
-  issn		= {1463-5003},
-  doi		= {10.1016/j.ocemod.2013.05.013},
-  url		= {http://dx.doi.org/10.1016/j.ocemod.2013.05.013},
-  journal	= {Ocean Modelling},
-  publisher	= {Elsevier BV}
-}
-
-@Article{	  brandt_2005,
-  author	= {Brandt, Richard E. and Warren, Stephen G. and Worby,
-		  Anthony P. and Grenfell, Thomas C.},
-  title		= {Surface Albedo of the Antarctic Sea Ice Zone},
-  year		= 2005,
-  volume	= 18,
-  number	= 17,
-  month		= {Sep},
-  pages		= {3606–3622},
-  issn		= {1520-0442},
-  doi		= {10.1175/jcli3489.1},
-  url		= {http://dx.doi.org/10.1175/jcli3489.1},
-  journal	= {Journal of Climate},
-  publisher	= {American Meteorological Society}
-}
-
-@Article{	  coon_1974,
-  author	= {Coon, M.D. and Maykut, G.A. and Pritchard, R.S. and
-		  Rothrock, D.A. and Thorndike, A.S.},
-  year		= {1974},
-  month		= {01},
-  pages		= {1-106},
-  title		= {Modeling the pack ice as an elastic-plastic material},
-  volume	= {24},
-  journal	= {AIDJEX Bull.}
-}
-
-@Article{	  ebert_1993,
-  author	= {Ebert, Elizabeth E. and Curry, Judith A.},
-  title		= {An intermediate one-dimensional thermodynamic sea ice
-		  model for investigating ice-atmosphere interactions},
-  year		= 1993,
-  volume	= 98,
-  number	= {C6},
-  pages		= 10085,
-  issn		= {0148-0227},
-  doi		= {10.1029/93jc00656},
-  url		= {http://dx.doi.org/10.1029/93jc00656},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  fichefet_1997,
-  author	= {Fichefet, T. and Maqueda, M. A. Morales},
-  title		= {Sensitivity of a global sea ice model to the treatment of
-		  ice thermodynamics and dynamics},
-  year		= 1997,
-  volume	= 102,
-  number	= {C6},
-  month		= {Jun},
-  pages		= {12609–12646},
-  issn		= {0148-0227},
-  doi		= {10.1029/97jc00480},
-  url		= {http://dx.doi.org/10.1029/97jc00480},
-  journal	= {Journal of Geophysical Research: Oceans},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  flato_1995,
-  author	= {Flato, Gregory M. and Hibler, William D.},
-  title		= {Ridging and strength in modeling the thickness
-		  distribution of Arctic sea ice},
-  year		= 1995,
-  volume	= 100,
-  number	= {C9},
-  pages		= 18611,
-  issn		= {0148-0227},
-  doi		= {10.1029/95jc02091},
-  url		= {http://dx.doi.org/10.1029/95jc02091},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  girard_2009,
-  author	= {Girard, L. and Weiss, J. and Molines, J. M. and Barnier,
-		  B. and Bouillon, S.},
-  title		= {Evaluation of high-resolution sea ice models on the basis
-		  of statistical and scaling properties of Arctic sea ice
-		  drift and deformation},
-  year		= 2009,
-  volume	= 114,
-  number	= {C8},
-  month		= {Aug},
-  issn		= {0148-0227},
-  doi		= {10.1029/2008jc005182},
-  url		= {http://dx.doi.org/10.1029/2008JC005182},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  grenfell_1977,
-  author	= {Grenfell, Thomas C. and Maykut, Gary A.},
-  title		= {The Optical Properties of Ice and Snow in the Arctic
-		  Basin},
-  year		= 1977,
-  volume	= 18,
-  number	= 80,
-  pages		= {445–463},
-  issn		= {1727-5652},
-  doi		= {10.3189/s0022143000021122},
-  url		= {http://dx.doi.org/10.3189/s0022143000021122},
-  journal	= {Journal of Glaciology},
-  publisher	= {Cambridge University Press (CUP)}
-}
-
-@Article{	  grenfell_2004,
-  author	= {Grenfell, Thomas C.},
-  title		= {Seasonal and spatial evolution of albedo in a
-		  snow-ice-land-ocean environment},
-  year		= 2004,
-  volume	= 109,
-  number	= {C1},
-  issn		= {0148-0227},
-  doi		= {10.1029/2003jc001866},
-  url		= {http://dx.doi.org/10.1029/2003JC001866},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  haapala_2000,
-  author	= {Haapala, Jari},
-  title		= {On the modelling of ice-thickness redistribution},
-  year		= 2000,
-  volume	= 46,
-  number	= 154,
-  pages		= {427–437},
-  issn		= {1727-5652},
-  doi		= {10.3189/172756500781833106},
-  url		= {http://dx.doi.org/10.3189/172756500781833106},
-  journal	= {Journal of Glaciology},
-  publisher	= {Cambridge University Press (CUP)}
-}
-
-@Article{	  hibler_1979,
-  author	= {Hibler, W. D.},
-  title		= {A Dynamic Thermodynamic Sea Ice Model},
-  year		= 1979,
-  volume	= 9,
-  number	= 4,
-  month		= {Jul},
-  pages		= {815–846},
-  issn		= {1520-0485},
-  doi		= {10.1175/1520-0485(1979)009<0815:adtsim>2.0.co;2},
-  url		= {http://dx.doi.org/10.1175/1520-0485(1979)009<0815:adtsim>2.0.co;2},
-  journal	= {Journal of Physical Oceanography},
-  publisher	= {American Meteorological Society}
-}
-
-@Article{	  hibler_1980,
-  author	= {Hibler, W. D.},
-  title		= {Modeling a Variable Thickness Sea Ice Cover},
-  year		= 1980,
-  volume	= 108,
-  number	= 12,
-  month		= {Dec},
-  pages		= {1943–1973},
-  issn		= {1520-0493},
-  doi		= {10.1175/1520-0493(1980)108<1943:mavtsi>2.0.co;2},
-  url		= {http://dx.doi.org/10.1175/1520-0493(1980)108<1943:mavtsi>2.0.co;2},
-  journal	= {Monthly Weather Review},
-  publisher	= {American Meteorological Society}
-}
-
-@Article{	  hoyland_2002,
-  author	= {Høyland, Knut V.},
-  title		= {Consolidation of first-year sea ice ridges},
-  year		= 2002,
-  volume	= 107,
-  number	= {C6},
-  issn		= {0148-0227},
-  doi		= {10.1029/2000jc000526},
-  url		= {http://dx.doi.org/10.1029/2000JC000526},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  kovacs_1996,
-  author	= {Kovacs, Austin},
-  title		= {Sea Ice. Part 1. Bulk Salinity Versus Ice Floe
-		  Thickness,},
-  year		= 1996,
-  month		= {Jun},
-  doi		= {10.21236/ada312027},
-  url		= {http://dx.doi.org/10.21236/ada312027},
-  publisher	= {Defense Technical Information Center}
-}
-
-@Article{	  kreyscher_2000,
-  author	= {Kreyscher, Martin and Harder, Markus and Lemke, Peter and
-		  Flato, Gregory M.},
-  title		= {Results of the Sea Ice Model Intercomparison Project:
-		  Evaluation of sea ice rheology schemes for use in climate
-		  simulations},
-  year		= 2000,
-  volume	= 105,
-  number	= {C5},
-  month		= {May},
-  pages		= {11299–11320},
-  issn		= {0148-0227},
-  doi		= {10.1029/1999jc000016},
-  url		= {http://dx.doi.org/10.1029/1999jc000016},
-  journal	= {Journal of Geophysical Research: Oceans},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  lecomte_2011,
-  author	= {Lecomte, Olivier and Fichefet, Thierry and Vancoppenolle,
-		  Martin and Nicolaus, Marcel},
-  title		= {A new snow thermodynamic scheme for large-scale sea-ice
-		  models},
-  year		= 2011,
-  volume	= 52,
-  number	= 57,
-  pages		= {337–346},
-  issn		= {1727-5644},
-  doi		= {10.3189/172756411795931453},
-  url		= {http://dx.doi.org/10.3189/172756411795931453},
-  journal	= {Annals of Glaciology},
-  publisher	= {Cambridge University Press (CUP)}
-}
-
-@Article{	  lecomte_2015,
-  author	= {Lecomte, Olivier and Fichefet, Thierry and Flocco, Daniela
-		  and Schroeder, David and Vancoppenolle, Martin},
-  title		= {Interactions between wind-blown snow redistribution and
-		  melt ponds in a coupled ocean–sea ice model},
-  year		= 2015,
-  volume	= 87,
-  month		= {Mar},
-  pages		= {67–80},
-  issn		= {1463-5003},
-  doi		= {10.1016/j.ocemod.2014.12.003},
-  url		= {http://dx.doi.org/10.1016/j.ocemod.2014.12.003},
-  journal	= {Ocean Modelling},
-  publisher	= {Elsevier BV}
-}
-
-@Article{	  lepparanta_1995,
-  author	= {Leppäranta, Matti and Lensu, Mikko and Kosloff, Pekka and
-		  Veitch, Brian},
-  title		= {The life story of a first-year sea ice ridge},
-  year		= 1995,
-  volume	= 23,
-  number	= 3,
-  month		= {May},
-  pages		= {279–290},
-  issn		= {0165-232X},
-  doi		= {10.1016/0165-232x(94)00019-t},
-  url		= {http://dx.doi.org/10.1016/0165-232x(94)00019-t},
-  journal	= {Cold Regions Science and Technology},
-  publisher	= {Elsevier BV}
-}
-
-@Article{	  lepparanta_2011,
-  author	= {Leppäranta, Matti},
-  title		= {Drift ice material},
-  year		= 2011,
-  pages		= {11–63},
-  doi		= {10.1007/978-3-642-04683-4\_2},
-  url		= {http://dx.doi.org/10.1007/978-3-642-04683-4\_2},
-  isbn		= 9783642046834,
-  journal	= {The Drift of Sea Ice},
-  publisher	= {Springer Berlin Heidelberg}
-}
-
-@Article{	  lipscomb_2001,
-  author	= {Lipscomb, William H.},
-  title		= {Remapping the thickness distribution in sea ice models},
-  year		= 2001,
-  volume	= 106,
-  number	= {C7},
-  month		= {Jul},
-  pages		= {13989–14000},
-  issn		= {0148-0227},
-  doi		= {10.1029/2000jc000518},
-  url		= {http://dx.doi.org/10.1029/2000jc000518},
-  journal	= {Journal of Geophysical Research: Oceans},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  lipscomb_2007,
-  author	= {Lipscomb, William H. and Hunke, Elizabeth C. and
-		  Maslowski, Wieslaw and Jakacki, Jaromir},
-  title		= {Ridging, strength, and stability in high-resolution sea
-		  ice models},
-  year		= 2007,
-  volume	= 112,
-  number	= {C3},
-  month		= {Mar},
-  issn		= {0148-0227},
-  doi		= {10.1029/2005jc003355},
-  url		= {http://dx.doi.org/10.1029/2005JC003355},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  massonnet_2018,
-  author	= {Massonnet, F. and Barth\'el\'emy, A. and Worou, K. and
-		  Fichefet, T. and Vancoppenolle, M. and Rousset, C.},
-  title		= {Insights on the discretization of the ice thickness
-		  distribution in large-scale sea ice models},
-  journal	= {submitted},
-  year		= {2018}
-}
-
-@Article{	  maykut_1971,
-  author	= {Maykut, Gary A. and Untersteiner, Norbert},
-  title		= {Some results from a time-dependent thermodynamic model of
-		  sea ice},
-  year		= 1971,
-  volume	= 76,
-  number	= 6,
-  month		= {Feb},
-  pages		= {1550–1575},
-  issn		= {0148-0227},
-  doi		= {10.1029/jc076i006p01550},
-  url		= {http://dx.doi.org/10.1029/jc076i006p01550},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  maykut_1973,
-  author	= {Maykut, G. A. and Thorndike, A. S.},
-  title		= {An approach to coupling the dynamics and thermodynamics of
-		  Arctic sea ice},
-  journal	= {AIDJEX Bulletin},
-  year		= {1973},
-  volume	= {21},
-  pages		= {23--29}
-}
-
-@Article{	  maykut_1986,
-  author	= {Maykut, Gary A.},
-  title		= {The Surface Heat and Mass Balance},
-  year		= 1986,
-  pages		= {395–463},
-  doi		= {10.1007/978-1-4899-5352-0\_6},
-  url		= {http://dx.doi.org/10.1007/978-1-4899-5352-0\_6},
-  isbn		= 9781489953520,
-  journal	= {The Geophysics of Sea Ice},
-  publisher	= {Springer US}
-}
-
-@Article{	  maykut_1995,
-  author	= {Maykut, G. A. and McPhee, Miles G.},
-  title		= {Solar heating of the Arctic mixed layer},
-  year		= 1995,
-  volume	= 100,
-  number	= {C12},
-  pages		= 24691,
-  issn		= {0148-0227},
-  doi		= {10.1029/95jc02554},
-  url		= {http://dx.doi.org/10.1029/95jc02554},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  mcphee_1992,
-  author	= {McPhee, Miles G.},
-  title		= {Turbulent heat flux in the upper ocean under sea ice},
-  year		= 1992,
-  volume	= 97,
-  number	= {C4},
-  pages		= 5365,
-  issn		= {0148-0227},
-  doi		= {10.1029/92jc00239},
-  url		= {http://dx.doi.org/10.1029/92jc00239},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  mellor_1989,
-  author	= {Mellor, George L. and Kantha, Lakshmi},
-  title		= {An ice-ocean coupled model},
-  year		= 1989,
-  volume	= 94,
-  number	= {C8},
-  pages		= 10937,
-  issn		= {0148-0227},
-  doi		= {10.1029/jc094ic08p10937},
-  url		= {http://dx.doi.org/10.1029/jc094ic08p10937},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  notz_2016,
-  author	= {Notz, Dirk and Jahn, Alexandra and Holland, Marika and
-		  Hunke, Elizabeth and Massonnet, François and Stroeve,
-		  Julienne and Tremblay, Bruno and Vancoppenolle, Martin},
-  title		= {The CMIP6 Sea-Ice Model Intercomparison Project (SIMIP):
-		  understanding sea ice through climate-model simulations},
-  year		= 2016,
-  volume	= 9,
-  number	= 9,
-  month		= {Sep},
-  pages		= {3427–3446},
-  issn		= {1991-9603},
-  doi		= {10.5194/gmd-9-3427-2016},
-  url		= {http://dx.doi.org/10.5194/gmd-9-3427-2016},
-  journal	= {Geoscientific Model Development},
-  publisher	= {Copernicus GmbH}
-}
-
-@Article{	  parmerter_1975,
-  author	= {Parmerter, R. Reid},
-  title		= {A model of simple rafting in sea ice},
-  year		= 1975,
-  volume	= 80,
-  number	= 15,
-  month		= {May},
-  pages		= {1948–1952},
-  issn		= {0148-0227},
-  doi		= {10.1029/jc080i015p01948},
-  url		= {http://dx.doi.org/10.1029/jc080i015p01948},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  perovich_2002,
-  author	= {Perovich, D. K.},
-  title		= {Seasonal evolution of the albedo of multiyear Arctic sea
-		  ice},
-  year		= 2002,
-  volume	= 107,
-  number	= {C10},
-  issn		= {0148-0227},
-  doi		= {10.1029/2000jc000438},
-  url		= {http://dx.doi.org/10.1029/2000JC000438},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  prather_1986,
-  author	= {Prather, Michael J.},
-  title		= {Numerical advection by conservation of second-order
-		  moments},
-  year		= 1986,
-  volume	= 91,
-  number	= {D6},
-  pages		= 6671,
-  issn		= {0148-0227},
-  doi		= {10.1029/jd091id06p06671},
-  url		= {http://dx.doi.org/10.1029/jd091id06p06671},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  pringle_2007,
-  author	= {Pringle, D. J. and Eicken, H. and Trodahl, H. J. and
-		  Backstrom, L. G. E.},
-  title		= {Thermal conductivity of landfast Antarctic and Arctic sea
-		  ice},
-  year		= 2007,
-  volume	= 112,
-  number	= {C4},
-  month		= {Apr},
-  issn		= {0148-0227},
-  doi		= {10.1029/2006jc003641},
-  url		= {http://dx.doi.org/10.1029/2006JC003641},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  schmidt_2004,
-  author	= {Schmidt, Gavin A. and Bitz, Cecilia M. and Mikolajewicz,
-		  Uwe and Tremblay, L.-Bruno},
-  title		= {Ice–ocean boundary conditions for coupled models},
-  year		= 2004,
-  volume	= 7,
-  number	= {1-2},
-  month		= {Jan},
-  pages		= {59–74},
-  issn		= {1463-5003},
-  doi		= {10.1016/s1463-5003(03)00030-1},
-  url		= {http://dx.doi.org/10.1016/S1463-5003(03)00030-1},
-  journal	= {Ocean Modelling},
-  publisher	= {Elsevier BV}
-}
-
-@Article{	  shine_1985,
-  author	= {Shine, K. P. and Henderson-Sellers, A.},
-  title		= {The sensitivity of a thermodynamic sea ice model to
-		  changes in surface albedo parameterization},
-  year		= 1985,
-  volume	= 90,
-  number	= {D1},
-  pages		= 2243,
-  issn		= {0148-0227},
-  doi		= {10.1029/jd090id01p02243},
-  url		= {http://dx.doi.org/10.1029/jd090id01p02243},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Book{		  teos-10_2010,
-  title		= {{The international thermodynamic equation of seawater -
-		  2010: Calculation and use of thermodynamic properties}},
-  publisher	= {UNESCO (English)},
-  year		= {2010},
-  author	= {{IOC, SCOR and IAPSO}},
-  series	= {Intergovernmental Oceanographic Commission, Manuals and
-		  Guides No. 56}
-}
-
-@Article{	  thorndike_1975,
-  author	= {Thorndike, A. S. and Rothrock, D. A. and Maykut, G. A. and
-		  Colony, R.},
-  title		= {The thickness distribution of sea ice},
-  year		= 1975,
-  volume	= 80,
-  number	= 33,
-  month		= {Nov},
-  pages		= {4501–4513},
-  issn		= {0148-0227},
-  doi		= {10.1029/jc080i033p04501},
-  url		= {http://dx.doi.org/10.1029/JC080i033p04501},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  tuhkuri_2002,
-  author	= {Tuhkuri, Jukka},
-  title		= {Laboratory tests on ridging and rafting of ice sheets},
-  year		= 2002,
-  volume	= 107,
-  number	= {C9},
-  issn		= {0148-0227},
-  doi		= {10.1029/2001jc000848},
-  url		= {http://dx.doi.org/10.1029/2001JC000848},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  vancoppenolle_2009,
-  author	= {Vancoppenolle, Martin and Fichefet, Thierry and Goosse,
-		  Hugues},
-  title		= {Simulating the mass balance and salinity of Arctic and
-		  Antarctic sea ice. 2. Importance of sea ice salinity
-		  variations},
-  year		= 2009,
-  volume	= 27,
-  number	= {1-2},
-  month		= {Jan},
-  pages		= {54–69},
-  issn		= {1463-5003},
-  doi		= {10.1016/j.ocemod.2008.11.003},
-  url		= {http://dx.doi.org/10.1016/j.ocemod.2008.11.003},
-  journal	= {Ocean Modelling},
-  publisher	= {Elsevier BV}
-}
-
-@Article{	  weiss_2013,
-  author	= {Weiss, Jérôme},
-  title		= {Drift, Deformation, and Fracture of Sea Ice},
-  year		= 2013,
-  issn		= {2191-5377},
-  doi		= {10.1007/978-94-007-6202-2},
-  url		= {http://dx.doi.org/10.1007/978-94-007-6202-2},
-  isbn		= 9789400762022,
-  journal	= {SpringerBriefs in Earth Sciences},
-  publisher	= {Springer Netherlands}
-}
-
-@Article{	  worster_1992,
-  author	= {Worster, M. G.},
-  title		= {The Dynamics of Mushy Layers},
-  year		= 1992,
-  pages		= {113–138},
-  doi		= {10.1007/978-94-011-2809-4\_20},
-  url		= {http://dx.doi.org/10.1007/978-94-011-2809-4\_20},
-  isbn		= 9789401128094,
-  journal	= {Interactive Dynamics of Convection and Solidification},
-  publisher	= {Springer Netherlands}
-}
-
-@Article{	  zhang_2001,
-  author	= {Zhang, Jinlun and Rothrock, Drew},
-  title		= {A Thickness and Enthalpy Distribution Sea-Ice Model},
-  year		= 2001,
-  volume	= 31,
-  number	= 10,
-  month		= {Oct},
-  pages		= {2986–3001},
-  issn		= {1520-0485},
-  doi		= {10.1175/1520-0485(2001)031<2986:ataeds>2.0.co;2},
-  url		= {http://dx.doi.org/10.1175/1520-0485(2001)031<2986:ataeds>2.0.co;2},
-  journal	= {Journal of Physical Oceanography},
-  publisher	= {American Meteorological Society}
-}
-
-@Article{	  zuo_1996,
-  author	= {Zuo, Z. and Oerlemans, J.},
-  title		= {Modelling albedo and specific balance of the Greenland ice
-		  sheet: calculations for the Søndre Strømfjord transect},
-  year		= 1996,
-  volume	= 42,
-  number	= 141,
-  pages		= {305–317},
-  issn		= {1727-5652},
-  doi		= {10.1017/s0022143000004160},
-  url		= {http://dx.doi.org/10.1017/s0022143000004160},
-  journal	= {Journal of Glaciology},
-  publisher	= {Cambridge University Press (CUP)}
-}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/SI3_manual.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/SI3_manual.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/SI3_manual.tex	(revision 11831)
@@ -1,132 +1,1 @@
-%% ==============================================================================
-%% SI3 Reference Manual
-%% ==============================================================================
-
-
-%% Preamble
-%% ==============================================================================
-
-%% Document layout
-\documentclass{book}
-
-%% Custom style (.sty)
-\usepackage{../../NEMO/main/NEMO_manual}
-\hypersetup{
-  pdftitle={SI³ – Sea Ice modelling Integrated Initiative – The NEMO Sea Ice engine},
-  pdfauthor={NEMO Sea Ice Working Group},
-  colorlinks
-}
-
-%% Include references and index for single subfile compilation
-\newcommand{\biblio}{\bibliography{../main/SI3_manual}}
-\newcommand{\pindex}{\printindex}
-
-\makeindex
-
-%% End of common preamble between main and sub-files
-\begin{document}
-
-%% Override custom cmds for full manual compilation
-\renewcommand{\biblio}{}
-\renewcommand{\pindex}{}
-
-
-%% Frontmatter
-%% ==============================================================================
-
-\graphicspath{{../../figures/logos/}}
-
-%% Frontpage
-\title{
-  \includegraphics[height=0.05\textheight]{CMCC}\hfill
-  \includegraphics[height=0.05\textheight]{CNRS}\hfill
-  \includegraphics[height=0.05\textheight]{MOI} \hfill
-  \includegraphics[height=0.05\textheight]{UKMO}\hfill
-  \includegraphics[height=0.05\textheight]{NERC}       \\
-  {\Huge SI$^3$ \\}
-  {\Large Sea Ice modelling Integrated Initiative -- The NEMO Sea Ice engine}\\ 
-  {\small \textcolor{red}{First draft documentation. Needs completion and rewriting}.}
-}
-\author{The NEMO Sea Ice Working Group
-%  \thanks{
-%
-%  }                                                        \\
-  \textit{Issue 27, Notes du P\^{o}le de mod\'{e}lisation} \\
-  \textit{Institut Pierre-Simon Laplace (IPSL)}            \\
-  \textit{ISSN 1288-1619}
-}
-\date{\today}
-
-\maketitle
-\frontmatter
-
-%% ToC i.e. Table of Contents
-\dominitoc
-\tableofcontents
-
-
-%% Mainmatter
-%% ==============================================================================
-
-\mainmatter
-
-\graphicspath{{../../figures/SI3/}}
-
-\subfile{../subfiles/todolist}
-
-%% Abstract - Foreword
-
-\subfile{../subfiles/abstract_foreword}
-
-% Introduction
-
-\subfile{../subfiles/introduction}
-
-% Chapters
-
-\subfile{../subfiles/chap_model_basics}
-
-\subfile{../subfiles/chap_domain}
-
-\subfile{../subfiles/chap_dynamics}
-
-\subfile{../subfiles/chap_transport}
-
-\subfile{../subfiles/chap_ridging_rafting}
-
-\subfile{../subfiles/chap_radiative_transfer}
-
-\subfile{../subfiles/chap_thermo}
-
-\subfile{../subfiles/chap_interfaces}
-
-\subfile{../subfiles/chap_output_diagnostics}
-
-\subfile{../subfiles/chap_single_category_use}
-
-\subfile{../subfiles/chap_bdy_agrif}
-
-\subfile{../subfiles/chap_miscellaneous}
-
-%% Appendix
-
-%\appendix
-%% Backmatter
-%% ==============================================================================
-
-\backmatter
-
-%% Bibliography
-\cleardoublepage
-\phantomsection
-\addcontentsline{toc}{chapter}{Bibliography}
-\bibliography{../main/SI3_manual}
-%\bibliography{/Users/ioulianikolskaia/Boulot/LIBRARY/BIBTEX/Martin_biblio.bib} 
-
-%% Index
-\cleardoublepage
-\phantomsection
-\addcontentsline{toc}{chapter}{Index}
-\printindex
-
-\end{document}
+link ../../global/document.tex
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/abstract.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/abstract.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/abstract.tex	(revision 11831)
@@ -0,0 +1,25 @@
+%% ================================================================
+%% Abstract
+%% ================================================================
+
+%% Common part between NEMO-SI3-TOP
+``Sea Ice Modelling Integrated Initiative'' (\SIcube) is the sea ice engine of
+the \NEMO\ ocean model (``Nucleus for European Modelling of the Ocean'').
+It is intended to be a flexible tool for studying the sea ice dynamics and thermodynamics,
+brine inclusions and subgrid-scale thickness variations (``white ocean''),
+as well as its interactions with the other components of the Earth climate system over
+a wide range of space and time scales.
+\SIcube\ is interfaced with the \NEMO\ ocean engine, and,
+via the \href{http://portal.enes.org/oasis}{OASIS} coupler,
+with several atmospheric general circulation models.
+It also supports two-way grid embedding by means of the \href{http://agrif.imag.fr}{AGRIF} software.
+
+%% Specific part
+Designed for global to regional applications up to $~$10 km of effective resolution,
+\SIcube\ is a curvilinear grid, finite-difference implementation of the classical AIDJEX model
+(Arctic Ice Dynamics Joint EXperiment),
+combining the conservation of momentum for viscous-plastic continuum,
+energy and salt-conserving halo-thermodynamics,
+an explicit representation of subgrid-scale ice thickness variations, snow and melt ponds.
+An option to switch back to the \textit{single-category} (or \textit{2-level}) framework provides
+a cheap sea ice modelling solution.
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/authors.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/authors.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/authors.tex	(revision 11831)
@@ -0,0 +1,16 @@
+Yevgeny Aksenov       \\
+Ed Blockley           \\
+Matthieu Chevallier   \\
+Danny Feltham         \\
+Thierry Fichefet      \\
+Gilles Garric         \\
+Paul Holland          \\
+Dorotea Iovino        \\
+Gurvan Madec          \\
+Fran\c cois Massonnet \\
+Jeff Ridley           \\
+Cl\'ement Rousset     \\
+David Salas           \\
+David Schroeder       \\
+Steffen Tietsche      \\
+Martin Vancoppenolle
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/bibliography.bib
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/bibliography.bib	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/bibliography.bib	(revision 11831)
@@ -0,0 +1,677 @@
+
+@Article{	  assur_1958,
+  author	= {Assur, A},
+  year		= {1958},
+  month		= {01},
+  pages		= {106-138},
+  title		= {Composition of sea ice and its tensile strength},
+  volume	= {598},
+  journal	= {Arctic Sea Ice}
+}
+
+@Article{	  babko_2002,
+  author	= {Babko, O.},
+  title		= {Role of rafting in the mechanical redistribution of sea
+		  ice thickness},
+  year		= 2002,
+  volume	= 107,
+  number	= {C8},
+  issn		= {0148-0227},
+  doi		= {10.1029/1999jc000190},
+  url		= {http://dx.doi.org/10.1029/1999JC000190},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  bitz_1999,
+  author	= {Bitz, C. M. and Lipscomb, William H.},
+  title		= {An energy-conserving thermodynamic model of sea ice},
+  year		= 1999,
+  volume	= 104,
+  number	= {C7},
+  month		= {Jul},
+  pages		= {15669–15677},
+  issn		= {0148-0227},
+  doi		= {10.1029/1999jc900100},
+  url		= {http://dx.doi.org/10.1029/1999jc900100},
+  journal	= {Journal of Geophysical Research: Oceans},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  bitz_2001,
+  author	= {Bitz, C. M. and Holland, M. M. and Weaver, A. J. and Eby,
+		  M.},
+  title		= {Simulating the ice-thickness distribution in a coupled
+		  climate model},
+  year		= 2001,
+  volume	= 106,
+  number	= {C2},
+  month		= {Feb},
+  pages		= {2441–2463},
+  issn		= {0148-0227},
+  doi		= {10.1029/1999jc000113},
+  url		= {http://dx.doi.org/10.1029/1999jc000113},
+  journal	= {Journal of Geophysical Research: Oceans},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  bouillon_2013,
+  author	= {Bouillon, Sylvain and Fichefet, Thierry and Legat, Vincent
+		  and Madec, Gurvan},
+  title		= {The elastic–viscous–plastic method revisited},
+  year		= 2013,
+  volume	= 71,
+  month		= {Nov},
+  pages		= {2–12},
+  issn		= {1463-5003},
+  doi		= {10.1016/j.ocemod.2013.05.013},
+  url		= {http://dx.doi.org/10.1016/j.ocemod.2013.05.013},
+  journal	= {Ocean Modelling},
+  publisher	= {Elsevier BV}
+}
+
+@Article{	  brandt_2005,
+  author	= {Brandt, Richard E. and Warren, Stephen G. and Worby,
+		  Anthony P. and Grenfell, Thomas C.},
+  title		= {Surface Albedo of the Antarctic Sea Ice Zone},
+  year		= 2005,
+  volume	= 18,
+  number	= 17,
+  month		= {Sep},
+  pages		= {3606–3622},
+  issn		= {1520-0442},
+  doi		= {10.1175/jcli3489.1},
+  url		= {http://dx.doi.org/10.1175/jcli3489.1},
+  journal	= {Journal of Climate},
+  publisher	= {American Meteorological Society}
+}
+
+@Article{	  coon_1974,
+  author	= {Coon, M.D. and Maykut, G.A. and Pritchard, R.S. and
+		  Rothrock, D.A. and Thorndike, A.S.},
+  year		= {1974},
+  month		= {01},
+  pages		= {1-106},
+  title		= {Modeling the pack ice as an elastic-plastic material},
+  volume	= {24},
+  journal	= {AIDJEX Bull.}
+}
+
+@Article{	  ebert_1993,
+  author	= {Ebert, Elizabeth E. and Curry, Judith A.},
+  title		= {An intermediate one-dimensional thermodynamic sea ice
+		  model for investigating ice-atmosphere interactions},
+  year		= 1993,
+  volume	= 98,
+  number	= {C6},
+  pages		= 10085,
+  issn		= {0148-0227},
+  doi		= {10.1029/93jc00656},
+  url		= {http://dx.doi.org/10.1029/93jc00656},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  fichefet_1997,
+  author	= {Fichefet, T. and Maqueda, M. A. Morales},
+  title		= {Sensitivity of a global sea ice model to the treatment of
+		  ice thermodynamics and dynamics},
+  year		= 1997,
+  volume	= 102,
+  number	= {C6},
+  month		= {Jun},
+  pages		= {12609–12646},
+  issn		= {0148-0227},
+  doi		= {10.1029/97jc00480},
+  url		= {http://dx.doi.org/10.1029/97jc00480},
+  journal	= {Journal of Geophysical Research: Oceans},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  flato_1995,
+  author	= {Flato, Gregory M. and Hibler, William D.},
+  title		= {Ridging and strength in modeling the thickness
+		  distribution of Arctic sea ice},
+  year		= 1995,
+  volume	= 100,
+  number	= {C9},
+  pages		= 18611,
+  issn		= {0148-0227},
+  doi		= {10.1029/95jc02091},
+  url		= {http://dx.doi.org/10.1029/95jc02091},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  girard_2009,
+  author	= {Girard, L. and Weiss, J. and Molines, J. M. and Barnier,
+		  B. and Bouillon, S.},
+  title		= {Evaluation of high-resolution sea ice models on the basis
+		  of statistical and scaling properties of Arctic sea ice
+		  drift and deformation},
+  year		= 2009,
+  volume	= 114,
+  number	= {C8},
+  month		= {Aug},
+  issn		= {0148-0227},
+  doi		= {10.1029/2008jc005182},
+  url		= {http://dx.doi.org/10.1029/2008JC005182},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  grenfell_1977,
+  author	= {Grenfell, Thomas C. and Maykut, Gary A.},
+  title		= {The Optical Properties of Ice and Snow in the Arctic
+		  Basin},
+  year		= 1977,
+  volume	= 18,
+  number	= 80,
+  pages		= {445–463},
+  issn		= {1727-5652},
+  doi		= {10.3189/s0022143000021122},
+  url		= {http://dx.doi.org/10.3189/s0022143000021122},
+  journal	= {Journal of Glaciology},
+  publisher	= {Cambridge University Press (CUP)}
+}
+
+@Article{	  grenfell_2004,
+  author	= {Grenfell, Thomas C.},
+  title		= {Seasonal and spatial evolution of albedo in a
+		  snow-ice-land-ocean environment},
+  year		= 2004,
+  volume	= 109,
+  number	= {C1},
+  issn		= {0148-0227},
+  doi		= {10.1029/2003jc001866},
+  url		= {http://dx.doi.org/10.1029/2003JC001866},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  haapala_2000,
+  author	= {Haapala, Jari},
+  title		= {On the modelling of ice-thickness redistribution},
+  year		= 2000,
+  volume	= 46,
+  number	= 154,
+  pages		= {427–437},
+  issn		= {1727-5652},
+  doi		= {10.3189/172756500781833106},
+  url		= {http://dx.doi.org/10.3189/172756500781833106},
+  journal	= {Journal of Glaciology},
+  publisher	= {Cambridge University Press (CUP)}
+}
+
+@Article{	  hibler_1979,
+  author	= {Hibler, W. D.},
+  title		= {A Dynamic Thermodynamic Sea Ice Model},
+  year		= 1979,
+  volume	= 9,
+  number	= 4,
+  month		= {Jul},
+  pages		= {815–846},
+  issn		= {1520-0485},
+  doi		= {10.1175/1520-0485(1979)009<0815:adtsim>2.0.co;2},
+  url		= {http://dx.doi.org/10.1175/1520-0485(1979)009<0815:adtsim>2.0.co;2},
+  journal	= {Journal of Physical Oceanography},
+  publisher	= {American Meteorological Society}
+}
+
+@Article{	  hibler_1980,
+  author	= {Hibler, W. D.},
+  title		= {Modeling a Variable Thickness Sea Ice Cover},
+  year		= 1980,
+  volume	= 108,
+  number	= 12,
+  month		= {Dec},
+  pages		= {1943–1973},
+  issn		= {1520-0493},
+  doi		= {10.1175/1520-0493(1980)108<1943:mavtsi>2.0.co;2},
+  url		= {http://dx.doi.org/10.1175/1520-0493(1980)108<1943:mavtsi>2.0.co;2},
+  journal	= {Monthly Weather Review},
+  publisher	= {American Meteorological Society}
+}
+
+@Article{	  hoyland_2002,
+  author	= {Høyland, Knut V.},
+  title		= {Consolidation of first-year sea ice ridges},
+  year		= 2002,
+  volume	= 107,
+  number	= {C6},
+  issn		= {0148-0227},
+  doi		= {10.1029/2000jc000526},
+  url		= {http://dx.doi.org/10.1029/2000JC000526},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@techreport{	  kovacs_1996,
+  author	= {Kovacs, Austin},
+  title		= {Sea Ice. Part 1. Bulk Salinity Versus Ice Floe
+		  Thickness,},
+  year		= 1996,
+  month		= {Jun},
+  doi		= {10.21236/ada312027},
+  url		= {http://dx.doi.org/10.21236/ada312027},
+  publisher	= {Defense Technical Information Center}
+}
+
+@Article{	  kreyscher_2000,
+  author	= {Kreyscher, Martin and Harder, Markus and Lemke, Peter and
+		  Flato, Gregory M.},
+  title		= {Results of the Sea Ice Model Intercomparison Project:
+		  Evaluation of sea ice rheology schemes for use in climate
+		  simulations},
+  year		= 2000,
+  volume	= 105,
+  number	= {C5},
+  month		= {May},
+  pages		= {11299–11320},
+  issn		= {0148-0227},
+  doi		= {10.1029/1999jc000016},
+  url		= {http://dx.doi.org/10.1029/1999jc000016},
+  journal	= {Journal of Geophysical Research: Oceans},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  lecomte_2011,
+  author	= {Lecomte, Olivier and Fichefet, Thierry and Vancoppenolle,
+		  Martin and Nicolaus, Marcel},
+  title		= {A new snow thermodynamic scheme for large-scale sea-ice
+		  models},
+  year		= 2011,
+  volume	= 52,
+  number	= 57,
+  pages		= {337–346},
+  issn		= {1727-5644},
+  doi		= {10.3189/172756411795931453},
+  url		= {http://dx.doi.org/10.3189/172756411795931453},
+  journal	= {Annals of Glaciology},
+  publisher	= {Cambridge University Press (CUP)}
+}
+
+@Article{	  lecomte_2015,
+  author	= {Lecomte, Olivier and Fichefet, Thierry and Flocco, Daniela
+		  and Schroeder, David and Vancoppenolle, Martin},
+  title		= {Interactions between wind-blown snow redistribution and
+		  melt ponds in a coupled ocean–sea ice model},
+  year		= 2015,
+  volume	= 87,
+  month		= {Mar},
+  pages		= {67–80},
+  issn		= {1463-5003},
+  doi		= {10.1016/j.ocemod.2014.12.003},
+  url		= {http://dx.doi.org/10.1016/j.ocemod.2014.12.003},
+  journal	= {Ocean Modelling},
+  publisher	= {Elsevier BV}
+}
+
+@Article{	  lepparanta_1995,
+  author	= {Leppäranta, Matti and Lensu, Mikko and Kosloff, Pekka and
+		  Veitch, Brian},
+  title		= {The life story of a first-year sea ice ridge},
+  year		= 1995,
+  volume	= 23,
+  number	= 3,
+  month		= {May},
+  pages		= {279–290},
+  issn		= {0165-232X},
+  doi		= {10.1016/0165-232x(94)00019-t},
+  url		= {http://dx.doi.org/10.1016/0165-232x(94)00019-t},
+  journal	= {Cold Regions Science and Technology},
+  publisher	= {Elsevier BV}
+}
+
+@Article{	  lepparanta_2011,
+  author	= {Leppäranta, Matti},
+  title		= {Drift ice material},
+  year		= 2011,
+  pages		= {11–63},
+  doi		= {10.1007/978-3-642-04683-4\_2},
+  url		= {http://dx.doi.org/10.1007/978-3-642-04683-4\_2},
+  isbn		= 9783642046834,
+  journal	= {The Drift of Sea Ice},
+  publisher	= {Springer Berlin Heidelberg}
+}
+
+@Article{	  lipscomb_2001,
+  author	= {Lipscomb, William H.},
+  title		= {Remapping the thickness distribution in sea ice models},
+  year		= 2001,
+  volume	= 106,
+  number	= {C7},
+  month		= {Jul},
+  pages		= {13989–14000},
+  issn		= {0148-0227},
+  doi		= {10.1029/2000jc000518},
+  url		= {http://dx.doi.org/10.1029/2000jc000518},
+  journal	= {Journal of Geophysical Research: Oceans},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  lipscomb_2007,
+  author	= {Lipscomb, William H. and Hunke, Elizabeth C. and
+		  Maslowski, Wieslaw and Jakacki, Jaromir},
+  title		= {Ridging, strength, and stability in high-resolution sea
+		  ice models},
+  year		= 2007,
+  volume	= 112,
+  number	= {C3},
+  month		= {Mar},
+  issn		= {0148-0227},
+  doi		= {10.1029/2005jc003355},
+  url		= {http://dx.doi.org/10.1029/2005JC003355},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  massonnet_2018,
+  author	= {Massonnet, F. and Barth\'el\'emy, A. and Worou, K. and
+		  Fichefet, T. and Vancoppenolle, M. and Rousset, C.},
+  title		= {Insights on the discretization of the ice thickness
+		  distribution in large-scale sea ice models},
+  journal	= {submitted},
+  year		= {2018}
+}
+
+@Article{	  maykut_1971,
+  author	= {Maykut, Gary A. and Untersteiner, Norbert},
+  title		= {Some results from a time-dependent thermodynamic model of
+		  sea ice},
+  year		= 1971,
+  volume	= 76,
+  number	= 6,
+  month		= {Feb},
+  pages		= {1550–1575},
+  issn		= {0148-0227},
+  doi		= {10.1029/jc076i006p01550},
+  url		= {http://dx.doi.org/10.1029/jc076i006p01550},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  maykut_1973,
+  author	= {Maykut, G. A. and Thorndike, A. S.},
+  title		= {An approach to coupling the dynamics and thermodynamics of
+		  Arctic sea ice},
+  journal	= {AIDJEX Bulletin},
+  year		= {1973},
+  volume	= {21},
+  pages		= {23--29}
+}
+
+@Article{	  maykut_1986,
+  author	= {Maykut, Gary A.},
+  title		= {The Surface Heat and Mass Balance},
+  year		= 1986,
+  pages		= {395–463},
+  doi		= {10.1007/978-1-4899-5352-0\_6},
+  url		= {http://dx.doi.org/10.1007/978-1-4899-5352-0\_6},
+  isbn		= 9781489953520,
+  journal	= {The Geophysics of Sea Ice},
+  publisher	= {Springer US}
+}
+
+@Article{	  maykut_1995,
+  author	= {Maykut, G. A. and McPhee, Miles G.},
+  title		= {Solar heating of the Arctic mixed layer},
+  year		= 1995,
+  volume	= 100,
+  number	= {C12},
+  pages		= 24691,
+  issn		= {0148-0227},
+  doi		= {10.1029/95jc02554},
+  url		= {http://dx.doi.org/10.1029/95jc02554},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  mcphee_1992,
+  author	= {McPhee, Miles G.},
+  title		= {Turbulent heat flux in the upper ocean under sea ice},
+  year		= 1992,
+  volume	= 97,
+  number	= {C4},
+  pages		= 5365,
+  issn		= {0148-0227},
+  doi		= {10.1029/92jc00239},
+  url		= {http://dx.doi.org/10.1029/92jc00239},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  mellor_1989,
+  author	= {Mellor, George L. and Kantha, Lakshmi},
+  title		= {An ice-ocean coupled model},
+  year		= 1989,
+  volume	= 94,
+  number	= {C8},
+  pages		= 10937,
+  issn		= {0148-0227},
+  doi		= {10.1029/jc094ic08p10937},
+  url		= {http://dx.doi.org/10.1029/jc094ic08p10937},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  notz_2016,
+  author	= {Notz, Dirk and Jahn, Alexandra and Holland, Marika and
+		  Hunke, Elizabeth and Massonnet, François and Stroeve,
+		  Julienne and Tremblay, Bruno and Vancoppenolle, Martin},
+  title		= {The CMIP6 Sea-Ice Model Intercomparison Project (SIMIP):
+		  understanding sea ice through climate-model simulations},
+  year		= 2016,
+  volume	= 9,
+  number	= 9,
+  month		= {Sep},
+  pages		= {3427–3446},
+  issn		= {1991-9603},
+  doi		= {10.5194/gmd-9-3427-2016},
+  url		= {http://dx.doi.org/10.5194/gmd-9-3427-2016},
+  journal	= {Geoscientific Model Development},
+  publisher	= {Copernicus GmbH}
+}
+
+@Article{	  parmerter_1975,
+  author	= {Parmerter, R. Reid},
+  title		= {A model of simple rafting in sea ice},
+  year		= 1975,
+  volume	= 80,
+  number	= 15,
+  month		= {May},
+  pages		= {1948–1952},
+  issn		= {0148-0227},
+  doi		= {10.1029/jc080i015p01948},
+  url		= {http://dx.doi.org/10.1029/jc080i015p01948},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  perovich_2002,
+  author	= {Perovich, D. K.},
+  title		= {Seasonal evolution of the albedo of multiyear Arctic sea
+		  ice},
+  year		= 2002,
+  volume	= 107,
+  number	= {C10},
+  issn		= {0148-0227},
+  doi		= {10.1029/2000jc000438},
+  url		= {http://dx.doi.org/10.1029/2000JC000438},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  prather_1986,
+  author	= {Prather, Michael J.},
+  title		= {Numerical advection by conservation of second-order
+		  moments},
+  year		= 1986,
+  volume	= 91,
+  number	= {D6},
+  pages		= 6671,
+  issn		= {0148-0227},
+  doi		= {10.1029/jd091id06p06671},
+  url		= {http://dx.doi.org/10.1029/jd091id06p06671},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  pringle_2007,
+  author	= {Pringle, D. J. and Eicken, H. and Trodahl, H. J. and
+		  Backstrom, L. G. E.},
+  title		= {Thermal conductivity of landfast Antarctic and Arctic sea
+		  ice},
+  year		= 2007,
+  volume	= 112,
+  number	= {C4},
+  month		= {Apr},
+  issn		= {0148-0227},
+  doi		= {10.1029/2006jc003641},
+  url		= {http://dx.doi.org/10.1029/2006JC003641},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  schmidt_2004,
+  author	= {Schmidt, Gavin A. and Bitz, Cecilia M. and Mikolajewicz,
+		  Uwe and Tremblay, L.-Bruno},
+  title		= {Ice–ocean boundary conditions for coupled models},
+  year		= 2004,
+  volume	= 7,
+  number	= {1-2},
+  month		= {Jan},
+  pages		= {59–74},
+  issn		= {1463-5003},
+  doi		= {10.1016/s1463-5003(03)00030-1},
+  url		= {http://dx.doi.org/10.1016/S1463-5003(03)00030-1},
+  journal	= {Ocean Modelling},
+  publisher	= {Elsevier BV}
+}
+
+@Article{	  shine_1985,
+  author	= {Shine, K. P. and Henderson-Sellers, A.},
+  title		= {The sensitivity of a thermodynamic sea ice model to
+		  changes in surface albedo parameterization},
+  year		= 1985,
+  volume	= 90,
+  number	= {D1},
+  pages		= 2243,
+  issn		= {0148-0227},
+  doi		= {10.1029/jd090id01p02243},
+  url		= {http://dx.doi.org/10.1029/jd090id01p02243},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Book{		  teos-10_2010,
+  title		= {{The international thermodynamic equation of seawater -
+		  2010: Calculation and use of thermodynamic properties}},
+  publisher	= {UNESCO (English)},
+  year		= {2010},
+  author	= {{IOC, SCOR and IAPSO}},
+  series	= {Intergovernmental Oceanographic Commission, Manuals and
+		  Guides No. 56},
+  url =          {http://www.teos-10.org/pubs/TEOS-10_Manual.pdf}
+}
+
+@Article{	  thorndike_1975,
+  author	= {Thorndike, A. S. and Rothrock, D. A. and Maykut, G. A. and
+		  Colony, R.},
+  title		= {The thickness distribution of sea ice},
+  year		= 1975,
+  volume	= 80,
+  number	= 33,
+  month		= {Nov},
+  pages		= {4501–4513},
+  issn		= {0148-0227},
+  doi		= {10.1029/jc080i033p04501},
+  url		= {http://dx.doi.org/10.1029/JC080i033p04501},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  tuhkuri_2002,
+  author	= {Tuhkuri, Jukka},
+  title		= {Laboratory tests on ridging and rafting of ice sheets},
+  year		= 2002,
+  volume	= 107,
+  number	= {C9},
+  issn		= {0148-0227},
+  doi		= {10.1029/2001jc000848},
+  url		= {http://dx.doi.org/10.1029/2001JC000848},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  vancoppenolle_2009,
+  author	= {Vancoppenolle, Martin and Fichefet, Thierry and Goosse,
+		  Hugues},
+  title		= {Simulating the mass balance and salinity of Arctic and
+		  Antarctic sea ice. 2. Importance of sea ice salinity
+		  variations},
+  year		= 2009,
+  volume	= 27,
+  number	= {1-2},
+  month		= {Jan},
+  pages		= {54–69},
+  issn		= {1463-5003},
+  doi		= {10.1016/j.ocemod.2008.11.003},
+  url		= {http://dx.doi.org/10.1016/j.ocemod.2008.11.003},
+  journal	= {Ocean Modelling},
+  publisher	= {Elsevier BV}
+}
+
+@Article{	  weiss_2013,
+  author	= {Weiss, Jérôme},
+  title		= {Drift, Deformation, and Fracture of Sea Ice},
+  year		= 2013,
+  issn		= {2191-5377},
+  doi		= {10.1007/978-94-007-6202-2},
+  url		= {http://dx.doi.org/10.1007/978-94-007-6202-2},
+  isbn		= 9789400762022,
+  journal	= {SpringerBriefs in Earth Sciences},
+  publisher	= {Springer Netherlands}
+}
+
+@Article{	  worster_1992,
+  author	= {Worster, M. G.},
+  title		= {The Dynamics of Mushy Layers},
+  year		= 1992,
+  pages		= {113–138},
+  doi		= {10.1007/978-94-011-2809-4\_20},
+  url		= {http://dx.doi.org/10.1007/978-94-011-2809-4\_20},
+  isbn		= 9789401128094,
+  journal	= {Interactive Dynamics of Convection and Solidification},
+  publisher	= {Springer Netherlands}
+}
+
+@Article{	  zhang_2001,
+  author	= {Zhang, Jinlun and Rothrock, Drew},
+  title		= {A Thickness and Enthalpy Distribution Sea-Ice Model},
+  year		= 2001,
+  volume	= 31,
+  number	= 10,
+  month		= {Oct},
+  pages		= {2986–3001},
+  issn		= {1520-0485},
+  doi		= {10.1175/1520-0485(2001)031<2986:ataeds>2.0.co;2},
+  url		= {http://dx.doi.org/10.1175/1520-0485(2001)031<2986:ataeds>2.0.co;2},
+  journal	= {Journal of Physical Oceanography},
+  publisher	= {American Meteorological Society}
+}
+
+@Article{	  zuo_1996,
+  author	= {Zuo, Z. and Oerlemans, J.},
+  title		= {Modelling albedo and specific balance of the Greenland ice
+		  sheet: calculations for the Søndre Strømfjord transect},
+  year		= 1996,
+  volume	= 42,
+  number	= 141,
+  pages		= {305–317},
+  issn		= {1727-5652},
+  doi		= {10.1017/s0022143000004160},
+  url		= {http://dx.doi.org/10.1017/s0022143000004160},
+  journal	= {Journal of Glaciology},
+  publisher	= {Cambridge University Press (CUP)}
+}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/blocks.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/blocks.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/blocks.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/blocks.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/chapters.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/chapters.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/chapters.tex	(revision 11831)
@@ -0,0 +1,14 @@
+\subfile{../subfiles/todolist}
+
+\subfile{../subfiles/chap_model_basics}
+\subfile{../subfiles/chap_domain}
+\subfile{../subfiles/chap_dynamics}
+\subfile{../subfiles/chap_transport}
+\subfile{../subfiles/chap_ridging_rafting}
+\subfile{../subfiles/chap_radiative_transfer}
+\subfile{../subfiles/chap_thermo}
+\subfile{../subfiles/chap_interfaces}
+\subfile{../subfiles/chap_output_diagnostics}
+\subfile{../subfiles/chap_single_category_use}
+\subfile{../subfiles/chap_bdy_agrif}
+\subfile{../subfiles/chap_miscellaneous}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/introduction.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/introduction.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/introduction.tex	(revision 11831)
@@ -0,0 +1,63 @@
+
+% ================================================================
+% INTRODUCTION
+% ================================================================
+
+\chapter*{Introduction}
+
+\textcolor{red}{[ \textit{July 2018} ]} \\
+
+%Near the poles of the Earth, the seas and oceans freeze when seawater at the freezing point loses heat. The resulting forms of saline ice are collectively called \textit{sea ice} \citep{WMO70}, reaching up to a few meters in thickness, where as sea ice coverage is about 5\% of the global ocean, about 30 million square kilometers. All sea ice characteristics vary over a wide range of spatio-temporal scales, reflecting changes in heat, mass and momentum exchanges with the atmosphere and the ocean; the clearest temporal signal being an ample seasonal cycle. Sea ice formation and melting affects water mass formation in the ocean \citep{goosse_1999}. It not only impacts, but also reflects the state of the climate system \citep{budyko_1969,notz_2016}.  Sea ice also affects marine life, water chemistry and human activities in polar regions. Local populations use sea ice for travelling and hunting, whereas navigation and resource exploitation are dependent on sea ice conditions. For such reasons, ocean modelling systems, including \NEMO, must include a sea ice component.
+
+\SIcube\ is the result of the recommendation of the Sea Ice Working Group (SIWG) to
+reduce duplication and better use development resources.
+\SIcube\ merges the capabilities of the 3 formerly sea ice models used in \NEMO\ (CICE, GELATO and LIM).
+The \textbf{3} in \SIcube\ refers either to the three formerly used sea ice models and
+linkages between 3 different media (ocean-ice-snow).
+The model would be pronounced as ``SI cube'' for short (or ``Sea Ice cubed'' for slightly longer),
+otherwise it can be spelt ``SI three'' in situations where the superscript could be problematic.
+
+% Limitations & scope
+%There are limitations to the applicability of models such as \SIcube. The continuum approach is not invalid for grid cell size above at least 1 km, below which sea ice particles may include just a few floes, which is not sufficient \citep{lepparanta_2011}. Second, one must remember that our current knowledge of sea ice is not as complete as for the ocean: there are no fundamental equations such as Navier Stokes equations for sea ice. Besides, important features and processes span widely different scales, such as brine inclusions (1 $\mu$m-1 mm) \citep{perovich_1996}, horizontal thickness variations (1 m-100 km) \citep{percival_2008}, deformation and fracturing (10 m-1000 km) \citep{marsan_2004}. These impose complicated and often subjective subgrid-scale treatments. All in all, there is more empiricism in sea ice models than in ocean models.
+
+In order to handle all the subsequent required subjective choices, we applied the following guidelines or principles:
+\begin{itemize}
+\item Sea ice is frozen seawater that is in tight interaction with the underlying ocean. This close connexion suggests that the sea ice and ocean model components must be as consistent as possible. In practice, this is materialized by the close match between LIM and \NEMO, in terms of numerical choices, regarding the grid (Arakawa C-type) and the numerical discretization (finite differences with \NEMO\ scale factors).
+\item It is useful to be able to either prescribe the atmospheric state or to use an atmospheric model. For consistency and simplicity of the code, we choose to use formulations as close as possible in both cases.
+\item Different resolutions and time steps can be used. There are parameters that depend on such choices. We thrived to achieve a resolution and time-step independent code, by imposing a priori scaling on the resolution / time step dependence of such parameters.
+\item Energy, mass and salt must be conserved as much as possible.
+\end{itemize}
+
+This manual is organised as follows. \\
+
+List of chapters... \\
+
+There are no more CPP keys in the code. \\
+
+Namelists and output management follow \NEMO\ guidelines. \\
+
+Changes between releases. \\
+
+The list of people that should be acknowledged is too long, but a great number of people or more exactly a number of great people contributed to the code and should be gratefully acknowledged. As for today,
+the SIWG members are \textit{(July 2018)}.
+
+\begin{itemize}
+\begin{footnotesize}
+\item Yevgeny Aksenov (NOCS, Southampton, UK)
+\item Ed Blockley (Met Office, Exeter, UK, co-chair)
+\item Matthieu Chevallier (CNRM-GAME, M\'et\'eo France, Toulouse)
+\item Danny Feltham (CPOM, Reading, UK)
+\item Thierry Fichefet (UCL, Louvain-la-Neuve, Belgium)
+\item Gilles Garric (Mercator-Oc\'ean, Toulouse, France)
+\item Paul Holland (BAS, Cambridge, UK)
+\item Dorotea Iovino (CMCC, Bologna, Italy)
+\item Gurvan Madec (LOCEAN, CNRS, Paris, France)
+\item Fran\c cois Massonnet (UCL, Louain-la-Neuve, Belgium)
+\item Jeff Ridley (Met Office, Exeter, UK)
+\item Cl\'ement Rousset (LOCEAN, CNRS, Paris, France)
+\item David Salas (CNRM-GAME, M\'et\'eo France, Toulouse)
+\item David Schroeder (CPOM, Reading, UK)
+\item Steffen Tietsche (ECMWF, Reading, UK)
+\item Martin Vancoppenolle (LOCEAN, CNRS, Paris, France, co-chair)
+\end{footnotesize}
+\end{itemize}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/keys.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/keys.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/keys.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/keys.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/modules.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/modules.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/modules.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/modules.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/parameters.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/parameters.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/parameters.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/parameters.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/settings.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/settings.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/settings.tex	(revision 11831)
@@ -0,0 +1,20 @@
+%% Engine (folder name)
+\def \engine{SI3}
+
+%% Title and cover page settings
+\def \spacetop{  \vspace*{1.2cm} }
+\def \heading{Sea Ice modelling Integrated Initiative (SI$^3$)}
+\def \subheading{The NEMO sea ice engine}
+\def \spacedown{ \vspace*{  1cm} }
+\def \authorswidth{0.2\linewidth}
+\def \rulelenght{230pt}
+\def \abstractwidth{0.65\linewidth}
+
+%% Color for document (frontpage banner, links and chapter boxes)
+\def \setmanualcolor{ \definecolor{manualcolor}{cmyk}{0, 0, 0, 0.4} }
+
+%% IPSL publication number
+\def \ipslnum{31}
+
+%% Zenodo ID, i.e. doi:10.5281/zenodo.\([0-9]*\)
+\def \zid{1471689}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/subroutines.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/subroutines.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/main/subroutines.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/subroutines.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/namelists/namdyn_adv
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/namelists/namdyn_adv	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/namelists/namdyn_adv	(revision 11831)
@@ -2,6 +2,6 @@
 &namdyn_adv     !   Ice advection
 !------------------------------------------------------------------------------
-   ln_adv_Pra       = .false.         !  Advection scheme (Prather)
-   ln_adv_UMx       = .true.          !  Advection scheme (Ultimate-Macho)
+   ln_adv_Pra       = .true.         !  Advection scheme (Prather)
+   ln_adv_UMx       = .false.          !  Advection scheme (Ultimate-Macho)
       nn_UMx        =   5             !     order of the scheme for UMx (1-5 ; 20=centered 2nd order)
 /
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/blocks.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/blocks.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/blocks.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/blocks.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_bdy_agrif.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_bdy_agrif.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_bdy_agrif.tex	(revision 11831)
@@ -9,5 +9,5 @@
 \chapter{BDY and AGRIF with SI$^3$}
 \label{chap:REG}
-\minitoc
+\chaptertoc
 
 \newpage
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_domain.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_domain.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_domain.tex	(revision 11831)
@@ -10,5 +10,5 @@
 \chapter{Time, space and thickness space domain}
 \label{chap:DOM}
-\minitoc
+\chaptertoc
 
 \newpage
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_dynamics.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_dynamics.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_dynamics.tex	(revision 11831)
@@ -10,5 +10,5 @@
 \chapter{Ice dynamics}
 \label{chap:DYN}
-\minitoc
+\chaptertoc
 
 \newpage
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_interfaces.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_interfaces.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_interfaces.tex	(revision 11831)
@@ -9,5 +9,5 @@
 \chapter{Ice-atmosphere and ice-ocean interfaces}
 \label{chap:INT}
-\minitoc
+\chaptertoc
 
 \newpage
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_miscellaneous.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_miscellaneous.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_miscellaneous.tex	(revision 11831)
@@ -9,5 +9,5 @@
 \chapter{Miscellaneous topics}
 \label{chap:MIS}
-\minitoc
+\chaptertoc
 
 \newpage
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_model_basics.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_model_basics.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_model_basics.tex	(revision 11831)
@@ -9,5 +9,5 @@
 \chapter{Model Basics}
 \label{chap:MB}
-\minitoc
+\chaptertoc
 
 \newpage
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_output_diagnostics.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_output_diagnostics.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_output_diagnostics.tex	(revision 11831)
@@ -9,5 +9,5 @@
 \chapter{Output and diagnostics}
 \label{chap:DIA}
-\minitoc
+\chaptertoc
 
 \newpage
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_radiative_transfer.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_radiative_transfer.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_radiative_transfer.tex	(revision 11831)
@@ -13,5 +13,5 @@
 \chapter{Radiative transfer}
 \label{chap:RAD}
-\minitoc
+\chaptertoc
 
 \newpage
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_ridging_rafting.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_ridging_rafting.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_ridging_rafting.tex	(revision 11831)
@@ -10,5 +10,5 @@
 \chapter{Ridging and rafting}
 \label{chap:RDG}
-\minitoc
+\chaptertoc
 
 \newpage
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_single_category_use.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_single_category_use.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_single_category_use.tex	(revision 11831)
@@ -11,5 +11,5 @@
 
 \label{chap:INT}
-\minitoc
+\chaptertoc
 
 \newpage
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_thermo.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_thermo.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_thermo.tex	(revision 11831)
@@ -9,5 +9,5 @@
 \chapter{Ice thermodynamics}
 \label{chap:THD}
-\minitoc
+\chaptertoc
 
 \newpage
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_transport.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_transport.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/chap_transport.tex	(revision 11831)
@@ -10,5 +10,5 @@
 \chapter{Ice transport}
 \label{chap:TRP}
-\minitoc
+\chaptertoc
 
 \newpage
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/introduction.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/introduction.tex	(revision 11086)
+++ 	(revision )
@@ -1,59 +1,0 @@
-
-% ================================================================
-% INTRODUCTION
-% ================================================================
-
-\chapter*{Introduction}
-
-\textcolor{red}{[ \textit{July 2018} ]} \\
-
-%Near the poles of the Earth, the seas and oceans freeze when seawater at the freezing point loses heat. The resulting forms of saline ice are collectively called \textit{sea ice} \citep{WMO70}, reaching up to a few meters in thickness, where as sea ice coverage is about 5\% of the global ocean, about 30 million square kilometers. All sea ice characteristics vary over a wide range of spatio-temporal scales, reflecting changes in heat, mass and momentum exchanges with the atmosphere and the ocean; the clearest temporal signal being an ample seasonal cycle. Sea ice formation and melting affects water mass formation in the ocean \citep{goosse_1999}. It not only impacts, but also reflects the state of the climate system \citep{budyko_1969,notz_2016}.  Sea ice also affects marine life, water chemistry and human activities in polar regions. Local populations use sea ice for travelling and hunting, whereas navigation and resource exploitation are dependent on sea ice conditions. For such reasons, ocean modelling systems, including NEMO, must include a sea ice component.
-
-The sea Ice Modelling Integrated Initiative (SI$^3$) is the sea ice engine of the Nucleus for European Modelling of the Ocean (NEMO). It is intended to be a flexible tool for studying sea ice and its interactions with the other components of the Earth System over a wide range of space and time scales. SI$^3$ is a curvilinear grid, finite-difference implementation of the classical AIDJEX\footnote{AIDJEX=\textbf{A}rctic \textbf{I}ce \textbf{D}ynamics \textbf{J}oint \textbf{EX}periment} model \citep{coon_1974}, combining the conservation of momentum for viscous-plastic continuum, energy and salt-conserving halo-thermodynamics, an explicit representation of subgrid-scale ice thickness variations, snow and melt ponds. An option to switch back to the \textit{single-category} (or \textit{2-level}) framework of \cite{hibler_1979} provides a cheap sea ice modelling solution.
-
-SI$^3$ is the result of the recommendation of the Sea Ice Working Group (SIWG) to reduce duplication and better use development resources. SI$^3$ merges the capabilities of the 3 formerly used NEMO sea ice models (CICE, GELATO and LIM). The \textbf{3} in SI$^3$ refers to the three formerly used sea ice models. It also refers to linkages between 3 different media (ocean, ice, snow). The model can be spelt 'SI3' in situations where the superscript could be problematic (i.e., within code and svn repository etc.) The model name would be pronounced as 'si-cube' for short (or 'sea ice cubed' for slightly longer). 
-
-% Limitations & scope
-%There are limitations to the applicability of models such as SI$^3$. The continuum approach is not invalid for grid cell size above at least 1 km, below which sea ice particles may include just a few floes, which is not sufficient \citep{lepparanta_2011}. Second, one must remember that our current knowledge of sea ice is not as complete as for the ocean: there are no fundamental equations such as Navier Stokes equations for sea ice. Besides, important features and processes span widely different scales, such as brine inclusions (1 $\mu$m-1 mm) \citep{perovich_1996}, horizontal thickness variations (1 m-100 km) \citep{percival_2008}, deformation and fracturing (10 m-1000 km) \citep{marsan_2004}. These impose complicated and often subjective subgrid-scale treatments. All in all, there is more empirism in sea ice models than in ocean models. 
-
-In order to handle all the subsequent required subjective choices, we applied the following guidelines or principles:
-\begin{itemize}
-\item Sea ice is frozen seawater that is in tight interaction with the underlying ocean. This close connexion suggests that the sea ice and ocean model components must be as consistent as possible. In practice, this is materialized by the close match between LIM and NEMO, in terms of numerical choices, regarding the grid (Arakawa C-type) and the numerical discretization (finite differences with NEMO scale factors).
-\item It is useful to be able to either prescribe the atmospheric state or to use an atmospheric model. For consistency and simplicity of the code, we choose to use formulations as close as possible in both cases.
-\item Different resolutions and time steps can be used. There are parameters that depend on such choices. We thrieved to achieve a resolution and time-step independent code, by imposing a priori scaling on the resolution / time step dependence of such parameters.
-\item Energy, mass and salt must be conserved as much as possible.
-\end{itemize}
-
-This manual is organised as follows. \\
-
-List of chapters... \\
-
-There are no more CPP keys in the code. \\
-
-Namelists and output management follow NEMO guidelines. \\
-
-Changes between releases. \\
-
-The list of people that should be acknowledged is too long, but a great number of people or more exactly a number of great people contributed to the code and should be gratefully acknowledged. As for today,
-the SIWG members are \textit{(July 2018)}.
-
-\begin{itemize}
-\begin{footnotesize}
-\item Yevgeny Aksenov (NOCS, Southampton, UK)
-\item Ed Blockley (Met Office, Exeter, UK, co-chair)
-\item Matthieu Chevallier (CNRM-GAME, M\'et\'eo France, Toulouse)
-\item Danny Feltham (CPOM, Reading, UK)
-\item Thierry Fichefet (UCL, Louvain-la-Neuve, Belgium)
-\item Gilles Garric (Mercator-Oc\'ean, Toulouse, France)
-\item Paul Holland (BAS, Cambridge, UK)
-\item Dorotea Iovino (CMCC, Bologna, Italy)
-\item Gurvan Madec (LOCEAN, CNRS, Paris, France)
-\item Fran\c cois Massonnet (UCL, Louain-la-Neuve, Belgium)
-\item Jeff Ridley (Met Office, Exeter, UK)
-\item Cl\'ement Rousset (LOCEAN, CNRS, Paris, France)
-\item David Salas (CNRM-GAME, M\'et\'eo France, Toulouse)
-\item David Schroeder (CPOM, Reading, UK)
-\item Steffen Tietsche (ECMWF, Reading, UK)
-\item Martin Vancoppenolle (LOCEAN, CNRS, Paris, France, co-chair) 
-\end{footnotesize}
-\end{itemize}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/keys.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/keys.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/keys.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/keys.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/modules.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/modules.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/modules.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/modules.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/parameters.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/parameters.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/parameters.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/parameters.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/subroutines.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/subroutines.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/SI3/subfiles/subroutines.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/subroutines.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/TOP_manual.bib
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/TOP_manual.bib	(revision 11086)
+++ 	(revision )
@@ -1,619 +1,0 @@
-
-@Article{	  ahn_2007,
-  author	= {Ahn, Jinho and Brook, Edward J.},
-  title		= {Atmospheric CO2and climate from 65 to 30 ka B.P.},
-  year		= 2007,
-  volume	= 34,
-  number	= 10,
-  month		= {May},
-  issn		= {0094-8276},
-  doi		= {10.1029/2007gl029551},
-  url		= {http://dx.doi.org/10.1029/2007GL029551},
-  journal	= {Geophysical Research Letters},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  ahn_2008,
-  author	= {Ahn, J. and Brook, E. J.},
-  title		= {Atmospheric CO2 and Climate on Millennial Time Scales
-		  During the Last Glacial Period},
-  year		= 2008,
-  volume	= 322,
-  number	= 5898,
-  month		= {Oct},
-  pages		= {83–85},
-  issn		= {1095-9203},
-  doi		= {10.1126/science.1160832},
-  url		= {http://dx.doi.org/10.1126/science.1160832},
-  journal	= {Science},
-  publisher	= {American Association for the Advancement of Science
-		  (AAAS)}
-}
-
-@Article{	  armstrong_2001,
-  author	= {Armstrong, Robert A. and Lee, Cindy and Hedges, John I.
-		  and Honjo, Susumu and Wakeham, Stuart G.},
-  title		= {A new, mechanistic model for organic carbon fluxes in the
-		  ocean based on the quantitative association of POC with
-		  ballast minerals},
-  year		= 2001,
-  volume	= 49,
-  number	= {1-3},
-  month		= {Jan},
-  pages		= {219–236},
-  issn		= {0967-0645},
-  doi		= {10.1016/s0967-0645(01)00101-1},
-  url		= {http://dx.doi.org/10.1016/S0967-0645(01)00101-1},
-  journal	= {Deep Sea Research Part II: Topical Studies in
-		  Oceanography},
-  publisher	= {Elsevier BV}
-}
-
-@Article{	  aumont_2015,
-  author	= {Aumont, O. and Ethé, C. and Tagliabue, A. and Bopp, L.
-		  and Gehlen, M.},
-  title		= {PISCES-v2: an ocean biogeochemical model for carbon and
-		  ecosystem studies},
-  year		= 2015,
-  volume	= 8,
-  number	= 8,
-  month		= {Aug},
-  pages		= {2465–2513},
-  issn		= {1991-9603},
-  doi		= {10.5194/gmd-8-2465-2015},
-  url		= {http://dx.doi.org/10.5194/gmd-8-2465-2015},
-  journal	= {Geoscientific Model Development},
-  publisher	= {Copernicus GmbH}
-}
-
-@Article{	  bacastow_1990,
-  author	= {Bacastow, R and Maier-Reimer, E},
-  title		= {Ocean-circulation model of the carbon cycle},
-  year		= 1990,
-  volume	= 4,
-  number	= 2,
-  month		= {Apr},
-  pages		= {95–125},
-  issn		= {1432-0894},
-  doi		= {10.1007/bf00208905},
-  url		= {http://dx.doi.org/10.1007/bf00208905},
-  journal	= {Climate Dynamics},
-  publisher	= {Springer Nature}
-}
-
-@Misc{		  bullister_2017,
-  author	= {Bullister, J.L.},
-  title		= {Atmospheric Histories (1765-2015) for CFC-11, CFC-12,
-		  CFC-113, CCl4, SF6 and N2O (NCEI Accession 0164584)},
-  year		= 2017,
-  doi		= {10.3334/cdiac/otg.cfc\_atm\_hist\_2015},
-  url		= {https://accession.nodc.noaa.gov/0164584},
-  publisher	= {NOAA National Centers for Environmental Information}
-}
-
-@Article{	  butzin_2005,
-  author	= {BUTZIN, M and PRANGE, M and LOHMANN, G},
-  title		= {Radiocarbon simulations for the glacial ocean: The effects
-		  of wind stress, Southern Ocean sea ice and Heinrich
-		  events},
-  year		= 2005,
-  volume	= 235,
-  number	= {1-2},
-  month		= {Jun},
-  pages		= {45–61},
-  issn		= {0012-821X},
-  doi		= {10.1016/j.epsl.2005.03.003},
-  url		= {http://dx.doi.org/10.1016/j.epsl.2005.03.003},
-  journal	= {Earth and Planetary Science Letters},
-  publisher	= {Elsevier BV}
-}
-
-@Article{	  danabasoglu_2014,
-  author	= {Danabasoglu, Gokhan and Yeager, Steve G. and Bailey, David
-		  and Behrens, Erik and Bentsen, Mats and Bi, Daohua and
-		  Biastoch, Arne and Böning, Claus and Bozec, Alexandra and
-		  Canuto, Vittorio M. and et al.},
-  title		= {North Atlantic simulations in Coordinated Ocean-ice
-		  Reference Experiments phase II (CORE-II). Part I: Mean
-		  states},
-  year		= 2014,
-  volume	= 73,
-  month		= {Jan},
-  pages		= {76–107},
-  issn		= {1463-5003},
-  doi		= {10.1016/j.ocemod.2013.10.005},
-  url		= {http://dx.doi.org/10.1016/j.ocemod.2013.10.005},
-  journal	= {Ocean Modelling},
-  publisher	= {Elsevier BV}
-}
-
-@Article{	  dutay_2002,
-  author	= {Dutay, J.-C and Bullister, J.L and Doney, S.C and Orr, J.C
-		  and Najjar, R and Caldeira, K and Campin, J.-M and Drange,
-		  H and Follows, M and Gao, Y and et al.},
-  title		= {Evaluation of ocean model ventilation with CFC-11:
-		  comparison of 13 global ocean models},
-  year		= 2002,
-  volume	= 4,
-  number	= 2,
-  month		= {Jan},
-  pages		= {89–120},
-  issn		= {1463-5003},
-  doi		= {10.1016/s1463-5003(01)00013-0},
-  url		= {http://dx.doi.org/10.1016/S1463-5003(01)00013-0},
-  journal	= {Ocean Modelling},
-  publisher	= {Elsevier BV}
-}
-
-@Article{	  enting_1994,
-  author	= {G Enting, I and M L Wigley, T and Heimann, Martin},
-  year		= {1994},
-  month		= {01},
-  pages		= {},
-  title		= {Future Emissions and Concentrations of Carbon Dioxide: Key
-		  Ocean/Atmosphere/Land Analyses},
-  volume	= {31},
-  journal	= {CSIRO Division Atmospheric Research Technical Paper}
-}
-
-@Article{	  fiadeiro_1982,
-  author	= {Fiadeiro, M.E.},
-  year		= {1982},
-  month		= {01},
-  pages		= {537-550},
-  title		= {Three-dimensional modeling of tracers in the deep Pacific
-		  Ocean II. Radiocarbon and the circulation},
-  volume	= {40},
-  journal	= {J. Mar. Res.}
-}
-
-@Article{	  fluckiger_2002,
-  author	= {Flückiger, Jacqueline and Monnin, Eric and Stauffer,
-		  Bernhard and Schwander, Jakob and Stocker, Thomas F. and
-		  Chappellaz, Jérôme and Raynaud, Dominique and Barnola,
-		  Jean-Marc},
-  title		= {High-resolution Holocene N2O ice core record and its
-		  relationship with CH4and CO2},
-  year		= 2002,
-  volume	= 16,
-  number	= 1,
-  month		= {Feb},
-  pages		= {10–1–10–8},
-  issn		= {0886-6236},
-  doi		= {10.1029/2001gb001417},
-  url		= {http://dx.doi.org/10.1029/2001GB001417},
-  journal	= {Global Biogeochemical Cycles},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  haine_2006,
-  author	= {Haine, T. W. N.},
-  title		= {On tracer boundary conditions for geophysical reservoirs:
-		  How to find the boundary concentration from a mixed
-		  condition},
-  year		= 2006,
-  volume	= 111,
-  number	= {C5},
-  issn		= {0148-0227},
-  doi		= {10.1029/2005jc003215},
-  url		= {http://dx.doi.org/10.1029/2005JC003215},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Book{		  honjo_1996,
-  title		= {Fluxes of Particles to the Interior of the Open Oceans},
-  author	= {Honjo, S.},
-  url		= {https://books.google.fr/books?id=FwA6cgAACAAJ},
-  year		= {1996},
-  publisher	= {John Wiley \& Sons}
-}
-
-@Article{	  joos_1997,
-  author	= {Joos, Fortunat and Orr, James C. and Siegenthaler,
-		  Ulrich},
-  title		= {Ocean carbon transport in a box-diffusion versus a general
-		  circulation model},
-  year		= 1997,
-  volume	= 102,
-  number	= {C6},
-  month		= {Jun},
-  pages		= {12367–12388},
-  issn		= {0148-0227},
-  doi		= {10.1029/97jc00470},
-  url		= {http://dx.doi.org/10.1029/97JC00470},
-  journal	= {Journal of Geophysical Research: Oceans},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  key_2004,
-  author	= {Key, R. M. and Kozyr, A. and Sabine, C. L. and Lee, K. and
-		  Wanninkhof, R. and Bullister, J. L. and Feely, R. A. and
-		  Millero, F. J. and Mordy, C. and Peng, T.-H.},
-  title		= {A global ocean carbon climatology: Results from Global
-		  Data Analysis Project (GLODAP)},
-  year		= 2004,
-  volume	= 18,
-  number	= 4,
-  month		= {Dec},
-  pages		= {n/a–n/a},
-  issn		= {0886-6236},
-  doi		= {10.1029/2004gb002247},
-  url		= {http://dx.doi.org/10.1029/2004gb002247},
-  journal	= {Global Biogeochemical Cycles},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  kortzinger_2001,
-  author	= {Körtzinger, Arne and Hedges, John I. and Quay, Paul D.},
-  title		= {Redfield ratios revisited: Removing the biasing effect of
-		  anthropogenic CO2},
-  year		= 2001,
-  volume	= 46,
-  number	= 4,
-  month		= {Jun},
-  pages		= {964–970},
-  issn		= {0024-3590},
-  doi		= {10.4319/lo.2001.46.4.0964},
-  url		= {http://dx.doi.org/10.4319/lo.2001.46.4.0964},
-  journal	= {Limnology and Oceanography},
-  publisher	= {Wiley}
-}
-
-@Manual{	  nemo_manual,
-  author	= {Madec Gurvan and NEMO System Team},
-  title		= {NEMO ocean engine},
-  organization	= {NEMO Consortium},
-  journal	= {Notes du Pôle de modélisation de l\'Institut
-		  Pierre-Simon Laplace (IPSL)},
-  issn		= {1288-1619},
-  number	= {27},
-  publisher	= {Zenodo},
-  doi		= {10.5281/zenodo.1464816},
-  url		= {https://zenodo.org/record/1464816},
-  edition	= {TBD},
-  year		= {TBD}
-}
-
-@Article{	  meunier_2014,
-  author	= {Meunier, Cédric L. and Malzahn, Arne M. and Boersma,
-		  Maarten},
-  title		= {A New Approach to Homeostatic Regulation: Towards a
-		  Unified View of Physiological and Ecological Concepts},
-  year		= 2014,
-  editor	= {Munn, Adam J.Editor},
-  volume	= 9,
-  number	= 9,
-  month		= {Sep},
-  pages		= {e107737},
-  issn		= {1932-6203},
-  doi		= {10.1371/journal.pone.0107737},
-  url		= {http://dx.doi.org/10.1371/journal.pone.0107737},
-  journal	= {PLoS ONE},
-  publisher	= {Public Library of Science (PLoS)}
-}
-
-@Article{	  monnin_2001,
-  author	= {Monnin, E.},
-  title		= {Atmospheric CO2 Concentrations over the Last Glacial
-		  Termination},
-  year		= 2001,
-  volume	= 291,
-  number	= 5501,
-  month		= {Jan},
-  pages		= {112–114},
-  issn		= {1095-9203},
-  doi		= {10.1126/science.291.5501.112},
-  url		= {http://dx.doi.org/10.1126/science.291.5501.112},
-  journal	= {Science},
-  publisher	= {American Association for the Advancement of Science
-		  (AAAS)}
-}
-
-@Article{	  monnin_2004,
-  author	= {Monnin, Eric and Steig, Eric J and Siegenthaler, Urs and
-		  Kawamura, Kenji and Schwander, Jakob and Stauffer, Bernhard
-		  and Stocker, Thomas F and Morse, David L and Barnola,
-		  Jean-Marc and Bellier, Blandine and et al.},
-  title		= {Evidence for substantial accumulation rate variability in
-		  Antarctica during the Holocene, through synchronization of
-		  CO 2 in the Taylor Dome, Dome C and DML ice cores},
-  year		= 2004,
-  volume	= 224,
-  number	= {1-2},
-  month		= {Jul},
-  pages		= {45–54},
-  issn		= {0012-821X},
-  doi		= {10.1016/j.epsl.2004.05.007},
-  url		= {http://dx.doi.org/10.1016/j.epsl.2004.05.007},
-  journal	= {Earth and Planetary Science Letters},
-  publisher	= {Elsevier BV}
-}
-
-@Book{		  monod_1958,
-  title		= {Recherches sur la croissance des cultures
-		  bact{\'e}riennes},
-  author	= {Monod, J.},
-  lccn		= {nlm11031168},
-  series	= {Actualit{\'e}s scientifiques et industrielles},
-  url		= {https://books.google.fr/books?id=yhy6AAAAIAAJ},
-  year		= {1958},
-  publisher	= {Hermann}
-}
-
-@Article{	  mouchet_2013,
-  author	= {Mouchet, Anne},
-  title		= {The Ocean Bomb Radiocarbon Inventory Revisited},
-  year		= 2013,
-  volume	= 55,
-  number	= {3–4},
-  issn		= {0033-8222},
-  doi		= {10.2458/azu\_js\_rc.55.16402},
-  url		= {http://dx.doi.org/10.2458/azu\_js\_rc.55.16402},
-  journal	= {Radiocarbon},
-  publisher	= {Cambridge University Press (CUP)}
-}
-
-@Article{	  naegler_2009,
-  author	= {Naegler, Tobias},
-  title		= {Reconciliation of excess14C-constrained global CO2piston
-		  velocity estimates},
-  year		= 2009,
-  volume	= 61,
-  number	= 2,
-  month		= {Jan},
-  pages		= {372–384},
-  issn		= {1600-0889},
-  doi		= {10.1111/j.1600-0889.2008.00408.x},
-  url		= {http://dx.doi.org/10.1111/j.1600-0889.2008.00408.x},
-  journal	= {Tellus B: Chemical and Physical Meteorology},
-  publisher	= {Informa UK Limited}
-}
-
-@TechReport{	  orr_2000,
-  author	= {Orr, J. and Najjar, R. and Sabine, C. and Joos, F.},
-  title		= {Abiotic-HOWTO. Ocean-Carbon Cycle Model Intercomparison
-		  Project (OCMIP)},
-  url		= {http://ocmip5.ipsl.jussieu.fr/OCMIP/},
-  year		= {2000}
-}
-
-@Article{	  orr_2001,
-  author	= {Orr, James C. and Maier-Reimer, Ernst and Mikolajewicz,
-		  Uwe and Monfray, Patrick and Sarmiento, Jorge L. and
-		  Toggweiler, J. R. and Taylor, Nicholas K. and Palmer,
-		  Jonathan and Gruber, Nicolas and Sabine, Christopher L. and
-		  et al.},
-  title		= {Estimates of anthropogenic carbon uptake from four
-		  three-dimensional global ocean models},
-  year		= 2001,
-  volume	= 15,
-  number	= 1,
-  month		= {Mar},
-  pages		= {43–60},
-  issn		= {0886-6236},
-  doi		= {10.1029/2000gb001273},
-  url		= {http://dx.doi.org/10.1029/2000GB001273},
-  journal	= {Global Biogeochemical Cycles},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  orr_2017,
-  author	= {Orr, James C. and Najjar, Raymond G. and Aumont, Olivier
-		  and Bopp, Laurent and Bullister, John L. and Danabasoglu,
-		  Gokhan and Doney, Scott C. and Dunne, John P. and Dutay,
-		  Jean-Claude and Graven, Heather and et al.},
-  title		= {Biogeochemical protocols and diagnostics for the CMIP6
-		  Ocean Model Intercomparison Project (OMIP)},
-  year		= 2017,
-  volume	= 10,
-  number	= 6,
-  month		= {Jun},
-  pages		= {2169–2199},
-  issn		= {1991-9603},
-  doi		= {10.5194/gmd-10-2169-2017},
-  url		= {http://dx.doi.org/10.5194/gmd-10-2169-2017},
-  journal	= {Geoscientific Model Development},
-  publisher	= {Copernicus GmbH}
-}
-
-@Article{	  palmieri_2015,
-  author	= {Palmiéri, J. and Orr, J. C. and Dutay, J.-C. and
-		  Béranger, K. and Schneider, A. and Beuvier, J. and Somot,
-		  S.},
-  title		= {Simulated anthropogenic CO$_{2}$ storage
-		  and acidification of the Mediterranean Sea},
-  year		= 2015,
-  volume	= 12,
-  number	= 3,
-  month		= {Feb},
-  pages		= {781–802},
-  issn		= {1726-4189},
-  doi		= {10.5194/bg-12-781-2015},
-  url		= {http://dx.doi.org/10.5194/bg-12-781-2015},
-  journal	= {Biogeosciences},
-  publisher	= {Copernicus GmbH}
-}
-
-@Article{	  reimer_2013,
-  author	= {Reimer, Paula J and Bard, Edouard and Bayliss, Alex and
-		  Beck, J Warren and Blackwell, Paul G and Ramsey,
-		  Christopher Bronk and Buck, Caitlin E and Cheng, Hai and
-		  Edwards, R Lawrence and Friedrich, Michael and et al.},
-  title		= {IntCal13 and Marine13 Radiocarbon Age Calibration Curves
-		  0–50,000 Years cal BP},
-  year		= 2013,
-  volume	= 55,
-  number	= 4,
-  pages		= {1869–1887},
-  issn		= {1945-5755},
-  doi		= {10.2458/azu\_js\_rc.55.16947},
-  url		= {http://dx.doi.org/10.2458/azu\_js\_rc.55.16947},
-  journal	= {Radiocarbon},
-  publisher	= {Cambridge University Press (CUP)}
-}
-
-@Article{	  sterner_2003,
-  author	= {Sterner, Robert W. and Elser, James J.},
-  title		= {Ecological Stoichiometry},
-  year		= 2003,
-  month		= {Dec},
-  doi		= {10.1515/9781400885695},
-  url		= {http://dx.doi.org/10.1515/9781400885695},
-  isbn		= 9781400885695,
-  publisher	= {Princeton University Press}
-}
-
-@Article{	  stuiver_1977,
-  author	= {Stuiver, Minze and Polach, Henry A},
-  title		= {Discussion Reporting of 14C Data},
-  year		= 1977,
-  volume	= 19,
-  number	= 03,
-  pages		= {355–363},
-  issn		= {1945-5755},
-  doi		= {10.1017/s0033822200003672},
-  url		= {http://dx.doi.org/10.1017/s0033822200003672},
-  journal	= {Radiocarbon},
-  publisher	= {Cambridge University Press (CUP)}
-}
-
-@Article{	  takahashi_1985,
-  author	= {Takahashi, Taro and Broecker, Wallace S. and Langer,
-		  Sara},
-  title		= {Redfield ratio based on chemical data from isopycnal
-		  surfaces},
-  year		= 1985,
-  volume	= 90,
-  number	= {C4},
-  pages		= 6907,
-  issn		= {0148-0227},
-  doi		= {10.1029/jc090ic04p06907},
-  url		= {http://dx.doi.org/10.1029/jc090ic04p06907},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  toggweiler_1989a,
-  author	= {Toggweiler, J. R. and Dixon, K. and Bryan, K.},
-  title		= {Simulations of radiocarbon in a coarse-resolution world
-		  ocean model: 1. Steady state prebomb distributions},
-  year		= 1989,
-  volume	= 94,
-  number	= {C6},
-  pages		= 8217,
-  issn		= {0148-0227},
-  doi		= {10.1029/jc094ic06p08217},
-  url		= {http://dx.doi.org/10.1029/JC094iC06p08217},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  toggweiler_1989b,
-  author	= {Toggweiler, J. R. and Dixon, K. and Bryan, K.},
-  title		= {Simulations of radiocarbon in a coarse-resolution world
-		  ocean model: 2. Distributions of bomb-produced carbon 14},
-  year		= 1989,
-  volume	= 94,
-  number	= {C6},
-  pages		= 8243,
-  issn		= {0148-0227},
-  doi		= {10.1029/jc094ic06p08243},
-  url		= {http://dx.doi.org/10.1029/JC094iC06p08243},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  wanninkhof_1992,
-  author	= {Wanninkhof, Rik},
-  title		= {Relationship between wind speed and gas exchange over the
-		  ocean},
-  year		= 1992,
-  volume	= 97,
-  number	= {C5},
-  pages		= 7373,
-  issn		= {0148-0227},
-  doi		= {10.1029/92jc00188},
-  url		= {http://dx.doi.org/10.1029/92jc00188},
-  journal	= {Journal of Geophysical Research},
-  publisher	= {American Geophysical Union (AGU)}
-}
-
-@Article{	  wanninkhof_1996,
-  author	= {Wanninkhof, Rik and Knox, Molly},
-  title		= {Chemical enhancement of CO2exchange in natural waters},
-  year		= 1996,
-  volume	= 41,
-  number	= 4,
-  month		= {Jun},
-  pages		= {689–697},
-  issn		= {0024-3590},
-  doi		= {10.4319/lo.1996.41.4.0689},
-  url		= {http://dx.doi.org/10.4319/lo.1996.41.4.0689},
-  journal	= {Limnology and Oceanography},
-  publisher	= {Wiley}
-}
-
-@Article{	  wanninkhof_2014,
-  author	= {Wanninkhof, Rik},
-  title		= {Relationship between wind speed and gas exchange over the
-		  ocean revisited},
-  year		= 2014,
-  volume	= 12,
-  number	= 6,
-  month		= {Jun},
-  pages		= {351–362},
-  issn		= {1541-5856},
-  doi		= {10.4319/lom.2014.12.351},
-  url		= {http://dx.doi.org/10.4319/lom.2014.12.351},
-  journal	= {Limnology and Oceanography: Methods},
-  publisher	= {Wiley}
-}
-
-@Article{	  warner_1985,
-  author	= {Warner, M.J. and Weiss, R.F.},
-  title		= {Solubilities of chlorofluorocarbons 11 and 12 in water and
-		  seawater},
-  year		= 1985,
-  volume	= 32,
-  number	= 12,
-  month		= {Dec},
-  pages		= {1485–1497},
-  issn		= {0198-0149},
-  doi		= {10.1016/0198-0149(85)90099-8},
-  url		= {http://dx.doi.org/10.1016/0198-0149(85)90099-8},
-  journal	= {Deep Sea Research Part A. Oceanographic Research Papers},
-  publisher	= {Elsevier BV}
-}
-
-@Article{	  weiss_1974,
-  author	= {Weiss, R.F.},
-  title		= {Carbon dioxide in water and seawater: the solubility of a
-		  non-ideal gas},
-  year		= 1974,
-  volume	= 2,
-  number	= 3,
-  month		= {Nov},
-  pages		= {203–215},
-  issn		= {0304-4203},
-  doi		= {10.1016/0304-4203(74)90015-2},
-  url		= {http://dx.doi.org/10.1016/0304-4203(74)90015-2},
-  journal	= {Marine Chemistry},
-  publisher	= {Elsevier BV}
-}
-
-@Article{	  woods_2013,
-  author	= {Woods, H. Arthur and Wilson, J. Keaton},
-  title		= {An information hypothesis for the evolution of
-		  homeostasis},
-  year		= 2013,
-  volume	= 28,
-  number	= 5,
-  month		= {May},
-  pages		= {283–289},
-  issn		= {0169-5347},
-  doi		= {10.1016/j.tree.2012.10.021},
-  url		= {http://dx.doi.org/10.1016/j.tree.2012.10.021},
-  journal	= {Trends in Ecology \& Evolution},
-  publisher	= {Elsevier BV}
-}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/TOP_manual.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/TOP_manual.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/TOP_manual.tex	(revision 11831)
@@ -1,102 +1,1 @@
-%% ==============================================================================
-%% TOP Reference Manual
-%% ==============================================================================
-
-
-%% Preamble
-%% ==============================================================================
-
-%% Document layout
-\documentclass{book}
-
-%% Custom style (.sty)
-\usepackage{../../NEMO/main/NEMO_manual}
-\hypersetup{
-  pdftitle={TOP – Tracers in Ocean Paradigm – The NEMO Tracers engine},
-  pdfauthor={NEMO TOP Working Group},
-  colorlinks
-}
-
-%% Include references and index for single subfile compilation
-\newcommand{\biblio}{\bibliography{../main/TOP_manual}}
-\newcommand{\pindex}{\printindex}
-
-\makeindex
-
-%% End of common preamble between main and sub-files
-\begin{document}
-
-%% Override custom cmds for full manual compilation
-\renewcommand{\biblio}{}
-\renewcommand{\pindex}{}
-
-
-%% Frontmatter
-%% ==============================================================================
-
-\graphicspath{{../../figures/logos/}}
-
-%% Frontpage
-\title{
-  \includegraphics[height=0.05\textheight]{CMCC}\hfill
-  \includegraphics[height=0.05\textheight]{CNRS}\hfill
-  \includegraphics[height=0.05\textheight]{MOI} \hfill
-  \includegraphics[height=0.05\textheight]{UKMO}\hfill
-  \includegraphics[height=0.05\textheight]{NERC}       \\
-  {\Huge TOP \\}
-  {\Large Tracer in Ocean Paradigm -- The NEMO Passive Tracer engine}\\
-  \small \textcolor{red}{First draft documentation. Needs completion and rewriting}. \\
-}
-\author{The NEMO-TOP Group
-  \thanks{
-    Eth\'{e} Christian, Lovato Thomas, Aumont Olivier, Palmi\'{e}ri Julien,
-    Mouchet Anne, Nurser Georges, Yool Andrew
-  }\\
-  \textit{Issue 27, Notes du P\^{o}le de mod\'{e}lisation} \\
-  \textit{Institut Pierre-Simon Laplace (IPSL)}            \\
-  \textit{ISSN 1288-1619}
-}
-\date{\today}
-
-\maketitle
-\frontmatter
-
-%% ToC i.e. Table of Contents
-
-\dominitoc
-\tableofcontents
-
-
-%% Mainmatter
-%% ==============================================================================
-
-\mainmatter
-
-\graphicspath{{../../figures/TOP/}}
-
-\subfile{../subfiles/introduction}
-\subfile{../subfiles/model_description}
-\subfile{../subfiles/model_setup}
-\subfile{../subfiles/miscellaneous}
-
-%% Appendix
-
-%\appendix
-%% Backmatter
-%% ==============================================================================
-
-\backmatter
-
-%% Bibliography
-\cleardoublepage
-\phantomsection
-\addcontentsline{toc}{chapter}{Bibliography}
-\bibliography{../main/TOP_manual}
-
-%% Index
-\cleardoublepage
-\phantomsection
-\addcontentsline{toc}{chapter}{Index}
-\printindex
-
-\end{document}
+link ../../global/document.tex
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/abstract.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/abstract.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/abstract.tex	(revision 11831)
@@ -0,0 +1,26 @@
+%% ================================================================
+%% Abstract
+%% ================================================================
+
+%% Common part between NEMO-SI3-TOP
+``Tracers in Ocean Paradigm'' (\TOP) is the passive tracers engine of
+the \NEMO\ ocean model (``Nucleus for European Modelling of the Ocean'').
+It is intended to be a flexible tool for studying the on/offline oceanic tracers transport and
+the biogeochemical processes (``green ocean''),
+as well as its interactions with the other components of the Earth climate system over
+a wide range of space and time scales.
+\TOP\ is interfaced with the \NEMO\ ocean engine, and,
+via the \href{http://portal.enes.org/oasis}{OASIS} coupler,
+with several atmospheric general circulation models.
+%It also supports two-way grid embedding by means of the \href{http://agrif.imag.fr}{AGRIF} software.
+
+%% Specific part
+This component provides the physical constraints and boundaries conditions for
+oceanic tracers transport and represents a generalized, hardwired interface toward
+biogeochemical models to enable a seamless coupling.
+In particular, transport dynamics are supplied by the ocean dynamical core thus
+enabling the use of all available advection and diffusion schemes in both on- and off-line modes.
+\TOP\ is designed to handle multiple oceanic tracers through a modular approach and
+it includes different sub-modules: ocean water age, inorganic carbon (CFCs) \& radiocarbon (C14b),
+built-in biogeochemical model (PISCES), and prototype for user-defined cases or
+coupling with alternative biogeochemical models (\eg \href{http://www.bfm-community.eu}{BFM}).
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/authors.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/authors.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/authors.tex	(revision 11831)
@@ -0,0 +1,7 @@
+Olivier Aumont         \\
+Christian \'{E}th\'{e} \\
+Tomas Lovato           \\
+Anne Mouchet           \\
+Georges Nurser         \\
+Julien Palmi\'{e}ri    \\
+Andrew Yool
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/bibliography.bib
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/bibliography.bib	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/bibliography.bib	(revision 11831)
@@ -0,0 +1,619 @@
+
+@Article{	  ahn_2007,
+  author	= {Ahn, Jinho and Brook, Edward J.},
+  title		= {Atmospheric CO2and climate from 65 to 30 ka B.P.},
+  year		= 2007,
+  volume	= 34,
+  number	= 10,
+  month		= {May},
+  issn		= {0094-8276},
+  doi		= {10.1029/2007gl029551},
+  url		= {http://dx.doi.org/10.1029/2007GL029551},
+  journal	= {Geophysical Research Letters},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  ahn_2008,
+  author	= {Ahn, J. and Brook, E. J.},
+  title		= {Atmospheric CO2 and Climate on Millennial Time Scales
+		  During the Last Glacial Period},
+  year		= 2008,
+  volume	= 322,
+  number	= 5898,
+  month		= {Oct},
+  pages		= {83–85},
+  issn		= {1095-9203},
+  doi		= {10.1126/science.1160832},
+  url		= {http://dx.doi.org/10.1126/science.1160832},
+  journal	= {Science},
+  publisher	= {American Association for the Advancement of Science
+		  (AAAS)}
+}
+
+@Article{	  armstrong_2001,
+  author	= {Armstrong, Robert A. and Lee, Cindy and Hedges, John I.
+		  and Honjo, Susumu and Wakeham, Stuart G.},
+  title		= {A new, mechanistic model for organic carbon fluxes in the
+		  ocean based on the quantitative association of POC with
+		  ballast minerals},
+  year		= 2001,
+  volume	= 49,
+  number	= {1-3},
+  month		= {Jan},
+  pages		= {219–236},
+  issn		= {0967-0645},
+  doi		= {10.1016/s0967-0645(01)00101-1},
+  url		= {http://dx.doi.org/10.1016/S0967-0645(01)00101-1},
+  journal	= {Deep Sea Research Part II: Topical Studies in
+		  Oceanography},
+  publisher	= {Elsevier BV}
+}
+
+@Article{	  aumont_2015,
+  author	= {Aumont, O. and Ethé, C. and Tagliabue, A. and Bopp, L.
+		  and Gehlen, M.},
+  title		= {PISCES-v2: an ocean biogeochemical model for carbon and
+		  ecosystem studies},
+  year		= 2015,
+  volume	= 8,
+  number	= 8,
+  month		= {Aug},
+  pages		= {2465–2513},
+  issn		= {1991-9603},
+  doi		= {10.5194/gmd-8-2465-2015},
+  url		= {http://dx.doi.org/10.5194/gmd-8-2465-2015},
+  journal	= {Geoscientific Model Development},
+  publisher	= {Copernicus GmbH}
+}
+
+@Article{	  bacastow_1990,
+  author	= {Bacastow, R and Maier-Reimer, E},
+  title		= {Ocean-circulation model of the carbon cycle},
+  year		= 1990,
+  volume	= 4,
+  number	= 2,
+  month		= {Apr},
+  pages		= {95–125},
+  issn		= {1432-0894},
+  doi		= {10.1007/bf00208905},
+  url		= {http://dx.doi.org/10.1007/bf00208905},
+  journal	= {Climate Dynamics},
+  publisher	= {Springer Nature}
+}
+
+@Misc{		  bullister_2017,
+  author	= {Bullister, J.L.},
+  title		= {Atmospheric Histories (1765-2015) for CFC-11, CFC-12,
+		  CFC-113, CCl4, SF6 and N2O (NCEI Accession 0164584)},
+  year		= 2017,
+  doi		= {10.3334/cdiac/otg.cfc\_atm\_hist\_2015},
+  url		= {https://accession.nodc.noaa.gov/0164584},
+  publisher	= {NOAA National Centers for Environmental Information}
+}
+
+@Article{	  butzin_2005,
+  author	= {BUTZIN, M and PRANGE, M and LOHMANN, G},
+  title		= {Radiocarbon simulations for the glacial ocean: The effects
+		  of wind stress, Southern Ocean sea ice and Heinrich
+		  events},
+  year		= 2005,
+  volume	= 235,
+  number	= {1-2},
+  month		= {Jun},
+  pages		= {45–61},
+  issn		= {0012-821X},
+  doi		= {10.1016/j.epsl.2005.03.003},
+  url		= {http://dx.doi.org/10.1016/j.epsl.2005.03.003},
+  journal	= {Earth and Planetary Science Letters},
+  publisher	= {Elsevier BV}
+}
+
+@Article{	  danabasoglu_2014,
+  author	= {Danabasoglu, Gokhan and Yeager, Steve G. and Bailey, David
+		  and Behrens, Erik and Bentsen, Mats and Bi, Daohua and
+		  Biastoch, Arne and Böning, Claus and Bozec, Alexandra and
+		  Canuto, Vittorio M. and et al.},
+  title		= {North Atlantic simulations in Coordinated Ocean-ice
+		  Reference Experiments phase II (CORE-II). Part I: Mean
+		  states},
+  year		= 2014,
+  volume	= 73,
+  month		= {Jan},
+  pages		= {76–107},
+  issn		= {1463-5003},
+  doi		= {10.1016/j.ocemod.2013.10.005},
+  url		= {http://dx.doi.org/10.1016/j.ocemod.2013.10.005},
+  journal	= {Ocean Modelling},
+  publisher	= {Elsevier BV}
+}
+
+@Article{	  dutay_2002,
+  author	= {Dutay, J.-C and Bullister, J.L and Doney, S.C and Orr, J.C
+		  and Najjar, R and Caldeira, K and Campin, J.-M and Drange,
+		  H and Follows, M and Gao, Y and et al.},
+  title		= {Evaluation of ocean model ventilation with CFC-11:
+		  comparison of 13 global ocean models},
+  year		= 2002,
+  volume	= 4,
+  number	= 2,
+  month		= {Jan},
+  pages		= {89–120},
+  issn		= {1463-5003},
+  doi		= {10.1016/s1463-5003(01)00013-0},
+  url		= {http://dx.doi.org/10.1016/S1463-5003(01)00013-0},
+  journal	= {Ocean Modelling},
+  publisher	= {Elsevier BV}
+}
+
+@Article{	  enting_1994,
+  author	= {G Enting, I and M L Wigley, T and Heimann, Martin},
+  year		= {1994},
+  month		= {01},
+  pages		= {},
+  title		= {Future Emissions and Concentrations of Carbon Dioxide: Key
+		  Ocean/Atmosphere/Land Analyses},
+  volume	= {31},
+  journal	= {CSIRO Division Atmospheric Research Technical Paper}
+}
+
+@Article{	  fiadeiro_1982,
+  author	= {Fiadeiro, M.E.},
+  year		= {1982},
+  month		= {01},
+  pages		= {537-550},
+  title		= {Three-dimensional modeling of tracers in the deep Pacific
+		  Ocean II. Radiocarbon and the circulation},
+  volume	= {40},
+  journal	= {J. Mar. Res.}
+}
+
+@Article{	  fluckiger_2002,
+  author	= {Flückiger, Jacqueline and Monnin, Eric and Stauffer,
+		  Bernhard and Schwander, Jakob and Stocker, Thomas F. and
+		  Chappellaz, Jérôme and Raynaud, Dominique and Barnola,
+		  Jean-Marc},
+  title		= {High-resolution Holocene N2O ice core record and its
+		  relationship with CH4and CO2},
+  year		= 2002,
+  volume	= 16,
+  number	= 1,
+  month		= {Feb},
+  pages		= {10–1–10–8},
+  issn		= {0886-6236},
+  doi		= {10.1029/2001gb001417},
+  url		= {http://dx.doi.org/10.1029/2001GB001417},
+  journal	= {Global Biogeochemical Cycles},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  haine_2006,
+  author	= {Haine, T. W. N.},
+  title		= {On tracer boundary conditions for geophysical reservoirs:
+		  How to find the boundary concentration from a mixed
+		  condition},
+  year		= 2006,
+  volume	= 111,
+  number	= {C5},
+  issn		= {0148-0227},
+  doi		= {10.1029/2005jc003215},
+  url		= {http://dx.doi.org/10.1029/2005JC003215},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Book{		  honjo_1996,
+  title		= {Fluxes of Particles to the Interior of the Open Oceans},
+  author	= {Honjo, S.},
+  url		= {https://books.google.fr/books?id=FwA6cgAACAAJ},
+  year		= {1996},
+  publisher	= {John Wiley \& Sons}
+}
+
+@Article{	  joos_1997,
+  author	= {Joos, Fortunat and Orr, James C. and Siegenthaler,
+		  Ulrich},
+  title		= {Ocean carbon transport in a box-diffusion versus a general
+		  circulation model},
+  year		= 1997,
+  volume	= 102,
+  number	= {C6},
+  month		= {Jun},
+  pages		= {12367–12388},
+  issn		= {0148-0227},
+  doi		= {10.1029/97jc00470},
+  url		= {http://dx.doi.org/10.1029/97JC00470},
+  journal	= {Journal of Geophysical Research: Oceans},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  key_2004,
+  author	= {Key, R. M. and Kozyr, A. and Sabine, C. L. and Lee, K. and
+		  Wanninkhof, R. and Bullister, J. L. and Feely, R. A. and
+		  Millero, F. J. and Mordy, C. and Peng, T.-H.},
+  title		= {A global ocean carbon climatology: Results from Global
+		  Data Analysis Project (GLODAP)},
+  year		= 2004,
+  volume	= 18,
+  number	= 4,
+  month		= {Dec},
+  pages		= {n/a–n/a},
+  issn		= {0886-6236},
+  doi		= {10.1029/2004gb002247},
+  url		= {http://dx.doi.org/10.1029/2004gb002247},
+  journal	= {Global Biogeochemical Cycles},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  kortzinger_2001,
+  author	= {Körtzinger, Arne and Hedges, John I. and Quay, Paul D.},
+  title		= {Redfield ratios revisited: Removing the biasing effect of
+		  anthropogenic CO2},
+  year		= 2001,
+  volume	= 46,
+  number	= 4,
+  month		= {Jun},
+  pages		= {964–970},
+  issn		= {0024-3590},
+  doi		= {10.4319/lo.2001.46.4.0964},
+  url		= {http://dx.doi.org/10.4319/lo.2001.46.4.0964},
+  journal	= {Limnology and Oceanography},
+  publisher	= {Wiley}
+}
+
+@Manual{	  nemo_manual,
+  author	= {Madec Gurvan and NEMO System Team},
+  title		= {NEMO ocean engine},
+  organization	= {NEMO Consortium},
+  journal	= {Notes du Pôle de modélisation de l\'Institut
+		  Pierre-Simon Laplace (IPSL)},
+  issn		= {1288-1619},
+  number	= {27},
+  publisher	= {Zenodo},
+  doi		= {10.5281/zenodo.1464816},
+  url		= {https://zenodo.org/record/1464816},
+  edition	= {TBD},
+  year		= {TBD}
+}
+
+@Article{	  meunier_2014,
+  author	= {Meunier, Cédric L. and Malzahn, Arne M. and Boersma,
+		  Maarten},
+  title		= {A New Approach to Homeostatic Regulation: Towards a
+		  Unified View of Physiological and Ecological Concepts},
+  year		= 2014,
+  editor	= {Munn, Adam J.Editor},
+  volume	= 9,
+  number	= 9,
+  month		= {Sep},
+  pages		= {e107737},
+  issn		= {1932-6203},
+  doi		= {10.1371/journal.pone.0107737},
+  url		= {http://dx.doi.org/10.1371/journal.pone.0107737},
+  journal	= {PLoS ONE},
+  publisher	= {Public Library of Science (PLoS)}
+}
+
+@Article{	  monnin_2001,
+  author	= {Monnin, E.},
+  title		= {Atmospheric CO2 Concentrations over the Last Glacial
+		  Termination},
+  year		= 2001,
+  volume	= 291,
+  number	= 5501,
+  month		= {Jan},
+  pages		= {112–114},
+  issn		= {1095-9203},
+  doi		= {10.1126/science.291.5501.112},
+  url		= {http://dx.doi.org/10.1126/science.291.5501.112},
+  journal	= {Science},
+  publisher	= {American Association for the Advancement of Science
+		  (AAAS)}
+}
+
+@Article{	  monnin_2004,
+  author	= {Monnin, Eric and Steig, Eric J and Siegenthaler, Urs and
+		  Kawamura, Kenji and Schwander, Jakob and Stauffer, Bernhard
+		  and Stocker, Thomas F and Morse, David L and Barnola,
+		  Jean-Marc and Bellier, Blandine and et al.},
+  title		= {Evidence for substantial accumulation rate variability in
+		  Antarctica during the Holocene, through synchronization of
+		  CO 2 in the Taylor Dome, Dome C and DML ice cores},
+  year		= 2004,
+  volume	= 224,
+  number	= {1-2},
+  month		= {Jul},
+  pages		= {45–54},
+  issn		= {0012-821X},
+  doi		= {10.1016/j.epsl.2004.05.007},
+  url		= {http://dx.doi.org/10.1016/j.epsl.2004.05.007},
+  journal	= {Earth and Planetary Science Letters},
+  publisher	= {Elsevier BV}
+}
+
+@Book{		  monod_1958,
+  title		= {Recherches sur la croissance des cultures
+		  bact{\'e}riennes},
+  author	= {Monod, J.},
+  lccn		= {nlm11031168},
+  series	= {Actualit{\'e}s scientifiques et industrielles},
+  url		= {https://books.google.fr/books?id=yhy6AAAAIAAJ},
+  year		= {1958},
+  publisher	= {Hermann}
+}
+
+@Article{	  mouchet_2013,
+  author	= {Mouchet, Anne},
+  title		= {The Ocean Bomb Radiocarbon Inventory Revisited},
+  year		= 2013,
+  volume	= 55,
+  number	= {3–4},
+  issn		= {0033-8222},
+  doi		= {10.2458/azu\_js\_rc.55.16402},
+  url		= {http://dx.doi.org/10.2458/azu\_js\_rc.55.16402},
+  journal	= {Radiocarbon},
+  publisher	= {Cambridge University Press (CUP)}
+}
+
+@Article{	  naegler_2009,
+  author	= {Naegler, Tobias},
+  title		= {Reconciliation of excess14C-constrained global CO2piston
+		  velocity estimates},
+  year		= 2009,
+  volume	= 61,
+  number	= 2,
+  month		= {Jan},
+  pages		= {372–384},
+  issn		= {1600-0889},
+  doi		= {10.1111/j.1600-0889.2008.00408.x},
+  url		= {http://dx.doi.org/10.1111/j.1600-0889.2008.00408.x},
+  journal	= {Tellus B: Chemical and Physical Meteorology},
+  publisher	= {Informa UK Limited}
+}
+
+@TechReport{	  orr_2000,
+  author	= {Orr, J. and Najjar, R. and Sabine, C. and Joos, F.},
+  title		= {Abiotic-HOWTO. Ocean-Carbon Cycle Model Intercomparison
+		  Project (OCMIP)},
+  url		= {http://ocmip5.ipsl.jussieu.fr/OCMIP/},
+  year		= {2000}
+}
+
+@Article{	  orr_2001,
+  author	= {Orr, James C. and Maier-Reimer, Ernst and Mikolajewicz,
+		  Uwe and Monfray, Patrick and Sarmiento, Jorge L. and
+		  Toggweiler, J. R. and Taylor, Nicholas K. and Palmer,
+		  Jonathan and Gruber, Nicolas and Sabine, Christopher L. and
+		  et al.},
+  title		= {Estimates of anthropogenic carbon uptake from four
+		  three-dimensional global ocean models},
+  year		= 2001,
+  volume	= 15,
+  number	= 1,
+  month		= {Mar},
+  pages		= {43–60},
+  issn		= {0886-6236},
+  doi		= {10.1029/2000gb001273},
+  url		= {http://dx.doi.org/10.1029/2000GB001273},
+  journal	= {Global Biogeochemical Cycles},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  orr_2017,
+  author	= {Orr, James C. and Najjar, Raymond G. and Aumont, Olivier
+		  and Bopp, Laurent and Bullister, John L. and Danabasoglu,
+		  Gokhan and Doney, Scott C. and Dunne, John P. and Dutay,
+		  Jean-Claude and Graven, Heather and et al.},
+  title		= {Biogeochemical protocols and diagnostics for the CMIP6
+		  Ocean Model Intercomparison Project (OMIP)},
+  year		= 2017,
+  volume	= 10,
+  number	= 6,
+  month		= {Jun},
+  pages		= {2169–2199},
+  issn		= {1991-9603},
+  doi		= {10.5194/gmd-10-2169-2017},
+  url		= {http://dx.doi.org/10.5194/gmd-10-2169-2017},
+  journal	= {Geoscientific Model Development},
+  publisher	= {Copernicus GmbH}
+}
+
+@Article{	  palmieri_2015,
+  author	= {Palmiéri, J. and Orr, J. C. and Dutay, J.-C. and
+		  Béranger, K. and Schneider, A. and Beuvier, J. and Somot,
+		  S.},
+  title		= {Simulated anthropogenic CO$_{2}$ storage
+		  and acidification of the Mediterranean Sea},
+  year		= 2015,
+  volume	= 12,
+  number	= 3,
+  month		= {Feb},
+  pages		= {781–802},
+  issn		= {1726-4189},
+  doi		= {10.5194/bg-12-781-2015},
+  url		= {http://dx.doi.org/10.5194/bg-12-781-2015},
+  journal	= {Biogeosciences},
+  publisher	= {Copernicus GmbH}
+}
+
+@Article{	  reimer_2013,
+  author	= {Reimer, Paula J and Bard, Edouard and Bayliss, Alex and
+		  Beck, J Warren and Blackwell, Paul G and Ramsey,
+		  Christopher Bronk and Buck, Caitlin E and Cheng, Hai and
+		  Edwards, R Lawrence and Friedrich, Michael and et al.},
+  title		= {IntCal13 and Marine13 Radiocarbon Age Calibration Curves
+		  0–50,000 Years cal BP},
+  year		= 2013,
+  volume	= 55,
+  number	= 4,
+  pages		= {1869–1887},
+  issn		= {1945-5755},
+  doi		= {10.2458/azu\_js\_rc.55.16947},
+  url		= {http://dx.doi.org/10.2458/azu\_js\_rc.55.16947},
+  journal	= {Radiocarbon},
+  publisher	= {Cambridge University Press (CUP)}
+}
+
+@Article{	  sterner_2003,
+  author	= {Sterner, Robert W. and Elser, James J.},
+  title		= {Ecological Stoichiometry},
+  year		= 2003,
+  month		= {Dec},
+  doi		= {10.1515/9781400885695},
+  url		= {http://dx.doi.org/10.1515/9781400885695},
+  isbn		= 9781400885695,
+  publisher	= {Princeton University Press}
+}
+
+@Article{	  stuiver_1977,
+  author	= {Stuiver, Minze and Polach, Henry A},
+  title		= {Discussion Reporting of 14C Data},
+  year		= 1977,
+  volume	= 19,
+  number	= 03,
+  pages		= {355–363},
+  issn		= {1945-5755},
+  doi		= {10.1017/s0033822200003672},
+  url		= {http://dx.doi.org/10.1017/s0033822200003672},
+  journal	= {Radiocarbon},
+  publisher	= {Cambridge University Press (CUP)}
+}
+
+@Article{	  takahashi_1985,
+  author	= {Takahashi, Taro and Broecker, Wallace S. and Langer,
+		  Sara},
+  title		= {Redfield ratio based on chemical data from isopycnal
+		  surfaces},
+  year		= 1985,
+  volume	= 90,
+  number	= {C4},
+  pages		= 6907,
+  issn		= {0148-0227},
+  doi		= {10.1029/jc090ic04p06907},
+  url		= {http://dx.doi.org/10.1029/jc090ic04p06907},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  toggweiler_1989a,
+  author	= {Toggweiler, J. R. and Dixon, K. and Bryan, K.},
+  title		= {Simulations of radiocarbon in a coarse-resolution world
+		  ocean model: 1. Steady state prebomb distributions},
+  year		= 1989,
+  volume	= 94,
+  number	= {C6},
+  pages		= 8217,
+  issn		= {0148-0227},
+  doi		= {10.1029/jc094ic06p08217},
+  url		= {http://dx.doi.org/10.1029/JC094iC06p08217},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  toggweiler_1989b,
+  author	= {Toggweiler, J. R. and Dixon, K. and Bryan, K.},
+  title		= {Simulations of radiocarbon in a coarse-resolution world
+		  ocean model: 2. Distributions of bomb-produced carbon 14},
+  year		= 1989,
+  volume	= 94,
+  number	= {C6},
+  pages		= 8243,
+  issn		= {0148-0227},
+  doi		= {10.1029/jc094ic06p08243},
+  url		= {http://dx.doi.org/10.1029/JC094iC06p08243},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  wanninkhof_1992,
+  author	= {Wanninkhof, Rik},
+  title		= {Relationship between wind speed and gas exchange over the
+		  ocean},
+  year		= 1992,
+  volume	= 97,
+  number	= {C5},
+  pages		= 7373,
+  issn		= {0148-0227},
+  doi		= {10.1029/92jc00188},
+  url		= {http://dx.doi.org/10.1029/92jc00188},
+  journal	= {Journal of Geophysical Research},
+  publisher	= {American Geophysical Union (AGU)}
+}
+
+@Article{	  wanninkhof_1996,
+  author	= {Wanninkhof, Rik and Knox, Molly},
+  title		= {Chemical enhancement of CO2exchange in natural waters},
+  year		= 1996,
+  volume	= 41,
+  number	= 4,
+  month		= {Jun},
+  pages		= {689–697},
+  issn		= {0024-3590},
+  doi		= {10.4319/lo.1996.41.4.0689},
+  url		= {http://dx.doi.org/10.4319/lo.1996.41.4.0689},
+  journal	= {Limnology and Oceanography},
+  publisher	= {Wiley}
+}
+
+@Article{	  wanninkhof_2014,
+  author	= {Wanninkhof, Rik},
+  title		= {Relationship between wind speed and gas exchange over the
+		  ocean revisited},
+  year		= 2014,
+  volume	= 12,
+  number	= 6,
+  month		= {Jun},
+  pages		= {351–362},
+  issn		= {1541-5856},
+  doi		= {10.4319/lom.2014.12.351},
+  url		= {http://dx.doi.org/10.4319/lom.2014.12.351},
+  journal	= {Limnology and Oceanography: Methods},
+  publisher	= {Wiley}
+}
+
+@Article{	  warner_1985,
+  author	= {Warner, M.J. and Weiss, R.F.},
+  title		= {Solubilities of chlorofluorocarbons 11 and 12 in water and
+		  seawater},
+  year		= 1985,
+  volume	= 32,
+  number	= 12,
+  month		= {Dec},
+  pages		= {1485–1497},
+  issn		= {0198-0149},
+  doi		= {10.1016/0198-0149(85)90099-8},
+  url		= {http://dx.doi.org/10.1016/0198-0149(85)90099-8},
+  journal	= {Deep Sea Research Part A. Oceanographic Research Papers},
+  publisher	= {Elsevier BV}
+}
+
+@Article{	  weiss_1974,
+  author	= {Weiss, R.F.},
+  title		= {Carbon dioxide in water and seawater: the solubility of a
+		  non-ideal gas},
+  year		= 1974,
+  volume	= 2,
+  number	= 3,
+  month		= {Nov},
+  pages		= {203–215},
+  issn		= {0304-4203},
+  doi		= {10.1016/0304-4203(74)90015-2},
+  url		= {http://dx.doi.org/10.1016/0304-4203(74)90015-2},
+  journal	= {Marine Chemistry},
+  publisher	= {Elsevier BV}
+}
+
+@Article{	  woods_2013,
+  author	= {Woods, H. Arthur and Wilson, J. Keaton},
+  title		= {An information hypothesis for the evolution of
+		  homeostasis},
+  year		= 2013,
+  volume	= 28,
+  number	= 5,
+  month		= {May},
+  pages		= {283–289},
+  issn		= {0169-5347},
+  doi		= {10.1016/j.tree.2012.10.021},
+  url		= {http://dx.doi.org/10.1016/j.tree.2012.10.021},
+  journal	= {Trends in Ecology \& Evolution},
+  publisher	= {Elsevier BV}
+}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/blocks.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/blocks.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/blocks.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/blocks.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/byrd-co2-2008.txt
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/byrd-co2-2008.txt	(revision 11086)
+++ 	(revision )
@@ -1,273 +1,0 @@
-Byrd Ice Core CO2 Data for 20-90 KYrBP
------------------------------------------------------------------------
-               World Data Center for Paleoclimatology, Boulder
-                                  and
-                     NOAA Paleoclimatology Program
------------------------------------------------------------------------
-NOTE: PLEASE CITE ORIGINAL REFERENCE WHEN USING THIS DATA!!!!!
-
-
-NAME OF DATA SET: Byrd Ice Core CO2 Data for 20-90 KYrBP
-
-LAST UPDATE: 10/2008 (Original receipt by WDC Paleo)
-CONTRIBUTORS: Jinho Ahn and Edward J. Brook
-IGBP PAGES/WDCA CONTRIBUTION SERIES NUMBER: 2008-095
-
-WDC PALEO CONTRIBUTION SERIES CITATION: 
-Ahn, J. and E.J. Brook. 2008.
-Byrd Ice Core CO2 Data for 20-90 KYrBP. 
-IGBP PAGES/World Data Center for Paleoclimatology 
-Data Contribution Series # 2008-095. 
-NOAA/NCDC Paleoclimatology Program, Boulder CO, USA.
-
-
-ORIGINAL REFERENCES: 
-References for CO2 data: 
- 
-Ahn, J. and E.J. Brook. 2008.
-Atmospheric CO2 and Climate on Millennial Time Scales During 
-the Last Glacial Period. 
-Science, 322, 83-85, doi: 10.1126/science.1160832.
-
-Ahn, J. and Brook, E.J.  2007.  
-Atmospheric CO2 and climate from 65 to 30 ka B.P.. 
-Geophysical Research Letters, 34, L10703, doi:10.1029/2007GL029551.
-
- 
-References for CO2 age:	 
-  
-Blunier-01 age: 
-Blunier, T., and Brook, E.J.  2001. 
-Timing of millennial-scale climate change in Antarctica and Greenland 
-during the last glacial period.  
-Science, 291, 109-112.  
-	   
-Ahn-08 age: 
-Ahn, J. and E.J. Brook. 2008.
-Atmospheric CO2 and Climate on Millennial Time Scales During 
-the Last Glacial Period. 
-Science, 322, 83-85, doi: 10.1126/science.1160832.
-
-
-ABSTRACT (Ahn and Brook 2008):
-Reconstructions of ancient atmospheric carbon dioxide (CO2) variations 
-help us better understand how the global carbon cycle and climate are 
-linked.  We compared CO2 variations on millennial time scales between 
-20,000 and 90,000 years ago with an Antarctic temperature proxy and 
-records of abrupt climate change in the Northern Hemisphere. CO2 
-concentration and Antarctic temperature were positively correlated 
-over millennial-scale climate cycles, implying a strong connection 
-to Southern Ocean processes. Evidence from marine sediment proxies 
-indicates that CO2 concentration rose most rapidly when North Atlantic 
-Deep Water shoaled and stratification in the Southern Ocean was reduced. 
-These increases in CO2 concentration occurred during stadial (cold) 
-periods in the Northern Hemisphere, several thousand years before 
-abrupt warming events in Greenland.
-
-
-
-GEOGRAPHIC REGION: Antarctica
-PERIOD OF RECORD:  90 - 20 KYrBP
-
-FUNDING SOURCES: 
-Gary Comer Science and Education Foundation, and
-US National Science Foundation  grants OPP 0337891 and ATM 0602395.
-
-
-
-DESCRIPTION:  
-Byrd ice core carbon dioxide data for 20-90 KYrBP, analyzed at 
-Oregon State University.  
-
-Byrd Ice Core location: 
-80.01°S , 119.51°W; 1530 m elev. 
-  
-
-
-
-DATA:
-Byrd Ice Core CO2 Data for 20-90 KYrBP
-
-Column 1: Depth (m) 
-Column 2: Blunier 2001 Age (ka before 1950 AD)
-Column 3: Ahn 2008 Age (ka before 1950 AD)
-Column 4: Mean CO2 (ppm)
-Column 5: Number of replicates
-Column 6: Uncertainty (ppm)*
-Column 7: Reference
-
-*Uncertainty is estimated from the standard deviation of the mean for 2~5 ice samples
-
-Depth       Age Bl01  Age Ahn08   Mean CO2    Repl.  Uncert.    Ref.
-1315.91       19.460     19.286     194.36      2     0.97     AB-08
-1332.34       20.061     19.887     191.14      2     0.19     AB-08
-1334.20       20.152     19.978     192.54      2     0.09     AB-08
-1346.28       20.578     20.404     204.27      2     0.48     AB-08
-1353.02       20.759     20.585     195.37      2     0.02     AB-08
-1363.17       21.065     20.891     197.12      2     1.04     AB-08
-1381.14       21.731     21.557     195.81      2     1.66     AB-08
-1401.95       22.399     22.225     199.75      3     4.49     AB-08
-1410.30       22.729     22.555     194.62      2     0.31     AB-08
-1420.27       23.530     23.356     195.97      2     1.88     AB-08
-1430.78       24.824     24.650     194.74      2     1.94     AB-08
-1441.45       26.002     25.828     189.76      2     1.30     AB-08
-1460.20       26.711     26.537     192.21      2     1.28     AB-08
-1470.77       27.148     26.974     184.40      2     1.42     AB-08
-1480.48       27.619     27.445     188.07      2     1.48     AB-08
-1490.87       27.989     27.815     201.96      2     0.46     AB-08
-1496.52       28.135     27.961     204.98      2     1.71     AB-08
-1503.54       28.395     28.221     205.91      3     2.43     AB-08
-1512.46       28.660     28.486     207.48      2     1.73     AB-08
-1523.46       29.147     28.973     205.54      2     0.40     AB-08
-1533.76       29.568     29.396     201.49      2     1.84     AB-08
-1543.63       30.013     29.843     197.51      2     3.18     AB-08
-1552.76       30.412     30.245     195.36      2     0.89     AB-08
-1573.34       31.216     31.053     195.09      3     2.37     AB-08
-1581.93       31.738     31.577     202.29      2     0.38     AB-08
-1594.06       32.328     32.170     203.67      2     0.40     AB-08
-1615.15       33.450     33.297     208.11      2     0.11     AB-08
-1620.38       33.692     33.541     205.25      2     0.53     AB-08
-1631.11       34.183     34.033     201.53      2     1.67     AB-08
-1640.90       34.630     34.484     213.08      2     0.47     AB-08
-1650.56       35.097     34.953     206.62      2     1.72     AB-08
-1658.96       35.428     35.286     209.93      2     1.10     AB-08
-1677.79       36.249     36.111     207.76      2     0.00     AB-08
-1688.63       36.840     36.704     212.63      2     0.99     AB-08
-1693.68       37.167     37.033     213.98      2     1.37     AB-08
-1699.73       37.621     37.488     217.48      2     1.16     AB-08
-1708.70       38.122     37.992     216.21      2     1.03     AB-08
-1714.20       38.428     38.298     216.52      2     2.21     AB-08
-1717.20       38.545     38.415     212.50      2     1.51     AB-08
-1719.47       38.655     38.520     211.09      2     1.83     AB-08
-1723.22       38.850     38.708     214.78      2     2.64     AB-08
-1730.78       39.163     39.006     207.63      2     0.18     AB-08
-1740.51       39.539     39.364     214.06      2     0.14     AB-08
-1743.27       39.651     39.470     213.84      2     1.23     AB-08
-1747.69       39.811     39.621     203.03      2     1.03     AB-08
-1755.15       40.038     39.834     202.11      2     0.45     AB-08
-1760.29       40.172     39.958     203.78      2     2.59     AB-08
-1770.24       40.544     40.311     203.40      2     1.56     AB-08
-1779.99       40.966     40.714     201.30      2     1.46     AB-08
-1790.29       41.585     41.313     202.69      2     2.43     AB-08
-1802.03       42.320     42.025     204.64      2     0.56     AB-08
-1811.74       42.851     42.537     207.18      2     1.53     AB-08
-1821.19       43.591     43.259     210.31      2     0.60     AB-08
-1830.63       44.137     43.786     214.57      2     0.51     AB-08
-1840.93       44.598     44.228     216.83      3     2.50     AB-08
-1844.41       44.760     44.383     215.54      2     1.26     AB-08
-1847.46       44.899     44.516     219.62      2     0.94     AB-08
-1855.09       45.229     44.831     221.00      2     0.60     AB-08
-1859.57       45.526     45.120     217.56      2     0.82     AB-08
-1861.17       45.633     45.223     219.39      2     0.53     AB-08
-1862.59       45.725     45.313     218.62      2     2.56     AB-08
-1864.56       45.852     45.436     217.23      2     2.04     AB-08
-1867.90       46.075     45.654     211.58      2     0.64     AB-08
-1871.26       46.298     45.872     206.99      2     0.29     AB-08
-1873.26       46.431     46.002     209.25      2     1.24     AB-08
-1880.36       46.889     46.448     205.61      2     1.63     AB-08
-1884.88       47.187     46.740     204.28      2     1.02     AB-08
-1892.21       47.687     47.228     205.36      2     1.00     AB-08
-1894.8        47.865     47.402     205.51      2     1.63     AB-07
-1903.72       48.450     47.973     201.79      2     2.79     AB-07
-1909.75       48.874     48.388     211.47      4     1.09     AB-07
-1911.29       48.984     48.495     207.15      4     1.93     AB-07
-1914.31       49.191     48.697     212.35      2     0.57     AB-07
-1920.25       49.596     49.092     213.91      4     2.43     AB-07
-1929.4        50.230     49.712     216.76      2     0.28     AB-07
-1938.5        50.857     50.325     215.07      2     0.30     AB-07
-1943.09       51.175     50.636     218.12      5     2.35     AB-07
-1945.98       51.394     50.850     221.08      3     0.35     AB-07
-1953.17       51.894     51.339     216.69      4     2.96     AB-07
-1956.34       52.193     51.633     217.93      2     2.81     AB-07
-1959.23       52.505     51.941     218.83      2     1.55     AB-07
-1962.18       52.812     52.259     219.08      4     2.10     AB-07
-1963.62       52.963     52.423     215.70      2     1.94     AB-07
-1968.07       53.422     52.923     212.28      2     2.52     AB-07
-1972.66       53.926     53.470     213.25      2     0.74     AB-07
-1978.74       54.577     54.177     205.57      2     0.58     AB-07
-1981.61       54.859     54.486     212.48      4     2.46     AB-07
-1988.98       55.644     55.339     215.94      2     0.96     AB-07
-1995.01       56.317     56.068     215.25      2     0.38     AB-07
-2001.46       57.022     56.833     218.27      2     3.65     AB-07
-2003.23       57.222     57.049     223.09      2     0.30     AB-07
-2013.21       58.096     58.016     222.69      3     2.59     AB-07
-2017.71       58.467     58.421     224.99      2     0.97     AB-07
-2022.42       59.125     59.072     220.11      2     1.49     AB-07
-2026.9        59.806     59.746     224.21      3     1.18     AB-07
-2028.47       60.039     59.976     217.96      2     1.39     AB-07
-2031.5        60.526     60.459     218.85      2     3.26     AB-07
-2037.68       61.451     61.374     210.28      2     1.65     AB-07
-2042.43       62.186     62.102     212.26      2     0.85     AB-07
-2048.32       63.079     62.986     204.65      2     0.39     AB-07
-2051.4        63.526     63.429     206.76      2     2.20     AB-07
-2055.9        64.152     64.048     204.06      2     0.84     AB-07
-2066.85       65.565     65.444     208.22      2     2.01     AB-08
-2069.64       65.938     65.813     207.08      2     2.09     AB-08
-2072.65       66.333     66.204     217.67      2     2.07     AB-08
-2075.59       66.779     66.644     211.79      2     0.25     AB-08
-2075.745      66.818    66.6833     219.64      3     1.17     AB-08
-2076.02       66.890     66.755     222.40      2     0.47     AB-08
-2076.43       66.997     66.861     223.63      2     0.27     AB-08
-2077.02       67.151     67.014     220.43      2     3.79     AB-08
-2080.12       67.959     67.818     244.03      2     5.52     AB-08
-2080.61       68.086     67.944     240.28      2     0.28     AB-08
-2081.10       68.213     68.071     246.47      2     0.93     AB-08
-2081.59       68.340     68.197     247.22      2     2.42     AB-08
-2082.54       68.582     68.435     249.96      3     3.97     AB-08
-2082.64       68.608     68.460     248.32      2     2.08     AB-08
-2083.085      68.721    68.5708     238.70      4     4.19     AB-08
-2083.54       68.837     68.685     238.61      2     0.33     AB-08
-2083.82       68.908     68.755     238.78      2     1.42     AB-08
-2084.14       68.989     68.834     238.84      2     0.02     AB-08
-2084.52       69.086     68.929     231.99      3     4.59     AB-08
-2085.44       69.314     69.149     237.98      2     0.97     AB-08
-2087.02       69.706     69.527     237.26      3     0.40     AB-08
-2087.75       69.886     69.700     233.74      2     0.93     AB-08
-2089.24       70.246     70.048     234.85      2     0.19     AB-08
-2090.16       70.469     70.262     234.35      2     3.03     AB-08
-2093.50       71.337     71.101     237.17      2     0.49     AB-08
-2093.71       71.395     71.158     236.62      3     1.43     AB-08
-2095.46       71.875     71.622     240.58      2     3.79     AB-08
-2097.91       72.515     72.240     246.81      3     2.23     AB-08
-2099.29       72.885     72.598     244.19      1              AB-08
-2100.05       73.073     72.783     246.30      2     0.85     AB-08
-2100.69       73.230     72.937     236.93      2     0.88     AB-08
-2101.27       73.369     73.079     242.80      2     3.41     AB-08
-2101.80       73.492     73.209     241.26      2     0.14     AB-08
-2101.97       73.531     73.251     237.79      4     2.31     AB-08
-2103.15       73.805     73.542     240.63      3     0.85     AB-08
-2103.60       73.909     73.653     235.11      2     0.58     AB-08
-2104.68       74.184     73.944     231.11      2     0.89     AB-08
-2105.52       74.410     74.182     228.82      2     2.08     AB-08
-2106.32       74.656     74.440     223.79      2     1.22     AB-08
-2107.63       75.055     74.858     230.49      2     0.28     AB-08
-2109.17       75.518     75.343     228.85      2     0.25     AB-08
-2110.06       75.783     75.621     226.25      1              AB-08
-2111.20       76.120     75.975     229.45      2     2.14     AB-08
-2113.37       76.765     76.651     229.56      2     1.56     AB-08
-2116.08       77.586     77.513     232.82      3     1.97     AB-08
-2116.73       77.785     77.721     240.83      3     1.24     AB-08
-2120.16       78.809     78.795     235.51      2     0.11     AB-08
-2122.78       79.604     79.628     238.65      2     4.76     AB-08
-2125.62       80.449     80.515     240.08      3     1.03     AB-08
-2126.13       80.635     80.708     233.00      3     1.69     AB-08
-2130.20       82.116     82.248     250.22      2     4.72     AB-08
-2130.67       82.399     82.539     246.47      2     0.04     AB-08
-2130.78       82.466     82.607     244.08      2     2.06     AB-08
-2131.99       83.195     83.354     250.70      2     0.33     AB-08
-2132.50       83.503     83.669     248.75      2     2.37     AB-08
-2132.66       83.600     83.766     237.44      2     2.38     AB-08
-2134.46       84.687     84.855     240.19      2     1.00     AB-08
-2134.70       84.828     84.996     240.36      2     1.19     AB-08
-2135.22       85.133     85.301     233.84      2     0.20     AB-08
-2135.97       85.572     85.740     241.73      2     1.76     AB-08
-2136.25       85.734     85.902     220.23      2     5.01     AB-08
-2136.93       86.127     86.295     225.72      2     1.15     AB-08
-2137.57       86.498     86.666     228.99      3     1.73     AB-08
-2138.02       86.764     86.932     229.26      2     1.58     AB-08
-2138.32       86.942     87.110     218.37      2     0.94     AB-08
-2138.79       87.221     87.389     222.25      2     1.43     AB-08
-2143.57       90.075     90.266     236.19      5     2.31     AB-08
-2144.02       90.342     90.534     235.65      2     2.86     AB-08
-2144.72       90.759     90.953     242.07      3     4.54     AB-08
-
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/chapters.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/chapters.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/chapters.tex	(revision 11831)
@@ -0,0 +1,3 @@
+\subfile{../subfiles/model_description}
+\subfile{../subfiles/model_setup}
+\subfile{../subfiles/miscellaneous}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/edc-co2.txt
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/edc-co2.txt	(revision 11086)
+++ 	(revision )
@@ -1,620 +1,0 @@
-EPICA Dome C Ice Core High Resolution Holocene and Transition CO2 Data
------------------------------------------------------------------------
-               World Data Center for Paleoclimatology, Boulder
-                                  and
-                     NOAA Paleoclimatology Program
------------------------------------------------------------------------
-NOTE: PLEASE CITE CONTRIBUTORS WHEN USING THIS DATA!!!!!
-
-
-NAME OF DATA SET: 
-EPICA Dome C Ice Core High Resolution Holocene and Transition CO2 Data
-LAST UPDATE: 9/2004 (Original receipt by WDC Paleo)
-CONTRIBUTOR:  Eric Monnin, University of Bern
-IGBP PAGES/WDCA CONTRIBUTION SERIES NUMBER: 2004-055
-
-
-SUGGESTED DATA CITATION: Monnin, E., et al.. 2004. 
-EPICA Dome C Ice Core High Resolution Holocene and Transition CO2 Data. 
-IGBP PAGES/World Data Center for Paleoclimatology 
-Data Contribution Series # 2004-055.
-NOAA/NGDC Paleoclimatology Program, Boulder CO, USA.
-
-
-ORIGINAL REFERENCE:  
-Monnin, E., E.J. Steig, U. Siegenthaler, K. Kawamura, J. Schwander, B. Stauffer, 
-T.F. Stocker, D.L. Morse, J.-M. Barnola, B. Bellier, D. Raynaud, and H. Fischer. 2004.  
-Evidence for substantial accumulation rate variability in Antarctica during the Holocene, 
-through synchronization of CO2 in the Taylor Dome, Dome C and DML ice cores. 
-Earth and Planetary Science Letters, 224, 45-54, doi: 10.1016/j.epsl.2004.05.007. 
-
-
-ADDITIONAL REFERENCES FOR DATA:
-Flückiger, J.,  E. Monnin, B. Stauffer, J. Schwander, T. F. Stocker, J. Chappellaz, 
-D. Raynaud and J.-M. Barnola.  2002.
-High resolution Holocene N2O ice core record and its relationship with CH4 and CO2. 
-Global Biogeochemical Cycles, 16 (1), 1010, doi:10.1029/2001GB001417.
-
-Monnin, E., A. Indermühle, A. Dällenbach, J. Flückiger, B. Stauffer, T. F. Stocker, 
-D. Raynaud, and J.-M. Barnola.  2001. 
-Atmospheric CO2 concentrations over the last glacial termination. 
-Science 291, 112-114.
-
- 
-ADDITIONAL REFERENCE FOR DATING:
-Schwander, J., J. Jouzel, C. U. Hammer, J.-R. Petit, R. Udisti, and E. Wolff. 2001.
-A tentative chronology for the EPICA Dome Concordia ice core. 
-Geophys. Res. Lett. Vol. 28, No. 22, p. 4243.
-
-
-ABSTRACT (Monnin et al. 2004):
-High resolution records of atmospheric CO2 concentration during the Holocene 
-are obtained from the Dome Concordia and Dronning Maud Land (Antarctica) ice cores. 
-These records confirm that the CO2 concentration varied between 260 and 280 ppmv in 
-the Holocene as measured in the Taylor Dome ice core. However, there are differences 
-in the CO2 records most likely caused by mismatches in timescales. Matching the 
-Taylor Dome timescale to the Dome C timescale by synchronization of CO2 indicates that 
-the accumulation rate at Taylor Dome increased through the Holocene by a factor of two 
-and bears little resemblance to the stable isotope record used as a proxy for temperature. 
-This result shows that different locations experienced substantially different 
-accumulation changes, and casts doubt on the often-used assumption that accumulation 
-rate scales with the saturation vapor pressure as a function of temperature, at least 
-for coastal locations. 
-
-
-GEOGRAPHIC REGION: Antarctica
-PERIOD OF RECORD:  22 KYrBP - present
-
-
-DESCRIPTION: High Resolution CO2 Data for the EPICA Dome C ice core, 
-and derived timescale for Taylor Dome Ice Core. 
-
-
-Core locations: 
-EPICA Dome C:  75° 06'S, 123° 21'E 
-Dronning Maud Land (DML): 75° 00'S, 00° 04'E 
-Taylor Dome:  77° 47'47" S,  158° 43'26" E
-
-
-
-
-Data:
-1. High-resolution EDC CO2 data
-
-Column 1: Depth (m)
-Column 2: Age (Years before 1950 AD, EDC1 Timescale)
-Column 3: CO2 mean (ppmv)
-Column 4: CO2 sigma mean (ppmv) sigma mean is one sigma of the mean value 
-          (of 6 neighboring samples)
-
-
-  Depth      Age    CO2      sigma
-  102.83     173   280.4     1.8
- 106.885     311   274.9     0.7
- 107.195     322   277.9     0.7
- 110.245     427   279.1     1.3
-   110.5     435   281.9     1.1
- 113.265     530   277.7     0.7
-  115.48     604   281.1     1.1
- 118.615     709   282.2     0.5
-   121.5     806   280.1     0.6
- 124.815     917   278.4     1.5
- 127.015     991   276.6     1.4
- 129.745    1083   279.1       1
-   132.5    1175   277.7     1.2
- 134.715    1249   278.7     1.2
- 138.015    1362   277.4     0.8
- 141.295    1477   279.2     0.9
-  144.05    1574     280     0.8
- 146.265    1653   278.9     0.8
- 149.015    1751   278.7     0.7
- 151.195    1830     278     1.2
-   154.5    1948   276.9     0.7
- 157.815    2069   276.7     0.8
-  160.03    2150   276.7     0.8
- 162.165    2228   277.6     1.3
- 165.515    2352   277.9     0.5
-  168.28    2453   273.9     1.1
-     171    2550   278.9     0.6
- 173.135    2625   275.3     1.6
- 176.515    2743   274.7     1.2
- 178.715    2820   276.3     0.9
- 181.445    2918   274.6     0.8
- 185.845    3078   276.3     1.5
- 187.515    3138   273.1     1.1
- 189.715    3219     274     0.3
-     193    3337     275     0.6
- 196.295    3454   273.4     1.3
- 198.515    3531     273     0.8
-  201.28    3628   271.5       1
-     204    3724   275.4     0.5
- 206.195    3802   274.9     1.3
- 209.515    3921   271.7       1
- 212.265    4019   271.6     0.7
-     215    4117   272.8     0.8
- 216.645    4176   271.5     0.9
-  221.05    4335   271.1     0.8
- 222.715    4395   269.1     0.6
-  225.48    4496   269.8       1
- 228.195    4596   271.5     0.8
-  232.05    4737   270.7     0.5
- 233.715    4797   269.3       1
- 236.465    4895   268.6     1.1
- 240.265    5033   269.8     1.2
-   242.5    5114   267.6     0.6
- 244.715    5196   265.3     1.7
- 248.015    5318   265.2     0.8
- 250.715    5419   267.6       2
-   253.5    5521   265.9     0.9
- 256.265    5621   265.5     0.8
- 259.015    5721   260.7     1.6
- 260.645    5780   266.7     0.9
-   264.5    5921   265.5     0.8
- 268.365    6064   263.2     0.6
- 269.415    6102   262.7     0.9
- 272.195    6205   261.2     0.7
- 276.065    6349   261.1     0.4
- 278.265    6430   259.4     0.6
-  280.53    6514   262.1     0.9
- 283.715    6631   262.9     0.5
- 285.965    6713   258.1     1.4
- 288.165    6792   257.6     0.9
-     292    6930   262.3     0.9
- 294.745    7031     263     0.7
- 297.515    7132   260.7     0.6
- 299.715    7211   258.4     0.8
-     303    7328   260.1     0.6
- 305.745    7424   260.4     0.4
- 308.515    7521   259.7     0.9
-  311.26    7617   259.2     0.7
- 313.995    7714   260.8     1.4
- 316.745    7813   259.6     0.5
- 319.515    7915   259.3     0.9
- 322.265    8017   258.3     1.2
-     325    8118   261.3     0.9
- 326.545    8174   260.7     0.4
-   330.5    8315   261.8       1
- 333.265    8412     259     1.1
- 336.015    8508   260.9     0.7
- 338.645    8599   260.4     0.6
-   341.5    8697   259.3       1
- 343.715    8772     262     0.8
- 347.015    8883   263.7     1.2
- 349.745    8974   263.8     0.8
-  352.58    9067   265.2     0.9
- 355.815    9171   260.6     1.7
- 357.465    9224   260.9     0.6
- 360.195    9310     263     0.4
-  362.98    9399   263.8     1.2
- 369.545    9604   264.4     0.4
-  371.23    9657   264.2     0.9
- 375.045    9776     264     0.3
- 377.265    9846   263.4     0.1
- 379.995    9931   265.7     0.5
- 382.215   10001   264.9     0.4
- 385.125   10093   267.5     0.4
- 388.225   10192   266.9     0.6
- 390.445   10263     266     1.1
-  393.78   10370   265.1     1.6
- 396.495   10458   267.6     0.7
-  399.28   10550   264.8     0.6
- 401.995   10640   264.8     0.4
- 404.185   10712     265     0.8
-  404.78   10732   265.3     0.4
- 406.385   10785   264.4     1.5
- 407.495   10822   264.1     0.7
-   409.7   10896   264.2     1.1
-  411.38   10952   264.5     0.4
-  413.03   11008     264     0.5
-  414.75   11066     263     1.3
-  415.73   11099   265.2     0.8
- 417.065   11144   258.8     0.7
-  418.53   11195   260.8     0.5
- 420.485   11263   255.4     0.3
- 421.795   11310   253.9     0.6
-   422.9   11349   253.8     0.8
-   426.1   11468   250.7     1.1
-  427.33   11515   249.7     0.4
-   428.3   11554   251.1     0.3
- 429.495   11602   250.7     0.9
-  431.73   11695   245.3     1.1
- 433.785   11784   245.3     0.6
- 434.995   11838   246.6     0.5
-  437.23   11941   243.2     0.4
-  438.85   12017   240.3     0.3
- 443.795   12258   237.5     0.5
-  446.03   12372   237.6     0.6
- 448.745   12511   234.2     0.3
-  450.98   12625   238.3     1.1
- 454.245   12789   237.3     0.5
-  457.03   12927   237.9     0.2
- 459.895   13068   237.6     0.6
-  463.63   13252   236.4     0.9
- 465.245   13332   239.2     0.5
-  467.45   13440   238.6     0.6
- 470.195   13574   238.6     0.3
- 473.055   13711   239.1     0.4
- 479.705   14022   228.5     0.6
-   484.1   14230   228.4     0.7
- 487.245   14387   226.1     0.6
-  490.03   14532   225.2     0.5
- 492.195   14647   224.5     0.6
-  496.07   14855     222     0.8
- 499.345   15037     221     0.8
-  501.58   15166   220.9     0.5
- 504.195   15323   219.4     0.6
-  506.53   15466     214     0.8
- 509.245   15637   207.5     0.9
-  512.03   15818   207.7     0.5
- 514.745   16002   202.9     0.7
-  517.53   16199   200.8       1
- 520.245   16400   195.2     0.3
-  523.03   16616   193.9     0.5
- 526.295   16883     191     0.5
-  528.53   17073   188.5     0.7
- 531.245   17311   188.5     0.7
-  532.93   17463   189.2     0.4
- 536.745   17815     187     0.2
-  539.53   18074   188.6     0.5
-   542.9   18391   189.4     0.4
- 543.345   18433   192.3     0.6
-  543.93   18487   188.3     0.6
- 548.845   18948   188.7     0.2
-  550.51   19104   188.8     0.5
- 553.245   19360     190     0.8
-  556.03   19621     188     0.9
-  557.89   19795   188.2     0.7
- 558.195   19824     195     0.7
-  561.53   20137   187.8     0.4
-  564.26   20390   186.9     0.3
-  567.03   20646   186.5     0.3
- 569.745   20897   184.7     1.2
-  572.53   21156   186.1     0.4
- 576.325   21511   185.7     1.3
- 578.105   21676   184.4     0.8
-
-
-2.  CO2 synchronization timescale for Taylor Dome Ice Core
-
-A. Gas age:
-
- depth(m)    gas age (yr BP 1950)
-      86       94.5
-      90      149.2
-      94      205.2
-      98      260.9
-     102      316.2
-     106        372
-     110      427.9
-     114      483.7
-     118      540.1
-     122      598.1
-     126      658.4
-     130      722.7
-     134      790.3
-     138      860.5
-   142.1      929.8
-   146.1      995.5
-   150.1     1058.1
-   154.1     1119.4
-   158.1     1180.7
-   162.1     1243.2
-   166.1       1308
-   170.1     1377.6
-   174.1     1454.7
-   178.1     1539.6
-   182.1       1633
-   186.1     1731.9
-   190.1     1835.6
-   194.1       1940
-   198.1     2045.1
-   202.1       2150
-   206.1     2254.5
-   210.1     2361.9
-   214.1     2475.5
-   218.1     2594.6
-   222.1     2715.6
-   226.1     2835.7
-   230.1     2954.2
-   234.1     3070.8
-   238.1     3188.2
-   242.1       3308
-   246.1     3429.6
-   250.1     3550.6
-   254.2     3670.1
-   258.2     3787.9
-   262.2     3905.9
-   266.2     4026.1
-   270.2     4153.3
-   274.2     4295.3
-   278.2     4454.1
-   282.2     4629.4
-   286.2       4814
-   290.2     4998.6
-   294.2     5174.8
-   298.2     5342.8
-   302.2     5507.9
-   306.2     5674.9
-   310.2     5846.8
-   314.2     6031.1
-   318.2     6242.5
-   322.2       6502
-   326.2     6830.5
-   330.2     7238.7
-   334.2     7710.2
-   338.2     8215.9
-   342.2     8735.9
-   346.2     9226.8
-   350.2     9762.8
-   354.2    10289.2
-   358.2    10720.5
-   362.3    11224.1
-
-
-
-B. Ice age:
-
- depth(m)    ice age (yr BP 1950)
-      86     730.1
-    87.3     746.9
-    88.5     763.6
-    89.7     780.4
-    90.9     797.2
-      92     813.9
-    93.2     830.5
-    94.4       847
-    95.5     863.4
-    96.7     879.7
-    97.8     895.9
-    98.9     912.1
-     100     928.3
-   101.2     944.6
-   102.3     961.1
-   103.4     977.6
-   104.6     994.2
-   105.7    1010.5
-   106.8    1026.6
-   107.9    1042.7
-     109      1059
-   110.1    1075.2
-   111.1    1091.5
-   112.2    1107.9
-   113.3    1124.3
-   114.4    1140.8
-   115.5    1157.4
-   116.5      1174
-   117.6    1190.8
-   118.6    1207.9
-   119.7      1225
-   120.8    1242.2
-   121.8    1259.8
-   122.9    1277.8
-   123.9    1295.9
-     125    1314.1
-     126    1332.7
-   127.1    1351.4
-   128.1      1370
-   129.2    1388.5
-   130.2    1407.3
-   131.2    1426.3
-   132.3      1445
-   133.3    1463.6
-   134.4    1482.2
-   135.4    1500.9
-   136.5    1519.5
-   137.5    1537.9
-   138.5      1556
-   139.6    1573.9
-   140.6    1591.7
-   141.6    1609.4
-   142.7    1626.8
-   143.7    1644.1
-   144.7    1661.2
-   145.7    1678.1
-   146.8    1694.6
-   147.8      1711
-   148.8    1727.5
-   149.8    1743.9
-   150.9    1760.3
-   151.9    1776.6
-   152.9    1793.1
-   153.9    1809.6
-   154.9    1826.2
-     156    1842.9
-     157    1859.6
-     158    1876.5
-     159    1893.5
-     160    1910.6
-     161    1927.7
-   162.1    1945.1
-   163.1    1962.8
-   164.1    1980.5
-   165.1    1998.3
-   166.1      2017
-   167.1    2036.8
-   168.1    2056.8
-   169.1    2077.2
-   170.2    2098.8
-   171.2    2121.7
-   172.2      2145
-   173.2    2168.6
-   174.2    2193.2
-   175.2      2219
-   176.2    2244.7
-   177.2    2270.3
-   178.2    2296.7
-   179.3    2323.9
-   180.3      2351
-   181.3    2378.2
-   182.3      2406
-   183.3    2434.1
-   184.3    2462.3
-   185.3    2490.5
-   186.3    2519.3
-   187.3    2548.5
-   188.3    2577.7
-   189.3    2606.7
-   190.4    2635.8
-   191.4      2665
-   192.4    2694.1
-   193.4    2723.2
-   194.4    2752.3
-   195.4    2781.6
-   196.4    2810.8
-   197.4    2839.9
-   198.4    2868.9
-   199.4    2897.8
-   200.4    2926.4
-   201.4    2954.9
-   202.4      2983
-   203.5    3010.9
-   204.5    3038.5
-   205.5      3066
-   206.5    3093.6
-   207.5    3121.2
-   208.5    3148.4
-   209.5    3175.7
-   210.5    3203.4
-   211.5    3231.3
-   212.5      3259
-   213.5    3286.9
-   214.5    3315.4
-   215.5    3344.4
-   216.5    3373.3
-   217.5    3402.5
-   218.6    3431.9
-   219.6    3461.4
-   220.6    3490.9
-   221.6    3520.3
-   222.6    3549.6
-   223.6      3579
-   224.6    3608.4
-   225.6    3637.6
-   226.6    3666.2
-   227.6    3694.6
-   228.6      3723
-   229.6      3751
-   230.6    3778.4
-   231.6    3805.5
-   232.6    3832.5
-   233.6    3859.3
-   234.6      3886
-   235.7    3912.7
-   236.7    3939.3
-   237.7      3966
-   238.7    3992.9
-   239.7    4020.1
-   240.7    4047.4
-   241.7    4074.9
-   242.7    4102.9
-   243.7    4130.9
-   244.7    4158.9
-   245.7    4186.9
-   246.7    4215.2
-   247.7    4243.7
-   248.7    4272.2
-   249.7    4300.6
-   250.8    4328.8
-   251.8    4357.3
-   252.8    4385.9
-   253.8    4414.9
-   254.8    4444.3
-   255.8    4474.3
-   256.8    4504.4
-   257.8    4534.8
-   258.8    4565.6
-   259.8    4596.7
-   260.8      4628
-   261.8    4659.4
-   262.8    4691.3
-   263.8    4723.4
-   264.8    4755.4
-   265.8    4788.2
-   266.8    4821.8
-   267.9    4855.7
-   268.9    4889.6
-   269.9    4924.9
-   270.9    4961.8
-   271.9    4999.1
-   272.9    5036.2
-   273.9    5074.7
-   274.9      5115
-   275.9    5155.8
-   276.9    5196.5
-   277.9    5238.6
-   278.9    5282.7
-   279.9    5327.3
-   280.9    5371.8
-   281.9    5417.1
-   282.9    5463.7
-   283.9    5510.6
-   284.9    5557.4
-   285.9    5604.1
-   286.9    5650.6
-     288    5697.3
-     289    5743.8
-     290    5789.3
-     291    5833.8
-     292    5878.1
-     293    5922.3
-     294    5965.5
-     295    6007.8
-     296    6050.3
-     297      6093
-     298    6135.2
-     299    6177.2
-     300    6219.5
-     301    6262.3
-     302    6305.5
-     303    6349.4
-     304    6393.8
-     305    6438.7
-     306    6484.6
-     307    6531.7
-     308    6579.1
-     309    6626.8
-     310    6676.5
-     311    6728.2
-     312    6780.3
-   313.1    6832.7
-   314.1    6888.4
-   315.1    6947.6
-   316.1    7007.4
-   317.1    7067.1
-   318.1    7132.1
-   319.1    7203.1
-   320.1    7274.9
-   321.1    7346.6
-   322.1      7426
-   323.1    7514.1
-   324.1    7603.5
-   325.1    7693.4
-   326.1    7792.7
-   327.1    7902.5
-   328.1    8013.9
-   329.1    8125.8
-   330.1    8245.7
-   331.1    8373.8
-   332.1    8502.4
-   333.1    8630.8
-   334.1    8761.6
-   335.1    8894.5
-   336.1    9026.4
-   337.1    9157.7
-   338.1    9290.6
-   339.1    9425.8
-   340.1    9561.1
-   341.2    9695.7
-   342.2    9826.2
-   343.2    9951.2
-   344.2   10075.6
-   345.2   10201.2
-   346.2   10331.7
-   347.2   10467.7
-   348.2   10603.6
-   349.2   10739.5
-   350.2   10873.8
-   351.2   11006.9
-   352.2   11139.9
-   353.2     11273
-
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/introduction.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/introduction.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/introduction.tex	(revision 11831)
@@ -0,0 +1,42 @@
+% ================================================================
+% INTRODUCTION
+% ================================================================
+
+\chapter*{Introduction}
+
+TOP (Tracers in the Ocean Paradigm) handles oceanic passive tracers in NEMO. At present, this component provides the physical constraints and boundaries conditions for oceanic tracers transport and represents a generalized, hardwired interface toward biogeochemical models to enable a seamless coupling.
+
+It includes three independent components :
+
+\begin{itemize}
+        \item a transport code TRP sharing the same advection/diffusion routines with the dynamics, with specific treatment of some features like the surface boundary
+conditions, or the positivity of passive tracers concentrations
+        \item sources and sinks - SMS - models that can be typically biogeochemical, biological or radioactive
+        \item an offline option which is a simplified OPA 9 model using fields of physics variables that are previously stored to disk
+\end{itemize}
+
+There is two ways of coupling TOP to the dynamics :
+
+\begin{itemize}
+        \item \textit{online coupling} : the evolution of passive tracers is computed along with the dynamics
+        \item \textit{offline coupling} : the fields of physics variables are read from files and interpolated at each model time step, with no constraints on the time sampling in the input files
+\end{itemize}
+
+TOP is designed to handle multiple oceanic tracers through a modular approach and it includes different sub-modules :
+
+\begin{itemize}
+        \item the ocean water age module (AGE) tracks down the time-dependent spread of surface waters into the ocean interior
+        \item inorganic carbon (e.g. CFCs, SF6) and radiocarbon (C14) passive tracers can be modeled to assess ocean absorption timescales of anthropogenic emissions and further address water masses ventilation
+        \item a built-in biogeochemical model (PISCES) to simulate lower trophic levels ecosystem dynamics in the global ocean
+        \item a prototype tracer module (MY\_TRC) to enable user-defined cases or the coupling with alternative biogeochemical models ( e.g. BFM, MEDUSA, ERSEM, BFM, ECO3M)
+\end{itemize}
+
+\begin{figure}[ht]
+\begin{center}
+\vspace{0cm}
+\includegraphics[width=0.80\textwidth]{Fig_TOP_design}
+%\includegraphics[height=6cm,angle=-00]{Fig_TOP_design}
+\caption{A schematic view of NEMO-TOP component}
+\label{topdesign}
+\end{center}
+\end{figure}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/keys.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/keys.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/keys.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/keys.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/modules.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/modules.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/modules.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/modules.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/parameters.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/parameters.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/parameters.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/parameters.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/settings.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/settings.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/settings.tex	(revision 11831)
@@ -0,0 +1,20 @@
+%% Engine (folder name)
+\def \engine{TOP}
+
+%% Title and cover page settings
+\def \spacetop{  \vspace*{1.3cm} }
+\def \heading{Tracers in Ocean Paradigm (TOP)}
+\def \subheading{The NEMO passive tracers engine}
+\def \spacedown{ \vspace*{  1cm} }
+\def \authorswidth{0.15\linewidth}
+\def \rulelenght{110pt}
+\def \abstractwidth{0.7\linewidth}
+
+%% Color for document (frontpage banner, links and chapter boxes)
+\def \setmanualcolor{ \definecolor{manualcolor}{cmyk}{1, 0, 1, .4} }
+
+%% IPSL publication number
+\def \ipslnum{28}
+
+%% Zenodo ID, i.e. doi:10.5281/zenodo.\([0-9]*\)
+\def \zid{1471700}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/subroutines.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/subroutines.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/main/subroutines.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/subroutines.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/blocks.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/blocks.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/blocks.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/blocks.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/byrd-co2-2008.txt
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/byrd-co2-2008.txt	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/byrd-co2-2008.txt	(revision 11831)
@@ -0,0 +1,273 @@
+Byrd Ice Core CO2 Data for 20-90 KYrBP
+-----------------------------------------------------------------------
+               World Data Center for Paleoclimatology, Boulder
+                                  and
+                     NOAA Paleoclimatology Program
+-----------------------------------------------------------------------
+NOTE: PLEASE CITE ORIGINAL REFERENCE WHEN USING THIS DATA!!!!!
+
+
+NAME OF DATA SET: Byrd Ice Core CO2 Data for 20-90 KYrBP
+
+LAST UPDATE: 10/2008 (Original receipt by WDC Paleo)
+CONTRIBUTORS: Jinho Ahn and Edward J. Brook
+IGBP PAGES/WDCA CONTRIBUTION SERIES NUMBER: 2008-095
+
+WDC PALEO CONTRIBUTION SERIES CITATION: 
+Ahn, J. and E.J. Brook. 2008.
+Byrd Ice Core CO2 Data for 20-90 KYrBP. 
+IGBP PAGES/World Data Center for Paleoclimatology 
+Data Contribution Series # 2008-095. 
+NOAA/NCDC Paleoclimatology Program, Boulder CO, USA.
+
+
+ORIGINAL REFERENCES: 
+References for CO2 data: 
+ 
+Ahn, J. and E.J. Brook. 2008.
+Atmospheric CO2 and Climate on Millennial Time Scales During 
+the Last Glacial Period. 
+Science, 322, 83-85, doi: 10.1126/science.1160832.
+
+Ahn, J. and Brook, E.J.  2007.  
+Atmospheric CO2 and climate from 65 to 30 ka B.P.. 
+Geophysical Research Letters, 34, L10703, doi:10.1029/2007GL029551.
+
+ 
+References for CO2 age:	 
+  
+Blunier-01 age: 
+Blunier, T., and Brook, E.J.  2001. 
+Timing of millennial-scale climate change in Antarctica and Greenland 
+during the last glacial period.  
+Science, 291, 109-112.  
+	   
+Ahn-08 age: 
+Ahn, J. and E.J. Brook. 2008.
+Atmospheric CO2 and Climate on Millennial Time Scales During 
+the Last Glacial Period. 
+Science, 322, 83-85, doi: 10.1126/science.1160832.
+
+
+ABSTRACT (Ahn and Brook 2008):
+Reconstructions of ancient atmospheric carbon dioxide (CO2) variations 
+help us better understand how the global carbon cycle and climate are 
+linked.  We compared CO2 variations on millennial time scales between 
+20,000 and 90,000 years ago with an Antarctic temperature proxy and 
+records of abrupt climate change in the Northern Hemisphere. CO2 
+concentration and Antarctic temperature were positively correlated 
+over millennial-scale climate cycles, implying a strong connection 
+to Southern Ocean processes. Evidence from marine sediment proxies 
+indicates that CO2 concentration rose most rapidly when North Atlantic 
+Deep Water shoaled and stratification in the Southern Ocean was reduced. 
+These increases in CO2 concentration occurred during stadial (cold) 
+periods in the Northern Hemisphere, several thousand years before 
+abrupt warming events in Greenland.
+
+
+
+GEOGRAPHIC REGION: Antarctica
+PERIOD OF RECORD:  90 - 20 KYrBP
+
+FUNDING SOURCES: 
+Gary Comer Science and Education Foundation, and
+US National Science Foundation  grants OPP 0337891 and ATM 0602395.
+
+
+
+DESCRIPTION:  
+Byrd ice core carbon dioxide data for 20-90 KYrBP, analyzed at 
+Oregon State University.  
+
+Byrd Ice Core location: 
+80.01°S , 119.51°W; 1530 m elev. 
+  
+
+
+
+DATA:
+Byrd Ice Core CO2 Data for 20-90 KYrBP
+
+Column 1: Depth (m) 
+Column 2: Blunier 2001 Age (ka before 1950 AD)
+Column 3: Ahn 2008 Age (ka before 1950 AD)
+Column 4: Mean CO2 (ppm)
+Column 5: Number of replicates
+Column 6: Uncertainty (ppm)*
+Column 7: Reference
+
+*Uncertainty is estimated from the standard deviation of the mean for 2~5 ice samples
+
+Depth       Age Bl01  Age Ahn08   Mean CO2    Repl.  Uncert.    Ref.
+1315.91       19.460     19.286     194.36      2     0.97     AB-08
+1332.34       20.061     19.887     191.14      2     0.19     AB-08
+1334.20       20.152     19.978     192.54      2     0.09     AB-08
+1346.28       20.578     20.404     204.27      2     0.48     AB-08
+1353.02       20.759     20.585     195.37      2     0.02     AB-08
+1363.17       21.065     20.891     197.12      2     1.04     AB-08
+1381.14       21.731     21.557     195.81      2     1.66     AB-08
+1401.95       22.399     22.225     199.75      3     4.49     AB-08
+1410.30       22.729     22.555     194.62      2     0.31     AB-08
+1420.27       23.530     23.356     195.97      2     1.88     AB-08
+1430.78       24.824     24.650     194.74      2     1.94     AB-08
+1441.45       26.002     25.828     189.76      2     1.30     AB-08
+1460.20       26.711     26.537     192.21      2     1.28     AB-08
+1470.77       27.148     26.974     184.40      2     1.42     AB-08
+1480.48       27.619     27.445     188.07      2     1.48     AB-08
+1490.87       27.989     27.815     201.96      2     0.46     AB-08
+1496.52       28.135     27.961     204.98      2     1.71     AB-08
+1503.54       28.395     28.221     205.91      3     2.43     AB-08
+1512.46       28.660     28.486     207.48      2     1.73     AB-08
+1523.46       29.147     28.973     205.54      2     0.40     AB-08
+1533.76       29.568     29.396     201.49      2     1.84     AB-08
+1543.63       30.013     29.843     197.51      2     3.18     AB-08
+1552.76       30.412     30.245     195.36      2     0.89     AB-08
+1573.34       31.216     31.053     195.09      3     2.37     AB-08
+1581.93       31.738     31.577     202.29      2     0.38     AB-08
+1594.06       32.328     32.170     203.67      2     0.40     AB-08
+1615.15       33.450     33.297     208.11      2     0.11     AB-08
+1620.38       33.692     33.541     205.25      2     0.53     AB-08
+1631.11       34.183     34.033     201.53      2     1.67     AB-08
+1640.90       34.630     34.484     213.08      2     0.47     AB-08
+1650.56       35.097     34.953     206.62      2     1.72     AB-08
+1658.96       35.428     35.286     209.93      2     1.10     AB-08
+1677.79       36.249     36.111     207.76      2     0.00     AB-08
+1688.63       36.840     36.704     212.63      2     0.99     AB-08
+1693.68       37.167     37.033     213.98      2     1.37     AB-08
+1699.73       37.621     37.488     217.48      2     1.16     AB-08
+1708.70       38.122     37.992     216.21      2     1.03     AB-08
+1714.20       38.428     38.298     216.52      2     2.21     AB-08
+1717.20       38.545     38.415     212.50      2     1.51     AB-08
+1719.47       38.655     38.520     211.09      2     1.83     AB-08
+1723.22       38.850     38.708     214.78      2     2.64     AB-08
+1730.78       39.163     39.006     207.63      2     0.18     AB-08
+1740.51       39.539     39.364     214.06      2     0.14     AB-08
+1743.27       39.651     39.470     213.84      2     1.23     AB-08
+1747.69       39.811     39.621     203.03      2     1.03     AB-08
+1755.15       40.038     39.834     202.11      2     0.45     AB-08
+1760.29       40.172     39.958     203.78      2     2.59     AB-08
+1770.24       40.544     40.311     203.40      2     1.56     AB-08
+1779.99       40.966     40.714     201.30      2     1.46     AB-08
+1790.29       41.585     41.313     202.69      2     2.43     AB-08
+1802.03       42.320     42.025     204.64      2     0.56     AB-08
+1811.74       42.851     42.537     207.18      2     1.53     AB-08
+1821.19       43.591     43.259     210.31      2     0.60     AB-08
+1830.63       44.137     43.786     214.57      2     0.51     AB-08
+1840.93       44.598     44.228     216.83      3     2.50     AB-08
+1844.41       44.760     44.383     215.54      2     1.26     AB-08
+1847.46       44.899     44.516     219.62      2     0.94     AB-08
+1855.09       45.229     44.831     221.00      2     0.60     AB-08
+1859.57       45.526     45.120     217.56      2     0.82     AB-08
+1861.17       45.633     45.223     219.39      2     0.53     AB-08
+1862.59       45.725     45.313     218.62      2     2.56     AB-08
+1864.56       45.852     45.436     217.23      2     2.04     AB-08
+1867.90       46.075     45.654     211.58      2     0.64     AB-08
+1871.26       46.298     45.872     206.99      2     0.29     AB-08
+1873.26       46.431     46.002     209.25      2     1.24     AB-08
+1880.36       46.889     46.448     205.61      2     1.63     AB-08
+1884.88       47.187     46.740     204.28      2     1.02     AB-08
+1892.21       47.687     47.228     205.36      2     1.00     AB-08
+1894.8        47.865     47.402     205.51      2     1.63     AB-07
+1903.72       48.450     47.973     201.79      2     2.79     AB-07
+1909.75       48.874     48.388     211.47      4     1.09     AB-07
+1911.29       48.984     48.495     207.15      4     1.93     AB-07
+1914.31       49.191     48.697     212.35      2     0.57     AB-07
+1920.25       49.596     49.092     213.91      4     2.43     AB-07
+1929.4        50.230     49.712     216.76      2     0.28     AB-07
+1938.5        50.857     50.325     215.07      2     0.30     AB-07
+1943.09       51.175     50.636     218.12      5     2.35     AB-07
+1945.98       51.394     50.850     221.08      3     0.35     AB-07
+1953.17       51.894     51.339     216.69      4     2.96     AB-07
+1956.34       52.193     51.633     217.93      2     2.81     AB-07
+1959.23       52.505     51.941     218.83      2     1.55     AB-07
+1962.18       52.812     52.259     219.08      4     2.10     AB-07
+1963.62       52.963     52.423     215.70      2     1.94     AB-07
+1968.07       53.422     52.923     212.28      2     2.52     AB-07
+1972.66       53.926     53.470     213.25      2     0.74     AB-07
+1978.74       54.577     54.177     205.57      2     0.58     AB-07
+1981.61       54.859     54.486     212.48      4     2.46     AB-07
+1988.98       55.644     55.339     215.94      2     0.96     AB-07
+1995.01       56.317     56.068     215.25      2     0.38     AB-07
+2001.46       57.022     56.833     218.27      2     3.65     AB-07
+2003.23       57.222     57.049     223.09      2     0.30     AB-07
+2013.21       58.096     58.016     222.69      3     2.59     AB-07
+2017.71       58.467     58.421     224.99      2     0.97     AB-07
+2022.42       59.125     59.072     220.11      2     1.49     AB-07
+2026.9        59.806     59.746     224.21      3     1.18     AB-07
+2028.47       60.039     59.976     217.96      2     1.39     AB-07
+2031.5        60.526     60.459     218.85      2     3.26     AB-07
+2037.68       61.451     61.374     210.28      2     1.65     AB-07
+2042.43       62.186     62.102     212.26      2     0.85     AB-07
+2048.32       63.079     62.986     204.65      2     0.39     AB-07
+2051.4        63.526     63.429     206.76      2     2.20     AB-07
+2055.9        64.152     64.048     204.06      2     0.84     AB-07
+2066.85       65.565     65.444     208.22      2     2.01     AB-08
+2069.64       65.938     65.813     207.08      2     2.09     AB-08
+2072.65       66.333     66.204     217.67      2     2.07     AB-08
+2075.59       66.779     66.644     211.79      2     0.25     AB-08
+2075.745      66.818    66.6833     219.64      3     1.17     AB-08
+2076.02       66.890     66.755     222.40      2     0.47     AB-08
+2076.43       66.997     66.861     223.63      2     0.27     AB-08
+2077.02       67.151     67.014     220.43      2     3.79     AB-08
+2080.12       67.959     67.818     244.03      2     5.52     AB-08
+2080.61       68.086     67.944     240.28      2     0.28     AB-08
+2081.10       68.213     68.071     246.47      2     0.93     AB-08
+2081.59       68.340     68.197     247.22      2     2.42     AB-08
+2082.54       68.582     68.435     249.96      3     3.97     AB-08
+2082.64       68.608     68.460     248.32      2     2.08     AB-08
+2083.085      68.721    68.5708     238.70      4     4.19     AB-08
+2083.54       68.837     68.685     238.61      2     0.33     AB-08
+2083.82       68.908     68.755     238.78      2     1.42     AB-08
+2084.14       68.989     68.834     238.84      2     0.02     AB-08
+2084.52       69.086     68.929     231.99      3     4.59     AB-08
+2085.44       69.314     69.149     237.98      2     0.97     AB-08
+2087.02       69.706     69.527     237.26      3     0.40     AB-08
+2087.75       69.886     69.700     233.74      2     0.93     AB-08
+2089.24       70.246     70.048     234.85      2     0.19     AB-08
+2090.16       70.469     70.262     234.35      2     3.03     AB-08
+2093.50       71.337     71.101     237.17      2     0.49     AB-08
+2093.71       71.395     71.158     236.62      3     1.43     AB-08
+2095.46       71.875     71.622     240.58      2     3.79     AB-08
+2097.91       72.515     72.240     246.81      3     2.23     AB-08
+2099.29       72.885     72.598     244.19      1              AB-08
+2100.05       73.073     72.783     246.30      2     0.85     AB-08
+2100.69       73.230     72.937     236.93      2     0.88     AB-08
+2101.27       73.369     73.079     242.80      2     3.41     AB-08
+2101.80       73.492     73.209     241.26      2     0.14     AB-08
+2101.97       73.531     73.251     237.79      4     2.31     AB-08
+2103.15       73.805     73.542     240.63      3     0.85     AB-08
+2103.60       73.909     73.653     235.11      2     0.58     AB-08
+2104.68       74.184     73.944     231.11      2     0.89     AB-08
+2105.52       74.410     74.182     228.82      2     2.08     AB-08
+2106.32       74.656     74.440     223.79      2     1.22     AB-08
+2107.63       75.055     74.858     230.49      2     0.28     AB-08
+2109.17       75.518     75.343     228.85      2     0.25     AB-08
+2110.06       75.783     75.621     226.25      1              AB-08
+2111.20       76.120     75.975     229.45      2     2.14     AB-08
+2113.37       76.765     76.651     229.56      2     1.56     AB-08
+2116.08       77.586     77.513     232.82      3     1.97     AB-08
+2116.73       77.785     77.721     240.83      3     1.24     AB-08
+2120.16       78.809     78.795     235.51      2     0.11     AB-08
+2122.78       79.604     79.628     238.65      2     4.76     AB-08
+2125.62       80.449     80.515     240.08      3     1.03     AB-08
+2126.13       80.635     80.708     233.00      3     1.69     AB-08
+2130.20       82.116     82.248     250.22      2     4.72     AB-08
+2130.67       82.399     82.539     246.47      2     0.04     AB-08
+2130.78       82.466     82.607     244.08      2     2.06     AB-08
+2131.99       83.195     83.354     250.70      2     0.33     AB-08
+2132.50       83.503     83.669     248.75      2     2.37     AB-08
+2132.66       83.600     83.766     237.44      2     2.38     AB-08
+2134.46       84.687     84.855     240.19      2     1.00     AB-08
+2134.70       84.828     84.996     240.36      2     1.19     AB-08
+2135.22       85.133     85.301     233.84      2     0.20     AB-08
+2135.97       85.572     85.740     241.73      2     1.76     AB-08
+2136.25       85.734     85.902     220.23      2     5.01     AB-08
+2136.93       86.127     86.295     225.72      2     1.15     AB-08
+2137.57       86.498     86.666     228.99      3     1.73     AB-08
+2138.02       86.764     86.932     229.26      2     1.58     AB-08
+2138.32       86.942     87.110     218.37      2     0.94     AB-08
+2138.79       87.221     87.389     222.25      2     1.43     AB-08
+2143.57       90.075     90.266     236.19      5     2.31     AB-08
+2144.02       90.342     90.534     235.65      2     2.86     AB-08
+2144.72       90.759     90.953     242.07      3     4.54     AB-08
+
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/edc-co2.txt
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/edc-co2.txt	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/edc-co2.txt	(revision 11831)
@@ -0,0 +1,620 @@
+EPICA Dome C Ice Core High Resolution Holocene and Transition CO2 Data
+-----------------------------------------------------------------------
+               World Data Center for Paleoclimatology, Boulder
+                                  and
+                     NOAA Paleoclimatology Program
+-----------------------------------------------------------------------
+NOTE: PLEASE CITE CONTRIBUTORS WHEN USING THIS DATA!!!!!
+
+
+NAME OF DATA SET: 
+EPICA Dome C Ice Core High Resolution Holocene and Transition CO2 Data
+LAST UPDATE: 9/2004 (Original receipt by WDC Paleo)
+CONTRIBUTOR:  Eric Monnin, University of Bern
+IGBP PAGES/WDCA CONTRIBUTION SERIES NUMBER: 2004-055
+
+
+SUGGESTED DATA CITATION: Monnin, E., et al.. 2004. 
+EPICA Dome C Ice Core High Resolution Holocene and Transition CO2 Data. 
+IGBP PAGES/World Data Center for Paleoclimatology 
+Data Contribution Series # 2004-055.
+NOAA/NGDC Paleoclimatology Program, Boulder CO, USA.
+
+
+ORIGINAL REFERENCE:  
+Monnin, E., E.J. Steig, U. Siegenthaler, K. Kawamura, J. Schwander, B. Stauffer, 
+T.F. Stocker, D.L. Morse, J.-M. Barnola, B. Bellier, D. Raynaud, and H. Fischer. 2004.  
+Evidence for substantial accumulation rate variability in Antarctica during the Holocene, 
+through synchronization of CO2 in the Taylor Dome, Dome C and DML ice cores. 
+Earth and Planetary Science Letters, 224, 45-54, doi: 10.1016/j.epsl.2004.05.007. 
+
+
+ADDITIONAL REFERENCES FOR DATA:
+Flückiger, J.,  E. Monnin, B. Stauffer, J. Schwander, T. F. Stocker, J. Chappellaz, 
+D. Raynaud and J.-M. Barnola.  2002.
+High resolution Holocene N2O ice core record and its relationship with CH4 and CO2. 
+Global Biogeochemical Cycles, 16 (1), 1010, doi:10.1029/2001GB001417.
+
+Monnin, E., A. Indermühle, A. Dällenbach, J. Flückiger, B. Stauffer, T. F. Stocker, 
+D. Raynaud, and J.-M. Barnola.  2001. 
+Atmospheric CO2 concentrations over the last glacial termination. 
+Science 291, 112-114.
+
+ 
+ADDITIONAL REFERENCE FOR DATING:
+Schwander, J., J. Jouzel, C. U. Hammer, J.-R. Petit, R. Udisti, and E. Wolff. 2001.
+A tentative chronology for the EPICA Dome Concordia ice core. 
+Geophys. Res. Lett. Vol. 28, No. 22, p. 4243.
+
+
+ABSTRACT (Monnin et al. 2004):
+High resolution records of atmospheric CO2 concentration during the Holocene 
+are obtained from the Dome Concordia and Dronning Maud Land (Antarctica) ice cores. 
+These records confirm that the CO2 concentration varied between 260 and 280 ppmv in 
+the Holocene as measured in the Taylor Dome ice core. However, there are differences 
+in the CO2 records most likely caused by mismatches in timescales. Matching the 
+Taylor Dome timescale to the Dome C timescale by synchronization of CO2 indicates that 
+the accumulation rate at Taylor Dome increased through the Holocene by a factor of two 
+and bears little resemblance to the stable isotope record used as a proxy for temperature. 
+This result shows that different locations experienced substantially different 
+accumulation changes, and casts doubt on the often-used assumption that accumulation 
+rate scales with the saturation vapor pressure as a function of temperature, at least 
+for coastal locations. 
+
+
+GEOGRAPHIC REGION: Antarctica
+PERIOD OF RECORD:  22 KYrBP - present
+
+
+DESCRIPTION: High Resolution CO2 Data for the EPICA Dome C ice core, 
+and derived timescale for Taylor Dome Ice Core. 
+
+
+Core locations: 
+EPICA Dome C:  75° 06'S, 123° 21'E 
+Dronning Maud Land (DML): 75° 00'S, 00° 04'E 
+Taylor Dome:  77° 47'47" S,  158° 43'26" E
+
+
+
+
+Data:
+1. High-resolution EDC CO2 data
+
+Column 1: Depth (m)
+Column 2: Age (Years before 1950 AD, EDC1 Timescale)
+Column 3: CO2 mean (ppmv)
+Column 4: CO2 sigma mean (ppmv) sigma mean is one sigma of the mean value 
+          (of 6 neighboring samples)
+
+
+  Depth      Age    CO2      sigma
+  102.83     173   280.4     1.8
+ 106.885     311   274.9     0.7
+ 107.195     322   277.9     0.7
+ 110.245     427   279.1     1.3
+   110.5     435   281.9     1.1
+ 113.265     530   277.7     0.7
+  115.48     604   281.1     1.1
+ 118.615     709   282.2     0.5
+   121.5     806   280.1     0.6
+ 124.815     917   278.4     1.5
+ 127.015     991   276.6     1.4
+ 129.745    1083   279.1       1
+   132.5    1175   277.7     1.2
+ 134.715    1249   278.7     1.2
+ 138.015    1362   277.4     0.8
+ 141.295    1477   279.2     0.9
+  144.05    1574     280     0.8
+ 146.265    1653   278.9     0.8
+ 149.015    1751   278.7     0.7
+ 151.195    1830     278     1.2
+   154.5    1948   276.9     0.7
+ 157.815    2069   276.7     0.8
+  160.03    2150   276.7     0.8
+ 162.165    2228   277.6     1.3
+ 165.515    2352   277.9     0.5
+  168.28    2453   273.9     1.1
+     171    2550   278.9     0.6
+ 173.135    2625   275.3     1.6
+ 176.515    2743   274.7     1.2
+ 178.715    2820   276.3     0.9
+ 181.445    2918   274.6     0.8
+ 185.845    3078   276.3     1.5
+ 187.515    3138   273.1     1.1
+ 189.715    3219     274     0.3
+     193    3337     275     0.6
+ 196.295    3454   273.4     1.3
+ 198.515    3531     273     0.8
+  201.28    3628   271.5       1
+     204    3724   275.4     0.5
+ 206.195    3802   274.9     1.3
+ 209.515    3921   271.7       1
+ 212.265    4019   271.6     0.7
+     215    4117   272.8     0.8
+ 216.645    4176   271.5     0.9
+  221.05    4335   271.1     0.8
+ 222.715    4395   269.1     0.6
+  225.48    4496   269.8       1
+ 228.195    4596   271.5     0.8
+  232.05    4737   270.7     0.5
+ 233.715    4797   269.3       1
+ 236.465    4895   268.6     1.1
+ 240.265    5033   269.8     1.2
+   242.5    5114   267.6     0.6
+ 244.715    5196   265.3     1.7
+ 248.015    5318   265.2     0.8
+ 250.715    5419   267.6       2
+   253.5    5521   265.9     0.9
+ 256.265    5621   265.5     0.8
+ 259.015    5721   260.7     1.6
+ 260.645    5780   266.7     0.9
+   264.5    5921   265.5     0.8
+ 268.365    6064   263.2     0.6
+ 269.415    6102   262.7     0.9
+ 272.195    6205   261.2     0.7
+ 276.065    6349   261.1     0.4
+ 278.265    6430   259.4     0.6
+  280.53    6514   262.1     0.9
+ 283.715    6631   262.9     0.5
+ 285.965    6713   258.1     1.4
+ 288.165    6792   257.6     0.9
+     292    6930   262.3     0.9
+ 294.745    7031     263     0.7
+ 297.515    7132   260.7     0.6
+ 299.715    7211   258.4     0.8
+     303    7328   260.1     0.6
+ 305.745    7424   260.4     0.4
+ 308.515    7521   259.7     0.9
+  311.26    7617   259.2     0.7
+ 313.995    7714   260.8     1.4
+ 316.745    7813   259.6     0.5
+ 319.515    7915   259.3     0.9
+ 322.265    8017   258.3     1.2
+     325    8118   261.3     0.9
+ 326.545    8174   260.7     0.4
+   330.5    8315   261.8       1
+ 333.265    8412     259     1.1
+ 336.015    8508   260.9     0.7
+ 338.645    8599   260.4     0.6
+   341.5    8697   259.3       1
+ 343.715    8772     262     0.8
+ 347.015    8883   263.7     1.2
+ 349.745    8974   263.8     0.8
+  352.58    9067   265.2     0.9
+ 355.815    9171   260.6     1.7
+ 357.465    9224   260.9     0.6
+ 360.195    9310     263     0.4
+  362.98    9399   263.8     1.2
+ 369.545    9604   264.4     0.4
+  371.23    9657   264.2     0.9
+ 375.045    9776     264     0.3
+ 377.265    9846   263.4     0.1
+ 379.995    9931   265.7     0.5
+ 382.215   10001   264.9     0.4
+ 385.125   10093   267.5     0.4
+ 388.225   10192   266.9     0.6
+ 390.445   10263     266     1.1
+  393.78   10370   265.1     1.6
+ 396.495   10458   267.6     0.7
+  399.28   10550   264.8     0.6
+ 401.995   10640   264.8     0.4
+ 404.185   10712     265     0.8
+  404.78   10732   265.3     0.4
+ 406.385   10785   264.4     1.5
+ 407.495   10822   264.1     0.7
+   409.7   10896   264.2     1.1
+  411.38   10952   264.5     0.4
+  413.03   11008     264     0.5
+  414.75   11066     263     1.3
+  415.73   11099   265.2     0.8
+ 417.065   11144   258.8     0.7
+  418.53   11195   260.8     0.5
+ 420.485   11263   255.4     0.3
+ 421.795   11310   253.9     0.6
+   422.9   11349   253.8     0.8
+   426.1   11468   250.7     1.1
+  427.33   11515   249.7     0.4
+   428.3   11554   251.1     0.3
+ 429.495   11602   250.7     0.9
+  431.73   11695   245.3     1.1
+ 433.785   11784   245.3     0.6
+ 434.995   11838   246.6     0.5
+  437.23   11941   243.2     0.4
+  438.85   12017   240.3     0.3
+ 443.795   12258   237.5     0.5
+  446.03   12372   237.6     0.6
+ 448.745   12511   234.2     0.3
+  450.98   12625   238.3     1.1
+ 454.245   12789   237.3     0.5
+  457.03   12927   237.9     0.2
+ 459.895   13068   237.6     0.6
+  463.63   13252   236.4     0.9
+ 465.245   13332   239.2     0.5
+  467.45   13440   238.6     0.6
+ 470.195   13574   238.6     0.3
+ 473.055   13711   239.1     0.4
+ 479.705   14022   228.5     0.6
+   484.1   14230   228.4     0.7
+ 487.245   14387   226.1     0.6
+  490.03   14532   225.2     0.5
+ 492.195   14647   224.5     0.6
+  496.07   14855     222     0.8
+ 499.345   15037     221     0.8
+  501.58   15166   220.9     0.5
+ 504.195   15323   219.4     0.6
+  506.53   15466     214     0.8
+ 509.245   15637   207.5     0.9
+  512.03   15818   207.7     0.5
+ 514.745   16002   202.9     0.7
+  517.53   16199   200.8       1
+ 520.245   16400   195.2     0.3
+  523.03   16616   193.9     0.5
+ 526.295   16883     191     0.5
+  528.53   17073   188.5     0.7
+ 531.245   17311   188.5     0.7
+  532.93   17463   189.2     0.4
+ 536.745   17815     187     0.2
+  539.53   18074   188.6     0.5
+   542.9   18391   189.4     0.4
+ 543.345   18433   192.3     0.6
+  543.93   18487   188.3     0.6
+ 548.845   18948   188.7     0.2
+  550.51   19104   188.8     0.5
+ 553.245   19360     190     0.8
+  556.03   19621     188     0.9
+  557.89   19795   188.2     0.7
+ 558.195   19824     195     0.7
+  561.53   20137   187.8     0.4
+  564.26   20390   186.9     0.3
+  567.03   20646   186.5     0.3
+ 569.745   20897   184.7     1.2
+  572.53   21156   186.1     0.4
+ 576.325   21511   185.7     1.3
+ 578.105   21676   184.4     0.8
+
+
+2.  CO2 synchronization timescale for Taylor Dome Ice Core
+
+A. Gas age:
+
+ depth(m)    gas age (yr BP 1950)
+      86       94.5
+      90      149.2
+      94      205.2
+      98      260.9
+     102      316.2
+     106        372
+     110      427.9
+     114      483.7
+     118      540.1
+     122      598.1
+     126      658.4
+     130      722.7
+     134      790.3
+     138      860.5
+   142.1      929.8
+   146.1      995.5
+   150.1     1058.1
+   154.1     1119.4
+   158.1     1180.7
+   162.1     1243.2
+   166.1       1308
+   170.1     1377.6
+   174.1     1454.7
+   178.1     1539.6
+   182.1       1633
+   186.1     1731.9
+   190.1     1835.6
+   194.1       1940
+   198.1     2045.1
+   202.1       2150
+   206.1     2254.5
+   210.1     2361.9
+   214.1     2475.5
+   218.1     2594.6
+   222.1     2715.6
+   226.1     2835.7
+   230.1     2954.2
+   234.1     3070.8
+   238.1     3188.2
+   242.1       3308
+   246.1     3429.6
+   250.1     3550.6
+   254.2     3670.1
+   258.2     3787.9
+   262.2     3905.9
+   266.2     4026.1
+   270.2     4153.3
+   274.2     4295.3
+   278.2     4454.1
+   282.2     4629.4
+   286.2       4814
+   290.2     4998.6
+   294.2     5174.8
+   298.2     5342.8
+   302.2     5507.9
+   306.2     5674.9
+   310.2     5846.8
+   314.2     6031.1
+   318.2     6242.5
+   322.2       6502
+   326.2     6830.5
+   330.2     7238.7
+   334.2     7710.2
+   338.2     8215.9
+   342.2     8735.9
+   346.2     9226.8
+   350.2     9762.8
+   354.2    10289.2
+   358.2    10720.5
+   362.3    11224.1
+
+
+
+B. Ice age:
+
+ depth(m)    ice age (yr BP 1950)
+      86     730.1
+    87.3     746.9
+    88.5     763.6
+    89.7     780.4
+    90.9     797.2
+      92     813.9
+    93.2     830.5
+    94.4       847
+    95.5     863.4
+    96.7     879.7
+    97.8     895.9
+    98.9     912.1
+     100     928.3
+   101.2     944.6
+   102.3     961.1
+   103.4     977.6
+   104.6     994.2
+   105.7    1010.5
+   106.8    1026.6
+   107.9    1042.7
+     109      1059
+   110.1    1075.2
+   111.1    1091.5
+   112.2    1107.9
+   113.3    1124.3
+   114.4    1140.8
+   115.5    1157.4
+   116.5      1174
+   117.6    1190.8
+   118.6    1207.9
+   119.7      1225
+   120.8    1242.2
+   121.8    1259.8
+   122.9    1277.8
+   123.9    1295.9
+     125    1314.1
+     126    1332.7
+   127.1    1351.4
+   128.1      1370
+   129.2    1388.5
+   130.2    1407.3
+   131.2    1426.3
+   132.3      1445
+   133.3    1463.6
+   134.4    1482.2
+   135.4    1500.9
+   136.5    1519.5
+   137.5    1537.9
+   138.5      1556
+   139.6    1573.9
+   140.6    1591.7
+   141.6    1609.4
+   142.7    1626.8
+   143.7    1644.1
+   144.7    1661.2
+   145.7    1678.1
+   146.8    1694.6
+   147.8      1711
+   148.8    1727.5
+   149.8    1743.9
+   150.9    1760.3
+   151.9    1776.6
+   152.9    1793.1
+   153.9    1809.6
+   154.9    1826.2
+     156    1842.9
+     157    1859.6
+     158    1876.5
+     159    1893.5
+     160    1910.6
+     161    1927.7
+   162.1    1945.1
+   163.1    1962.8
+   164.1    1980.5
+   165.1    1998.3
+   166.1      2017
+   167.1    2036.8
+   168.1    2056.8
+   169.1    2077.2
+   170.2    2098.8
+   171.2    2121.7
+   172.2      2145
+   173.2    2168.6
+   174.2    2193.2
+   175.2      2219
+   176.2    2244.7
+   177.2    2270.3
+   178.2    2296.7
+   179.3    2323.9
+   180.3      2351
+   181.3    2378.2
+   182.3      2406
+   183.3    2434.1
+   184.3    2462.3
+   185.3    2490.5
+   186.3    2519.3
+   187.3    2548.5
+   188.3    2577.7
+   189.3    2606.7
+   190.4    2635.8
+   191.4      2665
+   192.4    2694.1
+   193.4    2723.2
+   194.4    2752.3
+   195.4    2781.6
+   196.4    2810.8
+   197.4    2839.9
+   198.4    2868.9
+   199.4    2897.8
+   200.4    2926.4
+   201.4    2954.9
+   202.4      2983
+   203.5    3010.9
+   204.5    3038.5
+   205.5      3066
+   206.5    3093.6
+   207.5    3121.2
+   208.5    3148.4
+   209.5    3175.7
+   210.5    3203.4
+   211.5    3231.3
+   212.5      3259
+   213.5    3286.9
+   214.5    3315.4
+   215.5    3344.4
+   216.5    3373.3
+   217.5    3402.5
+   218.6    3431.9
+   219.6    3461.4
+   220.6    3490.9
+   221.6    3520.3
+   222.6    3549.6
+   223.6      3579
+   224.6    3608.4
+   225.6    3637.6
+   226.6    3666.2
+   227.6    3694.6
+   228.6      3723
+   229.6      3751
+   230.6    3778.4
+   231.6    3805.5
+   232.6    3832.5
+   233.6    3859.3
+   234.6      3886
+   235.7    3912.7
+   236.7    3939.3
+   237.7      3966
+   238.7    3992.9
+   239.7    4020.1
+   240.7    4047.4
+   241.7    4074.9
+   242.7    4102.9
+   243.7    4130.9
+   244.7    4158.9
+   245.7    4186.9
+   246.7    4215.2
+   247.7    4243.7
+   248.7    4272.2
+   249.7    4300.6
+   250.8    4328.8
+   251.8    4357.3
+   252.8    4385.9
+   253.8    4414.9
+   254.8    4444.3
+   255.8    4474.3
+   256.8    4504.4
+   257.8    4534.8
+   258.8    4565.6
+   259.8    4596.7
+   260.8      4628
+   261.8    4659.4
+   262.8    4691.3
+   263.8    4723.4
+   264.8    4755.4
+   265.8    4788.2
+   266.8    4821.8
+   267.9    4855.7
+   268.9    4889.6
+   269.9    4924.9
+   270.9    4961.8
+   271.9    4999.1
+   272.9    5036.2
+   273.9    5074.7
+   274.9      5115
+   275.9    5155.8
+   276.9    5196.5
+   277.9    5238.6
+   278.9    5282.7
+   279.9    5327.3
+   280.9    5371.8
+   281.9    5417.1
+   282.9    5463.7
+   283.9    5510.6
+   284.9    5557.4
+   285.9    5604.1
+   286.9    5650.6
+     288    5697.3
+     289    5743.8
+     290    5789.3
+     291    5833.8
+     292    5878.1
+     293    5922.3
+     294    5965.5
+     295    6007.8
+     296    6050.3
+     297      6093
+     298    6135.2
+     299    6177.2
+     300    6219.5
+     301    6262.3
+     302    6305.5
+     303    6349.4
+     304    6393.8
+     305    6438.7
+     306    6484.6
+     307    6531.7
+     308    6579.1
+     309    6626.8
+     310    6676.5
+     311    6728.2
+     312    6780.3
+   313.1    6832.7
+   314.1    6888.4
+   315.1    6947.6
+   316.1    7007.4
+   317.1    7067.1
+   318.1    7132.1
+   319.1    7203.1
+   320.1    7274.9
+   321.1    7346.6
+   322.1      7426
+   323.1    7514.1
+   324.1    7603.5
+   325.1    7693.4
+   326.1    7792.7
+   327.1    7902.5
+   328.1    8013.9
+   329.1    8125.8
+   330.1    8245.7
+   331.1    8373.8
+   332.1    8502.4
+   333.1    8630.8
+   334.1    8761.6
+   335.1    8894.5
+   336.1    9026.4
+   337.1    9157.7
+   338.1    9290.6
+   339.1    9425.8
+   340.1    9561.1
+   341.2    9695.7
+   342.2    9826.2
+   343.2    9951.2
+   344.2   10075.6
+   345.2   10201.2
+   346.2   10331.7
+   347.2   10467.7
+   348.2   10603.6
+   349.2   10739.5
+   350.2   10873.8
+   351.2   11006.9
+   352.2   11139.9
+   353.2     11273
+
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/introduction.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/introduction.tex	(revision 11086)
+++ 	(revision )
@@ -1,47 +1,0 @@
-\documentclass[../../NEMO/main/NEMO_manual]{subfiles}
-\begin{document}
-% ================================================================
-% INTRODUCTION
-% ================================================================
-
-\chapter*{Introduction}
-
-TOP (Tracers in the Ocean Paradigm) handles oceanic passive tracers in NEMO. At present, this component provides the physical constraints and boundaries conditions for oceanic tracers transport and represents a generalized, hardwired interface toward biogeochemical models to enable a seamless coupling.
-
-It includes three independent components :  
-
-\begin{itemize}
-        \item a transport code TRP sharing the same advection/diffusion routines with the dynamics, with specific treatment of some features like the surface boundary
-conditions, or the positivity of passive tracers concentrations
-        \item sources and sinks - SMS - models that can be typically biogeochemical, biological or radioactive
-        \item an offline option which is a simplified OPA 9 model using fields of physics variables that are previously stored to disk
-\end{itemize}
-
-There is two ways of coupling TOP to the dynamics :
-
-\begin{itemize}
-        \item \textit{online coupling} : the evolution of passive tracers is computed along with the dynamics
-        \item \textit{offline coupling} : the fields of physics variables are read from files and interpolated at each model time step, with no constraints on the time sampling in the input files
-\end{itemize}
-
-TOP is designed to handle multiple oceanic tracers through a modular approach and it includes different sub-modules :
-
-\begin{itemize}
-        \item the ocean water age module (AGE) tracks down the time-dependent spread of surface waters into the ocean interior
-        \item inorganic carbon (e.g. CFCs, SF6) and radiocarbon (C14) passive tracers can be modeled to assess ocean absorption timescales of anthropogenic emissions and further address water masses ventilation
-        \item a built-in biogeochemical model (PISCES) to simulate lower trophic levels ecosystem dynamics in the global ocean
-        \item a prototype tracer module (MY\_TRC) to enable user-defined cases or the coupling with alternative biogeochemical models ( e.g. BFM, MEDUSA, ERSEM, BFM, ECO3M)
-\end{itemize}
-
-\begin{figure}[ht]        
-\begin{center}
-\vspace{0cm}
-\includegraphics[width=0.80\textwidth]{Fig_TOP_design}
-%\includegraphics[height=6cm,angle=-00]{Fig_TOP_design}
-\caption{A schematic view of NEMO-TOP component}
-\label{topdesign}
-\end{center}   
-\end{figure}
-
-\end{document}
-
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/keys.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/keys.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/keys.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/keys.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/miscellaneous.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/miscellaneous.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/miscellaneous.tex	(revision 11831)
@@ -1,3 +1,3 @@
-\documentclass[../../NEMO/main/NEMO_manual]{subfiles}
+\documentclass[../main/TOP_manual]{subfiles}
 
 \begin{document}
@@ -43,5 +43,5 @@
 \begin{minted}{bash}
    bld::tool::fppkeys   key_iomput key_mpp_mpi key_top
-   
+
    src::MYBGC::initialization         <MYBGCPATH>/initialization
    src::MYBGC::pelagic                <MYBGCPATH>/pelagic
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/model_description.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/model_description.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/model_description.tex	(revision 11831)
@@ -1,3 +1,3 @@
-\documentclass[../../NEMO/main/NEMO_manual]{subfiles}
+\documentclass[../main/TOP_manual]{subfiles}
 
 \newcommand{\cd}{\mathrm{CO_2}}
@@ -14,5 +14,5 @@
 \chapter{Model Description}
 \label{chap:ModDes}
-\minitoc
+\chaptertoc
 
 \section{Basics}
@@ -26,11 +26,11 @@
 \end{equation}
 
-where expressions of $D^{lC}$ and $D^{vC}$ depend on the choice for the lateral and vertical subgrid scale parameterizations, see equations 5.10 and 5.11 in \citep{nemo_manual} 
+where expressions of $D^{lC}$ and $D^{vC}$ depend on the choice for the lateral and vertical subgrid scale parameterizations, see equations 5.10 and 5.11 in \citep{nemo_manual}
 
 {S(C)} , the first term on the right hand side of \ref{Eq_tracer}; is the SMS - Source Minus Sink - inherent to the tracer.  In the case of biological tracer such as phytoplankton, {S(C)} is the balance between phytoplankton growth and its decay through mortality and grazing. In the case of a tracer comprising carbon,  {S(C)} accounts for gas exchange, river discharge, flux to the sediments, gravitational sinking and other biological processes. In the case of a radioactive tracer, {S(C)} is simply loss due to radioactive decay.
 
-The second term (within brackets) represents the advection of the tracer in the three directions. It can be interpreted as the budget between the incoming and outgoing tracer fluxes in a volume $T$-cells $b_t= e_{1t}\,e_{2t}\,e_{3t}$ 
-
-The third term  represents the change due to lateral diffusion. 
+The second term (within brackets) represents the advection of the tracer in the three directions. It can be interpreted as the budget between the incoming and outgoing tracer fluxes in a volume $T$-cells $b_t= e_{1t}\,e_{2t}\,e_{3t}$
+
+The third term  represents the change due to lateral diffusion.
 
 The fourth term is change due to vertical diffusion, parameterized as eddy diffusion to represent vertical turbulent fluxes :
@@ -68,5 +68,5 @@
 
 The passive tracer transport component  shares the same advection/diffusion routines with the dynamics, with specific treatment of some features like the surface boundary conditions, or the positivity of passive tracers concentrations.
- 
+
  \subsection{ Advection}
 %------------------------------------------namtrc_adv----------------------------------------------------
@@ -80,14 +80,14 @@
 \nlst{namtrc_ldf}
 %-------------------------------------------------------------------------------------------------------------
-In NEMO v4.0, the passive tracer diffusion has necessarily the same form as the active tracer diffusion, meaning that the numerical scheme must be the same. However the passive tracer mixing coefficient can be chosen as a multiple of the active ones by changing the value of \textit{rn\_ldf\_multi} in namelist \textit{namtrc\_ldf}. The choice of numerical scheme is then set  in the \ngn{namtra\_ldf} namelist for the dynamic described in section 5.2 of \citep{nemo_manual}. 
+In NEMO v4.0, the passive tracer diffusion has necessarily the same form as the active tracer diffusion, meaning that the numerical scheme must be the same. However the passive tracer mixing coefficient can be chosen as a multiple of the active ones by changing the value of \textit{rn\_ldf\_multi} in namelist \textit{namtrc\_ldf}. The choice of numerical scheme is then set  in the \nam{namtra_ldf}{namtra\_ldf} namelist for the dynamic described in section 5.2 of \citep{nemo_manual}.
 
 
 %-----------------We also offers the possibility to increase zonal equatorial diffusion for passive tracers by introducing an enhanced zonal diffusivity coefficent in the equatorial domain which can be defined by the equation below :
 %-----------------\begin{equation} \label{eq:traqsr_iradiance}
-%-----------------Aht  = Aht *  rn_fact_lap * \exp( - \max( 0., z -1000  ) / 1000}  \quad \text{for $L=1$ to $N$}  
+%-----------------Aht  = Aht *  rn_fact_lap * \exp( - \max( 0., z -1000  ) / 1000}  \quad \text{for $L=1$ to $N$}
 %-----------------\end{equation}
 
  \subsection{ Tracer damping}
- 
+
 %------------------------------------------namtrc_dmp----------------------------------------------------
 \nlst{namtrc_dmp}
@@ -95,8 +95,8 @@
 
 The use of newtonian damping  to climatological fields or observations is also coded, sharing the same routine dans active tracers. Boolean variables are defined in the namelist\_top\_ref to select the tracers on which restoring is applied
-Options are defined through the  \ngn{namtrc\_dmp} namelist variables. The restoring term is added when the namelist parameter \np{ln\_trcdmp} is set to true. The restoring coefficient is a three-dimensional array read in a file, which name is specified by the namelist variable \np{cn\_resto\_tr}. This netcdf file can be generated using the DMP\_TOOLS tool.
+Options are defined through the \nam{namtrc_dmp}{namtrc\_dmp} namelist variables. The restoring term is added when the namelist parameter \np{ln\_trcdmp} is set to true. The restoring coefficient is a three-dimensional array read in a file, which name is specified by the namelist variable \np{cn\_resto\_tr}. This netcdf file can be generated using the DMP\_TOOLS tool.
 
  \subsection{ Tracer positivity}
- 
+
 %------------------------------------------namtrc_rad----------------------------------------------------
 \nlst{namtrc_rad}
@@ -104,5 +104,5 @@
 
 Sometimes, numerical scheme can generates negative values of passive tracers concentration that must be positive. For exemple,  isopycnal diffusion can created extrema. The trcrad routine artificially corrects negative concentrations with a very crude solution that either sets negative concentration to zero without adjusting the tracer budget, or by removing negative concentration and keeping mass conservation.
-The treatment of negative concentrations is an option and can be selected in the namelist \ngn{namtrc\_rad} by setting the parameter \np{ln\_trcrad}  to true.
+The treatment of negative concentrations is an option and can be selected in the namelist \nam{namtrc_rad}{namtrc\_rad} by setting the parameter \np{ln\_trcrad}  to true.
 
 \section{The SMS modules}
@@ -160,5 +160,5 @@
 As can be seen in the figure, while the concentration of SF6 continues to rise to the present  day, the concentrations of both CFC-11 and CFC-12 have levelled off and declined since around the 1990s.
 These declines have been driven by the Montreal Protocol (effective since August 1989), which has banned the production of CFC-11 and CFC-12 (as well as other CFCs) because of their role in the depletion of
-stratospheric ozone (O$_{3}$), critical in decreasing the flux of ultraviolet radiation to the Earth's surface. Separate to this role in ozone-depletion, all three chemicals are significantly more potent greenhouse gases 
+stratospheric ozone (O$_{3}$), critical in decreasing the flux of ultraviolet radiation to the Earth's surface. Separate to this role in ozone-depletion, all three chemicals are significantly more potent greenhouse gases
 than CO$_{2}$ (especially SF6), although their relatively low atmospheric concentrations limit their role in climate change. \\
 
@@ -168,7 +168,7 @@
 % concentrations increased until around the late 1990s afterwhich they began to decline in
 % response to the Montreal Protocol.
-% In the case of SF6, release began in the 1950s 
+% In the case of SF6, release began in the 1950s
 % This release began in the 1930s for CFC-11 and CFC-12, and the 1950s for SF6, and
-% regularly increasing their atmospheric concentration until the 1090s, 2000s for respectively CFC11, CFC12, 
+% regularly increasing their atmospheric concentration until the 1090s, 2000s for respectively CFC11, CFC12,
 % and is still increasing, and SF6 (see Figure \ref{img_cfcatm}).  \\
 
@@ -177,5 +177,5 @@
 Because they only enter the ocean via surface air-sea exchange, and are almost completely chemically and biologically inert, their distribution within the ocean interior reveals its ventilation via transport and mixing.
 Measuring the dissolved concentrations of the gases -- as well as the mixing ratios between them -- shows circulation pathways within the ocean as well as water mass ages (i.e. the time since last contact with the
-atmosphere). This feature of the gases has made them valuable across a wide range of oceanographic problems. One use lies in ocean modelling, where they can be used to evaluate the realism of the circulation and 
+atmosphere). This feature of the gases has made them valuable across a wide range of oceanographic problems. One use lies in ocean modelling, where they can be used to evaluate the realism of the circulation and
 ventilation of models, key for understanding the behaviour of wider modelled marine biogeochemistry (e.g. \citep{dutay_2002,palmieri_2015}). \\
 
@@ -183,7 +183,7 @@
 
 Advection and diffusion of the CFCs in NEMO are calculated by the physical module, OPA,
-whereas sources and sinks are done by the CFC module within TOP. 
-The only source for CFCs in the ocean is via air-sea gas exchange at its surface, and since CFCs are generally 
-stable within the ocean, we assume that there are no sinks (i.e. no loss processes) within the ocean interior. 
+whereas sources and sinks are done by the CFC module within TOP.
+The only source for CFCs in the ocean is via air-sea gas exchange at its surface, and since CFCs are generally
+stable within the ocean, we assume that there are no sinks (i.e. no loss processes) within the ocean interior.
 Consequently, the sinks-minus-sources term for CFCs consists only of their air-sea fluxes, $F_{cfc}$, as
 described in the Ocean Model Inter-comparison Project (OMIP) protocol \citep{orr_2017}:
@@ -196,9 +196,9 @@
 F_{cfc} = K_{w} \, \cdot \, (C_{sat} - C_{surf}) \, \cdot  \, (1 - f_{i})
 \label{equ_CFC_flux}
-\end{eqnarray}  
-
-Where $K_{w}$ is the piston velocity (in m~s$^{-1}$), as defined in Equation \ref{equ_Kw}; 
-$C_{sat}$ is the saturation concentration of the CFC tracer, as defined in Equation \ref{equ_C_sat}; 
-$C_{surf}$ is the local surface concentration of the CFC tracer within the model (in mol~m$^{-3}$); 
+\end{eqnarray}
+
+Where $K_{w}$ is the piston velocity (in m~s$^{-1}$), as defined in Equation \ref{equ_Kw};
+$C_{sat}$ is the saturation concentration of the CFC tracer, as defined in Equation \ref{equ_C_sat};
+$C_{surf}$ is the local surface concentration of the CFC tracer within the model (in mol~m$^{-3}$);
 and $f_{i}$ is the fractional sea-ice cover of the local ocean (ranging between 0.0 for ice-free ocean,
 through to 1.0 for completely ice-covered ocean with no air-sea exchange).
@@ -209,15 +209,15 @@
 C_{sat} = Sol \, \cdot \, P_{cfc}
 \label{equ_C_sat}
-\end{eqnarray}  
-
-Where $Sol$ is the gas solubility in mol~m$^{-3}$~pptv$^{-1}$, as defined in Equation \ref{equ_Sol_CFC}; 
+\end{eqnarray}
+
+Where $Sol$ is the gas solubility in mol~m$^{-3}$~pptv$^{-1}$, as defined in Equation \ref{equ_Sol_CFC};
 and $P_{cfc}$ is the atmosphere concentration of the CFC (in parts per trillion by volume, pptv).
 This latter concentration is provided to the model by the historical time-series of \citet{bullister_2017}.
-This includes bulk atmospheric concentrations of the CFCs for both hemispheres -- this is necessary because of 
-the geographical asymmetry in the production and release of CFCs to the atmosphere. 
-Within the model, hemispheric concentrations are uniform, with the exception of the region between 
+This includes bulk atmospheric concentrations of the CFCs for both hemispheres -- this is necessary because of
+the geographical asymmetry in the production and release of CFCs to the atmosphere.
+Within the model, hemispheric concentrations are uniform, with the exception of the region between
 10$^{\circ}$N and 10$^{\circ}$ in which they are linearly interpolated.
 
-The piston velocity $K_{w}$ is a function of 10~m wind speed (in m~s$^{-1}$) and sea surface temperature, 
+The piston velocity $K_{w}$ is a function of 10~m wind speed (in m~s$^{-1}$) and sea surface temperature,
 $T$ (in $^{\circ}$C), and is calculated here following \citet{wanninkhof_1992}:
 
@@ -225,8 +225,8 @@
 K_{w} = X_{conv} \, \cdot \, a \, \cdot \, u^2 \, \cdot \, \sqrt{ \frac{Sc(T)}{660} }
 \label{equ_Kw}
-\end{eqnarray} 
-
-Where $X_{conv}$ = $\frac{0.01}{3600}$, a conversion factor that changes the piston velocity 
-from cm~h$^{-1}$ to m~s$^{-1}$; 
+\end{eqnarray}
+
+Where $X_{conv}$ = $\frac{0.01}{3600}$, a conversion factor that changes the piston velocity
+from cm~h$^{-1}$ to m~s$^{-1}$;
 $a$ is a constant re-estimated by \citet{wanninkhof_2014} to 0.251 (in $\frac{cm~h^{-1}}{(m~s^{-1})^{2}}$);
 and $u$ is the 10~m wind speed in m~s$^{-1}$ from either an atmosphere model or reanalysis atmospheric forcing.
@@ -236,9 +236,9 @@
 Sc =  a0 + (a1 \, \cdot \, T) + (a2  \, \cdot \, T^2) + (a3 \, \cdot \, T^3) + (a4 \, \cdot \, T^4)
 \label{equ_Sc}
-\end{eqnarray} 
-
-The solubility, $Sol$, used in Equation \ref{equ_C_sat} is calculated in mol~l$^{-1}$~atm$^{-1}$, 
-and is specific for each gas. 
-It has been experimentally estimated by \citet{warner_1985} as a function of temperature 
+\end{eqnarray}
+
+The solubility, $Sol$, used in Equation \ref{equ_C_sat} is calculated in mol~l$^{-1}$~atm$^{-1}$,
+and is specific for each gas.
+It has been experimentally estimated by \citet{warner_1985} as a function of temperature
 and salinity:
 
@@ -246,5 +246,5 @@
 % code version that I have to hand, although this might be out of date; in any case, I'dag
 % strongly suggest avoiding the use of the \frac{}{100}, and instead substitute a term that is
-% "degrees Kelvin divided by 100" (which is weird in itself); and make this term use Celcius 
+% "degrees Kelvin divided by 100" (which is weird in itself); and make this term use Celcius
 % so that you're not using T twice in different ways
 
@@ -252,15 +252,15 @@
 \ln{(Sol)} = a_1 + \frac{a_2}{ T_{X}} + a_3 \, \cdot \, \ln{ T_{X} } + a_4 \, \cdot \, T_{X}^2 + S \, \cdot \, ( b_1 + b_2 \, \cdot \, T_{X} + b_3 \, \cdot \, T_{X}^2 )
 \label{equ_Sol_CFC}
-\end{eqnarray}  
+\end{eqnarray}
 
 % \begin{eqnarray}
 % \ln{(Sol)} = a1 + a2 \, \frac{100}{T} + a3 \, \ln{ (\frac{T}{100}) } + a4 \, \frac{T}{100}^2 + S \, ( b1 + b2 \, \frac{T}{100} + b3 \, \frac{T}{100}^2 )
 % \label{equ_Sol_CFC}
-% \end{eqnarray}  
-
-Where $T_{X}$ is $\frac{T + 273.16}{100}$, a function of temperature; 
+% \end{eqnarray}
+
+Where $T_{X}$ is $\frac{T + 273.16}{100}$, a function of temperature;
 and the $a_{x}$ and $b_{x}$ coefficients are specific for each gas (see Table \ref{tab_ref_CFC}).
 This is then converted to mol~m$^{-3}$~pptv$^{-1}$ assuming a constant atmospheric surface pressure of 1~atm.
-The solubility of CFCs thus decreases with rising $T$ while being relatively insensitive to salinity changes. 
+The solubility of CFCs thus decreases with rising $T$ while being relatively insensitive to salinity changes.
 Consequently, this translates to a pattern of solubility where it is greatest in cold, polar regions (see Figure \ref{img_cfcsol}).
 
@@ -289,6 +289,6 @@
 \centering
 \begin{tabular}{l l l l l l l l l}
-\hline 
-Gas   & & a1 & a2 & a3 & a4 & b1 & b2 & b3 \\          
+\hline
+Gas   & & a1 & a2 & a3 & a4 & b1 & b2 & b3 \\
 \hline
 CFC-11 & & -218.0971 & 298.9702 & 113.8049 & -1.39165 & -0.143566  & 0.091015   & -0.0153924 \\
@@ -296,5 +296,5 @@
 SF6    & & -80.0343  & 117.232  & 29.5817  & 0.0      & 0.0335183  & -0.0373942 & 0.00774862 \\
 \hline
-\end{tabular} 
+\end{tabular}
 \label{tab_ref_CFC}
 \end{table}
@@ -306,6 +306,6 @@
 \centering
 \begin{tabular}{l l l l l l l }
-\hline 
-Gas  & & a0 & a1 & a2 & a3 & a4 \\          
+\hline
+Gas  & & a0 & a1 & a2 & a3 & a4 \\
 \hline
 CFC-11 & & 3579.2  & -222.63 & 7.5749 & -0.14595 & 0.0011874   \\
@@ -313,5 +313,5 @@
 SF6    & & 3177.5  & -200.57 & 6.8865 & -0.13335 & 0.0010877   \\
 \hline
-\end{tabular} 
+\end{tabular}
 \label{tab_Sc}
 \end{table}
@@ -353,5 +353,5 @@
 %----------------------------------------------------------------------------------------------------------
 
-The C14 package implemented in NEMO by Anne Mouchet models ocean $\Dcq$. It offers several possibilities: $\Dcq$ as a physical tracer of the ocean ventilation (natural $\cq$), assessment of bomb radiocarbon uptake, as well as transient studies of paleo-historical ocean radiocarbon distributions. 
+The C14 package implemented in NEMO by Anne Mouchet models ocean $\Dcq$. It offers several possibilities: $\Dcq$ as a physical tracer of the ocean ventilation (natural $\cq$), assessment of bomb radiocarbon uptake, as well as transient studies of paleo-historical ocean radiocarbon distributions.
 
 \subsubsection{Method}
@@ -368,5 +368,5 @@
 
 This simplified approach also neglects the effects of fractionation (e.g.,  air-sea exchange) and of biological processes. Previous studies by \cite{bacastow_1990} and \cite{joos_1997} resulted in nearly identical $\Dcq$ distributions among experiments considering biology or not.
-Since observed $\Rq$ ratios are corrected for the isotopic fractionation when converted to the standard $\Dcq$ notation \citep{stuiver_1977} the model results are directly comparable to observations. 
+Since observed $\Rq$ ratios are corrected for the isotopic fractionation when converted to the standard $\Dcq$ notation \citep{stuiver_1977} the model results are directly comparable to observations.
 
 Therefore the simplified approach is justified for the purpose of assessing the circulation and ventilation of OGCMs.
@@ -425,5 +425,5 @@
 %The sensitivity to this parametrization is discussed in section \ref{sec:result}.
 %
-\item Chemical enhancement (term $b$  in Eq. \ref{eq:wanchem}) may be set on/off by means of the logical variable \CODE{ln\_chemh}. 
+\item Chemical enhancement (term $b$  in Eq. \ref{eq:wanchem}) may be set on/off by means of the logical variable \CODE{ln\_chemh}.
 \end{itemize}
 
@@ -464,5 +464,5 @@
 \end{figure}
 
-Performing this type of experiment requires that a pre-industrial equilibrium run be performed beforehand (\CODE{ln\_rsttr} should be set to \texttt{.TRUE.}). 
+Performing this type of experiment requires that a pre-industrial equilibrium run be performed beforehand (\CODE{ln\_rsttr} should be set to \texttt{.TRUE.}).
 
 An exception to this rule is when wishing to perform a perturbation bomb experiment as was possible with the package \texttt{C14b}. It is still possible to easily set-up that type of transient experiment for which no previous run is needed.  In addition to the instructions as given in this section it is however necessary to adapt the \texttt{atmc14.dat} file so that it does no longer contain any negative $\Dcq$ values (Suess effect in the pre-bomb period).
@@ -476,5 +476,5 @@
 \begin{itemize}
 \item Specify the starting date of the experiment: \CODE{nn\_date0} in \texttt{namelist}.  \CODE{nn\_date0} is written as Year0101 where Year may take any positive value (AD).
-\item Then the parameters \CODE{nn\_rstctl} in  \texttt{namelist} (on-line) and \CODE{nn\_rsttr} in \texttt{namelist\_top} (off-line)  must be \textbf{set to 0} at the start of the experiment (force the date to \CODE{nn\_date0} for the \textbf{first} experiment year). 
+\item Then the parameters \CODE{nn\_rstctl} in  \texttt{namelist} (on-line) and \CODE{nn\_rsttr} in \texttt{namelist\_top} (off-line)  must be \textbf{set to 0} at the start of the experiment (force the date to \CODE{nn\_date0} for the \textbf{first} experiment year).
 \item These two parameters (\CODE{nn\_rstctl} and \CODE{nn\_rsttr}) have then to be \textbf{set to 2} for the following years (the date must be read in the restart file).
 \end{itemize}
@@ -497,5 +497,5 @@
 
 The file \texttt{intcal13.14c} \citep{reimer_2013} contains atmospheric $\Dcq$ from 0 to 50 kyr cal BP\footnote{cal BP: number of years before 1950 AD}.
-The $\cd$ forcing is provided in file \texttt{ByrdEdcCO2.txt}. The content of this file is based on  the high resolution record from EPICA Dome C \citep{monnin_2004} for the Holocene and the Transition, and on Byrd Ice Core CO2 Data for 20--90 kyr BP  \citep{ahn_2008}. These atmospheric values are reproduced in Fig. \ref{fig:paleo}. Dates in these files are expressed as yr BP. 
+The $\cd$ forcing is provided in file \texttt{ByrdEdcCO2.txt}. The content of this file is based on  the high resolution record from EPICA Dome C \citep{monnin_2004} for the Holocene and the Transition, and on Byrd Ice Core CO2 Data for 20--90 kyr BP  \citep{ahn_2008}. These atmospheric values are reproduced in Fig. \ref{fig:paleo}. Dates in these files are expressed as yr BP.
 
 To ensure that the atmospheric forcing is applied properly as well as that output files contain consistent dates and inventories the experiment should be set up carefully.
@@ -519,13 +519,13 @@
 Field & Type & Dim & Units & Description \\ \hline
 RC14 & ptrc & 3-D & -        & Radiocarbon ratio \\
-DeltaC14 & diad & 3-D & \textperthousand & $\Dcq$\\ 
+DeltaC14 & diad & 3-D & \textperthousand & $\Dcq$\\
 C14Age & diad & 3-D & yr &   Radiocarbon age \\
 RAge & diad & 2-D & yr & Reservoir age\\
 qtr\_c14 &  diad & 2-D & m$^{-2}$ yr$^{-1}$ & Air-to-sea net $\Rq$ flux\\
 qint\_c14 & diad & 2-D &   m$^{-2}$ &  Cumulative air-to-sea $\Rq$ flux \\
-AtmCO2 & scalar & 0-D & ppm & Global atmospheric $\cd$ \\ 
-AtmC14 & scalar & 0-D & \textperthousand  & Global atmospheric $\Dcq$\\ 
-K\_CO2 & scalar & 0-D & cm h$^{-1}$  & Global $\cd$ piston velocity ($ \overline{\kappa_{\cd}}$) \\ 
-K\_C14 & scalar & 0-D &m yr$^{-1}$ & Global $\Rq$ transfer velocity  ($ \overline{\kappa_R}$)\\ 
+AtmCO2 & scalar & 0-D & ppm & Global atmospheric $\cd$ \\
+AtmC14 & scalar & 0-D & \textperthousand  & Global atmospheric $\Dcq$\\
+K\_CO2 & scalar & 0-D & cm h$^{-1}$  & Global $\cd$ piston velocity ($ \overline{\kappa_{\cd}}$) \\
+K\_C14 & scalar & 0-D &m yr$^{-1}$ & Global $\Rq$ transfer velocity  ($ \overline{\kappa_R}$)\\
 C14Inv & scalar & 0-D & $10^{26}$ atoms & Ocean radiocarbon inventory \\ \hline
 \end{tabular}
@@ -534,8 +534,8 @@
 \end{table}
 %!   Standard ratio: 1.176E-12 ; Avogadro's nbr = 6.022E+23 at/mol ; bomb C14 traditionally reported as 1.E+26 atoms
-%   REAL(wp), PARAMETER            :: atomc14=1.176*6.022E-15   ! conversion factor 
+%   REAL(wp), PARAMETER            :: atomc14=1.176*6.022E-15   ! conversion factor
 % atomc14 * xdicsur * zdum
 
-The radiocarbon age is computed as  $(-1/\lambda) \ln{ \left( \Rq \right)}$, with zero age corresponding to $\Rq=1$. 
+The radiocarbon age is computed as  $(-1/\lambda) \ln{ \left( \Rq \right)}$, with zero age corresponding to $\Rq=1$.
 
 The reservoir age is the age difference between the ocean uppermost layer and the atmosphere. It is usually reported as conventional radiocarbon age; i.e., computed by means of the Libby radiocarbon mean life \cite[8033 yr;][]{stuiver_1977}
@@ -561,8 +561,8 @@
 \subsection{PISCES biogeochemical model}
 
-PISCES is a biogeochemical model which simulates the lower trophic levels of marine ecosystem (phytoplankton, microzooplankton and mesozooplankton) and the biogeochemical cycles of carbonand of the main nutrients (P, N, Fe, and Si). The  model is intended to be used for both regional and global configurations at high or low spatial resolutions as well as for  short-term (seasonal, interannual) and long-term (climate change, paleoceanography) analyses. 
+PISCES is a biogeochemical model which simulates the lower trophic levels of marine ecosystem (phytoplankton, microzooplankton and mesozooplankton) and the biogeochemical cycles of carbonand of the main nutrients (P, N, Fe, and Si). The  model is intended to be used for both regional and global configurations at high or low spatial resolutions as well as for  short-term (seasonal, interannual) and long-term (climate change, paleoceanography) analyses.
 Two versions of PISCES are available in NEMO v4.0 :
 
-PISCES-v2, by setting in namelist\_pisces\_ref  \np{ln\_p4z} to true,  can be seen as one of the many Monod models \citep{monod_1958}. It assumes a constant Redfield ratio and phytoplankton growth depends on the external concentration in nutrients. There are twenty-four prognostic variables (tracers) including two phytoplankton compartments  (diatoms and nanophytoplankton), two zooplankton size-classes (microzooplankton and  mesozooplankton) and a description of the carbonate chemistry. Formulations in PISCES-v2 are based on a mixed Monod/Quota formalism: On one hand, stoichiometry of C/N/P is fixed and growth rate of phytoplankton is limited by the external availability in N, P and Si. On the other hand, the iron and silicium quotas are variable and growth rate of phytoplankton is limited by the internal availability in Fe. Various parameterizations can be activated in PISCES-v2, setting for instance the complexity of iron chemistry or the description of particulate organic materials. 
+PISCES-v2, by setting in namelist\_pisces\_ref  \np{ln\_p4z} to true,  can be seen as one of the many Monod models \citep{monod_1958}. It assumes a constant Redfield ratio and phytoplankton growth depends on the external concentration in nutrients. There are twenty-four prognostic variables (tracers) including two phytoplankton compartments  (diatoms and nanophytoplankton), two zooplankton size-classes (microzooplankton and  mesozooplankton) and a description of the carbonate chemistry. Formulations in PISCES-v2 are based on a mixed Monod/Quota formalism: On one hand, stoichiometry of C/N/P is fixed and growth rate of phytoplankton is limited by the external availability in N, P and Si. On the other hand, the iron and silicium quotas are variable and growth rate of phytoplankton is limited by the internal availability in Fe. Various parameterizations can be activated in PISCES-v2, setting for instance the complexity of iron chemistry or the description of particulate organic materials.
 
 PISCES-QUOTA has been built on the PISCES-v2 model described in \citet{aumont_2015}. PISCES-QUOTA has thirty-nine prognostic compartments. Phytoplankton growth can be controlled by five modeled limiting nutrients: Nitrate and Ammonium, Phosphate, Silicate and Iron. Five living compartments are represented: Three phytoplankton size classes/groups corresponding to picophytoplankton, nanophytoplankton and diatoms, and two zooplankton size classes which are microzooplankton and mesozooplankton. For phytoplankton, the prognostic variables are the carbon, nitrogen, phosphorus,  iron, chlorophyll and silicon biomasses (the latter only for diatoms). This means that the N/C, P/C, Fe/C and Chl/C ratios of both phytoplankton groups as well as the Si/C ratio of diatoms are prognostically predicted  by the model. Zooplankton are assumed to be strictly homeostatic \citep[e.g.,][]{sterner_2003,woods_2013,meunier_2014}. As a consequence, the C/N/P/Fe ratios of these groups are maintained constant and are not allowed to vary. In PISCES, the Redfield ratios C/N/P are set to 122/16/1 \citep{takahashi_1985} and the -O/C ratio is set to 1.34 \citep{kortzinger_2001}. No silicified zooplankton is assumed. The bacterial pool is not yet explicitly modeled.
@@ -570,5 +570,5 @@
 There are three non-living compartments: Semi-labile dissolved organic matter, small sinking particles, and large sinking particles. As a consequence of the variable stoichiometric ratios of phytoplankton and of the stoichiometric regulation of zooplankton, elemental ratios in organic matter cannot be supposed constant anymore as that was the case in PISCES-v2. Indeed, the nitrogen, phosphorus, iron, silicon and calcite pools of the particles are now all explicitly modeled. The sinking speed of the particles is not altered by their content in calcite and biogenic silicate (''The ballast effect'', \citep{honjo_1996,armstrong_2001}). The latter particles are assumed to sink at the same speed as the large organic matter particles. All the non-living compartments experience aggregation due to turbulence and differential settling as well as Brownian coagulation for DOM.
 
- 
+
 \subsection{MY\_TRC interface for coupling external BGC models}
 \label{Mytrc}
@@ -597,5 +597,5 @@
 
 Coupling passive tracers offline with NEMO requires precomputed  physical fields from OGCM. Those fields are read from files and interpolated on-the-fly at each model time step
-At least the following dynamical parameters should be absolutely passed to the transport : ocean velocities, temperature, salinity, mixed layer depth and for ecosystem models like PISCES, sea ice concentration, short wave radiation at the ocean surface, wind speed (or at least, wind stress). 
+At least the following dynamical parameters should be absolutely passed to the transport : ocean velocities, temperature, salinity, mixed layer depth and for ecosystem models like PISCES, sea ice concentration, short wave radiation at the ocean surface, wind speed (or at least, wind stress).
 The so-called offline mode is useful since it has lower computational costs for example to perform very longer simulations - about 3000 years - to reach equilibrium of CO2 sinks for climate-carbon studies.
 
@@ -603,5 +603,5 @@
 
 \begin{itemize}
-   \item \textit{dtadyn.F90} :  this module allows to read and compute the dynamical fields at each model time-step 
+   \item \textit{dtadyn.F90} :  this module allows to read and compute the dynamical fields at each model time-step
    \item \textit{nemogcm.F90} :  a degraded version of the main nemogcm.F90 code of NEMO to manage the time-stepping
 \end{itemize}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/model_setup.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/model_setup.tex	(revision 11086)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/model_setup.tex	(revision 11831)
@@ -1,3 +1,3 @@
-\documentclass[../../NEMO/main/NEMO_manual]{subfiles}
+\documentclass[../main/TOP_manual]{subfiles}
 
 \begin{document}
@@ -10,5 +10,5 @@
 %-------------------------------------------------------------------------------------------------------------
 
-The usage of TOP is activated 
+The usage of TOP is activated
 
 \begin{itemize}
@@ -19,5 +19,5 @@
 As an example, the user can refer to already available configurations in the code, GYRE\_PISCES being the NEMO biogeochemical demonstrator and GYRE\_BFM to see the required configuration elements to couple with an external biogeochemical model (see also section \S\ref{SMS_models}) .
 
-Note that, since version 4.0, TOP interface core functionalities are activated by means of logical keys and all submodules preprocessing macros from previous versions were removed. 
+Note that, since version 4.0, TOP interface core functionalities are activated by means of logical keys and all submodules preprocessing macros from previous versions were removed.
 
 There are only three specific keys remaining in TOP
@@ -28,5 +28,5 @@
 \end{itemize}
 
-For a remind, the revisited structure of TOP interface now counts for five different modules handled in namelist\_top : 
+For a remind, the revisited structure of TOP interface now counts for five different modules handled in namelist\_top :
 
 \begin{itemize}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/modules.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/modules.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/modules.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/modules.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/parameters.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/parameters.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/parameters.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/parameters.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/subroutines.idx
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/subroutines.idx	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/TOP/subfiles/subroutines.idx	(revision 11831)
@@ -0,0 +1,1 @@
+link ../build/subroutines.idx
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/ametsoc.bst
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/ametsoc.bst	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/ametsoc.bst	(revision 11831)
@@ -0,0 +1,1662 @@
+%%
+%% This is file `ametsoc7.bst',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% merlin.mbs  (with options: `ay,nat,nm-rev1,ed-rev,jnrlst,nmdash,nmd-3,dt-beg,yr-com,yrp-col,thtit-a,vol-2bf,vnum-sp,volp-com,pgsep-s,num-xser,numser,ser-vol,bkpg-x,pg-bk,pre-edn,agu-doi,doi,edparc,bkedcap,edby,edbyy,blk-tit,in-x,pp,ed,abr,ednx,ord,jabr,eprint,url,url-nt,em-it,nfss,')
+%% ----------------------------------------
+%% *** Bibliography style file for ALL AMS Journals...version 1.0  ***
+%% *** Brian Papa - American Meteorological Society ***
+%%
+%% Copyright 1994-2004 Patrick W Daly
+ % ===============================================================
+ % IMPORTANT NOTICE:
+ % This bibliographic style (bst) file has been generated from one or
+ % more master bibliographic style (mbs) files, listed above.
+ %
+ % This generated file can be redistributed and/or modified under the terms
+ % of the LaTeX Project Public License Distributed from CTAN
+ % archives in directory macros/latex/base/lppl.txt; either
+ % version 1 of the License, or any later version.
+ % ===============================================================
+ % Name and version information of the main mbs file:
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
+ %   For use with BibTeX version 0.99a or later
+ %-------------------------------------------------------------------
+ % This bibliography style file is intended for texts in ENGLISH
+ % This is an author-year citation style bibliography. As such, it is
+ % non-standard LaTeX, and requires a special package file to function properly.
+ % Such a package is    natbib.sty   by Patrick W. Daly
+ % The form of the \bibitem entries is
+ %   \bibitem[Jones et al.(1990)]{key}...
+ %   \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
+ % The essential feature is that the label (the part in brackets) consists
+ % of the author names, as they should appear in the citation, with the year
+ % in parentheses following. There must be no space before the opening
+ % parenthesis!
+ % With natbib v5.3, a full list of authors may also follow the year.
+ % In natbib.sty, it is possible to define the type of enclosures that is
+ % really wanted (brackets or parentheses), but in either case, there must
+ % be parentheses in the label.
+ % The \cite command functions as follows:
+ %   \citet{key} ==>>                Jones et al. (1990)
+ %   \citet*{key} ==>>               Jones, Baker, and Smith (1990)
+ %   \citep{key} ==>>                (Jones et al., 1990)
+ %   \citep*{key} ==>>               (Jones, Baker, and Smith, 1990)
+ %   \citep[chap. 2]{key} ==>>       (Jones et al., 1990, chap. 2)
+ %   \citep[e.g.][]{key} ==>>        (e.g. Jones et al., 1990)
+ %   \citep[e.g.][p. 32]{key} ==>>   (e.g. Jones et al., p. 32)
+ %   \citeauthor{key} ==>>           Jones et al.
+ %   \citeauthor*{key} ==>>          Jones, Baker, and Smith
+ %   \citeyear{key} ==>>             1990
+ %---------------------------------------------------------------------
+
+ENTRY
+  { address
+    archive
+    author
+    booktitle
+    chapter
+    doi
+    edition
+    editor
+    eid
+    eprint
+    howpublished
+    department
+    institution
+    journal
+    key
+    month
+    note
+    number
+    organization
+    pages
+    publisher
+    school
+    series
+    title
+    type
+    url
+    volume
+    year
+  }
+  {}
+  { label extra.label sort.label short.list }
+INTEGERS { output.state before.all mid.sentence after.sentence after.block }
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+  #1 'mid.sentence :=
+  #2 'after.sentence :=
+  #3 'after.block :=
+}
+STRINGS { s t}
+FUNCTION {output.nonnull}
+{ 's :=
+  output.state mid.sentence =
+    { ", " * write$ }
+    { output.state after.block =
+        { add.period$ write$
+          newline$
+          "\newblock " write$
+        }
+        { output.state before.all =
+            'write$
+            { add.period$ " " * write$ }
+          if$
+        }
+      if$
+      mid.sentence 'output.state :=
+    }
+  if$
+  s
+}
+FUNCTION {output}
+{ duplicate$ empty$
+    'pop$
+    'output.nonnull
+  if$
+}
+FUNCTION {output.check}
+{ 't :=
+  duplicate$ empty$
+    { pop$ "empty " t * " in " * cite$ * warning$ }
+    'output.nonnull
+  if$
+}
+FUNCTION {fin.entry}
+{ add.period$
+  write$
+  newline$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+    'skip$
+    { after.block 'output.state := }
+  if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+    'skip$
+    { output.state before.all =
+        'skip$
+        { after.sentence 'output.state := }
+      if$
+    }
+  if$
+}
+FUNCTION {add.blank}
+{  " " * before.all 'output.state :=
+}
+
+FUNCTION {date.block}
+{
+  ":" *
+  add.blank
+}
+
+FUNCTION {not}
+{   { #0 }
+    { #1 }
+  if$
+}
+FUNCTION {and}
+{   'skip$
+    { pop$ #0 }
+  if$
+}
+FUNCTION {or}
+{   { pop$ #1 }
+    'skip$
+  if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+  swap$ empty$
+  and
+    'skip$
+    'new.block
+  if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+    { pop$ "" }
+    'skip$
+  if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+    { pop$ "" }
+    { "\textit{" swap$ * "}" * }
+  if$
+}
+FUNCTION {bolden}
+{ duplicate$ empty$
+    { pop$ "" }
+    { "\textbf{" swap$ * "}" * }
+  if$
+}
+FUNCTION {tie.or.space.prefix}
+{ duplicate$ text.length$ #3 <
+    { "~" }
+    { " " }
+  if$
+  swap$
+}
+
+FUNCTION {capitalize}
+{ "u" change.case$ "t" change.case$ }
+
+FUNCTION {space.word}
+{ " " swap$ * " " * }
+ % Here are the language-specific definitions for explicit words.
+ % Each function has a name bbl.xxx where xxx is the English word.
+ % The language selected here is ENGLISH
+FUNCTION {bbl.and}
+{ "and"}
+
+FUNCTION {bbl.etal}
+{ "et~al." }
+
+FUNCTION {bbl.editors}
+{ "Eds." }
+
+FUNCTION {bbl.editor}
+{ "Ed." }
+
+FUNCTION {bbl.edby}
+{ "edited by" }
+
+FUNCTION {bbl.edition}
+{ "ed." }
+
+FUNCTION {bbl.volume}
+{ "Vol." }
+
+FUNCTION {bbl.of}
+{ "of" }
+
+FUNCTION {bbl.number}
+{ "No." }
+
+FUNCTION {bbl.nr}
+{ "No." }
+
+FUNCTION {bbl.in}
+{ "in" }
+
+FUNCTION {bbl.pages}
+{ "pp." }
+
+FUNCTION {bbl.page}
+{ "p." }
+
+FUNCTION {bbl.chapter}
+{ "chap." }
+
+FUNCTION {bbl.techrep}
+{ "Tech. Rep." }
+
+FUNCTION {bbl.mthesis}
+{ "Master's thesis" }
+
+FUNCTION {bbl.phdthesis}
+{ "Ph.D. thesis" }
+
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2d" }
+
+FUNCTION {bbl.third}
+{ "3d" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "d" }
+
+FUNCTION {bbl.rd}
+{ "d" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+MACRO {jan} {"Jan."}
+
+MACRO {feb} {"Feb."}
+
+MACRO {mar} {"Mar."}
+
+MACRO {apr} {"Apr."}
+
+MACRO {may} {"May"}
+
+MACRO {jun} {"Jun."}
+
+MACRO {jul} {"Jul."}
+
+MACRO {aug} {"Aug."}
+
+MACRO {sep} {"Sep."}
+
+MACRO {oct} {"Oct."}
+
+MACRO {nov} {"Nov."}
+
+MACRO {dec} {"Dec."}
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+  #-2 #1 substring$ "1" =
+     { bbl.th * }
+     { duplicate$ #-1 #1 substring$
+       duplicate$ "1" =
+         { pop$ bbl.st * }
+         { duplicate$ "2" =
+             { pop$ bbl.nd * }
+             { "3" =
+                 { bbl.rd * }
+                 { bbl.th * }
+               if$
+             }
+           if$
+          }
+       if$
+     }
+   if$
+}
+
+MACRO {acmcs} {"ACM Comput. Surv."}
+
+MACRO {acta} {"Acta Inf."}
+
+MACRO {cacm} {"Commun. ACM"}
+
+MACRO {ibmjrd} {"IBM J. Res. Dev."}
+
+MACRO {ibmsj} {"IBM Syst.~J."}
+
+MACRO {ieeese} {"IEEE Trans. Software Eng."}
+
+MACRO {ieeetc} {"IEEE Trans. Comput."}
+
+MACRO {ieeetcad}
+ {"IEEE Trans. Comput. Aid. Des."}
+
+MACRO {ipl} {"Inf. Process. Lett."}
+
+MACRO {jacm} {"J.~ACM"}
+
+MACRO {jcss} {"J.~Comput. Syst. Sci."}
+
+MACRO {scp} {"Sci. Comput. Program."}
+
+MACRO {sicomp} {"SIAM J. Comput."}
+
+MACRO {tocs} {"ACM Trans. Comput. Syst."}
+
+MACRO {tods} {"ACM Trans. Database Syst."}
+
+MACRO {tog} {"ACM Trans. Graphic."}
+
+MACRO {toms} {"ACM Trans. Math. Software"}
+
+MACRO {toois} {"ACM Trans. Office Inf. Syst."}
+
+MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
+
+MACRO {tcs} {"Theor. Comput. Sci."}
+
+FUNCTION {bibinfo.check}
+{ swap$
+  duplicate$ missing$
+    {
+      pop$ pop$
+      ""
+    }
+    { duplicate$ empty$
+        {
+          swap$ pop$
+        }
+        { swap$
+          pop$
+        }
+      if$
+    }
+  if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+  duplicate$ missing$
+    {
+      swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
+      ""
+    }
+    { duplicate$ empty$
+        {
+          swap$ "empty " swap$ * " in " * cite$ * warning$
+        }
+        { swap$
+          pop$
+        }
+      if$
+    }
+  if$
+}
+FUNCTION {format.eprint}
+{ eprint duplicate$ empty$
+    'skip$
+    { "\eprint"
+      archive empty$
+        'skip$
+        { "[" * archive * "]" * }
+      if$
+      "{" * swap$ * "}" *
+    }
+  if$
+}
+STRINGS  { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 'bibinfo :=
+  duplicate$ empty$ 'skip$ {
+  's :=
+  "" 't :=
+  #1 'nameptr :=
+  s num.names$ 'numnames :=
+  numnames 'namesleft :=
+    { namesleft #0 > }
+    { s nameptr
+      duplicate$ #1 >
+        { "{f.~}{vv~}{ll}{, jj}" }
+        { "{vv~}{ll}{, f.}{, jj}" }
+      if$
+      format.name$
+      bibinfo bibinfo.check
+      't :=
+      nameptr #1 >
+        {
+          namesleft #1 >
+            { ", " * t * }
+            {
+              numnames #2 >
+                { "," * }
+                'skip$
+              if$
+              s nameptr "{ll}" format.name$ duplicate$ "others" =
+                { 't := }
+                { pop$ }
+              if$
+              t "others" =
+                {
+                  " " * bbl.etal *
+                }
+                {
+                  bbl.and
+                  space.word * t *
+                }
+              if$
+            }
+          if$
+        }
+        't
+      if$
+      nameptr #1 + 'nameptr :=
+      namesleft #1 - 'namesleft :=
+    }
+  while$
+  } if$
+}
+FUNCTION {format.names.ed}
+{
+  format.names
+}
+FUNCTION {format.key}
+{ empty$
+    { key field.or.null }
+    { "" }
+  if$
+}
+
+FUNCTION {format.authors}
+{ author "author" format.names
+}
+FUNCTION {get.bbl.editor}
+{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+FUNCTION {format.editors}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+    {
+      "," *
+      " " *
+      get.bbl.editor
+      capitalize
+   "(" swap$ * ")" *
+      *
+    }
+  if$
+}
+FUNCTION {format.book.pages}
+{ pages "pages" bibinfo.check
+  duplicate$ empty$ 'skip$
+    { " " * bbl.pages * }
+  if$
+}
+FUNCTION {format.doi}
+{ doi "doi" bibinfo.check
+  duplicate$ empty$ 'skip$
+    {
+      "\href{http://dx.doi.org/" swap$ * "}{\aiDoi}" *
+    }
+  if$
+}
+FUNCTION {format.note}
+{
+  url empty$
+    'skip$
+    { "\href{" url * "}{URL}" * output }
+  if$
+ note empty$
+    { "" }
+    { note #1 #1 substring$
+      duplicate$ "{" =
+        'skip$
+        { output.state mid.sentence =
+          { "l" }
+          { "u" }
+        if$
+        change.case$
+        }
+      if$
+      note #2 global.max$ substring$ * "note" bibinfo.check
+    }
+  if$
+}
+
+FUNCTION {format.title}
+{ title
+  duplicate$ empty$ 'skip$
+    { "t" change.case$ }
+  if$
+  "title" bibinfo.check
+}
+FUNCTION {format.full.names}
+{'s :=
+ "" 't :=
+  #1 'nameptr :=
+  s num.names$ 'numnames :=
+  numnames 'namesleft :=
+    { namesleft #0 > }
+    { s nameptr
+      "{vv~}{ll}" format.name$
+      't :=
+      nameptr #1 >
+        {
+          namesleft #1 >
+            { ", " * t * }
+            {
+              s nameptr "{ll}" format.name$ duplicate$ "others" =
+                { 't := }
+                { pop$ }
+              if$
+              t "others" =
+                {
+                  " " * bbl.etal *
+                }
+                {
+                  numnames #2 >
+                    { "," * }
+                    'skip$
+                  if$
+                  bbl.and
+                  space.word * t *
+                }
+              if$
+            }
+          if$
+        }
+        't
+      if$
+      nameptr #1 + 'nameptr :=
+      namesleft #1 - 'namesleft :=
+    }
+  while$
+}
+
+FUNCTION {author.editor.key.full}
+{ author empty$
+    { editor empty$
+        { key empty$
+            { cite$ #1 #3 substring$ }
+            'key
+          if$
+        }
+        { editor format.full.names }
+      if$
+    }
+    { author format.full.names }
+  if$
+}
+
+FUNCTION {author.key.full}
+{ author empty$
+    { key empty$
+         { cite$ #1 #3 substring$ }
+          'key
+      if$
+    }
+    { author format.full.names }
+  if$
+}
+
+FUNCTION {editor.key.full}
+{ editor empty$
+    { key empty$
+         { cite$ #1 #3 substring$ }
+          'key
+      if$
+    }
+    { editor format.full.names }
+  if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+  type$ "inbook" =
+  or
+    'author.editor.key.full
+    { type$ "proceedings" =
+        'editor.key.full
+        'author.key.full
+      if$
+    }
+  if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+  "\bibitem[{" write$
+  label write$
+  ")" make.full.names duplicate$ short.list =
+     { pop$ }
+     { * }
+   if$
+  "}]{" * write$
+  cite$ write$
+  "}" write$
+  newline$
+  ""
+  before.all 'output.state :=
+}
+
+FUNCTION {if.digit}
+{ duplicate$ "0" =
+  swap$ duplicate$ "1" =
+  swap$ duplicate$ "2" =
+  swap$ duplicate$ "3" =
+  swap$ duplicate$ "4" =
+  swap$ duplicate$ "5" =
+  swap$ duplicate$ "6" =
+  swap$ duplicate$ "7" =
+  swap$ duplicate$ "8" =
+  swap$ "9" = or or or or or or or or or
+}
+FUNCTION {n.separate}
+{ 't :=
+  ""
+  #0 'numnames :=
+  { t empty$ not }
+  { t #-1 #1 substring$ if.digit
+      { numnames #1 + 'numnames := }
+      { #0 'numnames := }
+    if$
+    t #-1 #1 substring$ swap$ *
+    t #-2 global.max$ substring$ 't :=
+    numnames #5 =
+      { duplicate$ #1 #2 substring$ swap$
+        #3 global.max$ substring$
+        "\," swap$ * *
+      }
+      'skip$
+    if$
+  }
+  while$
+}
+FUNCTION {n.dashify}
+{
+  n.separate
+  't :=
+  ""
+    { t empty$ not }
+    { t #1 #1 substring$ "-" =
+        { t #1 #2 substring$ "--" = not
+            { "--" *
+              t #2 global.max$ substring$ 't :=
+            }
+            {   { t #1 #1 substring$ "-" = }
+                { "-" *
+                  t #2 global.max$ substring$ 't :=
+                }
+              while$
+            }
+          if$
+        }
+        { t #1 #1 substring$ *
+          t #2 global.max$ substring$ 't :=
+        }
+      if$
+    }
+  while$
+}
+
+FUNCTION {word.in}
+{ "" }
+
+FUNCTION {format.date}
+{ year "year" bibinfo.check duplicate$ empty$
+    {
+      "empty year in " cite$ * "; set to ????" * warning$
+       pop$ "????"
+    }
+    'skip$
+  if$
+  extra.label *
+  before.all 'output.state :=
+  ", " swap$ *
+}
+FUNCTION {format.btitle}
+{ title "title" bibinfo.check
+  duplicate$ empty$ 'skip$
+    {
+      emphasize
+    }
+  if$
+}
+FUNCTION {either.or.check}
+{ empty$
+    'pop$
+    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
+  if$
+}
+FUNCTION {format.bvolume}
+{ volume empty$
+    { "" }
+    { bbl.volume volume tie.or.space.prefix
+      "volume" bibinfo.check * *
+      series "series" bibinfo.check
+      duplicate$ empty$ 'pop$
+%%% NO ITALIC SERIES        { emphasize ", " * swap$ * }
+      {", " * swap$ * }
+      if$
+      "volume and number" number either.or.check
+    }
+  if$
+}
+FUNCTION {format.number.series}
+{ volume empty$
+    { number empty$
+        { series field.or.null }
+        { series empty$
+            { number "number" bibinfo.check }
+            { output.state mid.sentence =
+                { bbl.number }
+                { bbl.number capitalize }
+              if$
+              number tie.or.space.prefix "number" bibinfo.check * *
+              bbl.in space.word *
+              series "series" bibinfo.check *
+            }
+          if$
+        }
+      if$
+    }
+    { "" }
+  if$
+}
+FUNCTION {is.num}
+{ chr.to.int$
+  duplicate$ "0" chr.to.int$ < not
+  swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+  "" 's :=
+  { t empty$ not }
+  { t #1 #1 substring$
+    t #2 global.max$ substring$ 't :=
+    duplicate$ is.num
+      { s swap$ * 's := }
+      { pop$ "" 't := }
+    if$
+  }
+  while$
+  s empty$
+    'skip$
+    { pop$ s }
+  if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+  s "first" = s "1" = or
+    { bbl.first 't := }
+    { s "second" = s "2" = or
+        { bbl.second 't := }
+        { s "third" = s "3" = or
+            { bbl.third 't := }
+            { s "fourth" = s "4" = or
+                { bbl.fourth 't := }
+                { s "fifth" = s "5" = or
+                    { bbl.fifth 't := }
+                    { s #1 #1 substring$ is.num
+                        { s eng.ord 't := }
+                        { edition 't := }
+                      if$
+                    }
+                  if$
+                }
+              if$
+            }
+          if$
+        }
+      if$
+    }
+  if$
+  t
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+    {
+      convert.edition
+      output.state mid.sentence =
+        { "l" }
+        { "t" }
+      if$ change.case$
+      "edition" bibinfo.check
+      " " * bbl.edition *
+    }
+  if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+  #0 'multiresult :=
+    { multiresult not
+      t empty$ not
+      and
+    }
+    { t #1 #1 substring$
+      duplicate$ "-" =
+      swap$ duplicate$ "," =
+      swap$ "+" =
+      or or
+        { #1 'multiresult := }
+        { t #2 global.max$ substring$ 't := }
+      if$
+    }
+  while$
+  multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+    { duplicate$ multi.page.check
+        {
+          n.dashify
+        }
+        {
+        }
+      if$
+      "pages" bibinfo.check
+    }
+  if$
+}
+FUNCTION {format.journal.pages}
+{ pages duplicate$ empty$ 'pop$
+    { swap$ duplicate$ empty$
+        { pop$ pop$ format.pages }
+        {
+          ", " *
+          swap$
+          n.dashify
+          "pages" bibinfo.check
+          *
+        }
+      if$
+    }
+  if$
+}
+FUNCTION {format.journal.eid}
+{ eid "eid" bibinfo.check
+  duplicate$ empty$ 'pop$
+    { swap$ duplicate$ empty$ 'skip$
+      {
+          ", " *
+      }
+      if$
+      swap$ *
+    }
+  if$
+}
+FUNCTION {format.vol.num.pages}
+{ volume field.or.null
+  duplicate$ empty$ 'skip$
+    {
+      "volume" bibinfo.check
+    }
+  if$
+  number "number" bibinfo.check duplicate$ empty$ 'skip$
+    {
+      swap$ duplicate$ empty$
+        { "there's a number but no volume in " cite$ * warning$ }
+        'skip$
+      if$
+      swap$
+      "~(" swap$ * ")" *
+    }
+  if$ *
+  bolden
+  eid empty$
+    { format.journal.pages }
+    { format.journal.eid }
+  if$
+}
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+    'format.pages
+    { type empty$
+        { bbl.chapter }
+        { type "l" change.case$
+          "type" bibinfo.check
+        }
+      if$
+      chapter tie.or.space.prefix
+      "chapter" bibinfo.check
+      * *
+      pages empty$
+        'skip$
+        { ", " * format.pages * }
+      if$
+    }
+  if$
+}
+
+FUNCTION {format.booktitle}
+{
+  booktitle "booktitle" bibinfo.check
+  emphasize
+}
+FUNCTION {format.in.ed.booktitle}
+{ format.booktitle duplicate$ empty$ 'skip$
+    {
+      editor "editor" format.names.ed duplicate$ empty$ 'pop$
+        {
+          get.bbl.editor
+          swap$ "," *
+          " " * swap$ *
+          swap$
+          "," *
+          " " * swap$
+          * }
+      if$
+      word.in swap$ *
+    }
+  if$
+}
+FUNCTION {format.thesis.type}
+{ type duplicate$ empty$
+    'pop$
+    { swap$ pop$
+      "t" change.case$ "type" bibinfo.check
+    }
+  if$
+}
+FUNCTION {format.tr.number}
+{ number "number" bibinfo.check
+  type duplicate$ empty$
+    { pop$ bbl.techrep }
+    'skip$
+  if$
+  "type" bibinfo.check
+  swap$ duplicate$ empty$
+    { pop$ "t" change.case$ }
+    { tie.or.space.prefix * * }
+  if$
+}
+FUNCTION {format.article.crossref}
+{
+  word.in
+  " \cite{" * crossref * "}" *
+}
+FUNCTION {format.book.crossref}
+{ volume duplicate$ empty$
+    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
+      pop$ word.in
+    }
+    { bbl.volume
+      capitalize
+      swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
+    }
+  if$
+  " \cite{" * crossref * "}" *
+}
+FUNCTION {format.incoll.inproc.crossref}
+{
+  word.in
+  " \cite{" * crossref * "}" *
+}
+FUNCTION {format.org.or.pub}
+{ 't :=
+  ""
+  address empty$ t empty$ and
+    'skip$
+    {
+      t empty$
+        { address "address" bibinfo.check *
+        }
+        { t *
+          address empty$
+            'skip$
+            { ", " * address "address" bibinfo.check * }
+          if$
+        }
+      if$
+    }
+  if$
+}
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.warn format.org.or.pub
+}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.org.or.pub
+}
+
+STRINGS {oldname}
+
+FUNCTION {name.or.dash}
+{ 's :=
+   oldname empty$
+     { s 'oldname := s }
+     { s oldname =
+         { "---{}---{}---" }
+         { s 'oldname := s }
+       if$
+     }
+   if$
+}
+
+FUNCTION {article}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  name.or.dash
+  format.date "year" output.check
+  date.block
+  format.title "title" output.check
+  new.sentence
+  crossref missing$
+    {
+      journal
+      "journal" bibinfo.check
+      emphasize
+      "journal" output.check
+      format.vol.num.pages output
+  format.doi output
+    }
+    { format.article.crossref output.nonnull
+      format.pages output
+    }
+  if$
+  format.note output
+  format.eprint output
+  fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+  author empty$
+    { format.editors "author and editor" output.check
+      editor format.key output
+      add.blank
+      name.or.dash
+    }
+    { format.authors output.nonnull
+      name.or.dash
+      crossref missing$
+        { "author and editor" editor either.or.check }
+        'skip$
+      if$
+    }
+  if$
+  format.date "year" output.check
+  date.block
+  format.btitle "title" output.check
+  crossref missing$
+    { format.bvolume output
+  new.sentence
+      format.edition output
+      format.number.series output
+      format.publisher.address output
+    }
+    {
+  new.sentence
+      format.book.crossref output.nonnull
+    }
+  if$
+  format.book.pages output
+  format.doi output
+  format.note output
+  format.eprint output
+  fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+  format.authors output
+  author format.key output
+  name.or.dash
+  format.date "year" output.check
+  date.block
+  format.title "title" output.check
+  new.sentence
+  howpublished "howpublished" bibinfo.check output
+  address "address" bibinfo.check output
+  format.book.pages output
+  format.doi output
+  format.note output
+  format.eprint output
+  fin.entry
+}
+
+FUNCTION {inbook}
+{ output.bibitem
+  author empty$
+    { format.editors "author and editor" output.check
+      editor format.key output
+      name.or.dash
+    }
+    { format.authors output.nonnull
+      name.or.dash
+      crossref missing$
+        { "author and editor" editor either.or.check }
+        'skip$
+      if$
+    }
+  if$
+  format.date "year" output.check
+  date.block
+  format.btitle "title" output.check
+  crossref missing$
+    {
+      format.bvolume output
+      format.chapter.pages "chapter and pages" output.check
+  new.sentence
+      format.edition output
+      format.number.series output
+      format.publisher.address output
+    }
+    {
+      format.chapter.pages "chapter and pages" output.check
+  new.sentence
+      format.book.crossref output.nonnull
+    }
+  if$
+  format.doi output
+  format.note output
+  format.eprint output
+  fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  name.or.dash
+  format.date "year" output.check
+  date.block
+  format.title "title" output.check
+  new.sentence
+  crossref missing$
+    { format.in.ed.booktitle "booktitle" output.check
+      format.publisher.address output
+      format.bvolume output
+      format.number.series output
+      format.edition output
+      format.chapter.pages output
+    }
+    { format.incoll.inproc.crossref output.nonnull
+      format.chapter.pages output
+    }
+  if$
+  format.doi output
+  format.note output
+  format.eprint output
+  fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  name.or.dash
+  format.date "year" output.check
+  date.block
+  format.title "title" output.check
+  new.sentence
+  crossref missing$
+    { format.in.ed.booktitle "booktitle" output.check
+      publisher empty$
+        { format.organization.address output }
+        { organization "organization" bibinfo.check output
+          format.publisher.address output
+        }
+      if$
+      format.bvolume output
+      format.pages output
+      format.number.series output
+      howpublished "howpublished" bibinfo.check output
+    }
+    { format.incoll.inproc.crossref output.nonnull
+      format.pages output
+    }
+  if$
+  format.doi output
+  format.note output
+  format.eprint output
+  fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+  format.authors output
+  author format.key output
+  name.or.dash
+  format.date "year" output.check
+  date.block
+  format.btitle "title" output.check
+  new.sentence
+  organization "organization" bibinfo.check output
+  address "address" bibinfo.check output
+  format.edition output
+  format.doi output
+  format.note output
+  format.eprint output
+  fin.entry
+}
+
+FUNCTION {mastersthesis}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  name.or.dash
+  format.date "year" output.check
+  date.block
+  format.title
+  "title" output.check
+  new.sentence
+  bbl.mthesis format.thesis.type output.nonnull
+  department "department" bibinfo.warn output
+  school "school" bibinfo.warn output
+  address "address" bibinfo.check output
+  format.doi output
+  format.note output
+  format.eprint output
+  fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+  format.authors output
+  author format.key output
+  name.or.dash
+  format.date "year" output.check
+  date.block
+  format.title output
+  new.sentence
+  howpublished "howpublished" bibinfo.check output
+  format.doi output
+  format.note output
+  format.eprint output
+  fin.entry
+}
+FUNCTION {phdthesis}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  name.or.dash
+  format.date "year" output.check
+  date.block
+  format.title
+  "title" output.check
+  new.sentence
+  bbl.phdthesis format.thesis.type output.nonnull
+  school "school" bibinfo.warn output
+  address "address" bibinfo.check output
+  format.doi output
+  format.note output
+  format.eprint output
+  fin.entry
+}
+
+FUNCTION {proceedings}
+{ output.bibitem
+  format.editors output
+  editor format.key output
+  name.or.dash
+  format.date "year" output.check
+  date.block
+  format.btitle "title" output.check
+  format.bvolume output
+  format.number.series output
+  publisher empty$
+    { format.organization.address output }
+    { organization "organization" bibinfo.check output
+      format.publisher.address output
+    }
+  if$
+  format.doi output
+  format.note output
+  format.eprint output
+  fin.entry
+}
+
+FUNCTION {techreport}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  name.or.dash
+  format.date "year" output.check
+  date.block
+  format.title
+  "title" output.check
+  new.sentence
+  format.tr.number output.nonnull
+  institution "institution" bibinfo.warn output
+  address "address" bibinfo.check output
+  format.doi output
+  format.note output
+  format.eprint output
+  fin.entry
+}
+
+FUNCTION {unpublished}
+{ output.bibitem
+  format.authors "author" output.check
+  author format.key output
+  name.or.dash
+  format.date "year" output.check
+  date.block
+  format.title "title" output.check
+  format.doi output
+  format.note "note" output.check
+  format.eprint output
+  fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+  "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+  'len :=
+  s #1 len substring$ =
+    { s len #1 + global.max$ substring$ }
+    's
+  if$
+}
+FUNCTION {format.lab.names}
+{ 's :=
+  "" 't :=
+  s #1 "{vv~}{ll}" format.name$
+  s num.names$ duplicate$
+  #2 >
+    { pop$
+      " " * bbl.etal *
+    }
+    { #2 <
+        'skip$
+        { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+            {
+              " " * bbl.etal *
+            }
+            { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
+              * }
+          if$
+        }
+      if$
+    }
+  if$
+}
+
+FUNCTION {author.key.label}
+{ author empty$
+    { key empty$
+        { cite$ #1 #3 substring$ }
+        'key
+      if$
+    }
+    { author format.lab.names }
+  if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+    { editor empty$
+        { key empty$
+            { cite$ #1 #3 substring$ }
+            'key
+          if$
+        }
+        { editor format.lab.names }
+      if$
+    }
+    { author format.lab.names }
+  if$
+}
+
+FUNCTION {editor.key.label}
+{ editor empty$
+    { key empty$
+        { cite$ #1 #3 substring$ }
+        'key
+      if$
+    }
+    { editor format.lab.names }
+  if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+  type$ "inbook" =
+  or
+    'author.editor.key.label
+    { type$ "proceedings" =
+        'editor.key.label
+        'author.key.label
+      if$
+    }
+  if$
+  'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+  short.list
+  "("
+  *
+  year duplicate$ empty$
+     { pop$ "????" }
+     { purify$ #-1 #4 substring$ }
+  if$
+  *
+  'label :=
+}
+
+FUNCTION {sort.format.names}
+{ 's :=
+  #1 'nameptr :=
+  ""
+  s num.names$ 'numnames :=
+  numnames 'namesleft :=
+    { namesleft #0 > }
+    { s nameptr
+      "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}"
+      format.name$ 't :=
+      nameptr #1 >
+        {
+          "   "  *
+          namesleft #1 = t "others" = and
+            { "zzzzz" * }
+            { t sortify * }
+          if$
+        }
+        { t sortify * }
+      if$
+      nameptr #1 + 'nameptr :=
+      namesleft #1 - 'namesleft :=
+    }
+  while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+  "A " #2
+    "An " #3
+      "The " #4 t chop.word
+    chop.word
+  chop.word
+  sortify
+  #1 global.max$ substring$
+}
+FUNCTION {author.sort}
+{ author empty$
+    { key empty$
+        { "to sort, need author or key in " cite$ * warning$
+          ""
+        }
+        { key sortify }
+      if$
+    }
+    { author sort.format.names }
+  if$
+}
+FUNCTION {author.editor.sort}
+{ author empty$
+    { editor empty$
+        { key empty$
+            { "to sort, need author, editor, or key in " cite$ * warning$
+              ""
+            }
+            { key sortify }
+          if$
+        }
+        { editor sort.format.names }
+      if$
+    }
+    { author sort.format.names }
+  if$
+}
+FUNCTION {editor.sort}
+{ editor empty$
+    { key empty$
+        { "to sort, need editor or key in " cite$ * warning$
+          ""
+        }
+        { key sortify }
+      if$
+    }
+    { editor sort.format.names }
+  if$
+}
+FUNCTION {presort}
+{ calc.label
+  label sortify
+  "    "
+  *
+  type$ "book" =
+  type$ "inbook" =
+  or
+    'author.editor.sort
+    { type$ "proceedings" =
+        'editor.sort
+        'author.sort
+      if$
+    }
+  if$
+  #1 entry.max$ substring$
+  'sort.label :=
+  sort.label
+  *
+  "    "
+  *
+  title field.or.null
+  sort.format.title
+  *
+  #1 entry.max$ substring$
+  'sort.key$ :=
+}
+
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra }
+INTEGERS { last.extra.num number.label }
+FUNCTION {initialize.extra.label.stuff}
+{ #0 int.to.chr$ 'last.label :=
+  "" 'next.extra :=
+  #0 'last.extra.num :=
+  #0 'number.label :=
+}
+FUNCTION {forward.pass}
+{ last.label label =
+    { last.extra.num #1 + 'last.extra.num :=
+      last.extra.num int.to.chr$ 'extra.label :=
+    }
+    { "a" chr.to.int$ 'last.extra.num :=
+      "" 'extra.label :=
+      label 'last.label :=
+    }
+  if$
+  number.label #1 + 'number.label :=
+}
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+    { "a" 'extra.label := }
+    'skip$
+  if$
+  extra.label 'next.extra :=
+  extra.label
+  duplicate$ empty$
+    'skip$
+    { "{\natexlab{" swap$ * "}}" * }
+  if$
+  'extra.label :=
+  label extra.label * 'label :=
+}
+EXECUTE {initialize.extra.label.stuff}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {bib.sort.order}
+{ sort.label
+  "    "
+  *
+  year field.or.null sortify
+  *
+  "    "
+  *
+  title field.or.null
+  sort.format.title
+  *
+  #1 entry.max$ substring$
+  'sort.key$ :=
+}
+ITERATE {bib.sort.order}
+SORT
+FUNCTION {begin.bib}
+{ preamble$ empty$
+    'skip$
+    { preamble$ write$ newline$ }
+  if$
+  "\begin{thebibliography}{" number.label int.to.str$ * "}" *
+  write$ newline$
+  "\providecommand{\natexlab}[1]{#1}"
+  write$ newline$
+%  "\providecommand{\url}[1]{\texttt{#1}}"
+%  write$ newline$
+%  "\providecommand{\urlprefix}{URL }"
+%  write$ newline$
+%  "\expandafter\ifx\csname urlstyle\endcsname\relax"
+%  write$ newline$
+%  "  \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
+%  write$ newline$
+%  "  \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
+%  write$ newline$
+%  "\providecommand{\eprint}[2][]{\url{#2}}"
+%  write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+ITERATE {call.type$}
+FUNCTION {end.bib}
+{ newline$
+  "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+%% End of customized bst file
+%%
+%% End of file `ametsoc7.bst'.
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/annex_D.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/annex_D.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/annex_D.tex	(revision 11831)
@@ -0,0 +1,207 @@
+\documentclass[../main/NEMO_manual]{subfiles}
+
+\begin{document}
+% ================================================================
+% Appendix D Coding Rules
+% ================================================================
+\chapter{Coding Rules}
+\label{apdx:D}
+
+\minitoc
+
+\newpage
+
+A "model life" is more than ten years.
+Its software, composed of a few hundred modules, is used by many people who are scientists or students and
+do not necessarily know every aspect of computing very well.
+Moreover, a well thought-out program is easier to read and understand, less difficult to modify,
+produces fewer bugs and is easier to maintain.
+Therefore, it is essential that the model development follows some rules:
+
+- well planned and designed
+
+- well written
+
+- well documented (both on- and off-line)
+
+- maintainable
+
+- easily portable
+
+- flexible.
+
+To satisfy part of these aims, \NEMO\ is written with a coding standard which is close to the ECMWF rules,
+named DOCTOR \citep{gibson_rpt86}. 
+These rules present some advantages like:
+
+- to provide a well presented program
+
+- to use rules for variable names which allow recognition of their type
+(integer, real, parameter, local or shared variables, etc. ). 
+
+This facilitates both the understanding and the debugging of an algorithm.
+
+% ================================================================
+% The program structure
+% ================================================================
+\section{Program structure}
+\label{sec:D_structure}
+
+Each program begins with a set of headline comments containing:
+
+- the program title
+
+- the purpose of the routine
+
+- the method and algorithms used
+
+- the detail of input and output interfaces
+
+- the external routines and functions used (if they exist)
+
+- references (if they exist)
+
+- the author name(s), the date of creation and any updates.
+
+- Each program is split into several well separated sections and
+sub-sections with an underlined title and specific labelled statements.
+
+- A program has not more than 200 to 300 lines.
+
+A template of a module style can be found on the NEMO depository in the following file:
+NEMO/OPA\_SRC/module\_example.
+% ================================================================
+% Coding conventions
+% ================================================================
+\section{Coding conventions}
+\label{sec:D_coding}
+
+- Use of the universal language \fninety, and try to avoid obsolescent features like statement functions,
+do not use GO TO and EQUIVALENCE statements.
+
+- A continuation line begins with the character {\&} indented by three spaces compared to the previous line,
+while the previous line ended with the character {\&}.
+
+- All the variables must be declared.
+The code is usually compiled with implicit none.
+ 
+- Never use continuation lines in the declaration of a variable.
+When searching a variable in the code through a \textit{grep} command, the declaration line will be found.
+
+- In the declaration of a PUBLIC variable, the comment part at the end of the line should start with
+the two characters "\verb?!:?".
+The following UNIX command, \\
+\verb?grep var_name *90 \ grep \!: ? \\
+will display the module name and the line where the var\_name declaration is.
+
+- Always use a three spaces indentation in DO loop, CASE, or IF-ELSEIF-ELSE-ENDIF statements.
+
+- use a space after a comma, except when it appears to separate the indices of an array.
+
+- use call to ctl\_stop routine instead of just a STOP.
+
+\newpage
+
+% ================================================================
+% Naming Conventions
+% ================================================================
+\section{Naming conventions}
+\label{sec:D_naming}
+
+The purpose of the naming conventions is to use prefix letters to classify model variables.
+These conventions allow the variable type to be easily known and rapidly identified.
+The naming conventions are summarised in the Table below:
+
+
+%--------------------------------------------------TABLE--------------------------------------------------
+\begin{table}[htbp]
+  \label{tab:VarName}
+  \begin{center}
+    \begin{tabular}{|p{45pt}|p{35pt}|p{45pt}|p{40pt}|p{40pt}|p{40pt}|p{40pt}|p{40pt}|}
+      \hline
+      Type \par / Status
+      & integer
+      & real
+      & logical
+      & character
+      & structure
+      & double \par precision
+      & complex \\
+      \hline
+      public  \par or  \par module variable
+      & \textbf{m n} \par \textit{but not} \par \textbf{nn\_ np\_}
+      & \textbf{a b e f g h o q r} \par \textbf{t} \textit{to} \textbf{x} \par but not \par \textbf{fs rn\_}
+      & \textbf{l} \par \textit{but not} \par \textbf{lp ld} \par \textbf{ ll ln\_}
+      & \textbf{c} \par \textit{but not} \par \textbf{cp cd} \par \textbf{cl cn\_}
+      & \textbf{s} \par \textit{but not} \par \textbf{sd sd} \par \textbf{sl sn\_}
+      & \textbf{d} \par \textit{but not} \par \textbf{dp dd} \par \textbf{dl dn\_}
+      & \textbf{y} \par \textit{but not} \par \textbf{yp yd} \par \textbf{yl yn} \\
+      \hline
+      dummy \par argument
+      & \textbf{k} \par \textit{but not} \par \textbf{kf}
+      & \textbf{p} \par \textit{but not} \par \textbf{pp pf}
+      & \textbf{ld}
+      & \textbf{cd}
+      & \textbf{sd}
+      & \textbf{dd}
+      & \textbf{yd} \\
+      \hline
+      local \par variable
+      & \textbf{i}
+      & \textbf{z}
+      & \textbf{ll}
+      & \textbf{cl}
+      & \textbf{sl}
+      & \textbf{dl}
+      & \textbf{yl} \\
+      \hline
+      loop \par control
+      & \textbf{j} \par \textit{but not} \par \textbf{jp} &&&&&& \\
+      \hline
+      parameter
+      & \textbf{jp np\_}
+      & \textbf{pp}
+      & \textbf{lp}
+      & \textbf{cp}
+      & \textbf{sp}
+      & \textbf{dp}
+      & \textbf{yp} \\
+      \hline
+      namelist
+      & \textbf{nn\_}
+      & \textbf{rn\_}
+      & \textbf{ln\_}
+      & \textbf{cn\_}
+      & \textbf{sn\_}
+      & \textbf{dn\_}
+      & \textbf{yn\_}
+      \\
+      \hline
+      CPP \par macro
+      & \textbf{kf}
+      & \textbf{fs} \par &&&&& \\
+      \hline
+    \end{tabular}
+    \label{tab:tab1}
+  \end{center}
+\end{table}
+%--------------------------------------------------------------------------------------------------------------
+
+N.B. Parameter here, in not only parameter in the \fortran acceptation,
+it is also used for code variables that are read in namelist and should never been modified during a simulation. 
+It is the case, for example, for the size of a domain (jpi,jpj,jpk).
+
+\newpage
+
+% ================================================================
+% The program structure
+% ================================================================
+%\section{Program structure}
+%\label{sec:Apdx_D_structure}
+
+%To be done....
+\biblio
+
+\pindex
+
+\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/coding_rules.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/coding_rules.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/coding_rules.tex	(revision 11831)
@@ -0,0 +1,844 @@
+
+\chapter{Coding Rules}
+\label{apdx:CODING}
+
+\chaptertoc
+
+\newpage
+
+A "model life" is more than ten years.
+Its software, composed of a few hundred modules, is used by many people who are scientists or students and
+do not necessarily know every aspect of computing very well.
+Moreover, a well thought-out program is easier to read and understand, less difficult to modify,
+produces fewer bugs and is easier to maintain.
+Therefore, it is essential that the model development follows some rules:
+
+\begin{itemize}
+\item well planned and designed
+\item well written
+\item well documented (both on- and off-line)
+\item maintainable
+\item easily portable
+\item flexible.
+\end{itemize}
+
+To satisfy part of these aims, \NEMO\ is written with a coding standard which is close to the ECMWF rules,
+named DOCTOR \citep{gibson_rpt86}.
+These rules present some advantages like:
+
+\begin{itemize}
+\item to provide a well presented program
+\item to use rules for variable names which allow recognition of their type 	(integer, real, parameter, local or shared variables, etc. ).
+\end{itemize}
+
+This facilitates both the understanding and the debugging of an algorithm.
+
+\section{Introduction}
+
+This document describes conventions used in \NEMO\ coding and suggested for its development.
+The objectives are to offer a guide to all readers of the \NEMO\ code, and to facilitate the work of
+all the developers, including the validation of their developments, and
+eventually the implementation of these developments within the \NEMO\ platform.
+
+A first approach of these rules can be found in the code in \path{./src/OCE/module_example} where
+all the basics coding conventions are illustrated.
+More details can be found below.
+
+This work is based on the coding conventions in use for the Community Climate System Model
+\footnote {\href{http://www.cesm.ucar.edu/working_groups/Software/dev_guide/dev_guide/node7.html}{UCAR conventions}},
+the previous version of this document (``FORTRAN coding standard in the OPA System'') and
+the expertise of the \NEMO\ System Team.
+After a general overview below, this document will describe:
+
+\begin{itemize}
+\item The style rules, $i.e.$ the syntax, appearance and naming conventions chosen to improve readability of the code;
+\item The content rules, $i.e.$ the conventions to improve the reliability of the different parts of the code;
+\item The package rules to go a step further by improving the reliability of the whole and
+	interfaces between routines and modules.
+\end{itemize}
+
+\section{Overview and general conventions}
+
+\NEMO\ has 3 major components: ocean dynamics (\path{./src/OCE}), sea-ice (\path{./src/ICE}) and
+marine biogeochemistry (\path{./src/MBG}).
+%, linear-tangent and adjoint of the dynamics ($TAM$) each of them corresponding to a directory.
+In each directory, one will find some FORTRAN files and/or subdirectories, one per functionality of the code:
+\path{./src/OCE/BDY} (boundaries), \path{./src/OCE/DIA} (diagnostics), \path{./src/OCE/DOM} (domain),
+\path{./src/OCE/DYN} (dynamics), \path{./src/OCE/LDF} (lateral diffusion), etc... \\
+All name are chosen to be as self-explanatory as possible, in English, all prefixes are 3 digits. \\
+English is used for all variables names, comments, and documentation. \\
+Physical units are MKS. The only exception to this is the temperature, which is expressed in degrees Celsius,
+except in bulk formulae and part of SI$^3$ sea-ice model where it is in Kelvin.
+See \path{.src/OCE/DOM/phycst.F90} files for conversions.
+
+\section{Architecture}
+
+Within each directory, organisation of files is driven by orthogonality,
+$i.e.$ one functionality of the code is intended to be in one and only one directory, and
+one module and all its related routines are in one file.
+The functional modules are:
+
+\begin{itemize}
+\item \path{SBC}             surface module
+\item \path{IOM}             management of the I/O
+\item \path{NST}             interface to AGRIF (nesting model) for dynamics and biogeochemistry
+\item \path{OBC}, \path{BDY} management of structured and unstructured open boundaries
+\item \path{C1D}             1D (vertical) configuration for dynamics, sea-ice and biogeochemistry
+\item \path{OFF}             off-line module: passive tracer or biogeochemistry alone
+\item \path{...}
+\end{itemize}
+
+For example, the file \textit{domain.F90} contains the module \texttt{domain} and all the subroutines related to
+this module (\texttt{dom\_init, dom\_nam, dom\_ctl}).
+
+\section{Style rules}
+
+\subsection{Argument list format}
+
+Routine argument lists will contain a maximum 5 variables per line,
+whilst continuation lines can be used.
+This applies both to the calling routine and the dummy argument list in the routine being called.
+The purpose is to simplify matching up the arguments between caller and callee.
+
+\begin{forlines}
+SUBROUTINE tra_adv_eiv( kt, pun, pvn, pwn )
+
+      CALL tra_adv_eiv( kt, zun, zvn, zwn )
+\end{forlines}
+
+\subsection{Array syntax}
+
+Except for long loops (see below), array notation should be used if possible.
+To improve readability the array shape must be shown in brackets, $e.g.$:
+
+\begin{forlines}
+onedarraya(:)   = onedarrayb(:) + onedarrayc(:)
+twodarray (:,:) = scalar * anothertwodarray(:,:)
+\end{forlines}
+
+When accessing sections of arrays, for example in finite difference equations,
+do so by using the triplet notation on the full array, $e.g.$:
+
+\begin{forlines}
+twodarray(:,2:len2) =   scalar                      &
+   &                  * ( twodarray2(:,1:len2-1 )   &
+   &                  -   twodarray2(:,2:len2 ) )
+\end{forlines}
+
+For long, complicated loops, explicitly indexed loops should be preferred.
+In general when using this syntax, the order of the loops indices should reflect the following scheme
+(for best usage of data locality):
+
+\begin{forlines}
+DO jk = 1, jpk
+   DO jj = 1, jpj
+      DO ji = 1, jpi
+         threedarray(ji,jj,jk) = ...
+      END DO
+   END DO
+END DO
+\end{forlines}
+
+\subsection{Case}
+
+All FORTRAN keywords are in capital: \forcode{DIMENSION}, \forcode{WRITE}, \forcode{DO}, \forcode{END DO},
+\forcode{NAMELIST}, ... All other parts of the \NEMO\ code will be written in lower case.
+
+\subsection{Comments}
+
+Comments in the code are useful when reading the code and changing or developing it. \\
+The full documentation and detailed explanations are to be added in the reference manual
+(TeX files, aside from the code itself). \\
+In the code, the comments should explain variable content and describe each computational step. \\
+Comments in the header start with ``!!''.
+For more details on the content of the headers, see Content rules/Headers in this document. \\
+Comments in the code start with ``!''. \\
+All comments are indented (3, 6, or 9 blank spaces). \\
+Short comments may be included on the same line as executable code, and an additional line can be used with
+proper alignment.
+For example:
+
+\begin{forlines}
+zx = zx *zzy   ! Describe what is going on and if it is
+!              ! too long use another ! for proper
+!              ! alignment with automatic indentation
+\end{forlines}
+
+More in-depth comments should be written in the form:
+
+\begin{forlines}
+   !  Check of some namelist values
+\end{forlines}
+
+or
+
+\begin{forlines}
+!
+!     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+!     !  Bottom boundary condition on tke
+!     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+!
+\end{forlines}
+
+Key features of this style are
+
+\begin{enumerate}
+\item it starts with a "!" in the column required for proper indentation,
+\item the text is offset above and below by a blank line or a content line built for underlying.
+\end{enumerate}
+
+\subsection{Continuation lines}
+
+Continuation lines can be used with precise alignment for readability. For example:
+
+\begin{forlines}
+avmu(ji,jj,jk) =   avmu(ji,jj,jk) * ( un(ji,jj,jk-1) - un(ji,jj,jk) )   &
+   &                              * ( ub(ji,jj,jk-1) - ub(ji,jj,jk) )   &
+   &             / (   fse3uw_n(ji,jj,jk)                               &
+   &                 * fse3uw_b(ji,jj,jk) )
+\end{forlines}
+
+Code lines, which are continuation lines of assignment statements, must begin to the right of the column of
+the assignment operator.
+Due to the possibility of automatic indentation in some editor (emacs for example),
+use a ``\&'' as first character of the continuing lines to maintain the alignment.
+
+\subsection{Declaration of arguments and local variables}
+
+In a routine, input arguments and local variables are declared 1 per line,
+with a comment field on the same line as the declaration.
+Multiple comment lines describing a single variable are acceptable if needed.
+For example:
+
+\begin{forlines}
+INTEGER             ::   kstp   ! ocean time-step index
+\end{forlines}
+
+\subsection{F90 Standard}
+
+\NEMO\ software adheres to the \fninety language standard and does not rely on any specific language or
+vendor extensions.
+
+\subsection{Free-Form Source}
+
+Free-form source will be used.
+The F90/95 standard allows lines of up to 132 characters, but a self-imposed limit of 80 should enhance readability,
+or print source files with two columns per page.
+Multi-line comments that extend to column 100 are unacceptable.
+
+\subsection{Indentation}
+
+Code as well as comment lines within loops, if-blocks, continuation lines, \forcode{MODULE} or
+\forcode{SUBROUTINE} statements will be indented 3 characters for readability
+(except for \forcode{CONTAINS} that remains at first column).
+
+\begin{forlines}
+MODULE mod1
+   REAL(wp) xx
+CONTAINS
+   SUBROUTINE sub76( px, py, pz, pw, pa,   &
+      &              pb, pc, pd, pe          )
+      <instruction>
+   END SUBROUTINE sub76
+END MODULE mod1
+\end{forlines}
+
+\subsection{Loops}
+
+Loops, if explicit, should be structured with the do-end do construct as opposed to numbered loops.
+Nevertheless non-numeric labels can be used for a big iterative loop of a recursive algorithm.
+In the case of a long loop, a self-descriptive label can be used ($i.e.$ not just a number).
+
+\subsection{Naming Conventions: files}
+
+A file containing a module will have the same name as the module it contains
+(because dependency rules used by "make" programs are based on file names).
+\footnote{
+  For example, if routine A "\forcode{USE}"s module B, then "make" must be told of the dependency relation which
+  requires B to be compiled before A.
+  If one can assume that module B resides in file B.o,
+  building a tool to generate this dependency rule ($e.g.$ A.o: B.o) is quite simple.
+  Put another way, it is difficult (to say nothing of CPU-intensive) to search an entire source tree to
+  find the file in which module B resides for each routine or module which "\forcode{USE}"s B.
+}
+
+\subsection{Naming Conventions: modules}
+
+Use a meaningful English name and the ``3 letters'' naming convention:
+first 3 letters for the code section, and last 3 to describe the module.
+For example, zdftke, where ``zdf'' stands for vertical diffusion, and ``tke'' for turbulent kinetic energy. \\
+Note that by implication multiple modules are not allowed in a single file.
+The use of common blocks is deprecated in \fortran 90 and their use in \NEMO\ is strongly discouraged.
+Modules are a better way to declare static data.
+Among the advantages of modules is the ability to freely mix data of various types, and
+to limit access to contained variables through the use of the \forcode{ONLY} and \forcode{PRIVATE} attributes.
+
+\subsection{Naming Conventions: variables}
+
+All variable should be named as explicitly as possible in English.
+The naming convention concerns prefix letters of these name, in order to identify the variable type and status. \\
+Never use a \fortran keyword as a routine or variable name. \\
+The table below lists the starting letter(s) to be used for variable naming, depending on their type and status:
+%--------------------------------------------------TABLE--------------------------------------------------
+\begin{table}[htbp]
+  \begin{center}
+    \begin{tabular}{|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|p{50pt}|}
+      \hline
+      Type \par / Status                                                                          &
+      integer                                                                                     &
+      real                                                                                        &
+      logical                                                                                     &
+      character                                                                                   &
+      double \par precision                                                                       &
+      complex                                                                                     \\
+      \hline
+      public \par or \par module variable                                                         &
+      \textbf{m n} \par \textit{but not} \par \textbf{nn\_}                                       &
+      \textbf{a b e f g h o} \textbf{q} \textit{to} \textbf{x} \par but not \par \textbf{fs rn\_} &
+      \textbf{l} \par \textit{but not} \par \textbf{lp ld ll ln\_}                                &
+      \textbf{c} \par \textit{but not} \par \textbf{cp cd cl cn\_}                                &
+      \textbf{d} \par \textit{but not} \par \textbf{dp dd dl dn\_}                                &
+      \textbf{y} \par \textit{but not} \par \textbf{yp yd yl}                                     \\
+      \hline
+      dummy \par argument                                                                         &
+      \textbf{k} \par \textit{but not} \par \textbf{kf}                                           &
+      \textbf{p} \par \textit{but not} \par \textbf{pp pf}                                        &
+      \textbf{ld}                                                                                 &
+      \textbf{cd}                                                                                 &
+      \textbf{dd}                                                                                 &
+      \textbf{yd}                                                                                 \\
+      \hline
+      local \par variable                                                                         &
+      \textbf{i}                                                                                  &
+      \textbf{z}                                                                                  &
+      \textbf{ll}                                                                                 &
+      \textbf{cl}                                                                                 &
+      \textbf{cd}                                                                                 &
+      \textbf{yl}                                                                                 \\
+      \hline
+      loop \par control                                                                           &
+      \textbf{j} \par \textit{but not} \par \textbf{jp}                                           &
+                                                                                                  &
+                                                                                                  &
+                                                                                                  &
+                                                                                                  &
+                                                                                                  \\
+      \hline
+      parameter                                                                                   &
+      \textbf{jp}                                                                                 &
+      \textbf{pp}                                                                                 &
+      \textbf{lp}                                                                                 &
+      \textbf{cp}                                                                                 &
+      \textbf{dp}                                                                                 &
+      \textbf{yp}                                                                                 \\
+      \hline
+      namelist                                                                                    &
+      \textbf{nn\_}                                                                               &
+      \textbf{rn\_}                                                                               &
+      \textbf{ln\_}                                                                               &
+      \textbf{cn\_}                                                                               &
+      \textbf{dn\_}                                                                               &
+                                                                                                  \\
+      \hline
+      CPP \par macro                                                                              &
+      \textbf{kf}                                                                                 &
+      \textbf{sf}                                                                                 &
+                                                                                                  &
+                                                                                                  &
+                                                                                                  &
+                                                                                                  \\
+      \hline
+    \end{tabular}
+    \label{tab1}
+  \end{center}
+\end{table}
+%--------------------------------------------------------------------------------------------------------------
+
+\subsection{Operators}
+
+Use of the operators \texttt{<, >, <=, >=, ==, /=} is strongly recommended instead of their deprecated counterparts
+(\texttt{.lt., .gt., .le., .ge., .eq., .ne.}).
+The motivation is readability.
+In general use the notation: \\
+$<Blank><Operator><Blank>$
+
+\subsection{Pre processor}
+
+Where the use of a language pre-processor is required, it will be the C pre-processor (cpp). \\
+The cpp key is the main feature used, allowing to ignore some useless parts of the code at compilation step. \\
+The advantage is to reduce the memory use; the drawback is that compilation of this part of the code isn't checked. \\
+The cpp key feature should only be used for a few limited options, if it reduces the memory usage.
+In all cases, a logical variable and a FORTRAN \forcode{IF} should be preferred.
+When using a cpp key \textit{key\_optionname},
+a corresponding logical variable \textit{lk\_optionname} should be declared to
+allow FORTRAN \forcode{IF} tests in the code and
+a FORTRAN module with the same name ($i.e.$ \textit{optionname.F90}) should be defined.
+This module is the only place where a \``\#if defined'' command appears, selecting either the whole FORTRAN code or
+a dummy module.
+For example, the TKE vertical physics, the module name is \textit{zdftke.F90},
+the CPP key is \textit{key\_zdftke} and the associated logical is \textit{lk\_zdftke}.
+
+The following syntax:
+
+\begin{forlines}
+#if defined key_optionname
+!! Part of code conditionally compiled if cpp key key_optionname is active
+#endif
+\end{forlines}
+
+Is to be used rather than the \#ifdef abbreviate form since it may have conflicts with some Unix scripts.
+
+Tests on cpp keys included in \NEMO\ at compilation step:
+
+\begin{itemize}
+\item
+  The CPP keys used are compared to the previous list of cpp keys
+  (the compilation will stop if trying to specify a non-existing key)
+\item
+  If a change occurs in the CPP keys used for a given experiment, the whole compilation phase is done again.
+\end{itemize}
+
+\section{Content rules}
+
+\subsection{Configurations}
+
+The configuration defines the domain and the grid on which \NEMO\ is running.
+It may be useful to associate a CPP key and some variables to a given configuration, although
+the part of the code changed under each of those keys should be minimized.
+As an example, the "ORCA2" configuration (global ocean, 2 degrees grid size) is associated with
+the cpp key \texttt{key\_orca2} for which
+
+\begin{forlines}
+cp_cfg = "orca"
+jp_cfg = 2
+\end{forlines}
+
+\subsection{Constants}
+
+Physical constants ($e.g.$ $\pi$, gas constants) must never be hard-wired into the executable portion of a code.
+Instead, a mnemonically named variable or parameter should be set to the appropriate value,
+in the setup routine for the package.
+We realize than many parameterizations rely on empirically derived constants or fudge factors,
+which are not easy to name.
+In these cases it is not forbidden to leave such factors coded as "magic numbers" buried in executable code, but
+comments should be included referring to the source of the empirical formula.
+Hard-coded numbers should never be passed through argument lists.
+
+\subsection{Declaration for variables and constants}
+
+\subsubsection{Rules}
+
+Variables used as constants should be declared with attribute \forcode{PARAMETER} and
+used always without copying to local variables, in order to
+prevent from using different values for the same constant or changing it accidentally.
+
+\begin{itemize}
+\item
+  Usage of the \forcode{DIMENSION} statement or attribute is required in declaration statements
+\item
+  The ``::'' notation is quite useful to show that this program unit declaration part is written in
+  standard FORTRAN syntax, even if there are no attributes to clarify the declaration section.
+  Always use the notation $<$blank$>$::$<$three blanks$>$ to improve readability.
+\item
+  Declare the length of a character variable using the \forcode{CHARACTER} (len=xxx) syntax
+  \footnote {
+    The len specifier is important because it is possible to have several kinds for characters
+    ($e.g.$ Unicode using two bytes per character, or there might be a different kind for Japanese $e.g.$ NEC).
+  }
+\item
+  For all global data (in contrast to module data, that is all data that can be access by other module)
+  must be accompanied with a comment field on the same line
+  \footnote {
+    This allows a easy research of where and how a variable is declared using the unix command:
+    ``grep var *90 | grep !:''.
+  }.
+  For example:
+  \begin{forlines}
+  REAL(wp), DIMENSION(jpi,jpj,jpk) ::  ua   ! i-horizontal velocity (m/s)
+  \end{forlines}
+\end{itemize}
+
+\subsubsection{Implicit None}
+
+All subroutines and functions will include an \forcode{IMPLICIT NONE} statement.
+Thus all variables must be explicitly typed.
+It also allows the compiler to detect typographical errors in variable names.
+For modules, one \forcode{IMPLICIT NONE} statement in the modules definition section is needed.
+This also removes the need to have \forcode{IMPLICIT NONE} statements in
+any routines that are \forcode{CONTAINS}'ed in the module.
+Improper data initialisation is another common source of errors
+\footnote{
+  A variable could contain an initial value you did not expect.
+  This can happen for several reasons, $e.g.$ the variable has never been assigned a value, its value is outdated,
+  memory has been allocated for a pointer but you have forgotten to initialise the variable pointed to.
+}.
+To avoid problems, initialise variables as close as possible to where they are first used.
+
+\subsubsection{Attributes}
+
+\forcode{PRIVATE} / \forcode{PUBLIC}:
+All resources of a module are \forcode{PUBLIC} by default.
+A reason to store multiple routines and their data in a single module is that
+the scope of the data defined in the module can be limited to the routines which are in the same module.
+This is accomplished with the \forcode{PRIVATE} attribute. \\
+\forcode{INTENT}:
+All dummy arguments of a routine must include the \forcode{INTENT} clause in their declaration in order to
+improve control of variables in routine calls.
+
+\subsection{Headers}
+
+Prologues are not used in \NEMO\ for now, although it may become an interesting tool in combination with
+ProTeX auto documentation script in the future.
+Rules to code the headers and layout of a module or a routine are illustrated in the example module available with
+the code: \path{./src/OCE/module_example}
+
+\subsection{Interface blocks}
+
+Explicit interface blocks are required between routines if optional or keyword arguments are to be used.
+They also allow the compiler to check that the type, shape and number of arguments specified in the \forcode{CALL}
+are the same as those specified in the subprogram itself.
+FORTRAN 95 compilers can automatically provide explicit interface blocks for routines contained in a module.
+
+\subsection{I/O Error Conditions}
+
+I/O statements which need to check an error condition will use the \texttt{iostat=<integer variable>} construct
+instead of the outmoded \texttt{end=} and \forcode{err=}. \\
+Note that a 0 value means success, a positive value means an error has occurred, and
+a negative value means the end of record or end of file was encountered.
+
+\subsection{PRINT - ASCII output files}
+
+Output listing and errors are directed to \texttt{numout} logical unit =6 and
+produces a file called \textit{ocean.output} (use \texttt{ln\_prt} to have one output per process in MPP).
+Logical \texttt{lwp} variable allows for less verbose outputs.
+To output an error from a routine, one can use the following template:
+
+\begin{forlines}
+IF( nstop /= 0 .AND. lwp ) THEN   ! error print
+   WRITE(numout,cform_err)
+   WRITE(numout,*) nstop, ' error have been found'
+ENDIF
+\end{forlines}
+
+\subsection{Precision}
+
+Parameterizations should not rely on vendor-supplied flags to supply a default floating point precision or
+integer size.
+The F95 \forcode{KIND} feature should be used instead.
+In order to improve portability between 32 and 64 bit platforms,
+it is necessary to make use of kinds by using a specific module \path{./src/OCE/par_kind.F90}
+declaring the "kind definitions" to obtain the required numerical precision and range as well as
+the size of \forcode{INTEGER}.
+It should be noted that numerical constants need to have a suffix of \texttt{\_kindvalue} to
+have the according size. \\
+Thus \forcode{wp} being the "working precision" as declared in \path{./src/OCE/par_kind.F90},
+declaring real array \forcode{zpc} will take the form:
+
+\begin{forlines}
+REAL(wp), DIMENSION(jpi,jpj,jpk) ::  zpc      ! power consumption
+\end{forlines}
+
+\subsection{Structures}
+
+The \forcode{TYPE} structure allowing to declare some variables is more often used in \NEMO,
+especially in the modules dealing with reading fields, or interfaces.
+For example:
+
+\begin{forlines}
+! Definition of a tracer as a structure
+TYPE PTRACER
+   CHARACTER(len = 20)  :: sname  ! short name
+   CHARACTER(len = 80 ) :: lname  ! long name
+   CHARACTER(len = 20 ) :: unit   ! unit
+   LOGICAL              :: lini   ! read in a file or not
+   LOGICAL              :: lsav   ! ouput the tracer or not
+END TYPE PTRACER
+
+TYPE(PTRACER) , DIMENSION(jptra) :: tracer
+\end{forlines}
+
+Missing rule on structure name??
+
+\section{Packages coding rules}
+
+\subsection{Bounds checking}
+
+\NEMO\ is able to run when an array bounds checking option is enabled
+(provided the cpp key \texttt{key\_vectopt\_loop} is not defined). \\
+Thus, constructs of the following form are disallowed:
+
+\begin{forlines}
+REAL(wp) :: arr(1)
+\end{forlines}
+
+where "arr" is an input argument into which the user wishes to index beyond 1.
+Use of the (*) construct in array dimensioning is forbidden also because
+it effectively disables array bounds checking.
+
+\subsection{Communication}
+
+A package should refer only to its own modules and subprograms and to those intrinsic functions included in
+the Fortran standard. \\
+All communication with the package will be through the argument list or namelist input.
+\footnote{
+  The point behind this rule is that packages should not have to know details of
+  the surrounding model data structures, or the names of variables outside of the package.
+  A notable exception to this rule is model resolution parameters.
+  The reason for the exception is to allow compile-time array sizing inside the package.
+  This is often important for efficiency.
+}
+
+\subsection{Error conditions}
+
+When an error condition occurs inside a package, a message describing what went wrong will be printed
+(see PRINT - ASCII output files).
+The name of the routine in which the error occurred must be included.
+It is acceptable to terminate execution within a package, but
+the developer may instead wish to return an error flag through the argument list,
+see \textit{stpctl.F90}.
+
+\subsection{Memory management}
+
+The main action is to identify and declare which arrays are \forcode{PUBLIC} and which are \forcode{PRIVATE}. \\
+As of version 3.3.1 of \NEMO, the use of static arrays (size fixed at compile time) has been deprecated.
+All module arrays are now declared \forcode{ALLOCATABLE} and
+allocated in either the \texttt{<module\_name>\_alloc()} or \texttt{<module\_name>\_init()} routines.
+The success or otherwise of each \forcode{ALLOCATE} must be checked using
+the \texttt{stat=<integer\ variable>} optional argument. \\
+
+In addition to arrays contained within modules, many routines in \NEMO\ require local, ``workspace'' arrays to
+hold the intermediate results of calculations.
+In previous versions of \NEMO, these arrays were declared in such a way as to be automatically allocated on
+the stack when the routine was called.
+An example of an automatic array is:
+
+\begin{forlines}
+SUBROUTINE sub(n)
+   REAL :: a(n)
+   ...
+END SUBROUTINE sub
+\end{forlines}
+
+The downside of this approach is that the program will crash if it runs out of stack space and
+the reason for the crash might not be obvious to the user.
+
+Therefore, as of version 3.3.1, the use of automatic arrays is deprecated.
+Instead, a new module, \textit{wrk\_nemo.F90}, has been introduced which
+contains 1-,2-,3- and 4-dimensional workspace arrays for use in subroutines.
+These workspace arrays should be used in preference to declaring new, local (allocatable) arrays whenever possible.
+The only exceptions to this are when workspace arrays with lower bounds other than 1 and/or
+with extent(s) greater than those in the \textit{wrk\_nemo.F90} module are required. \\
+
+The 2D, 3D and 4D workspace arrays in \textit{wrk\_nemo.F90} have extents \texttt{jpi}, \texttt{jpj},
+\texttt{jpk} and \texttt{jpts} ($x$, $y$, $z$ and tracers) in the first, second, third and fourth dimensions,
+respectively.
+The 1D arrays are allocated with extent MAX($jpi \times jpj, jpk \times jpj, jpi \times jpk$). \\
+
+The \forcode{REAL (KIND = wp)} workspace arrays in \textit{wrk\_nemo.F90}
+are named $e.g.$ \texttt{wrk\_1d\_1, wrk\_4d\_2} etc. and
+should be accessed by USE'ing the \textit{wrk\_nemo.F90} module.
+Since these arrays are available to any routine,
+some care must be taken that a given workspace array is not already being used somewhere up the call stack.
+To help with this, \textit{wrk\_nemo.F90} also contains some utility routines;
+\texttt{wrk\_in\_use()} and \texttt{wrk\_not\_released()}.
+The former first checks that the requested arrays are not already in use and then sets internal flags to show that
+they are now in use.
+The \texttt{wrk\_not\_released()} routine un-sets those internal flags.
+A subroutine using this functionality for two, 3D workspace arrays named \texttt{zwrk1} and
+\texttt{zwrk2} will look something like:
+
+\begin{forlines}
+SUBROUTINE sub()
+   USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
+   USE wrk_nemo, ONLY: zwrk1 => wrk_3d_5, zwrk2 => wrk_3d_6
+   !
+   IF(wrk_in_use(3, 5,6)THEN
+      CALL ctl_stop('sub: requested workspace arrays unavailable.')
+      RETURN
+   END IF
+   ...
+   ...
+   IF(wrk_not_released(3, 5,6)THEN
+      CALL ctl_stop('sub: failed to release workspace arrays.')
+   END IF
+   !
+END SUBROUTINE sub
+\end{forlines}
+
+The first argument to each of the utility routines is the dimensionality of the required workspace (1--4).
+Following this there must be one or more integers identifying which workspaces are to be used/released.
+Note that, in the interests of keeping the code as simple as possible,
+there is no use of \forcode{POINTER}s etc. in the \textit{wrk\_nemo.F90} module.
+Therefore it is the responsibility of the developer to ensure that the arguments to \texttt{wrk\_in\_use()} and
+\texttt{wrk\_not\_released()} match the workspace arrays actually being used by the subroutine. \\
+
+If a workspace array is required that has extent(s) less than those of the arrays in
+the \textit{wrk\_nemo.F90} module then the advantages of implicit loops and bounds checking may be retained by
+defining a pointer to a sub-array as follows:
+
+\begin{forlines}
+SUBROUTINE sub()
+   USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released
+   USE wrk_nemo, ONLY: wrk_3d_5
+   !
+   REAL(wp), DIMENSION(:,:,:), POINTER :: zwrk1
+   !
+   IF(wrk_in_use(3, 5)THEN
+      CALL ctl_stop('sub: requested workspace arrays unavailable.')
+      RETURN
+   END IF
+   !
+   zwrk1 => wrk_3d_5(1:10,1:10,1:10)
+   ...
+END SUBROUTINE sub
+\end{forlines}
+
+Here, instead of ``use associating'' the variable \texttt{zwrk1} with the array \texttt{wrk\_3d\_5}
+(as in the first example), it is explicitly declared as a pointer to a 3D array.
+It is then associated with a sub-array of \texttt{wrk\_3d\_5} once the call to
+\texttt{wrk\_in\_use()} has completed successfully.
+Note that in F95 (to which \NEMO\ conforms) it is not possible for either the upper or lower array bounds of
+the pointer object to differ from those of the target array. \\
+
+In addition to the \forcode{REAL (KIND = wp)} workspace arrays,
+\textit{wrk\_nemo.F90} also contains 2D integer arrays and 2D REAL arrays with extent (\texttt{jpi}, \texttt{jpk}),
+$i.e.$ $xz$.
+The utility routines for the integer workspaces are \texttt{iwrk\_in\_use()} and \texttt{iwrk\_not\_released()} while
+those for the $xz$ workspaces are \texttt{wrk\_in\_use\_xz()} and \texttt{wrk\_not\_released\_xz()}.
+
+Should a call to one of the \texttt{wrk\_in\_use()} family of utilities fail,
+an error message is printed along with a table showing which of the workspace arrays are currently in use.
+This should enable the developer to choose alternatives for use in the subroutine being worked on. \\
+
+When compiling \NEMO\ for production runs,
+the calls to {\texttt{wrk\_in\_use()} / \texttt{wrk\_not\_released()} can be reduced to stubs that just
+return \forcode{.false.} by setting the cpp key \texttt{key\_no\_workspace\_check}.
+These stubs may then be in-lined (and thus effectively removed altogether) by setting appropriate compiler flags
+($e.g.$ ``-finline'' for the Intel compiler or ``-Q'' for the IBM compiler).
+
+\subsection{Optimisation}
+
+Considering the new computer architecture, optimisation cannot be considered independently from the computer type.
+In \NEMO, portability is a priority, before any too specific optimisation.
+
+Some tools are available to help: for vector computers, \texttt{key\_vectopt\_loop} allows to unroll a loop
+
+\subsection{Package attribute: \forcode{PRIVATE}, \forcode{PUBLIC}, \forcode{USE}, \forcode{ONLY}}
+
+Module variables and routines should be encapsulated by using the \forcode{PRIVATE} attribute.
+What shall be used outside the module can be declared \forcode{PUBLIC} instead.
+Use \forcode{USE} with the \forcode{ONLY} attribute to specify which of the variables, type definitions etc...
+defined in a module are to be made available to the using routine.
+
+\subsection{Parallelism using MPI}
+
+\NEMO\ is written in order to be able to run on one processor, or on one or more using MPI
+($i.e.$ activating the cpp key $key\_mpp\_mpi$).
+The domain decomposition divides the global domain in cubes (see \NEMO\ reference manual).
+Whilst coding a new development, the MPI compatibility has to be taken in account
+(see \path{./src/LBC/lib_mpp.F90}) and should be tested.
+By default, the $x$-$z$ part of the decomposition is chosen to be as square as possible.
+However, this may be overriden by specifying the number of sub-domains in latitude and longitude in
+the \texttt{nammpp} section of the namelist file.
+
+\section{Features to be avoided}
+
+The code must follow the current standards of FORTRAN and ANSI C.
+In particular, the code should not produce any WARNING at compiling phase, so that
+users can be easily alerted of potential bugs when some appear in their new developments.
+Below is a list of features to avoid:
+\begin{itemize}
+\item \forcode{COMMON} block
+  (use the declaration part of \forcode{MODULE} instead)
+\item \forcode{EQUIVALENCE}
+  (use \forcode{POINTER} or derived data type instead to form data structure)
+\item Assigned and computed \forcode{GOTO}
+  (use the \forcode{CASE} construct instead)
+\item Arithmetic \forcode{IF} statement
+  (use the block \forcode{IF}, \forcode{ELSE}, \forcode{ELSEIF}, \forcode{ENDIF} or
+  \forcode{SELECT CASE} construct instead)
+\item Labelled \forcode{DO} construct
+  (use unlabelled \forcode{END DO} instead)
+\item \forcode{FORMAT} statement
+  (use character parameters or
+  explicit format- specifiers inside the \forcode{READ} or \forcode{WRITE} statement instead)
+\item \forcode{GOTO} and \forcode{CONTINUE} statements
+  (use \forcode{IF}, \forcode{CASE}, \forcode{DO WHILE}, \forcode{EXIT} or \forcode{CYCLE} statements or
+  a contained ?)
+\item \forcode{PAUSE}
+\item \forcode{ENTRY} statement: a sub-program must only have one entry point.
+\item \forcode{RETURN} is obsolete and so not necessary at the end of program units
+\item \forcode{FUNCTION} statement
+\item Avoid functions with side effects.
+  \footnote{
+    First, the code is easier to understand, if you can rely on
+    the rule that functions don't change their arguments.
+    Second, some compilers generate more efficient code for PURE functions
+    (in FORTRAN 95 there are the attributes PURE and ELEMENTAL), because
+    they can store the arguments in different places.
+    This is especially important on massive parallel and as well on vector machines.
+  }
+\item \forcode{DATA} and \forcode{BLOCK DATA}
+  (use initialisers)
+\end{itemize}
+
+%% Imported from introduction
+%%gm    To be put somewhere else ....
+%%nm    We should consider creating a glossary for all this kind of stuff (terms, acronyms and symbols)
+%%      http://en.wikibooks.org/wiki/LaTeX/Glossary
+%\noindent CPP keys and namelists are used as inputs to the code.
+
+%\noindent \index{CPP keys} CPP keys
+
+%Some CPP keys are implemented in the \fortran code to allow code selection at compiling step.
+%This selection of code at compilation time reduces the reliability of the whole platform since
+%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:
+
+%\begin{forlines}
+%#if defined key_option1
+%	! This part of the \fortran code will be active
+%	! only if key_option1 is activated at compiling step
+%#endif
+%\end{forlines}
+
+%\noindent \index{Namelist} Namelists
+
+%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...)
+%containing all the \fortran namelists needed.
+%The implementation in \NEMO\ uses a 2-step process.
+%For each \fortran namelist, two files are read:
+
+%\begin{enumerate}
+%\item
+%  A reference namelist (in \path{./cfgs/SHARED/namelist_ref}) is read first.
+%  This file contains all the namelist variables which are initialised to default values
+%\item
+%  A configuration namelist (in \path{./cfgs/CFG_NAME/EXP00/namelist_cfg}) is read aferwards.
+%  This file contains only the namelist variables which are changed from default values, and overwrites those.
+%\end{enumerate}
+%A template can be found in \path{NEMO/OPA_SRC/module.example}.
+%The effective namelist, taken in account during the run, is stored at execution time in
+%an \texttt{output\_namelist\_dyn} (or \texttt{\_ice} or \texttt{\_top}) file.
+%%gm  end
+
+%%nm: Add some words on the \NEMO\ dependencies
+%The model is implemented in \fninety, with preprocessing (C pre-processor).
+%It runs under UNIX.
+%It is optimized for vector computers and parallelised by domain decomposition with MPI.
+%All input and output is done in NetCDF (Network Common Data Format) with a optional direct access format for output.
+%To ensure the clarity and readability of the code it is necessary to follow coding rules.
+%The coding rules for OPA include conventions for naming variables,
+%with different starting letters for different types of variables (real, integer, parameter\ldots).
+%Those rules are briefly presented in \autoref{apdx:coding} and a more complete document is available .
+
+%The model is organized with a high internal modularity based on physics.
+%For example, each trend (\ie, a term in the RHS of the prognostic equation) for momentum and tracers
+%is computed in a dedicated module.
+%To make it easier for the user to find his way around the code, the module names follow a three-letter rule.
+%For example, \mdl{traldf} is a module related to the TRAcers equation, computing the Lateral DiFfussion.
+%The complete list of module names is presented in \autoref{apdx:coding}.      %====>>>> to be done !
+%Furthermore, modules are organized in a few directories that correspond to their category,
+%as indicated by the first three letters of their name (\autoref{tab:chapters}).
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/document.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/document.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/document.tex	(revision 11831)
@@ -0,0 +1,88 @@
+
+%% =================================================================================================
+%% Template structure for reference manuals
+%% =================================================================================================
+
+%% NEMO release version
+\def \version{trunk}
+
+%% Preamble
+%% =================================================================================================
+
+%% Document layout
+\documentclass[fontsize = 10pt, twoside, abstract]{scrreprt}
+
+%% Load manual configuration
+\input{../../global/prologue}
+
+%% End of common preamble between main and sub-files
+%% Override custom cmds for full manual compilation
+\newcommand{\subinc}[1]{#1}
+\newcommand{\subexc}[1]{}
+
+\begin{document}
+
+\renewcommand{\subinc}[1]{}
+\renewcommand{\subexc}[1]{#1}
+
+
+%% Frontmatter
+%% =================================================================================================
+
+\pagenumbering{gobble}   %% Disable page numbering temporarily
+
+%% Title page
+\input{../../global/frontpage}
+
+%% Footer for introductory parts (no header by cleaning default)
+\ofoot[]{\engine\ Reference Manual} \ifoot[]{\pagemark}
+
+%% Information page (2nd page)
+\input{../../global/info_page}
+
+\listoffigures
+\listoflistings
+\listoftables
+
+\clearpage
+
+\pagenumbering{roman}
+\ofoot[]{\engine\ Reference Manual} \ifoot[]{\pagemark}
+
+\input{introduction}
+
+%% Table of Contents
+\tableofcontents
+
+\clearpage
+
+
+%% Mainmatter
+%% =================================================================================================
+
+%% Headings for document body
+\pagenumbering{arabic}
+\lohead{Chap.\ \thechapter\ \leftmark} \rehead{Sect.\ \thesection\ \rightmark}
+\ifoot[]{Page\ \pagemark\ of \pageref*{LastPage}}
+
+\include{chapters}
+
+
+%% Appendix
+%% =================================================================================================
+
+\appendix   %% Chapter numbering with letters by now
+\lohead{Apdx\ \thechapter\ \leftmark}
+\include{appendices}
+
+%% Append coding rules for every manual
+\input{../../global/coding_rules}
+
+
+%% Backmatter
+%% =================================================================================================
+
+%% Bibliography and indexes
+\input{../../global/epilogue}
+
+\end{document}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/epilogue.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/epilogue.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/epilogue.tex	(revision 11831)
@@ -0,0 +1,20 @@
+
+\clearpage
+
+%% Bibliography
+\phantomsection
+\addcontentsline{toc}{chapter}{Bibliography}
+\lohead{Bibliography} \rehead{Bibliography}
+\bibliography{../main/bibliography}
+
+\clearpage
+
+%% Indexes
+\phantomsection
+\addcontentsline{toc}{chapter}{Indexes}
+\lohead{Indexes} \rehead{Indexes}
+\printindex[blocks]
+\printindex[keys]
+\printindex[modules]
+\printindex[parameters]
+\printindex[subroutines]
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/frontpage.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/frontpage.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/frontpage.tex	(revision 11831)
@@ -0,0 +1,67 @@
+
+\begin{titlepage}
+%  \newgeometry{hmargin = 1.5cm, vmargin = 3cm}
+  \setlength{\parindent}{0pt}
+
+  \begin{center}
+    \begin{minipage}{0.3\textwidth}
+      \includegraphics[height=1.5cm]{logos/NEMO_grey}
+    \end{minipage}\begin{minipage}{0.6\textwidth}
+      \begin{center}
+      \Large\slshape
+      \textbf{N}ucleus for \textbf{E}uropean \textbf{M}odelling of the \textbf{O}cean \\
+      \medskip
+      \hyperref[resources]{\textcolor{black}{
+          \faWordpress \hspace{0.75cm} \faCodeFork      \hspace{0.75cm}
+          \faGithub    \hspace{0.75cm} \faCloudDownload \hspace{0.75cm} \faEnvelope
+        }
+      }
+      \end{center}
+    \end{minipage}
+  \end{center}
+
+  \spacetop
+  \textcolor{white}{\fontsize{0.8cm}{0.8cm}\selectfont\textbf{\heading}}
+  \ifdef{\subheading}{
+    \medskip
+    \par
+    \textcolor{white}{\Huge \subheading}
+  }{}
+  \spacedown
+
+  \begin{center}
+    \LARGE Version \version\ -\ \today \\
+    \medskip
+    \href{http://doi.org/10.5281/zenodo.\zid}{ \includegraphics{badges/zenodo.\zid} }
+  \end{center}
+
+  \vfill
+
+  \begin{minipage}{\authorswidth}
+    \raggedleft
+    \input{authors}
+  \end{minipage}\hspace{15pt}\begin{minipage}{0.02\linewidth}
+    \rule{1pt}{\rulelenght}
+  \end{minipage}\hspace{ 5pt}\begin{minipage}{\abstractwidth}
+    \begin{abstract}
+      \input{abstract}
+    \end{abstract}
+  \end{minipage}
+
+  \vfill
+
+  \begin{center}
+    \Large
+    \href{http://www.cmcc.it          }{ \includegraphics[height=1cm]{logos/CMCC} } \hspace{0.25cm}
+    \href{http://www.cnrs.fr          }{ \includegraphics[height=1cm]{logos/CNRS} } \hspace{0.25cm}
+    \href{http://www.mercator-ocean.fr}{ \includegraphics[height=1cm]{logos/MOI}  } \hspace{0.25cm}
+    \href{http://www.metoffice.gov.uk }{ \includegraphics[height=1cm]{logos/UKMO} } \hspace{0.25cm}
+    \href{http://nerc.ukri.org        }{ \includegraphics[height=1cm]{logos/NERC} } \\
+    \medskip
+    \slshape
+    {C}ommunity \hspace{1.5em} {O}cean \hspace{1.5em} {M}odel \\
+  \end{center}
+
+\end{titlepage}
+
+\restoregeometry
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/highlighting.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/highlighting.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/highlighting.tex	(revision 11831)
@@ -0,0 +1,32 @@
+%% Syntax highlighting configuration
+%% ==============================================================================
+
+\usepackage[outputdir=../build, chapter, newfloat]{minted}
+
+%% Global highlighting style
+\definecolor{bg}{HTML}{f8f8f8}
+\usemintedstyle{emacs}
+\setminted{bgcolor=bg, fontsize=\scriptsize, breaklines}
+\setminted[xml]{style=borland} %% Specific per language
+
+%% Oneliner
+\newmint[forline]{fortran}{}   % \forline|...|
+\newmint[xmlline]{xml}{}       % \xmlline|...|
+\newmint[cmd]{console}{}       % \cmd|...|
+
+%% Multi-lines
+\newminted[forlines]{fortran}{}   % \begin{forlines}
+\newminted[xmllines]{xml}{}       % \begin{xmllines}
+\newminted[cmds]{console}{}       % \begin{cmds}
+\newminted[clines]{c}{}           % \begin{clines}
+
+%% File
+\newmintedfile[forfile]{fortran}{}
+
+%% Inline
+\newmintinline[forcode]{fortran}{bgcolor=, fontsize=auto}   % \forcode{...}
+\newmintinline[xmlcode]{xml}{    bgcolor=, fontsize=auto}   % \xmlcode{...}
+\newmintinline[snippet]{console}{bgcolor=, fontsize=auto}   % \snippet{...}
+
+%% Namelists inclusion
+\newcommand{\nlst}[1]{\forfile{../../../namelists/#1}}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/index.ist
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/index.ist	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/index.ist	(revision 11831)
@@ -0,0 +1,4 @@
+headings_flag 1
+heading_prefix "\\medskip\\hfill\\textnormal{"
+heading_suffix "}\\hfill\\smallskip\n"
+delim_0 "\\dotfill~"
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/index.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/index.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/index.tex	(revision 11831)
@@ -0,0 +1,25 @@
+
+\usepackage{imakeidx}
+
+%% Naming customization
+\renewcommand{\listingname}{namelist}
+\renewcommand{\listlistingname}{List of Namelists}
+
+%% Index entries (italic font for files, preformat for code)
+\newcommand{\hf}[1]{   \index{h90 files!#1}             \textit{#1.h90}          }
+\newcommand{\ifile}[1]{\index{Input NetCDF files!#1.nc} \textit{#1.nc}           }
+\newcommand{\jp}[1]{   \index{Model parameters!#1}      \texttt{#1}              }
+\newcommand{\key}[1]{  \index[keys]{#1@\texttt{\textbf{key\_#1}}} \texttt{\textbf{key\_#1}}}
+\newcommand{\mdl}[1]{  \index[modules]{#1@\textit{#1.F90}}        \textit{#1.F90}          }
+\newcommand{\nam}[2]{  \index[blocks]{#1@\texttt{\&nam#2}}        \forcode{&nam#1} (\autoref{lst:nam#1})}
+\newcommand{\np}[3][]{ \index[parameters]{#3@\texttt{#3}}         \forcode{#2#1}           }
+\newcommand{\rou}[1]{  \index[subroutines]{#1@\texttt{#1}}        \texttt{#1}              }
+
+
+\indexsetup{toclevel=section, othercode=\small}
+
+\makeindex[intoc=true, name=blocks     , title=Namelist blocks      , columns=3]
+\makeindex[intoc=true, name=keys       , title=CPP keys                        ]
+\makeindex[intoc=true, name=modules    , title=\fortran\ modules    , columns=3]
+\makeindex[intoc=true, name=parameters , title=Namelist parameters  , columns=3]
+\makeindex[intoc=true, name=subroutines, title=\fortran\ subroutines           ]
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/info_page.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/info_page.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/info_page.tex	(revision 11831)
@@ -0,0 +1,76 @@
+
+\thispagestyle{plain}
+
+%% ================================================================
+%% Disclaimer
+%% ================================================================
+\subsubsection*{Disclaimer}
+
+Like all components of the modelling framework,
+the \engine\ core engine is developed under the \href{http://www.cecill.info}{CECILL license},
+which is a French adaptation of the GNU GPL (\textbf{G}eneral \textbf{P}ublic \textbf{L}icense).
+Anyone may use it freely for research purposes, and is encouraged to
+communicate back to the development team its own developments and improvements.
+
+The model and the present document have been made available as a service to the community.
+We cannot certify that the code and its manual are free of errors.
+Bugs are inevitable and some have undoubtedly survived the testing phase.
+Users are encouraged to bring them to our attention.
+
+The authors assume no responsibility for problems, errors, or incorrect usage of \NEMO.
+
+%% ================================================================
+%% External resources
+%% ================================================================
+\subsubsection*{Other resources}
+\label{resources}
+
+Additional information can be found on:
+\begin{itemize}
+\item \faWordpress\ the \href{http://www.nemo-ocean.eu}{website} of the project detailing several
+  associated applications and an exhaustive users bibliography
+\item \faCodeFork\ the \href{http://forge.ipsl.jussieu.fr/nemo}{development platform} of
+  the model with the code repository for the shared reference and some main resources
+  (wiki, ticket system, forums, \ldots) \\
+  \faGithub\ the \href{http://github.com/NEMO-ocean/NEMO-examples}
+  {repository of the demonstration cases} for research or training
+\item \faCloudDownload\ the \href{http://zenodo.org/communities/nemo-ocean}{online archive}
+  delivering the publications issued by the consortium (manuals, reports, datasets, \ldots)
+\item \faEnvelope\ two mailing lists:
+  the \href{http://listes.ipsl.fr/sympa/info/nemo-newsletter}{newsletter} for
+  top-down communications from the project
+  (announcements, calls, job opportunities, \ldots)
+  and the \href{http://listes.ipsl.fr/sympa/info/nemo-forge}{forge updates}
+  (commits, tickets and forums)
+\end{itemize}
+
+%% ================================================================
+%% Citation
+%% ================================================================
+\subsubsection*{Citation}
+
+Reference for papers and other publications is as follows:
+
+\medskip
+
+\begin{sloppypar}
+  ``{\bfseries \heading}\ifdef{\subheading}{ -- \subheading}{}'',
+  {\em Scientific Notes of Climate Modelling Center}, \textbf{\ipslnum} --- ISSN 1288-1619,
+  Institut Pierre-Simon Laplace (IPSL),
+  \href{https://doi.org/10.5281/zenodo.\zid}{doi:10.5281/zenodo.\zid}
+\end{sloppypar}
+
+\begin{figure}[b]
+  \begin{minipage}[c]{0.7\textwidth}
+    \small
+    \ttfamily{
+      Scientific Notes of Climate Modelling Center \\
+      ISSN 1288-1619                               \\
+      Institut Pierre-Simon Laplace (IPSL)
+    }
+  \end{minipage}
+  \hfill
+  \begin{minipage}[c]{0.25\textwidth}
+    \href{http://www.cmc.ipsl.fr}{\includegraphics[width=\textwidth]{logos/IPSL_upright}}
+  \end{minipage}
+\end{figure}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/latexmk.pl
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/latexmk.pl	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/latexmk.pl	(revision 11831)
@@ -0,0 +1,13 @@
+
+## Defaults
+$do_cd    = 1;   ## Change to the directory of the main source file
+$silent   = 1;   ## Less verbosity
+
+## Use of 'build' relative directory
+$ENV{'openout_any'}='a';
+$out_dir = '../build';
+
+## Global option
+set_tex_cmds( '-shell-escape' );
+
+$makeindex = "makeindex %O -s ../../global/index -o $out_dir/%D $out_dir/%S";
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/new_cmds.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/new_cmds.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/new_cmds.tex	(revision 11831)
@@ -0,0 +1,69 @@
+%% Global custom commands: \newcommand{<name>}[<args>][<first argument value>]{<code>}
+%% ==============================================================================
+
+%% Same slanted font for NEMO and its core engines
+\newcommand{\NEMO  }{\textsl{NEMO}}
+\newcommand{\OPA   }{\textsl{OPA}}
+\newcommand{\SIcube}{\textsl{SI$^3$}}
+\newcommand{\TOP   }{\textsl{TOP}}
+\newcommand{\PISCES}{\textsl{PISCES}}
+\newcommand{\NEMOVAR}{\textsl{NEMOVAR}}
+
+%% Links for external components
+\newcommand{\AGRIF}{\href{http://agrif.imag.fr}{AGRIF}}
+\newcommand{\CICE }{\href{http://github.com/CICE-Consortium/CICE}{CICE}}
+\newcommand{\OASIS}{\href{http://portal.enes.org/oasis}{OASIS}}
+\newcommand{\XIOS }{\href{http://forge.ipsl.jussieu.fr/ioserver}{XIOS}}
+
+%% Fortran in small capitals
+\newcommand{\fortran}{\textsc{Fortran}}
+\newcommand{\fninety}{\textsc{Fortran 90}}
+
+%% Common aliases
+\renewcommand{\deg}[1][]{\ensuremath{^{\circ}#1}}
+\newcommand{\zstar }{\ensuremath{z^\star}}
+\newcommand{\sstar }{\ensuremath{s^\star}}
+\newcommand{\ztilde}{\ensuremath{\tilde z}}
+\newcommand{\stilde}{\ensuremath{\tilde s}}
+\newcommand{\ie}{\ensuremath{i.e.}}
+\newcommand{\eg}{\ensuremath{e.g.}}
+
+%% Inline maths
+\newcommand{\fractext}[2]{\textstyle \frac{#1}{#2}}
+\newcommand{\rdt}{\Delta t}
+
+%% Gurvan's comments
+\newcommand{\cmtgm}[1]{}
+
+%% Maths
+\newcommand{\lt}{\left}
+\newcommand{\rt}{\right}
+\newcommand{\vect}[1]{\ensuremath{ \mathbf{#1} }}
+\newcommand{\pd}[2][]{\ensuremath{\frac{\partial #1}{\partial #2}}}
+
+%% Convert chapter/section headings to lowercase
+\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
+\renewcommand{\sectionmark}[1]{\markright{#1}{}}
+
+%% Retrieve month name
+\renewcommand{\today}{
+  \ifcase \month\or January\or February\or March\or
+                    April\or   May\or      June\or
+                    July\or    August\or   September\or
+                    October\or November\or December
+  \fi, \number \year
+}
+
+%% Link to orcid profile
+\newcommand{\orcid}[1]{\href{http://orcid.org/#1}{\textcolor{orcidcolor}\aiOrcidSquare}}
+
+%% Workaround for \listoffigures
+\DeclareRobustCommand{\triad}[6][]{\ensuremath{ {}_{#2}^{#3} { \mathbb{#4}_{#1} }_{#5}^{\,#6} }}
+
+%% New command for ToC
+\newcommand{\chaptertoc}[1][Table of contents]{%
+  \thispagestyle{empty}
+  \etocsettocstyle{\addsec*{#1}}{}%
+  \localtableofcontents%
+  \vfill
+}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/packages.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/packages.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/packages.tex	(revision 11831)
@@ -0,0 +1,44 @@
+
+%% LaTeX packages in use
+%% ==============================================================================
+
+%% 'hyperref' pkg is loaded at the end of the preamble for higher compatibility
+
+%% KOMA-script
+\usepackage[footsepline=0.25pt, headsepline=0.25pt]{scrlayer-scrpage}
+
+%% customization (layout, header/footer styles & contents, background)
+\usepackage{draftwatermark}
+\usepackage[margin = 2cm]{geometry}
+\usepackage[pages = some]{background}   %% 'some' for title page
+\usepackage[Bjornstrup]{fncychap}
+
+%% Fonts
+\usepackage{fontspec}
+%% Issue with fontawesome pkg: path to FontAwesome.otf has to be hard-coded
+\defaultfontfeatures{
+    Path = /usr/local/texlive/2019/texmf-dist/fonts/opentype/public/fontawesome/
+}
+\usepackage{academicons, fontawesome, newtxtext}
+
+%% Formatting
+\usepackage[inline]{enumitem}
+\usepackage{etoc, tabularx, xcolor}
+
+%% Graphics
+\usepackage{caption, graphicx, grffile}
+
+%% Labels
+\usepackage{lastpage, natbib}
+
+%% Mathematics
+\usepackage{amsmath, amssymb, mathtools}
+
+%% Versatility
+\usepackage{subfiles}
+
+%% Configuration
+\graphicspath{ {../../../} {../figures/} }
+
+%% Missing utmr8a font
+\usepackage{times}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/prologue.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/prologue.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/prologue.tex	(revision 11831)
@@ -0,0 +1,25 @@
+
+%% Specific configuration
+\input{../main/settings}
+
+%% Global configuration
+\input{../../global/packages}
+\input{../../global/highlighting}
+\input{../../global/index}
+\input{../../global/styles}
+\input{../../global/new_cmds}
+%\input{../../global/todonotes}
+
+%% Load hyperref at the end of the preamble to make it work with other pkgs
+\usepackage{hyperref}   %% links
+\hypersetup{
+  colorlinks,
+  citecolor = manualcolor, linkcolor = manualcolor, urlcolor = manualcolor,
+  final   %% Links even in draft mode
+}
+
+%% `\autoref` uncapitalization
+\renewcommand{\appendixautorefname}{appendix}
+\renewcommand{\equationautorefname}{equation}
+\renewcommand{\figureautorefname}{figure}
+\renewcommand{\tableautorefname}{table}
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/styles.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/styles.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/styles.tex	(revision 11831)
@@ -0,0 +1,85 @@
+
+%% Styles
+%% ==============================================================================
+
+%% Colors
+\setmanualcolor
+\colorlet{manualcolorshaded}{manualcolor!60}
+\definecolor{orcidcolor}{HTML}{A6CE39}
+
+%% Page layout
+\pagestyle{scrheadings}
+\addtokomafont{pagehead}{  \sffamily              }
+\addtokomafont{pagefoot}{  \sffamily \footnotesize}
+\addtokomafont{pagenumber}{\sffamily \slshape     }
+\addtokomafont{chapter}{\color{white}}
+\ohead{} \ofoot{}   %% Clear defaults
+
+%% Caption
+\captionsetup{font = footnotesize, justification = justified}
+
+%% Footnote
+\renewcommand{\thefootnote}{\fnsymbol{footnote}}
+
+%% Bibliography
+\bibliographystyle{../../global/ametsoc}
+\renewcommand{\bibfont}{\small}
+\renewcommand{\bibpreamble }{\begin{multicols}{2}}
+\renewcommand{\bibpostamble}{  \end{multicols}   }
+
+%% Catcodes
+\makeatletter
+
+%% Prevent error with tikz and namelist inclusion
+\global\let\tikz@ensure@dollar@catcode=\relax
+
+%% First page
+\backgroundsetup{
+  firstpage = true,
+  scale = 1, angle = 0, opacity = 1,
+  contents = {
+    \begin{tikzpicture}[remember picture, overlay]
+      \path [fill = manualcolor] (-0.5\paperwidth, 7) rectangle (0.5\paperwidth, 10);
+    \end{tikzpicture}
+  }
+}
+
+%% Apply engine color for chapter headings: tweaking snippets from fncychap.sty
+\renewcommand{\DOCH}{%
+  \settowidth{\py}{\CNoV\thechapter}
+  \addtolength{\py}{-10pt}      % Amount of space by which the
+%                                  % number is shifted right
+  \fboxsep=0pt%
+  \colorbox{manualcolor}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}%
+  \kern-\py\raise20pt%
+  \hbox{\color{manualcolorshaded}\CNoV\thechapter}\\%
+}
+\renewcommand{\DOTI}[1]{%
+  \nointerlineskip\raggedright%
+  \fboxsep=\myhi%
+  \vskip-1ex%
+  \colorbox{manualcolor}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak%
+  \vskip 40\p@%
+}
+\renewcommand{\DOTIS}[1]{%
+  \fboxsep=0pt
+  \colorbox{manualcolor}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}\\%
+  \nointerlineskip\raggedright%
+  \fboxsep=\myhi%
+  \vskip-1ex% Remove white 1pt line
+  \colorbox{manualcolor}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak%
+  \vskip 40\p@%
+}
+
+%% Temporary fix
+\def\set@curr@file#1{%
+  \begingroup
+    \escapechar\m@ne
+    \xdef\@curr@file{\expandafter\string\csname #1\endcsname}%
+  \endgroup
+}
+\def\quote@name#1{"\quote@@name#1\@gobble""}
+\def\quote@@name#1"{#1\quote@@name}
+\def\unquote@name#1{\quote@@name#1\@gobble"}
+
+\makeatother
Index: NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/todonotes.tex
===================================================================
--- NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/todonotes.tex	(revision 11831)
+++ NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/doc/latex/global/todonotes.tex	(revision 11831)
@@ -0,0 +1,40 @@
+\usepackage[]{todonotes}
+
+\newcounter{ubcomment}
+\newcommand{\ubcomment}[2][]{%
+\refstepcounter{ubcomment}%
+{%
+\todo[linecolor=black,backgroundcolor={green!40!},size=\footnotesize]{%
+\textbf{Fixme: UB [\uppercase{#1}\theubcomment]:}~#2}%
+}}
+\newcommand{\ubcommentinline}[2][]{%
+\refstepcounter{ubcomment}%
+{%
+\todo[linecolor=black,inline,backgroundcolor={green!40!},size=\footnotesize]{%
+\textbf{Fixme: UB [\uppercase{#1}\theubcomment]:}~#2}%
+}}
+
+\newcommand{\ubcommentmultiline}[2]{%
+\refstepcounter{ubcomment}%
+{%
+\todo[linecolor=black,inline,caption={\textbf{{Fixme: UB}
+    [\theubcomment] #1}} ,backgroundcolor={green!40!},size=\footnotesize]{%
+\textbf{Fixme: UB [\theubcomment]:}~#2}%
+}}
+
+% add support for todo in equations
+%\usepackage{marginnote}
+%\makeatletter
+%\renewcommand{\@todonotes@drawMarginNoteWithLine}{%
+%\begin{tikzpicture}[remember picture, overlay, baseline=-0.75ex]%
+%    \node [coordinate] (inText) {};%
+%\end{tikzpicture}%
+%\marginnote[{% Draw note in left margin
+%    \@todonotes@drawMarginNote%
+%    \@todonotes@drawLineToLeftMargin%
+%}]{% Draw note in right margin
+%    \@todonotes@drawMarginNote%
+%    \@todonotes@drawLineToRightMargin%
+%}%
+%}
+%\makeatother
