Index: branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIA.tex
===================================================================
--- branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIA.tex	(revision 9394)
+++ 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.
 
