Index: branches/2017/dev_merge_2017/DOC/HTML_htlatex.sh
===================================================================
--- branches/2017/dev_merge_2017/DOC/HTML_htlatex.sh	(revision 9407)
+++ branches/2017/dev_merge_2017/DOC/HTML_htlatex.sh	(revision 9407)
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+./inc/clean.sh
+./inc/build.sh
+
+mkdir -p html_htlatex
+cd tex_main
+htlatex NEMO_manual "NEMO_manual,2" "" "-d../html_htlatex/" "-shell-escape"
+cd -
+
+exit 0
Index: branches/2017/dev_merge_2017/DOC/HTML_latex2html.sh
===================================================================
--- branches/2017/dev_merge_2017/DOC/HTML_latex2html.sh	(revision 9407)
+++ branches/2017/dev_merge_2017/DOC/HTML_latex2html.sh	(revision 9407)
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+./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
+cd -
+
+exit 0
Index: branches/2017/dev_merge_2017/DOC/PDF_creation.sh
===================================================================
--- branches/2017/dev_merge_2017/DOC/PDF_creation.sh	(revision 9407)
+++ branches/2017/dev_merge_2017/DOC/PDF_creation.sh	(revision 9407)
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+./inc/clean.sh
+./inc/build.sh
+
+cd tex_main
+pdflatex -shell-escape NEMO_manual
+mv NEMO_manual.pdf ..
+cd -
+
+exit 0
Index: branches/2017/dev_merge_2017/DOC/build_NEMO_manual.sh
===================================================================
--- branches/2017/dev_merge_2017/DOC/build_NEMO_manual.sh	(revision 9406)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#!/bin/sh
-
-latex_file='NEMO_manual'
-latex_opts='-shell-escape -interaction=nonstopmode'
-
-cd tex_main
-
-latex 		${latex_opts} 				${latex_file}
-makeindex 	-s ${latex_file}.ist 	${latex_file}
-bibtex 										${latex_file}
-latex 		${latex_opts} 				${latex_file}
-
-pdflatex 	${latex_opts} 				${latex_file}
-
-mv ${latex_file}.pdf ..
-
-cd -
-
-exit 0
Index: branches/2017/dev_merge_2017/DOC/clean.sh
===================================================================
--- branches/2017/dev_merge_2017/DOC/clean.sh	(revision 9406)
+++ 	(revision )
@@ -1,8 +1,0 @@
-#!/bin/bash
-
-rm -f $( ls -1 tex_main/NEMO_* | egrep -v "\.(bib|ist|sty|tex)$" )
-#rm -rf _minted-*
-#rm -rf html*
-find tex_* -regextype posix-extended -regex ".*\.(aux|log)$" -exec rm -f {} \;
-
-exit 0
Index: branches/2017/dev_merge_2017/DOC/convert_to_HTML_htlatex.sh
===================================================================
--- branches/2017/dev_merge_2017/DOC/convert_to_HTML_htlatex.sh	(revision 9406)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#!/bin/bash
-
-latex     -shell-escape	NEMO_manual
-makeindex					NEMO_manual
-bibtex						NEMO_manual
-latex     -shell-escape	NEMO_manual
-
-mkdir -p html_htlatex
-htlatex NEMO_manual "htlatex,2" "" "-dhtml_htlatex/" "-shell-escape"
-
-exit 0
Index: branches/2017/dev_merge_2017/DOC/convert_to_HTML_latex2html.sh
===================================================================
--- branches/2017/dev_merge_2017/DOC/convert_to_HTML_latex2html.sh	(revision 9406)
+++ 	(revision )
@@ -1,21 +1,0 @@
-#!/bin/bash
-
-sed -i -e 's#\\documentclass#%\\documentclass#' -e '/{document}/ s/^/%/' \
-	texfiles/chapters/*.tex
-sed -i    '30,${s#\\subfile{#\\include{#g}' \
-	NEMO_manual.tex
-
-latex     -shell-escape		NEMO_manual
-makeindex 						NEMO_manual
-bibtex 							NEMO_manual
-
-latex2html -local_icons -no_footnode -split 4 -link 2 -mkdir -dir html_LaTeX2HTML 	\
-				$* 																							\
-	NEMO_manual
-
-sed -i -e 's#%\\documentclass#\\documentclass#' -e '/{document}/ s/^%//' \
-	texfiles/chapters/*.tex
-sed -i    '30,${s#\\include{#\\subfile{#g}' \
-	NEMO_manual.tex
-
-exit 0
Index: branches/2017/dev_merge_2017/DOC/htlatex.cfg
===================================================================
--- branches/2017/dev_merge_2017/DOC/htlatex.cfg	(revision 9406)
+++ 	(revision )
@@ -1,5 +1,0 @@
-\Preamble{html}
-
-\begin{document}
-
-\EndPreamble
Index: branches/2017/dev_merge_2017/DOC/inc/build.sh
===================================================================
--- branches/2017/dev_merge_2017/DOC/inc/build.sh	(revision 9407)
+++ branches/2017/dev_merge_2017/DOC/inc/build.sh	(revision 9407)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+latex_file='NEMO_manual'
+latex_opts='-shell-escape -interaction=nonstopmode'
+
+cd tex_main
+
+latex 		${latex_opts} 				${latex_file}
+makeindex 	-s ${latex_file}.ist 	${latex_file}
+bibtex 										${latex_file}
+latex 		${latex_opts} 				${latex_file}
+
+cd -
+
+exit 0
Index: branches/2017/dev_merge_2017/DOC/inc/clean.sh
===================================================================
--- branches/2017/dev_merge_2017/DOC/inc/clean.sh	(revision 9407)
+++ branches/2017/dev_merge_2017/DOC/inc/clean.sh	(revision 9407)
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+rm -f $( ls -1 tex_main/NEMO_* | egrep -v "\.(bib|cfg|ist|sty|tex)$" )
+#rm -rf _minted-*
+#rm -rf html*
+find tex_* -regextype posix-extended -regex ".*\.(aux|log)$" -exec rm -f {} \;
+
+exit 0
Index: branches/2017/dev_merge_2017/DOC/tex_main/NEMO_manual.cfg
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_main/NEMO_manual.cfg	(revision 9407)
+++ branches/2017/dev_merge_2017/DOC/tex_main/NEMO_manual.cfg	(revision 9407)
@@ -0,0 +1,10 @@
+\Preamble{xhtml,mathml}
+
+\Configure{@HEAD}{%
+\HCode{<script type="text/javascript"
+   src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=MML_CHTML">
+ </script>\Hnewline}}
+
+\begin{document}
+
+\EndPreamble
Index: branches/2017/dev_merge_2017/DOC/tex_sub/annex_A.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/annex_A.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/annex_A.tex	(revision 9407)
@@ -6,5 +6,5 @@
 % ================================================================
 \chapter{Curvilinear $s-$Coordinate Equations}
-\label{Apdx_A}
+\label{apdx:A}
 \minitoc
 
@@ -16,14 +16,14 @@
 % ================================================================
 \section{Chain rule for $s-$coordinates}
-\label{Apdx_A_continuity}
+\label{sec:A_continuity}
 
 In order to establish the set of Primitive Equation in curvilinear $s$-coordinates
 ($i.e.$ 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 \S\ref{PE_zco_Eq} for the special case $k = z$ and thus $e_3 = 1$, and we introduce 
+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}
+\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 
@@ -33,5 +33,5 @@
 The chain rule to establish the model equations in the curvilinear $s-$coordinate 
 system is:
-\begin{equation} \label{Apdx_A_s_chain_rule}
+\begin{equation} \label{apdx:A_s_chain_rule}
 \begin{aligned}
 &\left. {\frac{\partial \bullet }{\partial t}} \right|_z  =
@@ -54,5 +54,5 @@
 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}
+\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} 
@@ -65,7 +65,7 @@
 % ================================================================
 \section{Continuity equation in $s-$coordinates}
-\label{Apdx_A_continuity}
-
-Using (\ref{Apdx_A_s_chain_rule}) and the fact that the horizontal scale factors 
+\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
@@ -131,8 +131,8 @@
 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}
+\begin{equation} \label{apdx:A_w_s}
 \omega  = w - w_s - \sigma _1 \,u - \sigma _2 \,v    \\
 \end{equation}
-with $w_s$ given by \eqref{Apdx_A_w_in_s}, we obtain the expression for 
+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} 
@@ -167,7 +167,7 @@
 \end{subequations}
 
-As a result, the continuity equation \eqref{Eq_PE_continuity} in the 
+As a result, the continuity equation \autoref{eq:PE_continuity} in the 
 $s-$coordinates is:
-\begin{equation} \label{Apdx_A_sco_Continuity}
+\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[ 
@@ -184,5 +184,5 @@
 % ================================================================
 \section{Momentum equation in $s-$coordinate}
-\label{Apdx_A_momentum}
+\label{sec:A_momentum}
 
 Here we only consider the first component of the momentum equation, 
@@ -193,5 +193,5 @@
 $\bullet$ \textbf{Total derivative in vector invariant form}
 
-Let us consider \eqref{Eq_PE_dyn_vect}, the first component of the momentum 
+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 
@@ -258,6 +258,6 @@
 \end{subequations}
 %
-Applying the time derivative chain rule (first equation of (\ref{Apdx_A_s_chain_rule}))
-to $u$ and using (\ref{Apdx_A_w_in_s}) provides the expression of the last term 
+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{equation*} {\begin{array}{*{20}l} 
@@ -269,5 +269,5 @@
 leads to the $s-$coordinate formulation of the total $z-$coordinate time derivative, 
 $i.e.$ the total $s-$coordinate time derivative :
-\begin{align} \label{Apdx_A_sco_Dt_vect}
+\begin{align} \label{apdx:A_sco_Dt_vect}
 \left. \frac{D u}{D t} \right|_s 
   = \left. {\frac{\partial u }{\partial t}} \right|_s       
@@ -285,5 +285,5 @@
 
 Let us start from the total time derivative in the curvilinear $s-$coordinate system 
-we have just establish. Following the procedure used to establish (\ref{Eq_PE_flux_form}), 
+we have just establish. Following the procedure used to establish (\autoref{eq:PE_flux_form}), 
 it can be transformed into :
 %\begin{subequations} 
@@ -356,5 +356,5 @@
 which leads to the $s-$coordinate flux formulation of the total $s-$coordinate time derivative, 
 $i.e.$ the total $s-$coordinate time derivative in flux form :
-\begin{flalign}\label{Apdx_A_sco_Dt_flux}
+\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
@@ -365,5 +365,5 @@
 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 (\ref{Apdx_A_sco_Continuity}), the continuity equation.
+of (\autoref{apdx:A_sco_Continuity}), the continuity equation.
 
 $\ $\newline    % force a new ligne
@@ -381,6 +381,6 @@
 \end{equation*}
 Applying similar manipulation to the second component and replacing 
-$\sigma _1$ and $\sigma _2$ by their expression \eqref{Apdx_A_s_slope}, it comes:
-\begin{equation} \label{Apdx_A_grad_p}
+$\sigma _1$ and $\sigma _2$ by their expression \autoref{apdx:A_s_slope}, it comes:
+\begin{equation} \label{apdx:A_grad_p}
 \begin{split}
  -\frac{1}{\rho _o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z
@@ -394,5 +394,5 @@
 \end{equation}
 
-An additional term appears in (\ref{Apdx_A_grad_p}) which accounts for the 
+An additional term appears in (\autoref{apdx:A_grad_p}) which accounts for the 
 tilt of $s-$surfaces with respect to geopotential $z-$surfaces.
 
@@ -408,5 +408,5 @@
 \end{equation*}
 Therefore, $p$ and $p_h'$ are linked through:
-\begin{equation} \label{Apdx_A_pressure}
+\begin{equation} \label{apdx:A_pressure}
    p = \rho_o \; p_h' + g \, ( z + \eta )
 \end{equation}
@@ -416,7 +416,7 @@
 \end{equation*}
 
-Substituing \eqref{Apdx_A_pressure} in \eqref{Apdx_A_grad_p} and using the definition of 
+Substituing \autoref{apdx:A_pressure} in \autoref{apdx:A_grad_p} and using the definition of 
 the density anomaly it comes the expression in two parts:
-\begin{equation} \label{Apdx_A_grad_p}
+\begin{equation} \label{apdx:A_grad_p}
 \begin{split}
  -\frac{1}{\rho _o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z
@@ -430,5 +430,5 @@
 \end{equation}
 This formulation of the pressure gradient is characterised by the appearance of a term depending on the 
-the sea surface height only (last term on the right hand side of expression \eqref{Apdx_A_grad_p}).
+the sea surface height only (last term on the right hand side of expression \autoref{apdx:A_grad_p}).
 This term will be loosely termed \textit{surface pressure gradient}
 whereas the first term will be termed the 
@@ -445,5 +445,5 @@
 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 appendix~\ref{Apdx_B}.
+discussed in \autoref{apdx:B}.
 
 
@@ -455,6 +455,6 @@
 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}
+\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                                    
@@ -465,5 +465,5 @@
 	+   D_u^{\vect{U}}  +   F_u^{\vect{U}}
 \end{multline}
-\begin{multline} \label{Apdx_A_dyn_vect_v}
+\begin{multline} \label{apdx:A_dyn_vect_v}
 \frac{\partial v}{\partial t}=
 	-   \left( {\zeta +f} \right)\,u   
@@ -477,6 +477,6 @@
 whereas the flux form momentum equation differ 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}
+\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) 
@@ -487,5 +487,5 @@
 	+   D_u^{\vect{U}}  +   F_u^{\vect{U}}
 \end{multline}
-\begin{multline} \label{Apdx_A_dyn_flux_v}
+\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) 
@@ -499,5 +499,5 @@
 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}
+\begin{equation} \label{apdx:A_dyn_zph}
 \frac{\partial p_h'}{\partial k} = - d \, g \, e_3
 \end{equation}
@@ -516,10 +516,10 @@
 % ================================================================
 \section{Tracer equation}
-\label{Apdx_A_tracer}
+\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}
+\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} 
Index: branches/2017/dev_merge_2017/DOC/tex_sub/annex_B.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/annex_B.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/annex_B.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Appendix B : Diffusive Operators}
-\label{Apdx_B}
+\label{apdx:B}
 \minitoc
 
@@ -16,10 +16,10 @@
 % ================================================================
 \section{Horizontal/Vertical $2^{nd}$ order tracer diffusive operators}
-\label{Apdx_B_1}
+\label{sec:B_1}
 
 \subsubsection*{In z-coordinates}
 In $z$-coordinates, the horizontal/vertical second order tracer diffusion operator
 is given by:
-\begin{eqnarray} \label{Apdx_B1}
+\begin{eqnarray} \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.
@@ -31,8 +31,8 @@
 \subsubsection*{In generalized vertical coordinates}
 In $s$-coordinates, we defined the slopes of $s$-surfaces, $\sigma_1$ and
-$\sigma_2$ by \eqref{Apdx_A_s_slope} and the vertical/horizontal ratio of diffusion
+$\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}
+\begin{equation} \label{apdx:B2}
 D^T = \left. \nabla \right|_s \cdot
            \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_s T  \right] \\
@@ -56,10 +56,10 @@
 \end{subequations}
 
-Equation \eqref{Apdx_B2} is obtained from \eqref{Apdx_B1} without any
+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 Appendix~\ref{Apdx_A}
-and use \eqref{Apdx_A_s_slope} and \eqref{Apdx_A_s_chain_rule}.
+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
-\eqref{Apdx_B1}, the ($i$,$z$) and ($j$,$z$) planes are independent.
+\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:
@@ -139,5 +139,5 @@
 % ================================================================
 \section{Iso/Diapycnal $2^{nd}$ order tracer diffusive operators}
-\label{Apdx_B_2}
+\label{sec:B_2}
 
 \subsubsection*{In z-coordinates}
@@ -147,5 +147,5 @@
 formulated, takes the following form \citep{Redi_JPO82}:
 
-\begin{equation} \label{Apdx_B3}
+\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}
@@ -166,6 +166,6 @@
 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}
+\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}
@@ -176,5 +176,5 @@
 \end{equation}
 and the iso/dianeutral diffusive operator in $z$-coordinates is then
-\begin{equation}\label{Apdx_B4b}
+\begin{equation}\label{apdx:B4b}
  D^T = \left. \nabla \right|_z \cdot
            \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_z T  \right]. \\
@@ -183,17 +183,17 @@
 
 
-Physically, the full tensor \eqref{Apdx_B3}
+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 \eqref{Apdx_B4a} represents strong
+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, \eqref{Apdx_B4}, as \eqref{Apdx_B2}, the diffusion operator for geopotential
+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}
+\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]}
@@ -203,7 +203,7 @@
 
 
-The isopycnal diffusion operator \eqref{Apdx_B4},
-\eqref{Apdx_B_ldfiso} conserves tracer quantity and dissipates its
-square. The demonstration of the first property is trivial as \eqref{Apdx_B4} is the divergence
+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:
 \begin{equation*}
@@ -233,10 +233,10 @@
 \subsubsection*{In generalized vertical coordinates}
 
-Because the weak-slope operator \eqref{Apdx_B4}, \eqref{Apdx_B_ldfiso} is decoupled
+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 \eqref{Apdx_B_1} was transformed into
-\eqref{Apdx_B_2}. The resulting operator then takes the simple form
-
-\begin{equation} \label{Apdx_B_ldfiso_s}
+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] \\
@@ -258,11 +258,11 @@
 \end{equation*}
 
-To prove  \eqref{Apdx_B5}  by direct re-expression of \eqref{Apdx_B_ldfiso} is
+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 \eqref{Apdx_B_2} from \eqref{Apdx_B_1} ) that 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}
+\begin{equation} \label{apdx:B5}
 D^T = \left. \nabla \right|_\rho \cdot
            \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_\rho T  \right] \\
@@ -274,5 +274,5 @@
 \end{equation}
 Then direct transformation from $i,j,\rho$-coordinates to
-$i,j,s$-coordinates gives \eqref{Apdx_B_ldfiso_s} immediately.
+$i,j,s$-coordinates gives \autoref{apdx:B_ldfiso_s} immediately.
 
 Note that the weak-slope approximation is only made in
@@ -282,5 +282,5 @@
 the  $s$-surfaces, in the same way as the transformation of
 horizontal/vertical Laplacian diffusion in $z$-coordinates,
-\eqref{Apdx_B_1} onto $s$-coordinates is exact, however steep the $s$-surfaces.
+\autoref{sec:B_1} onto $s$-coordinates is exact, however steep the $s$-surfaces.
 
 
@@ -289,8 +289,8 @@
 % ================================================================
 \section{Lateral/Vertical momentum diffusive operators}
-\label{Apdx_B_3}
+\label{sec:B_3}
 
 The second order momentum diffusion operator (Laplacian) in the $z$-coordinate
-is found by applying \eqref{Eq_PE_lap_vector}, the expression for the Laplacian
+is found by applying \autoref{eq:PE_lap_vector}, the expression for the Laplacian
 of a vector,  to the horizontal velocity vector :
 \begin{align*}
@@ -329,5 +329,5 @@
 \end{array} }} \right)
 \end{align*}
-Using \eqref{Eq_PE_div}, the definition of the horizontal divergence, the third
+Using \autoref{eq:PE_div}, the definition of the horizontal divergence, the third
 componant of the second vector is obviously zero and thus :
 \begin{equation*}
@@ -336,10 +336,10 @@
 
 Note that this operator ensures a full separation between the vorticity and horizontal
-divergence fields (see Appendix~\ref{Apdx_C}). It is only equal to a Laplacian
+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}
+\begin{equation} \label{apdx:B_Lap_U}
  {\textbf{D}}^{\textbf{U}} =
  	  \nabla _h \left( {A^{lm}\;\chi } \right)
@@ -360,9 +360,9 @@
 \end{align*}
 
-Note Bene: introducing a rotation in \eqref{Apdx_B_Lap_U} does not lead to a
+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,
-\eqref{Apdx_B_Lap_U} is used in both $z$- and $s$-coordinate systems, that is
+\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.
 \end{document}
Index: branches/2017/dev_merge_2017/DOC/tex_sub/annex_C.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/annex_C.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/annex_C.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Discrete Invariants of the Equations}
-\label{Apdx_C}
+\label{apdx:C}
 \minitoc
 
@@ -20,5 +20,5 @@
 % ================================================================
 \section{Introduction / Notations}
-\label{Apdx_C.0}
+\label{sec:C.0}
 
 Notation used in this appendix in the demonstations :
@@ -69,5 +69,5 @@
 \end{flalign*}
 that is in a more compact form :
-\begin{flalign} \label{Eq_Q2_flux}
+\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 }  
@@ -83,5 +83,5 @@
 \end{flalign*}
 that is in a more compact form :
-\begin{flalign} \label{Eq_Q2_vect}
+\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 }  
@@ -94,5 +94,5 @@
 % ================================================================
 \section{Continuous conservation}
-\label{Apdx_C.1}
+\label{sec:C.1}
 
 
@@ -104,5 +104,5 @@
 Let us first establish those constraint in the continuous world.
 The total energy ($i.e.$ kinetic plus potential energies) is conserved :
-\begin{flalign} \label{Eq_Tot_Energy}
+\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}
@@ -114,17 +114,17 @@
 The transformation for the advection term depends on whether 
 the vector invariant form or the flux form is used for the momentum equation.
-Using \eqref{Eq_Q2_vect} and introducing \eqref{Apdx_A_dyn_vect} in \eqref{Eq_Tot_Energy} 
+Using \autoref{eq:Q2_vect} and introducing \autoref{apdx:A_dyn_vect} in \autoref{eq:Tot_Energy} 
 for the former form and
-Using \eqref{Eq_Q2_flux} and introducing \eqref{Apdx_A_dyn_flux} in \eqref{Eq_Tot_Energy} 
+Using \autoref{eq:Q2_flux} and introducing \autoref{apdx:A_dyn_flux} in \autoref{eq:Tot_Energy} 
 for the latter form  leads to:
 
-\begin{subequations} \label{E_tot}
+\begin{subequations} \label{eq:E_tot}
 
 advection term (vector invariant form):
-\begin{equation} \label{E_tot_vect_vor}
+\begin{equation} \label{eq:E_tot_vect_vor}
 \int\limits_D  \zeta \; \left( \textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv   = 0   \\
 \end{equation}
 %
-\begin{equation} \label{E_tot_vect_adv}
+\begin{equation} \label{eq:E_tot_vect_adv}
    \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    
@@ -133,10 +133,10 @@
 
 advection term (flux form):
-\begin{equation} \label{E_tot_flux_metric}
+\begin{equation} \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   \\
 \end{equation}
 
-\begin{equation} \label{E_tot_flux_adv}
+\begin{equation} \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 \\
@@ -146,10 +146,10 @@
 
 coriolis term
-\begin{equation} \label{E_tot_cor}
+\begin{equation} \label{eq:E_tot_cor}
 \int\limits_D  f   \; \left( \textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv   = 0   \\
 \end{equation}
 
 pressure gradient:
-\begin{equation} \label{E_tot_pg}
+\begin{equation} \label{eq:E_tot_pg}
    - \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
@@ -171,14 +171,14 @@
 
 Vector invariant form:
-\begin{subequations} \label{E_tot_vect}
-\begin{equation} \label{E_tot_vect_vor}
+\begin{subequations} \label{eq:E_tot_vect}
+\begin{equation} \label{eq:E_tot_vect_vor}
 \int\limits_D   \textbf{U}_h \cdot \text{VOR} \;dv   = 0   \\
 \end{equation}
-\begin{equation} \label{E_tot_vect_adv}
+\begin{equation} \label{eq:E_tot_vect_adv}
    \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   \\
 \end{equation}
-\begin{equation} \label{E_tot_pg}
+\begin{equation} \label{eq:E_tot_pg}
    - \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
@@ -188,13 +188,13 @@
 
 Flux form:
-\begin{subequations} \label{E_tot_flux}
-\begin{equation} \label{E_tot_flux_metric}
+\begin{subequations} \label{eq:E_tot_flux}
+\begin{equation} \label{eq:E_tot_flux_metric}
 \int\limits_D  \textbf{U}_h \cdot \text {COR} \;  dv   = 0   \\
 \end{equation}
-\begin{equation} \label{E_tot_flux_adv}
+\begin{equation} \label{eq:E_tot_flux_adv}
    \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  \\
 \end{equation}
-\begin{equation} \label{E_tot_pg}
+\begin{equation} \label{eq:E_tot_pg}
    - \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
@@ -207,6 +207,6 @@
 
 
-\eqref{E_tot_pg} is the balance between the conversion KE to PE and PE to KE. 
-Indeed the left hand side of \eqref{E_tot_pg} can be transformed as follows:
+\autoref{eq:E_tot_pg} is the balance between the conversion KE to PE and PE to KE. 
+Indeed the left hand side of \autoref{eq:E_tot_pg} can be transformed as follows:
 \begin{flalign*}
 \partial_t  \left( \int\limits_D { \rho \, g \, z  \;dv} \right) 
@@ -221,7 +221,7 @@
 \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 \eqref{Apdx_A_w_s}). 
+the vertical velocity referenced to the fixe $z$-coordinate system (see \autoref{apdx:A_w_s}). 
  
-The left hand side of \eqref{E_tot_pg} can be transformed as follows:
+The left hand side of \autoref{eq:E_tot_pg} can be transformed as follows:
 \begin{flalign*}
 - \int\limits_D  \left. \nabla p \right|_z & \cdot \textbf{U}_h \;dv  
@@ -325,5 +325,5 @@
 % ================================================================
 \section{Discrete total energy conservation: vector invariant form}
-\label{Apdx_C.1}
+\label{sec:C.1}
 
 % -------------------------------------------------------------------------------------------------------------
@@ -331,12 +331,12 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Total energy conservation}
-\label{Apdx_C_KE+PE}
-
-The discrete form of the total energy conservation, \eqref{Eq_Tot_Energy}, is given by:
+\label{subsec:C_KE+PE}
+
+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{KE+PE_vect_discrete}   \begin{split}
+\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\}
@@ -348,5 +348,5 @@
 
 Substituting the discrete expression of the time derivative of the velocity either in vector invariant,
-leads to the discrete equivalent of the four equations \eqref{E_tot_flux}. 
+leads to the discrete equivalent of the four equations \autoref{eq:E_tot_flux}. 
 
 % -------------------------------------------------------------------------------------------------------------
@@ -354,5 +354,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Vorticity term (coriolis + vorticity part of the advection)}
-\label{Apdx_C_vor}
+\label{subsec:C_vor}
 
 Let $q$, located at $f$-points, be either the relative ($q=\zeta / e_{3f}$), or  
@@ -364,5 +364,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsubsection{Vorticity term with ENE scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})}
-\label{Apdx_C_vorENE} 
+\label{subsec:C_vorENE} 
 
 For the ENE scheme, the two components of the vorticity term are given by :
@@ -401,8 +401,8 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsubsection{Vorticity term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})}
-\label{Apdx_C_vorEEN} 
+\label{subsec:C_vorEEN} 
 
 With the EEN scheme, the vorticity terms are represented as: 
-\begin{equation} \label{Eq_dynvor_een}
+\begin{equation} \label{eq:dynvor_een}
 \left\{ {    \begin{aligned}
  +q\,e_3 \, v 	&\equiv +\frac{1}{e_{1u} }   \sum_{\substack{i_p,\,k_p}} 
@@ -415,5 +415,5 @@
 $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{Q_triads}
+\begin{equation} \label{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)
@@ -471,5 +471,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsubsection{Gradient of kinetic energy / Vertical advection}
-\label{Apdx_C_zad} 
+\label{subsec:C_zad} 
 
 The change of Kinetic Energy (KE) due to the vertical advection is exactly 
@@ -480,8 +480,8 @@
    +   \frac{1}{2} \int_D {  \frac{{\textbf{U}_h}^2}{e_3} \partial_t ( e_3) \;dv }  \\
 \end{equation*}
-Indeed, using successively \eqref{DOM_di_adj} ($i.e.$ the skew symmetry 
+Indeed, using successively \autoref{eq:DOM_di_adj} ($i.e.$ the skew symmetry 
 property of the $\delta$ operator) and the continuity equation, then 
-\eqref{DOM_di_adj} again, then the commutativity of operators 
-$\overline {\,\cdot \,}$ and $\delta$, and finally \eqref{DOM_mi_adj} 
+\autoref{eq:DOM_di_adj} again, then the commutativity of operators 
+$\overline {\,\cdot \,}$ and $\delta$, and finally \autoref{eq:DOM_mi_adj} 
 ($i.e.$ the symmetry property of the $\overline {\,\cdot \,}$ operator) 
 applied in the horizontal and vertical directions, it becomes:
@@ -536,5 +536,5 @@
 %
 \intertext{The first term provides the discrete expression for the vertical advection of momentum (ZAD), 
-while the second term corresponds exactly to \eqref{KE+PE_vect_discrete}, therefore:}
+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 }    &&&\\
@@ -568,5 +568,5 @@
 \end{flalign*}
 which is (over-)satified by defining the vertical scale factor as follows:
-\begin{flalign} \label{e3u-e3v}
+\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} 
@@ -580,10 +580,10 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Pressure gradient term}
-\label{Apdx_C.1.4}
+\label{subsec:C.1.4}
 
 \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 \eqref{Eq_DOM_curl_grad}). 
+on a C-grid with 2nd order finite differences (property \autoref{eq:DOM_curl_grad}). 
 }
 
@@ -611,6 +611,6 @@
 %
 \allowdisplaybreaks
-\intertext{Using successively  \eqref{DOM_di_adj}, $i.e.$ the skew symmetry property of 
-the $\delta$ operator, \eqref{Eq_wzv}, the continuity equation, \eqref{Eq_dynhpg_sco}, 
+\intertext{Using successively \autoref{eq:DOM_di_adj}, $i.e.$ the skew symmetry property of 
+the $\delta$ operator, \autoref{eq:wzv}, the continuity equation, \autoref{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: }
@@ -657,7 +657,7 @@
 %
 \end{flalign*}
-The first term is exactly the first term of the right-hand-side of \eqref{KE+PE_vect_discrete}.
+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 \eqref{KE+PE_vect_discrete}.
+$\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*}
@@ -733,5 +733,5 @@
 % ================================================================
 \section{Discrete total energy conservation: flux form}
-\label{Apdx_C.1}
+\label{sec:C.1}
 
 % -------------------------------------------------------------------------------------------------------------
@@ -739,7 +739,7 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Total energy conservation}
-\label{Apdx_C_KE+PE}
-
-The discrete form of the total energy conservation, \eqref{Eq_Tot_Energy}, is given by:
+\label{subsec:C_KE+PE}
+
+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  \\
@@ -763,5 +763,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Coriolis and advection terms: flux form}
-\label{Apdx_C.1.3}
+\label{subsec:C.1.3}
 
 % -------------------------------------------------------------------------------------------------------------
@@ -769,5 +769,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsubsection{Coriolis plus ``metric'' term}
-\label{Apdx_C.1.3.1} 
+\label{subsec:C.1.3.1} 
 
 In flux from the vorticity term reduces to a Coriolis term in which the Coriolis 
@@ -783,5 +783,5 @@
 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 (\S\ref{Apdx_C_vor}).
+vorticity term in the vector invariant form (\autoref{subsec:C_vor}).
 
 % -------------------------------------------------------------------------------------------------------------
@@ -789,5 +789,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsubsection{Flux form advection}
-\label{Apdx_C.1.3.2} 
+\label{subsec:C.1.3.2} 
 
 The flux form operator of the momentum advection is evaluated using a 
@@ -797,5 +797,5 @@
 the horizontal kinetic energy, that is :
 
-\begin{equation} \label{Apdx_C_ADV_KE_flux}
+\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 \\
@@ -856,5 +856,5 @@
 which is the discrete form of 
 $ \frac{1}{2} \int_D u \cdot \nabla \cdot \left(   \textbf{U}\,u   \right) \; dv $. 
-\eqref{Apdx_C_ADV_KE_flux} is thus satisfied.
+\autoref{eq:C_ADV_KE_flux} is thus satisfied.
 
 
@@ -877,5 +877,5 @@
 % ================================================================
 \section{Discrete enstrophy conservation}
-\label{Apdx_C.1}
+\label{sec:C.1}
 
 
@@ -884,8 +884,8 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsubsection{Vorticity term with ENS scheme  (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})}
-\label{Apdx_C_vorENS} 
+\label{subsec:C_vorENS} 
 
 In the ENS scheme, the vorticity term is descretized as follows:
-\begin{equation} \label{Eq_dynvor_ens}
+\begin{equation} \label{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}    \\
@@ -896,11 +896,11 @@
 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 ($i.e.$ when $\chi$=$0$). 
-Indeed, using the symmetry or skew symmetry properties of the operators (Eqs \eqref{DOM_mi_adj} 
-and \eqref{DOM_di_adj}), it can be shown that:
-\begin{equation} \label{Apdx_C_1.1}
+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 
-\eqref{Eq_dynvor_ens}, the discrete form of the right hand side of \eqref{Apdx_C_1.1} 
+\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*} 
@@ -944,8 +944,8 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsubsection{Vorticity Term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})}
-\label{Apdx_C_vorEEN} 
+\label{subsec:C_vorEEN} 
 
 With the EEN scheme, the vorticity terms are represented as: 
-\begin{equation} \label{Eq_dynvor_een}
+\begin{equation} \label{eq:dynvor_een}
 \left\{ {    \begin{aligned}
  +q\,e_3 \, v 	&\equiv +\frac{1}{e_{1u} }   \sum_{\substack{i_p,\,k_p}} 
@@ -958,5 +958,5 @@
 $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{Q_triads}
+\begin{equation} \label{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)
@@ -968,5 +968,5 @@
 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 \eqref{Apdx_C_1.1} applied to this triad only can be transformed as follow:
+side of \autoref{eq:C_1.1} applied to this triad only can be transformed as follow:
 
 \begin{flalign*} 
@@ -1017,5 +1017,5 @@
 % ================================================================
 \section{Conservation properties on tracers}
-\label{Apdx_C.2}
+\label{sec:C.2}
 
 
@@ -1033,5 +1033,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Advection term}
-\label{Apdx_C.2.1}
+\label{subsec:C.2.1}
 
 conservation of a tracer, $T$:
@@ -1100,5 +1100,5 @@
 % ================================================================
 \section{Conservation properties on lateral momentum physics}
-\label{Apdx_dynldf_properties}
+\label{sec:dynldf_properties}
 
 
@@ -1114,5 +1114,5 @@
 
 These properties of the horizontal diffusion operator are a direct consequence 
-of properties \eqref{Eq_DOM_curl_grad} and \eqref{Eq_DOM_div_curl}. 
+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 
@@ -1123,5 +1123,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Conservation of potential vorticity}
-\label{Apdx_C.3.1}
+\label{subsec:C.3.1}
 
 The lateral momentum diffusion term conserves the potential vorticity :
@@ -1143,5 +1143,5 @@
 	\right\} 	 \\ 
 %
-\intertext{Using \eqref{DOM_di_adj}, it follows:}
+\intertext{Using \autoref{eq:DOM_di_adj}, it follows:}
 %
 \equiv& \sum\limits_{i,j,k} 
@@ -1157,5 +1157,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Dissipation of horizontal kinetic energy}
-\label{Apdx_C.3.2}
+\label{subsec:C.3.2}
 
 The lateral momentum diffusion term dissipates the horizontal kinetic energy:
@@ -1209,5 +1209,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Dissipation of enstrophy}
-\label{Apdx_C.3.3}
+\label{subsec:C.3.3}
 
 The lateral momentum diffusion term dissipates the enstrophy when the eddy 
@@ -1223,5 +1223,5 @@
 	          + \delta_{j+1/2} \left[  \frac{e_{1u}} {e_{2u}\,e_{3u}} \delta_j \left[ e_{3f} \zeta  \right]   \right]      \right\}   &&&\\ 
 %
-\intertext{Using \eqref{DOM_di_adj}, it follows:}
+\intertext{Using \autoref{eq:DOM_di_adj}, it follows:}
 %
 &\quad \equiv  - A^{\,lm} \sum\limits_{i,j,k} 
@@ -1234,9 +1234,9 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Conservation of horizontal divergence}
-\label{Apdx_C.3.4}
+\label{subsec:C.3.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 \eqref{Eq_DOM_div_curl}. 
+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.
@@ -1251,5 +1251,5 @@
 	        + \delta_j \left[ A_v^{\,lm} \frac{e_{1v}\,e_{3v}} {e_{2v}}  \delta_{j+1/2} \left[ \chi \right]  \right]    \right\}    \\ 
 %
-\intertext{Using \eqref{DOM_di_adj}, it follows:}
+\intertext{Using \autoref{eq:DOM_di_adj}, it follows:}
 %
 &\equiv \sum\limits_{i,j,k} 
@@ -1263,5 +1263,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Dissipation of horizontal divergence variance}
-\label{Apdx_C.3.5}
+\label{subsec:C.3.5}
 
 \begin{flalign*}
@@ -1277,5 +1277,5 @@
 	\right\} \;   e_{1t}\,e_{2t}\,e_{3t}    \\ 
 %
-\intertext{Using \eqref{DOM_di_adj}, it turns out to be:}
+\intertext{Using \autoref{eq:DOM_di_adj}, it turns out to be:}
 %
 &\equiv - A^{\,lm} \sum\limits_{i,j,k}
@@ -1289,5 +1289,5 @@
 % ================================================================
 \section{Conservation properties on vertical momentum physics}
-\label{Apdx_C_4}
+\label{sec:C_4}
 
 As for the lateral momentum physics, the continuous form of the vertical diffusion 
@@ -1461,5 +1461,5 @@
 % ================================================================
 \section{Conservation properties on tracer physics}
-\label{Apdx_C.5}
+\label{sec:C.5}
 
 The numerical schemes used for tracer subgridscale physics are written such 
@@ -1473,5 +1473,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Conservation of tracers}
-\label{Apdx_C.5.1}
+\label{subsec:C.5.1}
 
 constraint of conservation of tracers:
@@ -1507,5 +1507,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Dissipation of tracer variance}
-\label{Apdx_C.5.2}
+\label{subsec:C.5.2}
 
 constraint on the dissipation of tracer variance:
Index: branches/2017/dev_merge_2017/DOC/tex_sub/annex_D.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/annex_D.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/annex_D.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Coding Rules}
-\label{Apdx_D}
+\label{apdx:D}
 \minitoc
 
@@ -47,5 +47,5 @@
 % ================================================================
 \section{Program structure}
-\label{Apdx_D_structure}
+\label{sec:D_structure}
 
 Each program begins with a set of headline comments containing :
@@ -76,5 +76,5 @@
 % ================================================================
 \section{Coding conventions}
-\label{Apdx_D_coding}
+\label{sec:D_coding}
 
 - Use of the universal language \textsc{Fortran} 90, and try to avoid obsolescent
@@ -107,5 +107,5 @@
 % ================================================================
 \section{Naming conventions}
-\label{Apdx_D_naming}
+\label{sec:D_naming}
 
 The purpose of the naming conventions is to use prefix letters to classify 
@@ -116,5 +116,5 @@
 
 %--------------------------------------------------TABLE--------------------------------------------------
-\begin{table}[htbp]  \label{Tab_VarName}
+\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}|}
@@ -187,5 +187,5 @@
 \hline
 \end{tabular}
-\label{tab1}
+\label{tab:tab1}
 \end{center}
 \end{table}
@@ -201,5 +201,5 @@
 % ================================================================
 %\section{Program structure}
-%label{Apdx_D_structure}
+%abel{sec:Apdx_D_structure}
 
 %To be done....
Index: branches/2017/dev_merge_2017/DOC/tex_sub/annex_E.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/annex_E.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/annex_E.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Note on some algorithms}
-\label{Apdx_E}
+\label{apdx:E}
 \minitoc
 
@@ -20,5 +20,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{Upstream Biased Scheme (UBS) (\protect\np{ln\_traadv\_ubs}\forcode{ = .true.})}
-\label{TRA_adv_ubs}
+\label{sec:TRA_adv_ubs}
 
 The UBS advection scheme is an upstream biased third order scheme based on 
@@ -26,5 +26,5 @@
 QUICK scheme (Quadratic Upstream Interpolation for Convective 
 Kinematics). For example, in the $i$-direction :
-\begin{equation} \label{Eq_tra_adv_ubs2}
+\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 \\
@@ -33,5 +33,5 @@
 \end{equation}
 or equivalently, the advective flux is
-\begin{equation} \label{Eq_tra_adv_ubs2}
+\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}
@@ -61,5 +61,5 @@
 scheme when \np{ln\_traadv\_ubs}\forcode{ = .true.}.
 
-For stability reasons, in \eqref{Eq_tra_adv_ubs}, the first term which corresponds 
+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, 
@@ -67,5 +67,5 @@
 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 
-(\ref{Eq_tra_adv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}. 
+(\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 
@@ -87,6 +87,6 @@
 eight-order accurate conventional scheme.
 
-NB 3 : It is straight forward to rewrite \eqref{Eq_tra_adv_ubs} as follows:
-\begin{equation} \label{Eq_tra_adv_ubs2}
+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 \\
@@ -95,5 +95,5 @@
 \end{equation}
 or equivalently 
-\begin{equation} \label{Eq_tra_adv_ubs2}
+\begin{equation} \label{eq:tra_adv_ubs2}
 \begin{split}
 e_{2u} e_{3u}\,u_{i+1/2} \ \tau _u^{ubs} 
@@ -102,14 +102,14 @@
 \end{split}
 \end{equation}
-\eqref{Eq_tra_adv_ubs2} has several advantages. First it clearly evidence that 
+\autoref{eq:tra_adv_ubs2} has several advantages. First it clearly evidence 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 \eqref{Eq_tra_adv_ubs}. Third, the diffusive term is 
+part as stated above using \autoref{eq:tra_adv_ubs}. Third, the diffusive term is 
 in fact a biharmonic operator with a eddy coefficient with is simply proportional 
 to the velocity.
 
 laplacian diffusion:
-\begin{equation} \label{Eq_tra_ldf_lap}
+\begin{equation} \label{eq:tra_ldf_lap}
 \begin{split}
 D_T^{lT} =\frac{1}{e_{1T} \; e_{2T}\;  e_{3T} } &\left[ {\quad \delta _i 
@@ -124,5 +124,5 @@
 
 bilaplacian:
-\begin{equation} \label{Eq_tra_ldf_lap}
+\begin{equation} \label{eq:tra_ldf_lap}
 \begin{split}
 D_T^{lT} =&-\frac{1}{e_{1T} \; e_{2T}\;  e_{3T}} \\
@@ -136,5 +136,5 @@
 $i.e.$ $A_u^{lT} = \frac{1}{\sqrt{12}} \,e_{1u}\ \sqrt{ e_{1u}\,|u|\,}$
 it comes :
-\begin{equation} \label{Eq_tra_ldf_lap}
+\begin{equation} \label{eq:tra_ldf_lap}
 \begin{split}
 D_T^{lT} =&-\frac{1}{12}\,\frac{1}{e_{1T} \; e_{2T}\;  e_{3T}} \\
@@ -146,5 +146,5 @@
 \end{equation}
 if the velocity is uniform ($i.e.$ $|u|=cst$) then the diffusive flux is
-\begin{equation} \label{Eq_tra_ldf_lap}
+\begin{equation} \label{eq:tra_ldf_lap}
 \begin{split}
 F_u^{lT} = - \frac{1}{12}
@@ -157,5 +157,5 @@
 beurk....  reverte the logic: starting from the diffusive part of the advective flux it comes:
 
-\begin{equation} \label{Eq_tra_adv_ubs2}
+\begin{equation} \label{eq:tra_adv_ubs2}
 \begin{split}
 F_u^{lT}
@@ -166,5 +166,5 @@
 
 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{equation} \label{eq:tra_adv_ubs2}
 \begin{split}
 F_u^{lT}
@@ -175,5 +175,5 @@
 
 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{equation} \label{eq:tra_adv_ubs2}
 \begin{split}
 F_u^{lT}
@@ -189,8 +189,8 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{Leapfrog energetic}
-\label{LF}
+\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:
-\begin{subequations} \label{dt_mt}
+\begin{subequations} \label{eq:dt_mt}
 \begin{align}
  \delta _{t+\rdt/2} [q]     &=  \  \ \,   q^{t+\rdt}  - q^{t}		\\
@@ -202,15 +202,15 @@
 , respectively. 
 
-The Leap-frog time stepping given by \eqref{Eq_DOM_nxt} can be defined as:
-\begin{equation} \label{LF}
+The Leap-frog time stepping given by \autoref{eq:DOM_nxt} can be defined as:
+\begin{equation} \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}
 \end{equation} 
-Note that \eqref{LF} shows that the leapfrog time step is $\rdt$, not $2\rdt$ 
+Note that \autoref{chap:LF} shows that the leapfrog time step is $\rdt$, not $2\rdt$ 
 as it can be found sometime in literature. 
 The leap-Frog time stepping is a second order centered scheme. As such it respects 
 the quadratic invariant in integral forms, $i.e.$ the following continuous property,
-\begin{equation} \label{Energy}
+\begin{equation} \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} 
@@ -252,7 +252,7 @@
 scheme, but is formulated within the \NEMO framework ($i.e.$ 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 Fig.~\ref{Fig_zgr_e3}).
-
-In the formulation \eqref{Eq_tra_ldf_iso} introduced in 1995 in OPA, the ancestor of \NEMO, 
+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}$. 
@@ -263,5 +263,5 @@
 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 \S\ref{LDF}). Nevertheless, this technique 
+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 ($i.e.$ they enter the computation 
 of density), but it does not work for a passive tracer.   \citep{Griffies_al_JPO98} introduce 
@@ -270,5 +270,5 @@
 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{Gf_triads}
+\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(  
@@ -282,5 +282,5 @@
 $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{Gf_slopes}
+\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 
@@ -288,19 +288,18 @@
 {\left(\alpha / \beta \right)_i^k  \ \delta_{k+k_p}[T^i ] - \delta_{k+k_p}[S^i ] }
 \end{equation}
-Note that in \eqref{Gf_slopes} we use the ratio $\alpha / \beta$ instead of 
+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 \eqref{Gf_triads}, we chose to use ${b_u}_{\,i+i_p}^{\,k}$ instead of 
+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 Appendix~\ref{Apdx_Gf_operator}).
+(see \autoref{apdx:Gf_operator}).
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{figure}[!ht] \label{Fig_ISO_triad}
-\begin{center}
+\begin{figure}[!ht] \begin{center}
 \includegraphics[width=0.70\textwidth]{Fig_ISO_triad}
-\caption{  \protect\label{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).}
@@ -311,5 +310,5 @@
 The four iso-neutral fluxes associated with the triads are defined at $T$-point. 
 They take the following expression :
-\begin{flalign} \label{Gf_fluxes}
+\begin{flalign} \label{eq:Gf_fluxes}
 \begin{split}
 {_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (T) 
@@ -322,6 +321,6 @@
 
 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 (Fig.~\ref{Fig_ISO_triad}):
-\begin{flalign} \label{Eq_iso_flux} 
+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}} 
@@ -353,5 +352,5 @@
 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{Gf_operator}
+\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] 
@@ -365,5 +364,5 @@
 \item[$\bullet$ horizontal diffusion] The discretization of the diffusion operator 
 recovers the traditional five-point Laplacian in the limit of flat iso-neutral direction :
-\begin{equation} \label{Gf_property1a}
+\begin{equation} \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] 
@@ -388,5 +387,5 @@
 \item[$\bullet$ pure iso-neutral operator]  The iso-neutral flux of locally referenced 
 potential density is zero, $i.e.$
-\begin{align} \label{Gf_property2}
+\begin{align} \label{eq:Gf_property2}
 \begin{matrix}
 &{_i^k {\mathbb{F}_u}_{i_p}^{k_p} (\rho)} 
@@ -398,10 +397,10 @@
 \end{matrix}
 \end{align}
-This result is trivially obtained using the \eqref{Gf_triads} applied to $T$ and $S$ 
-and the definition of the triads' slopes \eqref{Gf_slopes}.
+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, $i.e.$
-\begin{equation} \label{Gf_property1}
+\begin{equation} \label{eq:Gf_property1}
 \sum_{i,j,k} \left\{ D_l^T \ b_T \right\} = 0
 \end{equation}
@@ -411,8 +410,8 @@
 \item[$\bullet$ decrease of tracer variance] The iso-neutral diffusion term does 
 not increase the total tracer variance, $i.e.$
-\begin{equation} \label{Gf_property1}
+\begin{equation} \label{eq:Gf_property1}
 \sum_{i,j,k} \left\{ T \ D_l^T \ b_T \right\} \leq 0
 \end{equation}
-The property is demonstrated in the Appendix~\ref{Apdx_Gf_operator}. It is a 
+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, $i.e.$ it is a sink term for the square of the quantity on which it is applied. 
@@ -422,5 +421,5 @@
 \item[$\bullet$ self-adjoint operator] The iso-neutral diffusion operator is self-adjoint, 
 $i.e.$
-\begin{equation} \label{Gf_property1}
+\begin{equation} \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\} 
 \end{equation}
@@ -428,5 +427,5 @@
 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 Appendix~\ref{Apdx_Gf_operator}).
+proved (see \autoref{apdx:Gf_operator}).
 \end{description}
 
@@ -442,10 +441,10 @@
 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, $i.e.$ \eqref{Eq_ldfslp_geo} 
-is used in $z$-coordinate, and the sum \eqref{Eq_ldfslp_geo}
-+ \eqref{Eq_ldfslp_iso} in $z^*$ or $s$-coordinates. 
+here are referenced to the geopotential surfaces, $i.e.$ \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{equation} \label{eq:eiv_v}
 \begin{split}
  u^* & = - \frac{1}{e_2\,e_{3}}          \;\partial_k \left( e_2 \, A_e \; r_i  \right)   
@@ -467,10 +466,10 @@
 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 \S\ref{TRA_adv}) and not just 
+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 \eqref{Eq_ldfeiv}
+% 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{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]\\
@@ -479,5 +478,5 @@
 %\end{split}
 %\end{equation}
-\begin{equation} \label{Eq_eiv_vd}  
+\begin{equation} \label{eq:eiv_vd}  
 \textbf{F}_{eiv}^T   \equiv   \left( \begin{aligned}                                
  \sum_{\substack{i_p,\,k_p}} &
@@ -491,5 +490,5 @@
 \end{equation}
 
-\ref{Griffies_JPO98} introduces another way to implement the eddy induced advection, 
+\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. 
@@ -522,5 +521,5 @@
 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}
+\begin{equation} \label{eq:eiv_skew_continuous}
 \textbf{F}_{eiv}^T = \begin{pmatrix} 
  	        {+ e_{2} \, A_{e} \; r_i  \; \partial_k T}   \\
@@ -529,10 +528,10 @@
 \end{equation}
 The tendency associated with eddy induced velocity is then simply the divergence 
-of the \eqref{Eq_eiv_skew_continuous} fluxes. It naturally conserves the tracer 
+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 preserve the 
-tracer variance. Another interesting property of \eqref{Eq_eiv_skew_continuous} 
+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}
+\begin{flalign} \label{eq:eiv_skew+eiv_continuous}
 \textbf{F}_{iso}^T + \textbf{F}_{eiv}^T &= 
 \begin{pmatrix} 
@@ -554,9 +553,9 @@
 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  \eqref{Eq_eiv_skew_continuous} which is consistent with the 
-iso-neutral operator \eqref{Gf_operator}. Using the slopes \eqref{Gf_slopes} 
+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($i.e.$ as $A$, the eddy diffusivity coefficient),
 the resulting discret form is given by:
-\begin{equation} \label{Eq_eiv_skew}  
+\begin{equation} \label{eq:eiv_skew}  
 \textbf{F}_{eiv}^T   \equiv   \frac{1}{4} \left( \begin{aligned}                                
  \sum_{\substack{i_p,\,k_p}} &
@@ -569,5 +568,5 @@
 \end{aligned}   \right)
 \end{equation}
-Note that \eqref{Eq_eiv_skew} is valid in $z$-coordinate with or without partial cells. 
+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. 
@@ -575,5 +574,5 @@
 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 \ref{Apdx_eiv_skew}), $i.e.$ it does not include a diffusive component 
+(see Appendix \autoref{apdx:eiv_skew}), $i.e.$ it does not include a diffusive component 
 but is a "pure" advection term.
 
@@ -586,5 +585,5 @@
 % ================================================================
 \subsection{Discrete invariants of the iso-neutral diffrusion}
-\label{Apdx_Gf_operator}
+\label{subsec:Gf_operator}
 
 Demonstration of the decrease of the tracer variance in the (\textbf{i},\textbf{j}) plane. 
@@ -596,5 +595,5 @@
 \int_D  D_l^T \; T \;dv   \leq 0
 \end{align*}
-The discrete form of its left hand side is obtained using \eqref{Eq_iso_flux}
+The discrete form of its left hand side is obtained using \autoref{eq:iso_flux}
 
 \begin{align*}
@@ -673,5 +672,5 @@
 %
 \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 \eqref{Gf_triads}. It becomes: }
+\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}
@@ -739,5 +738,5 @@
 % ================================================================
 \subsection{Discrete invariants of the skew flux formulation}
-\label{Apdx_eiv_skew}
+\label{subsec:eiv_skew}
 
 
@@ -750,5 +749,5 @@
 \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 \eqref{Eq_eiv_skew}
+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\{   \;\;
Index: branches/2017/dev_merge_2017/DOC/tex_sub/annex_iso.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/annex_iso.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/annex_iso.tex	(revision 9407)
@@ -4,6 +4,7 @@
 % Iso-neutral diffusion :
 % ================================================================
-\chapter{Iso-neutral diffusion and eddy advection using triads}
-\label{sec:triad}
+\chapter[Iso-Neutral Diffusion and Eddy Advection using Triads]
+			{\texorpdfstring{Iso-Neutral Diffusion and\\ Eddy Advection using Triads}{Iso-Neutral Diffusion and Eddy Advection using Triads}}
+\label{apdx:triad}
 \minitoc
 \pagebreak
@@ -18,10 +19,10 @@
 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 (\S\ref{LDF_slp}). 
+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 \S\ref{LDF_coef}. Note that when GM fluxes are used, 
+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.
@@ -30,14 +31,14 @@
 The options specific to the Griffies scheme include:
 \begin{description}[font=\normalfont]
-\item[\np{ln\_triad\_iso}] See \S\ref{sec:triad:taper}. If this is set false (the default), then
+\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 (\S\ref{sec:triad:lintaper}). 
-  This is the same treatment as used in the default implementation \S\ref{LDF_slp_iso}; Fig.~\ref{Fig_eiv_slp}.  
+  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 \S\ref{sec:triad:Gerdes-taper}
-\item[\np{ln\_botmix\_triad}] See \S\ref{sec:triad:iso_bdry}. 
+  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. 
@@ -53,5 +54,5 @@
 
 \section{Triad formulation of iso-neutral diffusion}
-\label{sec:triad:iso}
+\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.
@@ -60,6 +61,6 @@
 The iso-neutral second order tracer diffusive operator for small
 angles between iso-neutral surfaces and geopotentials is given by
-\eqref{Eq_PE_iso_tensor}:
-\begin{subequations} \label{eq:triad:PE_iso_tensor}
+\autoref{eq:PE_iso_tensor}:
+\begin{subequations} \label{eq:PE_iso_tensor}
   \begin{equation}
     D^{lT}=-\Div\vect{f}^{lT}\equiv
@@ -72,5 +73,5 @@
   \end{equation}
   \begin{equation}
-    \label{eq:triad:PE_iso_tensor:c}
+    \label{eq:PE_iso_tensor:c}
     \mbox{with}\quad \;\;\Re =
     \begin{pmatrix}
@@ -92,5 +93,5 @@
 %  {-r_1 } \hfill & {-r_2 } \hfill & {r_1 ^2+r_2 ^2} \hfill \\
 % \end{array} }} \right)
- Here \eqref{Eq_PE_iso_slopes} 
+ Here \autoref{eq:PE_iso_slopes} 
 \begin{align*}
   r_1 &=-\frac{e_3 }{e_1 } \left( \frac{\partial \rho }{\partial i}
@@ -108,5 +109,5 @@
 space; we write
 \begin{equation}
-  \label{eq:triad:Fijk}
+  \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).
 \end{equation}
@@ -117,11 +118,11 @@
 
 The off-diagonal terms of the small angle diffusion tensor
-\eqref{Eq_PE_iso_tensor}, \eqref{eq:triad:PE_iso_tensor:c} produce skew-fluxes along the
+\autoref{eq:PE_iso_tensor}, \autoref{eq:PE_iso_tensor:c} produce skew-fluxes along the
 $i$- and $j$-directions resulting from the vertical tracer gradient:
 \begin{align}
-  \label{eq:triad:i13c}
+  \label{eq:i13c}
   f_{13}=&+\Alt r_1\frac{1}{e_3}\frac{\partial T}{\partial k},\qquad f_{23}=+\Alt 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:triad:i31c}
+  \label{eq:i31c}
  f_{31}+f_{32}=& \Alt r_1\frac{1}{e_1}\frac{\partial T}{\partial i}+\Alt r_2\frac{1}{e_1}\frac{\partial T}{\partial i}
 \end{align}
@@ -130,5 +131,5 @@
 component of the small angle diffusion tensor is
 \begin{equation}
-  \label{eq:triad:i33c}
+  \label{eq:i33c}
   f_{33}=-\Alt(r_1^2 +r_2^2) \frac{1}{e_3}\frac{\partial T}{\partial k}.
 \end{equation}
@@ -141,14 +142,14 @@
 
 There is no natural discretization for the $i$-component of the
-skew-flux, \eqref{eq:triad:i13c}, as
+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, \eqref{eq:triad:i31c}, is evaluated 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
-\eqref{eq:triad:i13c} from tracer cell $i,k$ to $i+1,k$, introduced in 1995
-into OPA, \eqref{Eq_tra_ldf_iso}, is to calculate a mean vertical
+\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
@@ -159,5 +160,5 @@
 $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 \eqref{Eq_tra_ldf_iso}
+gradient, is then \autoref{eq:tra_ldf_iso}
 \begin{equation*}
   \left(F_u^{13} \right)_{i+\hhalf}^k = \Alts_{i+\hhalf}^k
@@ -181,5 +182,5 @@
 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 \S\ref{LDF}). This
+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
 ($i.e.$ they enter the computation of density), but it does not work
@@ -194,5 +195,5 @@
 \begin{figure}[tb] \begin{center}
     \includegraphics[width=1.05\textwidth]{Fig_GRIFF_triad_fluxes}
-    \caption{ \protect\label{fig:triad:ISO_triad}
+    \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$
@@ -205,10 +206,10 @@
 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 Fig.~\ref{fig:triad:ISO_triad}a, where the thick lines
+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:triad:i13}
+  \label{eq:i13}
   \left( F_u^{13}  \right)_{i+\frac{1}{2}}^k = \Alts_{i+1}^k a_1 s_1
   \delta _{k+\frac{1}{2}} \left[ T^{i+1}
@@ -225,10 +226,10 @@
 stencil, and disallows the two-point computational modes.
 
- The vertical skew flux \eqref{eq:triad:i31c} from tracer cell $i,k$ to $i,k+1$ at the
-$w$-point $i,k+\hhalf$ is constructed similarly (Fig.~\ref{fig:triad:ISO_triad}b)
+ The vertical skew flux \autoref{eq:i31c} from tracer cell $i,k$ to $i,k+1$ at the
+$w$-point $i,k+\hhalf$ 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:triad:i31}
+  \label{eq:i31}
   \left( F_w^{31} \right) _i ^{k+\frac{1}{2}} =  \Alts_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}
@@ -241,7 +242,7 @@
 (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 Fig.~\ref{fig:triad:ISO_triad}):
-\begin{equation}
-  \label{eq:triad:R}
+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}}
@@ -258,5 +259,5 @@
 \begin{figure}[tb] \begin{center}
     \includegraphics[width=0.80\textwidth]{Fig_GRIFF_qcells}
-    \caption{   \protect\label{fig:triad:qcells}
+    \caption{   \protect\label{fig:qcells}
     Triad notation for quarter cells. $T$-cells are inside
       boxes, while the  $i+\half,k$ $u$-cell is shaded in green and the
@@ -265,7 +266,7 @@
 % >>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
-Each triad $\{_i^{k}\:_{i_p}^{k_p}\}$ is associated (Fig.~\ref{fig:triad:qcells}) with the quarter
+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 \eqref{eq:triad:i13} and \eqref{eq:triad:i31} in this notation, 
+Expressing the slopes $s_i$ and $s'_i$ in \autoref{eq:i13} and \autoref{eq:i31} in this notation, 
 we have $e.g.$ \ $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$) 
@@ -276,6 +277,6 @@
 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 $e.g.$ in \eqref{eq:triad:i13} $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$, 
-and in \eqref{eq:triad:i31} $a'_{1}={\:}_i^k{\mathbb{A}_w}_{1/2}^{1/2}$.
+where $e.g.$ 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}
@@ -287,5 +288,5 @@
 form
 \begin{equation}
-  \label{eq:triad:i11}
+  \label{eq:i11}
   \left( F_u^{11} \right) _{i+\frac{1}{2}} ^{k} =
   - \left( \Alts_i^{k+1} a_{1} + \Alts_i^{k+1} a_{2} + \Alts_i^k
@@ -293,10 +294,10 @@
   \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 \eqref{eq:triad:i13}. In this case,
-separating the total lateral flux, the sum of \eqref{eq:triad:i13} and
-\eqref{eq:triad:i11}, into triad components, a lateral tracer
+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:triad:latflux-triad}
+  \label{eq:latflux-triad}
   _i^k {\mathbb{F}_u}_{i_p}^{k_p} (T) = - \Alts_i^k{ \:}_i^k{\mathbb{A}_u}_{i_p}^{k_p}
   \left(
@@ -312,5 +313,5 @@
 density flux associated with each triad separately disappears.
 \begin{equation}
-  \label{eq:triad:latflux-rho}
+  \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}
@@ -319,10 +320,10 @@
 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 \eqref{eq:triad:i33c} for the
+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:triad:i33}
+  \label{eq:i33}
   \left( F_w^{33} \right) _i^{k+\frac{1}{2}} =
     - \left( \Alts_i^{k+1} a_{1}' s_{1}'^2
@@ -332,9 +333,9 @@
 \end{equation}
 where the areas $a'$ and slopes $s'$ are the same as in
-\eqref{eq:triad:i31}.
-Then, separating the total vertical flux, the sum of \eqref{eq:triad:i31} and
-\eqref{eq:triad:i33}, into triad components,  a vertical flux
+\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:triad:vertflux-triad}
+  \label{eq:vertflux-triad}
   _i^k {\mathbb{F}_w}_{i_p}^{k_p} (T)
   &= \Alts_i^k{\: }_i^k{\mathbb{A}_w}_{i_p}^{k_p}
@@ -345,5 +346,5 @@
   \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:triad:vertflux-triad2}
+   {_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)$
@@ -355,11 +356,11 @@
 fluxes.
 
-We can explicitly identify (Fig.~\ref{fig:triad:qcells}) the triads associated with the $s_i$, $a_i$, and $s'_i$, $a'_i$ used in the definition of
+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
-\eqref{eq:triad:i31}, \eqref{eq:triad:i13}, \eqref{eq:triad:i11} \eqref{eq:triad:i33} and
-Fig.~\ref{fig:triad:ISO_triad} to  write out the iso-neutral fluxes at $u$- and
+\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:
-%(Fig.~\ref{Fig_ISO_triad}):
-\begin{flalign} \label{Eq_iso_flux} \vect{F}_{\mathrm{iso}}(T) &\equiv
+%(\autoref{fig:ISO_triad}):
+\begin{flalign} \label{eq:iso_flux} \vect{F}_{\mathrm{iso}}(T) &\equiv
   \sum_{\substack{i_p,\,k_p}}
   \begin{pmatrix}
@@ -371,5 +372,5 @@
 
 \subsection{Ensuring the scheme does not increase tracer variance}
-\label{sec:triad:variance}
+\label{subsec:variance}
 
 We now require that this operator should not increase the
@@ -397,5 +398,5 @@
   &= -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:triad:dvar_iso_i}
+  &={\;} _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}
@@ -404,11 +405,11 @@
 $i,k+k_p+\half$ (below) of
 \begin{equation}
-\label{eq:triad:dvar_iso_k}
+\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 \eqref{eq:triad:latflux-triad} and
-\eqref{eq:triad:vertflux-triad}, it is
+$_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)$ with \autoref{eq:latflux-triad} and
+\autoref{eq:vertflux-triad}, it is
 \begin{multline*}
 -\Alts_i^k\left \{
@@ -430,5 +431,5 @@
 to be related to a triad volume $_i^k\mathbb{V}_{i_p}^{k_p}$ by
 \begin{equation}
-  \label{eq:triad:V-A}
+  \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}
@@ -437,5 +438,5 @@
 the variance tendency reduces to the perfect square
 \begin{equation}
-  \label{eq:triad:perfect-square}
+  \label{eq:perfect-square}
   -\Alts_i^k{\:} _i^k\mathbb{V}_{i_p}^{k_p}
   \left(
@@ -445,5 +446,5 @@
   \right)^2\leq 0.
 \end{equation}
-Thus, the constraint \eqref{eq:triad:V-A} ensures that the fluxes (\ref{eq:triad:latflux-triad}, \ref{eq:triad:vertflux-triad}) associated
+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
@@ -452,8 +453,8 @@
 increase.
 
-The expression \eqref{eq:triad:V-A} can be interpreted as a discretization
+The expression \autoref{eq:V-A} can be interpreted as a discretization
 of the global integral
 \begin{equation}
-  \label{eq:triad:cts-var}
+  \label{eq:cts-var}
   \frac{\partial}{\partial t}\int\!\half T^2\, dV =
   \int\!\mathbf{F}\cdot\nabla T\, dV,
@@ -480,9 +481,9 @@
 cells, defined in terms of the distances between $T$, $u$,$f$ and
 $w$-points. This is the natural discretization of
-\eqref{eq:triad:cts-var}. The \NEMO model, however, operates with scale
+\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:triad:V-NEMO}
+  \label{eq:V-NEMO}
   _i^k\mathbb{V}_{i_p}^{k_p}=\quarter {b_u}_{i+i_p}^k,
 \end{equation}
@@ -492,5 +493,5 @@
 $i+1,k$ reduces to the classical form
 \begin{equation}
-  \label{eq:triad:lat-normal}
+  \label{eq:lat-normal}
 -\overline\Alts_{\,i+1/2}^k\;
 \frac{{b_u}_{i+1/2}^k}{{e_{1u}}_{\,i + i_p}^{\,k}}
@@ -500,5 +501,5 @@
 In fact if the diffusive coefficient is defined at $u$-points, so that
 we employ $\Alts_{i+i_p}^k$ instead of  $\Alts_i^k$ in the definitions of the
-triad fluxes \eqref{eq:triad:latflux-triad} and \eqref{eq:triad:vertflux-triad},
+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.
 
@@ -506,7 +507,7 @@
 The iso-neutral fluxes at $u$- and
 $w$-points are the sums of the triad fluxes that cross the $u$- and
-$w$-faces \eqref{Eq_iso_flux}:
-\begin{subequations}\label{eq:triad:alltriadflux}
-  \begin{flalign}\label{eq:triad:vect_isoflux}
+$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}}
@@ -517,7 +518,7 @@
     \end{pmatrix},
   \end{flalign}
-  where \eqref{eq:triad:latflux-triad}:
+  where \autoref{eq:latflux-triad}:
   \begin{align}
-    \label{eq:triad:triadfluxu}
+    \label{eq:triadfluxu}
     _i^k {\mathbb{F}_u}_{i_p}^{k_p} (T) &= - \Alts_i^k{
       \:}\frac{{{}_i^k\mathbb{V}}_{i_p}^{k_p}}{{e_{1u}}_{\,i + i_p}^{\,k}}
@@ -534,16 +535,16 @@
       -\ \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:triad:triadfluxw}
+    \right),\label{eq:triadfluxw}
   \end{align}
-  with \eqref{eq:triad:V-NEMO}
+  with \autoref{eq:V-NEMO}
   \begin{equation}
-    \label{eq:triad:V-NEMO2}
+    \label{eq:V-NEMO2}
     _i^k{\mathbb{V}}_{i_p}^{k_p}=\quarter {b_u}_{i+i_p}^k.
   \end{equation}
 \end{subequations}
 
- The divergence of the expression \eqref{Eq_iso_flux} for the fluxes gives the iso-neutral diffusion tendency at
+ The divergence of the expression \autoref{eq:iso_flux} for the fluxes gives the iso-neutral diffusion tendency at
 each tracer point:
-\begin{equation} \label{eq:triad:iso_operator} D_l^T = \frac{1}{b_T}
+\begin{equation} \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[
@@ -554,7 +555,7 @@
 \begin{description}
 \item[$\bullet$ horizontal diffusion] The discretization of the
-  diffusion operator recovers \eqref{eq:triad:lat-normal} the traditional five-point Laplacian in
+  diffusion operator recovers \autoref{eq:lat-normal} the traditional five-point Laplacian in
   the limit of flat iso-neutral direction :
-  \begin{equation} \label{eq:triad:iso_property0} D_l^T = \frac{1}{b_T} \
+  \begin{equation} \label{eq:iso_property0} D_l^T = \frac{1}{b_T} \
     \delta_{i} \left[ \frac{e_{2u}\,e_{3u}}{e_{1u}} \;
       \overline\Alts^{\,i} \; \delta_{i+1/2}[T] \right] \qquad
@@ -564,5 +565,5 @@
 \item[$\bullet$ implicit treatment in the vertical] Only tracer values
   associated with a single water column appear in the expression
-  \eqref{eq:triad:i33} for the $_{33}$ fluxes, vertical fluxes driven by
+  \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
@@ -582,9 +583,9 @@
 \item[$\bullet$ pure iso-neutral operator] The iso-neutral flux of
   locally referenced potential density is zero. See
-  \eqref{eq:triad:latflux-rho} and \eqref{eq:triad:vertflux-triad2}.
+  \autoref{eq:latflux-rho} and \autoref{eq:vertflux-triad2}.
 
 \item[$\bullet$ conservation of tracer] The iso-neutral diffusion
   conserves tracer content, $i.e.$
-  \begin{equation} \label{eq:triad:iso_property1} \sum_{i,j,k} \left\{ D_l^T \
+  \begin{equation} \label{eq:iso_property1} \sum_{i,j,k} \left\{ D_l^T \
       b_T \right\} = 0
   \end{equation}
@@ -594,9 +595,9 @@
 \item[$\bullet$ no increase of tracer variance] The iso-neutral diffusion
   does not increase the tracer variance, $i.e.$
-  \begin{equation} \label{eq:triad:iso_property2} \sum_{i,j,k} \left\{ T \ D_l^T
+  \begin{equation} \label{eq:iso_property2} \sum_{i,j,k} \left\{ T \ D_l^T
       \ b_T \right\} \leq 0
   \end{equation}
   The property is demonstrated in
-  \S\ref{sec:triad:variance} above. It is a key property for a diffusion
+  \autoref{subsec:variance} above. It is a key property for a diffusion
   term. It means that it is also a dissipation term, $i.e.$ it
   dissipates the square of the quantity on which it is applied.  It
@@ -607,5 +608,5 @@
 \item[$\bullet$ self-adjoint operator] The iso-neutral diffusion
   operator is self-adjoint, $i.e.$
-  \begin{equation} \label{eq:triad:iso_property3} \sum_{i,j,k} \left\{ S \ D_l^T
+  \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}
@@ -614,10 +615,10 @@
   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 \eqref{eq:triad:iso_property3}, can
-  be found by replacing $\delta[T]$ by $\delta[S]$ in \eqref{eq:triad:dvar_iso_i}
-  and \eqref{eq:triad:dvar_iso_k}. This results in a term similar to
-  \eqref{eq:triad:perfect-square},
-\begin{equation}
-  \label{eq:triad:TScovar}
+  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},
+\begin{equation}
+  \label{eq:TScovar}
   - \Alts_i^k{\:} _i^k\mathbb{V}_{i_p}^{k_p}
   \left(
@@ -634,15 +635,15 @@
 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 \eqref{eq:triad:iso_property3}.
+RHS of \autoref{eq:iso_property3}.
 \end{description}
 
-\subsection{Treatment of the triads at the boundaries}\label{sec:triad:iso_bdry}
+\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 Fig.~\ref{fig:triad:bdry_triads}. Surface layer triads
+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 (Fig.~\ref{fig:triad:bdry_triads}a): this ensures that lateral
+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
@@ -650,5 +651,5 @@
 $\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 (Fig.~\ref{fig:triad:bdry_triads}b). Note that both near bottom
+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$
@@ -665,5 +666,5 @@
 \begin{figure}[h] \begin{center}
     \includegraphics[width=0.60\textwidth]{Fig_GRIFF_bdry_triads}
-    \caption{  \protect\label{fig:triad: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
@@ -678,11 +679,11 @@
       or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ $u$-point
       is masked. The associated lateral fluxes (grey-black dashed
-      line) are masked if \np{botmix\_triad}\forcode{ = .false.}, but left
-      unmasked, giving bottom mixing, if \np{botmix\_triad}\forcode{ = .true.}}
+      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:triad:limit}
-As discussed in \S\ref{LDF_slp_iso}, iso-neutral slopes relative to
+\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,
@@ -692,5 +693,5 @@
 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) \eqref{Eq_PE_slopes_eiv} rather than the slope $r_i$ relative to coordinate
+geopotentials) \autoref{eq:PE_slopes_eiv} rather than the slope $r_i$ relative to coordinate
 surfaces, so we require
 \begin{equation*}
@@ -700,5 +701,5 @@
 Each individual triad slope
  \begin{equation}
-   \label{eq:triad:Rtilde}
+   \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}
@@ -709,17 +710,17 @@
 is always downwards, and so acts to reduce gravitational potential energy.
 
-\subsection{Tapering within the surface mixed layer}\label{sec:triad:taper}
+\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:triad:lintaper}
+\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 Fig.~\ref{Fig_eiv_slp}, to values
+surface, as described in option (c) of \autoref{fig:eiv_slp}, to values
 \begin{subequations}
   \begin{equation}
-   \label{eq:triad:rmtilde}
+   \label{eq:rmtilde}
      \rMLt =
   -\frac{z}{h}\left.\tilde{r}_i\right|_{z=-h}\quad \text{ for  } z>-h,
@@ -728,10 +729,10 @@
 adjusted to
   \begin{equation}
-   \label{eq:triad:rm}
+   \label{eq:rm}
  \rML =\rMLt -\sigma_i \quad \text{ for  } z>-h.
   \end{equation}
 \end{subequations}
 Thus the diffusion operator within the mixed layer is given by:
-\begin{equation} \label{eq:triad:iso_tensor_ML}
+\begin{equation} \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}
@@ -745,22 +746,22 @@
 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 \S\ref{sec:triad:taperskew} below)
+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 \S\ref{sec:triad:limit}.
+limiting discussed above in \autoref{sec:limit}.
  
-As in \S\ref{sec:triad:limit} above, the tapering
-\eqref{eq:triad:rmtilde} is applied separately to each triad
+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 \eqref{eq:triad:Rtilde}.
+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
-Fig.~\ref{fig:triad:MLB_triad}), we define the mixed-layer by setting
+\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)
@@ -768,5 +769,5 @@
 ${\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 Fig.~\ref{fig:triad:MLB_triad}. We use the $k_{10}$-gridbox
+side of \autoref{fig:MLB_triad}. We use the $k_{10}$-gridbox
 instead of the surface gridbox to avoid problems e.g.\ with thin
 daytime mixed-layers. Currently we use the same
@@ -784,8 +785,8 @@
 ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ are
 representative of the thermocline. The four basal triads defined in the bottom part
-of Fig.~\ref{fig:triad:MLB_triad} are then
+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:triad:Rbase}
+ {\:}^{k_{\mathrm{ML}}-k_p-1/2}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}, \label{eq:Rbase}
 \\
 \intertext{with e.g.\ the green triad}
@@ -797,10 +798,10 @@
 so it is this depth
 \begin{equation}
-  \label{eq:triad:zbase}
+  \label{eq:zbase}
   {z_\mathrm{base}}_{\,i}={z_{w}}_{k_\mathrm{ML}-1/2}
 \end{equation}
 (one gridbox deeper than the
 diagnosed ML depth $z_{\mathrm{ML}})$ that sets the $h$ used to taper
-the slopes in \eqref{eq:triad:rmtilde}.
+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
@@ -815,5 +816,5 @@
 \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:triad:RML}
+\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}
@@ -822,5 +823,5 @@
 \begin{figure}[h]
 %  \fcapside {
-    \caption{\protect\label{fig:triad:MLB_triad} Definition of
+    \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$
@@ -846,5 +847,5 @@
 
 \subsubsection{Additional truncation of skew iso-neutral flux components}
-\label{sec:triad:Gerdes-taper}
+\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
@@ -853,9 +854,9 @@
 replaces the $\rML$ in the skew term by
 \begin{equation}
-  \label{eq:triad:rm*}
+  \label{eq:rm*}
   \rML^*=\left.\rMLt^2\right/\tilde{r}_i-\sigma_i,
 \end{equation}
 giving a ML diffusive operator
-\begin{equation} \label{eq:triad:iso_tensor_ML2}
+\begin{equation} \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}
@@ -887,7 +888,7 @@
 % Skew flux formulation for Eddy Induced Velocity :
 % ================================================================
-\section{Eddy induced advection formulated as a skew flux}\label{sec:triad:skew-flux}
-
-\subsection{Continuous skew flux formulation}\label{sec:triad:continuous-skew-flux}
+\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,
@@ -895,11 +896,11 @@
 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, $i.e.$ \eqref{Eq_ldfslp_geo}
-is used in $z$-coordinate, and the sum \eqref{Eq_ldfslp_geo}
-+ \eqref{Eq_ldfslp_iso} in $z^*$ or $s$-coordinates.
+here are referenced to the geopotential surfaces, $i.e.$ \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:triad:eiv}
-\begin{equation}\label{eq:triad:eiv_v}
+\begin{subequations} \label{eq:eiv}
+\begin{equation}\label{eq:eiv_v}
 \begin{split}
  u^* & = - \frac{1}{e_{3}}\;          \partial_i\psi_1,  \\
@@ -910,5 +911,5 @@
 \end{equation}
 where the streamfunctions $\psi_i$ are given by
-\begin{equation} \label{eq:triad:eiv_psi}
+\begin{equation} \label{eq:eiv_psi}
 \begin{split}
 \psi_1 & = A_{e} \; \tilde{r}_1,   \\
@@ -924,5 +925,5 @@
 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 \S\ref{TRA_adv}) and not just a $2^{nd}$
+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
@@ -962,5 +963,5 @@
 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:triad:eiv_skew_ijk}
+\begin{equation} \label{eq:eiv_skew_ijk}
 \textbf{F}_\mathrm{eiv}^T = \begin{pmatrix}
  	        {+ e_{2} \, \psi_1  \; \partial_k T}   \\
@@ -969,5 +970,5 @@
 \end{equation}
 The total fluxes per unit physical area are then
-\begin{equation}\label{eq:triad:eiv_skew_physical}
+\begin{equation}\label{eq:eiv_skew_physical}
 \begin{split}
  f^*_1 & = \frac{1}{e_{3}}\; \psi_1 \partial_k T   \\
@@ -977,10 +978,10 @@
 \end{split}
 \end{equation}
-Note that Eq.~ \eqref{eq:triad:eiv_skew_physical} takes the same form whatever the
+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 \eqref{eq:triad:eiv_psi} are relative to geopotentials.
+$\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 (\ref{eq:triad:eiv_skew_ijk}, \ref{eq:triad:eiv_skew_physical}), so
-\begin{equation} \label{eq:triad:skew_eiv_conv}
+of the fluxes (\autoref{eq:eiv_skew_ijk}, \autoref{eq:eiv_skew_physical}), so
+\begin{equation} \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)
@@ -995,16 +996,16 @@
 
 \subsection{Discrete skew flux formulation}
-The skew fluxes in (\ref{eq:triad:eiv_skew_physical}, \ref{eq:triad:eiv_skew_ijk}), like the off-diagonal terms
-(\ref{eq:triad:i13c}, \ref{eq:triad:i31c}) of the small angle diffusion tensor, are best
-expressed in terms of the triad slopes, as in Fig.~\ref{fig:triad:ISO_triad}
-and Eqs~(\ref{eq:triad:i13}, \ref{eq:triad:i31}); but now in terms of the triad slopes
+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
-\eqref{eq:triad:eiv_skew_ijk} using the slopes \eqref{eq:triad:R} and
+\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:triad:allskewflux}
-  \begin{flalign}\label{eq:triad:vect_skew_flux}
+\begin{subequations}\label{eq:allskewflux}
+  \begin{flalign}\label{eq:vect_skew_flux}
     \vect{F}_{\mathrm{eiv}}(T) &\equiv
     \sum_{\substack{i_p,\,k_p}}
@@ -1016,7 +1017,7 @@
   \end{flalign}
   where the skew flux in the $i$-direction associated with a given
-  triad is (\ref{eq:triad:latflux-triad}, \ref{eq:triad:triadfluxu}):
+  triad is (\autoref{eq:latflux-triad}, \autoref{eq:triadfluxu}):
   \begin{align}
-    \label{eq:triad:skewfluxu}
+    \label{eq:skewfluxu}
     _i^k {\mathbb{S}_u}_{i_p}^{k_p} (T) &= + \quarter {A_e}_i^k{
       \:}\frac{{b_u}_{i+i_p}^k}{{e_{1u}}_{\,i + i_p}^{\,k}}
@@ -1024,9 +1025,9 @@
       \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} },
    \\
-    \intertext{and \eqref{eq:triad:triadfluxw} in the $k$-direction, changing the sign
-      to be consistent with \eqref{eq:triad:eiv_skew_ijk}:}
+    \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)
     &= -\quarter {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:triad:skewfluxw}
+     {_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}
@@ -1040,14 +1041,14 @@
 include a diffusive component but is a `pure' advection term. This can
 be seen
-%either from Appendix \ref{Apdx_eiv_skew} or
+%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
-\S\ref{sec:triad:variance} and \eqref{eq:triad:dvar_iso_i}, the
+\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-\half,k$ and $i+i_p+\half,k$, of
 \begin{equation}
-\label{eq:triad:dvar_eiv_i}
+\label{eq:dvar_eiv_i}
   _i^k{\mathbb{S}_u}_{i_p}^{k_p} (T)\,\delta_{i+ i_p}[T^k],
 \end{equation}
@@ -1055,9 +1056,9 @@
 $T$-points $i,k+k_p-\half$ (above) and $i,k+k_p+\half$ (below) of
 \begin{equation}
-\label{eq:triad:dvar_eiv_k}
+\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 (\ref{eq:triad:skewfluxu}, \ref{eq:triad:skewfluxw})
-shows that these two variance changes (\ref{eq:triad:dvar_eiv_i}, \ref{eq:triad:dvar_eiv_k})
+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.
@@ -1072,5 +1073,5 @@
 For the change in gravitational PE driven by the $k$-flux is
 \begin{align}
-  \label{eq:triad:vert_densityPE}
+  \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
@@ -1078,5 +1079,5 @@
     {\mathbb{S}_w}_{i_p}^{k_p} (S) \right]. \notag \\
 \intertext{Substituting  ${\:}_i^k {\mathbb{S}_w}_{i_p}^{k_p}$ from
-  \eqref{eq:triad:skewfluxw}, gives}
+  \autoref{eq:skewfluxw}, gives}
 % and separating out
 % $\rtriadt{R}=\rtriad{R} + \delta_{i+i_p}[z_T^k]$,
@@ -1090,5 +1091,5 @@
 \end{align}
 using the definition of the triad slope $\rtriad{R}$,
-\eqref{eq:triad:R} to express $-\alpha _i^k\delta_{i+ i_p}[T^k]+
+\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]$.
@@ -1096,5 +1097,5 @@
 Where the coordinates slope, the $i$-flux gives a PE change
 \begin{multline}
-  \label{eq:triad:lat_densityPE}
+  \label{eq:lat_densityPE}
  g \delta_{i+i_p}[z_T^k]
 \left[
@@ -1106,8 +1107,8 @@
 \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 \eqref{eq:triad:skewfluxu}) and so the total PE change
-\eqref{eq:triad:vert_densityPE} + \eqref{eq:triad:lat_densityPE} associated with the triad fluxes is
+(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:triad:tot_densityPE}
+  \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) \\
@@ -1119,10 +1120,10 @@
 \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:triad:skew_bdry}
+\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 \S\ref{sec:triad:iso_bdry} and
-Fig.~\ref{fig:triad:bdry_triads}. Thus surface layer triads
+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}$
@@ -1132,15 +1133,15 @@
 no effect on the eddy-induced skew-fluxes.
 
-\subsection{Limiting of the slopes within the interior}\label{sec:triad:limitskew}
+\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 \ref{sec:triad:limit}. Each
+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:triad:taperskew}
+\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 \eqref{eq:triad:rmtilde}, as described in \S\ref{sec:triad:lintaper}. This is
-option (c) of Fig.~\ref{Fig_eiv_slp}. This linear tapering for 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}.
@@ -1148,7 +1149,7 @@
 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 \S\ref{LDF_coef}), it is
+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 \eqref{eq:triad:eiv_v}. This ensures that the
+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
@@ -1158,5 +1159,5 @@
 horizontal flux convergence is relatively insignificant within the mixed-layer).
 
-\subsection{Streamfunction diagnostics}\label{sec:triad:sfdiag}
+\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,
@@ -1164,9 +1165,9 @@
 $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
-\ref{Tab_cell}) respectively. We follow \citep{Griffies_Bk04} and
+\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:
 \begin{equation}
-  \label{eq:triad:sfdiagi}
+  \label{eq:sfdiagi}
   {\psi_1}_{i+1/2}^{k+1/2}={\quarter}\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}.
@@ -1174,6 +1175,6 @@
 The streamfunction $\psi_1$ is calculated similarly at $vw$ points.
 The eddy-induced velocities are then calculated from the
-straightforward discretisation of \eqref{eq:triad:eiv_v}:
-\begin{equation}\label{eq:triad:eiv_v_discrete}
+straightforward discretisation of \autoref{eq:eiv_v}:
+\begin{equation}\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),   \\
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_ASM.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_ASM.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_ASM.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Apply Assimilation Increments (ASM)}
-\label{ASM}
+\label{chap:ASM}
 
 Authors: D. Lea,  M. Martin, K. Mogensen, A. Weaver, ...   % do we keep
@@ -26,5 +26,5 @@
 
 \section{Direct initialization}
-\label{ASM_DI}
+\label{sec:ASM_DI}
 
 Direct initialization (DI) refers to the instantaneous correction
@@ -33,5 +33,5 @@
 
 \section{Incremental analysis updates}
-\label{ASM_IAU}
+\label{sec:ASM_IAU}
 
 Rather than updating the model state directly with the analysis increment,
@@ -83,12 +83,12 @@
 \end{eqnarray}
 where $\alpha^{-1} = \sum_{i=1}^{M/2} 2i$ and $M$ is assumed to be even. 
-The weights described by \eqref{eq:F2_i} provide a 
+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 \eqref{eq:F1_i}.
+to the next than that described by \autoref{eq:F1_i}.
 
 %==========================================================================
 % Divergence damping description %%%
 \section{Divergence damping initialisation}
-\label{ASM_details}
+\label{sec:ASM_details}
 
 The velocity increments may be initialized by the iterative application of 
@@ -110,5 +110,5 @@
                        +\delta _j \left[ {e_{1v}\,e_{3v}\,v^{n-1}_I} \right]} \right).
 \end{equation}
-By the application of \eqref{eq:asm_dmp} and \eqref{eq:asm_dmp} the divergence is filtered
+By the application of \autoref{eq:asm_dmp} and \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 the divergence is strongly damped.
@@ -125,5 +125,5 @@
 
 \section{Implementation details}
-\label{ASM_details}
+\label{sec:ASM_details}
 
 Here we show an example \ngn{namasm} namelist and the header of an example assimilation 
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_CONFIG.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_CONFIG.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_CONFIG.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Configurations}
-\label{CFG}
+\label{chap:CFG}
 \minitoc
 
@@ -15,5 +15,5 @@
 % ================================================================
 \section{Introduction}
-\label{CFG_intro}
+\label{sec:CFG_intro}
 
 
@@ -33,5 +33,5 @@
 % ================================================================
 \section{C1D: 1D Water column model (\protect\key{c1d}) }
-\label{CFG_c1d}
+\label{sec:CFG_c1d}
 
 $\ $\newline
@@ -81,5 +81,5 @@
 % ================================================================
 \section{ORCA family: global ocean with tripolar grid}
-\label{CFG_orca}
+\label{sec:CFG_orca}
 
 The ORCA family is a series of global ocean configurations that are run together with 
@@ -95,5 +95,5 @@
 \begin{figure}[!t]   \begin{center}
 \includegraphics[width=0.98\textwidth]{Fig_ORCA_NH_mesh}
-\caption{  \protect\label{Fig_MISC_ORCA_msh}     
+\caption{  \protect\label{fig:MISC_ORCA_msh}     
 ORCA mesh conception. The departure from an isotropic Mercator grid start poleward of 20\degN.
 The two "north pole" are the foci of a series of embedded ellipses (blue curves) 
@@ -108,5 +108,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{ORCA tripolar grid}
-\label{CFG_orca_grid}
+\label{subsec:CFG_orca_grid}
 
 The ORCA grid is a tripolar is based on the semi-analytical method of \citet{Madec_Imbard_CD96}. 
@@ -116,5 +116,5 @@
 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 (Fig.~\ref{Fig_MISC_ORCA_msh}). The resulting mesh presents no loss of continuity in 
+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. 
@@ -123,5 +123,5 @@
 \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}
+\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$)
@@ -141,5 +141,5 @@
 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 Fig.~\ref{Fig_MISC_ORCA_msh} and \ref{Fig_MISC_ORCA_e1e2} 
+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 
@@ -150,5 +150,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{ORCA pre-defined resolution}
-\label{CFG_orca_resolution}
+\label{subsec:CFG_orca_resolution}
 
 
@@ -156,5 +156,5 @@
 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. \ref{Tab_ORCA}).
+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}).
 
 
@@ -175,5 +175,5 @@
 \hline   \hline
 \end{tabular}
-\caption{ \protect\label{Tab_ORCA}   
+\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. }
@@ -196,5 +196,5 @@
 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 Tab.~\ref{Tab_orca_zgr} \sfcomment{HERE I need to put new table for ORCA2 values} and Fig.~\ref{Fig_zgr}).
+(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. 
@@ -204,7 +204,7 @@
 
 This version of ORCA\_R2 has 31 levels in the vertical, with the highest resolution (10m) 
-in the upper 150m (see Tab.~\ref{Tab_orca_zgr} and Fig.~\ref{Fig_zgr}). 
+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 \S\ref{SBC_blk_core}), 
+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 
@@ -222,5 +222,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{GYRE family: double gyre basin }
-\label{CFG_gyre}
+\label{sec:CFG_gyre}
 
 The GYRE configuration \citep{Levy_al_OM10} has been built to simulate
@@ -234,5 +234,5 @@
 The domain geometry is a closed rectangular basin on the $\beta$-plane centred 
 at $\sim$ 30\degN and rotated by 45\deg, 3180~km long, 2120~km wide 
-and 4~km deep (Fig.~\ref{Fig_MISC_strait_hand}). 
+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. 
@@ -257,5 +257,5 @@
 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}) (Fig.~\ref{Fig_zgr}).
+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 
@@ -267,5 +267,5 @@
 \begin{figure}[!t]   \begin{center}
 \includegraphics[width=1.0\textwidth]{Fig_GYRE}
-\caption{  \protect\label{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}.}
@@ -277,5 +277,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{AMM: atlantic margin configuration}
-\label{MISC_config_AMM}
+\label{sec:MISC_config_AMM}
 
 The AMM, Atlantic Margins Model, is a regional model covering the
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIA.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIA.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIA.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Output and Diagnostics (IOM, DIA, TRD, FLO)}
-\label{DIA}
+\label{chap:DIA}
 \minitoc
 
@@ -15,5 +15,5 @@
 % ================================================================
 \section{Old model output (default)}
-\label{DIA_io_old}
+\label{sec:DIA_io_old}
 
 The model outputs are of three types: the restart file, the output listing, 
@@ -56,5 +56,5 @@
 % ================================================================
 \section{Standard model output (IOM)}
-\label{DIA_iom}
+\label{sec:DIA_iom}
 
 
@@ -595,5 +595,5 @@
 
 \subsection{XML reference tables}
-\label{IOM_xmlref}
+\label{subsec:IOM_xmlref}
 
 (1) Simple computation: directly define the computation when refering to the variable in the file definition.
@@ -998,5 +998,5 @@
 \subsection{CF metadata standard compliance}
 
-Output from the XIOS-1.0 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. Therefore while a user may wish to add their own metadata to the output files (as demonstrated in example 4 of section \ref{IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard.
+Output from the XIOS-1.0 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. Therefore while a user may wish to add their own metadata to the output files (as demonstrated in example 4 of section \autoref{subsec:IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard.
 
 Some metadata that may significantly increase the file size (horizontal cell areas and vertices) are controlled by the namelist parameter \np{ln\_cfmeta} in the \ngn{namrun} namelist. This must be set to true if these metadata are to be included in the output files.
@@ -1007,5 +1007,5 @@
 % ================================================================
 \section{NetCDF4 support (\protect\key{netcdf4})}
-\label{DIA_iom}
+\label{sec:DIA_iom}
 
 Since version 3.3, support for NetCDF4 chunking and (loss-less) compression has
@@ -1070,5 +1070,5 @@
 respectively in the mono-processor case (i.e. global domain of {\small\tt 182x149x31}).
 An illustration of the potential space savings that NetCDF4 chunking and compression
-provides is given in table \ref{Tab_NC4} which compares the results of two short
+provides is given in table \autoref{tab:NC4} which compares the results of two short
 runs of the ORCA2\_LIM reference configuration with a 4x2 mpi partitioning. Note
 the variation in the compression ratio achieved which reflects chiefly the dry to wet 
@@ -1106,5 +1106,5 @@
 ORCA2\_2d\_grid\_W\_0007.nc & 4416 & 1368 & 70\%\\
 \end{tabular}
-\caption{ 	\protect\label{Tab_NC4} 
+\caption{ 	\protect\label{tab:NC4} 
 Filesize comparison between NetCDF3 and NetCDF4 with chunking and compression}
 \end{table}
@@ -1126,5 +1126,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{Tracer/Dynamics trends  (\protect\ngn{namtrd})}
-\label{DIA_trd}
+\label{sec:DIA_trd}
 
 %------------------------------------------namtrd----------------------------------------------------
@@ -1166,5 +1166,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{FLO: On-Line Floats trajectories (\protect\key{floats})}
-\label{FLO}
+\label{sec:FLO}
 %--------------------------------------------namflo-------------------------------------------------------
 \forfile{../namelists/namflo} 
@@ -1274,5 +1274,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{Harmonic analysis of tidal constituents (\protect\key{diaharm}) }
-\label{DIA_diag_harm}
+\label{sec:DIA_diag_harm}
 
 %------------------------------------------namdia_harm----------------------------------------------------
@@ -1316,5 +1316,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{Transports across sections (\protect\key{diadct}) }
-\label{DIA_diag_dct}
+\label{sec:DIA_diag_dct}
 
 %------------------------------------------namdct----------------------------------------------------
@@ -1467,5 +1467,5 @@
 % ================================================================
 \section{Diagnosing the steric effect in sea surface height}
-\label{DIA_steric}
+\label{sec:DIA_steric}
 
 
@@ -1500,5 +1500,5 @@
 
 A non-Boussinesq fluid conserves mass. It satisfies the following relations:
-\begin{equation} \label{Eq_MV_nBq} 
+\begin{equation} \label{eq:MV_nBq} 
 \begin{split} 
 \mathcal{M} &=  \mathcal{V}  \;\bar{\rho}      	\\
@@ -1507,5 +1507,5 @@
 \end{equation}
 Temporal changes in total mass is obtained from the density conservation equation :
-\begin{equation}  \label{Eq_Co_nBq}
+\begin{equation}  \label{eq:Co_nBq}
 \frac{1}{e_3} \partial_t ( e_3\,\rho) + \nabla( \rho \, \textbf{U} ) = \left. \frac{\textit{emp}}{e_3}\right|_\textit{surface}
 \end{equation}
@@ -1513,16 +1513,16 @@
 exchanges with the other media of the Earth system (atmosphere, sea-ice, land). 
 Its global averaged leads to the total mass change 
-\begin{equation}  \label{Eq_Mass_nBq}
+\begin{equation}  \label{eq:Mass_nBq}
 \partial_t \mathcal{M} = \mathcal{A} \;\overline{\textit{emp}}
 \end{equation}
 where $\overline{\textit{emp}}=\int_S \textit{emp}\,ds$ is the net mass flux 
 through the ocean surface.
-Bringing \eqref{Eq_Mass_nBq} and the time derivative of \eqref{Eq_MV_nBq} 
+Bringing \autoref{eq:Mass_nBq} and the time derivative of \autoref{eq:MV_nBq} 
 together leads to the evolution equation of the mean sea level
-\begin{equation} \label{Eq_ssh_nBq}
+\begin{equation} \label{eq:ssh_nBq}
   \partial_t \bar{\eta} =  \frac{\overline{\textit{emp}}}{ \bar{\rho}} 
   					- \frac{\mathcal{V}}{\mathcal{A}}  \;\frac{\partial_t \bar{\rho} }{\bar{\rho}}
 \end{equation}
-The first term in equation \eqref{Eq_ssh_nBq} alters sea level by adding or 
+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 
@@ -1531,11 +1531,11 @@
 In a Boussinesq fluid, $\rho$ is replaced by $\rho_o$ in all the equation except when $\rho$ 
 appears multiplied by the gravity ($i.e.$ in the hydrostatic balance of the primitive Equations). 
-In particular, the mass conservation equation, \eqref{Eq_Co_nBq}, degenerates into 
+In particular, the mass conservation equation, \autoref{eq:Co_nBq}, degenerates into 
 the incompressibility equation:
-\begin{equation}  \label{Eq_Co_Bq}
+\begin{equation}  \label{eq:Co_Bq}
 \frac{1}{e_3} \partial_t ( e_3 ) + \nabla( \textbf{U} ) =  \left. \frac{\textit{emp}}{\rho_o \,e_3}\right|_ \textit{surface}
 \end{equation}
 and the global average of this equation now gives the temporal change of the total volume,
-\begin{equation}  \label{Eq_V_Bq}
+\begin{equation}  \label{eq:V_Bq}
   \partial_t \mathcal{V} =   \mathcal{A} \;\frac{\overline{\textit{emp}}}{\rho_o} 
 \end{equation}
@@ -1553,5 +1553,5 @@
 by the Boussinesq model, via the steric contribution to the sea level, $\eta_s$, a spatially 
 uniform variable, as follows:
-\begin{equation}  \label{Eq_M_Bq}
+\begin{equation}  \label{eq:M_Bq}
    \mathcal{M}_o  =  \mathcal{M} + \rho_o \,\eta_s \,\mathcal{A} 
 \end{equation}
@@ -1559,7 +1559,7 @@
 the ocean surface 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. \S\ref{TRA_eos}) in \eqref{Eq_M_Bq}
+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:
-\begin{equation}  \label{Eq_steric_Bq}
+\begin{equation}  \label{eq:steric_Bq}
    \eta_s = - \frac{1}{\mathcal{A}} \mathcal{D} 
 \end{equation}
@@ -1581,8 +1581,8 @@
 (wetting and drying of grid point is not allowed). 
   
-Third, the discretisation of \eqref{Eq_steric_Bq} depends on the type of free surface
+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, $i.e.$ \key{vvl} defined, it is
 given by
-\begin{equation}  \label{Eq_discrete_steric_Bq}
+\begin{equation}  \label{eq:discrete_steric_Bq}
    \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} } 
@@ -1590,5 +1590,5 @@
 whereas in the linear free surface, the volume above the \textit{z=0} surface must be explicitly taken 
 into account to better approximate the total ocean mass and thus the steric sea level:
-\begin{equation}  \label{Eq_discrete_steric_Bq}
+\begin{equation}  \label{eq:discrete_steric_Bq}
    \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 } 
@@ -1608,5 +1608,5 @@
 In AR5 outputs, the thermosteric sea level is demanded. It is steric sea level due to 
 changes in ocean density arising just from changes in temperature. It is given by:
-\begin{equation}  \label{Eq_thermosteric_Bq}
+\begin{equation}  \label{eq:thermosteric_Bq}
    \eta_s = - \frac{1}{\mathcal{A}} \int_D d_a(T,S_o,p_o) \,dv
 \end{equation}
@@ -1622,5 +1622,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{Other diagnostics (\protect\key{diahth}, \protect\key{diaar5})}
-\label{DIA_diag_others}
+\label{sec:DIA_diag_others}
 
 
@@ -1658,10 +1658,10 @@
 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 (Fig~\ref{Fig_mask_subasins}). 
+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}
+\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), 
@@ -1681,5 +1681,5 @@
 A series of diagnostics has been added in the \mdl{diaar5}. 
 They corresponds to outputs that are required for AR5 simulations (CMIP5)
-(see also Section \ref{DIA_steric} for one of them). 
+(see also  \autoref{sec:DIA_steric} for one of them). 
 Activating those outputs requires to define the \key{diaar5} CPP key.
 
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIU.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIU.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIU.tex	(revision 9407)
@@ -6,5 +6,5 @@
 % ================================================================
 \chapter{Diurnal SST Models (DIU)}
-\label{DIU}
+\label{chap:DIU}
 
 \minitoc
@@ -54,5 +54,5 @@
 %===============================================================
 \section{Warm layer model}
-\label{warm_layer_sec}
+\label{sec:warm_layer_sec}
 %===============================================================
 
@@ -62,10 +62,10 @@
 \frac{\partial{\Delta T_{\rm{wl}}}}{\partial{t}}&=&\frac{Q(\nu+1)}{D_T\rho_w c_p
 \nu}-\frac{(\nu+1)ku^*_{w}f(L_a)\Delta T}{D_T\Phi\!\left(\frac{D_T}{L}\right)} \mbox{,}
-\label{ecmwf1} \\
-L&=&\frac{\rho_w c_p u^{*^3}_{w}}{\kappa g \alpha_w Q }\mbox{,}\label{ecmwf2}
+\label{eq:ecmwf1} \\
+L&=&\frac{\rho_w c_p u^{*^3}_{w}}{\kappa g \alpha_w Q }\mbox{,}\label{eq:ecmwf2}
 \end{eqnarray}
 where $\Delta T_{\rm{wl}}$ is the temperature difference between the top of the warm
 layer and the depth $D_T=3$\,m at which there is assumed to be no diurnal signal. In
-equation (\ref{ecmwf1}) $\alpha_w=2\times10^{-4}$ is the thermal expansion
+equation (\autoref{eq: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
@@ -81,14 +81,14 @@
 $u^*_{w} = u_{10}\sqrt{\frac{C_d\rho_a}{\rho_w}}$, where $C_d$ is
 the drag coefficient, and $\rho_a$ is the density of air.  The symbol $Q$ in equation
-(\ref{ecmwf1}) is the instantaneous total thermal energy
+(\autoref{eq:ecmwf1}) is the instantaneous total thermal energy
 flux into
 the diurnal layer, $i.e.$
 \begin{equation}
-Q = Q_{\rm{sol}} + Q_{\rm{lw}} + Q_{\rm{h}}\mbox{,} \label{e_flux_eqn}
+Q = Q_{\rm{sol}} + Q_{\rm{lw}} + Q_{\rm{h}}\mbox{,} \label{eq:e_flux_eqn}
 \end{equation}
 where $Q_{\rm{h}}$ is the sensible and latent heat flux, $Q_{\rm{lw}}$ is the long
 wave flux, and $Q_{\rm{sol}}$ is the solar flux absorbed
 within the diurnal warm layer. For $Q_{\rm{sol}}$ the 9 term
-representation of \citet{Gentemann_al_JGR09} is used.  In equation \ref{ecmwf1}
+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 $L_a=0.3$\footnote{This
 is a global average value, more accurately $L_a$ could be computed as
@@ -103,11 +103,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{stab_func_eqn}
+                                    \end{array} \right. \label{eq:stab_func_eqn}
 \end{equation}
 where $\zeta=\frac{D_T}{L}$.  It is clear that the first derivative of
-(\ref{stab_func_eqn}), and thus of (\ref{ecmwf1}),
-is discontinuous at $\zeta=0$ ($i.e.$ $Q\rightarrow0$ in equation (\ref{ecmwf2})).
+(\autoref{eq:stab_func_eqn}), and thus of (\autoref{eq:ecmwf1}),
+is discontinuous at $\zeta=0$ ($i.e.$ $Q\rightarrow0$ in equation (\autoref{eq:ecmwf2})).
 
-The two terms on the right hand side of (\ref{ecmwf1}) represent different processes.
+The two terms on the right hand side of (\autoref{eq:ecmwf1}) represent different processes.
 The first term is simply the diabatic heating or cooling of the
 diurnal warm
@@ -121,5 +121,5 @@
 
 \section{Cool skin model}
-\label{cool_skin_sec}
+\label{sec:cool_skin_sec}
 
 %===============================================================
@@ -131,5 +131,5 @@
 Saunders equation for the cool skin temperature difference $\Delta T_{\rm{cs}}$ becomes
 \begin{equation}
-\label{sunders_eqn}
+\label{eq:sunders_eqn}
 \Delta T_{\rm{cs}}=\frac{Q_{\rm{ns}}\delta}{k_t} \mbox{,}
 \end{equation}
@@ -138,5 +138,5 @@
 skin layer and is given by
 \begin{equation}
-\label{sunders_thick_eqn}
+\label{eq:sunders_thick_eqn}
 \delta=\frac{\lambda \mu}{u^*_{w}} \mbox{,}
 \end{equation}
@@ -144,10 +144,10 @@
 proportionality which \citet{Saunders_JAS82} suggested varied between 5 and 10.
 
-The value of $\lambda$ used in equation (\ref{sunders_thick_eqn}) is that of
+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 both low and high wind speeds. Specifically,
 \begin{equation}
-\label{artale_lambda_eqn}
+\label{eq:artale_lambda_eqn}
 \lambda = \frac{ 8.64\times10^4 u^*_{w} k_t }{ \rho c_p h \mu \gamma }\mbox{,}
 \end{equation}
@@ -155,5 +155,5 @@
 $\gamma$ is a dimensionless function of wind speed $u$:
 \begin{equation}
-\label{artale_gamma_eqn}
+\label{eq:artale_gamma_eqn}
 \gamma = \left\{ \begin{matrix}
                      0.2u+0.5\mbox{,} & u \le 7.5\,\mbox{ms}^{-1} \\
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_DOM.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_DOM.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_DOM.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Space Domain (DOM)}
-\label{DOM}
+\label{chap:DOM}
 \minitoc
 
@@ -20,6 +20,6 @@
 $\ $\newline    % force a new line
 
-Having defined the continuous equations in Chap.~\ref{PE} and chosen a time 
-discretization Chap.~\ref{STP}, we need to choose a discretization on a grid, 
+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. In the present chapter, we provide a general description 
 of the staggered grid used in \NEMO, and other information relevant to the main 
@@ -32,5 +32,5 @@
 % ================================================================
 \section{Fundamentals of the discretisation}
-\label{DOM_basics}
+\label{sec:DOM_basics}
 
 % -------------------------------------------------------------------------------------------------------------
@@ -38,10 +38,10 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Arrangement of variables}
-\label{DOM_cell}
+\label{subsec:DOM_cell}
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!tb]    \begin{center}
 \includegraphics[width=0.90\textwidth]{Fig_cell}
-\caption{ \protect\label{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$) 
@@ -56,5 +56,5 @@
 space 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 (Fig. \ref{Fig_cell}). 
+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 
@@ -66,8 +66,8 @@
 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 Table \ref{Tab_cell}. In all the following, subscripts $u$, $v$, $w$, 
+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 \eqref{Eq_scale_factors}. As a result, the mesh on which partial 
+provided by \autoref{eq:scale_factors}. As a result, the mesh on which partial 
 derivatives $\frac{\partial}{\partial \lambda}, \frac{\partial}{\partial \varphi}$, and 
 $\frac{\partial}{\partial z} $ are evaluated is a uniform mesh with a grid size of unity. 
@@ -78,7 +78,7 @@
 from their analytical expression. This preserves the symmetry of the discrete set 
 of equations and therefore satisfies many of the continuous properties (see 
-Appendix~\ref{Apdx_C}). A similar, related remark can be made about the domain 
+\autoref{apdx:C}). 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 \eqref{DOM_bar}) in the next section). 
+as the sum of the relevant scale factors (see \autoref{eq:DOM_bar}) in the next section). 
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -95,9 +95,9 @@
 fw	& $i+1/2$ 	& $j+1/2$	& $k+1/2$ 	\\ \hline
 \end{tabular}
-\caption{ \protect\label{Tab_cell}
+\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 \S\ref{DOM_Num_Index})}
+in the vertical (see \autoref{subsec:DOM_Num_Index})}
 \end{center}
 \end{table}
@@ -108,9 +108,9 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Discrete operators}
-\label{DOM_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:
-\begin{subequations} \label{Eq_di_mi}
+\begin{subequations} \label{eq:di_mi}
 \begin{align}
  \delta _i [q]       &=  \  \    q(i+1/2)  - q(i-1/2)		\\
@@ -120,14 +120,14 @@
 
 Similar operators are defined with respect to $i+1/2$, $j$, $j+1/2$, $k$, and 
-$k+1/2$. Following \eqref{Eq_PE_grad} and \eqref{Eq_PE_lap}, the gradient of a 
+$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 Laplacien is defined at $t$-point. These operators have 
 the following discrete forms in the curvilinear $s$-coordinate system:
-\begin{equation} \label{Eq_DOM_grad}
+\begin{equation} \label{eq:DOM_grad}
 \nabla q\equiv 	\frac{1}{e_{1u} } \delta _{i+1/2 } [q] \;\,\mathbf{i}
 		+	\frac{1}{e_{2v} } \delta _{j+1/2 } [q] \;\,\mathbf{j}
 		+	\frac{1}{e_{3w}} \delta _{k+1/2} [q] \;\,\mathbf{k}
 \end{equation}
-\begin{multline} \label{Eq_DOM_lap}
+\begin{multline} \label{eq:DOM_lap}
 \Delta q\equiv \frac{1}{e_{1t}\,e_{2t}\,e_{3t} }
        \;\left(          \delta_i  \left[ \frac{e_{2u}\,e_{3u}} {e_{1u}} \;\delta_{i+1/2} [q] \right]
@@ -136,8 +136,8 @@
 \end{multline}
 
-Following \eqref{Eq_PE_curl} and \eqref{Eq_PE_div}, a vector ${\rm {\bf A}}=\left( a_1,a_2,a_3\right)$ 
+Following \autoref{eq:PE_curl} and \autoref{eq:PE_div}, a vector ${\rm {\bf A}}=\left( a_1,a_2,a_3\right)$ 
 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{eqnarray}  \label{Eq_DOM_curl}
+\begin{eqnarray}  \label{eq:DOM_curl}
  \nabla \times {\rm{\bf A}}\equiv &
       \frac{1}{e_{2v}\,e_{3vw} } \ \left( \delta_{j +1/2} \left[e_{3w}\,a_3 \right] -\delta_{k+1/2} \left[e_{2v} \,a_2 \right] \right)  &\ \mathbf{i} \\ 
@@ -145,5 +145,5 @@
  +& \frac{1}{e_{1f} \,e_{2f}    } \ \left( \delta_{i +1/2} \left[e_{2v}\,a_2  \right] -\delta_{j +1/2} \left[e_{1u}\,a_1 \right] \right)  &\ \mathbf{k}
  \end{eqnarray}
-\begin{eqnarray} \label{Eq_DOM_div}
+\begin{eqnarray} \label{eq:DOM_div}
 \nabla \cdot \rm{\bf A} \equiv 
     \frac{1}{e_{1t}\,e_{2t}\,e_{3t}} \left( \delta_i \left[e_{2u}\,e_{3u}\,a_1 \right]
@@ -153,5 +153,5 @@
 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):
-\begin{equation} \label{DOM_bar}
+\begin{equation} \label{eq:DOM_bar}
 \bar q 	=         \frac{1}{H}    \int_{k^b}^{k^o} {q\;e_{3q} \,dk} 
 		\equiv \frac{1}{H_q }\sum\limits_k {q\;e_{3q} }
@@ -163,8 +163,8 @@
 
 In continuous form, the following properties are satisfied:
-\begin{equation} \label{Eq_DOM_curl_grad}
+\begin{equation} \label{eq:DOM_curl_grad}
 \nabla \times \nabla q ={\rm {\bf {0}}}
 \end{equation}
-\begin{equation} \label{Eq_DOM_div_curl}
+\begin{equation} \label{eq:DOM_div_curl}
 \nabla \cdot \left( {\nabla \times {\rm {\bf A}}} \right)=0
 \end{equation}
@@ -181,8 +181,8 @@
 operators, $i.e.$
 \begin{align} 
-\label{DOM_di_adj}
+\label{eq:DOM_di_adj}
 \sum\limits_i { a_i \;\delta _i \left[ b \right]} 
 	&\equiv -\sum\limits_i {\delta _{i+1/2} \left[ a \right]\;b_{i+1/2} }      \\
-\label{DOM_mi_adj}
+\label{eq:DOM_mi_adj}
 \sum\limits_i { a_i \;\overline b^{\,i}} 
 	& \equiv \quad \sum\limits_i {\overline a ^{\,i+1/2}\;b_{i+1/2} } 
@@ -192,5 +192,5 @@
 $\delta_i^*=\delta_{i+1/2}$ and 
 ${(\overline{\,\cdot \,}^{\,i})}^*= \overline{\,\cdot\,}^{\,i+1/2}$, respectively. 
-These two properties will be used extensively in the Appendix~\ref{Apdx_C} to 
+These two properties will be used extensively in the \autoref{apdx:C} to 
 demonstrate integral conservative properties of the discrete formulation chosen.
 
@@ -199,10 +199,10 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Numerical indexing}
-\label{DOM_Num_Index}
+\label{subsec:DOM_Num_Index}
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!tb]  \begin{center}
 \includegraphics[width=0.90\textwidth]{Fig_index_hor}
-\caption{   \protect\label{Fig_index_hor}    
+\caption{   \protect\label{fig:index_hor}    
 Horizontal integer indexing used in the \textsc{Fortran} code. The dashed area indicates 
 the cell in which variables contained in arrays have the same $i$- and $j$-indices}
@@ -211,5 +211,5 @@
 
 The array representation used in the \textsc{Fortran} code requires an integer 
-indexing while the analytical definition of the mesh (see \S\ref{DOM_cell}) is 
+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 
@@ -222,9 +222,9 @@
 % -----------------------------------
 \subsubsection{Horizontal indexing}
-\label{DOM_Num_Index_hor}
-
-The indexing in the horizontal plane has been chosen as shown in Fig.\ref{Fig_index_hor}. 
+\label{subsec:DOM_Num_Index_hor}
+
+The indexing in the horizontal plane has been chosen as shown in \autoref{fig: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 Fig.\ref{Fig_index_hor}). 
+(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.
 
@@ -233,18 +233,18 @@
 % -----------------------------------
 \subsubsection{Vertical indexing}
-\label{DOM_Num_Index_vertical}
+\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 \textsc{Fortran} code compared 
-to the indexing used in the semi-discrete equations and given in \S\ref{DOM_cell}. 
+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 (Fig.\ref{Fig_index_vert}). The last $w$-level ($k=jpk$) 
+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 (Fig.\ref{Fig_index_vert}). Note that 
+$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 
-Fig.\ref{Fig_index_hor} and \ref{Fig_index_vert}). Since the scale factors are 
+\autoref{fig:index_hor} and \autoref{fig:index_vert}). Since the scale factors are 
 chosen to be strictly positive, a \emph{minus sign} appears in the \textsc{Fortran} 
 code \emph{before all the vertical derivatives} of the discrete equations given in 
@@ -254,5 +254,5 @@
 \begin{figure}[!pt]    \begin{center}
 \includegraphics[width=.90\textwidth]{Fig_index_vert}
-\caption{ \protect\label{Fig_index_vert}     
+\caption{ \protect\label{fig:index_vert}     
 Vertical integer indexing used in the \textsc{Fortran } code. Note that 
 the $k$-axis is orientated downward. The dashed area indicates the cell in 
@@ -265,5 +265,5 @@
 % -----------------------------------
 \subsubsection{Domain size}
-\label{DOM_size}
+\label{subsec:DOM_size}
 
 The total size of the computational domain is set by the parameters \np{jpiglo}, 
@@ -273,5 +273,5 @@
 %%%
 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 \S\ref{LBC_mpp}).
+run in parallel using domain decomposition (\key{mpp\_mpi} defined, see \autoref{sec:LBC_mpp}).
 
 
@@ -282,10 +282,10 @@
 % ================================================================
 \section{Needed fields}
-\label{DOM_fields}
+\label{sec:DOM_fields}
 The ocean mesh ($i.e.$ 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 Table~\ref{Tab_cell}. The associated scale factors are defined using the  
-analytical first derivative of the transformation \eqref{Eq_scale_factors}. 
+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: \\
 Geographic position :
@@ -316,5 +316,5 @@
 % -------------------------------------------------------------------------------------------------------------
 %\subsection{List of needed fields to build DOMAIN}
-%\label{DOM_fields_list}
+%\label{subsec:DOM_fields_list}
 
 
@@ -323,5 +323,5 @@
 % ================================================================
 \section{Horizontal grid mesh (\protect\mdl{domhgr})}
-\label{DOM_hgr}
+\label{sec:DOM_hgr}
 
 % -------------------------------------------------------------------------------------------------------------
@@ -329,11 +329,11 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Coordinates and scale factors}
-\label{DOM_hgr_coord_e}
+\label{subsec:DOM_hgr_coord_e}
 
 The ocean mesh ($i.e.$ 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 Table~\ref{Tab_cell}. The associated scale factors are defined using the 
-analytical first derivative of the transformation \eqref{Eq_scale_factors}. These 
+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 
@@ -343,5 +343,5 @@
 analytical expressions of the longitude $\lambda$ and  latitude $\varphi$ as a 
 function of  $(i,j)$. The horizontal scale factors are calculated using 
-\eqref{Eq_scale_factors}. For example, when the longitude and latitude are 
+\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 
@@ -382,9 +382,9 @@
 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 
-Fig.~\ref{Fig_zgr_e3}.
+\autoref{fig:zgr_e3}.
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!t]     \begin{center}
 \includegraphics[width=0.90\textwidth]{Fig_zgr_e3}
-\caption{ \protect\label{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. 
@@ -401,5 +401,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Choice of horizontal grid}
-\label{DOM_hgr_msh_choice}
+\label{subsec:DOM_hgr_msh_choice}
 
 
@@ -408,5 +408,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Output grid files}
-\label{DOM_hgr_files}
+\label{subsec:DOM_hgr_files}
 
 All the arrays relating to a particular ocean model configuration (grid-point 
@@ -426,5 +426,5 @@
 % ================================================================
 \section{Vertical grid (\protect\mdl{domzgr})}
-\label{DOM_zgr}
+\label{sec:DOM_zgr}
 %-----------------------------------------nam_zgr & namdom-------------------------------------------
 %\forfile{../namelists/namzgr} 
@@ -444,5 +444,5 @@
 \begin{figure}[!tb]    \begin{center}
 \includegraphics[width=1.0\textwidth]{Fig_z_zps_s_sps}
-\caption{  \protect\label{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, 
@@ -451,5 +451,5 @@
 (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 (\np{ln\_linssh}\forcode{ = .false.}). 
+(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).}
@@ -460,11 +460,11 @@
 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 (Fig.~\ref{Fig_z_zps_s_sps}a to c): $z$-coordinate with full step 
+choices are offered (\autoref{fig:z_zps_s_sps}a to c): $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 
-(Fig.~\ref{Fig_z_zps_s_sps}d and \ref{Fig_z_zps_s_sps}e). By default a non-linear free surface is used:
+(\autoref{fig:z_zps_s_sps}d and \autoref{fig:z_zps_s_sps}e). 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)$ (Fig.~\ref{Fig_z_zps_s_sps}f). When a linear free surface is assumed (\np{ln\_linssh}\forcode{ = .true.}), 
+$z(i,j,k,t)$ (\autoref{fig:z_zps_s_sps}f). 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). 
@@ -513,5 +513,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Meter bathymetry}
-\label{DOM_bathy}
+\label{subsec:DOM_bathy}
 
 Three options are possible for defining the bathymetry, according to the 
@@ -541,5 +541,5 @@
 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 \S\ref{MISC_closea}), but the 
+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. 
 
@@ -549,13 +549,13 @@
 \subsection[$Z$-coordinate (\protect\np{ln\_zco}\forcode{ = .true.}) and ref. coordinate]
 				{$Z$-coordinate (\protect\np{ln\_zco}\forcode{ = .true.}) and reference coordinate}
-\label{DOM_zco}
+\label{subsec:DOM_zco}
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!tb]    \begin{center}
 \includegraphics[width=0.90\textwidth]{Fig_zgr}
-\caption{ \protect\label{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 \eqref{DOM_zgr_ana} using \eqref{DOM_zgr_coef} in $z$-coordinate.}
+from \autoref{eq:DOM_zgr_ana} using \autoref{eq:DOM_zgr_coef} in $z$-coordinate.}
 \end{center}   \end{figure}
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -563,5 +563,5 @@
 The reference coordinate transformation $z_0 (k)$ defines the arrays $gdept_0$ 
 and $gdepw_0$ for $t$- and $w$-points, respectively. As indicated on 
-Fig.\ref{Fig_index_vert} \jp{jpk} is the number of $w$-levels. $gdepw_0(1)$ is the 
+\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. 
@@ -579,5 +579,5 @@
 near the ocean surface. The following function is proposed as a standard for a 
 $z$-coordinate (with either full or partial steps): 
-\begin{equation} \label{DOM_zgr_ana}
+\begin{equation} \label{eq:DOM_zgr_ana}
 \begin{split}
  z_0 (k) 	&= h_{sur} -h_0 \;k-\;h_1 \;\log \left[ {\,\cosh \left( {{(k-h_{th} )} / {h_{cr} }} \right)\,} \right] \\ 
@@ -588,9 +588,9 @@
 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 
-(Fig.~\ref{Fig_zgr}).
+(\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{DOM_zgr_ana}
+\begin{equation} \label{eq:DOM_zgr_ana}
 \begin{split}
  e_3^T(k) &= z_W (k+1) - z_W (k)   \\
@@ -605,5 +605,5 @@
 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{DOM_zgr_coef}
+\begin{equation} \label{eq:DOM_zgr_coef}
 \begin{split}
  e_3 (1+1/2)		&=10. \\ 
@@ -616,10 +616,10 @@
 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 
-\eqref{DOM_zgr_ana} have been determined such that \eqref{DOM_zgr_coef} is 
+\autoref{eq:DOM_zgr_ana} 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 Fig.~\ref{Fig_zgr} and 
-given in Table \ref{Tab_orca_zgr}. Those values correspond to the parameters 
+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. 
 
@@ -675,7 +675,7 @@
 31	& 	\textbf{5250.23}&	5000.00 &	\textbf{500.56} &	500.33 \\ \hline
 \end{tabular} \end{center} 
-\caption{ \protect\label{Tab_orca_zgr}   
+\caption{ \protect\label{tab:orca_zgr}   
 Default vertical mesh in $z$-coordinate for 30 layers ORCA2 configuration as computed 
-from \eqref{DOM_zgr_ana} using the coefficients given in \eqref{DOM_zgr_coef}}
+from \autoref{eq:DOM_zgr_ana} using the coefficients given in \autoref{eq:DOM_zgr_coef}}
 \end{table}
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -685,5 +685,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{$Z$-coordinate with partial step (\protect\np{ln\_zps}\forcode{ = .true.})}
-\label{DOM_zps}
+\label{subsec:DOM_zps}
 %--------------------------------------------namdom-------------------------------------------------------
 \forfile{../namelists/namdom} 
@@ -717,5 +717,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{$S$-coordinate (\protect\np{ln\_sco}\forcode{ = .true.})}
-\label{DOM_sco}
+\label{subsec:DOM_sco}
 %------------------------------------------nam_zgr_sco---------------------------------------------------
 %\forfile{../namelists/namzgr_sco} 
@@ -726,5 +726,5 @@
 function or its derivative, respectively:
 
-\begin{equation} \label{DOM_sco_ana}
+\begin{equation} \label{eq:DOM_sco_ana}
 \begin{split}
  z(k) 		&= h(i,j) \; z_0(k)	\\
@@ -737,5 +737,5 @@
 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 (Fig.~\ref{Fig_z_zps_s_sps}d-e) or an envelop bathymetry can be defined (Fig.~\ref{Fig_z_zps_s_sps}f).
+topography can be used (\autoref{fig:z_zps_s_sps}d-e) or an envelop bathymetry can be defined (\autoref{fig:z_zps_s_sps}f).
 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. 
@@ -764,5 +764,5 @@
 \end{equation}
 
-\begin{equation} \label{DOM_sco_function}
+\begin{equation} \label{eq:DOM_sco_function}
 \begin{split}
 C(s)	&=  \frac{ \left[	  \tanh{ \left( \theta \, (s+b) \right)} 
@@ -784,5 +784,5 @@
 \begin{figure}[!ht]    \begin{center}
 \includegraphics[width=1.0\textwidth]{Fig_sco_function}
-\caption{  \protect\label{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}
@@ -794,5 +794,5 @@
 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 (Fig.~\ref{Fig_sco_function}).
+increase of the vertical resolution (\autoref{fig:sco_function}).
 
 Another example has been provided at version 3.5 (\np{ln\_s\_SF12}) that allows 
@@ -807,10 +807,10 @@
 The function is defined with respect to $\sigma$, the unstretched terrain-following coordinate:
 
-\begin{equation} \label{DOM_gamma_deriv}
+\begin{equation} \label{eq:DOM_gamma_deriv}
 \gamma= A\left(\sigma-\frac{1}{2}\left(\sigma^{2}+f\left(\sigma\right)\right)\right)+B\left(\sigma^{3}-f\left(\sigma\right)\right)+f\left(\sigma\right)
 \end{equation}
 
 Where:
-\begin{equation} \label{DOM_gamma}
+\begin{equation} \label{eq:DOM_gamma}
 f\left(\sigma\right)=\left(\alpha+2\right)\sigma^{\alpha+1}-\left(\alpha+1\right)\sigma^{\alpha+2} \quad \text{ and } \quad \sigma = \frac{k}{n-1} 
 \end{equation}
@@ -821,5 +821,5 @@
 and bottom depths. The bottom cell depth in this example is given as a function of water depth:
 
-\begin{equation} \label{DOM_zb}
+\begin{equation} \label{eq:DOM_zb}
 Z_b= h a + b
 \end{equation}
@@ -831,5 +831,5 @@
    \includegraphics[width=1.0\textwidth]{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 100m for a idealised bathymetry that goes from 50m to 5500m depth. For clarity every third coordinate surface is shown.}
-    \label{fig_compare_coordinates_surface}
+    \label{fig:fig_compare_coordinates_surface}
 \end{figure}
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -845,5 +845,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{$Z^*$- or $S^*$-coordinate (\protect\np{ln\_linssh}\forcode{ = .false.}) }
-\label{DOM_zgr_star}
+\label{subsec:DOM_zgr_star}
 
 This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO web site. 
@@ -855,5 +855,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Level bathymetry and mask}
-\label{DOM_msk}
+\label{subsec:DOM_msk}
 
 Whatever the vertical coordinate used, the model offers the possibility of 
@@ -892,5 +892,5 @@
 
 Note that, without ice shelves cavities, masks at $t-$ and $w-$points are identical with 
-the numerical indexing used (\S~\ref{DOM_Num_Index}). Nevertheless, $wmask$ are required 
+the numerical indexing used (\autoref{subsec:DOM_Num_Index}). Nevertheless, $wmask$ are required 
 with oceean cavities to deal with the top boundary (ice shelf/ocean interface) 
 exactly in the same way as for the bottom boundary. 
@@ -900,5 +900,5 @@
 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 \S~\ref{LBC_jperio}).
+(and so too the mask arrays) (see \autoref{fig:LBC_jperio}).
 
 
@@ -907,5 +907,5 @@
 % ================================================================
 \section{Initial state (\protect\mdl{istate} and \protect\mdl{dtatsd})}
-\label{DTA_tsd}
+\label{sec:DTA_tsd}
 %-----------------------------------------namtsd-------------------------------------------
 \forfile{../namelists/namtsd} 
@@ -918,5 +918,5 @@
 \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. In the latter case, the data will be interpolated on-the-fly both in the 
-horizontal and the vertical to the model grid (see \S~\ref{SBC_iof}). The information relative to 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 computation is done in the \mdl{dtatsd} module.
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_DYN.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_DYN.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_DYN.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Ocean Dynamics (DYN)}
-\label{DYN}
+\label{chap:DYN}
 \minitoc
 
@@ -11,5 +11,5 @@
 $\ $\newline      %force an empty line
 
-Using the representation described in Chapter \ref{DOM}, several semi-discrete 
+Using the representation described in \autoref{chap:DOM}, several semi-discrete 
 space forms of the dynamical equations are available depending on the vertical 
 coordinate used and on the conservation properties of the vorticity term. In all 
@@ -36,5 +36,5 @@
 inputs (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 Chapters \ref{SBC}, \ref{LDF} and \ref{ZDF}, respectively. 
+in \autoref{chap:SBC}, \autoref{chap:LDF} and \autoref{chap:ZDF}, respectively. 
 
 In the present chapter we also describe the diagnostic equations used to compute 
@@ -51,5 +51,5 @@
 The user has the option of extracting and outputting each tendency term from the
 3D momentum equations (\key{trddyn} defined), as described in 
-Chap.\ref{MISC}.  Furthermore, the tendency terms associated with the 2D 
+\autoref{chap:MISC}.  Furthermore, the tendency terms associated with the 2D 
 barotropic vorticity balance (when \key{trdvor} is defined) can be derived from the 
 3D terms.
@@ -64,5 +64,5 @@
 % ================================================================
 \section{Sea surface height and diagnostic variables ($\eta$, $\zeta$, $\chi$, $w$)}
-\label{DYN_divcur_wzv}
+\label{sec:DYN_divcur_wzv}
 
 %--------------------------------------------------------------------------------------------------------------
@@ -70,8 +70,8 @@
 %--------------------------------------------------------------------------------------------------------------
 \subsection{Horizontal divergence and relative vorticity (\protect\mdl{divcur})}
-\label{DYN_divcur}
+\label{subsec:DYN_divcur}
 
 The vorticity is defined at an $f$-point ($i.e.$ corner point) as follows:
-\begin{equation} \label{Eq_divcur_cur}
+\begin{equation} \label{eq:divcur_cur}
 \zeta =\frac{1}{e_{1f}\,e_{2f} }\left( {\;\delta _{i+1/2} \left[ {e_{2v}\;v} \right]
 						        -\delta _{j+1/2} \left[ {e_{1u}\;u} \right]\;} \right)
@@ -79,5 +79,5 @@
 
 The horizontal divergence is defined at a $T$-point. It is given by:
-\begin{equation} \label{Eq_divcur_div}
+\begin{equation} \label{eq:divcur_div}
 \chi =\frac{1}{e_{1t}\,e_{2t}\,e_{3t} }
 		\left( {\delta _i \left[ {e_{2u}\,e_{3u}\,u} \right]
@@ -102,8 +102,8 @@
 %--------------------------------------------------------------------------------------------------------------
 \subsection{Horizontal divergence and relative vorticity (\protect\mdl{sshwzv})}
-\label{DYN_sshwzv}
+\label{subsec:DYN_sshwzv}
 
 The sea surface height is given by :
-\begin{equation} \label{Eq_dynspg_ssh}
+\begin{equation} \label{eq:dynspg_ssh}
 \begin{aligned}
 \frac{\partial \eta }{\partial t}
@@ -117,10 +117,10 @@
 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 \S\ref{SBC}) then \textit{emp} can be 
+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. 
 The sea-surface height is evaluated using exactly the same time stepping scheme 
-as the tracer equation \eqref{Eq_tra_nxt}: 
+as the tracer equation \autoref{eq:tra_nxt}: 
 a leapfrog scheme in combination with an Asselin time filter, $i.e.$ the velocity appearing 
-in \eqref{Eq_dynspg_ssh} is centred in time (\textit{now} velocity). 
+in \autoref{eq:dynspg_ssh} is centred in time (\textit{now} velocity). 
 This is of paramount importance. Replacing $T$ by the number $1$ in the tracer equation and summing
 over the water column must lead to the sea surface height equation otherwise tracer content
@@ -129,5 +129,5 @@
 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}
+\begin{equation} \label{eq:wzv}
 \left\{   \begin{aligned}
 &\left. w \right|_{k_b-1/2} \quad= 0    \qquad \text{where } k_b \text{ is the level just above the sea floor }  	\\
@@ -141,8 +141,8 @@
 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 \eqref{Eq_wzv} disappears.
+In the case of a linear free surface, the time derivative in \autoref{eq: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 ($i.e.$ the first term in the
-right-hand-side of \eqref{Eq_dynspg_ssh}).
+right-hand-side of \autoref{eq:dynspg_ssh}).
 
 Note also that whereas the vertical velocity has the same discrete 
@@ -150,6 +150,6 @@
 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 \textsc{fortran} code compared 
-to the indexing used in the semi-discrete equations such as \eqref{Eq_wzv} 
-(see  \S\ref{DOM_Num_Index_vertical}). 
+to the indexing used in the semi-discrete equations such as \autoref{eq:wzv} 
+(see \autoref{subsec:DOM_Num_Index_vertical}). 
 
 
@@ -158,5 +158,5 @@
 % ================================================================
 \section{Coriolis and advection: vector invariant form}
-\label{DYN_adv_cor_vect}
+\label{sec:DYN_adv_cor_vect}
 %-----------------------------------------nam_dynadv----------------------------------------------------
 \forfile{../namelists/namdyn_adv} 
@@ -171,5 +171,5 @@
 time (\textit{now} velocity). 
 At the lateral boundaries either free slip, no slip or partial slip boundary 
-conditions are applied following Chap.\ref{LBC}.
+conditions are applied following \autoref{chap:LBC}.
 
 % -------------------------------------------------------------------------------------------------------------
@@ -177,5 +177,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Vorticity term (\protect\mdl{dynvor})}
-\label{DYN_vor}
+\label{subsec:DYN_vor}
 %------------------------------------------nam_dynvor----------------------------------------------------
 \forfile{../namelists/namdyn_vor} 
@@ -188,5 +188,5 @@
 the relative vorticity term and 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  Appendix~\ref{Apdx_C_vorEEN}). In the 
+flow and horizontal kinetic energy (EEN scheme) (see \autoref{subsec:C_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.}).
@@ -198,5 +198,5 @@
 %-------------------------------------------------------------
 \subsubsection{Enstrophy conserving scheme (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})}
-\label{DYN_vor_ens}
+\label{subsec:DYN_vor_ens}
 
 In the enstrophy conserving case (ENS scheme), the discrete formulation of the 
@@ -204,5 +204,5 @@
 ($ [ (\zeta +f ) / e_{3f} ]^2 $ in $s$-coordinates) for a horizontally non-divergent 
 flow ($i.e.$ $\chi$=$0$), but does not conserve the total kinetic energy. It is given by:
-\begin{equation} \label{Eq_dynvor_ens}
+\begin{equation} \label{eq:dynvor_ens}
 \left\{ 
 \begin{aligned}
@@ -219,9 +219,9 @@
 %-------------------------------------------------------------
 \subsubsection{Energy conserving scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})}
-\label{DYN_vor_ene}
+\label{subsec:DYN_vor_ene}
 
 The kinetic energy conserving scheme (ENE scheme) conserves the global 
 kinetic energy but not the global enstrophy. It is given by:
-\begin{equation} \label{Eq_dynvor_ene}
+\begin{equation} \label{eq:dynvor_ene}
 \left\{   \begin{aligned}
 {+\frac{1}{e_{1u}}\; {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right)
@@ -236,11 +236,11 @@
 %-------------------------------------------------------------
 \subsubsection{Mixed energy/enstrophy conserving scheme (\protect\np{ln\_dynvor\_mix}\forcode{ = .true.}) }
-\label{DYN_vor_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 (\ref{Eq_dynvor_ens}) 
-for the relative vorticity term, and of the ENE scheme (\ref{Eq_dynvor_ene}) applied 
+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.
-\begin{equation} \label{Eq_dynvor_mix}
+\begin{equation} \label{eq:dynvor_mix}
 \left\{ {     \begin{aligned}
  {+\frac{1}{e_{1u} }\; {\overline {\left( {\frac{\zeta }{e_{3f} }} \right)} }^{\,i} 
@@ -259,5 +259,5 @@
 %-------------------------------------------------------------
 \subsubsection{Energy and enstrophy conserving scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.}) }
-\label{DYN_vor_een}
+\label{subsec:DYN_vor_een}
 
 In both the ENS and ENE schemes, it is apparent that the combination of $i$ and $j$ 
@@ -277,15 +277,15 @@
 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 App.\ref{Apdx_C}).
+\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: 
-\begin{equation} \label{Eq_pot_vor}
+\begin{equation} \label{eq:pot_vor}
 q  = \frac{\zeta +f} {e_{3f} }
 \end{equation}
-where the relative vorticity is defined by (\ref{Eq_divcur_cur}), the Coriolis parameter 
+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}
+\begin{equation} \label{eq:een_e3f}
 e_{3f} = \overline{\overline {e_{3t} }} ^{\,i+1/2,j+1/2}
 \end{equation}
@@ -294,5 +294,5 @@
 \begin{figure}[!ht]    \begin{center}
 \includegraphics[width=0.70\textwidth]{Fig_DYN_een_triad}
-\caption{ \protect\label{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).}
@@ -300,5 +300,5 @@
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
-A key point in \eqref{Eq_een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made. 
+A key point in \autoref{eq:een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made. 
 It uses the sum of masked t-point vertical scale factor divided either 
 by the sum of the four t-point masks (\np{nn\_een\_e3f}\forcode{ = 1}), 
@@ -312,6 +312,6 @@
 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 
-(Fig.~\ref{Fig_DYN_een_triad}): 
-\begin{equation} \label{Q_triads}
+(\autoref{fig:DYN_een_triad}): 
+\begin{equation} \label{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)
@@ -320,5 +320,5 @@
 
 Finally, the vorticity terms are represented as: 
-\begin{equation} \label{Eq_dynvor_een}
+\begin{equation} \label{eq:dynvor_een}
 \left\{ {
 \begin{aligned}
@@ -333,5 +333,5 @@
 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 ($i.e.$ $\chi$=$0$) (see  Appendix~\ref{Apdx_C_vorEEN}). 
+nondivergent flow ($i.e.$ $\chi$=$0$) (see \autoref{subsec:C_vorEEN}). 
 Applied to a realistic ocean configuration, it has been shown that it leads to a significant 
 reduction of the noise in the vertical velocity field \citep{Le_Sommer_al_OM09}. 
@@ -344,10 +344,10 @@
 %--------------------------------------------------------------------------------------------------------------
 \subsection{Kinetic energy gradient term (\protect\mdl{dynkeg})}
-\label{DYN_keg}
-
-As demonstrated in Appendix~\ref{Apdx_C}, there is a single discrete formulation 
+\label{subsec:DYN_keg}
+
+As demonstrated in \autoref{apdx:C}, 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:
-\begin{equation} \label{Eq_dynkeg}
+\begin{equation} \label{eq:dynkeg}
 \left\{ \begin{aligned}
  -\frac{1}{2 \; e_{1u} }  & \ \delta _{i+1/2} \left[ {\overline {u^2}^{\,i} + \overline{v^2}^{\,j}} \right]   \\
@@ -360,11 +360,11 @@
 %--------------------------------------------------------------------------------------------------------------
 \subsection{Vertical advection term (\protect\mdl{dynzad}) }
-\label{DYN_zad}
+\label{subsec:DYN_zad}
 
 The discrete formulation of the vertical advection, together with the formulation 
 chosen for the gradient of kinetic energy (KE) term, 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 Appendix~\ref{Apdx_C}).
-\begin{equation} \label{Eq_dynzad}
+balanced by the change of KE due to the gradient of KE (see \autoref{apdx:C}).
+\begin{equation} \label{eq:dynzad}
 \left\{ 		\begin{aligned}
 -\frac{1} {e_{1u}\,e_{2u}\,e_{3u}} &\ \overline{\ \overline{ e_{1t}\,e_{2t}\;w } ^{\,i+1/2}  \;\delta _{k+1/2} \left[ u \right]\  }^{\,k}  \\
@@ -377,5 +377,5 @@
 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 \S\ref{TRA_adv_tvd}).
+an option which is only available with a TVD scheme (see \np{ln\_traadv\_tvd\_zts} in \autoref{subsec:TRA_adv_tvd}).
 
 
@@ -384,5 +384,5 @@
 % ================================================================
 \section{Coriolis and advection: flux form}
-\label{DYN_adv_cor_flux}
+\label{sec:DYN_adv_cor_flux}
 %------------------------------------------nam_dynadv----------------------------------------------------
 \forfile{../namelists/namdyn_adv} 
@@ -394,5 +394,5 @@
 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 Chap.\ref{LBC}.
+are applied following \autoref{chap:LBC}.
 
 
@@ -401,10 +401,10 @@
 %--------------------------------------------------------------------------------------------------------------
 \subsection{Coriolis plus curvature metric terms (\protect\mdl{dynvor}) }
-\label{DYN_cor_flux}
+\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: 
-\begin{multline} \label{Eq_dyncor_metric}
+\begin{multline} \label{eq:dyncor_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]  
@@ -412,7 +412,7 @@
 \end{multline} 
 
-Any of the (\ref{Eq_dynvor_ens}), (\ref{Eq_dynvor_ene}) and (\ref{Eq_dynvor_een}) 
+Any of the (\autoref{eq:dynvor_ens}), (\autoref{eq:dynvor_ene}) and (\autoref{eq:dynvor_een}) 
 schemes can be used to compute the product of the Coriolis parameter and the 
-vorticity. However, the energy-conserving scheme  (\ref{Eq_dynvor_een}) has 
+vorticity. However, the energy-conserving scheme  (\autoref{eq:dynvor_een}) has 
 exclusively been used to date. This term is evaluated using a leapfrog scheme, 
 $i.e.$ the velocity is centred in time (\textit{now} velocity).
@@ -422,8 +422,8 @@
 %--------------------------------------------------------------------------------------------------------------
 \subsection{Flux form advection term (\protect\mdl{dynadv}) }
-\label{DYN_adv_flux}
+\label{subsec:DYN_adv_flux}
 
 The discrete expression of the advection term is given by :
-\begin{equation} \label{Eq_dynadv}
+\begin{equation} \label{eq:dynadv}
 \left\{ 
 \begin{aligned}
@@ -454,9 +454,9 @@
 %-------------------------------------------------------------
 \subsubsection{CEN2: $2^{nd}$ order centred scheme (\protect\np{ln\_dynadv\_cen2}\forcode{ = .true.})}
-\label{DYN_adv_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}
+\begin{equation} \label{eq:dynadv_cen2}
 \left\{ 		\begin{aligned}
  u_T^{cen2} &=\overline u^{i }       \quad &  u_F^{cen2} &=\overline u^{j+1/2}  \quad &  u_{uw}^{cen2} &=\overline u^{k+1/2}   \\
@@ -475,10 +475,10 @@
 %-------------------------------------------------------------
 \subsubsection{UBS: Upstream Biased Scheme (\protect\np{ln\_dynadv\_ubs}\forcode{ = .true.})}
-\label{DYN_adv_ubs}
+\label{subsec:DYN_adv_ubs}
 
 The UBS advection scheme is an upstream biased third order scheme based on 
 an upstream-biased parabolic interpolation. For example, the evaluation of 
 $u_T^{ubs} $ is done as follows:
-\begin{equation} \label{Eq_dynadv_ubs}
+\begin{equation} \label{eq:dynadv_ubs}
 u_T^{ubs} =\overline u ^i-\;\frac{1}{6} 	\begin{cases}
 		u"_{i-1/2}& 	\text{if $\ \overline{e_{2u}\,e_{3u} \ u}^i  \geqslant 0$ } 	\\
@@ -498,9 +498,9 @@
 The UBS scheme is not used in all directions. In the vertical, the centred $2^{nd}$ 
 order evaluation of the advection is preferred, $i.e.$ $u_{uw}^{ubs}$ and 
-$u_{vw}^{ubs}$ in \eqref{Eq_dynadv_cen2} are used. UBS is diffusive and is 
+$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 
 sentence:Since vertical mixing of momentum is a source term of the TKE equation...  }
 
-For stability reasons,  the first term in (\ref{Eq_dynadv_ubs}), which corresponds 
+For stability reasons, the first term in (\autoref{eq:dynadv_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, 
@@ -510,5 +510,5 @@
 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 
-(\ref{Eq_dynadv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}. 
+(\autoref{eq:dynadv_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 the
@@ -526,5 +526,5 @@
 % ================================================================
 \section{Hydrostatic pressure gradient (\protect\mdl{dynhpg})}
-\label{DYN_hpg}
+\label{sec:DYN_hpg}
 %------------------------------------------nam_dynhpg---------------------------------------------------
 \forfile{../namelists/namdyn_hpg} 
@@ -547,5 +547,5 @@
 %--------------------------------------------------------------------------------------------------------------
 \subsection{Full step $Z$-coordinate (\protect\np{ln\_dynhpg\_zco}\forcode{ = .true.})}
-\label{DYN_hpg_zco}
+\label{subsec:DYN_hpg_zco}
 
 The hydrostatic pressure can be obtained by integrating the hydrostatic equation 
@@ -556,5 +556,5 @@
 
 for $k=km$ (surface layer, $jk=1$ in the code)
-\begin{equation} \label{Eq_dynhpg_zco_surf}
+\begin{equation} \label{eq:dynhpg_zco_surf}
 \left\{ \begin{aligned}
 					\left. \delta _{i+1/2} \left[  p^h 			 \right] \right|_{k=km} 
@@ -566,5 +566,5 @@
 
 for $1<k<km$ (interior layer)
-\begin{equation} \label{Eq_dynhpg_zco}
+\begin{equation} \label{eq:dynhpg_zco}
 \left\{ \begin{aligned}
 					\left. \delta _{i+1/2} \left[  p^h 			 \right] \right|_{k} 
@@ -577,8 +577,8 @@
 \end{equation} 
 
-Note that the $1/2$ factor in (\ref{Eq_dynhpg_zco_surf}) is adequate because of 
+Note that the $1/2$ factor in (\autoref{eq:dynhpg_zco_surf}) is adequate because of 
 the definition of $e_{3w}$ as the vertical derivative of the scale factor at the surface 
 level ($z=0$). Note also that in case of variable volume level (\key{vvl} defined), the 
-surface pressure gradient is included in \eqref{Eq_dynhpg_zco_surf} and \eqref{Eq_dynhpg_zco} 
+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}$.
 
@@ -587,5 +587,5 @@
 %--------------------------------------------------------------------------------------------------------------
 \subsection{Partial step $Z$-coordinate (\protect\np{ln\_dynhpg\_zps}\forcode{ = .true.})}
-\label{DYN_hpg_zps}
+\label{subsec:DYN_hpg_zps}
 
 With partial bottom cells, tracers in horizontally adjacent cells generally live at 
@@ -596,10 +596,10 @@
 Apart from this modification, the horizontal hydrostatic pressure gradient evaluated 
 in the $z$-coordinate with partial step is exactly as in the pure $z$-coordinate case. 
-As explained in detail in section \S\ref{TRA_zpshde}, the nonlinearity of pressure 
+As explained in detail in section \autoref{sec:TRA_zpshde}, the nonlinearity of pressure 
 effects in the equation of state is such that it is better to interpolate temperature and 
 salinity vertically before computing the density. Horizontal gradients of temperature 
 and salinity are needed for the TRA modules, which is the reason why the horizontal 
 gradients of density at the deepest model level are computed in module \mdl{zpsdhe} 
-located in the TRA directory and described in \S\ref{TRA_zpshde}.
+located in the TRA directory and described in \autoref{sec:TRA_zpshde}.
 
 %--------------------------------------------------------------------------------------------------------------
@@ -607,5 +607,5 @@
 %--------------------------------------------------------------------------------------------------------------
 \subsection{$S$- and $Z$-$S$-coordinates}
-\label{DYN_hpg_sco}
+\label{subsec:DYN_hpg_sco}
 
 Pressure gradient formulations in an $s$-coordinate have been the subject of a vast 
@@ -615,5 +615,5 @@
 
 $\bullet$ Traditional coding (see for example \citet{Madec_al_JPO96}: (\np{ln\_dynhpg\_sco}\forcode{ = .true.})
-\begin{equation} \label{Eq_dynhpg_sco}
+\begin{equation} \label{eq:dynhpg_sco}
 \left\{ \begin{aligned}
  - \frac{1}    					{\rho_o \, e_{1u}} \;	\delta _{i+1/2} \left[  p^h  \right] 
@@ -625,5 +625,5 @@
 
 Where the first term is the pressure gradient along coordinates, computed as in 
-\eqref{Eq_dynhpg_zco_surf} - \eqref{Eq_dynhpg_zco}, and $z_T$ is the depth of 
+\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 
 ($e_{3w}$).
@@ -637,5 +637,5 @@
 (\np{ln\_dynhpg\_djc}\forcode{ = .true.}) (currently disabled; under development)
 
-Note that expression \eqref{Eq_dynhpg_sco} is commonly used when the variable volume formulation is
+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
@@ -648,5 +648,5 @@
 
 \subsection{Ice shelf cavity}
-\label{DYN_hpg_isf}
+\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. If cavity opened (\np{ln\_isfcav}\forcode{ = .true.}) these 2 terms can be
@@ -658,5 +658,5 @@
 This top pressure is constant over time. A detailed description of this method is described in \citet{Losch2008}.\\
 
-$\bullet$ The ocean load is computed using the expression \eqref{Eq_dynhpg_sco} described in \ref{DYN_hpg_sco}. 
+$\bullet$ The ocean load is computed using the expression \autoref{eq:dynhpg_sco} described in \autoref{subsec:DYN_hpg_sco}. 
 
 %--------------------------------------------------------------------------------------------------------------
@@ -664,5 +664,5 @@
 %--------------------------------------------------------------------------------------------------------------
 \subsection{Time-scheme (\protect\np{ln\_dynhpg\_imp}\forcode{ = .true./.false.})}
-\label{DYN_hpg_imp}
+\label{subsec:DYN_hpg_imp}
 
 The default time differencing scheme used for the horizontal pressure gradient is 
@@ -680,5 +680,5 @@
 $\bullet$ leapfrog scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}):
 
-\begin{equation} \label{Eq_dynhpg_lf}
+\begin{equation} \label{eq:dynhpg_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]
@@ -686,17 +686,17 @@
 
 $\bullet$ semi-implicit scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}):
-\begin{equation} \label{Eq_dynhpg_imp}
+\begin{equation} \label{eq:dynhpg_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 \eqref{Eq_dynhpg_imp} is made possible without 
+The semi-implicit time scheme \autoref{eq:dynhpg_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 \eqref{Eq_dynhpg_imp} compared to that using the 
-standard leapfrog scheme \eqref{Eq_dynhpg_lf}. Note that \eqref{Eq_dynhpg_imp} 
+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 eliminate high 
-frequency IGWs. Obviously, when using \eqref{Eq_dynhpg_imp}, the doubling of 
+frequency IGWs. Obviously, when using \autoref{eq:dynhpg_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.
@@ -708,5 +708,5 @@
 compute the hydrostatic pressure gradient (whatever the formulation) is evaluated 
 as follows:
-\begin{equation} \label{Eq_rho_flt}
+\begin{equation} \label{eq:rho_flt}
 	\rho^t = \rho( \widetilde{T},\widetilde {S},z_t)
  \quad	  \text{with}	\quad 
@@ -722,5 +722,5 @@
 % ================================================================
 \section{Surface pressure gradient (\protect\mdl{dynspg})}
-\label{DYN_spg}
+\label{sec:DYN_spg}
 %-----------------------------------------nam_dynspg----------------------------------------------------
 \forfile{../namelists/namdyn_spg} 
@@ -730,13 +730,13 @@
 
 Options are defined through the \ngn{namdyn\_spg} namelist variables.
-The surface pressure gradient term is related to the representation of the free surface (\S\ref{PE_hor_pg}). 
+The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}). 
 The main distinction is between the fixed volume case (linear free surface) and the variable volume case 
-(nonlinear free surface, \key{vvl} is defined). In the linear free surface case (\S\ref{PE_free_surface}) 
+(nonlinear free surface, \key{vvl} is defined). In the linear free surface case (\autoref{subsec:PE_free_surface}) 
 the vertical scale factors $e_{3}$ are fixed in time, while they are time-dependent in the nonlinear case 
-(\S\ref{PE_free_surface}). 
+(\autoref{subsec:PE_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 \eqref{Eq_PE_flt}), 
+the filtered free surface, which is a modification of the continuous equations (see \autoref{eq:PE_flt}), 
 and the split-explicit free surface described below. 
 The extra term introduced in the filtered method is calculated implicitly, 
@@ -745,5 +745,5 @@
 
 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 (\S\ref{PE_hor_pg}). 
+the fast external gravity waves that are a solution of the analytical equation (\autoref{sec:PE_hor_pg}). 
 Three formulations are available, all controlled by a CPP key (ln\_dynspg\_xxx):
 an explicit formulation which requires a small time step ;
@@ -761,5 +761,5 @@
 %--------------------------------------------------------------------------------------------------------------
 \subsection{Explicit free surface (\protect\key{dynspg\_exp})}
-\label{DYN_spg_exp}
+\label{subsec:DYN_spg_exp}
 
 In the explicit free surface formulation (\key{dynspg\_exp} defined), the model time step 
@@ -767,5 +767,5 @@
 The surface pressure gradient, evaluated using a leap-frog scheme ($i.e.$ centered in time),
 is thus simply given by :
-\begin{equation} \label{Eq_dynspg_exp}
+\begin{equation} \label{eq:dynspg_exp}
 \left\{ \begin{aligned}
  - \frac{1}{e_{1u}\,\rho_o} \;	\delta _{i+1/2} \left[  \,\rho \,\eta\,  \right] 	\\
@@ -782,5 +782,5 @@
 %--------------------------------------------------------------------------------------------------------------
 \subsection{Split-explicit free surface (\protect\key{dynspg\_ts})}
-\label{DYN_spg_ts}
+\label{subsec:DYN_spg_ts}
 %------------------------------------------namsplit-----------------------------------------------------------
 %\forfile{../namelists/namsplit}
@@ -792,5 +792,5 @@
 equation and the associated barotropic velocity equations with a smaller time 
 step than $\rdt$, the time step used for the three dimensional prognostic 
-variables (Fig.~\ref{Fig_DYN_dynspg_ts}). 
+variables (\autoref{fig:DYN_dynspg_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: 
@@ -802,6 +802,6 @@
 %%%
 The barotropic mode solves the following equations:
-\begin{subequations} \label{Eq_BT}
-  \begin{equation}     \label{Eq_BT_dyn}
+\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} 
@@ -809,14 +809,14 @@
   \end{equation}
 
-  \begin{equation} \label{Eq_BT_ssh}
+  \begin{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
   \end{equation}
 \end{subequations}
-where $\rm {\overline{\bf 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 \eqref{Eq_BT_dyn} represents the bottom stress (see section \S\ref{ZDF_bfr}), 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). 
+where $\rm {\overline{\bf 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. 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). 
 
 %>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >
 \begin{figure}[!t]    \begin{center}
 \includegraphics[width=0.7\textwidth]{Fig_DYN_dynspg_ts}
-\caption{  \protect\label{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, 
@@ -827,12 +827,12 @@
 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: \np{ln\_bt\_fw}\forcode{ = .true.},  \np{ln\_bt\_av}\forcode{ = .true.}.
-b) Centred time integration: \np{ln\_bt\_fw}\forcode{ = .false.}, \np{ln\_bt\_av}\forcode{ = .true.}.
-c) Forward time integration with no time filtering (POM-like scheme): \np{ln\_bt\_fw}\forcode{ = .true.}, \np{ln\_bt\_av}\forcode{ = .false.}. }
+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}    \end{figure}
 %>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >
 
 In the default case (\np{ln\_bt\_fw}\forcode{ = .true.}), the external mode is integrated 
-between \textit{now} and  \textit{after} baroclinic time-steps (Fig.~\ref{Fig_DYN_dynspg_ts}a). To avoid aliasing of fast barotropic motions into three dimensional equations, time filtering is eventually applied on barotropic 
+between \textit{now} and  \textit{after} baroclinic time-steps (\autoref{fig:DYN_dynspg_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.}). 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. 
@@ -850,5 +850,5 @@
 at \textit{now} time step. This implies to change the traditional order of computations in \NEMO: most of momentum  
 trends (including the barotropic mode calculation) updated first, tracers' after. This \textit{de facto} makes semi-implicit hydrostatic 
-pressure gradient (see section \S\ref{DYN_hpg_imp}) and time splitting not compatible. 
+pressure gradient (see section \autoref{subsec:DYN_hpg_imp}) 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}). Consistency between the time averaged continuity equation and the time stepping of tracers is here the key to obtain exact conservation.
@@ -872,9 +872,9 @@
 scheme using the small barotropic time step $\rdt$. We have 
 
-\begin{equation} \label{DYN_spg_ts_eta}
+\begin{equation} \label{eq:DYN_spg_ts_eta}
 \eta^{(b)}(\tau,t_{n+1}) - \eta^{(b)}(\tau,t_{n+1}) (\tau,t_{n-1})
 	= 2 \rdt \left[-\nabla \cdot \textbf{U}^{(b)}(\tau,t_n) + \text{EMP}_w(\tau) \right] 
 \end{equation}
-\begin{multline} \label{DYN_spg_ts_u}
+\begin{multline} \label{eq:DYN_spg_ts_u}
 \textbf{U}^{(b)}(\tau,t_{n+1}) - \textbf{U}^{(b)}(\tau,t_{n-1})  \\
 	= 2\rdt \left[ - f \textbf{k} \times \textbf{U}^{(b)}(\tau,t_{n}) 
@@ -886,9 +886,9 @@
 and $U^{(b)}$ denotes the baroclinic time at which the vertically integrated forcing $\textbf{M}(\tau)$ (note that this forcing includes the surface freshwater forcing), the tracer fields, 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 
-\begin{equation} \label{DYN_spg_ts_t}
+\begin{equation} \label{eq:DYN_spg_ts_t}
 t_n=\tau+n\rdt   
 \end{equation}
 with $n$ an integer. The density scaled surface pressure is evaluated via 
-\begin{equation} \label{DYN_spg_ts_ps}
+\begin{equation} \label{eq:DYN_spg_ts_ps}
 p_s^{(b)}(\tau,t_{n}) = \begin{cases}
 	g \;\eta_s^{(b)}(\tau,t_{n}) \;\rho(\tau)_{k=1}) / \rho_o  &      \text{non-linear case} \\
@@ -897,5 +897,5 @@
 \end{equation}
 To get started, we assume the following initial conditions 
-\begin{equation} \label{DYN_spg_ts_eta}
+\begin{equation} \label{eq:DYN_spg_ts_eta}
 \begin{split}
 \eta^{(b)}(\tau,t_{n=0}) &= \overline{\eta^{(b)}(\tau)}
@@ -905,9 +905,9 @@
 \end{equation}
 with 
-\begin{equation} \label{DYN_spg_ts_etaF}
+\begin{equation} \label{eq:DYN_spg_ts_etaF}
  \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\rdt,t_{n})
 \end{equation}
 the time averaged surface height taken from the previous barotropic cycle. Likewise, 
-\begin{equation} \label{DYN_spg_ts_u}
+\begin{equation} \label{eq:DYN_spg_ts_u}
 \textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)}	\\
 \\
@@ -915,5 +915,5 @@
 \end{equation}
 with 
-\begin{equation} \label{DYN_spg_ts_u}
+\begin{equation} \label{eq:DYN_spg_ts_u}
  \overline{\textbf{U}^{(b)}(\tau)} 
  	= \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau-\rdt,t_{n})
@@ -922,5 +922,5 @@
 
 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$ 
-\begin{equation} \label{DYN_spg_ts_u}
+\begin{equation} \label{eq:DYN_spg_ts_u}
 \textbf{U}(\tau+\rdt) = \overline{\textbf{U}^{(b)}(\tau+\rdt)} 
  	= \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau,t_{n})
@@ -928,5 +928,5 @@
 The surface height on the new baroclinic time step is then determined via a baroclinic leap-frog using the following form 
 
-\begin{equation} \label{DYN_spg_ts_ssh}
+\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]  
 \end{equation}
@@ -935,15 +935,15 @@
  
 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 \ref{DYN_spg_ts_ssh}. We 
+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 its stability and reasonably good maintenance of 
-tracer conservation properties (see Section ??) 
-
-\begin{equation} \label{DYN_spg_ts_sshf}
+tracer conservation properties (see ??) 
+
+\begin{equation} \label{eq:DYN_spg_ts_sshf}
 \eta^{F}(\tau-\Delta) =  \overline{\eta^{(b)}(\tau)} 
 \end{equation}
 Another approach tried was 
 
-\begin{equation} \label{DYN_spg_ts_sshf2}
+\begin{equation} \label{eq:DYN_spg_ts_sshf2}
 \eta^{F}(\tau-\Delta) = \eta(\tau) 
 	+ (\alpha/2) \left[\overline{\eta^{(b)}}(\tau+\rdt)
@@ -953,5 +953,5 @@
 which is useful since it isolates all the time filtering aspects into the term multiplied 
 by $\alpha$. This isolation allows for an easy check that tracer conservation is exact when 
-eliminating tracer and surface height time filtering (see Section ?? for more complete discussion). However, in the general case with a non-zero $\alpha$, the filter \ref{DYN_spg_ts_sshf} was found to be more conservative, and so is recommended. 
+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. 
 
 }            %%end gm comment (copy of griffies book)
@@ -964,13 +964,13 @@
 %--------------------------------------------------------------------------------------------------------------
 \subsection{Filtered free surface (\protect\key{dynspg\_flt})}
-\label{DYN_spg_fltp}
+\label{subsec:DYN_spg_fltp}
 
 The filtered formulation follows the \citet{Roullet_Madec_JGR00} implementation. 
-The extra term introduced in the equations (see \S\ref{PE_free_surface}) is solved implicitly. 
-The elliptic solvers available in the code are documented in \S\ref{MISC}.
+The extra term introduced in the equations (see \autoref{subsec:PE_free_surface}) is solved implicitly. 
+The elliptic solvers available in the code are documented in \autoref{chap:MISC}.
 
 %% gm %%======>>>>   given here the discrete eqs provided to the solver
 \gmcomment{               %%% copy from chap-model basics 
-\begin{equation} \label{Eq_spg_flt}
+\begin{equation} \label{eq:spg_flt}
 \frac{\partial {\rm {\bf U}}_h }{\partial t}= {\rm {\bf M}}
 - g \nabla \left( \tilde{\rho} \ \eta \right) 
@@ -980,5 +980,5 @@
 $\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 \eqref{Eq_PE_dyn}.
+non-linear and viscous terms in \autoref{eq:PE_dyn}.
 }   %end gmcomment
 
@@ -990,5 +990,5 @@
 % ================================================================
 \section{Lateral diffusion term and operators (\protect\mdl{dynldf})}
-\label{DYN_ldf}
+\label{sec:DYN_ldf}
 %------------------------------------------nam_dynldf----------------------------------------------------
 \forfile{../namelists/namdyn_ldf} 
@@ -999,12 +999,12 @@
 (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 (Chap.\ref{LDF}). The lateral diffusion of momentum is 
+on lateral physics (\autoref{chap:LDF}). The lateral diffusion of momentum is 
 evaluated using a forward scheme, $i.e.$ 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 \S\ref{STP}) 
+implicitly together with the vertical diffusion term (see \autoref{chap:STP}) 
 
 At the lateral boundaries either free slip, no slip or partial slip boundary 
-conditions are applied according to the user's choice (see Chap.\ref{LBC}).
+conditions are applied according to the user's choice (see \autoref{chap:LBC}).
 
 \gmcomment{
@@ -1025,8 +1025,8 @@
 \subsection[Iso-level laplacian (\protect\np{ln\_dynldf\_lap}\forcode{ = .true.})]
 				{Iso-level laplacian operator (\protect\np{ln\_dynldf\_lap}\forcode{ = .true.})}
-\label{DYN_ldf_lap}
+\label{subsec:DYN_ldf_lap}
 
 For lateral iso-level diffusion, the discrete operator is: 
-\begin{equation} \label{Eq_dynldf_lap}
+\begin{equation} \label{eq:dynldf_lap}
 \left\{ \begin{aligned}
  D_u^{l{\rm {\bf U}}} =\frac{1}{e_{1u} }\delta _{i+1/2} \left[ {A_T^{lm} 
@@ -1040,5 +1040,5 @@
 \end{equation} 
 
-As explained in \S\ref{PE_ldf}, this formulation (as the gradient of a divergence 
+As explained in \autoref{subsec:PE_ldf}, this formulation (as the gradient of a divergence 
 and curl of the vorticity) preserves symmetry and ensures a complete 
 separation between the vorticity and divergence parts of the momentum diffusion. 
@@ -1049,5 +1049,5 @@
 \subsection[Rotated laplacian (\protect\np{ln\_dynldf\_iso}\forcode{ = .true.})]
 				{Rotated laplacian operator (\protect\np{ln\_dynldf\_iso}\forcode{ = .true.})}
-\label{DYN_ldf_iso}
+\label{subsec:DYN_ldf_iso}
 
 A rotation of the lateral momentum diffusion operator is needed in several cases: 
@@ -1061,5 +1061,5 @@
 constraints on the stress tensor such as symmetry. The resulting discrete 
 representation is:
-\begin{equation} \label{Eq_dyn_ldf_iso}
+\begin{equation} \label{eq:dyn_ldf_iso}
 \begin{split}
  D_u^{l\textbf{U}} &= \frac{1}{e_{1u} \, e_{2u} \, e_{3u} }	\\
@@ -1111,5 +1111,5 @@
 diffusion operator acts and the surface of computation ($z$- or $s$-surfaces). 
 The way these slopes are evaluated is given in the lateral physics chapter 
-(Chap.\ref{LDF}).
+(\autoref{chap:LDF}).
 
 %--------------------------------------------------------------------------------------------------------------
@@ -1118,11 +1118,11 @@
 \subsection[Iso-level bilaplacian (\protect\np{ln\_dynldf\_bilap}\forcode{ = .true.})]
 				{Iso-level bilaplacian operator (\protect\np{ln\_dynldf\_bilap}\forcode{ = .true.})}
-\label{DYN_ldf_bilap}
+\label{subsec:DYN_ldf_bilap}
 
 The lateral fourth order operator formulation on momentum is obtained by 
-applying \eqref{Eq_dynldf_lap} twice. It requires an additional assumption on 
+applying \autoref{eq:dynldf_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 Chap.\ref{LBC}).
+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}
@@ -1133,5 +1133,5 @@
 % ================================================================
 \section{Vertical diffusion term (\protect\mdl{dynzdf})}
-\label{DYN_zdf}
+\label{sec:DYN_zdf}
 %----------------------------------------------namzdf------------------------------------------------------
 \forfile{../namelists/namzdf} 
@@ -1145,11 +1145,11 @@
 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 \S\ref{STP}). Note that namelist variables 
+(\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. 
 
 The formulation of the vertical subgrid scale physics is the same whatever 
 the vertical coordinate is. The vertical diffusion operators given by 
-\eqref{Eq_PE_zdf} take the following semi-discrete space form:
-\begin{equation} \label{Eq_dynzdf}
+\autoref{eq:PE_zdf} take the following semi-discrete space form:
+\begin{equation} \label{eq:dynzdf}
 \left\{   \begin{aligned}
 D_u^{vm} &\equiv \frac{1}{e_{3u}} \ \delta _k \left[ \frac{A_{uw}^{vm} }{e_{3uw} }
@@ -1162,10 +1162,10 @@
 where $A_{uw}^{vm} $ and $A_{vw}^{vm} $ are the vertical eddy viscosity and 
 diffusivity coefficients. The way these coefficients are evaluated 
-depends on the vertical physics used (see \S\ref{ZDF}).
+depends on the vertical physics used (see \autoref{chap:ZDF}).
 
 The surface boundary condition on momentum is the stress exerted by 
 the wind. At the surface, the momentum fluxes are prescribed as the boundary 
 condition on the vertical turbulent momentum fluxes,
-\begin{equation} \label{Eq_dynzdf_sbc}
+\begin{equation} \label{eq:dynzdf_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 }
@@ -1177,8 +1177,8 @@
 is small (when no mixed layer scheme is used) the surface stress enters only 
 the top model level, as a body force. The surface wind stress is calculated 
-in the surface module routines (SBC, see Chap.\ref{SBC})
+in the surface module routines (SBC, see \autoref{chap:SBC})
 
 The turbulent flux of momentum at the bottom of the ocean is specified through 
-a bottom friction parameterisation (see \S\ref{ZDF_bfr})
+a bottom friction parameterisation (see \autoref{sec:ZDF_bfr})
 
 % ================================================================
@@ -1186,5 +1186,5 @@
 % ================================================================
 \section{External forcings}
-\label{DYN_forcing}
+\label{sec:DYN_forcing}
 
 Besides the surface and bottom stresses (see the above section) which are 
@@ -1192,8 +1192,8 @@
 may enter the dynamical equations by affecting the surface pressure gradient. 
 
-(1) When \np{ln\_apr\_dyn}\forcode{ = .true.} (see \S\ref{SBC_apr}), the atmospheric pressure is taken 
+(1) When \np{ln\_apr\_dyn}\forcode{ = .true.} (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 \S\ref{SBC_tide}), 
+(2) When \np{ln\_tide\_pot}\forcode{ = .true.} and \np{ln\_tide}\forcode{ = .true.} (see \autoref{sec:SBC_tide}), 
 the tidal potential is taken into account when computing the surface pressure gradient.
 
@@ -1209,5 +1209,5 @@
 % ================================================================
 \section{Time evolution term (\protect\mdl{dynnxt})}
-\label{DYN_nxt}
+\label{sec:DYN_nxt}
 
 %----------------------------------------------namdom----------------------------------------------------
@@ -1218,11 +1218,11 @@
 The general framework for dynamics time stepping is a leap-frog scheme, 
 $i.e.$ a three level centred time scheme associated with an Asselin time filter 
-(cf. Chap.\ref{STP}). The scheme is applied to the velocity, except when using 
-the flux form of momentum advection (cf. \S\ref{DYN_adv_cor_flux}) in the variable 
+(cf. \autoref{chap:STP}). The scheme is applied to the velocity, except when using 
+the flux form of momentum advection (cf. \autoref{sec:DYN_adv_cor_flux}) in the variable 
 volume case (\key{vvl} defined), where it has to be applied to the thickness 
-weighted velocity (see \S\ref{Apdx_A_momentum})  
+weighted velocity (see \autoref{sec:A_momentum})  
 
 $\bullet$ vector invariant form or linear free surface (\np{ln\_dynhpg\_vec}\forcode{ = .true.} ; \key{vvl} not defined):
-\begin{equation} \label{Eq_dynnxt_vec}
+\begin{equation} \label{eq:dynnxt_vec}
 \left\{   \begin{aligned}
 &u^{t+\rdt} = u_f^{t-\rdt} + 2\rdt  \ \text{RHS}_u^t  	\\
@@ -1232,5 +1232,5 @@
 
 $\bullet$ flux form and nonlinear free surface (\np{ln\_dynhpg\_vec}\forcode{ = .false.} ; \key{vvl} defined):
-\begin{equation} \label{Eq_dynnxt_flux}
+\begin{equation} \label{eq:dynnxt_flux}
 \left\{   \begin{aligned}
 &\left(e_{3u}\,u\right)^{t+\rdt} = \left(e_{3u}\,u\right)_f^{t-\rdt} + 2\rdt \; e_{3u} \;\text{RHS}_u^t  	\\
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_LBC.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_LBC.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_LBC.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Lateral Boundary Condition (LBC)}
-\label{LBC}
+\label{chap:LBC}
 \minitoc
 
@@ -18,12 +18,12 @@
 % ================================================================
 \section{Boundary condition at the coast (\protect\np{rn\_shlat})}
-\label{LBC_coast}
+\label{sec:LBC_coast}
 %--------------------------------------------nam_lbc-------------------------------------------------------
 \forfile{../namelists/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 \S\ref{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, i.e. 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 \S\ref{DOM_msk}.
+%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, i.e. 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.
@@ -44,5 +44,5 @@
 at $u$-points. Evaluating this quantity as,
 
-\begin{equation} \label{Eq_lbc_aaaa}
+\begin{equation} \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,10 +51,10 @@
 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) (Fig.~\ref{Fig_LBC_uv}). 
+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}
+\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}   \end{figure}
@@ -66,5 +66,5 @@
 For example, at a given $T$-level, the lateral boundary (a coastline or an intersection 
 with the bottom topography) is made of segments joining $f$-points, and normal 
-velocity points are located between two $f-$points (Fig.~\ref{Fig_LBC_uv}). 
+velocity points are located between two $f-$points (\autoref{fig:LBC_uv}). 
 The boundary condition on the normal velocity (no flux through solid boundaries) 
 can thus be easily implemented using the mask system. The boundary condition 
@@ -79,5 +79,5 @@
 \begin{figure}[!p] \begin{center}
 \includegraphics[width=0.90\textwidth]{Fig_LBC_shlat}
-\caption{     \protect\label{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$). 
@@ -91,5 +91,5 @@
 coastline is equal to the offshore velocity, $i.e.$ 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 (Fig.~\ref{Fig_LBC_shlat}-a).
+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 
@@ -98,5 +98,5 @@
 evaluated as if the velocities at the closest land velocity gridpoint and the closest 
 ocean velocity gridpoint were of the same magnitude but in the opposite direction 
-(Fig.~\ref{Fig_LBC_shlat}-b). Therefore, the vorticity along the coastlines is given by: 
+(\autoref{fig:LBC_shlat}-b). Therefore, the vorticity along the coastlines is given by: 
 
 \begin{equation*}
@@ -106,5 +106,5 @@
 the coastline provides a vorticity field computed with the no-slip boundary condition, 
 simply by multiplying it by the mask$_{f}$ :
-\begin{equation} \label{Eq_lbc_bbbb}
+\begin{equation} \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]} 
@@ -115,9 +115,9 @@
 velocity at the coastline is smaller than the offshore velocity, $i.e.$ there is a lateral 
 friction but not strong enough to make the tangential velocity at the coast vanish 
-(Fig.~\ref{Fig_LBC_shlat}-c). This can be selected by providing a value of mask$_{f}$ 
+(\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 be smaller than half the grid size (Fig.~\ref{Fig_LBC_shlat}-d). 
+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.
 
@@ -134,5 +134,5 @@
 % ================================================================
 \section{Model domain boundary condition (\protect\np{jperio})}
-\label{LBC_jperio}
+\label{sec:LBC_jperio}
 
 At the model domain boundaries several choices are offered: closed, cyclic east-west, 
@@ -144,5 +144,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Closed, cyclic, south symmetric (\protect\np{jperio}\forcode{= 0..2})}
-\label{LBC_jperio012}
+\label{subsec:LBC_jperio012}
 
 The choice of closed, cyclic or symmetric model domain boundary condition is made 
@@ -160,5 +160,5 @@
 \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 the value of the last-but-one column 
-and the last column to the value of the second one (Fig.~\ref{Fig_LBC_jperio}-a). 
+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. Note that there is no option for north-south cyclic or for doubly 
@@ -171,5 +171,5 @@
 to the value of the third row while for most of $v$- and $f$-point arrays ($v$, $\zeta$, 
 $j\psi$, but \gmcomment{not sure why this is "but"} scalar arrays such as eddy coefficients) 
-the first row is set to minus the value of the second row (Fig.~\ref{Fig_LBC_jperio}-b). 
+the first row is set to minus the value of the second row (\autoref{fig:LBC_jperio}-b). 
 Note that this boundary condition is not yet available for the case of a massively 
 parallel computer (\textbf{key{\_}mpp} defined).
@@ -180,5 +180,5 @@
 \begin{figure}[!t]     \begin{center}
 \includegraphics[width=1.0\textwidth]{Fig_LBC_jperio}
-\caption{    \protect\label{Fig_LBC_jperio}
+\caption{    \protect\label{fig:LBC_jperio}
 setting of (a) east-west cyclic  (b) symmetric across the equator boundary conditions.}
 \end{center}   \end{figure}
@@ -189,9 +189,9 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{North-fold (\protect\np{jperio}\forcode{ = 3..6})}
-\label{LBC_north_fold}
+\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 
-(Fig.\ref{Fig_MISC_ORCA_msh}, and thus requires a specific treatment illustrated in Fig.\ref{Fig_North_Fold_T}. 
+(\autoref{fig:MISC_ORCA_msh}, and thus requires a specific treatment illustrated in \autoref{fig:North_Fold_T}. 
 Further information can be found in \mdl{lbcnfd} module which applies the north fold boundary condition.
 
@@ -199,5 +199,5 @@
 \begin{figure}[!t]    \begin{center}
 \includegraphics[width=0.90\textwidth]{Fig_North_Fold_T}
-\caption{    \protect\label{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 
@@ -210,5 +210,5 @@
 % ====================================================================
 \section{Exchange with neighbouring processors (\protect\mdl{lbclnk}, \protect\mdl{lib\_mpp})}
-\label{LBC_mpp}
+\label{sec:LBC_mpp}
 
 For massively parallel processing (mpp), a domain decomposition method is used. 
@@ -261,5 +261,5 @@
 \begin{figure}[!t]    \begin{center}
 \includegraphics[width=0.90\textwidth]{Fig_mpp}
-\caption{   \protect\label{Fig_mpp} 
+\caption{   \protect\label{fig:mpp} 
 Positioning of a sub-domain when massively parallel processing is used. }
 \end{center}   \end{figure}
@@ -279,5 +279,5 @@
 \begin{eqnarray} 
       jpi & = & ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci  \nonumber \\
-      jpj & = & ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj  \label{Eq_lbc_jpi}
+      jpj & = & ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj  \label{eq:lbc_jpi}
 \end{eqnarray}
 where \jp{jpni}, \jp{jpnj} are the number of processors following the i- and j-axis.
@@ -287,5 +287,5 @@
 An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$, 
 a global array (whole domain) by the relationship: 
-\begin{equation} \label{Eq_lbc_nimpp}
+\begin{equation} \label{eq:lbc_nimpp}
 T_{g} (i+nimpp-1,j+njmpp-1,k) = T_{l} (i,j,k),
 \end{equation}
@@ -315,5 +315,5 @@
 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 (Fig. \ref{Fig_mppini2})
+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 
@@ -335,5 +335,5 @@
 \begin{figure}[!ht]     \begin{center}
 \includegraphics[width=0.90\textwidth]{Fig_mppini2}
-\caption {    \protect\label{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. 
@@ -350,5 +350,5 @@
 % ====================================================================
 \section{Unstructured open boundary conditions (BDY)}
-\label{LBC_bdy}
+\label{sec:LBC_bdy}
 
 %-----------------------------------------nambdy--------------------------------------------
@@ -384,5 +384,5 @@
 %----------------------------------------------
 \subsection{Namelists}
-\label{BDY_namelist}
+\label{subsec:BDY_namelist}
 
 The BDY module is activated by setting \np{ln\_bdy} to true.
@@ -400,5 +400,5 @@
 a file and the second is defined in a namelist. For more details of
 the definition of the boundary geometry see section
-\ref{BDY_geometry}.
+\autoref{subsec:BDY_geometry}.
 
 For each boundary set a boundary
@@ -457,5 +457,5 @@
 %----------------------------------------------
 \subsection{Flow relaxation scheme}
-\label{BDY_FRS_scheme}
+\label{subsec:BDY_FRS_scheme}
 
 The Flow Relaxation Scheme (FRS) \citep{Davies_QJRMS76,Engerdahl_Tel95},
@@ -463,5 +463,5 @@
 externally-specified values over a zone next to the edge of the model
 domain. Given a model prognostic variable $\Phi$ 
-\begin{equation}  \label{Eq_bdy_frs1}
+\begin{equation}  \label{eq:bdy_frs1}
 \Phi(d) = \alpha(d)\Phi_{e}(d) + (1-\alpha(d))\Phi_{m}(d)\;\;\;\;\; d=1,N
 \end{equation}
@@ -472,10 +472,10 @@
 to adding a relaxation term to the prognostic equation for $\Phi$ of
 the form:
-\begin{equation}  \label{Eq_bdy_frs2}
+\begin{equation}  \label{eq:bdy_frs2}
 -\frac{1}{\tau}\left(\Phi - \Phi_{e}\right)
 \end{equation}
 where the relaxation time scale $\tau$ is given by a function of
 $\alpha$ and the model time step $\Delta t$:
-\begin{equation}  \label{Eq_bdy_frs3}
+\begin{equation}  \label{eq:bdy_frs3}
 \tau = \frac{1-\alpha}{\alpha}  \,\rdt
 \end{equation}
@@ -487,5 +487,5 @@
 
 The function $\alpha$ is specified as a $tanh$ function:
-\begin{equation}  \label{Eq_bdy_frs4}
+\begin{equation}  \label{eq:bdy_frs4}
 \alpha(d) = 1 - \tanh\left(\frac{d-1}{2}\right),       \quad d=1,N
 \end{equation}
@@ -495,9 +495,9 @@
 %----------------------------------------------
 \subsection{Flather radiation scheme}
-\label{BDY_flather_scheme}
+\label{subsec: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}
+\begin{equation}  \label{eq:bdy_fla1}
 U = U_{e} + \frac{c}{h}\left(\eta - \eta_{e}\right),
 \end{equation}
@@ -510,5 +510,5 @@
 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 \eqref{Eq_bdy_fla1}
+Note that the sea-surface height gradient in \autoref{eq:bdy_fla1}
 is a spatial gradient across the model boundary, so that $\eta_{e}$ is
 defined on the $T$ points with $nbr=1$ and $\eta$ is defined on the
@@ -518,5 +518,5 @@
 %----------------------------------------------
 \subsection{Boundary geometry}
-\label{BDY_geometry}
+\label{subsec:BDY_geometry}
 
 Each open boundary set is defined as a list of points. The information
@@ -529,5 +529,5 @@
 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 \ref{Fig_LBC_bdy_geom} shows an example of an irregular
+grids. Figure \autoref{fig:LBC_bdy_geom} shows an example of an irregular
 boundary. 
 
@@ -545,5 +545,5 @@
 
 The boundary geometry may also be defined from a
-``\ifile{coordinates.bdy}'' file. Figure \ref{Fig_LBC_nc_header}
+``\ifile{coordinates.bdy}'' file. Figure \autoref{fig:LBC_nc_header}
 gives an example of the header information from such a file. The file
 should contain the index arrays for each of the $T$, $U$ and $V$
@@ -566,5 +566,5 @@
 \begin{figure}[!t]      \begin{center}
 \includegraphics[width=1.0\textwidth]{Fig_LBC_bdy_geom}
-\caption {      \protect\label{Fig_LBC_bdy_geom}
+\caption {      \protect\label{fig:LBC_bdy_geom}
 Example of geometry of unstructured open boundary}
 \end{center}   \end{figure}
@@ -573,5 +573,5 @@
 %----------------------------------------------
 \subsection{Input boundary data files}
-\label{BDY_data}
+\label{subsec:BDY_data}
 
 The data files contain the data arrays
@@ -607,6 +607,6 @@
 \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 \ifile{coordinates.bdy} file}
+\caption {     \protect\label{fig:LBC_nc_header} 
+Example of the header for a \protect\ifile{coordinates.bdy} file}
 \end{center}   \end{figure}
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -614,5 +614,5 @@
 %----------------------------------------------
 \subsection{Volume correction}
-\label{BDY_vol_corr}
+\label{subsec:BDY_vol_corr}
 
 There is an option to force the total volume in the regional model to be constant, 
@@ -631,5 +631,5 @@
 %----------------------------------------------
 \subsection{Tidal harmonic forcing}
-\label{BDY_tides}
+\label{subsec:BDY_tides}
 
 %-----------------------------------------nambdy_tide--------------------------------------------
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_LDF.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_LDF.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_LDF.tex	(revision 9407)
@@ -6,5 +6,5 @@
 % ================================================================
 \chapter{Lateral Ocean Physics (LDF)}
-\label{LDF}
+\label{chap:LDF}
 \minitoc
 
@@ -15,6 +15,6 @@
 
 The lateral physics terms in the momentum and tracer equations have been 
-described in \S\ref{PE_zdf} and their discrete formulation in \S\ref{TRA_ldf} 
-and \S\ref{DYN_ldf}). In this section we further discuss each lateral physics option. 
+described in \autoref{eq:PE_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. 
 Choosing one lateral physics scheme means for the user defining, 
 (1) the type of operator used (laplacian or bilaplacian operators, or no lateral mixing term) ; 
@@ -25,5 +25,5 @@
 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\ref{sec:triad}
+\np{traldf\_grif}\forcode{ = .true.}, is described in Appdx\autoref{apdx:triad}
 
 %-----------------------------------nam_traldf - nam_dynldf--------------------------------------------
@@ -37,5 +37,5 @@
 % ================================================================
 \section{Direction of lateral mixing (\protect\mdl{ldfslp})}
-\label{LDF_slp}
+\label{sec:LDF_slp}
 
 %%%
@@ -50,5 +50,5 @@
 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 \eqref{Eq_tra_ldf_iso}), while 
+$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$. 
@@ -60,5 +60,5 @@
 In $s$-coordinates, geopotential mixing ($i.e.$ horizontal mixing) $r_1$ and 
 $r_2$ are the slopes between the geopotential and computational surfaces. 
-Their discrete formulation is found by locally solving \eqref{Eq_tra_ldf_iso} 
+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, $i.e.$ a linear function of $z_T$, the 
@@ -66,5 +66,5 @@
 %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}
+\begin{equation} \label{eq:ldfslp_geo}
 \begin{aligned}
  r_{1u} &= \frac{e_{3u}}{ \left( e_{1u}\;\overline{\overline{e_{3w}}}^{\,i+1/2,\,k} \right)}
@@ -91,14 +91,14 @@
 
 \subsection{Slopes for tracer iso-neutral mixing}
-\label{LDF_slp_iso}
+\label{subsec:LDF_slp_iso}
 In iso-neutral mixing  $r_1$ and $r_2$ are the slopes between the iso-neutral 
 and computational surfaces. 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 ($i.e.$ $in situ$ density) 
-vanish. So, substituting $T$ by $\rho$ in \eqref{Eq_tra_ldf_iso} and setting the 
+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}
+\begin{equation} \label{eq:ldfslp_iso}
 \begin{split}
  r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac{\delta_{i+1/2}[\rho]}
@@ -120,35 +120,35 @@
 
 %gm% rewrite this as the explanation is not very clear !!!
-%In practice, \eqref{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 \eqref{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 \eqref{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  \eqref{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. 
+%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 
-\eqref{Eq_ldfslp_iso} has to be evaluated at the same local pressure (which, 
+\autoref{eq:ldfslp_iso} has to be evaluated at the same local pressure (which, 
 in decibars, is approximated by the depth in meters in the model). Therefore 
-\eqref{Eq_ldfslp_iso} cannot be used as such, but further transformation is 
+\autoref{eq:ldfslp_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 \eqref{Eq_ldfslp_iso} the densities 
+\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, 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 \S\ref{TRA_bn2}). 
+\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, the \emph{horizontal} density gradient 
-is evaluated as described in \S\ref{TRA_zpshde}.
+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 \ref{sec:triad}). 
+Griffies scheme is used (\np{traldf\_grif}\forcode{ = .true.}; see Appdx \autoref{apdx:triad}). 
 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 \eqref{Eq_ldfslp_iso} 
+of state, the evaluation of $i$ and $j$ derivatives in \autoref{eq:ldfslp_iso} 
 will include a pressure dependent part, leading to the wrong evaluation of 
 the neutral slopes.
@@ -168,5 +168,5 @@
 This constraint leads to the following definition for the slopes:
 
-\begin{equation} \label{Eq_ldfslp_iso2}
+\begin{equation} \label{eq:ldfslp_iso2}
 \begin{split}
  r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac
@@ -193,5 +193,5 @@
 \end{equation}
 where $\alpha$ and $\beta$, the thermal expansion and saline contraction 
-coefficients introduced in \S\ref{TRA_bn2}, have to be evaluated at the three 
+coefficients introduced in \autoref{subsec:TRA_bn2}, have to be evaluated at the three 
 velocity points. In order to save computation time, they should be approximated 
 by the mean of their values at $T$-points (for example in the case of $\alpha$:  
@@ -212,9 +212,9 @@
 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 \ref{sec:triad}. Here,
+\np{traldf\_grif\_iso} is set true; see Appdx \autoref{apdx:triad}. Here,
 another strategy is presented \citep{Lazar_PhD97}: a local
 filtering of the iso-neutral slopes (made on 9 grid-points) prevents
 the development of grid point noise generated by the iso-neutral
-diffusion operator (Fig.~\ref{Fig_LDF_ZDF1}). This allows an
+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
@@ -231,5 +231,5 @@
 \begin{figure}[!ht]      \begin{center}
 \includegraphics[width=0.70\textwidth]{Fig_LDF_ZDF1}
-\caption {    \protect\label{Fig_LDF_ZDF1}
+\caption {    \protect\label{fig:LDF_ZDF1}
 averaging procedure for isopycnal slope computation.}
 \end{center}    \end{figure}
@@ -259,5 +259,5 @@
 \begin{figure}[!ht]     \begin{center}
 \includegraphics[width=0.70\textwidth]{Fig_eiv_slp}
-\caption {     \protect\label{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, 
@@ -280,12 +280,12 @@
 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 
-\eqref{Eq_dyn_ldf_iso} in section~\ref{DYN_ldf_iso}). The slopes between the 
+\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, $i.e.$ 
-\eqref{Eq_ldfslp_geo} and \eqref{Eq_ldfslp_iso} :
-
-\begin{equation} \label{Eq_ldfslp_dyn}
+\autoref{eq:ldfslp_geo} and \autoref{eq:ldfslp_iso} :
+
+\begin{equation} \label{eq:ldfslp_dyn}
 \begin{aligned}
 &r_{1t}\ \ = \overline{r_{1u}}^{\,i}       &&&    r_{1f}\ \ &= \overline{r_{1u}}^{\,i+1/2} \\
@@ -300,5 +300,5 @@
 diffusion along model level surfaces, i.e. using the shear computed along 
 the model levels and with no additional friction at the ocean bottom (see 
-\S\ref{LBC_coast}).
+\autoref{sec:LBC_coast}).
 
 
@@ -307,5 +307,5 @@
 % ================================================================
 \section{Lateral mixing operators (\protect\mdl{traldf}, \protect\mdl{traldf}) }
-\label{LDF_op}
+\label{sec:LDF_op}
 
 
@@ -315,5 +315,5 @@
 % ================================================================
 \section{Lateral mixing coefficient (\protect\mdl{ldftra}, \protect\mdl{ldfdyn}) }
-\label{LDF_coef}
+\label{sec:LDF_coef}
 
 Introducing a space variation in the lateral eddy mixing coefficients changes 
@@ -362,5 +362,5 @@
 By default the horizontal variation of the eddy coefficient depends on the local mesh 
 size and the type of operator used:
-\begin{equation} \label{Eq_title}
+\begin{equation} \label{eq:title}
   A_l = \left\{     
    \begin{aligned}
@@ -378,5 +378,5 @@
 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 \S\ref{STP_forward_imp}), especially when using a bilaplacian operator.
+grid size (see \autoref{sec:STP_forward_imp}), especially when using a bilaplacian operator.
 
 Other formulations can be introduced by the user for a given configuration. 
@@ -411,5 +411,5 @@
 (1) the momentum diffusion operator acting along model level surfaces is 
 written in terms of curl and divergent components of the horizontal current 
-(see \S\ref{PE_ldf}). Although the eddy coefficient could be set to different values 
+(see \autoref{subsec:PE_ldf}). Although the eddy coefficient could be set to different values 
 in these two terms, this option is not currently available. 
 
@@ -417,5 +417,5 @@
 on enstrophy and on the square of the horizontal divergence for operators 
 acting along model-surfaces are no longer satisfied 
-(Appendix~\ref{Apdx_dynldf_properties}).
+(\autoref{sec:dynldf_properties}).
 
 (3) for isopycnal diffusion on momentum or tracers, an additional purely 
@@ -425,5 +425,5 @@
 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 \S\ref{LDF_slp}).
+spurious diapycnal diffusion (see \autoref{sec:LDF_slp}).
 
 (4) when an eddy induced advection term is used (\key{traldf\_eiv}), $A^{eiv}$, 
@@ -438,5 +438,5 @@
 (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 \ref{DYN_adv_ubs}) 
+scheme on momentum (\np{ln\_dynadv\_ubs}\forcode{ = .true.}, see \autoref{subsec:DYN_adv_ubs}) 
 and can be useful for testing purposes.
 
@@ -445,15 +445,15 @@
 % ================================================================
 \section{Eddy induced velocity (\protect\mdl{traadv\_eiv}, \protect\mdl{ldfeiv})}
-\label{LDF_eiv}
+\label{sec:LDF_eiv}
 
 %%gm  from Triad appendix  : to be incorporated....
 \gmcomment{
 Values of iso-neutral diffusivity and GM coefficient are set as
-described in \S\ref{LDF_coef}. If none of the keys \key{traldf\_cNd},
+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}. If 2D-varying coefficients are set with
 \key{traldf\_c2d} then $A_l$ is reduced in proportion with horizontal
-scale factor according to \eqref{Eq_title} \footnote{Except in global ORCA
+scale factor according to \autoref{eq:title} \footnote{Except in global ORCA
   $0.5^{\circ}$ runs with \key{traldf\_eiv}, where
   $A_l$ is set like $A_e$ but with a minimum vale of
@@ -472,7 +472,7 @@
 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, $i.e.$ 
-\eqref{Eq_ldfslp_geo} is used in $z$-coordinates, and the sum \eqref{Eq_ldfslp_geo}  
-+ \eqref{Eq_ldfslp_iso} in $s$-coordinates. The eddy induced velocity is given by: 
-\begin{equation} \label{Eq_ldfeiv}
+\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}
 \begin{split}
  u^* & = \frac{1}{e_{2u}e_{3u}}\; \delta_k \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right]\\
@@ -487,5 +487,5 @@
 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 \S\ref{TRA_adv}) and not just the $2^{nd}$ order advection 
+the tracers (see \autoref{sec:TRA_adv}) and not just the $2^{nd}$ order advection 
 scheme as in previous releases of OPA \citep{Madec1998}. This is particularly 
 useful for passive tracers where \emph{positivity} of the advection scheme is 
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_OBS.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_OBS.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_OBS.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Observation and Model Comparison (OBS)}
-\label{OBS}
+\label{chap:OBS}
 
 Authors: D. Lea, M. Martin, K. Mogensen, A. Vidard, A. Weaver, A. Ryan, ...   % do we keep that ?
@@ -42,11 +42,11 @@
 details on setting up the namelist.
 
-Section~\ref{OBS_example} introduces a test example of the observation operator code including
-where to obtain data and how to setup the namelist. Section~\ref{OBS_details} introduces some
+\autoref{sec:OBS_example} introduces a test example of the observation operator code 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. Section~\ref{OBS_theory} introduces some of the theoretical aspects of the observation
+namelist. \autoref{sec:OBS_theory} introduces some of the theoretical aspects of the observation
 operator including interpolation methods and running on multiple processors.
-Section~\ref{OBS_ooo} describes the offline observation operator code.
-Section~\ref{OBS_obsutils} introduces some utilities to help working with the files
+\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.
 
@@ -55,5 +55,5 @@
 % ================================================================
 \section{Running the observation operator code example}
-\label{OBS_example}
+\label{sec:OBS_example}
 
 This section describes an example of running the observation operator code using
@@ -99,13 +99,13 @@
 Setting \np{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~\ref{OBS_parallel}).
+observations located within the model subdomain (see section~\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~\ref{OBS_obsutils}.
+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~\ref{OBS_obsutils}.
+described in section~\autoref{sec:OBS_obsutils}.
 
 \section{Technical details (feedback type observation file headers)}
-\label{OBS_details}
+\label{sec:OBS_details}
 
 Here we show a more complete example namelist  \ngn{namobs} and also show the NetCDF headers
@@ -545,5 +545,5 @@
 
 \section{Theoretical details}
-\label{OBS_theory}
+\label{sec:OBS_theory}
 
 \subsection{Horizontal interpolation and averaging methods}
@@ -683,5 +683,5 @@
 \end{itemize}
 
-Examples of the weights calculated for an observation with rectangular and radial footprints are shown in Figs.~\ref{fig:obsavgrec} and~\ref{fig:obsavgrad}.
+Examples of the weights calculated for an observation with rectangular and radial footprints are shown in Figs.~\autoref{fig:obsavgrec} and~\autoref{fig:obsavgrad}.
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -768,5 +768,5 @@
 
 \subsection{Parallel aspects of horizontal interpolation}
-\label{OBS_parallel}
+\label{subsec:OBS_parallel}
 
 For horizontal interpolation, there is the basic problem that the
@@ -794,5 +794,5 @@
 
 This is the simplest option in which the observations are distributed according 
-to the domain of the grid-point parallelization. Figure~\ref{fig:obslocal}
+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
@@ -823,9 +823,9 @@
 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. Figure~\ref{fig:obsglobal}
+is to distribute them using a round-robin scheme. \autoref{fig:obsglobal}
 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 Fig.~\ref{fig:obslocal}.
+with ORCA2 for the same input data as in \autoref{fig:obslocal}.
 The observations are now clearly randomly distributed on the globe.
 In order to be able to perform horizontal interpolation in this case, 
@@ -850,5 +850,5 @@
 
 \section{Offline observation operator}
-\label{OBS_ooo}
+\label{sec:OBS_ooo}
 
 \subsection{Concept}
@@ -1183,5 +1183,5 @@
 
 \section{Observation utilities}
-\label{OBS_obsutils}
+\label{sec:OBS_obsutils}
 
 Some tools for viewing and processing of observation and feedback files are provided in the
@@ -1354,5 +1354,5 @@
 \end{minted}
 
-Fig~\ref{fig:obsdataplotmain} shows the main window which is launched when dataplot starts.
+\autoref{fig:obsdataplotmain} 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. Areas - zooms into prespecified regions; plot - plots the data as a
@@ -1389,5 +1389,5 @@
 
 If a profile point is clicked with the mouse button a plot of the observation and background
-values as a function of depth (Fig~\ref{fig:obsdataplotprofile}).
+values as a function of depth (\autoref{fig:obsdataplotprofile}).
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_SBC.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_SBC.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_SBC.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Surface Boundary Condition (SBC, ISF, ICB) }
-\label{SBC}
+\label{chap:SBC}
 \minitoc
 
@@ -40,5 +40,5 @@
 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 model points 
-(so called "Interpolation on the Fly", see \S\ref{SBC_iof}).
+(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 large sea-land gradients characterize
@@ -65,6 +65,6 @@
 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 \S\ref{ICB_icebergs}), which act as drifting sources of fresh water.
-Another example of modification is that due to the ice shelf melting/freezing (see \S\ref{SBC_isf}), 
+One of these is modification by icebergs (see \autoref{sec:ICB_icebergs}), which act as drifting sources of fresh water.
+Another example of modification is that due to the ice shelf melting/freezing (see \autoref{sec:SBC_isf}), 
 which provides additional sources of fresh water.
 
@@ -74,9 +74,9 @@
 % ================================================================
 \section{Surface boundary condition for the ocean}
-\label{SBC_general}
+\label{sec:SBC_general}
 
 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 \eqref{Eq_dynzdf_sbc} in \S\ref{DYN_zdf}).
+computation of the momentum vertical mixing trend (see \autoref{eq:dynzdf_sbc} in \autoref{sec:DYN_zdf}).
 As such, it has to be provided as a 2D vector interpolated 
 onto the horizontal velocity ocean mesh, $i.e.$ resolved onto the model 
@@ -88,10 +88,10 @@
 plus the heat content of the mass exchange with the atmosphere 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 \eqref{Eq_tra_sbc} 
-and \eqref{Eq_tra_sbc_lin} in \S\ref{TRA_sbc}). 
+the first level temperature time evolution equation (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.}.
 The way the light penetrates inside the water column is generally a sum of decreasing 
-exponentials (see \S\ref{TRA_qsr}). 
+exponentials (see \autoref{subsec:TRA_qsr}). 
 
 The surface freshwater budget is provided by the \textit{emp} field.
@@ -130,5 +130,5 @@
 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 (\ref{Tab_ssm}), 
+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.
@@ -144,5 +144,5 @@
 Sea surface salinty					& sss\_m	& $psu$			& T \\	\hline
 \end{tabular}
-\caption{  \protect\label{Tab_ssm}   
+\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, 
@@ -158,5 +158,5 @@
 % ================================================================
 \section{Input data generic interface}
-\label{SBC_input}
+\label{sec:SBC_input}
 
 A generic interface has been introduced to manage the way input data (2D or 3D fields, 
@@ -181,6 +181,6 @@
 
 The only constraints are that the input file is a NetCDF file, the file name follows a nomenclature 
-(see \S\ref{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 \S\ref{SBC_iof}).
+(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 
@@ -193,5 +193,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Input data specification (\protect\mdl{fldread})}
-\label{SBC_fldread}
+\label{subsec:SBC_fldread}
 
 The structure associated with an input variable contains the following information:
@@ -205,5 +205,5 @@
 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.\ref{Tab_fldread} provides the resulting file name in all possible cases according to whether 
+Tab.\autoref{tab:fldread} provides the resulting file name in all possible cases according to whether 
 it is a climatological file or not, and to the open/close frequency (see below for definition). 
 
@@ -218,5 +218,5 @@
 \end{tabular}
 \end{center}
-\caption{ \protect\label{Tab_fldread}   naming nomenclature for climatological or interannual input file, 
+\caption{ \protect\label{tab:fldread}   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 ($i.e.$ 'sun','sat','fri','thu','wed','tue','mon'). The 'YYYY', 'MM' and 'DD' should be replaced by the 
@@ -259,5 +259,5 @@
 
 \item[Others]: 'weights filename', 'pairing rotation' and 'land/sea mask' are associted with on-the-fly interpolation 
-which is described in \S\ref{SBC_iof}.
+which is described in \autoref{subsec:SBC_iof}.
 
 \end{description}
@@ -301,5 +301,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Interpolation on-the-fly}
-\label{SBC_iof}
+\label{subsec:SBC_iof}
 
 Interpolation on the Fly allows the user to supply input files required
@@ -325,5 +325,5 @@
 
 \subsubsection{Bilinear interpolation}
-\label{SBC_iof_bilinear}
+\label{subsec:SBC_iof_bilinear}
 
 The input weights file in this case has two sets of variables: src01, src02,
@@ -347,5 +347,5 @@
 
 \subsubsection{Bicubic interpolation}
-\label{SBC_iof_bicubic}
+\label{subsec:SBC_iof_bicubic}
 
 Again there are two sets of variables: "src" and "wgt".
@@ -363,5 +363,5 @@
 
 \subsubsection{Implementation}
-\label{SBC_iof_imp}
+\label{subsec:SBC_iof_imp}
 
 To activate this option, a non-empty string should be supplied in the weights filename column 
@@ -398,5 +398,5 @@
 
 \subsubsection{Limitations}
-\label{SBC_iof_lim}
+\label{subsec:SBC_iof_lim}
 
 \begin{enumerate}  
@@ -412,5 +412,5 @@
 
 \subsubsection{Utilities}
-\label{SBC_iof_util}
+\label{subsec:SBC_iof_util}
 
 % to be completed
@@ -422,5 +422,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Standalone surface boundary condition scheme}
-\label{SAS_iof}
+\label{subsec:SAS_iof}
 
 %---------------------------------------namsbc_ana--------------------------------------------------
@@ -482,5 +482,5 @@
 % ================================================================
 \section{Analytical formulation (\protect\mdl{sbcana})}
-\label{SBC_ana}
+\label{sec:SBC_ana}
 
 %---------------------------------------namsbc_ana--------------------------------------------------
@@ -506,5 +506,5 @@
 % ================================================================
 \section{Flux formulation (\protect\mdl{sbcflx})}
-\label{SBC_flx}
+\label{sec:SBC_flx}
 %------------------------------------------namsbc_flx----------------------------------------------------
 \forfile{../namelists/namsbc_flx} 
@@ -516,8 +516,8 @@
 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. See \S\ref{SBC_fldread} for a more detailed description of the parameters.
+for this field. See \autoref{subsec:SBC_fldread} for a more detailed description of the parameters.
 
 Note that in general, a flux formulation is used in associated with a 
-restoring term to observed SST and/or SSS. See \S\ref{SBC_ssr} for its 
+restoring term to observed SST and/or SSS. See \autoref{subsec:SBC_ssr} for its 
 specification.
 
@@ -528,5 +528,5 @@
 \section[Bulk formulation {(\textit{sbcblk\{\_core,\_clio,\_mfs\}.F90})}]
 			{Bulk formulation {(\protect\mdl{sbcblk\_core}, \protect\mdl{sbcblk\_clio}, \protect\mdl{sbcblk\_mfs})}}
-\label{SBC_blk}
+\label{sec:SBC_blk}
 
 In the bulk formulation, the surface boundary condition fields are computed 
@@ -545,5 +545,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{CORE formulea (\protect\mdl{sbcblk\_core}, \protect\np{ln\_core}\forcode{ = .true.})}
-\label{SBC_blk_core}
+\label{subsec:SBC_blk_core}
 %------------------------------------------namsbc_core----------------------------------------------------
 %\forfile{../namelists/namsbc_core}
@@ -566,5 +566,5 @@
 
 %--------------------------------------------------TABLE--------------------------------------------------
-\begin{table}[htbp]   \label{Tab_CORE}
+\begin{table}[htbp]   \label{tab:CORE}
 \begin{center}
 \begin{tabular}{|l|c|c|c|}
@@ -609,5 +609,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{CLIO formulea (\protect\mdl{sbcblk\_clio}, \protect\np{ln\_clio}\forcode{ = .true.})}
-\label{SBC_blk_clio}
+\label{subsec:SBC_blk_clio}
 %------------------------------------------namsbc_clio----------------------------------------------------
 %\forfile{../namelists/namsbc_clio}
@@ -623,5 +623,5 @@
 
 %--------------------------------------------------TABLE--------------------------------------------------
-\begin{table}[htbp]   \label{Tab_CLIO}
+\begin{table}[htbp]   \label{tab:CLIO}
 \begin{center}
 \begin{tabular}{|l|l|l|l|}
@@ -643,5 +643,5 @@
 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 \S\ref{SBC_fldread}). 
+namelist (see \autoref{subsec:SBC_fldread}). 
 
 % -------------------------------------------------------------------------------------------------------------
@@ -649,5 +649,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{MFS formulea (\protect\mdl{sbcblk\_mfs}, \protect\np{ln\_mfs}\forcode{ = .true.})}
-\label{SBC_blk_mfs}
+\label{subsec:SBC_blk_mfs}
 %------------------------------------------namsbc_mfs----------------------------------------------------
 %\forfile{../namelists/namsbc_mfs}
@@ -687,5 +687,5 @@
 % ================================================================
 \section{Coupled formulation (\protect\mdl{sbccpl})}
-\label{SBC_cpl}
+\label{sec:SBC_cpl}
 %------------------------------------------namsbc_cpl----------------------------------------------------
 \forfile{../namelists/namsbc_cpl} 
@@ -725,5 +725,5 @@
 % ================================================================
 \section{Atmospheric pressure (\protect\mdl{sbcapr})}
-\label{SBC_apr}
+\label{sec:SBC_apr}
 %------------------------------------------namsbc_apr----------------------------------------------------
 \forfile{../namelists/namsbc_apr} 
@@ -737,5 +737,5 @@
 pressure is further transformed into an equivalent inverse barometer sea surface height, 
 $\eta_{ib}$, using:
-\begin{equation} \label{SBC_ssh_ib}
+\begin{equation} \label{eq:SBC_ssh_ib}
 	\eta_{ib} = -  \frac{1}{g\,\rho_o}  \left( P_{atm} - P_o \right) 
 \end{equation}
@@ -759,5 +759,5 @@
 % ================================================================
 \section{Tidal potential (\protect\mdl{sbctide})}
-\label{SBC_tide}
+\label{sec:SBC_tide}
 
 %------------------------------------------nam_tide---------------------------------------
@@ -814,5 +814,5 @@
 % ================================================================
 \section{River runoffs (\protect\mdl{sbcrnf})}
-\label{SBC_rnf}
+\label{sec:SBC_rnf}
 %------------------------------------------namsbc_rnf----------------------------------------------------
 \forfile{../namelists/namsbc_rnf} 
@@ -826,5 +826,5 @@
 %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 \S\ref{SBC_dcy}.}.
+%required to properly represent the diurnal cycle \citep{Bernie_al_JC05}. see also \autoref{fig:SBC_dcy}.}.
 
 
@@ -847,5 +847,5 @@
 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}. see also \S\ref{SBC_dcy}.}.
+required to properly represent the diurnal cycle \citep{Bernie_al_JC05}. see also \autoref{fig:SBC_dcy}.}.
 
 As such from V~3.3 onwards it is possible to add river runoff through a non-zero depth, and for the 
@@ -929,5 +929,5 @@
 % ================================================================
 \section{Ice shelf melting (\protect\mdl{sbcisf})}
-\label{SBC_isf}
+\label{sec:SBC_isf}
 %------------------------------------------namsbc_isf----------------------------------------------------
 \forfile{../namelists/namsbc_isf}
@@ -1006,9 +1006,9 @@
 The fw addition due to the ice shelf melting is, at each relevant depth level, added to the horizontal divergence 
 (\textit{hdivn}) in the subroutine \rou{sbc\_isf\_div}, called from \mdl{divcur}. 
-See the runoff section \ref{SBC_rnf} for all the details about the divergence correction. 
+See the runoff section \autoref{sec:SBC_rnf} for all the details about the divergence correction. 
 
 
 \section{Ice sheet coupling}
-\label{SBC_iscpl}
+\label{sec:SBC_iscpl}
 %------------------------------------------namsbc_iscpl----------------------------------------------------
 \forfile{../namelists/namsbc_iscpl}
@@ -1048,5 +1048,5 @@
 % ================================================================
 \section{Handling of icebergs (ICB)}
-\label{ICB_icebergs}
+\label{sec:ICB_icebergs}
 %------------------------------------------namberg----------------------------------------------------
 \forfile{../namelists/namberg}
@@ -1113,5 +1113,5 @@
 % ================================================================
 \section{Miscellaneous options}
-\label{SBC_misc}
+\label{sec:SBC_misc}
 
 % -------------------------------------------------------------------------------------------------------------
@@ -1119,5 +1119,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Diurnal cycle (\protect\mdl{sbcdcy})}
-\label{SBC_dcy}
+\label{subsec:SBC_dcy}
 %------------------------------------------namsbc_rnf----------------------------------------------------
 %\forfile{../namelists/namsbc} 
@@ -1127,5 +1127,5 @@
 \begin{figure}[!t]    \begin{center}
 \includegraphics[width=0.8\textwidth]{Fig_SBC_diurnal}
-\caption{ \protect\label{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 
@@ -1149,10 +1149,10 @@
 can be found in the appendix~A of \cite{Bernie_al_CD07}. The algorithm preserve the daily 
 mean incomming SWF as the reconstructed SWF at a given time step is the mean value 
-of the analytical cycle over this time step (Fig.\ref{Fig_SBC_diurnal}). 
+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 
 ($i.e.$ 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,
 that is  $\rdt \ nn\_fsbc < 10,800~s = 3~h$. An example of recontructed SWF 
-is given in Fig.\ref{Fig_SBC_dcy} for a 12 reconstructed diurnal cycle, one every 2~hours 
+is given in \autoref{fig:SBC_dcy} for a 12 reconstructed diurnal cycle, one every 2~hours 
 (from 1am to 11pm).
 
@@ -1160,5 +1160,5 @@
 \begin{figure}[!t]  \begin{center}
 \includegraphics[width=0.7\textwidth]{Fig_SBC_dcy}
-\caption{ \protect\label{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). 
@@ -1176,5 +1176,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Rotation of vector pairs onto the model grid directions}
-\label{SBC_rotation}
+\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, 
@@ -1195,5 +1195,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Surface restoring to observed SST and/or SSS (\protect\mdl{sbcssr})}
-\label{SBC_ssr}
+\label{subsec:SBC_ssr}
 %------------------------------------------namsbc_ssr----------------------------------------------------
 \forfile{../namelists/namsbc_ssr} 
@@ -1203,5 +1203,5 @@
 n forced mode using a flux formulation (\np{ln\_flx}\forcode{ = .true.}), a 
 feedback term \emph{must} be added to the surface heat flux $Q_{ns}^o$:
-\begin{equation} \label{Eq_sbc_dmp_q}
+\begin{equation} \label{eq:sbc_dmp_q}
 Q_{ns} = Q_{ns}^o + \frac{dQ}{dT} \left( \left. T \right|_{k=1} - SST_{Obs} \right)
 \end{equation}
@@ -1216,5 +1216,5 @@
 equivalent freshwater flux, it takes the following expression :
 
-\begin{equation} \label{Eq_sbc_dmp_emp}
+\begin{equation} \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}}
@@ -1226,5 +1226,5 @@
 $\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 \ref{Eq_sbc_dmp_emp} as the atmosphere 
+physical justification for the feedback term in \autoref{eq:sbc_dmp_emp} as the atmosphere 
 does not care about ocean surface salinity \citep{Madec1997}. The SSS restoring 
 term should be viewed as a flux correction on freshwater fluxes to reduce the 
@@ -1235,5 +1235,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Handling of ice-covered area  (\textit{sbcice\_...})}
-\label{SBC_ice-cover}
+\label{subsec:SBC_ice-cover}
 
 The presence at the sea surface of an ice covered area modifies all the fluxes 
@@ -1264,5 +1264,5 @@
 
 \subsection{Interface to CICE (\protect\mdl{sbcice\_cice})}
-\label{SBC_cice}
+\label{subsec:SBC_cice}
 
 It is now possible to couple a regional or global NEMO configuration (without AGRIF) to the CICE sea-ice
@@ -1291,5 +1291,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Freshwater budget control (\protect\mdl{sbcfwb})}
-\label{SBC_fwb}
+\label{subsec:SBC_fwb}
 
 For global ocean simulation it can be useful to introduce a control of the mean sea 
@@ -1313,5 +1313,5 @@
 \subsection[Neutral drag coeff. from external wave model (\protect\mdl{sbcwave})]
 				{Neutral drag coefficient from external wave model (\protect\mdl{sbcwave})}
-\label{SBC_wave}
+\label{subsec:SBC_wave}
 %------------------------------------------namwave----------------------------------------------------
 \forfile{../namelists/namsbc_wave}
@@ -1322,5 +1322,5 @@
 The \mdl{sbcwave} module containing the routine \np{sbc\_wave} reads the
 namelist \ngn{namsbc\_wave} (for external data names, locations, frequency, interpolation and all 
-the miscellanous options allowed by Input Data generic Interface see \S\ref{SBC_input}) 
+the miscellanous options allowed by Input Data generic Interface see \autoref{sec:SBC_input}) 
 and a 2D field of neutral drag coefficient. 
 Then using the routine TURB\_CORE\_1Z or TURB\_CORE\_2Z, and starting from the neutral drag coefficent provided, 
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_STO.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_STO.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_STO.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Stochastic Parametrization of EOS (STO)}
-\label{STO}
+\label{chap:STO}
 
 Authors: P.-A. Bouttier
@@ -39,5 +39,5 @@
 
 \section{Stochastic processes}
-\label{STO_the_details}
+\label{sec:STO_the_details}
 
 The starting point of our implementation of stochastic parameterizations
@@ -104,8 +104,8 @@
 \noindent
 In this way, higher order processes can be easily generated recursively using 
-the same piece of code implementing Eq.~(\ref{eq:autoreg}), 
+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 Eq.~(\ref{eq:ord2}) are computed so that this recursive application
-of Eq.~(\ref{eq:autoreg}) leads to processes with the required standard deviation
+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, with the additional condition that
 the $n-1$ first derivatives of the autocorrelation function
@@ -121,5 +121,5 @@
 
 \section{Implementation details}
-\label{STO_thech_details}
+\label{sec:STO_thech_details}
 
 %---------------------------------------namsbc--------------------------------------------------
@@ -135,10 +135,10 @@
                       (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 Eq~\ref{eq:sto_pert} and specific piece of code in the equation of state implementing Eq~\ref{eq:eos_sto}.
+ 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 Eq.~(\ref{eq:autoreg}),
+The first routine (\rou{sto\_par}) is a direct implementation of (\autoref{eq:autoreg}),
 applied at each model grid point (in 2D or 3D), 
 and called at each model time step ($k$) to update
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_TRA.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_TRA.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_TRA.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Ocean Tracers (TRA)}
-\label{TRA}
+\label{chap:TRA}
 \minitoc
 
@@ -17,5 +17,5 @@
 %$\ $\newline    % force a new ligne
 
-Using the representation described in Chap.~\ref{DOM}, several semi-discrete 
+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 
@@ -40,5 +40,5 @@
 require complex inputs and complex calculations ($e.g.$ bulk formulae, estimation 
 of mixing coefficients) that are carried out in the SBC, LDF and ZDF modules and 
-described in chapters \S\ref{SBC}, \S\ref{LDF} and  \S\ref{ZDF}, respectively. 
+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 NEMO/OPA/TRA directory as it directly modifies the tracer fields, 
@@ -57,5 +57,5 @@
 
 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 Chap.~\ref{DIA}.
+equation for output (\np{ln\_tra\_trd} or \np{ln\_tra\_mxl}\forcode{ = .true.}), as described in \autoref{chap:DIA}.
 
 $\ $\newline    % force a new ligne
@@ -64,5 +64,5 @@
 % ================================================================
 \section{Tracer advection (\protect\mdl{traadv})}
-\label{TRA_adv}
+\label{sec:TRA_adv}
 %------------------------------------------namtra_adv-----------------------------------------------------
 \forfile{../namelists/namtra_adv}
@@ -72,5 +72,5 @@
 the advection tendency of a tracer is expressed in flux form, 
 $i.e.$ as the divergence of the advective fluxes. Its discrete expression is given by :
-\begin{equation} \label{Eq_tra_adv}
+\begin{equation} \label{eq:tra_adv}
 ADV_\tau =-\frac{1}{b_t} \left( 
 \;\delta _i \left[ e_{2u}\,e_{3u} \;  u\; \tau _u  \right]
@@ -79,5 +79,5 @@
 \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 \eqref{Eq_tra_adv} 
+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 \left( \vect{U}\,T \right)=\vect{U} \cdot \nabla T$ 
@@ -87,10 +87,10 @@
 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 (\ref{Eq_tra_adv}) we recover the discrete form of 
+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[width=0.9\textwidth]{Fig_adv_scheme}
-\caption{	\protect\label{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 
@@ -107,5 +107,5 @@
 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 (Fig.~\ref{Fig_adv_scheme}). 
+velocity points (\autoref{fig:adv_scheme}). 
 
 Along solid lateral and bottom boundaries a zero tracer flux is automatically 
@@ -131,9 +131,9 @@
 height, two quantities that are not correlated \citep{Roullet_Madec_JGR00,Griffies_al_MWR01,Campin2004}.
 
-The velocity field that appears in (\ref{Eq_tra_adv}) and (\ref{Eq_tra_adv_zco}) 
+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, $i.e.$ the \textit{eulerian} velocity
-(see Chap.~\ref{DYN}) plus the eddy induced velocity (\textit{eiv}) 
+(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 Chap.~\ref{LDF}).
+when those parameterisations are used (see \autoref{chap:LDF}).
 
 Several tracer advection scheme are proposed, namely 
@@ -174,5 +174,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{CEN: Centred scheme (\protect\np{ln\_traadv\_cen}\forcode{ = .true.})}
-\label{TRA_adv_cen}
+\label{subsec:TRA_adv_cen}
 
 %        2nd order centred scheme  
@@ -186,5 +186,5 @@
 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}
+\begin{equation} \label{eq:tra_adv_cen2}
 \tau _u^{cen2} =\overline T ^{i+1/2}
 \end{equation}
@@ -195,8 +195,8 @@
 produce a sensible solution. The associated time-stepping is performed using 
 a leapfrog scheme in conjunction with an Asselin time-filter, so $T$ in 
-(\ref{Eq_tra_adv_cen2}) is the \textit{now} tracer value. 
+(\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 (\ref{Eq_tra_adv}) and (\ref{Eq_tra_adv_cen2}) 
+order accuracy since both (\autoref{eq:tra_adv}) and (\autoref{eq:tra_adv_cen2}) 
 have this order of accuracy.
 
@@ -206,5 +206,5 @@
 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}
+\begin{equation} \label{eq:tra_adv_cen4}
 \tau _u^{cen4} 
 =\overline{   T - \frac{1}{6}\,\delta _i \left[ \delta_{i+1/2}[T] \,\right]   }^{\,i+1/2}
@@ -219,5 +219,5 @@
 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 \eqref{Eq_tra_adv} is kept at $2^{nd}$ order. 
+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. 
@@ -232,5 +232,5 @@
 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 (\ref{Eq_tra_adv_cen4}) is the \textit{now} tracer.
+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), 
@@ -245,5 +245,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{FCT: Flux Corrected Transport scheme (\protect\np{ln\_traadv\_fct}\forcode{ = .true.})}
-\label{TRA_adv_tvd}
+\label{subsec:TRA_adv_tvd}
 
 The Flux Corrected Transport schemes (FCT) is used when \np{ln\_traadv\_fct}\forcode{ = .true.}. 
@@ -254,5 +254,5 @@
 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}
+\begin{equation} \label{eq:tra_adv_fct}
 \begin{split}
 \tau _u^{ups}&= \begin{cases}
@@ -280,7 +280,7 @@
 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 \S\ref{DYN_zad}).
-
-For stability reasons (see \S\ref{STP}), $\tau _u^{cen}$ is evaluated in (\ref{Eq_tra_adv_fct}) 
+(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 $\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 
@@ -291,5 +291,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{MUSCL: Monotone Upstream Scheme for Conservative Laws (\protect\np{ln\_traadv\_mus}\forcode{ = .true.})}
-\label{TRA_adv_mus}
+\label{subsec:TRA_adv_mus}
 
 The Monotone Upstream Scheme for Conservative Laws (MUSCL) is used when \np{ln\_traadv\_mus}\forcode{ = .true.}. 
@@ -298,6 +298,6 @@
 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 
-(Fig.\ref{Fig_adv_scheme}). For example, in the $i$-direction :
-\begin{equation} \label{Eq_tra_adv_mus}
+(\autoref{fig:adv_scheme}). For example, in the $i$-direction :
+\begin{equation} \label{eq:tra_adv_mus}
    \tau _u^{mus} = \left\{      \begin{aligned}
          &\tau _i  &+ \frac{1}{2} \;\left( 1-\frac{u_{i+1/2} \;\rdt}{e_{1u}} \right)
@@ -323,5 +323,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{UBS a.k.a. UP3: Upstream-Biased Scheme (\protect\np{ln\_traadv\_ubs}\forcode{ = .true.})}
-\label{TRA_adv_ubs}
+\label{subsec:TRA_adv_ubs}
 
 The Upstream-Biased Scheme (UBS) is used when \np{ln\_traadv\_ubs}\forcode{ = .true.}. 
@@ -332,5 +332,5 @@
 third order scheme based on an upstream-biased parabolic interpolation.  
 For example, in the $i$-direction :
-\begin{equation} \label{Eq_tra_adv_ubs}
+\begin{equation} \label{eq:tra_adv_ubs}
    \tau _u^{ubs} =\overline T ^{i+1/2}-\;\frac{1}{6} \left\{      
    \begin{aligned}
@@ -355,6 +355,6 @@
 or a $4^th$ order COMPACT scheme (\np{nn\_cen\_v}\forcode{ = 2 or 4}).
 
-For stability reasons  (see \S\ref{STP}),
-the first term  in \eqref{Eq_tra_adv_ubs} (which corresponds to a second order 
+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), is 
@@ -362,5 +362,5 @@
 This choice is discussed by \citet{Webb_al_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 \eqref{Eq_tra_adv_ubs} 
+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}. 
 This option is not available through a namelist parameter, since the 
@@ -368,6 +368,6 @@
 substitution in the \mdl{traadv\_ubs} module and obtain a QUICK scheme.
 
-Note that it is straightforward to rewrite \eqref{Eq_tra_adv_ubs} as follows:
-\begin{equation} \label{Eq_traadv_ubs2}
+Note that it is straightforward to rewrite \autoref{eq:tra_adv_ubs} as follows:
+\begin{equation} \label{eq:traadv_ubs2}
 \tau _u^{ubs} = \tau _u^{cen4} + \frac{1}{12} \left\{	 
    \begin{aligned}
@@ -377,5 +377,5 @@
 \end{equation}
 or equivalently 
-\begin{equation} \label{Eq_traadv_ubs2b}
+\begin{equation} \label{eq:traadv_ubs2b}
 u_{i+1/2} \ \tau _u^{ubs} 
 =u_{i+1/2} \ \overline{ T - \frac{1}{6}\,\delta _i\left[ \delta_{i+1/2}[T] \,\right] }^{\,i+1/2}
@@ -383,13 +383,13 @@
 \end{equation}
 
-\eqref{Eq_traadv_ubs2} has several advantages. Firstly, it clearly reveals 
+\autoref{eq:traadv_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 \emph{now} time step using \eqref{Eq_tra_adv_ubs}. 
+to be evaluated at the \emph{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 \eqref{Eq_tra_adv_ubs}.
+the computationally more efficient formulation \autoref{eq:tra_adv_ubs}.
 
 % -------------------------------------------------------------------------------------------------------------
@@ -397,5 +397,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{QCK: QuiCKest scheme (\protect\np{ln\_traadv\_qck}\forcode{ = .true.})}
-\label{TRA_adv_qck}
+\label{subsec:TRA_adv_qck}
 
 The Quadratic Upstream Interpolation for Convective Kinematics with 
@@ -423,5 +423,5 @@
 % ================================================================
 \section{Tracer lateral diffusion (\protect\mdl{traldf})}
-\label{TRA_ldf}
+\label{sec:TRA_ldf}
 %-----------------------------------------nam_traldf------------------------------------------------------
 \forfile{../namelists/namtra_ldf}
@@ -434,12 +434,12 @@
 $(iii)$ some specific options related to the rotated operators ($i.e.$ 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 Chap.\ref{LDF} .
+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.
-The slope is computed in the \mdl{ldfslp} module and will also be described in Chap.~\ref{LDF}. 
+The slope is computed in the \mdl{ldfslp} module and will also be described in \autoref{chap:LDF}. 
 
 The lateral diffusion of tracers is evaluated using a forward scheme, 
 $i.e.$ 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 \S\ref{STP}). 
+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}.
@@ -450,5 +450,5 @@
 \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}) } 
-\label{TRA_ldf_op}
+\label{subsec:TRA_ldf_op}
 
 Three operator options are proposed and, one and only one of them must be selected:
@@ -459,11 +459,11 @@
 \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 $, 
-where the gradient operates along the selected direction (see \S\ref{TRA_ldf_dir}),
-and $A_{ht}$ is the eddy diffusivity coefficient expressed in $m^2/s$ (see Chap.~\ref{LDF}).
+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. This biharmonic operator 
 takes the following expression:  
 $\mathpzc{B}=- \mathpzc{L}\left(\mathpzc{L}(T) \right) = -\nabla \cdot b\nabla \left( {\nabla \cdot b\nabla T} \right)$ 
 where the gradient operats along the selected direction,
-and $b^2=B_{ht}$ is the eddy diffusivity coefficient expressed in $m^4/s$  (see Chap.~\ref{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}
@@ -483,5 +483,5 @@
 \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}) } 
-\label{TRA_ldf_dir}
+\label{subsec:TRA_ldf_dir}
 
 The choice of a direction of action determines the form of operator used. 
@@ -509,8 +509,8 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Iso-level (bi-)laplacian operator ( \protect\np{ln\_traldf\_iso}) }
-\label{TRA_ldf_lev}
+\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}
+\begin{equation} \label{eq:tra_ldf_lap}
 D_t^{lT} =\frac{1}{b_t} \left( \;
    \delta _{i}\left[ A_u^{lT} \; \frac{e_{2u}\,e_{3u}}{e_{1u}} \;\delta _{i+1/2} [T] \right] 
@@ -533,7 +533,7 @@
 Note that in the partial step $z$-coordinate (\np{ln\_zps}\forcode{ = .true.}), tracers in horizontally 
 adjacent cells are located at different depths in the vicinity of the bottom. 
-In this case, horizontal derivatives in (\ref{Eq_tra_ldf_lap}) at the bottom level 
+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 \S\ref{TRA_zpshde}.
+described in \autoref{sec:TRA_zpshde}.
 
 
@@ -542,13 +542,13 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Standard and triad (bi-)laplacian operator}
-\label{TRA_ldf_iso_triad}
+\label{subsec:TRA_ldf_iso_triad}
 
 %&&    Standard rotated (bi-)laplacian operator
 %&& ----------------------------------------------
 \subsubsection{Standard rotated (bi-)laplacian operator (\protect\mdl{traldf\_iso})}
-\label{TRA_ldf_iso}
+\label{subsec:TRA_ldf_iso}
 The general form of the second order lateral tracer subgrid scale physics 
-(\ref{Eq_PE_zdf}) takes the following semi-discrete space form in $z$- and $s$-coordinates:
-\begin{equation} \label{Eq_tra_ldf_iso}
+(\autoref{eq:PE_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}   & \left\{   \,\;\delta_i \left[   A_u^{lT}  \left( 
@@ -576,12 +576,12 @@
 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 way these 
-slopes are evaluated is given in \S\ref{LDF_slp}. At the surface, bottom 
+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 \S\ref{LBC_coast}). 
-
-The operator in \eqref{Eq_tra_ldf_iso} involves both lateral and vertical 
+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 \S\ref{TRA_zdf}). For computer efficiency reasons, this term 
+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 
@@ -590,29 +590,29 @@
 This formulation conserves the tracer but does not ensure the decrease 
 of the tracer variance. Nevertheless the treatment performed on the slopes 
-(see \S\ref{LDF}) allows the model to run safely without any additional 
+(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 \eqref{Eq_tra_ldf_iso} require a specific treatment. 
-They are calculated in module zpshde, described in \S\ref{TRA_zpshde}.
+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})}
-\label{TRA_ldf_triad}
-
-If the Griffies triad scheme is employed (\np{ln\_traldf\_triad}\forcode{ = .true.} ; see App.\ref{sec: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 App.\ref{sec:triad}.
+the algorithm is given in \autoref{apdx:triad}.
 
 The lateral fourth order bilaplacian operator on tracers is obtained by 
-applying (\ref{Eq_tra_ldf_lap}) twice. The operator requires an additional assumption 
+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 (\ref{Eq_tra_ldf_iso}) twice. It requires an additional assumption 
+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. 
@@ -621,5 +621,5 @@
 %&& ----------------------------------------------
 \subsubsection{Option for the rotated operators}
-\label{TRA_ldf_options}
+\label{subsec:TRA_ldf_options}
 
 \np{ln\_traldf\_msc} = Method of Stabilizing Correction (both operators)
@@ -637,5 +637,5 @@
 % ================================================================
 \section{Tracer vertical diffusion (\protect\mdl{trazdf})}
-\label{TRA_zdf}
+\label{sec:TRA_zdf}
 %--------------------------------------------namzdf---------------------------------------------------------
 \forfile{../namelists/namzdf}
@@ -645,7 +645,7 @@
 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 (\ref{Eq_PE_zdf}) takes the 
+The vertical diffusion operator given by (\autoref{eq:PE_zdf}) takes the 
 following semi-discrete space form:
-\begin{equation} \label{Eq_tra_zdf}
+\begin{equation} \label{eq:tra_zdf}
 \begin{split}
 D^{vT}_T &= \frac{1}{e_{3t}} \; \delta_k \left[ \;\frac{A^{vT}_w}{e_{3w}}  \delta_{k+1/2}[T] \;\right] 
@@ -658,15 +658,15 @@
 $A_w^{vT}=A_w^{vS}$ except when double diffusive mixing is 
 parameterised ($i.e.$ \key{zdfddm} is defined). The way these coefficients 
-are evaluated is given in \S\ref{ZDF} (ZDF). Furthermore, when 
+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} }\ \left( {r_{1w} ^2+r_{2w} ^2} \right)$ 
-to account for the vertical second derivative of \eqref{Eq_tra_ldf_iso}. 
+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. At the surface they are prescribed 
-from the surface forcing and added in a dedicated routine (see \S\ref{TRA_sbc}), 
+from the surface forcing and added in a dedicated routine (see \autoref{subsec:TRA_sbc}), 
 whilst at the bottom they are set to zero for heat and salt unless 
 a geothermal flux forcing is prescribed as a bottom boundary 
-condition (see \S\ref{TRA_bbc}). 
+condition (see \autoref{subsec:TRA_bbc}). 
 
 The large eddy coefficient found in the mixed layer together with high 
@@ -684,5 +684,5 @@
 % ================================================================
 \section{External forcing}
-\label{TRA_sbc_qsr_bbc}
+\label{sec:TRA_sbc_qsr_bbc}
 
 % -------------------------------------------------------------------------------------------------------------
@@ -690,5 +690,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Surface boundary condition (\protect\mdl{trasbc})}
-\label{TRA_sbc}
+\label{subsec:TRA_sbc}
 
 The surface boundary condition for tracers is implemented in a separate 
@@ -703,13 +703,13 @@
 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 \S\ref{SBC} for further details).
+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 \S\ref{SBC}) provides the following 
+The surface module (\mdl{sbcmod}, see \autoref{chap:SBC}) provides the following 
 forcing fields (used on tracers):
 
 $\bullet$ $Q_{ns}$, the non-solar part of the net surface heat flux that crosses the sea surface 
 (i.e. the difference between the total surface heat flux and the fraction of the short wave flux that 
-penetrates into the water column, see \S\ref{TRA_qsr}) plus the heat content associated with 
+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.
 
@@ -720,11 +720,11 @@
 
 $\bullet$ \textit{rnf}, the mass flux associated with runoff 
-(see \S\ref{SBC_rnf} for further detail of how it acts on temperature and salinity tendencies)
+(see \autoref{sec:SBC_rnf} for further detail of how it acts on temperature and salinity tendencies)
 
 $\bullet$ \textit{fwfisf}, the mass flux associated with ice shelf melt, 
-(see \S\ref{SBC_isf} for further details on how the ice shelf melt is computed and applied).
+(see \autoref{sec:SBC_isf} for further details on how the ice shelf melt is computed and applied).
 
 The surface boundary condition on temperature and salinity is applied as follows:
-\begin{equation} \label{Eq_tra_sbc}
+\begin{equation} \label{eq:tra_sbc}
 \begin{aligned}
  &F^T = \frac{ 1 }{\rho _o \;C_p \,\left. e_{3t} \right|_{k=1} }  &\overline{ Q_{ns}       }^t  & \\ 
@@ -734,5 +734,5 @@
 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 \S\ref{STP}).
+divergence of odd and even time step (see \autoref{chap:STP}).
 
 In the linear free surface case (\np{ln\_linssh}\forcode{ = .true.}), 
@@ -742,5 +742,5 @@
 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{equation} \label{eq:tra_sbc_lin}
 \begin{aligned}
  &F^T = \frac{ 1 }{\rho _o \;C_p \,\left. e_{3t} \right|_{k=1} }   
@@ -754,5 +754,5 @@
 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 \S\ref{STP}).
+This is the reason why the modified filter is not applied in the linear free surface case (see \autoref{chap:STP}).
 
 % -------------------------------------------------------------------------------------------------------------
@@ -760,18 +760,18 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Solar radiation penetration (\protect\mdl{traqsr})}
-\label{TRA_qsr}
+\label{subsec:TRA_qsr}
 %--------------------------------------------namqsr--------------------------------------------------------
 \forfile{../namelists/namtra_qsr}
 %--------------------------------------------------------------------------------------------------------------
 
-Options are defined through the  \ngn{namtra\_qsr} namelist variables.
+Options are defined through the \ngn{namtra\_qsr} namelist variables.
 When the penetrative solar radiation option is used (\np{ln\_flxqsr}\forcode{ = .true.}), 
 the solar radiation penetrates the top few tens of meters of the ocean. If it is not used 
 (\np{ln\_flxqsr}\forcode{ = .false.}) all the heat flux is absorbed in the first ocean level. 
 Thus, in the former case a term is added to the time evolution equation of 
-temperature \eqref{Eq_PE_tra_T} and the surface boundary condition is 
+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}
+\begin{equation} \label{eq:PE_qsr}
 \begin{split}
 \frac{\partial T}{\partial t} &= {\ldots} + \frac{1}{\rho_o\, C_p \,e_3} \; \frac{\partial I}{\partial k}	\\
@@ -781,24 +781,24 @@
 where $Q_{sr}$ is the penetrative part of the surface heat flux ($i.e.$ the shortwave radiation) 
 and $I$ is the downward irradiance ($\left. I \right|_{z=\eta}=Q_{sr}$). 
-The additional term in \eqref{Eq_PE_qsr} is discretized as follows:
-\begin{equation} \label{Eq_tra_qsr}
+The additional term in \autoref{eq:PE_qsr} is discretized as follows:
+\begin{equation} \label{eq:tra_qsr}
 \frac{1}{\rho_o\, C_p \,e_3} \; \frac{\partial I}{\partial k} \equiv \frac{1}{\rho_o\, C_p\, e_{3t}} \delta_k \left[ I_w \right]
 \end{equation}
 
-The shortwave radiation,  $Q_{sr}$, consists of energy distributed across a wide spectral range. 
+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 
+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 namtra\_qsr namelist).
+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.}) 
+which formulation is chosen. In the simple 2-waveband light penetration scheme (\np{ln\_qsr\_2bd}\forcode{ = .true.}) 
 a chlorophyll-independent monochromatic formulation is chosen for the shorter wavelengths, 
-leading to the following expression  \citep{Paulson1977}:
-\begin{equation} \label{Eq_traqsr_iradiance}
+leading to the following expression \citep{Paulson1977}:
+\begin{equation} \label{eq:traqsr_iradiance}
 I(z) = Q_{sr} \left[Re^{-z / \xi_0} + \left( 1-R\right) e^{-z / \xi_1} \right]
 \end{equation}
@@ -810,5 +810,5 @@
 Such assumptions have been shown to provide a very crude and simplistic 
 representation of observed light penetration profiles (\cite{Morel_JGR88}, see also 
-Fig.\ref{Fig_traqsr_irradiance}). Light absorption in the ocean depends on 
+\autoref{fig:traqsr_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 a 61 waveband 
@@ -819,5 +819,5 @@
 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 Fig.\ref{Fig_traqsr_irradiance}, 
+the same power-law relationship. As shown in \autoref{fig:traqsr_irradiance}, 
 this formulation, called RGB (Red-Green-Blue), reproduces quite closely 
 the light penetration profiles predicted by the full spectal model, but with much greater 
@@ -842,5 +842,5 @@
 light limitation in PISCES or LOBSTER and the oceanic heating rate. 
 \end{description} 
-The trend in \eqref{Eq_tra_qsr} associated with the penetration of the solar radiation 
+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}. 
 
@@ -857,5 +857,5 @@
 \begin{figure}[!t] 	  \begin{center}
 \includegraphics[width=1.0\textwidth]{Fig_TRA_Irradiance}
-\caption{ 	 \protect\label{Fig_traqsr_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 
@@ -870,5 +870,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Bottom boundary condition (\protect\mdl{trabbc})}
-\label{TRA_bbc}
+\label{subsec:TRA_bbc}
 %--------------------------------------------nambbc--------------------------------------------------------
 \forfile{../namelists/nambbc}
@@ -877,5 +877,5 @@
 \begin{figure}[!t] 	  \begin{center}
 \includegraphics[width=1.0\textwidth]{Fig_TRA_geoth}
-\caption{ 	\protect\label{Fig_geothermal}
+\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}.}
@@ -902,5 +902,5 @@
 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 
-(Fig.\ref{Fig_geothermal}) \citep{Emile-Geay_Madec_OS09}.
+(\autoref{fig:geothermal}) \citep{Emile-Geay_Madec_OS09}.
 
 % ================================================================
@@ -908,5 +908,5 @@
 % ================================================================
 \section{Bottom boundary layer (\protect\mdl{trabbl} - \protect\key{trabbl})}
-\label{TRA_bbl}
+\label{sec:TRA_bbl}
 %--------------------------------------------nambbl---------------------------------------------------------
 \forfile{../namelists/nambbl}
@@ -943,9 +943,9 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Diffusive bottom boundary layer (\protect\np{nn\_bbl\_ldf}\forcode{ = 1})}
-\label{TRA_bbl_diff}
+\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 
-\begin{equation} \label{Eq_tra_bbl_diff}
+\begin{equation} \label{eq:tra_bbl_diff}
 {\rm {\bf F}}_\sigma=A_l^\sigma \; \nabla_\sigma T
 \end{equation} 
@@ -953,5 +953,5 @@
 and  $A_l^\sigma$ the lateral diffusivity in the BBL. Following \citet{Beckmann_Doscher1997}, 
 the latter is prescribed with a spatial dependence, $i.e.$ in the conditional form
-\begin{equation} \label{Eq_tra_bbl_coef}
+\begin{equation} \label{eq:tra_bbl_coef}
 A_l^\sigma (i,j,t)=\left\{ {\begin{array}{l}
  A_{bbl}  \quad \quad   \mbox{if}  \quad   \nabla_\sigma \rho  \cdot  \nabla H<0 \\ 
@@ -962,10 +962,10 @@
 where $A_{bbl}$ is the BBL diffusivity coefficient, given by the namelist 
 parameter \np{rn\_ahtbbl} and usually set to a value much larger 
-than the one used for lateral mixing in the open ocean. The constraint in \eqref{Eq_tra_bbl_coef} 
+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 density above the sea floor, at the top of 
-the slope, is larger than in the deeper ocean (see green arrow in Fig.\ref{Fig_bbl}). 
+the slope, is larger than in the deeper ocean (see green arrow in \autoref{fig:bbl}). 
 In practice, this constraint is applied separately in the two horizontal directions, 
-and the density gradient in \eqref{Eq_tra_bbl_coef} is evaluated with the log gradient formulation: 
-\begin{equation} \label{Eq_tra_bbl_Drho}
+and the density gradient in \autoref{eq:tra_bbl_coef} is evaluated with the log gradient formulation: 
+\begin{equation} \label{eq:tra_bbl_Drho}
 	\nabla_\sigma \rho / \rho = \alpha \,\nabla_\sigma T + \beta   \,\nabla_\sigma S
 \end{equation} 
@@ -978,5 +978,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Advective bottom boundary layer  (\protect\np{nn\_bbl\_adv}\forcode{ = 1..2})}
-\label{TRA_bbl_adv}
+\label{subsec:TRA_bbl_adv}
 
 \sgacomment{"downsloping flow" has been replaced by "downslope flow" in the following
@@ -986,5 +986,5 @@
 \begin{figure}[!t] 	\begin{center}
 \includegraphics[width=0.7\textwidth]{Fig_BBL_adv}
-\caption{ 	\protect\label{Fig_bbl}  
+\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}$. 
@@ -1011,5 +1011,5 @@
 
 \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 Fig.\ref{Fig_bbl}) 
+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 ($i.e.$ 
@@ -1021,7 +1021,7 @@
 The advection is allowed only  if dense water overlies less dense water on the slope ($i.e.$ 
 $\nabla_\sigma \rho  \cdot  \nabla H<0$). For example, the resulting transport of the 
-downslope flow, here in the $i$-direction (Fig.\ref{Fig_bbl}), is simply given by the 
+downslope flow, here in the $i$-direction (\autoref{fig:bbl}), is simply given by the 
 following expression:
-\begin{equation} \label{Eq_bbl_Utr}
+\begin{equation} \label{eq:bbl_Utr}
  u^{tr}_{bbl} = \gamma \, g \frac{\Delta \rho}{\rho_o}  e_{1u} \; min \left( {e_{3u}}_{kup},{e_{3u}}_{kdwn} \right)
 \end{equation}
@@ -1039,21 +1039,21 @@
 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 Fig.\ref{Fig_bbl} where the density at level $(i,kup)$ is 
+case displayed in \autoref{fig: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 \eqref{Eq_bbl_dw}, 
-the horizontal \eqref{Eq_bbl_hor}  and the upward \eqref{Eq_bbl_up} 
+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{align} 
 \partial_t T^{do}_{kdw} &\equiv \partial_t T^{do}_{kdw}
-                                     +  \frac{u^{tr}_{bbl}}{{b_t}^{do}_{kdw}}  \left( T^{sh}_{kup} - T^{do}_{kdw} \right)  \label{Eq_bbl_dw} \\
+                                     +  \frac{u^{tr}_{bbl}}{{b_t}^{do}_{kdw}}  \left( T^{sh}_{kup} - T^{do}_{kdw} \right)  \label{eq:bbl_dw} \\
 %
 \partial_t T^{sh}_{kup} &\equiv \partial_t T^{sh}_{kup} 
-				   + \frac{u^{tr}_{bbl}}{{b_t}^{sh}_{kup}}   \left( T^{do}_{kup} - T^{sh}_{kup} \right)   \label{Eq_bbl_hor} \\
+				   + \frac{u^{tr}_{bbl}}{{b_t}^{sh}_{kup}}   \left( T^{do}_{kup} - T^{sh}_{kup} \right)   \label{eq:bbl_hor} \\
 %
 \intertext{and for $k =kdw-1,\;..., \; kup$ :} 
 %
 \partial_t T^{do}_{k} &\equiv \partial_t S^{do}_{k}
-				   + \frac{u^{tr}_{bbl}}{{b_t}^{do}_{k}}   \left( T^{do}_{k+1} - T^{sh}_{k} \right)   \label{Eq_bbl_up}
+				   + \frac{u^{tr}_{bbl}}{{b_t}^{do}_{k}}   \left( T^{do}_{k+1} - T^{sh}_{k} \right)   \label{eq:bbl_up}
 \end{align}
 where $b_t$ is the $T$-cell volume. 
@@ -1067,5 +1067,5 @@
 % ================================================================
 \section{Tracer damping (\protect\mdl{tradmp})}
-\label{TRA_dmp}
+\label{sec:TRA_dmp}
 %--------------------------------------------namtra_dmp-------------------------------------------------
 \forfile{../namelists/namtra_dmp}
@@ -1074,5 +1074,5 @@
 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{equation} \label{eq:tra_dmp}
 \begin{split}
  \frac{\partial T}{\partial t}=\;\cdots \;-\gamma \,\left( {T-T_o } \right)  \\
@@ -1087,8 +1087,8 @@
 in \textit{namtsd} namelist as well as \np{sn\_tem} and \np{sn\_sal} structures are 
 correctly set  ($i.e.$ that $T_o$ and $S_o$ are provided in input files and read 
-using \mdl{fldread}, see \S\ref{SBC_fldread}). 
+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 \eqref{Eq_tra_dmp} is used are \textit{(a)} 
+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 
@@ -1151,5 +1151,5 @@
 % ================================================================
 \section{Tracer time evolution (\protect\mdl{tranxt})}
-\label{TRA_nxt}
+\label{sec:TRA_nxt}
 %--------------------------------------------namdom-----------------------------------------------------
 \forfile{../namelists/namdom}
@@ -1159,6 +1159,6 @@
 The general framework for tracer time stepping is a modified leap-frog scheme 
 \citep{Leclair_Madec_OM09}, $i.e.$ a three level centred time scheme associated 
-with a Asselin time filter (cf. \S\ref{STP_mLF}):
-\begin{equation} \label{Eq_tra_nxt}
+with a Asselin time filter (cf. \autoref{sec:STP_mLF}):
+\begin{equation} \label{eq:tra_nxt}
 \begin{aligned}
 (e_{3t}T)^{t+\rdt} &= (e_{3t}T)_f^{t-\rdt} &+ 2 \, \rdt  \,e_{3t}^t\ \text{RHS}^t &	\\
@@ -1174,5 +1174,5 @@
 $\gamma$ is initialized as \np{rn\_atfp} (\textbf{namelist} parameter). 
 Its default value is \np{rn\_atfp}\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 \S\ref{TRA_sbc}.
+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$.
@@ -1189,5 +1189,5 @@
 % ================================================================
 \section{Equation of state (\protect\mdl{eosbn2}) }
-\label{TRA_eosbn2}
+\label{sec:TRA_eosbn2}
 %--------------------------------------------nameos-----------------------------------------------------
 \forfile{../namelists/nameos}
@@ -1198,5 +1198,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Equation of seawater (\protect\np{nn\_eos}\forcode{ = -1..1})}
-\label{TRA_eos}
+\label{subsec:TRA_eos}
 
 The Equation Of Seawater (EOS) is an empirical nonlinear thermodynamic relationship 
@@ -1272,5 +1272,5 @@
 and \textit{practical} salinity.
 S-EOS takes the following expression:
-\begin{equation} \label{Eq_tra_S-EOS}
+\begin{equation} \label{eq:tra_S-EOS}
 \begin{split}
   d_a(T,S,z)  =  ( & - a_0 \; ( 1 + 0.5 \; \lambda_1 \; T_a + \mu_1 \; z ) * T_a  \\
@@ -1280,5 +1280,5 @@
 \end{split}
 \end{equation} 
-where the computer name of the coefficients as well as their standard value are given in \ref{Tab_SEOS}.
+where the computer name of the coefficients as well as their standard value are given in \autoref{tab:SEOS}.
 In fact, when choosing S-EOS, various approximation of EOS can be specified simply by changing 
 the associated coefficients. 
@@ -1303,5 +1303,5 @@
 $\mu_2$     & \np{rn\_mu2} 	& 1.1090 $10^{-5}$ &  thermobaric coeff. in S   	      \\ \hline
 \end{tabular}
-\caption{ \protect\label{Tab_SEOS}
+\caption{ \protect\label{tab:SEOS}
 Standard value of S-EOS coefficients. }
 \end{center}
@@ -1314,5 +1314,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Brunt-V\"{a}is\"{a}l\"{a} frequency (\protect\np{nn\_eos}\forcode{ = 0..2})}
-\label{TRA_bn2}
+\label{subsec:TRA_bn2}
 
 An accurate computation of the ocean stability (i.e. of $N$, the brunt-V\"{a}is\"{a}l\"{a}
@@ -1323,5 +1323,5 @@
  (pressure in decibar being approximated by the depth in meters). The expression for $N^2$ 
  is given by: 
-\begin{equation} \label{Eq_tra_bn2}
+\begin{equation} \label{eq:tra_bn2}
 N^2 =	\frac{g}{e_{3w}} \left(   \beta \;\delta_{k+1/2}[S] - \alpha \;\delta_{k+1/2}[T]   \right)
 \end{equation} 
@@ -1336,8 +1336,8 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Freezing point of seawater}
-\label{TRA_fzp}
+\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{equation} \label{eq:tra_eos_fzp}
    \begin{split}
 T_f (S,p) = \left( -0.0575 + 1.710523 \;10^{-3} \, \sqrt{S} 
@@ -1347,7 +1347,7 @@
 \end{equation}
 
-\eqref{Eq_tra_eos_fzp} is only used to compute the potential freezing point of 
+\autoref{eq:tra_eos_fzp} is only used to compute the potential freezing point of 
 sea water ($i.e.$ referenced to the surface $p=0$), thus the pressure dependent 
-terms in \eqref{Eq_tra_eos_fzp} (last term) have been dropped. The freezing
+terms in \autoref{eq:tra_eos_fzp} (last term) have been dropped. The freezing
 point is computed through \textit{eos\_fzp}, a \textsc{Fortran} function that can be found 
 in \mdl{eosbn2}.  
@@ -1358,5 +1358,5 @@
 % -------------------------------------------------------------------------------------------------------------
 %\subsection{Potential Energy anomalies}
-%\label{TRA_bn2}
+%\label{subsec:TRA_bn2}
 
 %    =====>>>>> TO BE written
@@ -1368,5 +1368,5 @@
 % ================================================================
 \section{Horizontal derivative in \textit{zps}-coordinate (\protect\mdl{zpshde})}
-\label{TRA_zpshde}
+\label{sec:TRA_zpshde}
 
 \gmcomment{STEVEN: to be consistent with earlier discussion of differencing and averaging operators, 
@@ -1382,5 +1382,5 @@
 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 (Fig.~\ref{Fig_Partial_step_scheme}). 
+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:
@@ -1389,7 +1389,7 @@
 \begin{figure}[!p] 	 \begin{center}
 \includegraphics[width=0.9\textwidth]{Partial_step_scheme}
-\caption{ 	\protect\label{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 (\np{ln\_zps}\forcode{ = .true.}) in the case $( e3w_k^{i+1} - e3w_k^i  )>0$. 
+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. 
@@ -1409,5 +1409,5 @@
 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}
+\begin{equation} \label{eq:zps_hde}
 \begin{aligned}
  \delta _{i+1/2} T= 	\begin{cases}
@@ -1432,6 +1432,6 @@
 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 \S\ref{TRA_eos} ) : 
-\begin{equation} \label{Eq_zps_hde_rho}
+approximated by depth, see \autoref{subsec:TRA_eos} ) : 
+\begin{equation} \label{eq:zps_hde_rho}
 \widetilde{\rho } = \rho ( {\widetilde{T},\widetilde {S},z_u }) 
 \quad \text{where }\  z_u = \min \left( {z_T^{i+1} ,z_T^i } \right)
@@ -1441,9 +1441,9 @@
 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 (\S\ref{DYN_hpg}) and the slopes of neutral 
-surfaces (\S\ref{LDF_slp})
+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 \eqref{Eq_zps_hde} has not 
+averaging and differencing operators appear. Yet \autoref{eq: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 
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_ZDF.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_ZDF.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_ZDF.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Vertical Ocean Physics (ZDF)}
-\label{ZDF}
+\label{chap:ZDF}
 \minitoc
 
@@ -19,19 +19,19 @@
 % ================================================================
 \section{Vertical mixing}
-\label{ZDF_zdf}
+\label{sec:ZDF_zdf}
 
 The discrete form of the ocean subgrid scale physics has been presented in 
-\S\ref{TRA_zdf} and \S\ref{DYN_zdf}. At the surface and bottom boundaries, 
+\autoref{sec:TRA_zdf} and \autoref{sec:DYN_zdf}. At the surface and bottom boundaries, 
 the turbulent fluxes of momentum, heat and salt have to be defined. At the 
-surface they are prescribed from the surface forcing (see Chap.~\ref{SBC}), 
+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 ($i.e.$ \key{trabbl} 
-defined, see \S\ref{TRA_bbc}), and specified through a bottom friction 
-parameterisation for momentum (see \S\ref{ZDF_bfr}).
+defined, see \autoref{subsec:TRA_bbc}), and specified through a bottom friction 
+parameterisation for momentum (see \autoref{sec:ZDF_bfr}).
 
 In this section we briefly discuss the various choices offered to compute 
 the vertical eddy viscosity and diffusivity coefficients, $A_u^{vm}$ , 
 $A_v^{vm}$ and $A^{vT}$ ($A^{vS}$), defined at $uw$-, $vw$- and $w$- 
-points, respectively (see \S\ref{TRA_zdf} and \S\ref{DYN_zdf}). These 
+points, 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 
@@ -44,5 +44,5 @@
 (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 \S\ref{STP}).
+coefficients, and thus of the formulation used (see \autoref{chap:STP}).
 
 % -------------------------------------------------------------------------------------------------------------
@@ -50,5 +50,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Constant (\protect\key{zdfcst})}
-\label{ZDF_cst}
+\label{subsec:ZDF_cst}
 %--------------------------------------------namzdf---------------------------------------------------------
 \forfile{../namelists/namzdf}
@@ -75,5 +75,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Richardson number dependent (\protect\key{zdfric})}
-\label{ZDF_ric}
+\label{subsec:ZDF_ric}
 
 %--------------------------------------------namric---------------------------------------------------------
@@ -91,5 +91,5 @@
 ratio of stratification to vertical shear). Following \citet{Pacanowski_Philander_JPO81}, the following 
 formulation has been implemented:
-\begin{equation} \label{Eq_zdfric}
+\begin{equation} \label{eq:zdfric}
    \left\{      \begin{aligned}
          A^{vT} &= \frac {A_{ric}^{vT}}{\left( 1+a \; Ri \right)^n} + A_b^{vT}       \\
@@ -98,7 +98,7 @@
 \end{equation}
 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 \S\ref{TRA_bn2}), 
+number, $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 \S\ref{ZDF_cst}), and $A_{ric}^{vT} = 10^{-4}~m^2.s^{-1}$ 
+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 
@@ -133,5 +133,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{TKE turbulent closure scheme (\protect\key{zdftke})}
-\label{ZDF_tke}
+\label{subsec:ZDF_tke}
 
 %--------------------------------------------namzdf_tke--------------------------------------------------
@@ -150,5 +150,5 @@
 $\bar{e}$ through vertical shear, its destruction through stratification, its vertical 
 diffusion, and its dissipation of \citet{Kolmogorov1942} type:
-\begin{equation} \label{Eq_zdftke_e}
+\begin{equation} \label{eq:zdftke_e}
 \frac{\partial \bar{e}}{\partial t} = 
 \frac{K_m}{{e_3}^2 }\;\left[ {\left( {\frac{\partial u}{\partial k}} \right)^2
@@ -159,5 +159,5 @@
 - c_\epsilon \;\frac{\bar {e}^{3/2}}{l_\epsilon }
 \end{equation}
-\begin{equation} \label{Eq_zdftke_kz}
+\begin{equation} \label{eq:zdftke_kz}
    \begin{split}
          K_m &= C_k\  l_k\  \sqrt {\bar{e}\; }  	\\
@@ -165,5 +165,5 @@
    \end{split}
 \end{equation}
-where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \S\ref{TRA_bn2}), 
+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 
@@ -173,5 +173,5 @@
 $P_{rt}$ can be set to unity or, following \citet{Blanke1993}, be a function 
 of the local Richardson number, $R_i$:
-\begin{align*} \label{Eq_prt}
+\begin{align*} \label{eq:prt}
 P_{rt} = \begin{cases}
                     \ \ \ 1 &      \text{if $\ R_i \leq 0.2$} 	\\
@@ -187,5 +187,5 @@
 namelist parameter. The default value of $e_{bb}$ is 3.75. \citep{Gaspar1990}), 
 however a much larger value can be used when taking into account the 
-surface wave breaking (see below Eq. \eqref{ZDF_Esbc}). 
+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 
@@ -199,5 +199,5 @@
 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 \S\ref{ZDF_cst}).
+\np{rn\_avm0} and \np{rn\_avt0} (namzdf namelist, see \autoref{subsec:ZDF_cst}).
 
 \subsubsection{Turbulent length scale}
@@ -207,5 +207,5 @@
 parameter. The first two are based on the following first order approximation 
 \citep{Blanke1993}:
-\begin{equation} \label{Eq_tke_mxl0_1}
+\begin{equation} \label{eq:tke_mxl0_1}
 l_k = l_\epsilon = \sqrt {2 \bar{e}\; } / N
 \end{equation}
@@ -219,10 +219,10 @@
 \np{nn\_mxl}\forcode{ = 2..3} cases, which add an extra assumption concerning the vertical 
 gradient of the computed length scale. So, the length scales are first evaluated 
-as in \eqref{Eq_tke_mxl0_1} and then bounded such that:
-\begin{equation} \label{Eq_tke_mxl_constraint}
+as in \autoref{eq:tke_mxl0_1} and then bounded such that:
+\begin{equation} \label{eq: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}
-\eqref{Eq_tke_mxl_constraint} means that the vertical variations of the length 
+\autoref{eq:tke_mxl_constraint} means that the vertical variations of the length 
 scale cannot be larger than the variations of depth. It provides a better 
 approximation of the \citet{Gaspar1990} formulation while being much less 
@@ -230,5 +230,5 @@
 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 
-(Fig.~\ref{Fig_mixing_length}). In order to impose the \eqref{Eq_tke_mxl_constraint} 
+(\autoref{fig:mixing_length}). In order to impose the \autoref{eq: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 
@@ -237,10 +237,10 @@
 \begin{figure}[!t] \begin{center}
 \includegraphics[width=1.00\textwidth]{Fig_mixing_length}
-\caption{ \protect\label{Fig_mixing_length} 
+\caption{ \protect\label{fig:mixing_length} 
 Illustration of the mixing length computation. }
 \end{center}  
 \end{figure}
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-\begin{equation} \label{Eq_tke_mxl2}
+\begin{equation} \label{eq:tke_mxl2}
 \begin{aligned}
  l_{up\ \ }^{(k)} &= \min \left(  l^{(k)} \ , \ l_{up}^{(k+1)} + e_{3t}^{(k)}\ \ \ \;  \right)
@@ -250,5 +250,5 @@
 \end{aligned}
 \end{equation}
-where $l^{(k)}$ is computed using \eqref{Eq_tke_mxl0_1}, 
+where $l^{(k)}$ is computed using \autoref{eq:tke_mxl0_1}, 
 $i.e.$ $l^{(k)} = \sqrt {2 {\bar e}^{(k)} / {N^2}^{(k)} }$.
 
@@ -257,5 +257,5 @@
 \np{nn\_mxl}\forcode{ = 3} case, the dissipation and mixing turbulent length scales are give 
 as in \citet{Gaspar1990}:
-\begin{equation} \label{Eq_tke_mxl_gaspar}
+\begin{equation} \label{eq:tke_mxl_gaspar}
 \begin{aligned}
 & l_k          = \sqrt{\  l_{up} \ \ l_{dwn}\ }  	\\
@@ -282,5 +282,5 @@
 
 Following \citet{Craig_Banner_JPO94}, the boundary condition on surface TKE value is :
-\begin{equation}  \label{ZDF_Esbc}
+\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}
@@ -289,5 +289,5 @@
 younger waves \citep{Mellor_Blumberg_JPO04}. 
 The boundary condition on the turbulent length scale follows the Charnock's relation:
-\begin{equation} \label{ZDF_Lsbc}
+\begin{equation} \label{eq:ZDF_Lsbc}
 l_o = \kappa \beta \,\frac{|\tau|}{g\,\rho_o}
 \end{equation}
@@ -297,5 +297,5 @@
 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 
-to $\alpha_{CB} = 100$. Further setting  \np{ln\_mxl0} to true applies \eqref{ZDF_Lsbc} 
+to $\alpha_{CB} = 100$. Further setting  \np{ln\_mxl0} to true applies \autoref{eq:ZDF_Lsbc} 
 as surface boundary condition on 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) 
@@ -316,5 +316,5 @@
 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 \eqref{Eq_zdftke_e}, the TKE equation, is controlled 
+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.
  
@@ -368,6 +368,6 @@
 When using this parameterization ($i.e.$ when \np{nn\_etau}\forcode{ = 1}), the TKE input to the ocean ($S$) 
 imposed by the winds in the form of near-inertial oscillations, swell and waves is parameterized 
-by \eqref{ZDF_Esbc} the standard TKE surface boundary condition, plus a depth depend one given by:
-\begin{equation}  \label{ZDF_Ehtau}
+by \autoref{eq:ZDF_Esbc} the standard TKE surface boundary condition, plus a depth depend one given by:
+\begin{equation}  \label{eq:ZDF_Ehtau}
 S = (1-f_i) \; f_r \; e_s \; e^{-z / h_\tau} 
 \end{equation}
@@ -385,5 +385,5 @@
 
 Note that two other option existe, \np{nn\_etau}\forcode{ = 2..3}. They correspond to applying 
-\eqref{ZDF_Ehtau} only at the base of the mixed layer, or to using the high frequency part 
+\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. 
 Those two options are obsolescent features introduced for test purposes.
@@ -406,10 +406,10 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{TKE discretization considerations (\protect\key{zdftke})}
-\label{ZDF_tke_ene}
+\label{subsec:ZDF_tke_ene}
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!t]   \begin{center}
 \includegraphics[width=1.00\textwidth]{Fig_ZDF_TKE_time_scheme}
-\caption{ \protect\label{Fig_TKE_time_scheme} 
+\caption{ \protect\label{fig:TKE_time_scheme} 
 Illustration of the TKE time integration and its links to the momentum and tracer time integration. }
 \end{center}  
@@ -418,15 +418,15 @@
 
 The production of turbulence by vertical shear (the first term of the right hand side 
-of \eqref{Eq_zdftke_e}) should balance the loss of kinetic energy associated with
-the vertical momentum diffusion (first line in \eqref{Eq_PE_zdf}). To do so a special care 
+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. Fig.~\ref{Fig_TKE_time_scheme} shows 
+Let us first address the time stepping issue. \autoref{fig: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. 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:   
-\begin{equation} \label{Eq_energ1}
+\begin{equation} \label{eq:energ1}
 \begin{split}
 \int_{-H}^{\eta}  u^t \,\partial_z &\left( {K_m}^t \,(\partial_z u)^{t+\rdt}  \right) \,dz   \\
@@ -436,10 +436,10 @@
 \end{equation}
 Here, the vertical diffusion of momentum is discretized backward in time 
-with a coefficient, $K_m$, known at time $t$ (Fig.~\ref{Fig_TKE_time_scheme}), 
-as it is required when using the TKE scheme (see \S\ref{STP_forward_imp}). 
-The first term of the right hand side of \eqref{Eq_energ1} represents the kinetic energy 
+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 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}$. \eqref{Eq_energ1} 
+and thus minus the shear production rate of $\bar{e}$. \autoref{eq: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 
@@ -448,10 +448,10 @@
 
 A similar consideration applies on the destruction rate of $\bar{e}$ due to stratification 
-(second term of the right hand side of \eqref{Eq_zdftke_e}). This term 
+(second term of the right hand side of \autoref{eq:zdftke_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:
-\begin{equation} \label{Eq_energ2}
+\begin{equation} \label{eq:energ2}
 \begin{split}
 \int_{-H}^{\eta} g\,z\,\partial_z &\left( {K_\rho}^t \,(\partial_k \rho)^{t+\rdt}   \right) \,dz    \\
@@ -463,15 +463,15 @@
 \end{equation}
 where we use $N^2 = -g \,\partial_k \rho / (e_3 \rho)$. 
-The first term of the right hand side of \eqref{Eq_energ2}  is always zero 
+The first term of the right hand side of \autoref{eq:energ2}  is always zero 
 because there is no diffusive flux through the ocean surface and bottom). 
 The second term is minus the destruction rate of  $\bar{e}$ due to stratification. 
-Therefore \eqref{Eq_energ1} implies that, to be energetically consistent, the product 
-${K_\rho}^{t-\rdt}\,(N^2)^t$ should be used in \eqref{Eq_zdftke_e}, the TKE equation.
+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.
 
 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 
-(Fig.\ref{Fig_cell}). A space averaging is thus required to obtain the shear TKE production term.
-By redoing the \eqref{Eq_energ1} in the 3D case, it can be shown that the product of 
+(\autoref{fig: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 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 
@@ -480,5 +480,5 @@
 The above energetic considerations leads to 
 the following final discrete form for the TKE equation:
-\begin{equation} \label{Eq_zdftke_ene}
+\begin{equation} \label{eq:zdftke_ene}
 \begin{split}
 \frac { (\bar{e})^t - (\bar{e})^{t-\rdt} } {\rdt}  \equiv  
@@ -497,10 +497,10 @@
 \end{split}
 \end{equation}
-where the last two terms in \eqref{Eq_zdftke_ene} (vertical diffusion and Kolmogorov dissipation) 
-are time stepped using a backward scheme (see\S\ref{STP_forward_imp}). 
+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}). 
 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 \eqref{Eq_zdftke_ene}. For the latter, it is in fact 
+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. 
 
@@ -509,5 +509,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{GLS: Generic Length Scale (\protect\key{zdfgls})}
-\label{ZDF_gls}
+\label{subsec:ZDF_gls}
 
 %--------------------------------------------namzdf_gls---------------------------------------------------------
@@ -519,10 +519,10 @@
 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.\ref{Tab_GLS} allows to recover 
+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}
+\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
@@ -533,5 +533,5 @@
 \end{equation}
 
-\begin{equation} \label{Eq_zdfgls_psi}
+\begin{equation} \label{eq:zdfgls_psi}
    \begin{split}
 \frac{\partial \psi}{\partial t} =& \frac{\psi}{\bar{e}} \left\{
@@ -544,5 +544,5 @@
 \end{equation}
 
-\begin{equation} \label{Eq_zdfgls_kz}
+\begin{equation} \label{eq:zdfgls_kz}
    \begin{split}
          K_m    &= C_{\mu} \ \sqrt {\bar{e}} \ l         \\
@@ -551,12 +551,12 @@
 \end{equation}
 
-\begin{equation} \label{Eq_zdfgls_eps}
+\begin{equation} \label{eq:zdfgls_eps}
 {\epsilon} = C_{0\mu} \,\frac{\bar {e}^{3/2}}{l} \;
 \end{equation}
-where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \S\ref{TRA_bn2}) 
+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.\ref{Tab_GLS}). They are made available through the \np{nn\_clo} namelist parameter. 
+(Tab.\autoref{tab:GLS}). They are made available through the \np{nn\_clo} namelist parameter. 
 
 %--------------------------------------------------TABLE--------------------------------------------------
@@ -579,5 +579,5 @@
 \hline
 \end{tabular}
-\caption{   \protect\label{Tab_GLS} 
+\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} .}
@@ -596,5 +596,5 @@
 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 \eqref{ZDF_Esbc} and \np{rn\_charn} provides the value of $\beta$ in \eqref{ZDF_Lsbc}. 
+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 
@@ -609,5 +609,5 @@
 
 The time and space discretization of the GLS equations follows the same energetic 
-consideration as for the TKE case described in \S\ref{ZDF_tke_ene}  \citep{Burchard_OM02}. 
+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}.
 
@@ -616,5 +616,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{OSM: OSMOSIS boundary layer scheme (\protect\key{zdfosm})}
-\label{ZDF_osm}
+\label{subsec:ZDF_osm}
 
 %--------------------------------------------namzdf_osm---------------------------------------------------------
@@ -628,5 +628,5 @@
 % ================================================================
 \section{Convection}
-\label{ZDF_conv}
+\label{sec:ZDF_conv}
 
 %--------------------------------------------namzdf--------------------------------------------------------
@@ -648,5 +648,5 @@
 \subsection[Non-penetrative convective adjmt (\protect\np{ln\_tranpc}\forcode{ = .true.})]
 				{Non-penetrative convective adjustment (\protect\np{ln\_tranpc}\forcode{ = .true.})}
-\label{ZDF_npc}
+\label{subsec:ZDF_npc}
 
 %--------------------------------------------namzdf--------------------------------------------------------
@@ -657,5 +657,5 @@
 \begin{figure}[!htb]  	\begin{center}
 \includegraphics[width=0.90\textwidth]{Fig_npc}
-\caption{  \protect\label{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 
@@ -677,5 +677,5 @@
 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 
-(Fig. \ref{Fig_npc}): starting from the top of the ocean, the first instability is 
+(\autoref{fig: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$. The temperature and salinity in the two levels are 
@@ -714,5 +714,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Enhanced vertical diffusion (\protect\np{ln\_zdfevd}\forcode{ = .true.})}
-\label{ZDF_evd}
+\label{subsec:ZDF_evd}
 
 %--------------------------------------------namzdf--------------------------------------------------------
@@ -739,5 +739,5 @@
 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 \S\ref{STP_mLF}).
+even time step in a leapfrog environment \citep{Leclair_PhD2010} (see \autoref{sec:STP_mLF}).
 
 % -------------------------------------------------------------------------------------------------------------
@@ -745,15 +745,15 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection[Turbulent closure scheme (\protect\key{zdf}\{tke,gls,osm\})]{Turbulent Closure Scheme (\protect\key{zdftke}, \protect\key{zdfgls} or \protect\key{zdfosm})}
-\label{ZDF_tcs}
-
-The turbulent closure scheme presented in \S\ref{ZDF_tke} and \S\ref{ZDF_gls} 
+\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. In such a case, the term corresponding to the 
-destruction of turbulent kinetic energy through stratification in \eqref{Eq_zdftke_e} 
-or \eqref{Eq_zdfgls_e} becomes a source term, since $N^2$ is negative. 
+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})$. These large values 
 restore the static stability of the water column in a way similar to that of the 
-enhanced vertical diffusion parameterisation (\S\ref{ZDF_evd}). However, 
+enhanced vertical diffusion parameterisation (\autoref{subsec:ZDF_evd}). However, 
 in the vicinity of the sea surface (first ocean layer), the eddy coefficients 
 computed by the turbulent closure scheme do not usually exceed $10^{-2}m.s^{-1}$, 
@@ -772,5 +772,5 @@
 % ================================================================
 \section{Double diffusion mixing (\protect\key{zdfddm})}
-\label{ZDF_ddm}
+\label{sec:ZDF_ddm}
 
 %-------------------------------------------namzdf_ddm-------------------------------------------------
@@ -789,5 +789,5 @@
 
 Diapycnal mixing of S and T are described by diapycnal diffusion coefficients 
-\begin{align*} % \label{Eq_zdfddm_Kz}
+\begin{align*} % \label{eq:zdfddm_Kz}
     &A^{vT} = A_o^{vT}+A_f^{vT}+A_d^{vT}	\\
     &A^{vS} = A_o^{vS}+A_f^{vS}+A_d^{vS}
@@ -797,12 +797,12 @@
 mixing depend on the buoyancy ratio $R_\rho = \alpha \partial_z T / \beta \partial_z S$, 
 where $\alpha$ and $\beta$ are coefficients of thermal expansion and saline 
-contraction (see \S\ref{TRA_eos}). To represent mixing of $S$ and $T$ by salt 
+contraction (see \autoref{subsec:TRA_eos}). To represent mixing of $S$ and $T$ by salt 
 fingering, we adopt the diapycnal diffusivities suggested by Schmitt (1981):
-\begin{align} \label{Eq_zdfddm_f}
+\begin{align} \label{eq:zdfddm_f}
 A_f^{vS} &= 	\begin{cases}
 	\frac{A^{\ast v}}{1+(R_\rho / R_c)^n   } &\text{if  $R_\rho > 1$ and $N^2>0$ } \\
 	0 				  					    &\text{otherwise} 
 				\end{cases}   
-\\ 		    \label{Eq_zdfddm_f_T}
+\\ 		    \label{eq:zdfddm_f_T}
 A_f^{vT} &= 0.7 \ A_f^{vS} / R_\rho 
 \end{align}
@@ -811,5 +811,5 @@
 \begin{figure}[!t]   \begin{center}
 \includegraphics[width=0.99\textwidth]{Fig_zdfddm}
-\caption{  \protect\label{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 
@@ -822,5 +822,5 @@
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 
-The factor 0.7 in \eqref{Eq_zdfddm_f_T} reflects the measured ratio 
+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 ($e.g.$, \citet{McDougall_Taylor_JMR84}). Following  \citet{Merryfield1999}, 
@@ -828,5 +828,5 @@
 
 To represent mixing of S and T by diffusive layering,  the diapycnal diffusivities suggested by Federov (1988) is used: 
-\begin{align} 	\label{Eq_zdfddm_d}
+\begin{align} 	\label{eq:zdfddm_d}
 A_d^{vT} &= 	\begin{cases}
 	1.3635 \, \exp{\left( 4.6\, \exp{ \left[  -0.54\,( R_{\rho}^{-1} - 1 )  \right] }    \right)}
@@ -834,5 +834,5 @@
 	0 								&\text{otherwise} 
 				\end{cases}   
-\\   			\label{Eq_zdfddm_d_S}
+\\   			\label{eq:zdfddm_d_S}
 A_d^{vS} &= 	\begin{cases}
 	A_d^{vT}\ \left( 1.85\,R_{\rho} - 0.85 \right)
@@ -844,6 +844,6 @@
 \end{align}
 
-The dependencies of \eqref{Eq_zdfddm_f} to \eqref{Eq_zdfddm_d_S} on $R_\rho$ 
-are illustrated in Fig.~\ref{Fig_zdfddm}. Implementing this requires computing 
+The dependencies of \autoref{eq:zdfddm_f} to \autoref{eq:zdfddm_d_S} on $R_\rho$ 
+are illustrated in \autoref{fig:zdfddm}. 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 
@@ -854,5 +854,5 @@
 % ================================================================
 \section{Bottom and top friction (\protect\mdl{zdfbfr})}
-\label{ZDF_bfr}
+\label{sec:ZDF_bfr}
 
 %--------------------------------------------nambfr--------------------------------------------------------
@@ -870,5 +870,5 @@
 flux (bottom friction) enter the equations as a condition on the vertical 
 diffusive flux. For the bottom boundary layer, one has:
-\begin{equation} \label{Eq_zdfbfr_flux}
+\begin{equation} \label{eq:zdfbfr_flux}
 A^{vm} \left( \partial {\textbf U}_h / \partial z \right) = {{\cal F}}_h^{\textbf U}
 \end{equation}
@@ -886,5 +886,5 @@
 as a body force over the depth of the top or bottom model layer. To illustrate 
 this, consider the equation for $u$ at $k$, the last ocean level:
-\begin{equation} \label{Eq_zdfbfr_flux2}
+\begin{equation} \label{eq:zdfbfr_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}
@@ -907,5 +907,5 @@
 These coefficients are computed in \mdl{zdfbfr} and generally take the form 
 $c_b^{\textbf U}$ where:
-\begin{equation} \label{Eq_zdfbfr_bdef}
+\begin{equation} \label{eq:zdfbfr_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
@@ -917,5 +917,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Linear bottom friction (\protect\np{nn\_botfr}\forcode{ = 0..1})}
-\label{ZDF_bfr_linear}
+\label{subsec:ZDF_bfr_linear}
 
 The linear bottom friction parameterisation (including the special case 
@@ -923,5 +923,5 @@
 is proportional to the interior velocity (i.e. the velocity of the last 
 model level):
-\begin{equation} \label{Eq_zdfbfr_linear}
+\begin{equation} \label{eq:zdfbfr_linear}
 {\cal F}_h^\textbf{U} = \frac{A^{vm}}{e_3} \; \frac{\partial \textbf{U}_h}{\partial k} = r \; \textbf{U}_h^b
 \end{equation}
@@ -941,6 +941,6 @@
 
 For the linear friction case the coefficients defined in the general 
-expression \eqref{Eq_zdfbfr_bdef} are: 
-\begin{equation} \label{Eq_zdfbfr_linbfr_b}
+expression \autoref{eq:zdfbfr_bdef} are: 
+\begin{equation} \label{eq:zdfbfr_linbfr_b}
 \begin{split}
  c_b^u &= - r\\
@@ -961,9 +961,9 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Non-linear bottom friction (\protect\np{nn\_botfr}\forcode{ = 2})}
-\label{ZDF_bfr_nonlinear}
+\label{subsec:ZDF_bfr_nonlinear}
 
 The non-linear bottom friction parameterisation assumes that the bottom 
 friction is quadratic: 
-\begin{equation} \label{Eq_zdfbfr_nonlinear}
+\begin{equation} \label{eq:zdfbfr_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 
@@ -983,5 +983,5 @@
 For the non-linear friction case the terms
 computed in \mdl{zdfbfr}  are: 
-\begin{equation} \label{Eq_zdfbfr_nonlinbfr}
+\begin{equation} \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}\\
@@ -1003,5 +1003,5 @@
 \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{ZDF_bfr_loglayer}
+\label{subsec:ZDF_bfr_loglayer}
 
 In the non-linear bottom friction case, the drag coefficient, $C_D$, can be optionally
@@ -1033,11 +1033,11 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Bottom friction stability considerations}
-\label{ZDF_bfr_stability}
+\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 \eqref{Eq_zdfbfr_flux2}
+the purposes of stability analysis, an approximation to \autoref{eq:zdfbfr_flux2}
 is:
-\begin{equation} \label{Eqn_bfrstab}
+\begin{equation} \label{eq:Eqn_bfrstab}
 \begin{split}
  \Delta u &= -\frac{{{\cal F}_h}^u}{e_{3u}}\;2 \rdt    \\
@@ -1050,5 +1050,5 @@
  |\Delta u| < \;|u| 
 \end{equation}
-\noindent which, using \eqref{Eqn_bfrstab}, gives:
+\noindent which, using \autoref{eq:Eqn_bfrstab}, gives:
 \begin{equation}
 r\frac{2\rdt}{e_{3u}} < 1 \qquad  \Rightarrow \qquad r < \frac{e_{3u}}{2\rdt}\\
@@ -1075,5 +1075,5 @@
 
 Limits on the bottom friction coefficient are not imposed if the user has elected to
-handle the bottom friction implicitly (see \S\ref{ZDF_bfr_imp}). The number of potential
+handle the bottom friction implicitly (see \autoref{subsec:ZDF_bfr_imp}). The number of potential
 breaches of the explicit stability criterion are still reported for information purposes.
 
@@ -1082,5 +1082,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Implicit bottom friction (\protect\np{ln\_bfrimp}\forcode{ = .true.})}
-\label{ZDF_bfr_imp}
+\label{subsec:ZDF_bfr_imp}
 
 An optional implicit form of bottom friction has been implemented to improve
@@ -1093,5 +1093,5 @@
 bottom boundary condition is implemented implicitly.
 
-\begin{equation} \label{Eq_dynzdf_bfr}
+\begin{equation} \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}}
@@ -1112,9 +1112,9 @@
 following:
 
-\begin{equation} \label{Eq_dynspg_ts_bfr1}
+\begin{equation} \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)
 \end{equation}
-\begin{equation} \label{Eq_dynspg_ts_bfr2}
+\begin{equation} \label{eq:dynspg_ts_bfr2}
 \frac{\textbf{U}^{m+1}-\textbf{U}_{med}}{2\Delta t}=\textbf{T}+
 \left(g\nabla\eta^{'}+f\textbf{k}\times\textbf{U}^{'}\right)-
@@ -1136,5 +1136,5 @@
 \subsection[Bottom friction w/ split-explicit time splitting (\protect\np{ln\_bfrimp})]
 				{Bottom friction with split-explicit time splitting (\protect\np{ln\_bfrimp})}
-\label{ZDF_bfr_ts}
+\label{subsec:ZDF_bfr_ts}
 
 When calculating the momentum trend due to bottom friction in \mdl{dynbfr}, the
@@ -1175,9 +1175,9 @@
 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 \S\ref{ZDF_bfr_imp} ) 
+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:
-\begin{equation} \label{Eq_zdfbfr_implicitts}
+\begin{equation} \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 ]  
 \end{equation}
@@ -1193,5 +1193,5 @@
 % ================================================================
 \section{Tidal mixing (\protect\key{zdftmx})}
-\label{ZDF_tmx}
+\label{sec:ZDF_tmx}
 
 %--------------------------------------------namzdf_tmx--------------------------------------------------
@@ -1204,5 +1204,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Bottom intensified tidal mixing}
-\label{ZDF_tmx_bottom}
+\label{subsec:ZDF_tmx_bottom}
 
 Options are defined through the  \ngn{namzdf\_tmx} namelist variables.
@@ -1213,9 +1213,9 @@
 $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}
+\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 \S\ref{TRA_bn2}), $\rho$ the density, $q$ the tidal dissipation efficiency, 
+(see \autoref{subsec:TRA_bn2}), $\rho$ the density, $q$ the tidal dissipation efficiency, 
 and $F(z)$ the vertical structure function. 
 
@@ -1230,5 +1230,5 @@
 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}, 
-\begin{equation} \label{Eq_Fz}
+\begin{equation} \label{eq:Fz}
 F(i,j,k) = \frac{ e^{ -\frac{H+z}{h_o} } }{ h_o \left( 1- e^{ -\frac{H}{h_o} } \right) }
 \end{equation}
@@ -1241,5 +1241,5 @@
 usually set to $10^{-8} s^{-2}$. These bounds are usually rarely encountered.
 
-The internal wave energy map, $E(x, y)$ in \eqref{Eq_Ktides}, is derived 
+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. 
@@ -1250,5 +1250,5 @@
 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 (Fig.~\ref{Fig_ZDF_M2_K1_tmx}). The S2 dissipation is simply approximated
+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 
@@ -1258,5 +1258,5 @@
 \begin{figure}[!t] 	\begin{center}
 \includegraphics[width=0.90\textwidth]{Fig_ZDF_M2_K1_tmx}
-\caption{  \protect\label{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}
@@ -1267,5 +1267,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Indonesian area specific treatment (\protect\np{ln\_zdftmx\_itf})}
-\label{ZDF_tmx_itf}
+\label{subsec:ZDF_tmx_itf}
 
 When the Indonesian Through Flow (ITF) area is included in the model domain,
@@ -1294,5 +1294,5 @@
 proportional to $N^2$ below the core of the thermocline and to $N$ above. 
 The resulting $F(z)$ is:
-\begin{equation} \label{Eq_Fz_itf}
+\begin{equation} \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$} \\
@@ -1315,5 +1315,5 @@
 % ================================================================
 \section{Internal wave-driven mixing (\protect\key{zdftmx\_new})}
-\label{ZDF_tmx_new}
+\label{sec:ZDF_tmx_new}
 
 %--------------------------------------------namzdf_tmx_new------------------------------------------
@@ -1325,5 +1325,5 @@
 A three-dimensional field of internal wave energy dissipation $\epsilon(x,y,z)$ is first constructed, 
 and the resulting diffusivity is obtained as 
-\begin{equation} \label{Eq_Kwave}
+\begin{equation} \label{eq:Kwave}
 A^{vT}_{wave} =  R_f \,\frac{ \epsilon }{ \rho \, N^2 }
 \end{equation}
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_conservation.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_conservation.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_conservation.tex	(revision 9407)
@@ -6,5 +6,5 @@
 % ================================================================
 \chapter{Invariants of the Primitive Equations}
-\label{Invariant}
+\label{chap:Invariant}
 \minitoc
 
@@ -48,5 +48,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{Conservation properties on ocean dynamics}
-\label{Invariant_dyn}
+\label{sec:Invariant_dyn}
 
 The non linear term of the momentum equations has been split into a 
@@ -68,10 +68,10 @@
 vorticity, i.e. , , and , respectively. The continuous formulation of the 
 vorticity term satisfies following integral constraints:
-\begin{equation} \label{Eq_vor_vorticity}
+\begin{equation} \label{eq: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
 \end{equation}
 
-\begin{equation} \label{Eq_vor_enstrophy}
+\begin{equation} \label{eq: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} 
@@ -79,5 +79,5 @@
 \end{equation}
 
-\begin{equation} \label{Eq_vor_energy}
+\begin{equation} \label{eq:vor_energy}
 \int_D {{\textbf{U}}_h \times \left( {\varsigma \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} =0
 \end{equation}
@@ -107,5 +107,5 @@
 energy due to the horizontal gradient of horizontal kinetic energy:
 
-\begin{equation} \label{Eq_keg_zad}
+\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 
 {\textbf{U}}_h }{\partial k}\;dv}
@@ -113,7 +113,7 @@
 
 Using the discrete form given in {\S}II.2-a and the symmetry or 
-anti-symmetry properties of the mean and difference operators, \eqref{Eq_keg_zad} is 
+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 
-\eqref{Eq_keg_zad} links the choice of the discrete forms of the vertical advection 
+\autoref{eq: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. The discrete form of the vertical advection given in 
@@ -132,5 +132,5 @@
 energy due to buoyancy forces:
 
-\begin{equation} \label{Eq_hpg_pe}
+\begin{equation} \label{eq: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}
 \end{equation}
@@ -155,5 +155,5 @@
 approximation, the change of horizontal kinetic energy due to the work of 
 surface pressure forces is exactly zero:
-\begin{equation} \label{Eq_spg}
+\begin{equation} \label{eq:spg}
 \int_D {-\frac{1}{\rho _o }\nabla _h } \left( {p_s } \right)\cdot {\textbf{U}}_h \;dv=0
 \end{equation}
@@ -169,9 +169,9 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{Conservation properties on ocean thermodynamics}
-\label{Invariant_tra}
+\label{sec:Invariant_tra}
 
 In continuous formulation, the advective terms of the tracer equations 
 conserve the tracer content and the quadratic form of the tracer, i.e.
-\begin{equation} \label{Eq_tra_tra2}
+\begin{equation} \label{eq:tra_tra2}
 \int_D {\nabla .\left( {T\;{\textbf{U}}} \right)\;dv} =0
 \;\text{and}
@@ -189,5 +189,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Conservation properties on momentum physics}
-\label{Invariant_dyn_physics}
+\label{subsec:Invariant_dyn_physics}
 
 \textbf{* lateral momentum diffusion term}
@@ -195,5 +195,5 @@
 The continuous formulation of the horizontal diffusion of momentum satisfies 
 the following integral constraints~:
-\begin{equation} \label{Eq_dynldf_dyn}
+\begin{equation} \label{eq:dynldf_dyn}
 \int\limits_D {\frac{1}{e_3 }{\rm {\bf k}}\cdot \nabla \times \left[ {\nabla 
 _h \left( {A^{lm}\;\chi } \right)-\nabla _h \times \left( {A^{lm}\;\zeta 
@@ -201,5 +201,5 @@
 \end{equation}
 
-\begin{equation} \label{Eq_dynldf_div}
+\begin{equation} \label{eq: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)} 
@@ -207,5 +207,5 @@
 \end{equation}
 
-\begin{equation} \label{Eq_dynldf_curl}
+\begin{equation} \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)} 
@@ -213,5 +213,5 @@
 \end{equation}
 
-\begin{equation} \label{Eq_dynldf_curl2}
+\begin{equation} \label{eq:dynldf_curl2}
 \mbox{if}\quad A^{lm}=cste\quad \quad \int_D {\zeta \;{\rm {\bf k}}\cdot 
 \nabla \times \left[ {\nabla _h \left( {A^{lm}\;\chi } \right)-\nabla _h 
@@ -220,5 +220,5 @@
 \end{equation}
 
-\begin{equation} \label{Eq_dynldf_div2}
+\begin{equation} \label{eq: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( 
@@ -256,5 +256,5 @@
 conservation of momentum, dissipation of horizontal kinetic energy
 
-\begin{equation} \label{Eq_dynzdf_dyn}
+\begin{equation} \label{eq: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}} \\ 
@@ -263,5 +263,5 @@
  \end{equation}
 conservation of vorticity, dissipation of enstrophy
-\begin{equation} \label{Eq_dynzdf_vor}
+\begin{equation} \label{eq:dynzdf_vor}
 \begin{aligned}
 & \int_D {\frac{1}{e_3 }{\rm {\bf k}}\cdot \nabla \times \left( {\frac{1}{e_3 
@@ -275,5 +275,5 @@
 conservation of horizontal divergence, dissipation of square of the 
 horizontal divergence
-\begin{equation} \label{Eq_dynzdf_div}
+\begin{equation} \label{eq:dynzdf_div}
 \begin{aligned}
  &\int_D {\nabla \cdot \left( {\frac{1}{e_3 }\frac{\partial }{\partial 
@@ -295,5 +295,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Conservation properties on tracer physics}
-\label{Invariant_tra_physics}
+\label{subsec:Invariant_tra_physics}
 
 The numerical schemes used for tracer subgridscale physics are written in 
@@ -308,5 +308,5 @@
 variance, i.e.
 
-\begin{equation} \label{Eq_traldf_t_t2}
+\begin{equation} \label{eq:traldf_t_t2}
 \begin{aligned}
 &\int_D \nabla\, \cdot\, \left( A^{lT} \,\Re \,\nabla \,T \right)\;dv = 0 \\ 
@@ -318,5 +318,5 @@
 variance, i.e.
 
-\begin{equation} \label{Eq_trazdf_t_t2}
+\begin{equation} \label{eq: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 \\ 
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_misc.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_misc.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_misc.tex	(revision 9407)
@@ -5,5 +5,5 @@
 % ================================================================
 \chapter{Miscellaneous Topics}
-\label{MISC}
+\label{chap:MISC}
 \minitoc
 
@@ -15,5 +15,5 @@
 % ================================================================
 \section{Representation of unresolved straits}
-\label{MISC_strait}
+\label{sec:MISC_strait}
 
 In climate modeling, it often occurs that a crucial connections between water masses
@@ -43,8 +43,8 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Hand made geometry changes}
-\label{MISC_strait_hand}
+\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. (Fig.~\ref{Fig_MISC_strait_hand}).
+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 ($i.e.$ change the value 
@@ -56,7 +56,7 @@
 
 $\bullet$ increase of the viscous boundary layer thickness by local increase of the 
-fmask value at the coast (Fig.~\ref{Fig_MISC_strait_hand}). This is done in 
+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 Section \ref{LBC_coast})
+(see  \autoref{sec:LBC_coast})
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -64,5 +64,5 @@
 \includegraphics[width=0.80\textwidth]{Fig_Gibraltar}
 \includegraphics[width=0.80\textwidth]{Fig_Gibraltar2}
-\caption{	\protect\label{Fig_MISC_strait_hand} 
+\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 
@@ -71,5 +71,5 @@
 \textit{Bottom}: using viscous boundary layers. The four fmask parameters 
 along the strait coastlines are set to a value larger than 4, $i.e.$ "strong" no-slip 
-case (see Fig.\ref{Fig_LBC_shlat}) creating a large viscous boundary layer 
+case (see \autoref{fig:LBC_shlat}) creating a large viscous boundary layer 
 that allows a reduced transport through the strait.}
 \end{center}   \end{figure}
@@ -81,5 +81,5 @@
 % ================================================================
 \section{Closed seas (\protect\mdl{closea})}
-\label{MISC_closea}
+\label{sec:MISC_closea}
 
 \colorbox{yellow}{Add here a short description of the way closed seas are managed}
@@ -90,5 +90,5 @@
 % ================================================================
 \section{Sub-domain functionality}
-\label{MISC_zoom}
+\label{sec:MISC_zoom}
 
 \subsection{Simple subsetting of input files via NetCDF attributes}
@@ -140,5 +140,5 @@
 \begin{figure}[!ht] 	  \begin{center}
 \includegraphics[width=0.90\textwidth]{Fig_LBC_zoom}
-\caption{	\protect\label{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}
@@ -150,8 +150,8 @@
 % ================================================================
 \section{Accuracy and reproducibility (\protect\mdl{lib\_fortran})}
-\label{MISC_fortran}
+\label{sec:MISC_fortran}
 
 \subsection{Issues with intrinsinc SIGN function (\protect\key{nosignedzero})}
-\label{MISC_sign}
+\label{subsec:MISC_sign}
 
 The SIGN(A, B) is the \textsc {Fortran} intrinsic function delivers the magnitude 
@@ -179,5 +179,5 @@
 
 \subsection{MPP reproducibility}
-\label{MISC_glosum}
+\label{subsec:MISC_glosum}
 
 The numerical reproducibility of simulations on distributed memory parallel computers 
@@ -207,5 +207,5 @@
 
 \subsection{MPP scalability}
-\label{MISC_mppsca}
+\label{subsec:MISC_mppsca}
 
 The default method of communicating values across the north-fold in distributed memory applications
@@ -231,5 +231,5 @@
 % ================================================================
 \section{Model optimisation, control print and benchmark}
-\label{MISC_opt}
+\label{sec:MISC_opt}
 %--------------------------------------------namctl-------------------------------------------------------
 \forfile{../namelists/namctl} 
@@ -270,5 +270,5 @@
 
 $\bullet$  Benchmark (\np{nn\_bench}). This option defines a benchmark run based on 
-a GYRE configuration (see \S\ref{CFG_gyre}) in which the resolution remains the same 
+a GYRE configuration (see \autoref{sec:CFG_gyre}) in which the resolution remains the same 
 whatever the domain size. This allows a very large model domain to be used, just by 
 changing the domain size (\jp{jpiglo}, \jp{jpjglo}) and without adjusting either the time-step 
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics.tex	(revision 9407)
@@ -6,5 +6,5 @@
 
 \chapter{Model Basics}
-\label{PE}
+\label{chap:PE}
 \minitoc
 
@@ -16,5 +16,5 @@
 % ================================================================
 \section{Primitive equations}
-\label{PE_PE}
+\label{sec:PE_PE}
 
 % -------------------------------------------------------------------------------------------------------------
@@ -23,5 +23,5 @@
 
 \subsection{Vector invariant formulation}
-\label{PE_Vector}
+\label{subsec:PE_Vector}
 
 
@@ -61,6 +61,6 @@
 hydrostatic equilibrium, the incompressibility equation, the heat and salt conservation 
 equations and an equation of state):
-\begin{subequations} \label{Eq_PE}
-  \begin{equation}     \label{Eq_PE_dyn}
+\begin{subequations} \label{eq:PE}
+  \begin{equation}     \label{eq:PE_dyn}
 \frac{\partial {\rm {\bf U}}_h }{\partial t}=
 -\left[    {\left( {\nabla \times {\rm {\bf U}}} \right)\times {\rm {\bf U}}
@@ -69,17 +69,17 @@
 -\frac{1}{\rho _o }\nabla _h p + {\rm {\bf D}}^{\rm {\bf U}} + {\rm {\bf F}}^{\rm {\bf U}}
   \end{equation}
-  \begin{equation}     \label{Eq_PE_hydrostatic}
+  \begin{equation}     \label{eq:PE_hydrostatic}
 \frac{\partial p }{\partial z} = - \rho \ g
   \end{equation}
-  \begin{equation}     \label{Eq_PE_continuity}
+  \begin{equation}     \label{eq:PE_continuity}
 \nabla \cdot {\bf U}=  0
   \end{equation}
-\begin{equation} \label{Eq_PE_tra_T}
+\begin{equation} \label{eq:PE_tra_T}
 \frac{\partial T}{\partial t} = - \nabla \cdot  \left( T \ \rm{\bf U} \right) + D^T + F^T
   \end{equation}
-  \begin{equation}     \label{Eq_PE_tra_S}
+  \begin{equation}     \label{eq:PE_tra_S}
 \frac{\partial S}{\partial t} = - \nabla \cdot  \left( S \ \rm{\bf U} \right) + D^S + F^S
   \end{equation}
-  \begin{equation}     \label{Eq_PE_eos}
+  \begin{equation}     \label{eq:PE_eos}
 \rho = \rho \left( T,S,p \right)
   \end{equation}
@@ -87,5 +87,5 @@
 where $\nabla$ is the generalised derivative vector operator in $(\bf i,\bf j, \bf k)$ directions, 
 $t$ is the time, $z$ is the vertical coordinate, $\rho $ is the \textit{in situ} density given by 
-the equation of state (\ref{Eq_PE_eos}), $\rho_o$ is a reference density, $p$ the pressure, 
+the equation of state (\autoref{eq:PE_eos}), $\rho_o$ is a reference density, $p$ the pressure, 
 $f=2 \bf \Omega \cdot \bf k$ is the Coriolis acceleration (where $\bf \Omega$ is the Earth's 
 angular velocity vector), and $g$ is the gravitational acceleration. 
@@ -93,5 +93,5 @@
 physics for momentum, temperature and salinity, and ${\rm {\bf F}}^{\rm {\bf U}}$, $F^T$ 
 and $F^S$ surface forcing terms. Their nature and formulation are discussed in 
-\S\ref{PE_zdf_ldf} and page \S\ref{PE_boundary_condition}.
+\autoref{sec:PE_zdf_ldf} and \autoref{subsec:PE_boundary_condition}.
 
 .
@@ -101,5 +101,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Boundary conditions}
-\label{PE_boundary_condition}
+\label{subsec:PE_boundary_condition}
 
 An ocean is bounded by complex coastlines, bottom topography at its base and an air-sea 
@@ -107,5 +107,5 @@
 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 (Fig.~\ref{Fig_ocean_bc}). Through these two boundaries, 
+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 
@@ -117,5 +117,5 @@
 \begin{figure}[!ht]	 \begin{center}
 \includegraphics[width=0.90\textwidth]{Fig_I_ocean_bc}
-\caption{	 \protect\label{Fig_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. 
@@ -137,5 +137,5 @@
 \footnote{In fact, it has been shown that the heat flux associated with the solid Earth cooling 
 ($i.e.$the geothermal heating) is not negligible for the thermohaline circulation of the world 
-ocean (see \ref{TRA_bbc}).}. 
+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, 
@@ -143,5 +143,5 @@
 the bottom velocity is parallel to solid boundaries). This kinematic boundary condition 
 can be expressed as:
-\begin{equation} \label{Eq_PE_w_bbc}
+\begin{equation} \label{eq:PE_w_bbc}
 w = -{\rm {\bf U}}_h \cdot  \nabla _h \left( H \right)
 \end{equation}
@@ -150,8 +150,8 @@
 in terms of turbulent fluxes using bottom and/or lateral boundary conditions. Its specification 
 depends on the nature of the physical parameterisation used for ${\rm {\bf D}}^{\rm {\bf U}}$ 
-in \eqref{Eq_PE_dyn}. It is discussed in \S\ref{PE_zdf}, page~\pageref{PE_zdf}.% and Chap. III.6 to 9.
+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: 
-\begin{equation} \label{Eq_PE_w_sbc}
+\begin{equation} \label{eq:PE_w_sbc}
 w = \frac{\partial \eta }{\partial t} 
     + \left. {{\rm {\bf U}}_h } \right|_{z=\eta } \cdot  \nabla _h \left( \eta \right) 
@@ -176,5 +176,5 @@
 % ================================================================
 \section{Horizontal pressure gradient }
-\label{PE_hor_pg}
+\label{sec:PE_hor_pg}
 
 % -------------------------------------------------------------------------------------------------------------
@@ -182,12 +182,12 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Pressure formulation}
-\label{PE_p_formulation}
+\label{subsec:PE_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 (\ref{Eq_PE_hydrostatic}), 
-assuming that pressure in decibars can be approximated by depth in meters in (\ref{Eq_PE_eos}). 
+$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 hydrostatic pressure is then given by:
-\begin{equation} \label{Eq_PE_pressure}
+\begin{equation} \label{eq:PE_pressure}
 p_h \left( {i,j,z,t} \right)
  = \int_{\varsigma =z}^{\varsigma =0} {g\;\rho \left( {T,S,\varsigma} \right)\;d\varsigma } 
@@ -213,16 +213,16 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Free surface formulation}
-\label{PE_free_surface}
+\label{subsec:PE_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 (\ref{Eq_PE_w_bbc}):
-\begin{equation} \label{Eq_PE_ssh}
+surface condition (\autoref{eq:PE_w_bbc}):
+\begin{equation} \label{eq:PE_ssh}
 \frac{\partial \eta }{\partial t}=-D+P-E
  	\quad \text{where} \ 
 D=\nabla \cdot \left[ {\left( {H+\eta } \right) \; {\rm{\bf \overline{U}}}_h \,} \right]
 \end{equation}
-and using (\ref{Eq_PE_hydrostatic}) the surface pressure is given by: $p_s = \rho \, g \, \eta$.
+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) 
@@ -237,9 +237,9 @@
 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 (\ref{Eq_PE_ssh}) and that the variation of the ocean 
+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 \S\ref{DYN_spg_exp} or \S\ref{DYN_spg_ts}.
+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 
@@ -247,5 +247,5 @@
 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 (\ref{Eq_PE_ssh}), which still allows 
+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.
@@ -255,6 +255,6 @@
 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 \S\ref{DYN_spg_exp}) or a split-explicit scheme strongly 
-inspired the one proposed by \citet{Shchepetkin_McWilliams_OM05} (see \S\ref{DYN_spg_ts}).
+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}).
 
 %\newpage
@@ -265,5 +265,5 @@
 % ================================================================
 \section{Curvilinear \textit{z-}coordinate system}
-\label{PE_zco}
+\label{sec:PE_zco}
 
 
@@ -272,5 +272,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Tensorial formalism}
-\label{PE_tensorial}
+\label{subsec:PE_tensorial}
 
 In many ocean circulation problems, the flow field has regions of enhanced dynamics 
@@ -294,11 +294,11 @@
 associated with the positively oriented orthogonal set of unit vectors (\textbf{i},\textbf{j},\textbf{k}) 
 linked to the earth such that \textbf{k} is the local upward vector and (\textbf{i},\textbf{j}) are 
-two vectors orthogonal to \textbf{k}, $i.e.$ along geopotential surfaces (Fig.\ref{Fig_referential}). 
+two vectors orthogonal to \textbf{k}, $i.e.$ along geopotential surfaces (\autoref{fig:referential}). 
 Let $(\lambda,\varphi,z)$ be the geographical coordinate system in which a position is defined 
 by the latitude $\varphi(i,j)$, the longitude $\lambda(i,j)$ and 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 (Fig.\ref{Fig_referential}). The local deformation of the curvilinear coordinate system is 
+level (\autoref{fig: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{equation} \label{eq:scale_factors}
 \begin{aligned}
  e_1 &=\left( {a+z} \right)\;\left[ {\left( {\frac{\partial \lambda 
@@ -315,5 +315,5 @@
 \begin{figure}[!tb] 	 \begin{center}
 \includegraphics[width=0.60\textwidth]{Fig_I_earth_referential}
-\caption{	\protect\label{Fig_referential} 
+\caption{	\protect\label{fig:referential} 
 the geographical coordinate system $(\lambda,\varphi,z)$ and the curvilinear 
 coordinate system (\textbf{i},\textbf{j},\textbf{k}). }
@@ -322,17 +322,17 @@
 
 Since the ocean depth is far smaller than the earth's radius, $a+z$, can be replaced by 
-$a$ in (\ref{Eq_scale_factors}) (thin-shell approximation). The resulting horizontal scale 
+$a$ in (\autoref{eq: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 \textbf{k} is parallel to \textbf{z}. The scalar and vector operators that 
-appear in the primitive equations (Eqs. \eqref{Eq_PE_dyn} to \eqref{Eq_PE_eos}) can 
+appear in the primitive equations (\autoref{eq:PE_dyn} to \autoref{eq:PE_eos}) can 
 be written in the tensorial form, invariant in any orthogonal horizontal curvilinear coordinate 
 system transformation:
-\begin{subequations} \label{Eq_PE_discrete_operators}
-\begin{equation} \label{Eq_PE_grad}
+\begin{subequations} \label{eq:PE_discrete_operators}
+\begin{equation} \label{eq:PE_grad}
 \nabla q=\frac{1}{e_1 }\frac{\partial q}{\partial i}\;{\rm {\bf 
 i}}+\frac{1}{e_2 }\frac{\partial q}{\partial j}\;{\rm {\bf j}}+\frac{1}{e_3 
 }\frac{\partial q}{\partial k}\;{\rm {\bf k}}    \\
 \end{equation}
-\begin{equation} \label{Eq_PE_div}
+\begin{equation} \label{eq:PE_div}
 \nabla \cdot {\rm {\bf A}} 
 = \frac{1}{e_1 \; e_2} \left[ 
@@ -341,5 +341,5 @@
 + \frac{1}{e_3} \left[ \frac{\partial a_3}{\partial k }   \right]
 \end{equation}
-\begin{equation} \label{Eq_PE_curl}
+\begin{equation} \label{eq:PE_curl}
    \begin{split}
 \nabla \times \vect{A} = 
@@ -352,8 +352,8 @@
    \end{split}
 \end{equation}
-\begin{equation} \label{Eq_PE_lap}
+\begin{equation} \label{eq:PE_lap}
 \Delta q = \nabla \cdot \left(  \nabla q \right)
 \end{equation}
-\begin{equation} \label{Eq_PE_lap_vector}
+\begin{equation} \label{eq:PE_lap_vector}
 \Delta {\rm {\bf A}} =
   \nabla \left( \nabla \cdot {\rm {\bf A}} \right)
@@ -367,18 +367,18 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Continuous model equations}
-\label{PE_zco_Eq}
+\label{subsec:PE_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 
-\eqref{Eq_PE_grad}) to \eqref{Eq_PE_lap_vector}. 
+\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)$ coordinate 
 system and define the relative vorticity $\zeta$ and the divergence of the horizontal velocity 
 field $\chi$, by:
-\begin{equation} \label{Eq_PE_curl_Uh}
+\begin{equation} \label{eq:PE_curl_Uh}
 \zeta =\frac{1}{e_1 e_2 }\left[ {\frac{\partial \left( {e_2 \,v} 
 \right)}{\partial i}-\frac{\partial \left( {e_1 \,u} \right)}{\partial j}} 
 \right]
 \end{equation}
-\begin{equation} \label{Eq_PE_div_Uh}
+\begin{equation} \label{eq:PE_div_Uh}
 \chi =\frac{1}{e_1 e_2 }\left[ {\frac{\partial \left( {e_2 \,u} 
 \right)}{\partial i}+\frac{\partial \left( {e_1 \,v} \right)}{\partial j}} 
@@ -388,5 +388,5 @@
 Using 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$, the nonlinear term of 
-\eqref{Eq_PE_dyn} can be transformed as follows:
+\autoref{eq:PE_dyn} can be transformed as follows:
 \begin{flalign*}
 &\left[ {\left( {	\nabla \times {\rm {\bf U}}    } \right) \times {\rm {\bf U}}
@@ -427,6 +427,6 @@
 
 The last term of the right hand side is obviously zero, and thus the nonlinear term of 
-\eqref{Eq_PE_dyn} is written in the $(i,j,k)$ coordinate system:
-\begin{equation} \label{Eq_PE_vector_form}
+\autoref{eq:PE_dyn} is written in the $(i,j,k)$ coordinate system:
+\begin{equation} \label{eq:PE_vector_form}
 \left[ {\left( {	\nabla \times {\rm {\bf U}}    } \right) \times {\rm {\bf U}}
 +\frac{1}{2}	\nabla \left( {{\rm {\bf U}}^2} \right)}	 \right]_h 
@@ -440,5 +440,5 @@
 For some purposes, it can be advantageous to write this term in the so-called flux form, 
 $i.e.$ to write it as the divergence of fluxes. For example, the first component of 
-\eqref{Eq_PE_vector_form} (the $i$-component) is transformed as follows:
+\autoref{eq:PE_vector_form} (the $i$-component) is transformed as follows:
 \begin{flalign*}
 &{	\begin{array}{*{20}l}
@@ -509,5 +509,5 @@
 
 The flux form of the momentum advection term is therefore given by:
-\begin{multline} \label{Eq_PE_flux_form}
+\begin{multline} \label{eq:PE_flux_form}
 		\left[ 
   \left( 	{\nabla \times {\rm {\bf U}}} 	\right) \times {\rm {\bf U}}
@@ -529,5 +529,5 @@
 the curvilinear nature of the coordinate system used. The latter is called the \emph{metric} 
 term and can be viewed as a modification of the Coriolis parameter: 
-\begin{equation} \label{Eq_PE_cor+metric}
+\begin{equation} \label{eq:PE_cor+metric}
 f \to f + \frac{1}{e_1\;e_2}  \left(  v \frac{\partial e_2}{\partial i}
 					         -u \frac{\partial e_1}{\partial j}  \right)
@@ -547,6 +547,6 @@
 $\bullet$ \textbf{Vector invariant form of the momentum equations} :
 
-\begin{subequations} \label{Eq_PE_dyn_vect}
-\begin{equation} \label{Eq_PE_dyn_vect_u} \begin{split}
+\begin{subequations} \label{eq:PE_dyn_vect}
+\begin{equation} \label{eq:PE_dyn_vect_u} \begin{split}
 \frac{\partial u}{\partial t} 
 = +   \left( {\zeta +f} \right)\,v                                    
@@ -568,6 +568,6 @@
 \vspace{+10pt}
 $\bullet$ \textbf{flux form of the momentum equations} :
-\begin{subequations} \label{Eq_PE_dyn_flux}
-\begin{multline} \label{Eq_PE_dyn_flux_u}
+\begin{subequations} \label{eq:PE_dyn_flux}
+\begin{multline} \label{eq:PE_dyn_flux_u}
 \frac{\partial u}{\partial t}=
 +   \left( { f + \frac{1}{e_1 \; e_2}
@@ -581,5 +581,5 @@
 +   D_u^{\vect{U}} +   F_u^{\vect{U}}
 \end{multline}
-\begin{multline} \label{Eq_PE_dyn_flux_v}
+\begin{multline} \label{eq:PE_dyn_flux_v}
 \frac{\partial v}{\partial t}=
 -   \left( { f + \frac{1}{e_1 \; e_2}
@@ -594,23 +594,23 @@
 \end{multline}
 \end{subequations}
-where $\zeta$, the relative vorticity, is given by \eqref{Eq_PE_curl_Uh} and $p_s $, 
+where $\zeta$, the relative vorticity, is given by \autoref{eq:PE_curl_Uh} and $p_s $, 
 the surface pressure, is given by:
-\begin{equation} \label{Eq_PE_spg}
+\begin{equation} \label{eq:PE_spg}
 p_s =  \rho \,g \,\eta 
 \end{equation}
-with $\eta$ is solution of \eqref{Eq_PE_ssh}
+with $\eta$ is solution of \autoref{eq:PE_ssh}
 
 The vertical velocity and the hydrostatic pressure are diagnosed from the following equations:
-\begin{equation} \label{Eq_w_diag}
+\begin{equation} \label{eq:w_diag}
 \frac{\partial w}{\partial k}=-\chi \;e_3 
 \end{equation}
-\begin{equation} \label{Eq_hp_diag}
+\begin{equation} \label{eq:hp_diag}
 \frac{\partial p_h }{\partial k}=-\rho \;g\;e_3 
 \end{equation}
-where the divergence of the horizontal velocity, $\chi$ is given by \eqref{Eq_PE_div_Uh}.
+where the divergence of the horizontal velocity, $\chi$ is given by \autoref{eq:PE_div_Uh}.
 
 \vspace{+10pt}
 $\bullet$ \textit{tracer equations} :
-\begin{equation} \label{Eq_S}
+\begin{equation} \label{eq:S}
 \frac{\partial T}{\partial t} = 
 -\frac{1}{e_1 e_2 }\left[ {	   \frac{\partial \left( {e_2 T\,u} \right)}{\partial i}
@@ -618,5 +618,5 @@
 -\frac{1}{e_3 }\frac{\partial \left( {T\,w} \right)}{\partial k} + D^T + F^T
 \end{equation}
-\begin{equation} \label{Eq_T}
+\begin{equation} \label{eq:T}
 \frac{\partial S}{\partial t} = 
 -\frac{1}{e_1 e_2 }\left[ 	  {\frac{\partial \left( {e_2 S\,u} \right)}{\partial i}
@@ -624,12 +624,12 @@
 -\frac{1}{e_3 }\frac{\partial \left( {S\,w} \right)}{\partial k} + D^S + F^S
 \end{equation}
-\begin{equation} \label{Eq_rho}
+\begin{equation} \label{eq:rho}
 \rho =\rho \left( {T,S,z(k)} \right)
 \end{equation}
 
 The expression of \textbf{D}$^{U}$, $D^{S}$ and $D^{T}$ depends on the subgrid scale 
-parameterisation used. It will be defined in \S\ref{PE_zdf}. The nature and formulation of 
+parameterisation used. It will be defined in \autoref{eq:PE_zdf}. The nature and formulation of 
 ${\rm {\bf F}}^{\rm {\bf U}}$, $F^T$ and $F^S$, the surface forcing terms, are discussed 
-in Chapter~\ref{SBC}.
+in \autoref{chap:SBC}.
 
 
@@ -640,5 +640,5 @@
 % ================================================================
 \section{Curvilinear generalised vertical coordinate system}
-\label{PE_gco}
+\label{sec:PE_gco}
 
 The ocean domain presents a huge diversity of situation in the vertical. First the ocean surface is a time dependent surface (moving surface). Second the ocean floor depends on the geographical position, 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. 
@@ -648,8 +648,8 @@
 
 In fact one is totally free to choose any space and time vertical coordinate by introducing an arbitrary vertical coordinate :
-\begin{equation} \label{Eq_s}
+\begin{equation} \label{eq: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. \eqref{Eq_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 \eqref{Eq_s}.
+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: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: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. 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 an explicit computation of vertical advection relative to the moving s-surfaces.
@@ -693,12 +693,12 @@
 \subsection{\textit{S-}coordinate formulation}
 
-Starting from the set of equations established in \S\ref{PE_zco} for the special case $k=z$ 
+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)$, which includes 
 $z$-, \textit{z*}- and $\sigma-$coordinates as special cases ($s=z$, $s=\textit{z*}$, and 
 $s=\sigma=z/H$ or $=z/\left(H+\eta \right)$, resp.). A formal derivation of the transformed 
-equations is given in Appendix~\ref{Apdx_A}. Let us define the vertical scale factor by 
+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)$ ), and the slopes in the 
 (\textbf{i},\textbf{j}) directions between $s-$ and $z-$surfaces by :
-\begin{equation} \label{Eq_PE_sco_slope}
+\begin{equation} \label{eq:PE_sco_slope}
 \sigma _1 =\frac{1}{e_1 }\;\left. {\frac{\partial z}{\partial i}} \right|_s 
 \quad \text{, and } \quad 
@@ -707,13 +707,13 @@
 We also introduce  $\omega $, a dia-surface velocity component, defined as the velocity 
 relative to the moving $s$-surfaces and normal to them:
-\begin{equation} \label{Eq_PE_sco_w}
+\begin{equation} \label{eq:PE_sco_w}
 \omega  = w - e_3 \, \frac{\partial s}{\partial t} - \sigma _1 \,u - \sigma _2 \,v    \\
 \end{equation}
 
-The equations solved by the ocean model \eqref{Eq_PE} in $s-$coordinate can be written as follows (see Appendix~\ref{Apdx_A_momentum}):
+The equations solved by the ocean model \autoref{eq:PE} in $s-$coordinate can be written as follows (see \autoref{sec:A_momentum}):
 
  \vspace{0.5cm}
 $\bullet$ Vector invariant form of the momentum equation :
-\begin{multline} \label{Eq_PE_sco_u}
+\begin{multline} \label{eq:PE_sco_u}
 \frac{\partial  u   }{\partial t}=
 	+   \left( {\zeta +f} \right)\,v                                    
@@ -724,5 +724,5 @@
 	+   D_u^{\vect{U}}  +   F_u^{\vect{U}} \quad
 \end{multline}
-\begin{multline} \label{Eq_PE_sco_v}
+\begin{multline} \label{eq:PE_sco_v}
 \frac{\partial v }{\partial t}=
 	-   \left( {\zeta +f} \right)\,u   
@@ -736,5 +736,5 @@
  \vspace{0.5cm}
 $\bullet$ Vector invariant form of the momentum equation :
-\begin{multline} \label{Eq_PE_sco_u}
+\begin{multline} \label{eq:PE_sco_u}
 \frac{1}{e_3} \frac{\partial \left(  e_3\,u  \right) }{\partial t}=
    +   \left( { f + \frac{1}{e_1 \; e_2 }
@@ -749,5 +749,5 @@
 	+   D_u^{\vect{U}}  +   F_u^{\vect{U}} \quad
 \end{multline}
-\begin{multline} \label{Eq_PE_sco_v}
+\begin{multline} \label{eq:PE_sco_v}
 \frac{1}{e_3} \frac{\partial \left(  e_3\,v  \right) }{\partial t}=
    -   \left( { f + \frac{1}{e_1 \; e_2}
@@ -766,6 +766,6 @@
 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 Appendix~\ref{Apdx_A}):
-\begin{equation} \label{Eq_PE_sco_continuity}
+(see \autoref{apdx:A}):
+\begin{equation} \label{eq:PE_sco_continuity}
 \frac{\partial e_3}{\partial t} + e_3 \; \chi + \frac{\partial \omega }{\partial s} = 0   
 \qquad \text{with }\;\;  
@@ -777,5 +777,5 @@
  \vspace{0.5cm}
 $\bullet$ tracer equations:
-\begin{multline} \label{Eq_PE_sco_t}
+\begin{multline} \label{eq:PE_sco_t}
 \frac{1}{e_3} \frac{\partial \left(  e_3\,T  \right) }{\partial t}=
 -\frac{1}{e_1 e_2 e_3 }\left[ {\frac{\partial \left( {e_2 e_3\,u\,T} \right)}{\partial i}
@@ -784,5 +784,5 @@
 \end{multline}
 
-\begin{multline} \label{Eq_PE_sco_s}
+\begin{multline} \label{eq:PE_sco_s}
 \frac{1}{e_3} \frac{\partial \left(  e_3\,S  \right) }{\partial t}=
 -\frac{1}{e_1 e_2 e_3 }\left[ {\frac{\partial \left( {e_2 e_3\,u\,S} \right)}{\partial i}
@@ -805,10 +805,10 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Curvilinear \textit{z*}--coordinate system}
-\label{PE_zco_star}
+\label{subsec:PE_zco_star}
 
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 \begin{figure}[!b] 	 \begin{center}
 \includegraphics[width=1.0\textwidth]{Fig_z_zstar}
-\caption{	\protect\label{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 ; 
@@ -837,5 +837,5 @@
 detailed in Adcroft and Campin (2004). The major points are summarized
 here. The position ( \textit{z*}) and vertical discretization (\textit{z*}) are expressed as:
-\begin{equation} \label{Eq_z-star}
+\begin{equation} \label{eq:z-star}
 H +  \textit{z*} = (H + z) / r \quad \text{and} \ \delta \textit{z*} = \delta z / r \quad \text{with} \ r = \frac{H+\eta} {H}
 \end{equation} 
@@ -855,5 +855,5 @@
 To overcome problems with vanishing surface and/or bottom cells, we consider the 
 zstar coordinate 
-\begin{equation} \label{PE_}
+\begin{equation} \label{eq:PE_}
 	z^\star = H \left( \frac{z-\eta}{H+\eta} \right)
 \end{equation}
@@ -867,5 +867,5 @@
 The surfaces of constant $z^\star$ are quasi-horizontal. Indeed, the $z^\star$ 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 $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 \S\ref{PE_sco}. 
+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}. 
 Additionally, since $z^\star$ 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 
@@ -873,5 +873,5 @@
 gradient solver. The quasi-horizontal nature of the coordinate surfaces also facilitates the implementation of neutral physics parameterizations in $z^\star$ 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 Section \S\ref{LDF_slp} 
+discussion of neutral physics in $z$-models, as well as \autoref{sec:LDF_slp} 
 in this document for treatment in \NEMO). 
 
@@ -902,5 +902,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Curvilinear terrain-following \textit{s}--coordinate}
-\label{PE_sco}
+\label{subsec:PE_sco}
 
 % -------------------------------------------------------------------------------------------------------------
@@ -915,5 +915,5 @@
 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 
-(\S\ref{PE_zco}), $z-$surfaces are geopotential surfaces. The bottom topography is 
+(\autoref{sec:PE_zco}), $z-$surfaces are geopotential surfaces. The bottom topography is 
 discretised by steps. This often leads to a misrepresentation of a gradually sloping bottom 
 and to large localized depth gradients associated with large localized vertical velocities. 
@@ -937,12 +937,12 @@
 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 Appendix~\ref{Apdx_A}),
-
-\begin{equation} \label{Eq_PE_p_sco}
+in $s$-coordinate consists of two terms (see \autoref{apdx:A}),
+
+\begin{equation} \label{eq:PE_p_sco}
 \left. {\nabla p} \right|_z =\left. {\nabla p} \right|_s -\frac{\partial 
 p}{\partial s}\left. {\nabla z} \right|_s 
 \end{equation}
 
-The second term in \eqref{Eq_PE_p_sco} depends on the tilt of the coordinate surface 
+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$), 
@@ -958,5 +958,5 @@
 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 \S\ref{DOM_zgr}.
+the observed one (see \autoref{sec:DOM_zgr}.
 
 For numerical reasons a minimum of diffusion is required along the coordinate surfaces 
@@ -973,7 +973,7 @@
 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 
 ($i.e.$ the main thermocline) \citep{Madec_al_JPO96}. An alternate solution consists of rotating 
-the lateral diffusive tensor to geopotential or to isoneutral surfaces (see \S\ref{PE_ldf}. 
+the lateral diffusive tensor to geopotential or to isoneutral surfaces (see \autoref{subsec:PE_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 Chapter~\ref{LDF}). 
+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 
@@ -988,5 +988,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{\texorpdfstring{Curvilinear $\tilde{z}$--coordinate}{}}
-\label{PE_zco_tilde}
+\label{subsec:PE_zco_tilde}
 
 The $\tilde{z}$-coordinate has been developed by \citet{Leclair_Madec_OM11}.
@@ -1000,5 +1000,5 @@
 % ================================================================
 \section{Subgrid scale physics}
-\label{PE_zdf_ldf}
+\label{sec:PE_zdf_ldf}
 
 The primitive equations describe the behaviour of a geophysical fluid at 
@@ -1019,6 +1019,6 @@
 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 \eqref{Eq_PE_dyn}, 
-\eqref{Eq_PE_tra_T} and \eqref{Eq_PE_tra_S} are divided into a lateral part  
+\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^{lS}$ and $D^{lT}$ and a vertical part  
 \textbf{D}$^{vU}$, $D^{vS}$ and $D^{vT}$. The formulation of these terms 
@@ -1029,5 +1029,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Vertical subgrid scale physics}
-\label{PE_zdf}
+\label{subsec:PE_zdf}
 
 The model resolution is always larger than the scale at which the major 
@@ -1044,5 +1044,5 @@
 turbulent motions is simply impractical. The resulting vertical momentum and 
 tracer diffusive operators are of second order:
-\begin{equation} \label{Eq_PE_zdf}
+\begin{equation} \label{eq:PE_zdf}
    \begin{split}
 {\vect{D}}^{v \vect{U}} &=\frac{\partial }{\partial z}\left( {A^{vm}\frac{\partial {\vect{U}}_h }{\partial z}} \right) \ , \\         
@@ -1054,9 +1054,9 @@
 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 Chap.~\ref{SBC} and \ref{ZDF} and \S\ref{TRA_bbl}). 
+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 
 ($e.g.$ Richardson number, Brunt-Vais\"{a}l\"{a} frequency...), or computed from a 
-turbulent closure model. The choices available in \NEMO are discussed in \S\ref{ZDF}).
+turbulent closure model. The choices available in \NEMO are discussed in \autoref{chap:ZDF}).
 
 % -------------------------------------------------------------------------------------------------------------
@@ -1064,5 +1064,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Formulation of the lateral diffusive and viscous operators}
-\label{PE_ldf}
+\label{subsec:PE_ldf}
 
 Lateral turbulence can be roughly divided into a mesoscale turbulence 
@@ -1124,6 +1124,6 @@
 \subsubsection{Lateral laplacian tracer diffusive operator}
 
-The lateral Laplacian tracer diffusive operator is defined by (see Appendix~\ref{Apdx_B}):
-\begin{equation} \label{Eq_PE_iso_tensor}
+The lateral Laplacian tracer diffusive operator is defined by (see \autoref{apdx:B}):
+\begin{equation} \label{eq:PE_iso_tensor}
 D^{lT}=\nabla {\rm {\bf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad 
 \mbox{with}\quad \;\;\Re =\left( {{\begin{array}{*{20}c}
@@ -1135,13 +1135,13 @@
 where $r_1 \;\mbox{and}\;r_2 $ are the slopes between the surface along 
 which the diffusive operator acts and the model level ($e. g.$ $z$- or 
-$s$-surfaces). Note that the formulation \eqref{Eq_PE_iso_tensor} is exact for the 
+$s$-surfaces). Note that the formulation \autoref{eq:PE_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  \eqref{Eq_PE_iso_tensor} \citep{Cox1987}. 
+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. 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 Appendix~\ref{Apdx_B}).
+ocean (see \autoref{apdx:B}).
 
 For \textit{iso-level} diffusion, $r_1$ and $r_2 $ are zero. $\Re $ reduces to the identity 
@@ -1150,10 +1150,10 @@
 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 \eqref{Eq_PE_sco_slope} ).
+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. Therefore, they are different quantities,
 but have similar expressions in $z$- and $s$-coordinates. In $z$-coordinates:
-\begin{equation} \label{Eq_PE_iso_slopes}
+\begin{equation} \label{eq:PE_iso_slopes}
 r_1 =\frac{e_3 }{e_1 }	\left( \pd[\rho]{i} \right) \left( \pd[\rho]{k} \right)^{-1} \, \quad
 r_2 =\frac{e_3 }{e_2 }	\left( \pd[\rho]{j} \right) \left( \pd[\rho]{k} \right)^{-1} \,
@@ -1164,5 +1164,5 @@
  When the \textit{eddy induced velocity} parametrisation (eiv) \citep{Gent1990} is used, 
 an additional tracer advection is introduced in combination with the isoneutral diffusion of tracers:
-\begin{equation} \label{Eq_PE_iso+eiv}
+\begin{equation} \label{eq:PE_iso+eiv}
 D^{lT}=\nabla \cdot \left( {A^{lT}\;\Re \;\nabla T} \right)
            +\nabla \cdot \left( {{\vect{U}}^\ast \,T} \right)
@@ -1170,5 +1170,5 @@
 where ${\vect{U}}^\ast =\left( {u^\ast ,v^\ast ,w^\ast } \right)$ is a non-divergent, 
 eddy-induced transport velocity. This velocity field is defined by:
-\begin{equation} \label{Eq_PE_eiv}
+\begin{equation} \label{eq:PE_eiv}
    \begin{split}
  u^\ast  &= +\frac{1}{e_3       }\frac{\partial }{\partial k}\left[ {A^{eiv}\;\tilde{r}_1 } \right] \\ 
@@ -1183,5 +1183,5 @@
 between isoneutral and \emph{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}
+\begin{align} \label{eq:PE_slopes_eiv}
 \tilde{r}_n = \begin{cases}
    r_n            &      \text{in $z$-coordinate}    \\
@@ -1193,14 +1193,14 @@
 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. Chap.~\ref{LDF}).
+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:
-\begin{equation} \label{Eq_PE_bilapT}
+\begin{equation} \label{eq:PE_bilapT}
 D^{lT}= - \Delta \left( \;\Delta T \right) 
 \qquad \text{where} \;\; \Delta \bullet = \nabla \left( {\sqrt{B^{lT}\,}\;\Re \;\nabla \bullet} \right)
  \end{equation}
-It is the Laplacian operator given by \eqref{Eq_PE_iso_tensor} applied twice with 
+It is the Laplacian operator given by \autoref{eq:PE_iso_tensor} applied twice with 
 the harmonic eddy diffusion coefficient set to the square root of the biharmonic one. 
 
@@ -1209,6 +1209,6 @@
 
 The Laplacian momentum diffusive operator along $z$- or $s$-surfaces is found by 
-applying \eqref{Eq_PE_lap_vector} to the horizontal velocity vector (see Appendix~\ref{Apdx_B}):
-\begin{equation} \label{Eq_PE_lapU}
+applying \autoref{eq:PE_lap_vector} to the horizontal velocity vector (see \autoref{apdx:B}):
+\begin{equation} \label{eq:PE_lapU}
 \begin{split}
 {\rm {\bf D}}^{l{\rm {\bf U}}} 
@@ -1225,10 +1225,10 @@
 
 Such a formulation ensures a complete separation between the vorticity and 
-horizontal divergence fields (see Appendix~\ref{Apdx_C}). 
+horizontal divergence fields (see \autoref{apdx:C}). 
 Unfortunately, it is only available in \textit{iso-level} direction. 
 When a rotation is required ($i.e.$ 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{equation} \label{Eq_PE_lapU_iso}
+\begin{equation} \label{eq:PE_lapU_iso}
 \begin{split}
  D_u^{l{\rm {\bf U}}} &= \nabla .\left( {A^{lm} \;\Re \;\nabla u} \right) \\ 
@@ -1236,5 +1236,5 @@
  \end{split}
  \end{equation}
-where $\Re$ is given by  \eqref{Eq_PE_iso_tensor}. It is the same expression as 
+where $\Re$ is given by \autoref{eq:PE_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, $i.e.$ on a $f-$ or 
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics_zstar.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics_zstar.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics_zstar.tex	(revision 9407)
@@ -27,5 +27,5 @@
 To overcome problems with vanishing surface and/or bottom cells, we consider the 
 zstar coordinate 
-\begin{equation} \label{PE_}
+\begin{equation} \label{eq:PE_}
 	z^\star = H \left( \frac{z-\eta}{H+\eta} \right)
 \end{equation}
@@ -39,5 +39,5 @@
 The surfaces of constant $z^\star$ are quasi-horizontal. Indeed, the $z^\star$ 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 $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 \S\ref{PE_sco}. 
+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}. 
 Additionally, since $z^\star$ 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 
@@ -45,5 +45,5 @@
 gradient solver. The quasi-horizontal nature of the coordinate surfaces also facilitates the implementation of 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 Section \S\ref{LDF_slp} 
+discussion of neutral physics in $z$-models, as well as  \autoref{sec:LDF_slp} 
 in this document for treatment in \NEMO). 
 
@@ -76,10 +76,10 @@
 % ================================================================
 \section{Surface pressure gradient and sea surface heigth (\protect\mdl{dynspg})}
-\label{DYN_hpg_spg}
+\label{sec:DYN_hpg_spg}
 %-----------------------------------------nam_dynspg----------------------------------------------------
 \forfile{../namelists/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 (\S\ref{PE_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 (\S\ref{PE_free_surface}) and rigid lid (\S\ref{PE_rigid_lid}), the vertical scale factors $e_{3}$ are fixed in time, while in the nonlinear case (\S\ref{PE_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 \eqref{Eq_PE_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}.
+The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}). The main distinction is between the fixed volume case (linear free surface or rigid lid) and 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}), the vertical scale factors $e_{3}$ are fixed in time, while in the nonlinear case (\autoref{subsec:PE_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}), 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}.
 
 %-------------------------------------------------------------
@@ -87,8 +87,8 @@
 %-------------------------------------------------------------
 \subsubsection{Explicit (\protect\key{dynspg\_exp})}
-\label{DYN_spg_exp}
+\label{subsec:DYN_spg_exp}
 
 In the explicit free surface formulation, the model time step is chosen small enough to describe the external gravity waves (typically a few ten seconds). The sea surface height is given by :
-\begin{equation} \label{Eq_dynspg_ssh}
+\begin{equation} \label{eq: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} 
@@ -96,8 +96,8 @@
 \end{equation}
 
-where EMP is the surface freshwater budget (evaporation minus precipitation, and minus river runoffs (if the later are introduced as a surface freshwater flux, see \S\ref{SBC}) expressed in $Kg.m^{-2}.s^{-1}$, 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, i.e. the velocity appearing in (\ref{Eq_dynspg_ssh}) is centred in time (\textit{now} velocity). 
+where EMP is the surface freshwater budget (evaporation minus precipitation, and minus river runoffs (if the later are introduced as a surface freshwater flux, see \autoref{chap:SBC}) expressed in $Kg.m^{-2}.s^{-1}$, 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, i.e. the velocity appearing in (\autoref{eq:dynspg_ssh}) is centred in time (\textit{now} velocity). 
 
 The surface pressure gradient, also evaluated using a leap-frog scheme, is then simply given by :
-\begin{equation} \label{Eq_dynspg_exp}
+\begin{equation} \label{eq:dynspg_exp}
 \left\{ \begin{aligned}
  - \frac{1}    						{e_{1u}} \;	\delta _{i+1/2} \left[  \,\eta\,  \right] 	\\
@@ -107,5 +107,5 @@
 \end{equation} 
 
-Consistent with the linearization, a $\left. \rho \right|_{k=1} / \rho _o$ factor is omitted in (\ref{Eq_dynspg_exp}). 
+Consistent with the linearization, a $\left. \rho \right|_{k=1} / \rho _o$ factor is omitted in (\autoref{eq:dynspg_exp}). 
 
 %-------------------------------------------------------------
@@ -113,5 +113,5 @@
 %-------------------------------------------------------------
 \subsubsection{Split-explicit time-stepping (\protect\key{dynspg\_ts})}
-\label{DYN_spg_ts}
+\label{subsec:DYN_spg_ts}
 %--------------------------------------------namdom----------------------------------------------------
 \forfile{../namelists/namdom} 
@@ -124,5 +124,5 @@
 \begin{figure}[!t] 	\begin{center}
 \includegraphics[width=0.90\textwidth]{Fig_DYN_dynspg_ts}
-\caption{	 \protect\label{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 
@@ -151,9 +151,9 @@
 scheme using the small barotropic time step $\Delta t$. We have 
 
-\begin{equation} \label{DYN_spg_ts_eta}
+\begin{equation} \label{eq:DYN_spg_ts_eta}
 \eta^{(b)}(\tau,t_{n+1}) - \eta^{(b)}(\tau,t_{n+1}) (\tau,t_{n-1})
 	= 2 \Delta t \left[-\nabla \cdot \textbf{U}^{(b)}(\tau,t_n) + \text{EMP}_w(\tau) \right] 
 \end{equation}
-\begin{multline} \label{DYN_spg_ts_u}
+\begin{multline} \label{eq: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}) 
@@ -165,9 +165,9 @@
 and $U^{(b)}$ denotes the baroclinic time at which the vertically integrated forcing $\textbf{M}(\tau)$ (note that this forcing includes the surface freshwater forcing), the tracer fields, 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 
-\begin{equation} \label{DYN_spg_ts_t}
+\begin{equation} \label{eq:DYN_spg_ts_t}
 t_n=\tau+n\Delta t   
 \end{equation}
 with $n$ an integer. The density scaled surface pressure is evaluated via 
-\begin{equation} \label{DYN_spg_ts_ps}
+\begin{equation} \label{eq:DYN_spg_ts_ps}
 p_s^{(b)}(\tau,t_{n}) = \begin{cases}
 	g \;\eta_s^{(b)}(\tau,t_{n}) \;\rho(\tau)_{k=1}) / \rho_o  &      \text{non-linear case} \\
@@ -176,5 +176,5 @@
 \end{equation}
 To get started, we assume the following initial conditions 
-\begin{equation} \label{DYN_spg_ts_eta}
+\begin{equation} \label{eq:DYN_spg_ts_eta}
 \begin{split}
 \eta^{(b)}(\tau,t_{n=0}) &= \overline{\eta^{(b)}(\tau)}
@@ -184,9 +184,9 @@
 \end{equation}
 with 
-\begin{equation} \label{DYN_spg_ts_etaF}
+\begin{equation} \label{eq:DYN_spg_ts_etaF}
  \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\Delta t,t_{n})
 \end{equation}
 the time averaged surface height taken from the previous barotropic cycle. Likewise, 
-\begin{equation} \label{DYN_spg_ts_u}
+\begin{equation} \label{eq:DYN_spg_ts_u}
 \textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)}	\\
 \\
@@ -194,5 +194,5 @@
 \end{equation}
 with 
-\begin{equation} \label{DYN_spg_ts_u}
+\begin{equation} \label{eq: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})
@@ -201,5 +201,5 @@
 
 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$ 
-\begin{equation} \label{DYN_spg_ts_u}
+\begin{equation} \label{eq: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})
@@ -207,5 +207,5 @@
 The surface height on the new baroclinic time step is then determined via a baroclinic leap-frog using the following form 
 
-\begin{equation} \label{DYN_spg_ts_ssh}
+\begin{equation} \label{eq: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}
@@ -214,15 +214,15 @@
  
 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 \ref{DYN_spg_ts_ssh}. We 
+height field due to the leap-frog splitting mode in equation \autoref{eq:DYN_spg_ts_ssh}. We 
 have tried various forms of such filtering, with the following method discussed in 
 Griffies et al. (2001) chosen due to its stability and reasonably good maintenance of 
-tracer conservation properties (see Section ??) 
-
-\begin{equation} \label{DYN_spg_ts_sshf}
+tracer conservation properties (see ??) 
+
+\begin{equation} \label{eq:DYN_spg_ts_sshf}
 \eta^{F}(\tau-\Delta) =  \overline{\eta^{(b)}(\tau)} 
 \end{equation}
 Another approach tried was 
 
-\begin{equation} \label{DYN_spg_ts_sshf2}
+\begin{equation} \label{eq:DYN_spg_ts_sshf2}
 \eta^{F}(\tau-\Delta) = \eta(\tau) 
 	+ (\alpha/2) \left[\overline{\eta^{(b)}}(\tau+\Delta t)
@@ -232,5 +232,5 @@
 which is useful since it isolates all the time filtering aspects into the term multiplied 
 by $\alpha$. This isolation allows for an easy check that tracer conservation is exact when 
-eliminating tracer and surface height time filtering (see Section ?? for more complete discussion). However, in the general case with a non-zero $\alpha$, the filter \ref{DYN_spg_ts_sshf} was found to be more conservative, and so is recommended. 
+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. 
 
 
@@ -242,8 +242,8 @@
 %-------------------------------------------------------------
 \subsubsection{Filtered formulation (\protect\key{dynspg\_flt})}
-\label{DYN_spg_flt}
+\label{subsec: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 \S\ref{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}
+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 !}
@@ -253,7 +253,7 @@
 %-------------------------------------------------------------
 \subsection{Non-linear free surface formulation (\protect\key{vvl})}
-\label{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. The three time-stepping methods (explicit, split-explicit and filtered) are the same as in \S\ref{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.
+\label{subsec: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. 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. In particular, this means that in filtered case, the matrix to be inverted has to be recomputed at each time-step.
 
 
Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_time_domain.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_time_domain.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/chap_time_domain.tex	(revision 9407)
@@ -6,5 +6,5 @@
 % ================================================================
 \chapter{Time Domain (STP) }
-\label{STP}
+\label{chap:STP}
 \minitoc
 
@@ -22,5 +22,5 @@
 
 
-Having defined the continuous equations in Chap.~\ref{PE}, we need now to choose 
+Having defined the continuous equations in \autoref{chap:PE}, we need now to choose 
 a time discretization, a key feature of an ocean model as it exerts a strong influence  
 on the structure of the computer code ($i.e.$ on its flowchart). 
@@ -34,9 +34,9 @@
 % ================================================================
 \section{Time stepping environment}
-\label{STP_environment}
+\label{sec:STP_environment}
 
 The time stepping used in \NEMO is a three level scheme that can be 
 represented as follows:
-\begin{equation} \label{Eq_STP}
+\begin{equation} \label{eq:STP}
    x^{t+\rdt} = x^{t-\rdt} + 2 \, \rdt \  \text{RHS}_x^{t-\rdt,\,t,\,t+\rdt}
 \end{equation} 
@@ -57,5 +57,5 @@
 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 
-\eqref{Eq_STP}) prior to time-stepping the equation. Generally, the time 
+\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 
@@ -66,10 +66,10 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{Non-diffusive part --- Leapfrog scheme}
-\label{STP_leap_frog}
+\label{sec:STP_leap_frog}
 
 The time stepping used for processes other than diffusion is the well-known leapfrog
 scheme \citep{Mesinger_Arakawa_Bk76}.  This scheme is widely used for advection 
 processes in low-viscosity fluids. It is a time centred scheme, $i.e.$ 
-the RHS in \eqref{Eq_STP} is evaluated at time step $t$, the now time step. 
+the RHS in \autoref{eq:STP} is evaluated at time step $t$, the now time step. 
 It may be used for momentum and tracer advection, 
 pressure gradient, and Coriolis terms, but not for diffusion terms.
@@ -87,10 +87,10 @@
 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}
+\begin{equation} \label{eq:STP_asselin}
 x_F^t  = x^t + \gamma \, \left[ x_F^{t-\rdt} - 2 x^t + x^{t+\rdt} \right]
 \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 \S~\ref{STP_mLF}), 
+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}). 
 The addition of a time filter degrades the accuracy of the 
@@ -110,12 +110,12 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{Diffusive part --- Forward or backward scheme}
-\label{STP_forward_imp}
+\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 
-(when present, see \S~\ref{TRA_dmp}), a forward time differencing scheme
+(when present, see \autoref{sec:TRA_dmp}), a forward time differencing scheme
  is used :
-\begin{equation} \label{Eq_STP_euler}
+\begin{equation} \label{eq:STP_euler}
    x^{t+\rdt} = x^{t-\rdt} + 2 \, \rdt \ {D_x}^{t-\rdt}
 \end{equation} 
@@ -123,5 +123,5 @@
 This is diffusive in time and conditionally stable. The 
 conditions for stability of second and fourth order horizontal diffusion schemes are \citep{Griffies_Bk04}:
-\begin{equation} \label{Eq_STP_euler_stability}
+\begin{equation} \label{eq:STP_euler_stability}
 A^h < \left\{
 \begin{aligned}
@@ -132,5 +132,5 @@
 \end{equation}
 where $e$ is the smallest grid size in the two horizontal directions and $A^h$ is 
-the mixing coefficient. The linear constraint \eqref{Eq_STP_euler_stability} 
+the mixing coefficient. The linear constraint \autoref{eq:STP_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 
@@ -146,5 +146,5 @@
 stability criterion is reduced by a factor of $N$. The computation is performed as 
 follows:
-\begin{equation} \label{Eq_STP_ts}
+\begin{equation} \label{eq:STP_ts}
 \begin{split}
 & x_\ast ^{t-\rdt} = x^{t-\rdt}   \\
@@ -158,5 +158,5 @@
 by setting \np{nn\_zdfexp}, (namelist parameter). The scheme $(b)$ is unconditionally 
 stable but diffusive. It can be written as follows:
-\begin{equation} \label{Eq_STP_imp}
+\begin{equation} \label{eq:STP_imp}
    x^{t+\rdt} = x^{t-\rdt} + 2 \, \rdt \  \text{RHS}_x^{t+\rdt}
 \end{equation} 
@@ -170,5 +170,5 @@
 the forward time differencing scheme. For example, the finite difference 
 approximation of the temperature equation is:
-\begin{equation} \label{Eq_STP_imp_zdf}
+\begin{equation} \label{eq:STP_imp_zdf}
 \frac{T(k)^{t+1}-T(k)^{t-1}}{2\;\rdt}\equiv \text{RHS}+\frac{1}{e_{3t} }\delta 
 _k \left[ {\frac{A_w^{vT} }{e_{3w} }\delta _{k+1/2} \left[ {T^{t+1}} \right]} 
@@ -176,6 +176,6 @@
 \end{equation}
 where RHS is the right hand side of the equation except for the vertical diffusion term. 
-We rewrite \eqref{Eq_STP_imp} as:
-\begin{equation} \label{Eq_STP_imp_mat}
+We rewrite \autoref{eq:STP_imp} as:
+\begin{equation} \label{eq:STP_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}
@@ -187,5 +187,5 @@
 \end{align*}
 
-\eqref{Eq_STP_imp_mat} is a linear system of equations with an associated 
+\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, therefore a special 
@@ -199,5 +199,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{Surface pressure gradient}
-\label{STP_spg_ts}
+\label{sec:STP_spg_ts}
 
 ===>>>>  TO BE written....  :-)
@@ -207,5 +207,5 @@
 \begin{figure}[!t] 	  \begin{center}
 \includegraphics[width=0.7\textwidth]{Fig_TimeStepping_flowchart}
-\caption{ 	\protect\label{Fig_TimeStep_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
@@ -215,5 +215,5 @@
 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 \S~\ref{DYN_spg}). }
+(see \autoref{sec:DYN_spg}). }
 \end{center}   \end{figure}
 %>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -224,5 +224,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{Modified Leapfrog -- Asselin filter scheme}
-\label{STP_mLF}
+\label{sec:STP_mLF}
 
 Significant changes have been introduced by \cite{Leclair_Madec_OM09} in the 
@@ -233,15 +233,15 @@
 In a classical LF-RA environment, the forcing term is centred in time, $i.e.$ 
 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 \eqref{Eq_STP_asselin} 
+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. 
 In the modified LF-RA environment, these two formulations have been replaced by:
 \begin{align} 
-x^{t+\rdt}  &= x^{t-\rdt} + \rdt \left( Q^{t-\rdt/2} + Q^{t+\rdt/2} \right)                   \label{Eq_STP_forcing} \\
+x^{t+\rdt}  &= x^{t-\rdt} + \rdt \left( Q^{t-\rdt/2} + Q^{t+\rdt/2} \right)                   \label{eq:STP_forcing} \\
 %
 x_F^t  &= x^t + \gamma \, \left[ x_F^{t-\rdt} - 2 x^t + x^{t+\rdt} \right] 
-           - \gamma\,\rdt \, \left[ Q^{t+\rdt/2} -  Q^{t-\rdt/2} \right]                          \label{Eq_STP_RA}
+           - \gamma\,\rdt \, \left[ Q^{t+\rdt/2} -  Q^{t-\rdt/2} \right]                          \label{eq:STP_RA}
 \end{align}
-The change in the forcing formulation given by \eqref{Eq_STP_forcing} 
-(see Fig.\ref{Fig_MLF_forcing}) has a significant effect: the forcing term no 
+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}. 
 % forcing seen by the model....
@@ -250,10 +250,10 @@
 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 \eqref{Eq_STP_RA} compared to \eqref{Eq_STP_asselin}). Since 
+(last term in \autoref{eq:STP_RA} compared to \autoref{eq:STP_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, 
-\eqref{Eq_STP_forcing} used in combination with a careful treatment of static 
-instability (\S\ref{ZDF_evd}) and of the TKE physics (\S\ref{ZDF_tke_ene}),
+\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, allows a reduction by 
 two orders of magnitude of the Asselin filter parameter. 
@@ -261,5 +261,5 @@
 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, \eqref{Eq_STP_RA}, allows an exact evaluation of the 
+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, 
 even if separated by only $\rdt$ since the time filter is no longer applied to the
@@ -269,5 +269,5 @@
 \begin{figure}[!t] 	  \begin{center}
 \includegraphics[width=0.90\textwidth]{Fig_MLF_forcing}
-\caption{ 	\protect\label{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 
@@ -283,5 +283,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \section{Start/Restart strategy}
-\label{STP_rst}
+\label{sec:STP_rst}
 
 %--------------------------------------------namrun-------------------------------------------
@@ -291,8 +291,8 @@
 The first time step of this three level scheme when starting from initial conditions 
 is a forward step (Euler time integration): 
-\begin{equation} \label{Eq_DOM_euler}
+\begin{equation} \label{eq:DOM_euler}
 	x^1 = x^0 + \rdt \ \text{RHS}^0
 \end{equation}
-This is done simply by keeping the leapfrog environment ($i.e.$ the \eqref{Eq_STP} 
+This is done simply by keeping the leapfrog environment ($i.e.$ the \autoref{eq:STP} 
 three level time stepping) but setting all $x^0$ (\textit{before}) and $x^{1}$ (\textit{now}) fields 
 equal at the first time step and using half the value of $\rdt$.
@@ -307,5 +307,5 @@
 
 Note that when a semi-implicit scheme is used to evaluate the hydrostatic pressure 
-gradient (see \S\ref{DYN_hpg_imp}), an extra three-dimensional field has to be 
+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
@@ -335,5 +335,5 @@
 % -------------------------------------------------------------------------------------------------------------
 \subsection{Time domain}
-\label{STP_time}
+\label{subsec:STP_time}
 %--------------------------------------------namrun-------------------------------------------
 \forfile{../namelists/namdom}         
Index: branches/2017/dev_merge_2017/DOC/tex_sub/introduction.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/introduction.tex	(revision 9406)
+++ branches/2017/dev_merge_2017/DOC/tex_sub/introduction.tex	(revision 9407)
@@ -29,5 +29,5 @@
 model coupled with the sea-ice and/or the atmosphere.  
 
-This manual is organised in as follows. Chapter~\ref{PE} presents the model basics, 
+This manual is organised in as follows. \autoref{chap:PE} presents the model basics, 
 $i.e.$ the equations and their assumptions, the vertical coordinates used, and the 
 subgrid scale physics. This part deals with the continuous equations of the model 
@@ -39,9 +39,9 @@
 are used throughout.
 
-The following chapters deal with the discrete equations. Chapter~\ref{STP} presents the 
+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.
-Chapter~\ref{DOM} presents the space domain. The model is discretised on a staggered 
+\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. 
@@ -50,5 +50,5 @@
 the corresponding rescaled height coordinate formulation (\textit{z*} or \textit{s*}) is used 
 (the level position then vary in time as a function of the sea surface heigh). 
-The following two chapters (\ref{TRA} and \ref{DYN}) describe the discretisation of the 
+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. 
@@ -57,5 +57,5 @@
 order advection schemes, including positive ones).
 
-Surface boundary conditions (chapter~\ref{SBC}) can be implemented as prescribed
+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 
@@ -69,5 +69,5 @@
 is still not available.
 
-Other model characteristics are the lateral boundary conditions (chapter~\ref{LBC}).  
+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 
@@ -75,5 +75,5 @@
 conditions are possible. 
 
-Physical parameterisations are described in chapters~\ref{LDF} and \ref{ZDF}. The 
+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 
@@ -112,15 +112,15 @@
 %%gm  end
 
-Model outputs management and specific online diagnostics are described in chapters~\ref{DIA}.
+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... 
-Chapter~\ref{OBS} describes a tool which reads in observation files (profile temperature 
+\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. Chapter~\ref{ASM} describes how increments 
+tool for model and data comparison. \autoref{chap:ASM} describes how increments 
 produced by data assimilation may be applied to the model equations.
-Finally, Chapter~\ref{CFG} provides a brief introduction to the pre-defined model 
+Finally, \autoref{chap:CFG} provides a brief introduction to the pre-defined model 
 configurations (water column model, ORCA and GYRE families of configurations).
 
@@ -132,5 +132,5 @@
 include conventions for naming variables, with different starting letters for different types 
 of variables (real, integer, parameter\ldots). Those rules are briefly presented in 
-Appendix~\ref{Apdx_D} and a more complete document is available on the \NEMO web site.
+\autoref{apdx:D} and a more complete document is available on the \NEMO web site.
 
 The model is organized with a high internal modularity based on physics. For example, 
@@ -139,11 +139,11 @@
 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 Appendix~\ref{Apdx_D}.      %====>>>> to be done !
+%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 (Tab.~\ref{Tab_chap}). 
+as indicated by the first three letters of their name (\autoref{tab:chap}).
 
 The manual mirrors the organization of the model. 
-After the presentation of the continuous equations (Chapter \ref{PE}), the following chapters 
-refer to specific terms of the equations each associated with a group of modules (Tab.~\ref{Tab_chap}).
+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:chap}).
 
 
@@ -151,19 +151,19 @@
 \begin{table}[!t]	
 %\begin{center} \begin{tabular}{|p{143pt}|l|l|}	\hline
-\caption{ \protect\label{Tab_chap}   Organization of Chapters mimicking the one of the model directories. }
+\caption{ \protect\label{tab:chap}   Organization of Chapters mimicking the one of the model directories. }
 \begin{center} 	\begin{tabular}{|l|l|l|}	\hline
-Chapter \ref{STP}	& -   		        & model time STePping environment \\		\hline
-Chapter \ref{DOM}	& DOM		& model DOMain \\		\hline
-Chapter \ref{TRA}	& TRA		& TRAcer equations (potential temperature and salinity) \\   \hline
-Chapter \ref{DYN}	& DYN		& DYNamic equations (momentum) \\		\hline
-Chapter \ref{SBC} 	& SBC		& Surface Boundary Conditions \\			\hline
-Chapter \ref{LBC}	& LBC		& Lateral Boundary Conditions (also OBC and BDY)  \\ 		\hline
-Chapter \ref{LDF}	& LDF		& Lateral DiFfusion (parameterisations) \\	\hline
-Chapter \ref{ZDF}	& ZDF		& vertical (Z) DiFfusion (parameterisations)  \\		\hline
-Chapter \ref{DIA}	& DIA		& I/O and DIAgnostics (also IOM, FLO and TRD) \\		\hline
-Chapter \ref{OBS}	& OBS		& OBServation and model comparison  \\		\hline
-Chapter \ref{ASM}	& ASM		& ASsiMilation increment  \\		\hline
-Chapter \ref{MISC}	& SOL		& Miscellaneous  topics (including solvers)  \\       \hline
-Chapter \ref{CFG}	&  - 			& predefined configurations (including C1D) \\		\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}
Index: branches/2017/dev_merge_2017/DOC/variables_checking.sh
===================================================================
--- branches/2017/dev_merge_2017/DOC/variables_checking.sh	(revision 9407)
+++ branches/2017/dev_merge_2017/DOC/variables_checking.sh	(revision 9407)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+#set -euvx
+
+#shared_namelist_files=$( ls ../NEMOGCM/CONFIG/SHARED/namelist_* )
+shared_namelist_files=$( ls ~/Workspace/NEMO/branches/trunk/NEMOGCM/CONFIG/SHARED/namelist_* )
+
+namelist_variables=$( awk '($1 ~ /[cdlnrsy]n_/ ) {print $1}' ${shared_namelist_files} \
+								| sed 's/[=(].*//' | sort -u												)
+
+for variable in ${namelist_variables}; do
+	[[ $( grep ${variable/_/\\\\\\\\_} tex_sub/*.tex ) ]] && echo $variable ${variable//_/\\\\\\\\_} && exit 0
+done
+
+exit 0
