New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 9407 for branches/2017 – NEMO

Changeset 9407 for branches/2017


Ignore:
Timestamp:
2018-03-15T17:40:35+01:00 (6 years ago)
Author:
nicolasmartin
Message:

Complete refactoring of cross-referencing

  • Use of \autoref instead of simple \ref for contextual text depending on target type
  • creation of few prefixes for marker to identify the type reference: apdx|chap|eq|fig|sec|subsec|tab
Location:
branches/2017/dev_merge_2017/DOC
Files:
3 added
25 edited
5 moved

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/DOC/HTML_htlatex.sh

    r9394 r9407  
    11#!/bin/bash 
    22 
    3 latex     -shell-escape NEMO_manual 
    4 makeindex               NEMO_manual 
    5 bibtex                  NEMO_manual 
    6 latex     -shell-escape NEMO_manual 
     3./inc/clean.sh 
     4./inc/build.sh 
    75 
    86mkdir -p html_htlatex 
    9 htlatex NEMO_manual "htlatex,2" "" "-dhtml_htlatex/" "-shell-escape" 
     7cd tex_main 
     8htlatex NEMO_manual "NEMO_manual,2" "" "-d../html_htlatex/" "-shell-escape" 
     9cd - 
    1010 
    1111exit 0 
  • branches/2017/dev_merge_2017/DOC/HTML_latex2html.sh

    r9394 r9407  
    11#!/bin/bash 
    22 
     3./inc/clean.sh 
     4./inc/build.sh 
     5 
     6cd tex_main 
    37sed -i -e 's#\\documentclass#%\\documentclass#' -e '/{document}/ s/^/%/' \ 
    4    texfiles/chapters/*.tex 
    5 sed -i    '30,${s#\\subfile{#\\include{#g}' \ 
     8   ../tex_sub/*.tex 
     9sed -i    's#\\subfile{#\\include{#g' \ 
    610   NEMO_manual.tex 
    7  
    8 latex     -shell-escape    NEMO_manual 
    9 makeindex                  NEMO_manual 
    10 bibtex                     NEMO_manual 
    11  
    12 latex2html -local_icons -no_footnode -split 4 -link 2 -mkdir -dir html_LaTeX2HTML   \ 
    13             $*                                                                      \ 
     11latex2html -local_icons -no_footnode -split 4 -link 2 -mkdir -dir ../html_LaTeX2HTML   \ 
     12            $*                                                                         \ 
    1413   NEMO_manual 
    15  
    1614sed -i -e 's#%\\documentclass#\\documentclass#' -e '/{document}/ s/^%//' \ 
    17    texfiles/chapters/*.tex 
    18 sed -i    '30,${s#\\include{#\\subfile{#g}' \ 
     15   ../tex_sub/*.tex 
     16sed -i    's#\\include{#\\subfile{#g' \ 
    1917   NEMO_manual.tex 
     18cd - 
    2019 
    2120exit 0 
  • branches/2017/dev_merge_2017/DOC/inc/build.sh

    r9394 r9407  
    1111latex       ${latex_opts}           ${latex_file} 
    1212 
    13 pdflatex    ${latex_opts}           ${latex_file} 
    14  
    15 mv ${latex_file}.pdf .. 
    16  
    1713cd - 
    1814 
  • branches/2017/dev_merge_2017/DOC/inc/clean.sh

    r9394 r9407  
    11#!/bin/bash 
    22 
    3 rm -f $( ls -1 tex_main/NEMO_* | egrep -v "\.(bib|ist|sty|tex)$" ) 
     3rm -f $( ls -1 tex_main/NEMO_* | egrep -v "\.(bib|cfg|ist|sty|tex)$" ) 
    44#rm -rf _minted-* 
    55#rm -rf html* 
  • branches/2017/dev_merge_2017/DOC/tex_main/NEMO_manual.cfg

    r9394 r9407  
    1 \Preamble{html} 
     1\Preamble{xhtml,mathml} 
     2 
     3\Configure{@HEAD}{% 
     4\HCode{<script type="text/javascript" 
     5   src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=MML_CHTML"> 
     6 </script>\Hnewline}} 
    27 
    38\begin{document} 
  • branches/2017/dev_merge_2017/DOC/tex_sub/annex_A.tex

    r9393 r9407  
    66% ================================================================ 
    77\chapter{Curvilinear $s-$Coordinate Equations} 
    8 \label{Apdx_A} 
     8\label{apdx:A} 
    99\minitoc 
    1010 
     
    1616% ================================================================ 
    1717\section{Chain rule for $s-$coordinates} 
    18 \label{Apdx_A_continuity} 
     18\label{sec:A_continuity} 
    1919 
    2020In order to establish the set of Primitive Equation in curvilinear $s$-coordinates 
    2121($i.e.$ an orthogonal curvilinear coordinate in the horizontal and an Arbitrary Lagrangian  
    2222Eulerian (ALE) coordinate in the vertical), we start from the set of equations established  
    23 in \S\ref{PE_zco_Eq} for the special case $k = z$ and thus $e_3 = 1$, and we introduce  
     23in \autoref{subsec:PE_zco_Eq} for the special case $k = z$ and thus $e_3 = 1$, and we introduce  
    2424an arbitrary vertical coordinate $a = a(i,j,z,t)$. Let us define a new vertical scale factor by  
    2525$e_3 = \partial z / \partial s$ (which now depends on $(i,j,z,t)$) and the horizontal  
    2626slope of $s-$surfaces by : 
    27 \begin{equation} \label{Apdx_A_s_slope} 
     27\begin{equation} \label{apdx:A_s_slope} 
    2828\sigma _1 =\frac{1}{e_1 }\;\left. {\frac{\partial z}{\partial i}} \right|_s  
    2929\quad \text{and} \quad  
     
    3333The chain rule to establish the model equations in the curvilinear $s-$coordinate  
    3434system is: 
    35 \begin{equation} \label{Apdx_A_s_chain_rule} 
     35\begin{equation} \label{apdx:A_s_chain_rule} 
    3636\begin{aligned} 
    3737&\left. {\frac{\partial \bullet }{\partial t}} \right|_z  = 
     
    5454In particular applying the time derivative chain rule to $z$ provides the expression  
    5555for $w_s$,  the vertical velocity of the $s-$surfaces referenced to a fix z-coordinate: 
    56 \begin{equation} \label{Apdx_A_w_in_s} 
     56\begin{equation} \label{apdx:A_w_in_s} 
    5757w_s   =  \left.   \frac{\partial z }{\partial t}   \right|_s  
    5858            = \frac{\partial z}{\partial s} \; \frac{\partial s}{\partial t}  
     
    6565% ================================================================ 
    6666\section{Continuity equation in $s-$coordinates} 
    67 \label{Apdx_A_continuity} 
    68  
    69 Using (\ref{Apdx_A_s_chain_rule}) and the fact that the horizontal scale factors  
     67\label{sec:A_continuity} 
     68 
     69Using (\autoref{apdx:A_s_chain_rule}) and the fact that the horizontal scale factors  
    7070$e_1$ and $e_2$ do not depend on the vertical coordinate, the divergence of  
    7171the velocity relative to the ($i$,$j$,$z$) coordinate system is transformed as follows 
     
    131131Introducing the dia-surface velocity component, $\omega $, defined as  
    132132the volume flux across the moving $s$-surfaces per unit horizontal area: 
    133 \begin{equation} \label{Apdx_A_w_s} 
     133\begin{equation} \label{apdx:A_w_s} 
    134134\omega  = w - w_s - \sigma _1 \,u - \sigma _2 \,v    \\ 
    135135\end{equation} 
    136 with $w_s$ given by \eqref{Apdx_A_w_in_s}, we obtain the expression for  
     136with $w_s$ given by \autoref{apdx:A_w_in_s}, we obtain the expression for  
    137137the divergence of the velocity in the curvilinear $s-$coordinate system: 
    138138\begin{subequations}  
     
    167167\end{subequations} 
    168168 
    169 As a result, the continuity equation \eqref{Eq_PE_continuity} in the  
     169As a result, the continuity equation \autoref{eq:PE_continuity} in the  
    170170$s-$coordinates is: 
    171 \begin{equation} \label{Apdx_A_sco_Continuity} 
     171\begin{equation} \label{apdx:A_sco_Continuity} 
    172172\frac{1}{e_3 } \frac{\partial e_3}{\partial t}  
    173173+ \frac{1}{e_1 \,e_2 \,e_3 }\left[  
     
    184184% ================================================================ 
    185185\section{Momentum equation in $s-$coordinate} 
    186 \label{Apdx_A_momentum} 
     186\label{sec:A_momentum} 
    187187 
    188188Here we only consider the first component of the momentum equation,  
     
    193193$\bullet$ \textbf{Total derivative in vector invariant form} 
    194194 
    195 Let us consider \eqref{Eq_PE_dyn_vect}, the first component of the momentum  
     195Let us consider \autoref{eq:PE_dyn_vect}, the first component of the momentum  
    196196equation in the vector invariant form. Its total $z-$coordinate time derivative,  
    197197$\left. \frac{D u}{D t} \right|_z$ can be transformed as follows in order to obtain  
     
    258258\end{subequations} 
    259259% 
    260 Applying the time derivative chain rule (first equation of (\ref{Apdx_A_s_chain_rule})) 
    261 to $u$ and using (\ref{Apdx_A_w_in_s}) provides the expression of the last term  
     260Applying the time derivative chain rule (first equation of (\autoref{apdx:A_s_chain_rule})) 
     261to $u$ and using (\autoref{apdx:A_w_in_s}) provides the expression of the last term  
    262262of the right hand side, 
    263263\begin{equation*} {\begin{array}{*{20}l}  
     
    269269leads to the $s-$coordinate formulation of the total $z-$coordinate time derivative,  
    270270$i.e.$ the total $s-$coordinate time derivative : 
    271 \begin{align} \label{Apdx_A_sco_Dt_vect} 
     271\begin{align} \label{apdx:A_sco_Dt_vect} 
    272272\left. \frac{D u}{D t} \right|_s  
    273273  = \left. {\frac{\partial u }{\partial t}} \right|_s        
     
    285285 
    286286Let us start from the total time derivative in the curvilinear $s-$coordinate system  
    287 we have just establish. Following the procedure used to establish (\ref{Eq_PE_flux_form}),  
     287we have just establish. Following the procedure used to establish (\autoref{eq:PE_flux_form}),  
    288288it can be transformed into : 
    289289%\begin{subequations}  
     
    356356which leads to the $s-$coordinate flux formulation of the total $s-$coordinate time derivative,  
    357357$i.e.$ the total $s-$coordinate time derivative in flux form : 
    358 \begin{flalign}\label{Apdx_A_sco_Dt_flux} 
     358\begin{flalign}\label{apdx:A_sco_Dt_flux} 
    359359\left. \frac{D u}{D t} \right|_s   = \frac{1}{e_3}  \left. \frac{\partial ( e_3\,u)}{\partial t} \right|_s   
    360360           + \left.  \nabla \cdot \left(   {{\rm {\bf U}}\,u}   \right)    \right|_s 
     
    365365It has the same form as in the $z-$coordinate but for the vertical scale factor  
    366366that has appeared inside the time derivative which comes from the modification  
    367 of (\ref{Apdx_A_sco_Continuity}), the continuity equation. 
     367of (\autoref{apdx:A_sco_Continuity}), the continuity equation. 
    368368 
    369369$\ $\newline    % force a new ligne 
     
    381381\end{equation*} 
    382382Applying similar manipulation to the second component and replacing  
    383 $\sigma _1$ and $\sigma _2$ by their expression \eqref{Apdx_A_s_slope}, it comes: 
    384 \begin{equation} \label{Apdx_A_grad_p} 
     383$\sigma _1$ and $\sigma _2$ by their expression \autoref{apdx:A_s_slope}, it comes: 
     384\begin{equation} \label{apdx:A_grad_p} 
    385385\begin{split} 
    386386 -\frac{1}{\rho _o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z 
     
    394394\end{equation} 
    395395 
    396 An additional term appears in (\ref{Apdx_A_grad_p}) which accounts for the  
     396An additional term appears in (\autoref{apdx:A_grad_p}) which accounts for the  
    397397tilt of $s-$surfaces with respect to geopotential $z-$surfaces. 
    398398 
     
    408408\end{equation*} 
    409409Therefore, $p$ and $p_h'$ are linked through: 
    410 \begin{equation} \label{Apdx_A_pressure} 
     410\begin{equation} \label{apdx:A_pressure} 
    411411   p = \rho_o \; p_h' + g \, ( z + \eta ) 
    412412\end{equation} 
     
    416416\end{equation*} 
    417417 
    418 Substituing \eqref{Apdx_A_pressure} in \eqref{Apdx_A_grad_p} and using the definition of  
     418Substituing \autoref{apdx:A_pressure} in \autoref{apdx:A_grad_p} and using the definition of  
    419419the density anomaly it comes the expression in two parts: 
    420 \begin{equation} \label{Apdx_A_grad_p} 
     420\begin{equation} \label{apdx:A_grad_p} 
    421421\begin{split} 
    422422 -\frac{1}{\rho _o \, e_1 } \left. {\frac{\partial p}{\partial i}} \right|_z 
     
    430430\end{equation} 
    431431This formulation of the pressure gradient is characterised by the appearance of a term depending on the  
    432 the sea surface height only (last term on the right hand side of expression \eqref{Apdx_A_grad_p}). 
     432the sea surface height only (last term on the right hand side of expression \autoref{apdx:A_grad_p}). 
    433433This term will be loosely termed \textit{surface pressure gradient} 
    434434whereas the first term will be termed the  
     
    445445The coriolis and forcing terms as well as the the vertical physics remain unchanged  
    446446as they involve neither time nor space derivatives. The form of the lateral physics is  
    447 discussed in appendix~\ref{Apdx_B}. 
     447discussed in \autoref{apdx:B}. 
    448448 
    449449 
     
    455455solved by the model has the same mathematical expression as the one in a curvilinear  
    456456$z-$coordinate, except for the pressure gradient term : 
    457 \begin{subequations} \label{Apdx_A_dyn_vect} 
    458 \begin{multline} \label{Apdx_A_PE_dyn_vect_u} 
     457\begin{subequations} \label{apdx:A_dyn_vect} 
     458\begin{multline} \label{apdx:A_PE_dyn_vect_u} 
    459459 \frac{\partial u}{\partial t}= 
    460460   +   \left( {\zeta +f} \right)\,v                                     
     
    465465   +   D_u^{\vect{U}}  +   F_u^{\vect{U}} 
    466466\end{multline} 
    467 \begin{multline} \label{Apdx_A_dyn_vect_v} 
     467\begin{multline} \label{apdx:A_dyn_vect_v} 
    468468\frac{\partial v}{\partial t}= 
    469469   -   \left( {\zeta +f} \right)\,u    
     
    477477whereas the flux form momentum equation differ from it by the formulation of both 
    478478the time derivative and the pressure gradient term  : 
    479 \begin{subequations} \label{Apdx_A_dyn_flux} 
    480 \begin{multline} \label{Apdx_A_PE_dyn_flux_u} 
     479\begin{subequations} \label{apdx:A_dyn_flux} 
     480\begin{multline} \label{apdx:A_PE_dyn_flux_u} 
    481481 \frac{1}{e_3} \frac{\partial \left(  e_3\,u  \right) }{\partial t} = 
    482482   \nabla \cdot \left(   {{\rm {\bf U}}\,u}   \right)  
     
    487487   +   D_u^{\vect{U}}  +   F_u^{\vect{U}} 
    488488\end{multline} 
    489 \begin{multline} \label{Apdx_A_dyn_flux_v} 
     489\begin{multline} \label{apdx:A_dyn_flux_v} 
    490490 \frac{1}{e_3}\frac{\partial \left(  e_3\,v  \right) }{\partial t}= 
    491491   -  \nabla \cdot \left(   {{\rm {\bf U}}\,v}   \right)  
     
    499499Both formulation share the same hydrostatic pressure balance expressed in terms of 
    500500hydrostatic pressure and density anomalies, $p_h'$ and $d=( \frac{\rho}{\rho_o}-1 )$: 
    501 \begin{equation} \label{Apdx_A_dyn_zph} 
     501\begin{equation} \label{apdx:A_dyn_zph} 
    502502\frac{\partial p_h'}{\partial k} = - d \, g \, e_3 
    503503\end{equation} 
     
    516516% ================================================================ 
    517517\section{Tracer equation} 
    518 \label{Apdx_A_tracer} 
     518\label{sec:A_tracer} 
    519519 
    520520The tracer equation is obtained using the same calculation as for the continuity  
    521521equation and then regrouping the time derivative terms in the left hand side : 
    522522 
    523 \begin{multline} \label{Apdx_A_tracer} 
     523\begin{multline} \label{apdx:A_tracer} 
    524524 \frac{1}{e_3} \frac{\partial \left(  e_3 T  \right)}{\partial t}  
    525525   = -\frac{1}{e_1 \,e_2 \,e_3}  
  • branches/2017/dev_merge_2017/DOC/tex_sub/annex_B.tex

    r9393 r9407  
    55% ================================================================ 
    66\chapter{Appendix B : Diffusive Operators} 
    7 \label{Apdx_B} 
     7\label{apdx:B} 
    88\minitoc 
    99 
     
    1616% ================================================================ 
    1717\section{Horizontal/Vertical $2^{nd}$ order tracer diffusive operators} 
    18 \label{Apdx_B_1} 
     18\label{sec:B_1} 
    1919 
    2020\subsubsection*{In z-coordinates} 
    2121In $z$-coordinates, the horizontal/vertical second order tracer diffusion operator 
    2222is given by: 
    23 \begin{eqnarray} \label{Apdx_B1} 
     23\begin{eqnarray} \label{apdx:B1} 
    2424 &D^T = \frac{1}{e_1 \, e_2}      \left[ 
    2525  \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. 
     
    3131\subsubsection*{In generalized vertical coordinates} 
    3232In $s$-coordinates, we defined the slopes of $s$-surfaces, $\sigma_1$ and 
    33 $\sigma_2$ by \eqref{Apdx_A_s_slope} and the vertical/horizontal ratio of diffusion 
     33$\sigma_2$ by \autoref{apdx:A_s_slope} and the vertical/horizontal ratio of diffusion 
    3434coefficient by $\epsilon = A^{vT} / A^{lT}$. The diffusion operator is given by: 
    3535 
    36 \begin{equation} \label{Apdx_B2} 
     36\begin{equation} \label{apdx:B2} 
    3737D^T = \left. \nabla \right|_s \cdot 
    3838           \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_s T  \right] \\ 
     
    5656\end{subequations} 
    5757 
    58 Equation \eqref{Apdx_B2} is obtained from \eqref{Apdx_B1} without any 
     58Equation \autoref{apdx:B2} is obtained from \autoref{apdx:B1} without any 
    5959additional assumption. Indeed, for the special case $k=z$ and thus $e_3 =1$, 
    60 we introduce an arbitrary vertical coordinate $s = s (i,j,z)$ as in Appendix~\ref{Apdx_A} 
    61 and use \eqref{Apdx_A_s_slope} and \eqref{Apdx_A_s_chain_rule}. 
     60we introduce an arbitrary vertical coordinate $s = s (i,j,z)$ as in \autoref{apdx:A} 
     61and use \autoref{apdx:A_s_slope} and \autoref{apdx:A_s_chain_rule}. 
    6262Since no cross horizontal derivative $\partial _i \partial _j $ appears in 
    63 \eqref{Apdx_B1}, the ($i$,$z$) and ($j$,$z$) planes are independent. 
     63\autoref{apdx:B1}, the ($i$,$z$) and ($j$,$z$) planes are independent. 
    6464The derivation can then be demonstrated for the ($i$,$z$)~$\to$~($j$,$s$) 
    6565transformation without any loss of generality: 
     
    139139% ================================================================ 
    140140\section{Iso/Diapycnal $2^{nd}$ order tracer diffusive operators} 
    141 \label{Apdx_B_2} 
     141\label{sec:B_2} 
    142142 
    143143\subsubsection*{In z-coordinates} 
     
    147147formulated, takes the following form \citep{Redi_JPO82}: 
    148148 
    149 \begin{equation} \label{Apdx_B3} 
     149\begin{equation} \label{apdx:B3} 
    150150\textbf {A}_{\textbf I} = \frac{A^{lT}}{\left( {1+a_1 ^2+a_2 ^2} \right)} 
    151151\left[ {{\begin{array}{*{20}c} 
     
    166166In practice, isopycnal slopes are generally less than $10^{-2}$ in the ocean, so 
    167167$\textbf {A}_{\textbf I}$ can be simplified appreciably \citep{Cox1987}: 
    168 \begin{subequations} \label{Apdx_B4} 
    169 \begin{equation} \label{Apdx_B4a} 
     168\begin{subequations} \label{apdx:B4} 
     169\begin{equation} \label{apdx:B4a} 
    170170{\textbf{A}_{\textbf{I}}} \approx A^{lT}\;\Re\;\text{where} \;\Re = 
    171171\left[ {{\begin{array}{*{20}c} 
     
    176176\end{equation} 
    177177and the iso/dianeutral diffusive operator in $z$-coordinates is then 
    178 \begin{equation}\label{Apdx_B4b} 
     178\begin{equation}\label{apdx:B4b} 
    179179 D^T = \left. \nabla \right|_z \cdot 
    180180           \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_z T  \right]. \\ 
     
    183183 
    184184 
    185 Physically, the full tensor \eqref{Apdx_B3} 
     185Physically, the full tensor \autoref{apdx:B3} 
    186186represents strong isoneutral diffusion on a plane parallel to the isoneutral 
    187187surface and weak dianeutral diffusion perpendicular to this plane. 
    188 However, the approximate `weak-slope' tensor \eqref{Apdx_B4a} represents strong 
     188However, the approximate `weak-slope' tensor \autoref{apdx:B4a} represents strong 
    189189diffusion along the isoneutral surface, with weak 
    190190\emph{vertical}  diffusion -- the principal axes of the tensor are no 
    191191longer orthogonal. This simplification also decouples 
    192192the ($i$,$z$) and ($j$,$z$) planes of the tensor. The weak-slope operator therefore takes the same 
    193 form, \eqref{Apdx_B4}, as \eqref{Apdx_B2}, the diffusion operator for geopotential 
     193form, \autoref{apdx:B4}, as \autoref{apdx:B2}, the diffusion operator for geopotential 
    194194diffusion written in non-orthogonal $i,j,s$-coordinates. Written out 
    195195explicitly, 
    196196 
    197 \begin{multline} \label{Apdx_B_ldfiso} 
     197\begin{multline} \label{apdx:B_ldfiso} 
    198198 D^T=\frac{1}{e_1 e_2 }\left\{ 
    199199 {\;\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]} 
     
    203203 
    204204 
    205 The isopycnal diffusion operator \eqref{Apdx_B4}, 
    206 \eqref{Apdx_B_ldfiso} conserves tracer quantity and dissipates its 
    207 square. The demonstration of the first property is trivial as \eqref{Apdx_B4} is the divergence 
     205The isopycnal diffusion operator \autoref{apdx:B4}, 
     206\autoref{apdx:B_ldfiso} conserves tracer quantity and dissipates its 
     207square. The demonstration of the first property is trivial as \autoref{apdx:B4} is the divergence 
    208208of fluxes. Let us demonstrate the second one: 
    209209\begin{equation*} 
     
    233233\subsubsection*{In generalized vertical coordinates} 
    234234 
    235 Because the weak-slope operator \eqref{Apdx_B4}, \eqref{Apdx_B_ldfiso} is decoupled 
     235Because the weak-slope operator \autoref{apdx:B4}, \autoref{apdx:B_ldfiso} is decoupled 
    236236in the ($i$,$z$) and ($j$,$z$) planes, it may be transformed into 
    237 generalized $s$-coordinates in the same way as \eqref{Apdx_B_1} was transformed into 
    238 \eqref{Apdx_B_2}. The resulting operator then takes the simple form 
    239  
    240 \begin{equation} \label{Apdx_B_ldfiso_s} 
     237generalized $s$-coordinates in the same way as \autoref{sec:B_1} was transformed into 
     238\autoref{sec:B_2}. The resulting operator then takes the simple form 
     239 
     240\begin{equation} \label{apdx:B_ldfiso_s} 
    241241D^T = \left. \nabla \right|_s \cdot 
    242242           \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_s T  \right] \\ 
     
    258258\end{equation*} 
    259259 
    260 To prove  \eqref{Apdx_B5}  by direct re-expression of \eqref{Apdx_B_ldfiso} is 
     260To prove  \autoref{apdx:B5}  by direct re-expression of \autoref{apdx:B_ldfiso} is 
    261261straightforward, but laborious. An easier way is first to note (by reversing the 
    262 derivation of \eqref{Apdx_B_2} from \eqref{Apdx_B_1} ) that the 
     262derivation of \autoref{sec:B_2} from \autoref{sec:B_1} ) that the 
    263263weak-slope operator may be \emph{exactly} reexpressed in  
    264264non-orthogonal $i,j,\rho$-coordinates as 
    265265 
    266 \begin{equation} \label{Apdx_B5} 
     266\begin{equation} \label{apdx:B5} 
    267267D^T = \left. \nabla \right|_\rho \cdot 
    268268           \left[ A^{lT} \;\Re \cdot \left. \nabla \right|_\rho T  \right] \\ 
     
    274274\end{equation} 
    275275Then direct transformation from $i,j,\rho$-coordinates to 
    276 $i,j,s$-coordinates gives \eqref{Apdx_B_ldfiso_s} immediately. 
     276$i,j,s$-coordinates gives \autoref{apdx:B_ldfiso_s} immediately. 
    277277 
    278278Note that the weak-slope approximation is only made in 
     
    282282the  $s$-surfaces, in the same way as the transformation of 
    283283horizontal/vertical Laplacian diffusion in $z$-coordinates, 
    284 \eqref{Apdx_B_1} onto $s$-coordinates is exact, however steep the $s$-surfaces. 
     284\autoref{sec:B_1} onto $s$-coordinates is exact, however steep the $s$-surfaces. 
    285285 
    286286 
     
    289289% ================================================================ 
    290290\section{Lateral/Vertical momentum diffusive operators} 
    291 \label{Apdx_B_3} 
     291\label{sec:B_3} 
    292292 
    293293The second order momentum diffusion operator (Laplacian) in the $z$-coordinate 
    294 is found by applying \eqref{Eq_PE_lap_vector}, the expression for the Laplacian 
     294is found by applying \autoref{eq:PE_lap_vector}, the expression for the Laplacian 
    295295of a vector,  to the horizontal velocity vector : 
    296296\begin{align*} 
     
    329329\end{array} }} \right) 
    330330\end{align*} 
    331 Using \eqref{Eq_PE_div}, the definition of the horizontal divergence, the third 
     331Using \autoref{eq:PE_div}, the definition of the horizontal divergence, the third 
    332332componant of the second vector is obviously zero and thus : 
    333333\begin{equation*} 
     
    336336 
    337337Note that this operator ensures a full separation between the vorticity and horizontal 
    338 divergence fields (see Appendix~\ref{Apdx_C}). It is only equal to a Laplacian 
     338divergence fields (see \autoref{apdx:C}). It is only equal to a Laplacian 
    339339applied to each component in Cartesian coordinates, not on the sphere. 
    340340 
    341341The horizontal/vertical second order (Laplacian type) operator used to diffuse 
    342342horizontal momentum in the $z$-coordinate therefore takes the following form : 
    343 \begin{equation} \label{Apdx_B_Lap_U} 
     343\begin{equation} \label{apdx:B_Lap_U} 
    344344 {\textbf{D}}^{\textbf{U}} = 
    345345     \nabla _h \left( {A^{lm}\;\chi } \right) 
     
    360360\end{align*} 
    361361 
    362 Note Bene: introducing a rotation in \eqref{Apdx_B_Lap_U} does not lead to a 
     362Note Bene: introducing a rotation in \autoref{apdx:B_Lap_U} does not lead to a 
    363363useful expression for the iso/diapycnal Laplacian operator in the $z$-coordinate. 
    364364Similarly, we did not found an expression of practical use for the geopotential 
    365365horizontal/vertical Laplacian operator in the $s$-coordinate. Generally, 
    366 \eqref{Apdx_B_Lap_U} is used in both $z$- and $s$-coordinate systems, that is 
     366\autoref{apdx:B_Lap_U} is used in both $z$- and $s$-coordinate systems, that is 
    367367a Laplacian diffusion is applied on momentum along the coordinate directions. 
    368368\end{document} 
  • branches/2017/dev_merge_2017/DOC/tex_sub/annex_C.tex

    r9393 r9407  
    55% ================================================================ 
    66\chapter{Discrete Invariants of the Equations} 
    7 \label{Apdx_C} 
     7\label{apdx:C} 
    88\minitoc 
    99 
     
    2020% ================================================================ 
    2121\section{Introduction / Notations} 
    22 \label{Apdx_C.0} 
     22\label{sec:C.0} 
    2323 
    2424Notation used in this appendix in the demonstations : 
     
    6969\end{flalign*} 
    7070that is in a more compact form : 
    71 \begin{flalign} \label{Eq_Q2_flux} 
     71\begin{flalign} \label{eq:Q2_flux} 
    7272\partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right) 
    7373=&                   \int_D { \frac{Q}{e_3}  \partial_t \left( e_3 \, Q \right) dv }   
     
    8383\end{flalign*} 
    8484that is in a more compact form : 
    85 \begin{flalign} \label{Eq_Q2_vect} 
     85\begin{flalign} \label{eq:Q2_vect} 
    8686\partial_t \left( \int_D {\frac{1}{2} Q^2\;dv} \right) 
    8787=& \int_D {         Q   \,\partial_t Q  \;dv }   
     
    9494% ================================================================ 
    9595\section{Continuous conservation} 
    96 \label{Apdx_C.1} 
     96\label{sec:C.1} 
    9797 
    9898 
     
    104104Let us first establish those constraint in the continuous world. 
    105105The total energy ($i.e.$ kinetic plus potential energies) is conserved : 
    106 \begin{flalign} \label{Eq_Tot_Energy} 
     106\begin{flalign} \label{eq:Tot_Energy} 
    107107  \partial_t \left( \int_D \left( \frac{1}{2} {\textbf{U}_h}^2 +  \rho \, g \, z \right) \;dv \right)  = & 0 
    108108\end{flalign} 
     
    114114The transformation for the advection term depends on whether  
    115115the vector invariant form or the flux form is used for the momentum equation. 
    116 Using \eqref{Eq_Q2_vect} and introducing \eqref{Apdx_A_dyn_vect} in \eqref{Eq_Tot_Energy}  
     116Using \autoref{eq:Q2_vect} and introducing \autoref{apdx:A_dyn_vect} in \autoref{eq:Tot_Energy}  
    117117for the former form and 
    118 Using \eqref{Eq_Q2_flux} and introducing \eqref{Apdx_A_dyn_flux} in \eqref{Eq_Tot_Energy}  
     118Using \autoref{eq:Q2_flux} and introducing \autoref{apdx:A_dyn_flux} in \autoref{eq:Tot_Energy}  
    119119for the latter form  leads to: 
    120120 
    121 \begin{subequations} \label{E_tot} 
     121\begin{subequations} \label{eq:E_tot} 
    122122 
    123123advection term (vector invariant form): 
    124 \begin{equation} \label{E_tot_vect_vor} 
     124\begin{equation} \label{eq:E_tot_vect_vor} 
    125125\int\limits_D  \zeta \; \left( \textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv   = 0   \\ 
    126126\end{equation} 
    127127% 
    128 \begin{equation} \label{E_tot_vect_adv} 
     128\begin{equation} \label{eq:E_tot_vect_adv} 
    129129   \int\limits_D  \textbf{U}_h \cdot \nabla_h \left( \frac{{\textbf{U}_h}^2}{2} \right)     dv  
    130130+ \int\limits_D  \textbf{U}_h \cdot \nabla_z \textbf{U}_h  \;dv     
     
    133133 
    134134advection term (flux form): 
    135 \begin{equation} \label{E_tot_flux_metric} 
     135\begin{equation} \label{eq:E_tot_flux_metric} 
    136136\int\limits_D  \frac{1} {e_1 e_2 } \left( v \,\partial_i e_2 - u \,\partial_j e_1  \right)\;  
    137137 \left(  \textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv   = 0   \\ 
    138138\end{equation} 
    139139 
    140 \begin{equation} \label{E_tot_flux_adv} 
     140\begin{equation} \label{eq:E_tot_flux_adv} 
    141141   \int\limits_D \textbf{U}_h \cdot     \left(                 {{\begin{array} {*{20}c} 
    142142\nabla \cdot \left( \textbf{U}\,u \right) \hfill \\ 
     
    146146 
    147147coriolis term 
    148 \begin{equation} \label{E_tot_cor} 
     148\begin{equation} \label{eq:E_tot_cor} 
    149149\int\limits_D  f   \; \left( \textbf{k} \times \textbf{U}_h  \right) \cdot \textbf{U}_h  \;  dv   = 0   \\ 
    150150\end{equation} 
    151151 
    152152pressure gradient: 
    153 \begin{equation} \label{E_tot_pg} 
     153\begin{equation} \label{eq:E_tot_pg} 
    154154   - \int\limits_D  \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv  
    155155= - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv 
     
    171171 
    172172Vector invariant form: 
    173 \begin{subequations} \label{E_tot_vect} 
    174 \begin{equation} \label{E_tot_vect_vor} 
     173\begin{subequations} \label{eq:E_tot_vect} 
     174\begin{equation} \label{eq:E_tot_vect_vor} 
    175175\int\limits_D   \textbf{U}_h \cdot \text{VOR} \;dv   = 0   \\ 
    176176\end{equation} 
    177 \begin{equation} \label{E_tot_vect_adv} 
     177\begin{equation} \label{eq:E_tot_vect_adv} 
    178178   \int\limits_D  \textbf{U}_h \cdot \text{KEG}  \;dv  
    179179+ \int\limits_D  \textbf{U}_h \cdot \text{ZAD}  \;dv     
    180180-  \int\limits_D { \frac{{\textbf{U}_h}^2}{2} \frac{1}{e_3} \partial_t e_3 \;dv }   = 0   \\ 
    181181\end{equation} 
    182 \begin{equation} \label{E_tot_pg} 
     182\begin{equation} \label{eq:E_tot_pg} 
    183183   - \int\limits_D  \textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv  
    184184= - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv 
     
    188188 
    189189Flux form: 
    190 \begin{subequations} \label{E_tot_flux} 
    191 \begin{equation} \label{E_tot_flux_metric} 
     190\begin{subequations} \label{eq:E_tot_flux} 
     191\begin{equation} \label{eq:E_tot_flux_metric} 
    192192\int\limits_D  \textbf{U}_h \cdot \text {COR} \;  dv   = 0   \\ 
    193193\end{equation} 
    194 \begin{equation} \label{E_tot_flux_adv} 
     194\begin{equation} \label{eq:E_tot_flux_adv} 
    195195   \int\limits_D \textbf{U}_h \cdot \text{ADV}   \;dv  
    196196+   \frac{1}{2} \int\limits_D {  {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t e_3  \;dv } =\;0  \\ 
    197197\end{equation} 
    198 \begin{equation} \label{E_tot_pg} 
     198\begin{equation} \label{eq:E_tot_pg} 
    199199   - \int\limits_D  \textbf{U}_h \cdot (\text{HPG}+ \text{SPG}) \;dv  
    200200= - \int\limits_D \nabla \cdot \left( \rho \,\textbf {U} \right)\;g\;z\;\;dv 
     
    207207 
    208208 
    209 \eqref{E_tot_pg} is the balance between the conversion KE to PE and PE to KE.  
    210 Indeed the left hand side of \eqref{E_tot_pg} can be transformed as follows: 
     209\autoref{eq:E_tot_pg} is the balance between the conversion KE to PE and PE to KE.  
     210Indeed the left hand side of \autoref{eq:E_tot_pg} can be transformed as follows: 
    211211\begin{flalign*} 
    212212\partial_t  \left( \int\limits_D { \rho \, g \, z  \;dv} \right)  
     
    221221\end{flalign*} 
    222222where the last equality is obtained by noting that the brackets is exactly the expression of $w$,  
    223 the vertical velocity referenced to the fixe $z$-coordinate system (see \eqref{Apdx_A_w_s}).  
     223the vertical velocity referenced to the fixe $z$-coordinate system (see \autoref{apdx:A_w_s}).  
    224224  
    225 The left hand side of \eqref{E_tot_pg} can be transformed as follows: 
     225The left hand side of \autoref{eq:E_tot_pg} can be transformed as follows: 
    226226\begin{flalign*} 
    227227- \int\limits_D  \left. \nabla p \right|_z & \cdot \textbf{U}_h \;dv   
     
    325325% ================================================================ 
    326326\section{Discrete total energy conservation: vector invariant form} 
    327 \label{Apdx_C.1} 
     327\label{sec:C.1} 
    328328 
    329329% ------------------------------------------------------------------------------------------------------------- 
     
    331331% ------------------------------------------------------------------------------------------------------------- 
    332332\subsection{Total energy conservation} 
    333 \label{Apdx_C_KE+PE} 
    334  
    335 The discrete form of the total energy conservation, \eqref{Eq_Tot_Energy}, is given by: 
     333\label{subsec:C_KE+PE} 
     334 
     335The discrete form of the total energy conservation, \autoref{eq:Tot_Energy}, is given by: 
    336336\begin{flalign*} 
    337337\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  \\ 
    338338\end{flalign*} 
    339339which in vector invariant forms, it leads to: 
    340 \begin{equation} \label{KE+PE_vect_discrete}   \begin{split} 
     340\begin{equation} \label{eq:KE+PE_vect_discrete}   \begin{split} 
    341341                        \sum\limits_{i,j,k} \biggl\{   u\,                        \partial_t u         \;b_u  
    342342                                                              + v\,                        \partial_t v          \;b_v  \biggr\} 
     
    348348 
    349349Substituting the discrete expression of the time derivative of the velocity either in vector invariant, 
    350 leads to the discrete equivalent of the four equations \eqref{E_tot_flux}.  
     350leads to the discrete equivalent of the four equations \autoref{eq:E_tot_flux}.  
    351351 
    352352% ------------------------------------------------------------------------------------------------------------- 
     
    354354% ------------------------------------------------------------------------------------------------------------- 
    355355\subsection{Vorticity term (coriolis + vorticity part of the advection)} 
    356 \label{Apdx_C_vor} 
     356\label{subsec:C_vor} 
    357357 
    358358Let $q$, located at $f$-points, be either the relative ($q=\zeta / e_{3f}$), or   
     
    364364% ------------------------------------------------------------------------------------------------------------- 
    365365\subsubsection{Vorticity term with ENE scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})} 
    366 \label{Apdx_C_vorENE}  
     366\label{subsec:C_vorENE}  
    367367 
    368368For the ENE scheme, the two components of the vorticity term are given by : 
     
    401401% ------------------------------------------------------------------------------------------------------------- 
    402402\subsubsection{Vorticity term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} 
    403 \label{Apdx_C_vorEEN}  
     403\label{subsec:C_vorEEN}  
    404404 
    405405With the EEN scheme, the vorticity terms are represented as:  
    406 \begin{equation} \label{Eq_dynvor_een} 
     406\begin{equation} \label{eq:dynvor_een} 
    407407\left\{ {    \begin{aligned} 
    408408 +q\,e_3 \, v  &\equiv +\frac{1}{e_{1u} }   \sum_{\substack{i_p,\,k_p}}  
     
    415415$i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$, 
    416416and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by:  
    417 \begin{equation} \label{Q_triads} 
     417\begin{equation} \label{eq:Q_triads} 
    418418_i^j \mathbb{Q}^{i_p}_{j_p} 
    419419= \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) 
     
    471471% ------------------------------------------------------------------------------------------------------------- 
    472472\subsubsection{Gradient of kinetic energy / Vertical advection} 
    473 \label{Apdx_C_zad}  
     473\label{subsec:C_zad}  
    474474 
    475475The change of Kinetic Energy (KE) due to the vertical advection is exactly  
     
    480480   +   \frac{1}{2} \int_D {  \frac{{\textbf{U}_h}^2}{e_3} \partial_t ( e_3) \;dv }  \\ 
    481481\end{equation*} 
    482 Indeed, using successively \eqref{DOM_di_adj} ($i.e.$ the skew symmetry  
     482Indeed, using successively \autoref{eq:DOM_di_adj} ($i.e.$ the skew symmetry  
    483483property of the $\delta$ operator) and the continuity equation, then  
    484 \eqref{DOM_di_adj} again, then the commutativity of operators  
    485 $\overline {\,\cdot \,}$ and $\delta$, and finally \eqref{DOM_mi_adj}  
     484\autoref{eq:DOM_di_adj} again, then the commutativity of operators  
     485$\overline {\,\cdot \,}$ and $\delta$, and finally \autoref{eq:DOM_mi_adj}  
    486486($i.e.$ the symmetry property of the $\overline {\,\cdot \,}$ operator)  
    487487applied in the horizontal and vertical directions, it becomes: 
     
    536536% 
    537537\intertext{The first term provides the discrete expression for the vertical advection of momentum (ZAD),  
    538 while the second term corresponds exactly to \eqref{KE+PE_vect_discrete}, therefore:} 
     538while the second term corresponds exactly to \autoref{eq:KE+PE_vect_discrete}, therefore:} 
    539539\equiv&                   \int\limits_D \textbf{U}_h \cdot \text{ZAD} \;dv   
    540540           + \frac{1}{2} \int_D { {\textbf{U}_h}^2 \frac{1}{e_3} \partial_t  (e_3)  \;dv }    &&&\\ 
     
    568568\end{flalign*} 
    569569which is (over-)satified by defining the vertical scale factor as follows: 
    570 \begin{flalign} \label{e3u-e3v} 
     570\begin{flalign} \label{eq:e3u-e3v} 
    571571e_{3u} = \frac{1}{e_{1u}\,e_{2u}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,i+1/2}    \\ 
    572572e_{3v} = \frac{1}{e_{1v}\,e_{2v}}\;\overline{ e_{1t}^{ }\,e_{2t}^{ }\,e_{3t}^{ } }^{\,j+1/2}  
     
    580580% ------------------------------------------------------------------------------------------------------------- 
    581581\subsection{Pressure gradient term} 
    582 \label{Apdx_C.1.4} 
     582\label{subsec:C.1.4} 
    583583 
    584584\gmcomment{ 
    585585A pressure gradient has no contribution to the evolution of the vorticity as the  
    586586curl of a gradient is zero. In the $z$-coordinate, this property is satisfied locally  
    587 on a C-grid with 2nd order finite differences (property \eqref{Eq_DOM_curl_grad}).  
     587on a C-grid with 2nd order finite differences (property \autoref{eq:DOM_curl_grad}).  
    588588} 
    589589 
     
    611611% 
    612612\allowdisplaybreaks 
    613 \intertext{Using successively  \eqref{DOM_di_adj}, $i.e.$ the skew symmetry property of  
    614 the $\delta$ operator, \eqref{Eq_wzv}, the continuity equation, \eqref{Eq_dynhpg_sco},  
     613\intertext{Using successively \autoref{eq:DOM_di_adj}, $i.e.$ the skew symmetry property of  
     614the $\delta$ operator, \autoref{eq:wzv}, the continuity equation, \autoref{dynhpg_sco},  
    615615the hydrostatic equation in the $s$-coordinate, and $\delta_{k+1/2} \left[ z_t \right] \equiv e_{3w} $, 
    616616which comes from the definition of $z_t$, it becomes: } 
     
    657657% 
    658658\end{flalign*} 
    659 The first term is exactly the first term of the right-hand-side of \eqref{KE+PE_vect_discrete}. 
     659The first term is exactly the first term of the right-hand-side of \autoref{eq:KE+PE_vect_discrete}. 
    660660It remains to demonstrate that the last term, which is obviously a discrete analogue of  
    661 $\int_D \frac{p}{e_3} \partial_t (e_3)\;dv$ is equal to the last term of \eqref{KE+PE_vect_discrete}. 
     661$\int_D \frac{p}{e_3} \partial_t (e_3)\;dv$ is equal to the last term of \autoref{eq:KE+PE_vect_discrete}. 
    662662In other words, the following property must be satisfied: 
    663663\begin{flalign*} 
     
    733733% ================================================================ 
    734734\section{Discrete total energy conservation: flux form} 
    735 \label{Apdx_C.1} 
     735\label{sec:C.1} 
    736736 
    737737% ------------------------------------------------------------------------------------------------------------- 
     
    739739% ------------------------------------------------------------------------------------------------------------- 
    740740\subsection{Total energy conservation} 
    741 \label{Apdx_C_KE+PE} 
    742  
    743 The discrete form of the total energy conservation, \eqref{Eq_Tot_Energy}, is given by: 
     741\label{subsec:C_KE+PE} 
     742 
     743The discrete form of the total energy conservation, \autoref{eq:Tot_Energy}, is given by: 
    744744\begin{flalign*} 
    745745\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  \\ 
     
    763763% ------------------------------------------------------------------------------------------------------------- 
    764764\subsection{Coriolis and advection terms: flux form} 
    765 \label{Apdx_C.1.3} 
     765\label{subsec:C.1.3} 
    766766 
    767767% ------------------------------------------------------------------------------------------------------------- 
     
    769769% ------------------------------------------------------------------------------------------------------------- 
    770770\subsubsection{Coriolis plus ``metric'' term} 
    771 \label{Apdx_C.1.3.1}  
     771\label{subsec:C.1.3.1}  
    772772 
    773773In flux from the vorticity term reduces to a Coriolis term in which the Coriolis  
     
    783783Either the ENE or EEN scheme is then applied to obtain the vorticity term in flux form.  
    784784It therefore conserves the total KE. The derivation is the same as for the  
    785 vorticity term in the vector invariant form (\S\ref{Apdx_C_vor}). 
     785vorticity term in the vector invariant form (\autoref{subsec:C_vor}). 
    786786 
    787787% ------------------------------------------------------------------------------------------------------------- 
     
    789789% ------------------------------------------------------------------------------------------------------------- 
    790790\subsubsection{Flux form advection} 
    791 \label{Apdx_C.1.3.2}  
     791\label{subsec:C.1.3.2}  
    792792 
    793793The flux form operator of the momentum advection is evaluated using a  
     
    797797the horizontal kinetic energy, that is : 
    798798 
    799 \begin{equation} \label{Apdx_C_ADV_KE_flux} 
     799\begin{equation} \label{eq:C_ADV_KE_flux} 
    800800 -  \int_D \textbf{U}_h \cdot     \left(                 {{\begin{array} {*{20}c} 
    801801\nabla \cdot \left( \textbf{U}\,u \right) \hfill \\ 
     
    856856which is the discrete form of  
    857857$ \frac{1}{2} \int_D u \cdot \nabla \cdot \left(   \textbf{U}\,u   \right) \; dv $.  
    858 \eqref{Apdx_C_ADV_KE_flux} is thus satisfied. 
     858\autoref{eq:C_ADV_KE_flux} is thus satisfied. 
    859859 
    860860 
     
    877877% ================================================================ 
    878878\section{Discrete enstrophy conservation} 
    879 \label{Apdx_C.1} 
     879\label{sec:C.1} 
    880880 
    881881 
     
    884884% ------------------------------------------------------------------------------------------------------------- 
    885885\subsubsection{Vorticity term with ENS scheme  (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})} 
    886 \label{Apdx_C_vorENS}  
     886\label{subsec:C_vorENS}  
    887887 
    888888In the ENS scheme, the vorticity term is descretized as follows: 
    889 \begin{equation} \label{Eq_dynvor_ens} 
     889\begin{equation} \label{eq:dynvor_ens} 
    890890\left\{   \begin{aligned} 
    891891+\frac{1}{e_{1u}} & \overline{q}^{\,i}  & {\overline{ \overline{\left( e_{1v}\,e_{3v}\;  v \right) } } }^{\,i, j+1/2}    \\ 
     
    896896The scheme does not allow but the conservation of the total kinetic energy but the conservation  
    897897of $q^2$, the potential enstrophy for a horizontally non-divergent flow ($i.e.$ when $\chi$=$0$).  
    898 Indeed, using the symmetry or skew symmetry properties of the operators (Eqs \eqref{DOM_mi_adj}  
    899 and \eqref{DOM_di_adj}), it can be shown that: 
    900 \begin{equation} \label{Apdx_C_1.1} 
     898Indeed, using the symmetry or skew symmetry properties of the operators ( \autoref{eq:DOM_mi_adj}  
     899and \autoref{eq:DOM_di_adj}), it can be shown that: 
     900\begin{equation} \label{eq:C_1.1} 
    901901\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 
    902902\end{equation} 
    903903where $dv=e_1\,e_2\,e_3 \; di\,dj\,dk$ is the volume element. Indeed, using  
    904 \eqref{Eq_dynvor_ens}, the discrete form of the right hand side of \eqref{Apdx_C_1.1}  
     904\autoref{eq:dynvor_ens}, the discrete form of the right hand side of \autoref{eq:C_1.1}  
    905905can be transformed as follow: 
    906906\begin{flalign*}  
     
    944944% ------------------------------------------------------------------------------------------------------------- 
    945945\subsubsection{Vorticity Term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} 
    946 \label{Apdx_C_vorEEN}  
     946\label{subsec:C_vorEEN}  
    947947 
    948948With the EEN scheme, the vorticity terms are represented as:  
    949 \begin{equation} \label{Eq_dynvor_een} 
     949\begin{equation} \label{eq:dynvor_een} 
    950950\left\{ {    \begin{aligned} 
    951951 +q\,e_3 \, v  &\equiv +\frac{1}{e_{1u} }   \sum_{\substack{i_p,\,k_p}}  
     
    958958$i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$, 
    959959and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by:  
    960 \begin{equation} \label{Q_triads} 
     960\begin{equation} \label{eq:Q_triads} 
    961961_i^j \mathbb{Q}^{i_p}_{j_p} 
    962962= \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) 
     
    968968Let consider one of the vorticity triad, for example ${^{i}_j}\mathbb{Q}^{+1/2}_{+1/2} $,  
    969969similar manipulation can be done for the 3 others. The discrete form of the right hand  
    970 side of \eqref{Apdx_C_1.1} applied to this triad only can be transformed as follow: 
     970side of \autoref{eq:C_1.1} applied to this triad only can be transformed as follow: 
    971971 
    972972\begin{flalign*}  
     
    10171017% ================================================================ 
    10181018\section{Conservation properties on tracers} 
    1019 \label{Apdx_C.2} 
     1019\label{sec:C.2} 
    10201020 
    10211021 
     
    10331033% ------------------------------------------------------------------------------------------------------------- 
    10341034\subsection{Advection term} 
    1035 \label{Apdx_C.2.1} 
     1035\label{subsec:C.2.1} 
    10361036 
    10371037conservation of a tracer, $T$: 
     
    11001100% ================================================================ 
    11011101\section{Conservation properties on lateral momentum physics} 
    1102 \label{Apdx_dynldf_properties} 
     1102\label{sec:dynldf_properties} 
    11031103 
    11041104 
     
    11141114 
    11151115These properties of the horizontal diffusion operator are a direct consequence  
    1116 of properties \eqref{Eq_DOM_curl_grad} and \eqref{Eq_DOM_div_curl}.  
     1116of properties \autoref{eq:DOM_curl_grad} and \autoref{eq:DOM_div_curl}.  
    11171117When the vertical curl of the horizontal diffusion of momentum (discrete sense)  
    11181118is taken, the term associated with the horizontal gradient of the divergence is  
     
    11231123% ------------------------------------------------------------------------------------------------------------- 
    11241124\subsection{Conservation of potential vorticity} 
    1125 \label{Apdx_C.3.1} 
     1125\label{subsec:C.3.1} 
    11261126 
    11271127The lateral momentum diffusion term conserves the potential vorticity : 
     
    11431143   \right\}     \\  
    11441144% 
    1145 \intertext{Using \eqref{DOM_di_adj}, it follows:} 
     1145\intertext{Using \autoref{eq:DOM_di_adj}, it follows:} 
    11461146% 
    11471147\equiv& \sum\limits_{i,j,k}  
     
    11571157% ------------------------------------------------------------------------------------------------------------- 
    11581158\subsection{Dissipation of horizontal kinetic energy} 
    1159 \label{Apdx_C.3.2} 
     1159\label{subsec:C.3.2} 
    11601160 
    11611161The lateral momentum diffusion term dissipates the horizontal kinetic energy: 
     
    12091209% ------------------------------------------------------------------------------------------------------------- 
    12101210\subsection{Dissipation of enstrophy} 
    1211 \label{Apdx_C.3.3} 
     1211\label{subsec:C.3.3} 
    12121212 
    12131213The lateral momentum diffusion term dissipates the enstrophy when the eddy  
     
    12231223             + \delta_{j+1/2} \left[  \frac{e_{1u}} {e_{2u}\,e_{3u}} \delta_j \left[ e_{3f} \zeta  \right]   \right]      \right\}   &&&\\  
    12241224% 
    1225 \intertext{Using \eqref{DOM_di_adj}, it follows:} 
     1225\intertext{Using \autoref{eq:DOM_di_adj}, it follows:} 
    12261226% 
    12271227&\quad \equiv  - A^{\,lm} \sum\limits_{i,j,k}  
     
    12341234% ------------------------------------------------------------------------------------------------------------- 
    12351235\subsection{Conservation of horizontal divergence} 
    1236 \label{Apdx_C.3.4} 
     1236\label{subsec:C.3.4} 
    12371237 
    12381238When the horizontal divergence of the horizontal diffusion of momentum  
    12391239(discrete sense) is taken, the term associated with the vertical curl of the  
    1240 vorticity is zero locally, due to \eqref{Eq_DOM_div_curl}.  
     1240vorticity is zero locally, due to \autoref{eq:DOM_div_curl}.  
    12411241The resulting term conserves the $\chi$ and dissipates $\chi^2$  
    12421242when the eddy coefficients are horizontally uniform. 
     
    12511251           + \delta_j \left[ A_v^{\,lm} \frac{e_{1v}\,e_{3v}} {e_{2v}}  \delta_{j+1/2} \left[ \chi \right]  \right]    \right\}    \\  
    12521252% 
    1253 \intertext{Using \eqref{DOM_di_adj}, it follows:} 
     1253\intertext{Using \autoref{eq:DOM_di_adj}, it follows:} 
    12541254% 
    12551255&\equiv \sum\limits_{i,j,k}  
     
    12631263% ------------------------------------------------------------------------------------------------------------- 
    12641264\subsection{Dissipation of horizontal divergence variance} 
    1265 \label{Apdx_C.3.5} 
     1265\label{subsec:C.3.5} 
    12661266 
    12671267\begin{flalign*} 
     
    12771277   \right\} \;   e_{1t}\,e_{2t}\,e_{3t}    \\  
    12781278% 
    1279 \intertext{Using \eqref{DOM_di_adj}, it turns out to be:} 
     1279\intertext{Using \autoref{eq:DOM_di_adj}, it turns out to be:} 
    12801280% 
    12811281&\equiv - A^{\,lm} \sum\limits_{i,j,k} 
     
    12891289% ================================================================ 
    12901290\section{Conservation properties on vertical momentum physics} 
    1291 \label{Apdx_C_4} 
     1291\label{sec:C_4} 
    12921292 
    12931293As for the lateral momentum physics, the continuous form of the vertical diffusion  
     
    14611461% ================================================================ 
    14621462\section{Conservation properties on tracer physics} 
    1463 \label{Apdx_C.5} 
     1463\label{sec:C.5} 
    14641464 
    14651465The numerical schemes used for tracer subgridscale physics are written such  
     
    14731473% ------------------------------------------------------------------------------------------------------------- 
    14741474\subsection{Conservation of tracers} 
    1475 \label{Apdx_C.5.1} 
     1475\label{subsec:C.5.1} 
    14761476 
    14771477constraint of conservation of tracers: 
     
    15071507% ------------------------------------------------------------------------------------------------------------- 
    15081508\subsection{Dissipation of tracer variance} 
    1509 \label{Apdx_C.5.2} 
     1509\label{subsec:C.5.2} 
    15101510 
    15111511constraint on the dissipation of tracer variance: 
  • branches/2017/dev_merge_2017/DOC/tex_sub/annex_D.tex

    r9393 r9407  
    55% ================================================================ 
    66\chapter{Coding Rules} 
    7 \label{Apdx_D} 
     7\label{apdx:D} 
    88\minitoc 
    99 
     
    4747% ================================================================ 
    4848\section{Program structure} 
    49 \label{Apdx_D_structure} 
     49\label{sec:D_structure} 
    5050 
    5151Each program begins with a set of headline comments containing : 
     
    7676% ================================================================ 
    7777\section{Coding conventions} 
    78 \label{Apdx_D_coding} 
     78\label{sec:D_coding} 
    7979 
    8080- Use of the universal language \textsc{Fortran} 90, and try to avoid obsolescent 
     
    107107% ================================================================ 
    108108\section{Naming conventions} 
    109 \label{Apdx_D_naming} 
     109\label{sec:D_naming} 
    110110 
    111111The purpose of the naming conventions is to use prefix letters to classify  
     
    116116 
    117117%--------------------------------------------------TABLE-------------------------------------------------- 
    118 \begin{table}[htbp]  \label{Tab_VarName} 
     118\begin{table}[htbp]  \label{tab:VarName} 
    119119\begin{center} 
    120120\begin{tabular}{|p{45pt}|p{35pt}|p{45pt}|p{40pt}|p{40pt}|p{40pt}|p{40pt}|p{40pt}|} 
     
    187187\hline 
    188188\end{tabular} 
    189 \label{tab1} 
     189\label{tab:tab1} 
    190190\end{center} 
    191191\end{table} 
     
    201201% ================================================================ 
    202202%\section{Program structure} 
    203 %label{Apdx_D_structure} 
     203%abel{sec:Apdx_D_structure} 
    204204 
    205205%To be done.... 
  • branches/2017/dev_merge_2017/DOC/tex_sub/annex_E.tex

    r9393 r9407  
    55% ================================================================ 
    66\chapter{Note on some algorithms} 
    7 \label{Apdx_E} 
     7\label{apdx:E} 
    88\minitoc 
    99 
     
    2020% ------------------------------------------------------------------------------------------------------------- 
    2121\section{Upstream Biased Scheme (UBS) (\protect\np{ln\_traadv\_ubs}\forcode{ = .true.})} 
    22 \label{TRA_adv_ubs} 
     22\label{sec:TRA_adv_ubs} 
    2323 
    2424The UBS advection scheme is an upstream biased third order scheme based on  
     
    2626QUICK scheme (Quadratic Upstream Interpolation for Convective  
    2727Kinematics). For example, in the $i$-direction : 
    28 \begin{equation} \label{Eq_tra_adv_ubs2} 
     28\begin{equation} \label{eq:tra_adv_ubs2} 
    2929\tau _u^{ubs} = \left\{  \begin{aligned} 
    3030  & \tau _u^{cen4} + \frac{1}{12} \,\tau"_i     & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\ 
     
    3333\end{equation} 
    3434or equivalently, the advective flux is 
    35 \begin{equation} \label{Eq_tra_adv_ubs2} 
     35\begin{equation} \label{eq:tra_adv_ubs2} 
    3636U_{i+1/2} \ \tau _u^{ubs}  
    3737=U_{i+1/2} \ \overline{ T_i - \frac{1}{6}\,\tau"_i }^{\,i+1/2} 
     
    6161scheme when \np{ln\_traadv\_ubs}\forcode{ = .true.}. 
    6262 
    63 For stability reasons, in \eqref{Eq_tra_adv_ubs}, the first term which corresponds  
     63For stability reasons, in \autoref{eq:tra_adv_ubs}, the first term which corresponds  
    6464to a second order centred scheme is evaluated using the \textit{now} velocity  
    6565(centred in time) while the second term which is the diffusive part of the scheme,  
     
    6767by \citet{Webb_al_JAOT98} in the context of the Quick advection scheme. UBS and QUICK  
    6868schemes only differ by one coefficient. Substituting 1/6 with 1/8 in  
    69 (\ref{Eq_tra_adv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}.  
     69(\autoref{eq:tra_adv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}.  
    7070This option is not available through a namelist parameter, since the 1/6  
    7171coefficient is hard coded. Nevertheless it is quite easy to make the  
     
    8787eight-order accurate conventional scheme. 
    8888 
    89 NB 3 : It is straight forward to rewrite \eqref{Eq_tra_adv_ubs} as follows: 
    90 \begin{equation} \label{Eq_tra_adv_ubs2} 
     89NB 3 : It is straight forward to rewrite \autoref{eq:tra_adv_ubs} as follows: 
     90\begin{equation} \label{eq:tra_adv_ubs2} 
    9191\tau _u^{ubs} = \left\{  \begin{aligned} 
    9292   & \tau _u^{cen4} + \frac{1}{12} \tau"_i      & \quad \text{if }\ u_{i+1/2} \geqslant 0 \\ 
     
    9595\end{equation} 
    9696or equivalently  
    97 \begin{equation} \label{Eq_tra_adv_ubs2} 
     97\begin{equation} \label{eq:tra_adv_ubs2} 
    9898\begin{split} 
    9999e_{2u} e_{3u}\,u_{i+1/2} \ \tau _u^{ubs}  
     
    102102\end{split} 
    103103\end{equation} 
    104 \eqref{Eq_tra_adv_ubs2} has several advantages. First it clearly evidence that  
     104\autoref{eq:tra_adv_ubs2} has several advantages. First it clearly evidence that  
    105105the UBS scheme is based on the fourth order scheme to which is added an  
    106106upstream biased diffusive term. Second, this emphasises that the $4^{th}$ order  
    107107part have to be evaluated at \emph{now} time step, not only the $2^{th}$ order  
    108 part as stated above using \eqref{Eq_tra_adv_ubs}. Third, the diffusive term is  
     108part as stated above using \autoref{eq:tra_adv_ubs}. Third, the diffusive term is  
    109109in fact a biharmonic operator with a eddy coefficient with is simply proportional  
    110110to the velocity. 
    111111 
    112112laplacian diffusion: 
    113 \begin{equation} \label{Eq_tra_ldf_lap} 
     113\begin{equation} \label{eq:tra_ldf_lap} 
    114114\begin{split} 
    115115D_T^{lT} =\frac{1}{e_{1T} \; e_{2T}\;  e_{3T} } &\left[ {\quad \delta _i  
     
    124124 
    125125bilaplacian: 
    126 \begin{equation} \label{Eq_tra_ldf_lap} 
     126\begin{equation} \label{eq:tra_ldf_lap} 
    127127\begin{split} 
    128128D_T^{lT} =&-\frac{1}{e_{1T} \; e_{2T}\;  e_{3T}} \\ 
     
    136136$i.e.$ $A_u^{lT} = \frac{1}{\sqrt{12}} \,e_{1u}\ \sqrt{ e_{1u}\,|u|\,}$ 
    137137it comes : 
    138 \begin{equation} \label{Eq_tra_ldf_lap} 
     138\begin{equation} \label{eq:tra_ldf_lap} 
    139139\begin{split} 
    140140D_T^{lT} =&-\frac{1}{12}\,\frac{1}{e_{1T} \; e_{2T}\;  e_{3T}} \\ 
     
    146146\end{equation} 
    147147if the velocity is uniform ($i.e.$ $|u|=cst$) then the diffusive flux is 
    148 \begin{equation} \label{Eq_tra_ldf_lap} 
     148\begin{equation} \label{eq:tra_ldf_lap} 
    149149\begin{split} 
    150150F_u^{lT} = - \frac{1}{12} 
     
    157157beurk....  reverte the logic: starting from the diffusive part of the advective flux it comes: 
    158158 
    159 \begin{equation} \label{Eq_tra_adv_ubs2} 
     159\begin{equation} \label{eq:tra_adv_ubs2} 
    160160\begin{split} 
    161161F_u^{lT} 
     
    166166 
    167167sol 1 coefficient at T-point ( add $e_{1u}$ and $e_{1T}$ on both side of first $\delta$): 
    168 \begin{equation} \label{Eq_tra_adv_ubs2} 
     168\begin{equation} \label{eq:tra_adv_ubs2} 
    169169\begin{split} 
    170170F_u^{lT} 
     
    175175 
    176176sol 2 coefficient at u-point: split $|u|$ into $\sqrt{|u|}$ and $e_{1T}$ into $\sqrt{e_{1u}}$ 
    177 \begin{equation} \label{Eq_tra_adv_ubs2} 
     177\begin{equation} \label{eq:tra_adv_ubs2} 
    178178\begin{split} 
    179179F_u^{lT} 
     
    189189% ------------------------------------------------------------------------------------------------------------- 
    190190\section{Leapfrog energetic} 
    191 \label{LF} 
     191\label{sec:LF} 
    192192 
    193193We 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: 
    194 \begin{subequations} \label{dt_mt} 
     194\begin{subequations} \label{eq:dt_mt} 
    195195\begin{align} 
    196196 \delta _{t+\rdt/2} [q]     &=  \  \ \,   q^{t+\rdt}  - q^{t}     \\ 
     
    202202, respectively.  
    203203 
    204 The Leap-frog time stepping given by \eqref{Eq_DOM_nxt} can be defined as: 
    205 \begin{equation} \label{LF} 
     204The Leap-frog time stepping given by \autoref{eq:DOM_nxt} can be defined as: 
     205\begin{equation} \label{eq:LF} 
    206206   \frac{\partial q}{\partial t}  
    207207         \equiv \frac{1}{\rdt} \overline{ \delta _{t+\rdt/2}[q]}^{\,t}  
    208208      =         \frac{q^{t+\rdt}-q^{t-\rdt}}{2\rdt} 
    209209\end{equation}  
    210 Note that \eqref{LF} shows that the leapfrog time step is $\rdt$, not $2\rdt$  
     210Note that \autoref{chap:LF} shows that the leapfrog time step is $\rdt$, not $2\rdt$  
    211211as it can be found sometime in literature.  
    212212The leap-Frog time stepping is a second order centered scheme. As such it respects  
    213213the quadratic invariant in integral forms, $i.e.$ the following continuous property, 
    214 \begin{equation} \label{Energy} 
     214\begin{equation} \label{eq:Energy} 
    215215\int_{t_0}^{t_1} {q\, \frac{\partial q}{\partial t} \;dt}  
    216216   =\int_{t_0}^{t_1} {\frac{1}{2}\, \frac{\partial q^2}{\partial t} \;dt}  
     
    252252scheme, but is formulated within the \NEMO framework ($i.e.$ using scale  
    253253factors rather than grid-size and having a position of $T$-points that is not  
    254 necessary in the middle of vertical velocity points, see Fig.~\ref{Fig_zgr_e3}). 
    255  
    256 In the formulation \eqref{Eq_tra_ldf_iso} introduced in 1995 in OPA, the ancestor of \NEMO,  
     254necessary in the middle of vertical velocity points, see \autoref{fig:zgr_e3}). 
     255 
     256In the formulation \autoref{eq:tra_ldf_iso} introduced in 1995 in OPA, the ancestor of \NEMO,  
    257257the off-diagonal terms of the small angle diffusion tensor contain several double  
    258258spatial averages of a gradient, for example $\overline{\overline{\delta_k \cdot}}^{\,i,k}$.  
     
    263263In other word, the operator applied to a tracer does not warranties the decrease of  
    264264its global average variance. To circumvent this, we have introduced a smoothing of  
    265 the slopes of the iso-neutral surfaces (see \S\ref{LDF}). Nevertheless, this technique  
     265the slopes of the iso-neutral surfaces (see \autoref{chap:LDF}). Nevertheless, this technique  
    266266works fine for $T$ and $S$ as they are active tracers ($i.e.$ they enter the computation  
    267267of density), but it does not work for a passive tracer.   \citep{Griffies_al_JPO98} introduce  
     
    270270with a derivative in the same direction by considering triads. For example in the  
    271271(\textbf{i},\textbf{k}) plane, the four triads are defined at the $(i,k)$ $T$-point as follows: 
    272 \begin{equation} \label{Gf_triads} 
     272\begin{equation} \label{eq:Gf_triads} 
    273273_i^k \mathbb{T}_{i_p}^{k_p} (T) 
    274274= \frac{1}{4} \ {b_u}_{\,i+i_p}^{\,k}  \  A_i^k    \left(   
     
    282282$A_i^k$ is the lateral eddy diffusivity coefficient defined at $T$-point, 
    283283and $_i^k \mathbb{R}_{i_p}^{k_p}$ is the slope associated with each triad : 
    284 \begin{equation} \label{Gf_slopes} 
     284\begin{equation} \label{eq:Gf_slopes} 
    285285_i^k \mathbb{R}_{i_p}^{k_p}  
    286286=\frac{ {e_{3w}}_{\,i}^{\,k+k_p}} { {e_{1u}}_{\,i+i_p}^{\,k}} \ \frac  
     
    288288{\left(\alpha / \beta \right)_i^k  \ \delta_{k+k_p}[T^i ] - \delta_{k+k_p}[S^i ] } 
    289289\end{equation} 
    290 Note that in \eqref{Gf_slopes} we use the ratio $\alpha / \beta$ instead of  
     290Note that in \autoref{eq:Gf_slopes} we use the ratio $\alpha / \beta$ instead of  
    291291multiplying the temperature derivative by $\alpha$ and the salinity derivative  
    292292by $\beta$. This is more efficient as the ratio $\alpha / \beta$ can to be  
    293293evaluated directly. 
    294294 
    295 Note that in \eqref{Gf_triads}, we chose to use ${b_u}_{\,i+i_p}^{\,k}$ instead of  
     295Note that in \autoref{eq:Gf_triads}, we chose to use ${b_u}_{\,i+i_p}^{\,k}$ instead of  
    296296${b_{uw}}_{\,i+i_p}^{\,k+k_p}$. This choice has been motivated by the decrease  
    297297of tracer variance and the presence of partial cell at the ocean bottom  
    298 (see Appendix~\ref{Apdx_Gf_operator}). 
     298(see \autoref{apdx:Gf_operator}). 
    299299 
    300300%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    301 \begin{figure}[!ht] \label{Fig_ISO_triad} 
    302 \begin{center} 
     301\begin{figure}[!ht] \begin{center} 
    303302\includegraphics[width=0.70\textwidth]{Fig_ISO_triad} 
    304 \caption{  \protect\label{Fig_ISO_triad}    
     303\caption{  \protect\label{fig:ISO_triad}    
    305304Triads used in the Griffies's like iso-neutral diffision scheme for  
    306305$u$-component (upper panel) and $w$-component (lower panel).} 
     
    311310The four iso-neutral fluxes associated with the triads are defined at $T$-point.  
    312311They take the following expression : 
    313 \begin{flalign} \label{Gf_fluxes} 
     312\begin{flalign} \label{eq:Gf_fluxes} 
    314313\begin{split} 
    315314{_i^k {\mathbb{F}_u}_{i_p}^{k_p} } (T)  
     
    322321 
    323322The resulting iso-neutral fluxes at $u$- and $w$-points are then given by the  
    324 sum of the fluxes that cross the $u$- and $w$-face (Fig.~\ref{Fig_ISO_triad}): 
    325 \begin{flalign} \label{Eq_iso_flux}  
     323sum of the fluxes that cross the $u$- and $w$-face (\autoref{fig:ISO_triad}): 
     324\begin{flalign} \label{eq:iso_flux}  
    326325\textbf{F}_{iso}(T)  
    327326&\equiv  \sum_{\substack{i_p,\,k_p}}  
     
    353352resulting in a iso-neutral diffusion tendency on temperature given by the divergence  
    354353of the sum of all the four triad fluxes : 
    355 \begin{equation} \label{Gf_operator} 
     354\begin{equation} \label{eq:Gf_operator} 
    356355D_l^T = \frac{1}{b_T}  \sum_{\substack{i_p,\,k_p}} \left\{   
    357356       \delta_{i} \left[{_{i+1/2-i_p}^k {\mathbb{F}_u }_{i_p}^{k_p}} \right]  
     
    365364\item[$\bullet$ horizontal diffusion] The discretization of the diffusion operator  
    366365recovers the traditional five-point Laplacian in the limit of flat iso-neutral direction : 
    367 \begin{equation} \label{Gf_property1a} 
     366\begin{equation} \label{eq:Gf_property1a} 
    368367D_l^T = \frac{1}{b_T}  \ \delta_{i}  
    369368   \left[ \frac{e_{2u}\,e_{3u}}{e_{1u}} \; \overline{A}^{\,i} \; \delta_{i+1/2}[T] \right]  
     
    388387\item[$\bullet$ pure iso-neutral operator]  The iso-neutral flux of locally referenced  
    389388potential density is zero, $i.e.$ 
    390 \begin{align} \label{Gf_property2} 
     389\begin{align} \label{eq:Gf_property2} 
    391390\begin{matrix} 
    392391&{_i^k {\mathbb{F}_u}_{i_p}^{k_p} (\rho)}  
     
    398397\end{matrix} 
    399398\end{align} 
    400 This result is trivially obtained using the \eqref{Gf_triads} applied to $T$ and $S$  
    401 and the definition of the triads' slopes \eqref{Gf_slopes}. 
     399This result is trivially obtained using the \autoref{eq:Gf_triads} applied to $T$ and $S$  
     400and the definition of the triads' slopes \autoref{eq:Gf_slopes}. 
    402401 
    403402\item[$\bullet$ conservation of tracer] The iso-neutral diffusion term conserve the  
    404403total tracer content, $i.e.$ 
    405 \begin{equation} \label{Gf_property1} 
     404\begin{equation} \label{eq:Gf_property1} 
    406405\sum_{i,j,k} \left\{ D_l^T \ b_T \right\} = 0 
    407406\end{equation} 
     
    411410\item[$\bullet$ decrease of tracer variance] The iso-neutral diffusion term does  
    412411not increase the total tracer variance, $i.e.$ 
    413 \begin{equation} \label{Gf_property1} 
     412\begin{equation} \label{eq:Gf_property1} 
    414413\sum_{i,j,k} \left\{ T \ D_l^T \ b_T \right\} \leq 0 
    415414\end{equation} 
    416 The property is demonstrated in the Appendix~\ref{Apdx_Gf_operator}. It is a  
     415The property is demonstrated in the \autoref{apdx:Gf_operator}. It is a  
    417416key property for a diffusion term. It means that the operator is also a dissipation  
    418417term, $i.e.$ it is a sink term for the square of the quantity on which it is applied.  
     
    422421\item[$\bullet$ self-adjoint operator] The iso-neutral diffusion operator is self-adjoint,  
    423422$i.e.$ 
    424 \begin{equation} \label{Gf_property1} 
     423\begin{equation} \label{eq:Gf_property1} 
    425424\sum_{i,j,k} \left\{ S \ D_l^T \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\}  
    426425\end{equation} 
     
    428427operator. We just have to apply the same routine. This properties can be demonstrated  
    429428quite easily in a similar way the "non increase of tracer variance" property has been  
    430 proved (see Appendix~\ref{Apdx_Gf_operator}). 
     429proved (see \autoref{apdx:Gf_operator}). 
    431430\end{description} 
    432431 
     
    442441eddy induced velocity, the formulation of which depends on the slopes of iso- 
    443442neutral surfaces. Contrary to the case of iso-neutral mixing, the slopes used  
    444 here are referenced to the geopotential surfaces, $i.e.$ \eqref{Eq_ldfslp_geo}  
    445 is used in $z$-coordinate, and the sum \eqref{Eq_ldfslp_geo} 
    446 + \eqref{Eq_ldfslp_iso} in $z^*$ or $s$-coordinates.  
     443here are referenced to the geopotential surfaces, $i.e.$ \autoref{eq:ldfslp_geo}  
     444is used in $z$-coordinate, and the sum \autoref{eq:ldfslp_geo} 
     445+ \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates.  
    447446 
    448447The eddy induced velocity is given by:  
    449 \begin{equation} \label{Eq_eiv_v} 
     448\begin{equation} \label{eq:eiv_v} 
    450449\begin{split} 
    451450 u^* & = - \frac{1}{e_2\,e_{3}}          \;\partial_k \left( e_2 \, A_e \; r_i  \right)    
     
    467466A traditional way to implement this additional advection is to add it to the eulerian  
    468467velocity prior to compute the tracer advection. This allows us to take advantage of  
    469 all the advection schemes offered for the tracers (see \S\ref{TRA_adv}) and not just  
     468all the advection schemes offered for the tracers (see \autoref{sec:TRA_adv}) and not just  
    470469a $2^{nd}$ order advection scheme. This is particularly useful for passive tracers  
    471470where \emph{positivity} of the advection scheme is of paramount importance.  
    472 % give here the expression using the triads. It is different from the one given in \eqref{Eq_ldfeiv} 
     471% give here the expression using the triads. It is different from the one given in \autoref{eq:ldfeiv} 
    473472% see just below a copy of this equation: 
    474 %\begin{equation} \label{Eq_ldfeiv} 
     473%\begin{equation} \label{eq:ldfeiv} 
    475474%\begin{split} 
    476475% u^* & = \frac{1}{e_{2u}e_{3u}}\; \delta_k \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right]\\ 
     
    479478%\end{split} 
    480479%\end{equation} 
    481 \begin{equation} \label{Eq_eiv_vd}   
     480\begin{equation} \label{eq:eiv_vd}   
    482481\textbf{F}_{eiv}^T   \equiv   \left( \begin{aligned}                                 
    483482 \sum_{\substack{i_p,\,k_p}} & 
     
    491490\end{equation} 
    492491 
    493 \ref{Griffies_JPO98} introduces another way to implement the eddy induced advection,  
     492\citep{Griffies_JPO98} introduces another way to implement the eddy induced advection,  
    494493the so-called skew form. It is based on a transformation of the advective fluxes  
    495494using the non-divergent nature of the eddy induced velocity.  
     
    522521and since the eddy induces velocity field is no-divergent, we end up with the skew  
    523522form of the eddy induced advective fluxes: 
    524 \begin{equation} \label{Eq_eiv_skew_continuous} 
     523\begin{equation} \label{eq:eiv_skew_continuous} 
    525524\textbf{F}_{eiv}^T = \begin{pmatrix}  
    526525           {+ e_{2} \, A_{e} \; r_i  \; \partial_k T}   \\ 
     
    529528\end{equation} 
    530529The tendency associated with eddy induced velocity is then simply the divergence  
    531 of the \eqref{Eq_eiv_skew_continuous} fluxes. It naturally conserves the tracer  
     530of the \autoref{eq:eiv_skew_continuous} fluxes. It naturally conserves the tracer  
    532531content, as it is expressed in flux form and, as the advective form, it preserve the  
    533 tracer variance. Another interesting property of \eqref{Eq_eiv_skew_continuous}  
     532tracer variance. Another interesting property of \autoref{eq:eiv_skew_continuous}  
    534533form is that when $A=A_e$, a simplification occurs in the sum of the iso-neutral  
    535534diffusion and eddy induced velocity terms: 
    536 \begin{flalign} \label{Eq_eiv_skew+eiv_continuous} 
     535\begin{flalign} \label{eq:eiv_skew+eiv_continuous} 
    537536\textbf{F}_{iso}^T + \textbf{F}_{eiv}^T &=  
    538537\begin{pmatrix}  
     
    554553has been used to reduce the computational time \citep{Griffies_JPO98}, but it is  
    555554not of practical use as usually $A \neq A_e$. Nevertheless this property can be used to  
    556 choose a discret form of  \eqref{Eq_eiv_skew_continuous} which is consistent with the  
    557 iso-neutral operator \eqref{Gf_operator}. Using the slopes \eqref{Gf_slopes}  
     555choose a discret form of  \autoref{eq:eiv_skew_continuous} which is consistent with the  
     556iso-neutral operator \autoref{eq:Gf_operator}. Using the slopes \autoref{eq:Gf_slopes}  
    558557and defining $A_e$ at $T$-point($i.e.$ as $A$, the eddy diffusivity coefficient), 
    559558the resulting discret form is given by: 
    560 \begin{equation} \label{Eq_eiv_skew}   
     559\begin{equation} \label{eq:eiv_skew}   
    561560\textbf{F}_{eiv}^T   \equiv   \frac{1}{4} \left( \begin{aligned}                                 
    562561 \sum_{\substack{i_p,\,k_p}} & 
     
    569568\end{aligned}   \right) 
    570569\end{equation} 
    571 Note that \eqref{Eq_eiv_skew} is valid in $z$-coordinate with or without partial cells.  
     570Note that \autoref{eq:eiv_skew} is valid in $z$-coordinate with or without partial cells.  
    572571In $z^*$ or $s$-coordinate, the slope between the level and the geopotential surfaces  
    573572must be added to $\mathbb{R}$ for the discret form to be exact.  
     
    575574Such a choice of discretisation is consistent with the iso-neutral operator as it uses the  
    576575same definition for the slopes. It also ensures the conservation of the tracer variance  
    577 (see Appendix \ref{Apdx_eiv_skew}), $i.e.$ it does not include a diffusive component  
     576(see Appendix \autoref{apdx:eiv_skew}), $i.e.$ it does not include a diffusive component  
    578577but is a "pure" advection term. 
    579578 
     
    586585% ================================================================ 
    587586\subsection{Discrete invariants of the iso-neutral diffrusion} 
    588 \label{Apdx_Gf_operator} 
     587\label{subsec:Gf_operator} 
    589588 
    590589Demonstration of the decrease of the tracer variance in the (\textbf{i},\textbf{j}) plane.  
     
    596595\int_D  D_l^T \; T \;dv   \leq 0 
    597596\end{align*} 
    598 The discrete form of its left hand side is obtained using \eqref{Eq_iso_flux} 
     597The discrete form of its left hand side is obtained using \autoref{eq:iso_flux} 
    599598 
    600599\begin{align*} 
     
    673672% 
    674673\allowdisplaybreaks 
    675 \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: } 
     674\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: } 
    676675% 
    677676&\equiv -\sum_{i,k} 
     
    739738% ================================================================ 
    740739\subsection{Discrete invariants of the skew flux formulation} 
    741 \label{Apdx_eiv_skew} 
     740\label{subsec:eiv_skew} 
    742741 
    743742 
     
    750749\int_D \nabla \cdot \textbf{F}_{eiv}(T) \; T \;dv  \equiv 0 
    751750\end{align*} 
    752 The discrete form of its left hand side is obtained using \eqref{Eq_eiv_skew} 
     751The discrete form of its left hand side is obtained using \autoref{eq:eiv_skew} 
    753752\begin{align*} 
    754753 \sum\limits_{i,k} \sum_{\substack{i_p,\,k_p}}  \Biggl\{   \;\; 
  • branches/2017/dev_merge_2017/DOC/tex_sub/annex_iso.tex

    r9393 r9407  
    44% Iso-neutral diffusion : 
    55% ================================================================ 
    6 \chapter{Iso-neutral diffusion and eddy advection using triads} 
    7 \label{sec:triad} 
     6\chapter[Iso-Neutral Diffusion and Eddy Advection using Triads] 
     7         {\texorpdfstring{Iso-Neutral Diffusion and\\ Eddy Advection using Triads}{Iso-Neutral Diffusion and Eddy Advection using Triads}} 
     8\label{apdx:triad} 
    89\minitoc 
    910\pagebreak 
     
    1819of iso-neutral diffusion and the eddy-induced advective skew (GM) fluxes.  
    1920If the namelist logical \np{ln\_traldf\_iso} is set true,  
    20 the filtered version of Cox's original scheme (the Standard scheme) is employed (\S\ref{LDF_slp}).  
     21the filtered version of Cox's original scheme (the Standard scheme) is employed (\autoref{sec:LDF_slp}).  
    2122In the present implementation of the Griffies scheme,  
    2223the advective skew fluxes are implemented even if \np{ln\_traldf\_eiv} is false. 
    2324 
    2425Values of iso-neutral diffusivity and GM coefficient are set as 
    25 described in \S\ref{LDF_coef}. Note that when GM fluxes are used,  
     26described in \autoref{sec:LDF_coef}. Note that when GM fluxes are used,  
    2627the eddy-advective (GM) velocities are output for diagnostic purposes using xIOS,  
    2728even though the eddy advection is accomplished by means of the skew fluxes. 
     
    3031The options specific to the Griffies scheme include: 
    3132\begin{description}[font=\normalfont] 
    32 \item[\np{ln\_triad\_iso}] See \S\ref{sec:triad:taper}. If this is set false (the default), then 
     33\item[\np{ln\_triad\_iso}] See \autoref{sec:taper}. If this is set false (the default), then 
    3334  `iso-neutral' mixing is accomplished within the surface mixed-layer 
    3435  along slopes linearly decreasing with depth from the value immediately below 
    35   the mixed-layer to zero (flat) at the surface (\S\ref{sec:triad:lintaper}).  
    36   This is the same treatment as used in the default implementation \S\ref{LDF_slp_iso}; Fig.~\ref{Fig_eiv_slp}.   
     36  the mixed-layer to zero (flat) at the surface (\autoref{sec:lintaper}).  
     37  This is the same treatment as used in the default implementation \autoref{subsec:LDF_slp_iso}; \autoref{fig:eiv_slp}.   
    3738  Where \np{ln\_triad\_iso} is set true, the vertical skew flux is further reduced  
    3839  to ensure no vertical buoyancy flux, giving an almost pure 
    3940  horizontal diffusive tracer flux within the mixed layer. This is similar to 
    40   the tapering suggested by \citet{Gerdes1991}. See \S\ref{sec:triad:Gerdes-taper} 
    41 \item[\np{ln\_botmix\_triad}] See \S\ref{sec:triad:iso_bdry}.  
     41  the tapering suggested by \citet{Gerdes1991}. See \autoref{subsec:Gerdes-taper} 
     42\item[\np{ln\_botmix\_triad}] See \autoref{sec:iso_bdry}.  
    4243  If this is set false (the default) then the lateral diffusive fluxes 
    4344  associated with triads partly masked by topography are neglected.  
     
    5354 
    5455\section{Triad formulation of iso-neutral diffusion} 
    55 \label{sec:triad:iso} 
     56\label{sec:iso} 
    5657We have implemented into \NEMO a scheme inspired by \citet{Griffies_al_JPO98},  
    5758but formulated within the \NEMO framework, using scale factors rather than grid-sizes. 
     
    6061The iso-neutral second order tracer diffusive operator for small 
    6162angles between iso-neutral surfaces and geopotentials is given by 
    62 \eqref{Eq_PE_iso_tensor}: 
    63 \begin{subequations} \label{eq:triad:PE_iso_tensor} 
     63\autoref{eq:PE_iso_tensor}: 
     64\begin{subequations} \label{eq:PE_iso_tensor} 
    6465  \begin{equation} 
    6566    D^{lT}=-\Div\vect{f}^{lT}\equiv 
     
    7273  \end{equation} 
    7374  \begin{equation} 
    74     \label{eq:triad:PE_iso_tensor:c} 
     75    \label{eq:PE_iso_tensor:c} 
    7576    \mbox{with}\quad \;\;\Re = 
    7677    \begin{pmatrix} 
     
    9293%  {-r_1 } \hfill & {-r_2 } \hfill & {r_1 ^2+r_2 ^2} \hfill \\ 
    9394% \end{array} }} \right) 
    94  Here \eqref{Eq_PE_iso_slopes}  
     95 Here \autoref{eq:PE_iso_slopes}  
    9596\begin{align*} 
    9697  r_1 &=-\frac{e_3 }{e_1 } \left( \frac{\partial \rho }{\partial i} 
     
    108109space; we write 
    109110\begin{equation} 
    110   \label{eq:triad:Fijk} 
     111  \label{eq:Fijk} 
    111112  \vect{F}_{\mathrm{iso}}=\left(f_1^{lT}e_2e_3, f_2^{lT}e_1e_3, f_3^{lT}e_1e_2\right). 
    112113\end{equation} 
     
    117118 
    118119The off-diagonal terms of the small angle diffusion tensor 
    119 \eqref{Eq_PE_iso_tensor}, \eqref{eq:triad:PE_iso_tensor:c} produce skew-fluxes along the 
     120\autoref{eq:PE_iso_tensor}, \autoref{eq:PE_iso_tensor:c} produce skew-fluxes along the 
    120121$i$- and $j$-directions resulting from the vertical tracer gradient: 
    121122\begin{align} 
    122   \label{eq:triad:i13c} 
     123  \label{eq:i13c} 
    123124  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}\\ 
    124125\intertext{and in the k-direction resulting from the lateral tracer gradients} 
    125   \label{eq:triad:i31c} 
     126  \label{eq:i31c} 
    126127 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} 
    127128\end{align} 
     
    130131component of the small angle diffusion tensor is 
    131132\begin{equation} 
    132   \label{eq:triad:i33c} 
     133  \label{eq:i33c} 
    133134  f_{33}=-\Alt(r_1^2 +r_2^2) \frac{1}{e_3}\frac{\partial T}{\partial k}. 
    134135\end{equation} 
     
    141142 
    142143There is no natural discretization for the $i$-component of the 
    143 skew-flux, \eqref{eq:triad:i13c}, as 
     144skew-flux, \autoref{eq:i13c}, as 
    144145although it must be evaluated at $u$-points, it involves vertical 
    145146gradients (both for the tracer and the slope $r_1$), defined at 
    146 $w$-points. Similarly, the vertical skew flux, \eqref{eq:triad:i31c}, is evaluated at 
     147$w$-points. Similarly, the vertical skew flux, \autoref{eq:i31c}, is evaluated at 
    147148$w$-points but involves horizontal gradients defined at $u$-points. 
    148149 
    149150\subsection{Standard discretization} 
    150151The straightforward approach to discretize the lateral skew flux 
    151 \eqref{eq:triad:i13c} from tracer cell $i,k$ to $i+1,k$, introduced in 1995 
    152 into OPA, \eqref{Eq_tra_ldf_iso}, is to calculate a mean vertical 
     152\autoref{eq:i13c} from tracer cell $i,k$ to $i+1,k$, introduced in 1995 
     153into OPA, \autoref{eq:tra_ldf_iso}, is to calculate a mean vertical 
    153154gradient at the $u$-point from the average of the four surrounding 
    154155vertical tracer gradients, and multiply this by a mean slope at the 
     
    159160$e{_{3}}_{i+1/2}^k{e_{2}}_{i+1/2}i^k$ at the $u$-point cancels out with 
    160161the $1/{e_{3}}_{i+1/2}^k$ associated with the vertical tracer 
    161 gradient, is then \eqref{Eq_tra_ldf_iso} 
     162gradient, is then \autoref{eq:tra_ldf_iso} 
    162163\begin{equation*} 
    163164  \left(F_u^{13} \right)_{i+\hhalf}^k = \Alts_{i+\hhalf}^k 
     
    181182operator to a tracer does not guarantee the decrease of its 
    182183global-average variance. To correct this, we introduced a smoothing of 
    183 the slopes of the iso-neutral surfaces (see \S\ref{LDF}). This 
     184the slopes of the iso-neutral surfaces (see \autoref{chap:LDF}). This 
    184185technique works for $T$ and $S$ in so far as they are active tracers 
    185186($i.e.$ they enter the computation of density), but it does not work 
     
    194195\begin{figure}[tb] \begin{center} 
    195196    \includegraphics[width=1.05\textwidth]{Fig_GRIFF_triad_fluxes} 
    196     \caption{ \protect\label{fig:triad:ISO_triad} 
     197    \caption{ \protect\label{fig:ISO_triad} 
    197198      (a) Arrangement of triads $S_i$ and tracer gradients to 
    198199           give lateral tracer flux from box $i,k$ to $i+1,k$ 
     
    205206slope calculated from the lateral density gradient across the $u$-point 
    206207divided by the vertical density gradient at the same $w$-point as the 
    207 tracer gradient. See Fig.~\ref{fig:triad:ISO_triad}a, where the thick lines 
     208tracer gradient. See \autoref{fig:ISO_triad}a, where the thick lines 
    208209denote the tracer gradients, and the thin lines the corresponding 
    209210triads, with slopes $s_1, \dotsc s_4$. The total area-integrated 
    210211skew-flux from tracer cell $i,k$ to $i+1,k$ 
    211212\begin{multline} 
    212   \label{eq:triad:i13} 
     213  \label{eq:i13} 
    213214  \left( F_u^{13}  \right)_{i+\frac{1}{2}}^k = \Alts_{i+1}^k a_1 s_1 
    214215  \delta _{k+\frac{1}{2}} \left[ T^{i+1} 
     
    225226stencil, and disallows the two-point computational modes. 
    226227 
    227  The vertical skew flux \eqref{eq:triad:i31c} from tracer cell $i,k$ to $i,k+1$ at the 
    228 $w$-point $i,k+\hhalf$ is constructed similarly (Fig.~\ref{fig:triad:ISO_triad}b) 
     228 The vertical skew flux \autoref{eq:i31c} from tracer cell $i,k$ to $i,k+1$ at the 
     229$w$-point $i,k+\hhalf$ is constructed similarly (\autoref{fig:ISO_triad}b) 
    229230by multiplying lateral tracer gradients from each of the four 
    230231surrounding $u$-points by the appropriate triad slope: 
    231232\begin{multline} 
    232   \label{eq:triad:i31} 
     233  \label{eq:i31} 
    233234  \left( F_w^{31} \right) _i ^{k+\frac{1}{2}} =  \Alts_i^{k+1} a_{1}' 
    234235  s_{1}' \delta _{i-\frac{1}{2}} \left[ T^{k+1} \right]/{e_{3u}}_{i-\frac{1}{2}}^{k+1} 
     
    241242(appearing in both the vertical and lateral gradient), and the $u$- and 
    242243$w$-points $(i+i_p,k)$, $(i,k+k_p)$ at the centres of the `arms' of the 
    243 triad as follows (see also Fig.~\ref{fig:triad:ISO_triad}): 
    244 \begin{equation} 
    245   \label{eq:triad:R} 
     244triad as follows (see also \autoref{fig:ISO_triad}): 
     245\begin{equation} 
     246  \label{eq:R} 
    246247  _i^k \mathbb{R}_{i_p}^{k_p} 
    247248  =-\frac{ {e_{3w}}_{\,i}^{\,k+k_p}} { {e_{1u}}_{\,i+i_p}^{\,k}} 
     
    258259\begin{figure}[tb] \begin{center} 
    259260    \includegraphics[width=0.80\textwidth]{Fig_GRIFF_qcells} 
    260     \caption{   \protect\label{fig:triad:qcells} 
     261    \caption{   \protect\label{fig:qcells} 
    261262    Triad notation for quarter cells. $T$-cells are inside 
    262263      boxes, while the  $i+\half,k$ $u$-cell is shaded in green and the 
     
    265266% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    266267 
    267 Each triad $\{_i^{k}\:_{i_p}^{k_p}\}$ is associated (Fig.~\ref{fig:triad:qcells}) with the quarter 
     268Each triad $\{_i^{k}\:_{i_p}^{k_p}\}$ is associated (\autoref{fig:qcells}) with the quarter 
    268269cell 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.  
    269 Expressing the slopes $s_i$ and $s'_i$ in \eqref{eq:triad:i13} and \eqref{eq:triad:i31} in this notation,  
     270Expressing the slopes $s_i$ and $s'_i$ in \autoref{eq:i13} and \autoref{eq:i31} in this notation,  
    270271we have $e.g.$ \ $s_1=s'_1={\:}_i^k \mathbb{R}_{1/2}^{1/2}$.  
    271272Each triad slope $_i^k\mathbb{R}_{i_p}^{k_p}$ is used once (as an $s$)  
     
    276277of a unique triad, and we notate these areas, similarly to the triad slopes,  
    277278as $_i^k{\mathbb{A}_u}_{i_p}^{k_p}$, $_i^k{\mathbb{A}_w}_{i_p}^{k_p}$,  
    278 where $e.g.$ in \eqref{eq:triad:i13} $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$,  
    279 and in \eqref{eq:triad:i31} $a'_{1}={\:}_i^k{\mathbb{A}_w}_{1/2}^{1/2}$. 
     279where $e.g.$ in \autoref{eq:i13} $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$,  
     280and in \autoref{eq:i31} $a'_{1}={\:}_i^k{\mathbb{A}_w}_{1/2}^{1/2}$. 
    280281 
    281282\subsection{Full triad fluxes} 
     
    287288form 
    288289\begin{equation} 
    289   \label{eq:triad:i11} 
     290  \label{eq:i11} 
    290291  \left( F_u^{11} \right) _{i+\frac{1}{2}} ^{k} = 
    291292  - \left( \Alts_i^{k+1} a_{1} + \Alts_i^{k+1} a_{2} + \Alts_i^k 
     
    293294  \frac{\delta _{i+1/2} \left[ T^k\right]}{{e_{1u}}_{\,i+1/2}^{\,k}}, 
    294295\end{equation} 
    295 where the areas $a_i$ are as in \eqref{eq:triad:i13}. In this case, 
    296 separating the total lateral flux, the sum of \eqref{eq:triad:i13} and 
    297 \eqref{eq:triad:i11}, into triad components, a lateral tracer 
     296where the areas $a_i$ are as in \autoref{eq:i13}. In this case, 
     297separating the total lateral flux, the sum of \autoref{eq:i13} and 
     298\autoref{eq:i11}, into triad components, a lateral tracer 
    298299flux 
    299300\begin{equation} 
    300   \label{eq:triad:latflux-triad} 
     301  \label{eq:latflux-triad} 
    301302  _i^k {\mathbb{F}_u}_{i_p}^{k_p} (T) = - \Alts_i^k{ \:}_i^k{\mathbb{A}_u}_{i_p}^{k_p} 
    302303  \left( 
     
    312313density flux associated with each triad separately disappears. 
    313314\begin{equation} 
    314   \label{eq:triad:latflux-rho} 
     315  \label{eq:latflux-rho} 
    315316  {\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 
    316317\end{equation} 
     
    319320to $i+1,k$ must also vanish since it is a sum of four such triad fluxes. 
    320321 
    321 The squared slope $r_1^2$ in the expression \eqref{eq:triad:i33c} for the 
     322The squared slope $r_1^2$ in the expression \autoref{eq:i33c} for the 
    322323$_{33}$ component is also expressed in terms of area-weighted 
    323324squared triad slopes, so the area-integrated vertical flux from tracer 
    324325cell $i,k$ to $i,k+1$ resulting from the $r_1^2$ term is 
    325326\begin{equation} 
    326   \label{eq:triad:i33} 
     327  \label{eq:i33} 
    327328  \left( F_w^{33} \right) _i^{k+\frac{1}{2}} = 
    328329    - \left( \Alts_i^{k+1} a_{1}' s_{1}'^2 
     
    332333\end{equation} 
    333334where the areas $a'$ and slopes $s'$ are the same as in 
    334 \eqref{eq:triad:i31}. 
    335 Then, separating the total vertical flux, the sum of \eqref{eq:triad:i31} and 
    336 \eqref{eq:triad:i33}, into triad components,  a vertical flux 
     335\autoref{eq:i31}. 
     336Then, separating the total vertical flux, the sum of \autoref{eq:i31} and 
     337\autoref{eq:i33}, into triad components,  a vertical flux 
    337338\begin{align} 
    338   \label{eq:triad:vertflux-triad} 
     339  \label{eq:vertflux-triad} 
    339340  _i^k {\mathbb{F}_w}_{i_p}^{k_p} (T) 
    340341  &= \Alts_i^k{\: }_i^k{\mathbb{A}_w}_{i_p}^{k_p} 
     
    345346  \right) \\ 
    346347  &= - \left(\left.{ }_i^k{\mathbb{A}_w}_{i_p}^{k_p}\right/{ }_i^k{\mathbb{A}_u}_{i_p}^{k_p}\right) 
    347    {_i^k\mathbb{R}_{i_p}^{k_p}}{\: }_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \label{eq:triad:vertflux-triad2} 
     348   {_i^k\mathbb{R}_{i_p}^{k_p}}{\: }_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \label{eq:vertflux-triad2} 
    348349\end{align} 
    349350may be associated with each triad. Each vertical density flux $_i^k {\mathbb{F}_w}_{i_p}^{k_p} (\rho)$ 
     
    355356fluxes. 
    356357 
    357 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 
     358We 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 
    358359the $u$-fluxes and $w$-fluxes in 
    359 \eqref{eq:triad:i31}, \eqref{eq:triad:i13}, \eqref{eq:triad:i11} \eqref{eq:triad:i33} and 
    360 Fig.~\ref{fig:triad:ISO_triad} to  write out the iso-neutral fluxes at $u$- and 
     360\autoref{eq:i31}, \autoref{eq:i13}, \autoref{eq:i11} \autoref{eq:i33} and 
     361\autoref{fig:ISO_triad} to  write out the iso-neutral fluxes at $u$- and 
    361362$w$-points as sums of the triad fluxes that cross the $u$- and $w$-faces: 
    362 %(Fig.~\ref{Fig_ISO_triad}): 
    363 \begin{flalign} \label{Eq_iso_flux} \vect{F}_{\mathrm{iso}}(T) &\equiv 
     363%(\autoref{fig:ISO_triad}): 
     364\begin{flalign} \label{eq:iso_flux} \vect{F}_{\mathrm{iso}}(T) &\equiv 
    364365  \sum_{\substack{i_p,\,k_p}} 
    365366  \begin{pmatrix} 
     
    371372 
    372373\subsection{Ensuring the scheme does not increase tracer variance} 
    373 \label{sec:triad:variance} 
     374\label{subsec:variance} 
    374375 
    375376We now require that this operator should not increase the 
     
    397398  &= -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 
    398399  {\;}_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T) \\ 
    399   &={\;} _i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)\,\delta_{i+ i_p}[T^k], \label{eq:triad:dvar_iso_i} 
     400  &={\;} _i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)\,\delta_{i+ i_p}[T^k], \label{eq:dvar_iso_i} 
    400401 \end{aligned} 
    401402\end{multline} 
     
    404405$i,k+k_p+\half$ (below) of 
    405406\begin{equation} 
    406 \label{eq:triad:dvar_iso_k} 
     407\label{eq:dvar_iso_k} 
    407408  _i^k{\mathbb{F}_w}_{i_p}^{k_p} (T) \,\delta_{k+ k_p}[T^i]. 
    408409\end{equation} 
    409410The total variance tendency driven by the triad is the sum of these 
    410411two. Expanding $_i^k{\mathbb{F}_u}_{i_p}^{k_p} (T)$ and 
    411 $_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)$ with \eqref{eq:triad:latflux-triad} and 
    412 \eqref{eq:triad:vertflux-triad}, it is 
     412$_i^k{\mathbb{F}_w}_{i_p}^{k_p} (T)$ with \autoref{eq:latflux-triad} and 
     413\autoref{eq:vertflux-triad}, it is 
    413414\begin{multline*} 
    414415-\Alts_i^k\left \{ 
     
    430431to be related to a triad volume $_i^k\mathbb{V}_{i_p}^{k_p}$ by 
    431432\begin{equation} 
    432   \label{eq:triad:V-A} 
     433  \label{eq:V-A} 
    433434  _i^k\mathbb{V}_{i_p}^{k_p} 
    434435  ={\;}_i^k{\mathbb{A}_u}_{i_p}^{k_p}\,{e_{1u}}_{\,i + i_p}^{\,k} 
     
    437438the variance tendency reduces to the perfect square 
    438439\begin{equation} 
    439   \label{eq:triad:perfect-square} 
     440  \label{eq:perfect-square} 
    440441  -\Alts_i^k{\:} _i^k\mathbb{V}_{i_p}^{k_p} 
    441442  \left( 
     
    445446  \right)^2\leq 0. 
    446447\end{equation} 
    447 Thus, the constraint \eqref{eq:triad:V-A} ensures that the fluxes (\ref{eq:triad:latflux-triad}, \ref{eq:triad:vertflux-triad}) associated 
     448Thus, the constraint \autoref{eq:V-A} ensures that the fluxes (\autoref{eq:latflux-triad}, \autoref{eq:vertflux-triad}) associated 
    448449with a given slope triad $_i^k\mathbb{R}_{i_p}^{k_p}$ do not increase 
    449450the net variance. Since the total fluxes are sums of such fluxes from 
     
    452453increase. 
    453454 
    454 The expression \eqref{eq:triad:V-A} can be interpreted as a discretization 
     455The expression \autoref{eq:V-A} can be interpreted as a discretization 
    455456of the global integral 
    456457\begin{equation} 
    457   \label{eq:triad:cts-var} 
     458  \label{eq:cts-var} 
    458459  \frac{\partial}{\partial t}\int\!\half T^2\, dV = 
    459460  \int\!\mathbf{F}\cdot\nabla T\, dV, 
     
    480481cells, defined in terms of the distances between $T$, $u$,$f$ and 
    481482$w$-points. This is the natural discretization of 
    482 \eqref{eq:triad:cts-var}. The \NEMO model, however, operates with scale 
     483\autoref{eq:cts-var}. The \NEMO model, however, operates with scale 
    483484factors instead of grid sizes, and scale factors for the quarter 
    484485cells are not defined. Instead, therefore we simply choose 
    485486\begin{equation} 
    486   \label{eq:triad:V-NEMO} 
     487  \label{eq:V-NEMO} 
    487488  _i^k\mathbb{V}_{i_p}^{k_p}=\quarter {b_u}_{i+i_p}^k, 
    488489\end{equation} 
     
    492493$i+1,k$ reduces to the classical form 
    493494\begin{equation} 
    494   \label{eq:triad:lat-normal} 
     495  \label{eq:lat-normal} 
    495496-\overline\Alts_{\,i+1/2}^k\; 
    496497\frac{{b_u}_{i+1/2}^k}{{e_{1u}}_{\,i + i_p}^{\,k}} 
     
    500501In fact if the diffusive coefficient is defined at $u$-points, so that 
    501502we employ $\Alts_{i+i_p}^k$ instead of  $\Alts_i^k$ in the definitions of the 
    502 triad fluxes \eqref{eq:triad:latflux-triad} and \eqref{eq:triad:vertflux-triad}, 
     503triad fluxes \autoref{eq:latflux-triad} and \autoref{eq:vertflux-triad}, 
    503504we can replace $\overline{A}_{\,i+1/2}^k$ by $A_{i+1/2}^k$ in the above. 
    504505 
     
    506507The iso-neutral fluxes at $u$- and 
    507508$w$-points are the sums of the triad fluxes that cross the $u$- and 
    508 $w$-faces \eqref{Eq_iso_flux}: 
    509 \begin{subequations}\label{eq:triad:alltriadflux} 
    510   \begin{flalign}\label{eq:triad:vect_isoflux} 
     509$w$-faces \autoref{eq:iso_flux}: 
     510\begin{subequations}\label{eq:alltriadflux} 
     511  \begin{flalign}\label{eq:vect_isoflux} 
    511512    \vect{F}_{\mathrm{iso}}(T) &\equiv 
    512513    \sum_{\substack{i_p,\,k_p}} 
     
    517518    \end{pmatrix}, 
    518519  \end{flalign} 
    519   where \eqref{eq:triad:latflux-triad}: 
     520  where \autoref{eq:latflux-triad}: 
    520521  \begin{align} 
    521     \label{eq:triad:triadfluxu} 
     522    \label{eq:triadfluxu} 
    522523    _i^k {\mathbb{F}_u}_{i_p}^{k_p} (T) &= - \Alts_i^k{ 
    523524      \:}\frac{{{}_i^k\mathbb{V}}_{i_p}^{k_p}}{{e_{1u}}_{\,i + i_p}^{\,k}} 
     
    534535      -\ \left({_i^k\mathbb{R}_{i_p}^{k_p}}\right)^2 \ 
    535536      \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} } 
    536     \right),\label{eq:triad:triadfluxw} 
     537    \right),\label{eq:triadfluxw} 
    537538  \end{align} 
    538   with \eqref{eq:triad:V-NEMO} 
     539  with \autoref{eq:V-NEMO} 
    539540  \begin{equation} 
    540     \label{eq:triad:V-NEMO2} 
     541    \label{eq:V-NEMO2} 
    541542    _i^k{\mathbb{V}}_{i_p}^{k_p}=\quarter {b_u}_{i+i_p}^k. 
    542543  \end{equation} 
    543544\end{subequations} 
    544545 
    545  The divergence of the expression \eqref{Eq_iso_flux} for the fluxes gives the iso-neutral diffusion tendency at 
     546 The divergence of the expression \autoref{eq:iso_flux} for the fluxes gives the iso-neutral diffusion tendency at 
    546547each tracer point: 
    547 \begin{equation} \label{eq:triad:iso_operator} D_l^T = \frac{1}{b_T} 
     548\begin{equation} \label{eq:iso_operator} D_l^T = \frac{1}{b_T} 
    548549  \sum_{\substack{i_p,\,k_p}} \left\{ \delta_{i} \left[{_{i+1/2-i_p}^k 
    549550        {\mathbb{F}_u }_{i_p}^{k_p}} \right] + \delta_{k} \left[ 
     
    554555\begin{description} 
    555556\item[$\bullet$ horizontal diffusion] The discretization of the 
    556   diffusion operator recovers \eqref{eq:triad:lat-normal} the traditional five-point Laplacian in 
     557  diffusion operator recovers \autoref{eq:lat-normal} the traditional five-point Laplacian in 
    557558  the limit of flat iso-neutral direction : 
    558   \begin{equation} \label{eq:triad:iso_property0} D_l^T = \frac{1}{b_T} \ 
     559  \begin{equation} \label{eq:iso_property0} D_l^T = \frac{1}{b_T} \ 
    559560    \delta_{i} \left[ \frac{e_{2u}\,e_{3u}}{e_{1u}} \; 
    560561      \overline\Alts^{\,i} \; \delta_{i+1/2}[T] \right] \qquad 
     
    564565\item[$\bullet$ implicit treatment in the vertical] Only tracer values 
    565566  associated with a single water column appear in the expression 
    566   \eqref{eq:triad:i33} for the $_{33}$ fluxes, vertical fluxes driven by 
     567  \autoref{eq:i33} for the $_{33}$ fluxes, vertical fluxes driven by 
    567568  vertical gradients. This is of paramount importance since it means 
    568569  that a time-implicit algorithm can be used to solve the vertical 
     
    582583\item[$\bullet$ pure iso-neutral operator] The iso-neutral flux of 
    583584  locally referenced potential density is zero. See 
    584   \eqref{eq:triad:latflux-rho} and \eqref{eq:triad:vertflux-triad2}. 
     585  \autoref{eq:latflux-rho} and \autoref{eq:vertflux-triad2}. 
    585586 
    586587\item[$\bullet$ conservation of tracer] The iso-neutral diffusion 
    587588  conserves tracer content, $i.e.$ 
    588   \begin{equation} \label{eq:triad:iso_property1} \sum_{i,j,k} \left\{ D_l^T \ 
     589  \begin{equation} \label{eq:iso_property1} \sum_{i,j,k} \left\{ D_l^T \ 
    589590      b_T \right\} = 0 
    590591  \end{equation} 
     
    594595\item[$\bullet$ no increase of tracer variance] The iso-neutral diffusion 
    595596  does not increase the tracer variance, $i.e.$ 
    596   \begin{equation} \label{eq:triad:iso_property2} \sum_{i,j,k} \left\{ T \ D_l^T 
     597  \begin{equation} \label{eq:iso_property2} \sum_{i,j,k} \left\{ T \ D_l^T 
    597598      \ b_T \right\} \leq 0 
    598599  \end{equation} 
    599600  The property is demonstrated in 
    600   \S\ref{sec:triad:variance} above. It is a key property for a diffusion 
     601  \autoref{subsec:variance} above. It is a key property for a diffusion 
    601602  term. It means that it is also a dissipation term, $i.e.$ it 
    602603  dissipates the square of the quantity on which it is applied.  It 
     
    607608\item[$\bullet$ self-adjoint operator] The iso-neutral diffusion 
    608609  operator is self-adjoint, $i.e.$ 
    609   \begin{equation} \label{eq:triad:iso_property3} \sum_{i,j,k} \left\{ S \ D_l^T 
     610  \begin{equation} \label{eq:iso_property3} \sum_{i,j,k} \left\{ S \ D_l^T 
    610611      \ b_T \right\} = \sum_{i,j,k} \left\{ D_l^S \ T \ b_T \right\} 
    611612  \end{equation} 
     
    614615  routine. This property can be demonstrated similarly to the proof of 
    615616  the `no increase of tracer variance' property. The contribution by a 
    616   single triad towards the left hand side of \eqref{eq:triad:iso_property3}, can 
    617   be found by replacing $\delta[T]$ by $\delta[S]$ in \eqref{eq:triad:dvar_iso_i} 
    618   and \eqref{eq:triad:dvar_iso_k}. This results in a term similar to 
    619   \eqref{eq:triad:perfect-square}, 
    620 \begin{equation} 
    621   \label{eq:triad:TScovar} 
     617  single triad towards the left hand side of \autoref{eq:iso_property3}, can 
     618  be found by replacing $\delta[T]$ by $\delta[S]$ in \autoref{eq:dvar_iso_i} 
     619  and \autoref{eq:dvar_iso_k}. This results in a term similar to 
     620  \autoref{eq:perfect-square}, 
     621\begin{equation} 
     622  \label{eq:TScovar} 
    622623  - \Alts_i^k{\:} _i^k\mathbb{V}_{i_p}^{k_p} 
    623624  \left( 
     
    634635This is symmetrical in $T $ and $S$, so exactly the same term arises 
    635636from the discretization of this triad's contribution towards the 
    636 RHS of \eqref{eq:triad:iso_property3}. 
     637RHS of \autoref{eq:iso_property3}. 
    637638\end{description} 
    638639 
    639 \subsection{Treatment of the triads at the boundaries}\label{sec:triad:iso_bdry} 
     640\subsection{Treatment of the triads at the boundaries}\label{sec:iso_bdry} 
    640641The triad slope can only be defined where both the grid boxes centred at 
    641642the end of the arms exist. Triads that would poke up 
    642643through the upper ocean surface into the atmosphere, or down into the 
    643 ocean floor, must be masked out. See Fig.~\ref{fig:triad:bdry_triads}. Surface layer triads 
     644ocean floor, must be masked out. See \autoref{fig:bdry_triads}. Surface layer triads 
    644645$\triad{i}{1}{R}{1/2}{-1/2}$ (magenta) and 
    645646$\triad{i+1}{1}{R}{-1/2}{-1/2}$ (blue) that require density to be 
    646 specified above the ocean surface are masked (Fig.~\ref{fig:triad:bdry_triads}a): this ensures that lateral 
     647specified above the ocean surface are masked (\autoref{fig:bdry_triads}a): this ensures that lateral 
    647648tracer gradients produce no flux through the ocean surface. However, 
    648649to prevent surface noise, it is customary to retain the $_{11}$ contributions towards 
     
    650651$\triad[u]{i+1}{1}{F}{-1/2}{-1/2}$; this drives diapycnal tracer 
    651652fluxes. Similar comments apply to triads that would intersect the 
    652 ocean floor (Fig.~\ref{fig:triad:bdry_triads}b). Note that both near bottom 
     653ocean floor (\autoref{fig:bdry_triads}b). Note that both near bottom 
    653654triad slopes $\triad{i}{k}{R}{1/2}{1/2}$ and 
    654655$\triad{i+1}{k}{R}{-1/2}{1/2}$ are masked when either of the $i,k+1$ 
     
    665666\begin{figure}[h] \begin{center} 
    666667    \includegraphics[width=0.60\textwidth]{Fig_GRIFF_bdry_triads} 
    667     \caption{  \protect\label{fig:triad:bdry_triads} 
     668    \caption{  \protect\label{fig:bdry_triads} 
    668669      (a) Uppermost model layer $k=1$ with $i,1$ and $i+1,1$ tracer 
    669670      points (black dots), and $i+1/2,1$ $u$-point (blue square). Triad 
     
    678679      or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ $u$-point 
    679680      is masked. The associated lateral fluxes (grey-black dashed 
    680       line) are masked if \np{botmix\_triad}\forcode{ = .false.}, but left 
    681       unmasked, giving bottom mixing, if \np{botmix\_triad}\forcode{ = .true.}} 
     681      line) are masked if \protect\np{botmix\_triad}\forcode{ = .false.}, but left 
     682      unmasked, giving bottom mixing, if \protect\np{botmix\_triad}\forcode{ = .true.}} 
    682683 \end{center} \end{figure} 
    683684% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    684685 
    685 \subsection{ Limiting of the slopes within the interior}\label{sec:triad:limit} 
    686 As discussed in \S\ref{LDF_slp_iso}, iso-neutral slopes relative to 
     686\subsection{ Limiting of the slopes within the interior}\label{sec:limit} 
     687As discussed in \autoref{subsec:LDF_slp_iso}, iso-neutral slopes relative to 
    687688geopotentials must be bounded everywhere, both for consistency with the small-slope 
    688689approximation and for numerical stability \citep{Cox1987, 
     
    692693It is of course relevant to the iso-neutral slopes $\tilde{r}_i=r_i+\sigma_i$ relative to 
    693694geopotentials (here the $\sigma_i$ are the slopes of the coordinate surfaces relative to 
    694 geopotentials) \eqref{Eq_PE_slopes_eiv} rather than the slope $r_i$ relative to coordinate 
     695geopotentials) \autoref{eq:PE_slopes_eiv} rather than the slope $r_i$ relative to coordinate 
    695696surfaces, so we require 
    696697\begin{equation*} 
     
    700701Each individual triad slope 
    701702 \begin{equation} 
    702    \label{eq:triad:Rtilde} 
     703   \label{eq:Rtilde} 
    703704_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}} 
    704705 \end{equation} 
     
    709710is always downwards, and so acts to reduce gravitational potential energy. 
    710711 
    711 \subsection{Tapering within the surface mixed layer}\label{sec:triad:taper} 
     712\subsection{Tapering within the surface mixed layer}\label{sec:taper} 
    712713Additional tapering of the iso-neutral fluxes is necessary within the 
    713714surface mixed layer. When the Griffies triads are used, we offer two 
    714715options for this. 
    715716 
    716 \subsubsection{Linear slope tapering within the surface mixed layer}\label{sec:triad:lintaper} 
     717\subsubsection{Linear slope tapering within the surface mixed layer}\label{sec:lintaper} 
    717718This is the option activated by the default choice 
    718719\np{ln\_triad\_iso}\forcode{ = .false.}. Slopes $\tilde{r}_i$ relative to 
    719720geopotentials are tapered linearly from their value immediately below the mixed layer to zero at the 
    720 surface, as described in option (c) of Fig.~\ref{Fig_eiv_slp}, to values 
     721surface, as described in option (c) of \autoref{fig:eiv_slp}, to values 
    721722\begin{subequations} 
    722723  \begin{equation} 
    723    \label{eq:triad:rmtilde} 
     724   \label{eq:rmtilde} 
    724725     \rMLt = 
    725726  -\frac{z}{h}\left.\tilde{r}_i\right|_{z=-h}\quad \text{ for  } z>-h, 
     
    728729adjusted to 
    729730  \begin{equation} 
    730    \label{eq:triad:rm} 
     731   \label{eq:rm} 
    731732 \rML =\rMLt -\sigma_i \quad \text{ for  } z>-h. 
    732733  \end{equation} 
    733734\end{subequations} 
    734735Thus the diffusion operator within the mixed layer is given by: 
    735 \begin{equation} \label{eq:triad:iso_tensor_ML} 
     736\begin{equation} \label{eq:iso_tensor_ML} 
    736737D^{lT}=\nabla {\rm {\bf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad 
    737738\mbox{with}\quad \;\;\Re =\left( {{\begin{array}{*{20}c} 
     
    745746mixed-layer and in isopycnal layers immediately below, in the 
    746747thermocline. It is consistent with the way the $\tilde{r}_i$ are 
    747 tapered within the mixed layer (see \S\ref{sec:triad:taperskew} below) 
     748tapered within the mixed layer (see \autoref{sec:taperskew} below) 
    748749so as to ensure a uniform GM eddy-induced velocity throughout the 
    749750mixed layer. However, it gives a downwards density flux and so acts so 
    750751as to reduce potential energy in the same way as does the slope 
    751 limiting discussed above in \S\ref{sec:triad:limit}. 
     752limiting discussed above in \autoref{sec:limit}. 
    752753  
    753 As in \S\ref{sec:triad:limit} above, the tapering 
    754 \eqref{eq:triad:rmtilde} is applied separately to each triad 
     754As in \autoref{sec:limit} above, the tapering 
     755\autoref{eq:rmtilde} is applied separately to each triad 
    755756$_i^k\tilde{\mathbb{R}}_{i_p}^{k_p}$, and the 
    756757$_i^k\mathbb{R}_{i_p}^{k_p}$ adjusted. For clarity, we assume 
    757758$z$-coordinates in the following; the conversion from 
    758759$\mathbb{R}$ to $\tilde{\mathbb{R}}$ and back to $\mathbb{R}$ follows exactly as described 
    759 above by \eqref{eq:triad:Rtilde}. 
     760above by \autoref{eq:Rtilde}. 
    760761\begin{enumerate} 
    761762\item Mixed-layer depth is defined so as to avoid including regions of weak 
    762763vertical stratification in the slope definition. 
    763764 At each $i,j$ (simplified to $i$ in 
    764 Fig.~\ref{fig:triad:MLB_triad}), we define the mixed-layer by setting 
     765\autoref{fig:MLB_triad}), we define the mixed-layer by setting 
    765766the vertical index of the tracer point immediately below the mixed 
    766767layer, $k_{\mathrm{ML}}$, as the maximum $k$ (shallowest tracer point) 
     
    768769${\rho_0}_{i,k}>{\rho_0}_{i,k_{10}}+\Delta\rho_c$, where $i,k_{10}$ is 
    769770the tracer gridbox within which the depth reaches 10~m. See the left 
    770 side of Fig.~\ref{fig:triad:MLB_triad}. We use the $k_{10}$-gridbox 
     771side of \autoref{fig:MLB_triad}. We use the $k_{10}$-gridbox 
    771772instead of the surface gridbox to avoid problems e.g.\ with thin 
    772773daytime mixed-layers. Currently we use the same 
     
    784785${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$ are 
    785786representative of the thermocline. The four basal triads defined in the bottom part 
    786 of Fig.~\ref{fig:triad:MLB_triad} are then 
     787of \autoref{fig:MLB_triad} are then 
    787788\begin{align} 
    788789  {\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p} &= 
    789  {\:}^{k_{\mathrm{ML}}-k_p-1/2}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}, \label{eq:triad:Rbase} 
     790 {\:}^{k_{\mathrm{ML}}-k_p-1/2}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}, \label{eq:Rbase} 
    790791\\ 
    791792\intertext{with e.g.\ the green triad} 
     
    797798so it is this depth 
    798799\begin{equation} 
    799   \label{eq:triad:zbase} 
     800  \label{eq:zbase} 
    800801  {z_\mathrm{base}}_{\,i}={z_{w}}_{k_\mathrm{ML}-1/2} 
    801802\end{equation} 
    802803(one gridbox deeper than the 
    803804diagnosed ML depth $z_{\mathrm{ML}})$ that sets the $h$ used to taper 
    804 the slopes in \eqref{eq:triad:rmtilde}. 
     805the slopes in \autoref{eq:rmtilde}. 
    805806\item Finally, we calculate the adjusted triads 
    806807${\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,i_p}^{k_p}$ within the mixed 
     
    815816\intertext{and more generally} 
    816817 {\:}_i^k{\mathbb{R}_{\mathrm{ML}}}_{\,i_p}^{k_p} &= 
    817 \frac{{z_w}_{k+k_p}}{{z_{\mathrm{base}}}_{\,i}}{\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}.\label{eq:triad:RML} 
     818\frac{{z_w}_{k+k_p}}{{z_{\mathrm{base}}}_{\,i}}{\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}.\label{eq:RML} 
    818819\end{align} 
    819820\end{enumerate} 
     
    822823\begin{figure}[h] 
    823824%  \fcapside { 
    824     \caption{\protect\label{fig:triad:MLB_triad} Definition of 
     825    \caption{\protect\label{fig:MLB_triad} Definition of 
    825826      mixed-layer depth and calculation of linearly tapered 
    826827      triads. The figure shows a water column at a given $i,j$ 
     
    846847 
    847848\subsubsection{Additional truncation of skew iso-neutral flux components} 
    848 \label{sec:triad:Gerdes-taper} 
     849\label{subsec:Gerdes-taper} 
    849850The alternative option is activated by setting \np{ln\_triad\_iso} = 
    850851  true. This retains the same tapered slope $\rML$  described above for the 
     
    853854replaces the $\rML$ in the skew term by 
    854855\begin{equation} 
    855   \label{eq:triad:rm*} 
     856  \label{eq:rm*} 
    856857  \rML^*=\left.\rMLt^2\right/\tilde{r}_i-\sigma_i, 
    857858\end{equation} 
    858859giving a ML diffusive operator 
    859 \begin{equation} \label{eq:triad:iso_tensor_ML2} 
     860\begin{equation} \label{eq:iso_tensor_ML2} 
    860861D^{lT}=\nabla {\rm {\bf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad 
    861862\mbox{with}\quad \;\;\Re =\left( {{\begin{array}{*{20}c} 
     
    887888% Skew flux formulation for Eddy Induced Velocity : 
    888889% ================================================================ 
    889 \section{Eddy induced advection formulated as a skew flux}\label{sec:triad:skew-flux} 
    890  
    891 \subsection{Continuous skew flux formulation}\label{sec:triad:continuous-skew-flux} 
     890\section{Eddy induced advection formulated as a skew flux}\label{sec:skew-flux} 
     891 
     892\subsection{Continuous skew flux formulation}\label{sec:continuous-skew-flux} 
    892893 
    893894 When Gent and McWilliams's [1990] diffusion is used, 
     
    895896eddy induced velocity, the formulation of which depends on the slopes of iso- 
    896897neutral surfaces. Contrary to the case of iso-neutral mixing, the slopes used 
    897 here are referenced to the geopotential surfaces, $i.e.$ \eqref{Eq_ldfslp_geo} 
    898 is used in $z$-coordinate, and the sum \eqref{Eq_ldfslp_geo} 
    899 + \eqref{Eq_ldfslp_iso} in $z^*$ or $s$-coordinates. 
     898here are referenced to the geopotential surfaces, $i.e.$ \autoref{eq:ldfslp_geo} 
     899is used in $z$-coordinate, and the sum \autoref{eq:ldfslp_geo} 
     900+ \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates. 
    900901 
    901902The eddy induced velocity is given by: 
    902 \begin{subequations} \label{eq:triad:eiv} 
    903 \begin{equation}\label{eq:triad:eiv_v} 
     903\begin{subequations} \label{eq:eiv} 
     904\begin{equation}\label{eq:eiv_v} 
    904905\begin{split} 
    905906 u^* & = - \frac{1}{e_{3}}\;          \partial_i\psi_1,  \\ 
     
    910911\end{equation} 
    911912where the streamfunctions $\psi_i$ are given by 
    912 \begin{equation} \label{eq:triad:eiv_psi} 
     913\begin{equation} \label{eq:eiv_psi} 
    913914\begin{split} 
    914915\psi_1 & = A_{e} \; \tilde{r}_1,   \\ 
     
    924925default implementation, where \np{ln\_traldf\_triad} is set 
    925926false. This allows us to take advantage of all the advection schemes 
    926 offered for the tracers (see \S\ref{TRA_adv}) and not just a $2^{nd}$ 
     927offered for the tracers (see \autoref{sec:TRA_adv}) and not just a $2^{nd}$ 
    927928order advection scheme. This is particularly useful for passive 
    928929tracers where \emph{positivity} of the advection scheme is of 
     
    962963and since the eddy induced velocity field is non-divergent, we end up with the skew 
    963964form of the eddy induced advective fluxes per unit area in $ijk$ space: 
    964 \begin{equation} \label{eq:triad:eiv_skew_ijk} 
     965\begin{equation} \label{eq:eiv_skew_ijk} 
    965966\textbf{F}_\mathrm{eiv}^T = \begin{pmatrix} 
    966967           {+ e_{2} \, \psi_1  \; \partial_k T}   \\ 
     
    969970\end{equation} 
    970971The total fluxes per unit physical area are then 
    971 \begin{equation}\label{eq:triad:eiv_skew_physical} 
     972\begin{equation}\label{eq:eiv_skew_physical} 
    972973\begin{split} 
    973974 f^*_1 & = \frac{1}{e_{3}}\; \psi_1 \partial_k T   \\ 
     
    977978\end{split} 
    978979\end{equation} 
    979 Note that Eq.~ \eqref{eq:triad:eiv_skew_physical} takes the same form whatever the 
     980Note that  \autoref{eq:eiv_skew_physical} takes the same form whatever the 
    980981vertical coordinate, though of course the slopes 
    981 $\tilde{r}_i$ which define the $\psi_i$ in \eqref{eq:triad:eiv_psi} are relative to geopotentials. 
     982$\tilde{r}_i$ which define the $\psi_i$ in \autoref{eq:eiv_psi} are relative to geopotentials. 
    982983The tendency associated with eddy induced velocity is then simply the convergence 
    983 of the fluxes (\ref{eq:triad:eiv_skew_ijk}, \ref{eq:triad:eiv_skew_physical}), so 
    984 \begin{equation} \label{eq:triad:skew_eiv_conv} 
     984of the fluxes (\autoref{eq:eiv_skew_ijk}, \autoref{eq:eiv_skew_physical}), so 
     985\begin{equation} \label{eq:skew_eiv_conv} 
    985986\frac{\partial T}{\partial t}= -\frac{1}{e_1 \, e_2 \, e_3 }      \left[ 
    986987  \frac{\partial}{\partial i} \left( e_2 \psi_1 \partial_k T\right) 
     
    995996 
    996997\subsection{Discrete skew flux formulation} 
    997 The skew fluxes in (\ref{eq:triad:eiv_skew_physical}, \ref{eq:triad:eiv_skew_ijk}), like the off-diagonal terms 
    998 (\ref{eq:triad:i13c}, \ref{eq:triad:i31c}) of the small angle diffusion tensor, are best 
    999 expressed in terms of the triad slopes, as in Fig.~\ref{fig:triad:ISO_triad} 
    1000 and Eqs~(\ref{eq:triad:i13}, \ref{eq:triad:i31}); but now in terms of the triad slopes 
     998The skew fluxes in (\autoref{eq:eiv_skew_physical}, \autoref{eq:eiv_skew_ijk}), like the off-diagonal terms 
     999(\autoref{eq:i13c}, \autoref{eq:i31c}) of the small angle diffusion tensor, are best 
     1000expressed in terms of the triad slopes, as in \autoref{fig:ISO_triad} 
     1001and (\autoref{eq:i13}, \autoref{eq:i31}); but now in terms of the triad slopes 
    10011002$\tilde{\mathbb{R}}$ relative to geopotentials instead of the 
    10021003$\mathbb{R}$ relative to coordinate surfaces. The discrete form of 
    1003 \eqref{eq:triad:eiv_skew_ijk} using the slopes \eqref{eq:triad:R} and 
     1004\autoref{eq:eiv_skew_ijk} using the slopes \autoref{eq:R} and 
    10041005defining $A_e$ at $T$-points is then given by: 
    10051006 
    10061007 
    1007 \begin{subequations}\label{eq:triad:allskewflux} 
    1008   \begin{flalign}\label{eq:triad:vect_skew_flux} 
     1008\begin{subequations}\label{eq:allskewflux} 
     1009  \begin{flalign}\label{eq:vect_skew_flux} 
    10091010    \vect{F}_{\mathrm{eiv}}(T) &\equiv 
    10101011    \sum_{\substack{i_p,\,k_p}} 
     
    10161017  \end{flalign} 
    10171018  where the skew flux in the $i$-direction associated with a given 
    1018   triad is (\ref{eq:triad:latflux-triad}, \ref{eq:triad:triadfluxu}): 
     1019  triad is (\autoref{eq:latflux-triad}, \autoref{eq:triadfluxu}): 
    10191020  \begin{align} 
    1020     \label{eq:triad:skewfluxu} 
     1021    \label{eq:skewfluxu} 
    10211022    _i^k {\mathbb{S}_u}_{i_p}^{k_p} (T) &= + \quarter {A_e}_i^k{ 
    10221023      \:}\frac{{b_u}_{i+i_p}^k}{{e_{1u}}_{\,i + i_p}^{\,k}} 
     
    10241025      \frac{ \delta_{k+k_p} [T^i] }{{e_{3w}}_{\,i}^{\,k+k_p} }, 
    10251026   \\ 
    1026     \intertext{and \eqref{eq:triad:triadfluxw} in the $k$-direction, changing the sign 
    1027       to be consistent with \eqref{eq:triad:eiv_skew_ijk}:} 
     1027    \intertext{and \autoref{eq:triadfluxw} in the $k$-direction, changing the sign 
     1028      to be consistent with \autoref{eq:eiv_skew_ijk}:} 
    10281029    _i^k {\mathbb{S}_w}_{i_p}^{k_p} (T) 
    10291030    &= -\quarter {A_e}_i^k{\: }\frac{{b_u}_{i+i_p}^k}{{e_{3w}}_{\,i}^{\,k+k_p}} 
    1030      {_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} 
     1031     {_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} 
    10311032  \end{align} 
    10321033\end{subequations} 
     
    10401041include a diffusive component but is a `pure' advection term. This can 
    10411042be seen 
    1042 %either from Appendix \ref{Apdx_eiv_skew} or 
     1043%either from Appendix \autoref{apdx:eiv_skew} or 
    10431044by considering the 
    10441045fluxes associated with a given triad slope 
    10451046$_i^k{\mathbb{R}}_{i_p}^{k_p} (T)$. For, following 
    1046 \S\ref{sec:triad:variance} and \eqref{eq:triad:dvar_iso_i}, the 
     1047\autoref{subsec:variance} and \autoref{eq:dvar_iso_i}, the 
    10471048associated horizontal skew-flux $_i^k{\mathbb{S}_u}_{i_p}^{k_p} (T)$ 
    10481049drives a net rate of change of variance, summed over the two 
    10491050$T$-points $i+i_p-\half,k$ and $i+i_p+\half,k$, of 
    10501051\begin{equation} 
    1051 \label{eq:triad:dvar_eiv_i} 
     1052\label{eq:dvar_eiv_i} 
    10521053  _i^k{\mathbb{S}_u}_{i_p}^{k_p} (T)\,\delta_{i+ i_p}[T^k], 
    10531054\end{equation} 
     
    10551056$T$-points $i,k+k_p-\half$ (above) and $i,k+k_p+\half$ (below) of 
    10561057\begin{equation} 
    1057 \label{eq:triad:dvar_eiv_k} 
     1058\label{eq:dvar_eiv_k} 
    10581059  _i^k{\mathbb{S}_w}_{i_p}^{k_p} (T) \,\delta_{k+ k_p}[T^i]. 
    10591060\end{equation} 
    1060 Inspection of the definitions (\ref{eq:triad:skewfluxu}, \ref{eq:triad:skewfluxw}) 
    1061 shows that these two variance changes (\ref{eq:triad:dvar_eiv_i}, \ref{eq:triad:dvar_eiv_k}) 
     1061Inspection of the definitions (\autoref{eq:skewfluxu}, \autoref{eq:skewfluxw}) 
     1062shows that these two variance changes (\autoref{eq:dvar_eiv_i}, \autoref{eq:dvar_eiv_k}) 
    10621063sum to zero. Hence the two fluxes associated with each triad make no 
    10631064net contribution to the variance budget. 
     
    10721073For the change in gravitational PE driven by the $k$-flux is 
    10731074\begin{align} 
    1074   \label{eq:triad:vert_densityPE} 
     1075  \label{eq:vert_densityPE} 
    10751076  g {e_{3w}}_{\,i}^{\,k+k_p}{\mathbb{S}_w}_{i_p}^{k_p} (\rho) 
    10761077  &=g {e_{3w}}_{\,i}^{\,k+k_p}\left[-\alpha _i^k {\:}_i^k 
     
    10781079    {\mathbb{S}_w}_{i_p}^{k_p} (S) \right]. \notag \\ 
    10791080\intertext{Substituting  ${\:}_i^k {\mathbb{S}_w}_{i_p}^{k_p}$ from 
    1080   \eqref{eq:triad:skewfluxw}, gives} 
     1081  \autoref{eq:skewfluxw}, gives} 
    10811082% and separating out 
    10821083% $\rtriadt{R}=\rtriad{R} + \delta_{i+i_p}[z_T^k]$, 
     
    10901091\end{align} 
    10911092using the definition of the triad slope $\rtriad{R}$, 
    1092 \eqref{eq:triad:R} to express $-\alpha _i^k\delta_{i+ i_p}[T^k]+ 
     1093\autoref{eq:R} to express $-\alpha _i^k\delta_{i+ i_p}[T^k]+ 
    10931094\beta_i^k\delta_{i+ i_p}[S^k]$ in terms of  $-\alpha_i^k \delta_{k+ 
    10941095  k_p}[T^i]+ \beta_i^k\delta_{k+ k_p}[S^i]$. 
     
    10961097Where the coordinates slope, the $i$-flux gives a PE change 
    10971098\begin{multline} 
    1098   \label{eq:triad:lat_densityPE} 
     1099  \label{eq:lat_densityPE} 
    10991100 g \delta_{i+i_p}[z_T^k] 
    11001101\left[ 
     
    11061107\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}}, 
    11071108\end{multline} 
    1108 (using \eqref{eq:triad:skewfluxu}) and so the total PE change 
    1109 \eqref{eq:triad:vert_densityPE} + \eqref{eq:triad:lat_densityPE} associated with the triad fluxes is 
     1109(using \autoref{eq:skewfluxu}) and so the total PE change 
     1110\autoref{eq:vert_densityPE} + \autoref{eq:lat_densityPE} associated with the triad fluxes is 
    11101111\begin{multline} 
    1111   \label{eq:triad:tot_densityPE} 
     1112  \label{eq:tot_densityPE} 
    11121113  g{e_{3w}}_{\,i}^{\,k+k_p}{\mathbb{S}_w}_{i_p}^{k_p} (\rho) + 
    11131114g\delta_{i+i_p}[z_T^k] {\:}_i^k {\mathbb{S}_u}_{i_p}^{k_p} (\rho) \\ 
     
    11191120\beta_i^k\delta_{k+ k_p}[S^i]<0$, this PE change is negative. 
    11201121 
    1121 \subsection{Treatment of the triads at the boundaries}\label{sec:triad:skew_bdry} 
     1122\subsection{Treatment of the triads at the boundaries}\label{sec:skew_bdry} 
    11221123Triad slopes \rtriadt{R} used for the calculation of the eddy-induced skew-fluxes 
    11231124are masked at the boundaries in exactly the same way as are the triad 
    11241125slopes \rtriad{R} used for the iso-neutral diffusive fluxes, as 
    1125 described in \S\ref{sec:triad:iso_bdry} and 
    1126 Fig.~\ref{fig:triad:bdry_triads}. Thus surface layer triads 
     1126described in \autoref{sec:iso_bdry} and 
     1127\autoref{fig:bdry_triads}. Thus surface layer triads 
    11271128$\triadt{i}{1}{R}{1/2}{-1/2}$ and $\triadt{i+1}{1}{R}{-1/2}{-1/2}$ are 
    11281129masked, and both near bottom triad slopes $\triadt{i}{k}{R}{1/2}{1/2}$ 
     
    11321133no effect on the eddy-induced skew-fluxes. 
    11331134 
    1134 \subsection{Limiting of the slopes within the interior}\label{sec:triad:limitskew} 
     1135\subsection{Limiting of the slopes within the interior}\label{sec:limitskew} 
    11351136Presently, the iso-neutral slopes $\tilde{r}_i$ relative 
    11361137to geopotentials are limited to be less than $1/100$, exactly as in 
    1137 calculating the iso-neutral diffusion, \S \ref{sec:triad:limit}. Each 
     1138calculating the iso-neutral diffusion, \S \autoref{sec:limit}. Each 
    11381139individual triad \rtriadt{R} is so limited. 
    11391140 
    1140 \subsection{Tapering within the surface mixed layer}\label{sec:triad:taperskew} 
     1141\subsection{Tapering within the surface mixed layer}\label{sec:taperskew} 
    11411142The slopes $\tilde{r}_i$ relative to 
    11421143geopotentials (and thus the individual triads \rtriadt{R}) are always tapered linearly from their value immediately below the mixed layer to zero at the 
    1143 surface \eqref{eq:triad:rmtilde}, as described in \S\ref{sec:triad:lintaper}. This is 
    1144 option (c) of Fig.~\ref{Fig_eiv_slp}. This linear tapering for the 
     1144surface \autoref{eq:rmtilde}, as described in \autoref{sec:lintaper}. This is 
     1145option (c) of \autoref{fig:eiv_slp}. This linear tapering for the 
    11451146slopes used to calculate the eddy-induced fluxes is 
    11461147unaffected by the value of \np{ln\_triad\_iso}. 
     
    11481149The justification for this linear slope tapering is that, for $A_e$ 
    11491150that is constant or varies only in the horizontal (the most commonly 
    1150 used options in \NEMO: see \S\ref{LDF_coef}), it is 
     1151used options in \NEMO: see \autoref{sec:LDF_coef}), it is 
    11511152equivalent to a horizontal eiv (eddy-induced velocity) that is uniform 
    1152 within the mixed layer \eqref{eq:triad:eiv_v}. This ensures that the 
     1153within the mixed layer \autoref{eq:eiv_v}. This ensures that the 
    11531154eiv velocities do not restratify the mixed layer \citep{Treguier1997, 
    11541155  Danabasoglu_al_2008}. Equivantly, in terms 
     
    11581159horizontal flux convergence is relatively insignificant within the mixed-layer). 
    11591160 
    1160 \subsection{Streamfunction diagnostics}\label{sec:triad:sfdiag} 
     1161\subsection{Streamfunction diagnostics}\label{sec:sfdiag} 
    11611162Where the namelist parameter \np{ln\_traldf\_gdia}\forcode{ = .true.}, diagnosed 
    11621163mean eddy-induced velocities are output. Each time step, 
     
    11641165$uw$ (integer +1/2 $i$, integer $j$, integer +1/2 $k$) and $vw$ 
    11651166(integer $i$, integer +1/2 $j$, integer +1/2 $k$) points (see Table 
    1166 \ref{Tab_cell}) respectively. We follow \citep{Griffies_Bk04} and 
     1167\autoref{tab:cell}) respectively. We follow \citep{Griffies_Bk04} and 
    11671168calculate the streamfunction at a given $uw$-point from the 
    11681169surrounding four triads according to: 
    11691170\begin{equation} 
    1170   \label{eq:triad:sfdiagi} 
     1171  \label{eq:sfdiagi} 
    11711172  {\psi_1}_{i+1/2}^{k+1/2}={\quarter}\sum_{\substack{i_p,\,k_p}} 
    11721173  {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}. 
     
    11741175The streamfunction $\psi_1$ is calculated similarly at $vw$ points. 
    11751176The eddy-induced velocities are then calculated from the 
    1176 straightforward discretisation of \eqref{eq:triad:eiv_v}: 
    1177 \begin{equation}\label{eq:triad:eiv_v_discrete} 
     1177straightforward discretisation of \autoref{eq:eiv_v}: 
     1178\begin{equation}\label{eq:eiv_v_discrete} 
    11781179\begin{split} 
    11791180 {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),   \\ 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_ASM.tex

    r9393 r9407  
    55% ================================================================ 
    66\chapter{Apply Assimilation Increments (ASM)} 
    7 \label{ASM} 
     7\label{chap:ASM} 
    88 
    99Authors: D. Lea,  M. Martin, K. Mogensen, A. Weaver, ...   % do we keep 
     
    2626 
    2727\section{Direct initialization} 
    28 \label{ASM_DI} 
     28\label{sec:ASM_DI} 
    2929 
    3030Direct initialization (DI) refers to the instantaneous correction 
     
    3333 
    3434\section{Incremental analysis updates} 
    35 \label{ASM_IAU} 
     35\label{sec:ASM_IAU} 
    3636 
    3737Rather than updating the model state directly with the analysis increment, 
     
    8383\end{eqnarray} 
    8484where $\alpha^{-1} = \sum_{i=1}^{M/2} 2i$ and $M$ is assumed to be even.  
    85 The weights described by \eqref{eq:F2_i} provide a  
     85The weights described by \autoref{eq:F2_i} provide a  
    8686smoother transition of the analysis trajectory from one assimilation cycle  
    87 to the next than that described by \eqref{eq:F1_i}. 
     87to the next than that described by \autoref{eq:F1_i}. 
    8888 
    8989%========================================================================== 
    9090% Divergence damping description %%% 
    9191\section{Divergence damping initialisation} 
    92 \label{ASM_details} 
     92\label{sec:ASM_details} 
    9393 
    9494The velocity increments may be initialized by the iterative application of  
     
    110110                       +\delta _j \left[ {e_{1v}\,e_{3v}\,v^{n-1}_I} \right]} \right). 
    111111\end{equation} 
    112 By the application of \eqref{eq:asm_dmp} and \eqref{eq:asm_dmp} the divergence is filtered 
     112By the application of \autoref{eq:asm_dmp} and \autoref{eq:asm_dmp} the divergence is filtered 
    113113in each iteration, and the vorticity is left unchanged. In the presence of coastal boundaries 
    114114with zero velocity increments perpendicular to the coast the divergence is strongly damped. 
     
    125125 
    126126\section{Implementation details} 
    127 \label{ASM_details} 
     127\label{sec:ASM_details} 
    128128 
    129129Here we show an example \ngn{namasm} namelist and the header of an example assimilation  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_CONFIG.tex

    r9394 r9407  
    55% ================================================================ 
    66\chapter{Configurations} 
    7 \label{CFG} 
     7\label{chap:CFG} 
    88\minitoc 
    99 
     
    1515% ================================================================ 
    1616\section{Introduction} 
    17 \label{CFG_intro} 
     17\label{sec:CFG_intro} 
    1818 
    1919 
     
    3333% ================================================================ 
    3434\section{C1D: 1D Water column model (\protect\key{c1d}) } 
    35 \label{CFG_c1d} 
     35\label{sec:CFG_c1d} 
    3636 
    3737$\ $\newline 
     
    8181% ================================================================ 
    8282\section{ORCA family: global ocean with tripolar grid} 
    83 \label{CFG_orca} 
     83\label{sec:CFG_orca} 
    8484 
    8585The ORCA family is a series of global ocean configurations that are run together with  
     
    9595\begin{figure}[!t]   \begin{center} 
    9696\includegraphics[width=0.98\textwidth]{Fig_ORCA_NH_mesh} 
    97 \caption{  \protect\label{Fig_MISC_ORCA_msh}      
     97\caption{  \protect\label{fig:MISC_ORCA_msh}      
    9898ORCA mesh conception. The departure from an isotropic Mercator grid start poleward of 20\degN. 
    9999The two "north pole" are the foci of a series of embedded ellipses (blue curves)  
     
    108108% ------------------------------------------------------------------------------------------------------------- 
    109109\subsection{ORCA tripolar grid} 
    110 \label{CFG_orca_grid} 
     110\label{subsec:CFG_orca_grid} 
    111111 
    112112The ORCA grid is a tripolar is based on the semi-analytical method of \citet{Madec_Imbard_CD96}.  
     
    116116computing the associated set of mesh meridians, and projecting the resulting mesh onto the sphere.  
    117117The set of mesh parallels used is a series of embedded ellipses which foci are the two mesh north  
    118 poles (Fig.~\ref{Fig_MISC_ORCA_msh}). The resulting mesh presents no loss of continuity in  
     118poles (\autoref{fig:MISC_ORCA_msh}). The resulting mesh presents no loss of continuity in  
    119119either the mesh lines or the scale factors, or even the scale factor derivatives over the whole  
    120120ocean domain, as the mesh is not a composite mesh.  
     
    123123\includegraphics[width=1.0\textwidth]{Fig_ORCA_NH_msh05_e1_e2} 
    124124\includegraphics[width=0.80\textwidth]{Fig_ORCA_aniso} 
    125 \caption {  \protect\label{Fig_MISC_ORCA_e1e2} 
     125\caption {  \protect\label{fig:MISC_ORCA_e1e2} 
    126126\textit{Top}: Horizontal scale factors ($e_1$, $e_2$) and  
    127127\textit{Bottom}: ratio of anisotropy ($e_1 / e_2$) 
     
    141141the Gulf Stream) and keeping the smallest scale factor in the northern hemisphere larger  
    142142than the smallest one in the southern hemisphere. 
    143 The resulting mesh is shown in Fig.~\ref{Fig_MISC_ORCA_msh} and \ref{Fig_MISC_ORCA_e1e2}  
     143The resulting mesh is shown in \autoref{fig:MISC_ORCA_msh} and \autoref{fig:MISC_ORCA_e1e2}  
    144144for a half a degree grid (ORCA\_R05). 
    145145The smallest ocean scale factor is found in along  Antarctica, while the ratio of anisotropy remains close to one except near the Victoria Island  
     
    150150% ------------------------------------------------------------------------------------------------------------- 
    151151\subsection{ORCA pre-defined resolution} 
    152 \label{CFG_orca_resolution} 
     152\label{subsec:CFG_orca_resolution} 
    153153 
    154154 
     
    156156horizontal resolution. The value of the resolution is given by the resolution at the Equator  
    157157expressed in degrees. Each of configuration is set through the \textit{domain\_cfg} domain configuration file,  
    158 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}). 
     158which 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}). 
    159159 
    160160 
     
    175175\hline   \hline 
    176176\end{tabular} 
    177 \caption{ \protect\label{Tab_ORCA}    
     177\caption{ \protect\label{tab:ORCA}    
    178178Domain size of ORCA family configurations. 
    179179The flag for configurations of ORCA family need to be set in \textit{domain\_cfg} file. } 
     
    196196For ORCA\_R1 and R025, setting the configuration key to 75 allows to use 75 vertical levels,  
    197197otherwise 46 are used. In the other ORCA configurations, 31 levels are used  
    198 (see Tab.~\ref{Tab_orca_zgr} \sfcomment{HERE I need to put new table for ORCA2 values} and Fig.~\ref{Fig_zgr}). 
     198(see \autoref{tab:orca_zgr} \sfcomment{HERE I need to put new table for ORCA2 values} and \autoref{fig:zgr}). 
    199199 
    200200Only the ORCA\_R2 is provided with all its input files in the \NEMO distribution.  
     
    204204 
    205205This version of ORCA\_R2 has 31 levels in the vertical, with the highest resolution (10m)  
    206 in the upper 150m (see Tab.~\ref{Tab_orca_zgr} and Fig.~\ref{Fig_zgr}).  
     206in the upper 150m (see \autoref{tab:orca_zgr} and \autoref{fig:zgr}).  
    207207The bottom topography and the coastlines are derived from the global atlas of Smith and Sandwell (1997).  
    208 The default forcing uses the boundary forcing from \citet{Large_Yeager_Rep04} (see \S\ref{SBC_blk_core}),  
     208The default forcing uses the boundary forcing from \citet{Large_Yeager_Rep04} (see \autoref{subsec:SBC_blk_core}),  
    209209which was developed for the purpose of running global coupled ocean-ice simulations  
    210210without an interactive atmosphere. This \citet{Large_Yeager_Rep04} dataset is available  
     
    222222% ------------------------------------------------------------------------------------------------------------- 
    223223\section{GYRE family: double gyre basin } 
    224 \label{CFG_gyre} 
     224\label{sec:CFG_gyre} 
    225225 
    226226The GYRE configuration \citep{Levy_al_OM10} has been built to simulate 
     
    234234The domain geometry is a closed rectangular basin on the $\beta$-plane centred  
    235235at $\sim$ 30\degN and rotated by 45\deg, 3180~km long, 2120~km wide  
    236 and 4~km deep (Fig.~\ref{Fig_MISC_strait_hand}).  
     236and 4~km deep (\autoref{fig:MISC_strait_hand}).  
    237237The domain is bounded by vertical walls and by a flat bottom. The configuration is  
    238238meant to represent an idealized North Atlantic or North Pacific basin.  
     
    257257Obviously, the namelist parameters have to be adjusted to the chosen resolution, see the Configurations  
    258258pages on the NEMO web site (Using NEMO\/Configurations) . 
    259 In the vertical, GYRE uses the default 30 ocean levels (\jp{jpk}\forcode{ = 31}) (Fig.~\ref{Fig_zgr}). 
     259In the vertical, GYRE uses the default 30 ocean levels (\jp{jpk}\forcode{ = 31}) (\autoref{fig:zgr}). 
    260260 
    261261The GYRE configuration is also used in benchmark test as it is very simple to increase  
     
    267267\begin{figure}[!t]   \begin{center} 
    268268\includegraphics[width=1.0\textwidth]{Fig_GYRE} 
    269 \caption{  \protect\label{Fig_GYRE}    
     269\caption{  \protect\label{fig:GYRE}    
    270270Snapshot of relative vorticity at the surface of the model domain  
    271271in GYRE R9, R27 and R54. From \citet{Levy_al_OM10}.} 
     
    277277% ------------------------------------------------------------------------------------------------------------- 
    278278\section{AMM: atlantic margin configuration} 
    279 \label{MISC_config_AMM} 
     279\label{sec:MISC_config_AMM} 
    280280 
    281281The AMM, Atlantic Margins Model, is a regional model covering the 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIA.tex

    r9394 r9407  
    55% ================================================================ 
    66\chapter{Output and Diagnostics (IOM, DIA, TRD, FLO)} 
    7 \label{DIA} 
     7\label{chap:DIA} 
    88\minitoc 
    99 
     
    1515% ================================================================ 
    1616\section{Old model output (default)} 
    17 \label{DIA_io_old} 
     17\label{sec:DIA_io_old} 
    1818 
    1919The model outputs are of three types: the restart file, the output listing,  
     
    5656% ================================================================ 
    5757\section{Standard model output (IOM)} 
    58 \label{DIA_iom} 
     58\label{sec:DIA_iom} 
    5959 
    6060 
     
    595595 
    596596\subsection{XML reference tables} 
    597 \label{IOM_xmlref} 
     597\label{subsec:IOM_xmlref} 
    598598 
    599599(1) Simple computation: directly define the computation when refering to the variable in the file definition. 
     
    998998\subsection{CF metadata standard compliance} 
    999999 
    1000 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. 
     1000Output 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. 
    10011001 
    10021002Some 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. 
     
    10071007% ================================================================ 
    10081008\section{NetCDF4 support (\protect\key{netcdf4})} 
    1009 \label{DIA_iom} 
     1009\label{sec:DIA_iom} 
    10101010 
    10111011Since version 3.3, support for NetCDF4 chunking and (loss-less) compression has 
     
    10701070respectively in the mono-processor case (i.e. global domain of {\small\tt 182x149x31}). 
    10711071An illustration of the potential space savings that NetCDF4 chunking and compression 
    1072 provides is given in table \ref{Tab_NC4} which compares the results of two short 
     1072provides is given in table \autoref{tab:NC4} which compares the results of two short 
    10731073runs of the ORCA2\_LIM reference configuration with a 4x2 mpi partitioning. Note 
    10741074the variation in the compression ratio achieved which reflects chiefly the dry to wet  
     
    11061106ORCA2\_2d\_grid\_W\_0007.nc & 4416 & 1368 & 70\%\\ 
    11071107\end{tabular} 
    1108 \caption{   \protect\label{Tab_NC4}  
     1108\caption{   \protect\label{tab:NC4}  
    11091109Filesize comparison between NetCDF3 and NetCDF4 with chunking and compression} 
    11101110\end{table} 
     
    11261126% ------------------------------------------------------------------------------------------------------------- 
    11271127\section{Tracer/Dynamics trends  (\protect\ngn{namtrd})} 
    1128 \label{DIA_trd} 
     1128\label{sec:DIA_trd} 
    11291129 
    11301130%------------------------------------------namtrd---------------------------------------------------- 
     
    11661166% ------------------------------------------------------------------------------------------------------------- 
    11671167\section{FLO: On-Line Floats trajectories (\protect\key{floats})} 
    1168 \label{FLO} 
     1168\label{sec:FLO} 
    11691169%--------------------------------------------namflo------------------------------------------------------- 
    11701170\forfile{../namelists/namflo}  
     
    12741274% ------------------------------------------------------------------------------------------------------------- 
    12751275\section{Harmonic analysis of tidal constituents (\protect\key{diaharm}) } 
    1276 \label{DIA_diag_harm} 
     1276\label{sec:DIA_diag_harm} 
    12771277 
    12781278%------------------------------------------namdia_harm---------------------------------------------------- 
     
    13161316% ------------------------------------------------------------------------------------------------------------- 
    13171317\section{Transports across sections (\protect\key{diadct}) } 
    1318 \label{DIA_diag_dct} 
     1318\label{sec:DIA_diag_dct} 
    13191319 
    13201320%------------------------------------------namdct---------------------------------------------------- 
     
    14671467% ================================================================ 
    14681468\section{Diagnosing the steric effect in sea surface height} 
    1469 \label{DIA_steric} 
     1469\label{sec:DIA_steric} 
    14701470 
    14711471 
     
    15001500 
    15011501A non-Boussinesq fluid conserves mass. It satisfies the following relations: 
    1502 \begin{equation} \label{Eq_MV_nBq}  
     1502\begin{equation} \label{eq:MV_nBq}  
    15031503\begin{split}  
    15041504\mathcal{M} &=  \mathcal{V}  \;\bar{\rho}       \\ 
     
    15071507\end{equation} 
    15081508Temporal changes in total mass is obtained from the density conservation equation : 
    1509 \begin{equation}  \label{Eq_Co_nBq} 
     1509\begin{equation}  \label{eq:Co_nBq} 
    15101510\frac{1}{e_3} \partial_t ( e_3\,\rho) + \nabla( \rho \, \textbf{U} ) = \left. \frac{\textit{emp}}{e_3}\right|_\textit{surface} 
    15111511\end{equation} 
     
    15131513exchanges with the other media of the Earth system (atmosphere, sea-ice, land).  
    15141514Its global averaged leads to the total mass change  
    1515 \begin{equation}  \label{Eq_Mass_nBq} 
     1515\begin{equation}  \label{eq:Mass_nBq} 
    15161516\partial_t \mathcal{M} = \mathcal{A} \;\overline{\textit{emp}} 
    15171517\end{equation} 
    15181518where $\overline{\textit{emp}}=\int_S \textit{emp}\,ds$ is the net mass flux  
    15191519through the ocean surface. 
    1520 Bringing \eqref{Eq_Mass_nBq} and the time derivative of \eqref{Eq_MV_nBq}  
     1520Bringing \autoref{eq:Mass_nBq} and the time derivative of \autoref{eq:MV_nBq}  
    15211521together leads to the evolution equation of the mean sea level 
    1522 \begin{equation} \label{Eq_ssh_nBq} 
     1522\begin{equation} \label{eq:ssh_nBq} 
    15231523  \partial_t \bar{\eta} =  \frac{\overline{\textit{emp}}}{ \bar{\rho}}  
    15241524               - \frac{\mathcal{V}}{\mathcal{A}}  \;\frac{\partial_t \bar{\rho} }{\bar{\rho}} 
    15251525\end{equation} 
    1526 The first term in equation \eqref{Eq_ssh_nBq} alters sea level by adding or  
     1526The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or  
    15271527subtracting mass from the ocean.  
    15281528The second term arises from temporal changes in the global mean  
     
    15311531In a Boussinesq fluid, $\rho$ is replaced by $\rho_o$ in all the equation except when $\rho$  
    15321532appears multiplied by the gravity ($i.e.$ in the hydrostatic balance of the primitive Equations).  
    1533 In particular, the mass conservation equation, \eqref{Eq_Co_nBq}, degenerates into  
     1533In particular, the mass conservation equation, \autoref{eq:Co_nBq}, degenerates into  
    15341534the incompressibility equation: 
    1535 \begin{equation}  \label{Eq_Co_Bq} 
     1535\begin{equation}  \label{eq:Co_Bq} 
    15361536\frac{1}{e_3} \partial_t ( e_3 ) + \nabla( \textbf{U} ) =  \left. \frac{\textit{emp}}{\rho_o \,e_3}\right|_ \textit{surface} 
    15371537\end{equation} 
    15381538and the global average of this equation now gives the temporal change of the total volume, 
    1539 \begin{equation}  \label{Eq_V_Bq} 
     1539\begin{equation}  \label{eq:V_Bq} 
    15401540  \partial_t \mathcal{V} =   \mathcal{A} \;\frac{\overline{\textit{emp}}}{\rho_o}  
    15411541\end{equation} 
     
    15531553by the Boussinesq model, via the steric contribution to the sea level, $\eta_s$, a spatially  
    15541554uniform variable, as follows: 
    1555 \begin{equation}  \label{Eq_M_Bq} 
     1555\begin{equation}  \label{eq:M_Bq} 
    15561556   \mathcal{M}_o  =  \mathcal{M} + \rho_o \,\eta_s \,\mathcal{A}  
    15571557\end{equation} 
     
    15591559the ocean surface is converted into a mean change in sea level. Introducing the total density  
    15601560anomaly, $\mathcal{D}= \int_D d_a \,dv$, where $d_a= (\rho -\rho_o ) / \rho_o$   
    1561 is the density anomaly used in \NEMO (cf. \S\ref{TRA_eos}) in \eqref{Eq_M_Bq} 
     1561is the density anomaly used in \NEMO (cf. \autoref{subsec:TRA_eos}) in \autoref{eq:M_Bq} 
    15621562leads to a very simple form for the steric height: 
    1563 \begin{equation}  \label{Eq_steric_Bq} 
     1563\begin{equation}  \label{eq:steric_Bq} 
    15641564   \eta_s = - \frac{1}{\mathcal{A}} \mathcal{D}  
    15651565\end{equation} 
     
    15811581(wetting and drying of grid point is not allowed).  
    15821582   
    1583 Third, the discretisation of \eqref{Eq_steric_Bq} depends on the type of free surface 
     1583Third, the discretisation of \autoref{eq:steric_Bq} depends on the type of free surface 
    15841584which is considered. In the non linear free surface case, $i.e.$ \key{vvl} defined, it is 
    15851585given by 
    1586 \begin{equation}  \label{Eq_discrete_steric_Bq} 
     1586\begin{equation}  \label{eq:discrete_steric_Bq} 
    15871587   \eta_s =  - \frac{ \sum_{i,\,j,\,k} d_a\; e_{1t} e_{2t} e_{3t} } 
    15881588                  { \sum_{i,\,j,\,k}         e_{1t} e_{2t} e_{3t} }  
     
    15901590whereas in the linear free surface, the volume above the \textit{z=0} surface must be explicitly taken  
    15911591into account to better approximate the total ocean mass and thus the steric sea level: 
    1592 \begin{equation}  \label{Eq_discrete_steric_Bq} 
     1592\begin{equation}  \label{eq:discrete_steric_Bq} 
    15931593   \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 } 
    15941594                     {\sum_{i,\,j,\,k} e_{1t}e_{2t}e_{3t} + \sum_{i,\,j}           e_{1t}e_{2t} \eta }  
     
    16081608In AR5 outputs, the thermosteric sea level is demanded. It is steric sea level due to  
    16091609changes in ocean density arising just from changes in temperature. It is given by: 
    1610 \begin{equation}  \label{Eq_thermosteric_Bq} 
     1610\begin{equation}  \label{eq:thermosteric_Bq} 
    16111611   \eta_s = - \frac{1}{\mathcal{A}} \int_D d_a(T,S_o,p_o) \,dv 
    16121612\end{equation} 
     
    16221622% ------------------------------------------------------------------------------------------------------------- 
    16231623\section{Other diagnostics (\protect\key{diahth}, \protect\key{diaar5})} 
    1624 \label{DIA_diag_others} 
     1624\label{sec:DIA_diag_others} 
    16251625 
    16261626 
     
    16581658as well as for the World Ocean. The sub-basin decomposition requires an input file  
    16591659(\ifile{subbasins}) which contains three 2D mask arrays, the Indo-Pacific mask  
    1660 been deduced from the sum of the Indian and Pacific mask (Fig~\ref{Fig_mask_subasins}).  
     1660been deduced from the sum of the Indian and Pacific mask (\autoref{fig:mask_subasins}).  
    16611661 
    16621662%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    16631663\begin{figure}[!t]     \begin{center} 
    16641664\includegraphics[width=1.0\textwidth]{Fig_mask_subasins} 
    1665 \caption{   \protect\label{Fig_mask_subasins} 
     1665\caption{   \protect\label{fig:mask_subasins} 
    16661666Decomposition of the World Ocean (here ORCA2) into sub-basin used in to compute 
    16671667the heat and salt transports as well as the meridional stream-function: Atlantic basin (red),  
     
    16811681A series of diagnostics has been added in the \mdl{diaar5}.  
    16821682They corresponds to outputs that are required for AR5 simulations (CMIP5) 
    1683 (see also Section \ref{DIA_steric} for one of them).  
     1683(see also  \autoref{sec:DIA_steric} for one of them).  
    16841684Activating those outputs requires to define the \key{diaar5} CPP key. 
    16851685 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIU.tex

    r9394 r9407  
    66% ================================================================ 
    77\chapter{Diurnal SST Models (DIU)} 
    8 \label{DIU} 
     8\label{chap:DIU} 
    99 
    1010\minitoc 
     
    5454%=============================================================== 
    5555\section{Warm layer model} 
    56 \label{warm_layer_sec} 
     56\label{sec:warm_layer_sec} 
    5757%=============================================================== 
    5858 
     
    6262\frac{\partial{\Delta T_{\rm{wl}}}}{\partial{t}}&=&\frac{Q(\nu+1)}{D_T\rho_w c_p 
    6363\nu}-\frac{(\nu+1)ku^*_{w}f(L_a)\Delta T}{D_T\Phi\!\left(\frac{D_T}{L}\right)} \mbox{,} 
    64 \label{ecmwf1} \\ 
    65 L&=&\frac{\rho_w c_p u^{*^3}_{w}}{\kappa g \alpha_w Q }\mbox{,}\label{ecmwf2} 
     64\label{eq:ecmwf1} \\ 
     65L&=&\frac{\rho_w c_p u^{*^3}_{w}}{\kappa g \alpha_w Q }\mbox{,}\label{eq:ecmwf2} 
    6666\end{eqnarray} 
    6767where $\Delta T_{\rm{wl}}$ is the temperature difference between the top of the warm 
    6868layer and the depth $D_T=3$\,m at which there is assumed to be no diurnal signal. In 
    69 equation (\ref{ecmwf1}) $\alpha_w=2\times10^{-4}$ is the thermal expansion 
     69equation (\autoref{eq:ecmwf1}) $\alpha_w=2\times10^{-4}$ is the thermal expansion 
    7070coefficient of water, $\kappa=0.4$ is von K\'{a}rm\'{a}n's constant, $c_p$ is the heat 
    7171capacity at constant pressure of sea water, $\rho_w$ is the 
     
    8181$u^*_{w} = u_{10}\sqrt{\frac{C_d\rho_a}{\rho_w}}$, where $C_d$ is 
    8282the drag coefficient, and $\rho_a$ is the density of air.  The symbol $Q$ in equation 
    83 (\ref{ecmwf1}) is the instantaneous total thermal energy 
     83(\autoref{eq:ecmwf1}) is the instantaneous total thermal energy 
    8484flux into 
    8585the diurnal layer, $i.e.$ 
    8686\begin{equation} 
    87 Q = Q_{\rm{sol}} + Q_{\rm{lw}} + Q_{\rm{h}}\mbox{,} \label{e_flux_eqn} 
     87Q = Q_{\rm{sol}} + Q_{\rm{lw}} + Q_{\rm{h}}\mbox{,} \label{eq:e_flux_eqn} 
    8888\end{equation} 
    8989where $Q_{\rm{h}}$ is the sensible and latent heat flux, $Q_{\rm{lw}}$ is the long 
    9090wave flux, and $Q_{\rm{sol}}$ is the solar flux absorbed 
    9191within the diurnal warm layer. For $Q_{\rm{sol}}$ the 9 term 
    92 representation of \citet{Gentemann_al_JGR09} is used.  In equation \ref{ecmwf1} 
     92representation of \citet{Gentemann_al_JGR09} is used.  In equation \autoref{eq:ecmwf1} 
    9393the function $f(L_a)=\max(1,L_a^{\frac{2}{3}})$, where $L_a=0.3$\footnote{This 
    9494is a global average value, more accurately $L_a$ could be computed as 
     
    1031034\zeta^2}{1+3\zeta+0.25\zeta^2} &(\zeta \ge 0) \\ 
    104104                                    (1 - 16\zeta)^{-\frac{1}{2}} & (\zeta < 0) \mbox{,} 
    105                                     \end{array} \right. \label{stab_func_eqn} 
     105                                    \end{array} \right. \label{eq:stab_func_eqn} 
    106106\end{equation} 
    107107where $\zeta=\frac{D_T}{L}$.  It is clear that the first derivative of 
    108 (\ref{stab_func_eqn}), and thus of (\ref{ecmwf1}), 
    109 is discontinuous at $\zeta=0$ ($i.e.$ $Q\rightarrow0$ in equation (\ref{ecmwf2})). 
     108(\autoref{eq:stab_func_eqn}), and thus of (\autoref{eq:ecmwf1}), 
     109is discontinuous at $\zeta=0$ ($i.e.$ $Q\rightarrow0$ in equation (\autoref{eq:ecmwf2})). 
    110110 
    111 The two terms on the right hand side of (\ref{ecmwf1}) represent different processes. 
     111The two terms on the right hand side of (\autoref{eq:ecmwf1}) represent different processes. 
    112112The first term is simply the diabatic heating or cooling of the 
    113113diurnal warm 
     
    121121 
    122122\section{Cool skin model} 
    123 \label{cool_skin_sec} 
     123\label{sec:cool_skin_sec} 
    124124 
    125125%=============================================================== 
     
    131131Saunders equation for the cool skin temperature difference $\Delta T_{\rm{cs}}$ becomes 
    132132\begin{equation} 
    133 \label{sunders_eqn} 
     133\label{eq:sunders_eqn} 
    134134\Delta T_{\rm{cs}}=\frac{Q_{\rm{ns}}\delta}{k_t} \mbox{,} 
    135135\end{equation} 
     
    138138skin layer and is given by 
    139139\begin{equation} 
    140 \label{sunders_thick_eqn} 
     140\label{eq:sunders_thick_eqn} 
    141141\delta=\frac{\lambda \mu}{u^*_{w}} \mbox{,} 
    142142\end{equation} 
     
    144144proportionality which \citet{Saunders_JAS82} suggested varied between 5 and 10. 
    145145 
    146 The value of $\lambda$ used in equation (\ref{sunders_thick_eqn}) is that of 
     146The value of $\lambda$ used in equation (\autoref{eq:sunders_thick_eqn}) is that of 
    147147\citet{Artale_al_JGR02}, 
    148148which is shown in \citet{Tu_Tsuang_GRL05} to outperform a number of other 
    149149parametrisations at both low and high wind speeds. Specifically, 
    150150\begin{equation} 
    151 \label{artale_lambda_eqn} 
     151\label{eq:artale_lambda_eqn} 
    152152\lambda = \frac{ 8.64\times10^4 u^*_{w} k_t }{ \rho c_p h \mu \gamma }\mbox{,} 
    153153\end{equation} 
     
    155155$\gamma$ is a dimensionless function of wind speed $u$: 
    156156\begin{equation} 
    157 \label{artale_gamma_eqn} 
     157\label{eq:artale_gamma_eqn} 
    158158\gamma = \left\{ \begin{matrix} 
    159159                     0.2u+0.5\mbox{,} & u \le 7.5\,\mbox{ms}^{-1} \\ 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_DOM.tex

    r9393 r9407  
    55% ================================================================ 
    66\chapter{Space Domain (DOM)} 
    7 \label{DOM} 
     7\label{chap:DOM} 
    88\minitoc 
    99 
     
    2020$\ $\newline    % force a new line 
    2121 
    22 Having defined the continuous equations in Chap.~\ref{PE} and chosen a time  
    23 discretization Chap.~\ref{STP}, we need to choose a discretization on a grid,  
     22Having defined the continuous equations in \autoref{chap:PE} and chosen a time  
     23discretization \autoref{chap:STP}, we need to choose a discretization on a grid,  
    2424and numerical algorithms. In the present chapter, we provide a general description  
    2525of the staggered grid used in \NEMO, and other information relevant to the main  
     
    3232% ================================================================ 
    3333\section{Fundamentals of the discretisation} 
    34 \label{DOM_basics} 
     34\label{sec:DOM_basics} 
    3535 
    3636% ------------------------------------------------------------------------------------------------------------- 
     
    3838% ------------------------------------------------------------------------------------------------------------- 
    3939\subsection{Arrangement of variables} 
    40 \label{DOM_cell} 
     40\label{subsec:DOM_cell} 
    4141 
    4242%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    4343\begin{figure}[!tb]    \begin{center} 
    4444\includegraphics[width=0.90\textwidth]{Fig_cell} 
    45 \caption{ \protect\label{Fig_cell}     
     45\caption{ \protect\label{fig:cell}     
    4646Arrangement of variables. $t$ indicates scalar points where temperature,  
    4747salinity, density, pressure and horizontal divergence are defined. ($u$,$v$,$w$)  
     
    5656space directions. The arrangement of variables is the same in all directions.  
    5757It consists of cells centred on scalar points ($t$, $S$, $p$, $\rho$) with vector  
    58 points $(u, v, w)$ defined in the centre of each face of the cells (Fig. \ref{Fig_cell}).  
     58points $(u, v, w)$ defined in the centre of each face of the cells (\autoref{fig:cell}).  
    5959This is the generalisation to three dimensions of the well-known ``C'' grid in  
    6060Arakawa's classification \citep{Mesinger_Arakawa_Bk76}. The relative and  
     
    6666by the transformation that gives ($\lambda$ ,$\varphi$ ,$z$) as a function of $(i,j,k)$.  
    6767The grid-points are located at integer or integer and a half value of $(i,j,k)$ as  
    68 indicated on Table \ref{Tab_cell}. In all the following, subscripts $u$, $v$, $w$,  
     68indicated on \autoref{tab:cell}. In all the following, subscripts $u$, $v$, $w$,  
    6969$f$, $uw$, $vw$ or $fw$ indicate the position of the grid-point where the scale  
    7070factors are defined. Each scale factor is defined as the local analytical value  
    71 provided by \eqref{Eq_scale_factors}. As a result, the mesh on which partial  
     71provided by \autoref{eq:scale_factors}. As a result, the mesh on which partial  
    7272derivatives $\frac{\partial}{\partial \lambda}, \frac{\partial}{\partial \varphi}$, and  
    7373$\frac{\partial}{\partial z} $ are evaluated is a uniform mesh with a grid size of unity.  
     
    7878from their analytical expression. This preserves the symmetry of the discrete set  
    7979of equations and therefore satisfies many of the continuous properties (see  
    80 Appendix~\ref{Apdx_C}). A similar, related remark can be made about the domain  
     80\autoref{apdx:C}). A similar, related remark can be made about the domain  
    8181size: when needed, an area, volume, or the total ocean depth must be evaluated  
    82 as the sum of the relevant scale factors (see \eqref{DOM_bar}) in the next section).  
     82as the sum of the relevant scale factors (see \autoref{eq:DOM_bar}) in the next section).  
    8383 
    8484%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    9595fw & $i+1/2$   & $j+1/2$   & $k+1/2$   \\ \hline 
    9696\end{tabular} 
    97 \caption{ \protect\label{Tab_cell} 
     97\caption{ \protect\label{tab:cell} 
    9898Location of grid-points as a function of integer or integer and a half value of the column,  
    9999line or level. This indexing is only used for the writing of the semi-discrete equation.  
    100100In the code, the indexing uses integer values only and has a reverse direction  
    101 in the vertical (see \S\ref{DOM_Num_Index})} 
     101in the vertical (see \autoref{subsec:DOM_Num_Index})} 
    102102\end{center} 
    103103\end{table} 
     
    108108% ------------------------------------------------------------------------------------------------------------- 
    109109\subsection{Discrete operators} 
    110 \label{DOM_operators} 
     110\label{subsec:DOM_operators} 
    111111 
    112112Given the values of a variable $q$ at adjacent points, the differencing and  
    113113averaging operators at the midpoint between them are: 
    114 \begin{subequations} \label{Eq_di_mi} 
     114\begin{subequations} \label{eq:di_mi} 
    115115\begin{align} 
    116116 \delta _i [q]       &=  \  \    q(i+1/2)  - q(i-1/2)    \\ 
     
    120120 
    121121Similar operators are defined with respect to $i+1/2$, $j$, $j+1/2$, $k$, and  
    122 $k+1/2$. Following \eqref{Eq_PE_grad} and \eqref{Eq_PE_lap}, the gradient of a  
     122$k+1/2$. Following \autoref{eq:PE_grad} and \autoref{eq:PE_lap}, the gradient of a  
    123123variable $q$ defined at a $t$-point has its three components defined at $u$-, $v$-  
    124124and $w$-points while its Laplacien is defined at $t$-point. These operators have  
    125125the following discrete forms in the curvilinear $s$-coordinate system: 
    126 \begin{equation} \label{Eq_DOM_grad} 
     126\begin{equation} \label{eq:DOM_grad} 
    127127\nabla q\equiv    \frac{1}{e_{1u} } \delta _{i+1/2 } [q] \;\,\mathbf{i} 
    128128      +  \frac{1}{e_{2v} } \delta _{j+1/2 } [q] \;\,\mathbf{j} 
    129129      +  \frac{1}{e_{3w}} \delta _{k+1/2} [q] \;\,\mathbf{k} 
    130130\end{equation} 
    131 \begin{multline} \label{Eq_DOM_lap} 
     131\begin{multline} \label{eq:DOM_lap} 
    132132\Delta q\equiv \frac{1}{e_{1t}\,e_{2t}\,e_{3t} } 
    133133       \;\left(          \delta_i  \left[ \frac{e_{2u}\,e_{3u}} {e_{1u}} \;\delta_{i+1/2} [q] \right] 
     
    136136\end{multline} 
    137137 
    138 Following \eqref{Eq_PE_curl} and \eqref{Eq_PE_div}, a vector ${\rm {\bf A}}=\left( a_1,a_2,a_3\right)$  
     138Following \autoref{eq:PE_curl} and \autoref{eq:PE_div}, a vector ${\rm {\bf A}}=\left( a_1,a_2,a_3\right)$  
    139139defined at vector points $(u,v,w)$ has its three curl components defined at $vw$-, $uw$,  
    140140and $f$-points, and its divergence defined at $t$-points: 
    141 \begin{eqnarray}  \label{Eq_DOM_curl} 
     141\begin{eqnarray}  \label{eq:DOM_curl} 
    142142 \nabla \times {\rm{\bf A}}\equiv & 
    143143      \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} \\  
     
    145145 +& \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} 
    146146 \end{eqnarray} 
    147 \begin{eqnarray} \label{Eq_DOM_div} 
     147\begin{eqnarray} \label{eq:DOM_div} 
    148148\nabla \cdot \rm{\bf A} \equiv  
    149149    \frac{1}{e_{1t}\,e_{2t}\,e_{3t}} \left( \delta_i \left[e_{2u}\,e_{3u}\,a_1 \right] 
     
    153153The vertical average over the whole water column denoted by an overbar becomes  
    154154for a quantity $q$ which is a masked field (i.e. equal to zero inside solid area): 
    155 \begin{equation} \label{DOM_bar} 
     155\begin{equation} \label{eq:DOM_bar} 
    156156\bar q   =         \frac{1}{H}    \int_{k^b}^{k^o} {q\;e_{3q} \,dk}  
    157157      \equiv \frac{1}{H_q }\sum\limits_k {q\;e_{3q} } 
     
    163163 
    164164In continuous form, the following properties are satisfied: 
    165 \begin{equation} \label{Eq_DOM_curl_grad} 
     165\begin{equation} \label{eq:DOM_curl_grad} 
    166166\nabla \times \nabla q ={\rm {\bf {0}}} 
    167167\end{equation} 
    168 \begin{equation} \label{Eq_DOM_div_curl} 
     168\begin{equation} \label{eq:DOM_div_curl} 
    169169\nabla \cdot \left( {\nabla \times {\rm {\bf A}}} \right)=0 
    170170\end{equation} 
     
    181181operators, $i.e.$ 
    182182\begin{align}  
    183 \label{DOM_di_adj} 
     183\label{eq:DOM_di_adj} 
    184184\sum\limits_i { a_i \;\delta _i \left[ b \right]}  
    185185   &\equiv -\sum\limits_i {\delta _{i+1/2} \left[ a \right]\;b_{i+1/2} }      \\ 
    186 \label{DOM_mi_adj} 
     186\label{eq:DOM_mi_adj} 
    187187\sum\limits_i { a_i \;\overline b^{\,i}}  
    188188   & \equiv \quad \sum\limits_i {\overline a ^{\,i+1/2}\;b_{i+1/2} }  
     
    192192$\delta_i^*=\delta_{i+1/2}$ and  
    193193${(\overline{\,\cdot \,}^{\,i})}^*= \overline{\,\cdot\,}^{\,i+1/2}$, respectively.  
    194 These two properties will be used extensively in the Appendix~\ref{Apdx_C} to  
     194These two properties will be used extensively in the \autoref{apdx:C} to  
    195195demonstrate integral conservative properties of the discrete formulation chosen. 
    196196 
     
    199199% ------------------------------------------------------------------------------------------------------------- 
    200200\subsection{Numerical indexing} 
    201 \label{DOM_Num_Index} 
     201\label{subsec:DOM_Num_Index} 
    202202 
    203203%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    204204\begin{figure}[!tb]  \begin{center} 
    205205\includegraphics[width=0.90\textwidth]{Fig_index_hor} 
    206 \caption{   \protect\label{Fig_index_hor}     
     206\caption{   \protect\label{fig:index_hor}     
    207207Horizontal integer indexing used in the \textsc{Fortran} code. The dashed area indicates  
    208208the cell in which variables contained in arrays have the same $i$- and $j$-indices} 
     
    211211 
    212212The array representation used in the \textsc{Fortran} code requires an integer  
    213 indexing while the analytical definition of the mesh (see \S\ref{DOM_cell}) is  
     213indexing while the analytical definition of the mesh (see \autoref{subsec:DOM_cell}) is  
    214214associated with the use of integer values for $t$-points and both integer and  
    215215integer and a half values for all the other points. Therefore a specific integer  
     
    222222% ----------------------------------- 
    223223\subsubsection{Horizontal indexing} 
    224 \label{DOM_Num_Index_hor} 
    225  
    226 The indexing in the horizontal plane has been chosen as shown in Fig.\ref{Fig_index_hor}.  
     224\label{subsec:DOM_Num_Index_hor} 
     225 
     226The indexing in the horizontal plane has been chosen as shown in \autoref{fig:index_hor}.  
    227227For an increasing $i$ index ($j$ index), the $t$-point and the eastward $u$-point  
    228 (northward $v$-point) have the same index (see the dashed area in Fig.\ref{Fig_index_hor}).  
     228(northward $v$-point) have the same index (see the dashed area in \autoref{fig:index_hor}).  
    229229A $t$-point and its nearest northeast $f$-point have the same $i$-and $j$-indices. 
    230230 
     
    233233% ----------------------------------- 
    234234\subsubsection{Vertical indexing} 
    235 \label{DOM_Num_Index_vertical} 
     235\label{subsec:DOM_Num_Index_vertical} 
    236236 
    237237In the vertical, the chosen indexing requires special attention since the  
    238238$k$-axis is re-orientated downward in the \textsc{Fortran} code compared  
    239 to the indexing used in the semi-discrete equations and given in \S\ref{DOM_cell}.  
     239to the indexing used in the semi-discrete equations and given in \autoref{subsec:DOM_cell}.  
    240240The sea surface corresponds to the $w$-level $k=1$ which is the same index  
    241 as $t$-level just below (Fig.\ref{Fig_index_vert}). The last $w$-level ($k=jpk$)  
     241as $t$-level just below (\autoref{fig:index_vert}). The last $w$-level ($k=jpk$)  
    242242either corresponds to the ocean floor or is inside the bathymetry while the last  
    243 $t$-level is always inside the bathymetry (Fig.\ref{Fig_index_vert}). Note that  
     243$t$-level is always inside the bathymetry (\autoref{fig:index_vert}). Note that  
    244244for an increasing $k$ index, a $w$-point and the $t$-point just below have the  
    245245same $k$ index, in opposition to what is done in the horizontal plane where  
    246246it is the $t$-point and the nearest velocity points in the direction of the horizontal  
    247247axis that have the same $i$ or $j$ index (compare the dashed area in  
    248 Fig.\ref{Fig_index_hor} and \ref{Fig_index_vert}). Since the scale factors are  
     248\autoref{fig:index_hor} and \autoref{fig:index_vert}). Since the scale factors are  
    249249chosen to be strictly positive, a \emph{minus sign} appears in the \textsc{Fortran}  
    250250code \emph{before all the vertical derivatives} of the discrete equations given in  
     
    254254\begin{figure}[!pt]    \begin{center} 
    255255\includegraphics[width=.90\textwidth]{Fig_index_vert} 
    256 \caption{ \protect\label{Fig_index_vert}      
     256\caption{ \protect\label{fig:index_vert}      
    257257Vertical integer indexing used in the \textsc{Fortran } code. Note that  
    258258the $k$-axis is orientated downward. The dashed area indicates the cell in  
     
    265265% ----------------------------------- 
    266266\subsubsection{Domain size} 
    267 \label{DOM_size} 
     267\label{subsec:DOM_size} 
    268268 
    269269The total size of the computational domain is set by the parameters \np{jpiglo},  
     
    273273%%% 
    274274Parameters $jpi$ and $jpj$ refer to the size of each processor subdomain when the code is  
    275 run in parallel using domain decomposition (\key{mpp\_mpi} defined, see \S\ref{LBC_mpp}). 
     275run in parallel using domain decomposition (\key{mpp\_mpi} defined, see \autoref{sec:LBC_mpp}). 
    276276 
    277277 
     
    282282% ================================================================ 
    283283\section{Needed fields} 
    284 \label{DOM_fields} 
     284\label{sec:DOM_fields} 
    285285The ocean mesh ($i.e.$ the position of all the scalar and vector points) is defined  
    286286by the transformation that gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$.  
    287287The grid-points are located at integer or integer and a half values of as indicated  
    288 in Table~\ref{Tab_cell}. The associated scale factors are defined using the   
    289 analytical first derivative of the transformation \eqref{Eq_scale_factors}.  
     288in \autoref{tab:cell}. The associated scale factors are defined using the   
     289analytical first derivative of the transformation \autoref{eq:scale_factors}.  
    290290Necessary fields for configuration definition are: \\ 
    291291Geographic position : 
     
    316316% ------------------------------------------------------------------------------------------------------------- 
    317317%\subsection{List of needed fields to build DOMAIN} 
    318 %\label{DOM_fields_list} 
     318%\label{subsec:DOM_fields_list} 
    319319 
    320320 
     
    323323% ================================================================ 
    324324\section{Horizontal grid mesh (\protect\mdl{domhgr})} 
    325 \label{DOM_hgr} 
     325\label{sec:DOM_hgr} 
    326326 
    327327% ------------------------------------------------------------------------------------------------------------- 
     
    329329% ------------------------------------------------------------------------------------------------------------- 
    330330\subsection{Coordinates and scale factors} 
    331 \label{DOM_hgr_coord_e} 
     331\label{subsec:DOM_hgr_coord_e} 
    332332 
    333333The ocean mesh ($i.e.$ the position of all the scalar and vector points) is defined  
    334334by the transformation that gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$.  
    335335The grid-points are located at integer or integer and a half values of as indicated  
    336 in Table~\ref{Tab_cell}. The associated scale factors are defined using the  
    337 analytical first derivative of the transformation \eqref{Eq_scale_factors}. These  
     336in \autoref{tab:cell}. The associated scale factors are defined using the  
     337analytical first derivative of the transformation \autoref{eq:scale_factors}. These  
    338338definitions are done in two modules, \mdl{domhgr} and \mdl{domzgr}, which  
    339339provide the horizontal and vertical meshes, respectively. This section deals with  
     
    343343analytical expressions of the longitude $\lambda$ and  latitude $\varphi$ as a  
    344344function of  $(i,j)$. The horizontal scale factors are calculated using  
    345 \eqref{Eq_scale_factors}. For example, when the longitude and latitude are  
     345\autoref{eq:scale_factors}. For example, when the longitude and latitude are  
    346346function of a single value ($i$ and $j$, respectively) (geographical configuration  
    347347of the mesh), the horizontal mesh definition reduces to define the wanted  
     
    382382allowing the user to set arbitrary jumps in thickness between adjacent layers)  
    383383\citep{Treguier1996}. An example of the effect of such a choice is shown in  
    384 Fig.~\ref{Fig_zgr_e3}. 
     384\autoref{fig:zgr_e3}. 
    385385%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    386386\begin{figure}[!t]     \begin{center} 
    387387\includegraphics[width=0.90\textwidth]{Fig_zgr_e3} 
    388 \caption{ \protect\label{Fig_zgr_e3}     
     388\caption{ \protect\label{fig:zgr_e3}     
    389389Comparison of (a) traditional definitions of grid-point position and grid-size in the vertical,  
    390390and (b) analytically derived grid-point position and scale factors.  
     
    401401% ------------------------------------------------------------------------------------------------------------- 
    402402\subsection{Choice of horizontal grid} 
    403 \label{DOM_hgr_msh_choice} 
     403\label{subsec:DOM_hgr_msh_choice} 
    404404 
    405405 
     
    408408% ------------------------------------------------------------------------------------------------------------- 
    409409\subsection{Output grid files} 
    410 \label{DOM_hgr_files} 
     410\label{subsec:DOM_hgr_files} 
    411411 
    412412All the arrays relating to a particular ocean model configuration (grid-point  
     
    426426% ================================================================ 
    427427\section{Vertical grid (\protect\mdl{domzgr})} 
    428 \label{DOM_zgr} 
     428\label{sec:DOM_zgr} 
    429429%-----------------------------------------nam_zgr & namdom------------------------------------------- 
    430430%\forfile{../namelists/namzgr}  
     
    444444\begin{figure}[!tb]    \begin{center} 
    445445\includegraphics[width=1.0\textwidth]{Fig_z_zps_s_sps} 
    446 \caption{  \protect\label{Fig_z_zps_s_sps}    
     446\caption{  \protect\label{fig:z_zps_s_sps}    
    447447The ocean bottom as seen by the model:  
    448448(a) $z$-coordinate with full step,  
     
    451451(d) hybrid $s-z$ coordinate,  
    452452(e) hybrid $s-z$ coordinate with partial step, and  
    453 (f) same as (e) but in the non-linear free surface (\np{ln\_linssh}\forcode{ = .false.}).  
     453(f) same as (e) but in the non-linear free surface (\protect\np{ln\_linssh}\forcode{ = .false.}).  
    454454Note that the non-linear free surface can be used with any of the  
    4554555 coordinates (a) to (e).} 
     
    460460must be done once of all at the beginning of an experiment. It is not intended as an  
    461461option which can be enabled or disabled in the middle of an experiment. Three main  
    462 choices are offered (Fig.~\ref{Fig_z_zps_s_sps}a to c): $z$-coordinate with full step  
     462choices are offered (\autoref{fig:z_zps_s_sps}a to c): $z$-coordinate with full step  
    463463bathymetry (\np{ln\_zco}\forcode{ = .true.}), $z$-coordinate with partial step bathymetry  
    464464(\np{ln\_zps}\forcode{ = .true.}), or generalized, $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}).  
    465465Hybridation of the three main coordinates are available: $s-z$ or $s-zps$ coordinate  
    466 (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: 
     466(\autoref{fig:z_zps_s_sps}d and \autoref{fig:z_zps_s_sps}e). By default a non-linear free surface is used: 
    467467the coordinate follow the time-variation of the free surface so that the transformation is time dependent:  
    468 $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.}),  
     468$z(i,j,k,t)$ (\autoref{fig:z_zps_s_sps}f). When a linear free surface is assumed (\np{ln\_linssh}\forcode{ = .true.}),  
    469469the vertical coordinate are fixed in time, but the seawater can move up and down across the z=0 surface  
    470470(in other words, the top of the ocean in not a rigid-lid).  
     
    513513% ------------------------------------------------------------------------------------------------------------- 
    514514\subsection{Meter bathymetry} 
    515 \label{DOM_bathy} 
     515\label{subsec:DOM_bathy} 
    516516 
    517517Three options are possible for defining the bathymetry, according to the  
     
    541541This is unnecessary when the ocean is forced by fixed atmospheric conditions,  
    542542so these seas can be removed from the ocean domain. The user has the option  
    543 to set the bathymetry in closed seas to zero (see \S\ref{MISC_closea}), but the  
     543to set the bathymetry in closed seas to zero (see \autoref{sec:MISC_closea}), but the  
    544544code has to be adapted to the user's configuration.  
    545545 
     
    549549\subsection[$Z$-coordinate (\protect\np{ln\_zco}\forcode{ = .true.}) and ref. coordinate] 
    550550            {$Z$-coordinate (\protect\np{ln\_zco}\forcode{ = .true.}) and reference coordinate} 
    551 \label{DOM_zco} 
     551\label{subsec:DOM_zco} 
    552552 
    553553%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    554554\begin{figure}[!tb]    \begin{center} 
    555555\includegraphics[width=0.90\textwidth]{Fig_zgr} 
    556 \caption{ \protect\label{Fig_zgr}     
     556\caption{ \protect\label{fig:zgr}     
    557557Default vertical mesh for ORCA2: 30 ocean levels (L30). Vertical level functions for  
    558558(a) T-point depth and (b) the associated scale factor as computed  
    559 from \eqref{DOM_zgr_ana} using \eqref{DOM_zgr_coef} in $z$-coordinate.} 
     559from \autoref{eq:DOM_zgr_ana} using \autoref{eq:DOM_zgr_coef} in $z$-coordinate.} 
    560560\end{center}   \end{figure} 
    561561%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    563563The reference coordinate transformation $z_0 (k)$ defines the arrays $gdept_0$  
    564564and $gdepw_0$ for $t$- and $w$-points, respectively. As indicated on  
    565 Fig.\ref{Fig_index_vert} \jp{jpk} is the number of $w$-levels. $gdepw_0(1)$ is the  
     565\autoref{fig:index_vert} \jp{jpk} is the number of $w$-levels. $gdepw_0(1)$ is the  
    566566ocean surface. There are at most \jp{jpk}-1 $t$-points inside the ocean, the  
    567567additional $t$-point at $jk=jpk$ is below the sea floor and is not used.  
     
    579579near the ocean surface. The following function is proposed as a standard for a  
    580580$z$-coordinate (with either full or partial steps):  
    581 \begin{equation} \label{DOM_zgr_ana} 
     581\begin{equation} \label{eq:DOM_zgr_ana} 
    582582\begin{split} 
    583583 z_0 (k)    &= h_{sur} -h_0 \;k-\;h_1 \;\log \left[ {\,\cosh \left( {{(k-h_{th} )} / {h_{cr} }} \right)\,} \right] \\  
     
    588588expression allows us to define a nearly uniform vertical location of levels at the  
    589589ocean top and bottom with a smooth hyperbolic tangent transition in between  
    590 (Fig.~\ref{Fig_zgr}). 
     590(\autoref{fig:zgr}). 
    591591 
    592592If the ice shelf cavities are opened (\np{ln\_isfcav}\forcode{ = .true.}), the definition of $z_0$ is the same.  
    593593However, definition of $e_3^0$ at $t$- and $w$-points is respectively changed to: 
    594 \begin{equation} \label{DOM_zgr_ana} 
     594\begin{equation} \label{eq:DOM_zgr_ana} 
    595595\begin{split} 
    596596 e_3^T(k) &= z_W (k+1) - z_W (k)   \\ 
     
    605605surface (bottom) layers and a depth which varies from 0 at the sea surface to a  
    606606minimum of $-5000~m$. This leads to the following conditions: 
    607 \begin{equation} \label{DOM_zgr_coef} 
     607\begin{equation} \label{eq:DOM_zgr_coef} 
    608608\begin{split} 
    609609 e_3 (1+1/2)      &=10. \\  
     
    616616With the choice of the stretching $h_{cr} =3$ and the number of levels  
    617617\jp{jpk}=$31$, the four coefficients $h_{sur}$, $h_{0}$, $h_{1}$, and $h_{th}$ in  
    618 \eqref{DOM_zgr_ana} have been determined such that \eqref{DOM_zgr_coef} is  
     618\autoref{eq:DOM_zgr_ana} have been determined such that \autoref{eq:DOM_zgr_coef} is  
    619619satisfied, through an optimisation procedure using a bisection method. For the first  
    620620standard ORCA2 vertical grid this led to the following values: $h_{sur} =4762.96$,  
    621621$h_0 =255.58, h_1 =245.5813$, and $h_{th} =21.43336$. The resulting depths and  
    622 scale factors as a function of the model levels are shown in Fig.~\ref{Fig_zgr} and  
    623 given in Table \ref{Tab_orca_zgr}. Those values correspond to the parameters  
     622scale factors as a function of the model levels are shown in \autoref{fig:zgr} and  
     623given in \autoref{tab:orca_zgr}. Those values correspond to the parameters  
    624624\np{ppsur}, \np{ppa0}, \np{ppa1}, \np{ppkth} in \ngn{namcfg} namelist.  
    625625 
     
    67567531 &  \textbf{5250.23}& 5000.00 &   \textbf{500.56} & 500.33 \\ \hline 
    676676\end{tabular} \end{center}  
    677 \caption{ \protect\label{Tab_orca_zgr}    
     677\caption{ \protect\label{tab:orca_zgr}    
    678678Default vertical mesh in $z$-coordinate for 30 layers ORCA2 configuration as computed  
    679 from \eqref{DOM_zgr_ana} using the coefficients given in \eqref{DOM_zgr_coef}} 
     679from \autoref{eq:DOM_zgr_ana} using the coefficients given in \autoref{eq:DOM_zgr_coef}} 
    680680\end{table} 
    681681%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    685685% ------------------------------------------------------------------------------------------------------------- 
    686686\subsection{$Z$-coordinate with partial step (\protect\np{ln\_zps}\forcode{ = .true.})} 
    687 \label{DOM_zps} 
     687\label{subsec:DOM_zps} 
    688688%--------------------------------------------namdom------------------------------------------------------- 
    689689\forfile{../namelists/namdom}  
     
    717717% ------------------------------------------------------------------------------------------------------------- 
    718718\subsection{$S$-coordinate (\protect\np{ln\_sco}\forcode{ = .true.})} 
    719 \label{DOM_sco} 
     719\label{subsec:DOM_sco} 
    720720%------------------------------------------nam_zgr_sco--------------------------------------------------- 
    721721%\forfile{../namelists/namzgr_sco}  
     
    726726function or its derivative, respectively: 
    727727 
    728 \begin{equation} \label{DOM_sco_ana} 
     728\begin{equation} \label{eq:DOM_sco_ana} 
    729729\begin{split} 
    730730 z(k)       &= h(i,j) \; z_0(k)  \\ 
     
    737737surface to $1$ at the ocean bottom. The depth field $h$ is not necessary the ocean  
    738738depth, since a mixed step-like and bottom-following representation of the  
    739 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). 
     739topography 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). 
    740740The namelist parameter \np{rn\_rmax} determines the slope at which the terrain-following coordinate intersects  
    741741the sea bed and becomes a pseudo z-coordinate.  
     
    764764\end{equation} 
    765765 
    766 \begin{equation} \label{DOM_sco_function} 
     766\begin{equation} \label{eq:DOM_sco_function} 
    767767\begin{split} 
    768768C(s)  &=  \frac{ \left[   \tanh{ \left( \theta \, (s+b) \right)}  
     
    784784\begin{figure}[!ht]    \begin{center} 
    785785\includegraphics[width=1.0\textwidth]{Fig_sco_function} 
    786 \caption{  \protect\label{Fig_sco_function}    
     786\caption{  \protect\label{fig:sco_function}    
    787787Examples of the stretching function applied to a seamount; from left to right:  
    788788surface, surface and bottom, and bottom intensified resolutions} 
     
    794794are the surface and bottom control parameters such that $0\leqslant \theta \leqslant 20$, and  
    795795$0\leqslant b\leqslant 1$. $b$ has been designed to allow surface and/or bottom  
    796 increase of the vertical resolution (Fig.~\ref{Fig_sco_function}). 
     796increase of the vertical resolution (\autoref{fig:sco_function}). 
    797797 
    798798Another example has been provided at version 3.5 (\np{ln\_s\_SF12}) that allows  
     
    807807The function is defined with respect to $\sigma$, the unstretched terrain-following coordinate: 
    808808 
    809 \begin{equation} \label{DOM_gamma_deriv} 
     809\begin{equation} \label{eq:DOM_gamma_deriv} 
    810810\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) 
    811811\end{equation} 
    812812 
    813813Where: 
    814 \begin{equation} \label{DOM_gamma} 
     814\begin{equation} \label{eq:DOM_gamma} 
    815815f\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}  
    816816\end{equation} 
     
    821821and bottom depths. The bottom cell depth in this example is given as a function of water depth: 
    822822 
    823 \begin{equation} \label{DOM_zb} 
     823\begin{equation} \label{eq:DOM_zb} 
    824824Z_b= h a + b 
    825825\end{equation} 
     
    831831   \includegraphics[width=1.0\textwidth]{FIG_DOM_compare_coordinates_surface} 
    832832        \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.} 
    833     \label{fig_compare_coordinates_surface} 
     833    \label{fig:fig_compare_coordinates_surface} 
    834834\end{figure} 
    835835%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    845845% ------------------------------------------------------------------------------------------------------------- 
    846846\subsection{$Z^*$- or $S^*$-coordinate (\protect\np{ln\_linssh}\forcode{ = .false.}) } 
    847 \label{DOM_zgr_star} 
     847\label{subsec:DOM_zgr_star} 
    848848 
    849849This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO web site.  
     
    855855% ------------------------------------------------------------------------------------------------------------- 
    856856\subsection{Level bathymetry and mask} 
    857 \label{DOM_msk} 
     857\label{subsec:DOM_msk} 
    858858 
    859859Whatever the vertical coordinate used, the model offers the possibility of  
     
    892892 
    893893Note that, without ice shelves cavities, masks at $t-$ and $w-$points are identical with  
    894 the numerical indexing used (\S~\ref{DOM_Num_Index}). Nevertheless, $wmask$ are required  
     894the numerical indexing used (\autoref{subsec:DOM_Num_Index}). Nevertheless, $wmask$ are required  
    895895with oceean cavities to deal with the top boundary (ice shelf/ocean interface)  
    896896exactly in the same way as for the bottom boundary.  
     
    900900case of an east-west cyclical boundary condition, \textit{mbathy} has its last  
    901901column equal to the second one and its first column equal to the last but one  
    902 (and so too the mask arrays) (see \S~\ref{LBC_jperio}). 
     902(and so too the mask arrays) (see \autoref{fig:LBC_jperio}). 
    903903 
    904904 
     
    907907% ================================================================ 
    908908\section{Initial state (\protect\mdl{istate} and \protect\mdl{dtatsd})} 
    909 \label{DTA_tsd} 
     909\label{sec:DTA_tsd} 
    910910%-----------------------------------------namtsd------------------------------------------- 
    911911\forfile{../namelists/namtsd}  
     
    918918\item[\np{ln\_tsd\_init}\forcode{ = .true.}] use a T and S input files that can be given on the model grid itself or  
    919919on their native input data grid. In the latter case, the data will be interpolated on-the-fly both in the  
    920 horizontal and the vertical to the model grid (see \S~\ref{SBC_iof}). The information relative to the  
     920horizontal and the vertical to the model grid (see \autoref{subsec:SBC_iof}). The information relative to the  
    921921input files are given in the \np{sn\_tem} and \np{sn\_sal} structures.  
    922922The computation is done in the \mdl{dtatsd} module. 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_DYN.tex

    r9394 r9407  
    55% ================================================================ 
    66\chapter{Ocean Dynamics (DYN)} 
    7 \label{DYN} 
     7\label{chap:DYN} 
    88\minitoc 
    99 
     
    1111$\ $\newline      %force an empty line 
    1212 
    13 Using the representation described in Chapter \ref{DOM}, several semi-discrete  
     13Using the representation described in \autoref{chap:DOM}, several semi-discrete  
    1414space forms of the dynamical equations are available depending on the vertical  
    1515coordinate used and on the conservation properties of the vorticity term. In all  
     
    3636inputs (surface wind stress calculation using bulk formulae, estimation of mixing  
    3737coefficients) that are carried out in modules SBC, LDF and ZDF and are described  
    38 in Chapters \ref{SBC}, \ref{LDF} and \ref{ZDF}, respectively.  
     38in \autoref{chap:SBC}, \autoref{chap:LDF} and \autoref{chap:ZDF}, respectively.  
    3939 
    4040In the present chapter we also describe the diagnostic equations used to compute  
     
    5151The user has the option of extracting and outputting each tendency term from the 
    52523D momentum equations (\key{trddyn} defined), as described in  
    53 Chap.\ref{MISC}.  Furthermore, the tendency terms associated with the 2D  
     53\autoref{chap:MISC}.  Furthermore, the tendency terms associated with the 2D  
    5454barotropic vorticity balance (when \key{trdvor} is defined) can be derived from the  
    55553D terms. 
     
    6464% ================================================================ 
    6565\section{Sea surface height and diagnostic variables ($\eta$, $\zeta$, $\chi$, $w$)} 
    66 \label{DYN_divcur_wzv} 
     66\label{sec:DYN_divcur_wzv} 
    6767 
    6868%-------------------------------------------------------------------------------------------------------------- 
     
    7070%-------------------------------------------------------------------------------------------------------------- 
    7171\subsection{Horizontal divergence and relative vorticity (\protect\mdl{divcur})} 
    72 \label{DYN_divcur} 
     72\label{subsec:DYN_divcur} 
    7373 
    7474The vorticity is defined at an $f$-point ($i.e.$ corner point) as follows: 
    75 \begin{equation} \label{Eq_divcur_cur} 
     75\begin{equation} \label{eq:divcur_cur} 
    7676\zeta =\frac{1}{e_{1f}\,e_{2f} }\left( {\;\delta _{i+1/2} \left[ {e_{2v}\;v} \right] 
    7777                          -\delta _{j+1/2} \left[ {e_{1u}\;u} \right]\;} \right) 
     
    7979 
    8080The horizontal divergence is defined at a $T$-point. It is given by: 
    81 \begin{equation} \label{Eq_divcur_div} 
     81\begin{equation} \label{eq:divcur_div} 
    8282\chi =\frac{1}{e_{1t}\,e_{2t}\,e_{3t} } 
    8383      \left( {\delta _i \left[ {e_{2u}\,e_{3u}\,u} \right] 
     
    102102%-------------------------------------------------------------------------------------------------------------- 
    103103\subsection{Horizontal divergence and relative vorticity (\protect\mdl{sshwzv})} 
    104 \label{DYN_sshwzv} 
     104\label{subsec:DYN_sshwzv} 
    105105 
    106106The sea surface height is given by : 
    107 \begin{equation} \label{Eq_dynspg_ssh} 
     107\begin{equation} \label{eq:dynspg_ssh} 
    108108\begin{aligned} 
    109109\frac{\partial \eta }{\partial t} 
     
    117117expressed in Kg/m$^2$/s (which is equal to mm/s), and $\rho _w$=1,035~Kg/m$^3$  
    118118is the reference density of sea water (Boussinesq approximation). If river runoff is  
    119 expressed as a surface freshwater flux (see \S\ref{SBC}) then \textit{emp} can be  
     119expressed as a surface freshwater flux (see \autoref{chap:SBC}) then \textit{emp} can be  
    120120written as the evaporation minus precipitation, minus the river runoff.  
    121121The sea-surface height is evaluated using exactly the same time stepping scheme  
    122 as the tracer equation \eqref{Eq_tra_nxt}:  
     122as the tracer equation \autoref{eq:tra_nxt}:  
    123123a leapfrog scheme in combination with an Asselin time filter, $i.e.$ the velocity appearing  
    124 in \eqref{Eq_dynspg_ssh} is centred in time (\textit{now} velocity).  
     124in \autoref{eq:dynspg_ssh} is centred in time (\textit{now} velocity).  
    125125This is of paramount importance. Replacing $T$ by the number $1$ in the tracer equation and summing 
    126126over the water column must lead to the sea surface height equation otherwise tracer content 
     
    129129The vertical velocity is computed by an upward integration of the horizontal  
    130130divergence starting at the bottom, taking into account the change of the thickness of the levels : 
    131 \begin{equation} \label{Eq_wzv} 
     131\begin{equation} \label{eq:wzv} 
    132132\left\{   \begin{aligned} 
    133133&\left. w \right|_{k_b-1/2} \quad= 0    \qquad \text{where } k_b \text{ is the level just above the sea floor }   \\ 
     
    141141of the level thicknesses, re-orientated downward. 
    142142\gmcomment{not sure of this...  to be modified with the change in emp setting} 
    143 In the case of a linear free surface, the time derivative in \eqref{Eq_wzv} disappears. 
     143In the case of a linear free surface, the time derivative in \autoref{eq:wzv} disappears. 
    144144The upper boundary condition applies at a fixed level $z=0$. The top vertical velocity  
    145145is thus equal to the divergence of the barotropic transport ($i.e.$ the first term in the 
    146 right-hand-side of \eqref{Eq_dynspg_ssh}). 
     146right-hand-side of \autoref{eq:dynspg_ssh}). 
    147147 
    148148Note also that whereas the vertical velocity has the same discrete  
     
    150150in the second case, $w$ is the velocity normal to the $s$-surfaces.  
    151151Note also that the $k$-axis is re-orientated downwards in the \textsc{fortran} code compared  
    152 to the indexing used in the semi-discrete equations such as \eqref{Eq_wzv}  
    153 (see  \S\ref{DOM_Num_Index_vertical}).  
     152to the indexing used in the semi-discrete equations such as \autoref{eq:wzv}  
     153(see \autoref{subsec:DOM_Num_Index_vertical}).  
    154154 
    155155 
     
    158158% ================================================================ 
    159159\section{Coriolis and advection: vector invariant form} 
    160 \label{DYN_adv_cor_vect} 
     160\label{sec:DYN_adv_cor_vect} 
    161161%-----------------------------------------nam_dynadv---------------------------------------------------- 
    162162\forfile{../namelists/namdyn_adv}  
     
    171171time (\textit{now} velocity).  
    172172At the lateral boundaries either free slip, no slip or partial slip boundary  
    173 conditions are applied following Chap.\ref{LBC}. 
     173conditions are applied following \autoref{chap:LBC}. 
    174174 
    175175% ------------------------------------------------------------------------------------------------------------- 
     
    177177% ------------------------------------------------------------------------------------------------------------- 
    178178\subsection{Vorticity term (\protect\mdl{dynvor})} 
    179 \label{DYN_vor} 
     179\label{subsec:DYN_vor} 
    180180%------------------------------------------nam_dynvor---------------------------------------------------- 
    181181\forfile{../namelists/namdyn_vor}  
     
    188188the relative vorticity term and horizontal kinetic energy for the planetary vorticity  
    189189term (MIX scheme) ; or conserving both the potential enstrophy of horizontally non-divergent  
    190 flow and horizontal kinetic energy (EEN scheme) (see  Appendix~\ref{Apdx_C_vorEEN}). In the  
     190flow and horizontal kinetic energy (EEN scheme) (see \autoref{subsec:C_vorEEN}). In the  
    191191case of ENS, ENE or MIX schemes the land sea mask may be slightly modified to ensure the  
    192192consistency of vorticity term with analytical equations (\np{ln\_dynvor\_con}\forcode{ = .true.}). 
     
    198198%------------------------------------------------------------- 
    199199\subsubsection{Enstrophy conserving scheme (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})} 
    200 \label{DYN_vor_ens} 
     200\label{subsec:DYN_vor_ens} 
    201201 
    202202In the enstrophy conserving case (ENS scheme), the discrete formulation of the  
     
    204204($ [ (\zeta +f ) / e_{3f} ]^2 $ in $s$-coordinates) for a horizontally non-divergent  
    205205flow ($i.e.$ $\chi$=$0$), but does not conserve the total kinetic energy. It is given by: 
    206 \begin{equation} \label{Eq_dynvor_ens} 
     206\begin{equation} \label{eq:dynvor_ens} 
    207207\left\{  
    208208\begin{aligned} 
     
    219219%------------------------------------------------------------- 
    220220\subsubsection{Energy conserving scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})} 
    221 \label{DYN_vor_ene} 
     221\label{subsec:DYN_vor_ene} 
    222222 
    223223The kinetic energy conserving scheme (ENE scheme) conserves the global  
    224224kinetic energy but not the global enstrophy. It is given by: 
    225 \begin{equation} \label{Eq_dynvor_ene} 
     225\begin{equation} \label{eq:dynvor_ene} 
    226226\left\{   \begin{aligned} 
    227227{+\frac{1}{e_{1u}}\; {\overline {\left( {\frac{\zeta +f}{e_{3f} }} \right) 
     
    236236%------------------------------------------------------------- 
    237237\subsubsection{Mixed energy/enstrophy conserving scheme (\protect\np{ln\_dynvor\_mix}\forcode{ = .true.}) } 
    238 \label{DYN_vor_mix} 
     238\label{subsec:DYN_vor_mix} 
    239239 
    240240For the mixed energy/enstrophy conserving scheme (MIX scheme), a mixture of the  
    241 two previous schemes is used. It consists of the ENS scheme (\ref{Eq_dynvor_ens})  
    242 for the relative vorticity term, and of the ENE scheme (\ref{Eq_dynvor_ene}) applied  
     241two previous schemes is used. It consists of the ENS scheme (\autoref{eq:dynvor_ens})  
     242for the relative vorticity term, and of the ENE scheme (\autoref{eq:dynvor_ene}) applied  
    243243to the planetary vorticity term. 
    244 \begin{equation} \label{Eq_dynvor_mix} 
     244\begin{equation} \label{eq:dynvor_mix} 
    245245\left\{ {     \begin{aligned} 
    246246 {+\frac{1}{e_{1u} }\; {\overline {\left( {\frac{\zeta }{e_{3f} }} \right)} }^{\,i}  
     
    259259%------------------------------------------------------------- 
    260260\subsubsection{Energy and enstrophy conserving scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.}) } 
    261 \label{DYN_vor_een} 
     261\label{subsec:DYN_vor_een} 
    262262 
    263263In both the ENS and ENE schemes, it is apparent that the combination of $i$ and $j$  
     
    277277The idea is to get rid of the double averaging by considering triad combinations of vorticity.  
    278278It is noteworthy that this solution is conceptually quite similar to the one proposed by 
    279 \citep{Griffies_al_JPO98} for the discretization of the iso-neutral diffusion operator (see App.\ref{Apdx_C}). 
     279\citep{Griffies_al_JPO98} for the discretization of the iso-neutral diffusion operator (see \autoref{apdx:C}). 
    280280 
    281281The \citet{Arakawa_Hsu_MWR90} vorticity advection scheme for a single layer is modified  
    282282for spherical coordinates as described by \citet{Arakawa_Lamb_MWR81} to obtain the EEN scheme.  
    283283First consider the discrete expression of the potential vorticity, $q$, defined at an $f$-point:  
    284 \begin{equation} \label{Eq_pot_vor} 
     284\begin{equation} \label{eq:pot_vor} 
    285285q  = \frac{\zeta +f} {e_{3f} } 
    286286\end{equation} 
    287 where the relative vorticity is defined by (\ref{Eq_divcur_cur}), the Coriolis parameter  
     287where the relative vorticity is defined by (\autoref{eq:divcur_cur}), the Coriolis parameter  
    288288is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is:  
    289 \begin{equation} \label{Eq_een_e3f} 
     289\begin{equation} \label{eq:een_e3f} 
    290290e_{3f} = \overline{\overline {e_{3t} }} ^{\,i+1/2,j+1/2} 
    291291\end{equation} 
     
    294294\begin{figure}[!ht]    \begin{center} 
    295295\includegraphics[width=0.70\textwidth]{Fig_DYN_een_triad} 
    296 \caption{ \protect\label{Fig_DYN_een_triad}   
     296\caption{ \protect\label{fig:DYN_een_triad}   
    297297Triads used in the energy and enstrophy conserving scheme (een) for  
    298298$u$-component (upper panel) and $v$-component (lower panel).} 
     
    300300%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    301301 
    302 A key point in \eqref{Eq_een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made.  
     302A key point in \autoref{eq:een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made.  
    303303It uses the sum of masked t-point vertical scale factor divided either  
    304304by the sum of the four t-point masks (\np{nn\_een\_e3f}\forcode{ = 1}),  
     
    312312Next, the vorticity triads, $ {^i_j}\mathbb{Q}^{i_p}_{j_p}$ can be defined at a $T$-point as  
    313313the following triad combinations of the neighbouring potential vorticities defined at f-points  
    314 (Fig.~\ref{Fig_DYN_een_triad}):  
    315 \begin{equation} \label{Q_triads} 
     314(\autoref{fig:DYN_een_triad}):  
     315\begin{equation} \label{eq:Q_triads} 
    316316_i^j \mathbb{Q}^{i_p}_{j_p} 
    317317= \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) 
     
    320320 
    321321Finally, the vorticity terms are represented as:  
    322 \begin{equation} \label{Eq_dynvor_een} 
     322\begin{equation} \label{eq:dynvor_een} 
    323323\left\{ { 
    324324\begin{aligned} 
     
    333333This EEN scheme in fact combines the conservation properties of the ENS and ENE schemes.  
    334334It conserves both total energy and potential enstrophy in the limit of horizontally  
    335 nondivergent flow ($i.e.$ $\chi$=$0$) (see  Appendix~\ref{Apdx_C_vorEEN}).  
     335nondivergent flow ($i.e.$ $\chi$=$0$) (see \autoref{subsec:C_vorEEN}).  
    336336Applied to a realistic ocean configuration, it has been shown that it leads to a significant  
    337337reduction of the noise in the vertical velocity field \citep{Le_Sommer_al_OM09}.  
     
    344344%-------------------------------------------------------------------------------------------------------------- 
    345345\subsection{Kinetic energy gradient term (\protect\mdl{dynkeg})} 
    346 \label{DYN_keg} 
    347  
    348 As demonstrated in Appendix~\ref{Apdx_C}, there is a single discrete formulation  
     346\label{subsec:DYN_keg} 
     347 
     348As demonstrated in \autoref{apdx:C}, there is a single discrete formulation  
    349349of the kinetic energy gradient term that, together with the formulation chosen for  
    350350the vertical advection (see below), conserves the total kinetic energy: 
    351 \begin{equation} \label{Eq_dynkeg} 
     351\begin{equation} \label{eq:dynkeg} 
    352352\left\{ \begin{aligned} 
    353353 -\frac{1}{2 \; e_{1u} }  & \ \delta _{i+1/2} \left[ {\overline {u^2}^{\,i} + \overline{v^2}^{\,j}} \right]   \\ 
     
    360360%-------------------------------------------------------------------------------------------------------------- 
    361361\subsection{Vertical advection term (\protect\mdl{dynzad}) } 
    362 \label{DYN_zad} 
     362\label{subsec:DYN_zad} 
    363363 
    364364The discrete formulation of the vertical advection, together with the formulation  
    365365chosen for the gradient of kinetic energy (KE) term, conserves the total kinetic  
    366366energy. Indeed, the change of KE due to the vertical advection is exactly  
    367 balanced by the change of KE due to the gradient of KE (see Appendix~\ref{Apdx_C}). 
    368 \begin{equation} \label{Eq_dynzad} 
     367balanced by the change of KE due to the gradient of KE (see \autoref{apdx:C}). 
     368\begin{equation} \label{eq:dynzad} 
    369369\left\{     \begin{aligned} 
    370370-\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}  \\ 
     
    377377Note that in this case, a similar split-explicit time stepping should be used on  
    378378vertical advection of tracer to ensure a better stability,  
    379 an option which is only available with a TVD scheme (see \np{ln\_traadv\_tvd\_zts} in \S\ref{TRA_adv_tvd}). 
     379an option which is only available with a TVD scheme (see \np{ln\_traadv\_tvd\_zts} in \autoref{subsec:TRA_adv_tvd}). 
    380380 
    381381 
     
    384384% ================================================================ 
    385385\section{Coriolis and advection: flux form} 
    386 \label{DYN_adv_cor_flux} 
     386\label{sec:DYN_adv_cor_flux} 
    387387%------------------------------------------nam_dynadv---------------------------------------------------- 
    388388\forfile{../namelists/namdyn_adv}  
     
    394394appearing in their expressions is centred in time (\textit{now} velocity). At the  
    395395lateral boundaries either free slip, no slip or partial slip boundary conditions  
    396 are applied following Chap.\ref{LBC}. 
     396are applied following \autoref{chap:LBC}. 
    397397 
    398398 
     
    401401%-------------------------------------------------------------------------------------------------------------- 
    402402\subsection{Coriolis plus curvature metric terms (\protect\mdl{dynvor}) } 
    403 \label{DYN_cor_flux} 
     403\label{subsec:DYN_cor_flux} 
    404404 
    405405In flux form, the vorticity term reduces to a Coriolis term in which the Coriolis  
    406406parameter has been modified to account for the "metric" term. This altered  
    407407Coriolis parameter is thus discretised at $f$-points. It is given by:  
    408 \begin{multline} \label{Eq_dyncor_metric} 
     408\begin{multline} \label{eq:dyncor_metric} 
    409409f+\frac{1}{e_1 e_2 }\left( {v\frac{\partial e_2 }{\partial i}  -  u\frac{\partial e_1 }{\partial j}} \right)  \\ 
    410410   \equiv   f + \frac{1}{e_{1f} e_{2f} } \left( { \ \overline v ^{i+1/2}\delta _{i+1/2} \left[ {e_{2u} } \right]   
     
    412412\end{multline}  
    413413 
    414 Any of the (\ref{Eq_dynvor_ens}), (\ref{Eq_dynvor_ene}) and (\ref{Eq_dynvor_een})  
     414Any of the (\autoref{eq:dynvor_ens}), (\autoref{eq:dynvor_ene}) and (\autoref{eq:dynvor_een})  
    415415schemes can be used to compute the product of the Coriolis parameter and the  
    416 vorticity. However, the energy-conserving scheme  (\ref{Eq_dynvor_een}) has  
     416vorticity. However, the energy-conserving scheme  (\autoref{eq:dynvor_een}) has  
    417417exclusively been used to date. This term is evaluated using a leapfrog scheme,  
    418418$i.e.$ the velocity is centred in time (\textit{now} velocity). 
     
    422422%-------------------------------------------------------------------------------------------------------------- 
    423423\subsection{Flux form advection term (\protect\mdl{dynadv}) } 
    424 \label{DYN_adv_flux} 
     424\label{subsec:DYN_adv_flux} 
    425425 
    426426The discrete expression of the advection term is given by : 
    427 \begin{equation} \label{Eq_dynadv} 
     427\begin{equation} \label{eq:dynadv} 
    428428\left\{  
    429429\begin{aligned} 
     
    454454%------------------------------------------------------------- 
    455455\subsubsection{CEN2: $2^{nd}$ order centred scheme (\protect\np{ln\_dynadv\_cen2}\forcode{ = .true.})} 
    456 \label{DYN_adv_cen2} 
     456\label{subsec:DYN_adv_cen2} 
    457457 
    458458In the centered $2^{nd}$ order formulation, the velocity is evaluated as the  
    459459mean of the two neighbouring points : 
    460 \begin{equation} \label{Eq_dynadv_cen2} 
     460\begin{equation} \label{eq:dynadv_cen2} 
    461461\left\{     \begin{aligned} 
    462462 u_T^{cen2} &=\overline u^{i }       \quad &  u_F^{cen2} &=\overline u^{j+1/2}  \quad &  u_{uw}^{cen2} &=\overline u^{k+1/2}   \\ 
     
    475475%------------------------------------------------------------- 
    476476\subsubsection{UBS: Upstream Biased Scheme (\protect\np{ln\_dynadv\_ubs}\forcode{ = .true.})} 
    477 \label{DYN_adv_ubs} 
     477\label{subsec:DYN_adv_ubs} 
    478478 
    479479The UBS advection scheme is an upstream biased third order scheme based on  
    480480an upstream-biased parabolic interpolation. For example, the evaluation of  
    481481$u_T^{ubs} $ is done as follows: 
    482 \begin{equation} \label{Eq_dynadv_ubs} 
     482\begin{equation} \label{eq:dynadv_ubs} 
    483483u_T^{ubs} =\overline u ^i-\;\frac{1}{6}   \begin{cases} 
    484484      u"_{i-1/2}&    \text{if $\ \overline{e_{2u}\,e_{3u} \ u}^i  \geqslant 0$ }    \\ 
     
    498498The UBS scheme is not used in all directions. In the vertical, the centred $2^{nd}$  
    499499order evaluation of the advection is preferred, $i.e.$ $u_{uw}^{ubs}$ and  
    500 $u_{vw}^{ubs}$ in \eqref{Eq_dynadv_cen2} are used. UBS is diffusive and is  
     500$u_{vw}^{ubs}$ in \autoref{eq:dynadv_cen2} are used. UBS is diffusive and is  
    501501associated with vertical mixing of momentum. \gmcomment{ gm  pursue the  
    502502sentence:Since vertical mixing of momentum is a source term of the TKE equation...  } 
    503503 
    504 For stability reasons,  the first term in (\ref{Eq_dynadv_ubs}), which corresponds  
     504For stability reasons, the first term in (\autoref{eq:dynadv_ubs}), which corresponds  
    505505to a second order centred scheme, is evaluated using the \textit{now} velocity  
    506506(centred in time), while the second term, which is the diffusion part of the scheme,  
     
    510510Note that the UBS and QUICK (Quadratic Upstream Interpolation for Convective Kinematics)  
    511511schemes only differ by one coefficient. Replacing $1/6$ by $1/8$ in  
    512 (\ref{Eq_dynadv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}.  
     512(\autoref{eq:dynadv_ubs}) leads to the QUICK advection scheme \citep{Webb_al_JAOT98}.  
    513513This option is not available through a namelist parameter, since the $1/6$ coefficient  
    514514is hard coded. Nevertheless it is quite easy to make the substitution in the 
     
    526526% ================================================================ 
    527527\section{Hydrostatic pressure gradient (\protect\mdl{dynhpg})} 
    528 \label{DYN_hpg} 
     528\label{sec:DYN_hpg} 
    529529%------------------------------------------nam_dynhpg--------------------------------------------------- 
    530530\forfile{../namelists/namdyn_hpg}  
     
    547547%-------------------------------------------------------------------------------------------------------------- 
    548548\subsection{Full step $Z$-coordinate (\protect\np{ln\_dynhpg\_zco}\forcode{ = .true.})} 
    549 \label{DYN_hpg_zco} 
     549\label{subsec:DYN_hpg_zco} 
    550550 
    551551The hydrostatic pressure can be obtained by integrating the hydrostatic equation  
     
    556556 
    557557for $k=km$ (surface layer, $jk=1$ in the code) 
    558 \begin{equation} \label{Eq_dynhpg_zco_surf} 
     558\begin{equation} \label{eq:dynhpg_zco_surf} 
    559559\left\{ \begin{aligned} 
    560560               \left. \delta _{i+1/2} \left[  p^h         \right] \right|_{k=km}  
     
    566566 
    567567for $1<k<km$ (interior layer) 
    568 \begin{equation} \label{Eq_dynhpg_zco} 
     568\begin{equation} \label{eq:dynhpg_zco} 
    569569\left\{ \begin{aligned} 
    570570               \left. \delta _{i+1/2} \left[  p^h         \right] \right|_{k}  
     
    577577\end{equation}  
    578578 
    579 Note that the $1/2$ factor in (\ref{Eq_dynhpg_zco_surf}) is adequate because of  
     579Note that the $1/2$ factor in (\autoref{eq:dynhpg_zco_surf}) is adequate because of  
    580580the definition of $e_{3w}$ as the vertical derivative of the scale factor at the surface  
    581581level ($z=0$). Note also that in case of variable volume level (\key{vvl} defined), the  
    582 surface pressure gradient is included in \eqref{Eq_dynhpg_zco_surf} and \eqref{Eq_dynhpg_zco}  
     582surface pressure gradient is included in \autoref{eq:dynhpg_zco_surf} and \autoref{eq:dynhpg_zco}  
    583583through the space and time variations of the vertical scale factor $e_{3w}$. 
    584584 
     
    587587%-------------------------------------------------------------------------------------------------------------- 
    588588\subsection{Partial step $Z$-coordinate (\protect\np{ln\_dynhpg\_zps}\forcode{ = .true.})} 
    589 \label{DYN_hpg_zps} 
     589\label{subsec:DYN_hpg_zps} 
    590590 
    591591With partial bottom cells, tracers in horizontally adjacent cells generally live at  
     
    596596Apart from this modification, the horizontal hydrostatic pressure gradient evaluated  
    597597in the $z$-coordinate with partial step is exactly as in the pure $z$-coordinate case.  
    598 As explained in detail in section \S\ref{TRA_zpshde}, the nonlinearity of pressure  
     598As explained in detail in section \autoref{sec:TRA_zpshde}, the nonlinearity of pressure  
    599599effects in the equation of state is such that it is better to interpolate temperature and  
    600600salinity vertically before computing the density. Horizontal gradients of temperature  
    601601and salinity are needed for the TRA modules, which is the reason why the horizontal  
    602602gradients of density at the deepest model level are computed in module \mdl{zpsdhe}  
    603 located in the TRA directory and described in \S\ref{TRA_zpshde}. 
     603located in the TRA directory and described in \autoref{sec:TRA_zpshde}. 
    604604 
    605605%-------------------------------------------------------------------------------------------------------------- 
     
    607607%-------------------------------------------------------------------------------------------------------------- 
    608608\subsection{$S$- and $Z$-$S$-coordinates} 
    609 \label{DYN_hpg_sco} 
     609\label{subsec:DYN_hpg_sco} 
    610610 
    611611Pressure gradient formulations in an $s$-coordinate have been the subject of a vast  
     
    615615 
    616616$\bullet$ Traditional coding (see for example \citet{Madec_al_JPO96}: (\np{ln\_dynhpg\_sco}\forcode{ = .true.}) 
    617 \begin{equation} \label{Eq_dynhpg_sco} 
     617\begin{equation} \label{eq:dynhpg_sco} 
    618618\left\{ \begin{aligned} 
    619619 - \frac{1}                   {\rho_o \, e_{1u}} \;   \delta _{i+1/2} \left[  p^h  \right]  
     
    625625 
    626626Where the first term is the pressure gradient along coordinates, computed as in  
    627 \eqref{Eq_dynhpg_zco_surf} - \eqref{Eq_dynhpg_zco}, and $z_T$ is the depth of  
     627\autoref{eq:dynhpg_zco_surf} - \autoref{eq:dynhpg_zco}, and $z_T$ is the depth of  
    628628the $T$-point evaluated from the sum of the vertical scale factors at the $w$-point  
    629629($e_{3w}$). 
     
    637637(\np{ln\_dynhpg\_djc}\forcode{ = .true.}) (currently disabled; under development) 
    638638 
    639 Note that expression \eqref{Eq_dynhpg_sco} is commonly used when the variable volume formulation is 
     639Note that expression \autoref{eq:dynhpg_sco} is commonly used when the variable volume formulation is 
    640640activated (\key{vvl}) because in that case, even with a flat bottom, the coordinate surfaces are not 
    641641horizontal but follow the free surface \citep{Levier2007}. The pressure jacobian scheme 
     
    648648 
    649649\subsection{Ice shelf cavity} 
    650 \label{DYN_hpg_isf} 
     650\label{subsec:DYN_hpg_isf} 
    651651Beneath an ice shelf, the total pressure gradient is the sum of the pressure gradient due to the ice shelf load and 
    652652 the pressure gradient due to the ocean load. If cavity opened (\np{ln\_isfcav}\forcode{ = .true.}) these 2 terms can be 
     
    658658This top pressure is constant over time. A detailed description of this method is described in \citet{Losch2008}.\\ 
    659659 
    660 $\bullet$ The ocean load is computed using the expression \eqref{Eq_dynhpg_sco} described in \ref{DYN_hpg_sco}.  
     660$\bullet$ The ocean load is computed using the expression \autoref{eq:dynhpg_sco} described in \autoref{subsec:DYN_hpg_sco}.  
    661661 
    662662%-------------------------------------------------------------------------------------------------------------- 
     
    664664%-------------------------------------------------------------------------------------------------------------- 
    665665\subsection{Time-scheme (\protect\np{ln\_dynhpg\_imp}\forcode{ = .true./.false.})} 
    666 \label{DYN_hpg_imp} 
     666\label{subsec:DYN_hpg_imp} 
    667667 
    668668The default time differencing scheme used for the horizontal pressure gradient is  
     
    680680$\bullet$ leapfrog scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}): 
    681681 
    682 \begin{equation} \label{Eq_dynhpg_lf} 
     682\begin{equation} \label{eq:dynhpg_lf} 
    683683\frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 
    684684   -\frac{1}{\rho _o \,e_{1u} }\delta _{i+1/2} \left[ {p_h^t } \right] 
     
    686686 
    687687$\bullet$ semi-implicit scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}): 
    688 \begin{equation} \label{Eq_dynhpg_imp} 
     688\begin{equation} \label{eq:dynhpg_imp} 
    689689\frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 
    690690   -\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] 
    691691\end{equation} 
    692692 
    693 The semi-implicit time scheme \eqref{Eq_dynhpg_imp} is made possible without  
     693The semi-implicit time scheme \autoref{eq:dynhpg_imp} is made possible without  
    694694significant additional computation since the density can be updated to time level  
    695695$t+\rdt$ before computing the horizontal hydrostatic pressure gradient. It can  
    696696be easily shown that the stability limit associated with the hydrostatic pressure  
    697 gradient doubles using \eqref{Eq_dynhpg_imp} compared to that using the  
    698 standard leapfrog scheme \eqref{Eq_dynhpg_lf}. Note that \eqref{Eq_dynhpg_imp}  
     697gradient doubles using \autoref{eq:dynhpg_imp} compared to that using the  
     698standard leapfrog scheme \autoref{eq:dynhpg_lf}. Note that \autoref{eq:dynhpg_imp}  
    699699is equivalent to applying a time filter to the pressure gradient to eliminate high  
    700 frequency IGWs. Obviously, when using \eqref{Eq_dynhpg_imp}, the doubling of  
     700frequency IGWs. Obviously, when using \autoref{eq:dynhpg_imp}, the doubling of  
    701701the time-step is achievable only if no other factors control the time-step, such as  
    702702the stability limits associated with advection or diffusion. 
     
    708708compute the hydrostatic pressure gradient (whatever the formulation) is evaluated  
    709709as follows: 
    710 \begin{equation} \label{Eq_rho_flt} 
     710\begin{equation} \label{eq:rho_flt} 
    711711   \rho^t = \rho( \widetilde{T},\widetilde {S},z_t) 
    712712 \quad     \text{with}  \quad  
     
    722722% ================================================================ 
    723723\section{Surface pressure gradient (\protect\mdl{dynspg})} 
    724 \label{DYN_spg} 
     724\label{sec:DYN_spg} 
    725725%-----------------------------------------nam_dynspg---------------------------------------------------- 
    726726\forfile{../namelists/namdyn_spg}  
     
    730730 
    731731Options are defined through the \ngn{namdyn\_spg} namelist variables. 
    732 The surface pressure gradient term is related to the representation of the free surface (\S\ref{PE_hor_pg}).  
     732The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}).  
    733733The main distinction is between the fixed volume case (linear free surface) and the variable volume case  
    734 (nonlinear free surface, \key{vvl} is defined). In the linear free surface case (\S\ref{PE_free_surface})  
     734(nonlinear free surface, \key{vvl} is defined). In the linear free surface case (\autoref{subsec:PE_free_surface})  
    735735the vertical scale factors $e_{3}$ are fixed in time, while they are time-dependent in the nonlinear case  
    736 (\S\ref{PE_free_surface}).  
     736(\autoref{subsec:PE_free_surface}).  
    737737With both linear and nonlinear free surface, external gravity waves are allowed in the equations,  
    738738which imposes a very small time step when an explicit time stepping is used.  
    739739Two methods are proposed to allow a longer time step for the three-dimensional equations:  
    740 the filtered free surface, which is a modification of the continuous equations (see \eqref{Eq_PE_flt}),  
     740the filtered free surface, which is a modification of the continuous equations (see \autoref{eq:PE_flt}),  
    741741and the split-explicit free surface described below.  
    742742The extra term introduced in the filtered method is calculated implicitly,  
     
    745745 
    746746The form of the surface pressure gradient term depends on how the user wants to handle  
    747 the fast external gravity waves that are a solution of the analytical equation (\S\ref{PE_hor_pg}).  
     747the fast external gravity waves that are a solution of the analytical equation (\autoref{sec:PE_hor_pg}).  
    748748Three formulations are available, all controlled by a CPP key (ln\_dynspg\_xxx): 
    749749an explicit formulation which requires a small time step ; 
     
    761761%-------------------------------------------------------------------------------------------------------------- 
    762762\subsection{Explicit free surface (\protect\key{dynspg\_exp})} 
    763 \label{DYN_spg_exp} 
     763\label{subsec:DYN_spg_exp} 
    764764 
    765765In the explicit free surface formulation (\key{dynspg\_exp} defined), the model time step  
     
    767767The surface pressure gradient, evaluated using a leap-frog scheme ($i.e.$ centered in time), 
    768768is thus simply given by : 
    769 \begin{equation} \label{Eq_dynspg_exp} 
     769\begin{equation} \label{eq:dynspg_exp} 
    770770\left\{ \begin{aligned} 
    771771 - \frac{1}{e_{1u}\,\rho_o} \;   \delta _{i+1/2} \left[  \,\rho \,\eta\,  \right]   \\ 
     
    782782%-------------------------------------------------------------------------------------------------------------- 
    783783\subsection{Split-explicit free surface (\protect\key{dynspg\_ts})} 
    784 \label{DYN_spg_ts} 
     784\label{subsec:DYN_spg_ts} 
    785785%------------------------------------------namsplit----------------------------------------------------------- 
    786786%\forfile{../namelists/namsplit} 
     
    792792equation and the associated barotropic velocity equations with a smaller time  
    793793step than $\rdt$, the time step used for the three dimensional prognostic  
    794 variables (Fig.~\ref{Fig_DYN_dynspg_ts}).  
     794variables (\autoref{fig:DYN_dynspg_ts}).  
    795795The size of the small time step, $\rdt_e$ (the external mode or barotropic time step) 
    796796 is provided through the \np{nn\_baro} namelist parameter as:  
     
    802802%%% 
    803803The barotropic mode solves the following equations: 
    804 \begin{subequations} \label{Eq_BT} 
    805   \begin{equation}     \label{Eq_BT_dyn} 
     804\begin{subequations} \label{eq:BT} 
     805  \begin{equation}     \label{eq:BT_dyn} 
    806806\frac{\partial {\rm \overline{{\bf U}}_h} }{\partial t}= 
    807807 -f\;{\rm {\bf k}}\times {\rm \overline{{\bf U}}_h}  
     
    809809  \end{equation} 
    810810 
    811   \begin{equation} \label{Eq_BT_ssh} 
     811  \begin{equation} \label{eq:BT_ssh} 
    812812\frac{\partial \eta }{\partial t}=-\nabla \cdot \left[ {\left( {H+\eta } \right) \; {\rm{\bf \overline{U}}}_h \,} \right]+P-E 
    813813  \end{equation} 
    814814\end{subequations} 
    815 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).  
     815where $\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).  
    816816 
    817817%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   > 
    818818\begin{figure}[!t]    \begin{center} 
    819819\includegraphics[width=0.7\textwidth]{Fig_DYN_dynspg_ts} 
    820 \caption{  \protect\label{Fig_DYN_dynspg_ts} 
     820\caption{  \protect\label{fig:DYN_dynspg_ts} 
    821821Schematic of the split-explicit time stepping scheme for the external  
    822822and internal modes. Time increases to the right. In this particular exemple,  
     
    827827The former are used to obtain time filtered quantities at $t+\rdt$ while the latter are used to obtain time averaged  
    828828transports to advect tracers. 
    829 a) Forward time integration: \np{ln\_bt\_fw}\forcode{ = .true.},  \np{ln\_bt\_av}\forcode{ = .true.}. 
    830 b) Centred time integration: \np{ln\_bt\_fw}\forcode{ = .false.}, \np{ln\_bt\_av}\forcode{ = .true.}. 
    831 c) Forward time integration with no time filtering (POM-like scheme): \np{ln\_bt\_fw}\forcode{ = .true.}, \np{ln\_bt\_av}\forcode{ = .false.}. } 
     829a) Forward time integration: \protect\np{ln\_bt\_fw}\forcode{ = .true.},  \protect\np{ln\_bt\_av}\forcode{ = .true.}. 
     830b) Centred time integration: \protect\np{ln\_bt\_fw}\forcode{ = .false.}, \protect\np{ln\_bt\_av}\forcode{ = .true.}. 
     831c) Forward time integration with no time filtering (POM-like scheme): \protect\np{ln\_bt\_fw}\forcode{ = .true.}, \protect\np{ln\_bt\_av}\forcode{ = .false.}. } 
    832832\end{center}    \end{figure} 
    833833%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   > 
    834834 
    835835In the default case (\np{ln\_bt\_fw}\forcode{ = .true.}), the external mode is integrated  
    836 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  
     836between \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  
    837837quantities (\np{ln\_bt\_av}\forcode{ = .true.}). In that case, the integration is extended slightly beyond  \textit{after} time step to provide time filtered quantities.  
    838838These are used for the subsequent initialization of the barotropic mode in the following baroclinic step.  
     
    850850at \textit{now} time step. This implies to change the traditional order of computations in \NEMO: most of momentum   
    851851trends (including the barotropic mode calculation) updated first, tracers' after. This \textit{de facto} makes semi-implicit hydrostatic  
    852 pressure gradient (see section \S\ref{DYN_hpg_imp}) and time splitting not compatible.  
     852pressure gradient (see section \autoref{subsec:DYN_hpg_imp}) and time splitting not compatible.  
    853853Advective barotropic velocities are obtained by using a secondary set of filtering weights, uniquely defined from the filter  
    854854coefficients 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. 
     
    872872scheme using the small barotropic time step $\rdt$. We have  
    873873 
    874 \begin{equation} \label{DYN_spg_ts_eta} 
     874\begin{equation} \label{eq:DYN_spg_ts_eta} 
    875875\eta^{(b)}(\tau,t_{n+1}) - \eta^{(b)}(\tau,t_{n+1}) (\tau,t_{n-1}) 
    876876   = 2 \rdt \left[-\nabla \cdot \textbf{U}^{(b)}(\tau,t_n) + \text{EMP}_w(\tau) \right]  
    877877\end{equation} 
    878 \begin{multline} \label{DYN_spg_ts_u} 
     878\begin{multline} \label{eq:DYN_spg_ts_u} 
    879879\textbf{U}^{(b)}(\tau,t_{n+1}) - \textbf{U}^{(b)}(\tau,t_{n-1})  \\ 
    880880   = 2\rdt \left[ - f \textbf{k} \times \textbf{U}^{(b)}(\tau,t_{n})  
     
    886886and $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  
    887887that sets the barotropic time steps via  
    888 \begin{equation} \label{DYN_spg_ts_t} 
     888\begin{equation} \label{eq:DYN_spg_ts_t} 
    889889t_n=\tau+n\rdt    
    890890\end{equation} 
    891891with $n$ an integer. The density scaled surface pressure is evaluated via  
    892 \begin{equation} \label{DYN_spg_ts_ps} 
     892\begin{equation} \label{eq:DYN_spg_ts_ps} 
    893893p_s^{(b)}(\tau,t_{n}) = \begin{cases} 
    894894   g \;\eta_s^{(b)}(\tau,t_{n}) \;\rho(\tau)_{k=1}) / \rho_o  &      \text{non-linear case} \\ 
     
    897897\end{equation} 
    898898To get started, we assume the following initial conditions  
    899 \begin{equation} \label{DYN_spg_ts_eta} 
     899\begin{equation} \label{eq:DYN_spg_ts_eta} 
    900900\begin{split} 
    901901\eta^{(b)}(\tau,t_{n=0}) &= \overline{\eta^{(b)}(\tau)} 
     
    905905\end{equation} 
    906906with  
    907 \begin{equation} \label{DYN_spg_ts_etaF} 
     907\begin{equation} \label{eq:DYN_spg_ts_etaF} 
    908908 \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\rdt,t_{n}) 
    909909\end{equation} 
    910910the time averaged surface height taken from the previous barotropic cycle. Likewise,  
    911 \begin{equation} \label{DYN_spg_ts_u} 
     911\begin{equation} \label{eq:DYN_spg_ts_u} 
    912912\textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)}   \\ 
    913913\\ 
     
    915915\end{equation} 
    916916with  
    917 \begin{equation} \label{DYN_spg_ts_u} 
     917\begin{equation} \label{eq:DYN_spg_ts_u} 
    918918 \overline{\textbf{U}^{(b)}(\tau)}  
    919919   = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau-\rdt,t_{n}) 
     
    922922 
    923923Upon 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$  
    924 \begin{equation} \label{DYN_spg_ts_u} 
     924\begin{equation} \label{eq:DYN_spg_ts_u} 
    925925\textbf{U}(\tau+\rdt) = \overline{\textbf{U}^{(b)}(\tau+\rdt)}  
    926926   = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau,t_{n}) 
     
    928928The surface height on the new baroclinic time step is then determined via a baroclinic leap-frog using the following form  
    929929 
    930 \begin{equation} \label{DYN_spg_ts_ssh} 
     930\begin{equation} \label{eq:DYN_spg_ts_ssh} 
    931931\eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\rdt \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right]   
    932932\end{equation} 
     
    935935  
    936936In general, some form of time filter is needed to maintain integrity of the surface  
    937 height field due to the leap-frog splitting mode in equation \ref{DYN_spg_ts_ssh}. We  
     937height field due to the leap-frog splitting mode in equation \autoref{eq:DYN_spg_ts_ssh}. We  
    938938have tried various forms of such filtering, with the following method discussed in  
    939939\cite{Griffies_al_MWR01} chosen due to its stability and reasonably good maintenance of  
    940 tracer conservation properties (see Section ??)  
    941  
    942 \begin{equation} \label{DYN_spg_ts_sshf} 
     940tracer conservation properties (see ??)  
     941 
     942\begin{equation} \label{eq:DYN_spg_ts_sshf} 
    943943\eta^{F}(\tau-\Delta) =  \overline{\eta^{(b)}(\tau)}  
    944944\end{equation} 
    945945Another approach tried was  
    946946 
    947 \begin{equation} \label{DYN_spg_ts_sshf2} 
     947\begin{equation} \label{eq:DYN_spg_ts_sshf2} 
    948948\eta^{F}(\tau-\Delta) = \eta(\tau)  
    949949   + (\alpha/2) \left[\overline{\eta^{(b)}}(\tau+\rdt) 
     
    953953which is useful since it isolates all the time filtering aspects into the term multiplied  
    954954by $\alpha$. This isolation allows for an easy check that tracer conservation is exact when  
    955 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.  
     955eliminating 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.  
    956956 
    957957}            %%end gm comment (copy of griffies book) 
     
    964964%-------------------------------------------------------------------------------------------------------------- 
    965965\subsection{Filtered free surface (\protect\key{dynspg\_flt})} 
    966 \label{DYN_spg_fltp} 
     966\label{subsec:DYN_spg_fltp} 
    967967 
    968968The filtered formulation follows the \citet{Roullet_Madec_JGR00} implementation.  
    969 The extra term introduced in the equations (see \S\ref{PE_free_surface}) is solved implicitly.  
    970 The elliptic solvers available in the code are documented in \S\ref{MISC}. 
     969The extra term introduced in the equations (see \autoref{subsec:PE_free_surface}) is solved implicitly.  
     970The elliptic solvers available in the code are documented in \autoref{chap:MISC}. 
    971971 
    972972%% gm %%======>>>>   given here the discrete eqs provided to the solver 
    973973\gmcomment{               %%% copy from chap-model basics  
    974 \begin{equation} \label{Eq_spg_flt} 
     974\begin{equation} \label{eq:spg_flt} 
    975975\frac{\partial {\rm {\bf U}}_h }{\partial t}= {\rm {\bf M}} 
    976976- g \nabla \left( \tilde{\rho} \ \eta \right)  
     
    980980$\widetilde{\rho} = \rho / \rho_o$ is the dimensionless density, and $\rm {\bf M}$  
    981981represents the collected contributions of the Coriolis, hydrostatic pressure gradient,  
    982 non-linear and viscous terms in \eqref{Eq_PE_dyn}. 
     982non-linear and viscous terms in \autoref{eq:PE_dyn}. 
    983983}   %end gmcomment 
    984984 
     
    990990% ================================================================ 
    991991\section{Lateral diffusion term and operators (\protect\mdl{dynldf})} 
    992 \label{DYN_ldf} 
     992\label{sec:DYN_ldf} 
    993993%------------------------------------------nam_dynldf---------------------------------------------------- 
    994994\forfile{../namelists/namdyn_ldf}  
     
    999999(rotated or not) or biharmonic operators. The coefficients may be constant  
    10001000or spatially variable; the description of the coefficients is found in the chapter  
    1001 on lateral physics (Chap.\ref{LDF}). The lateral diffusion of momentum is  
     1001on lateral physics (\autoref{chap:LDF}). The lateral diffusion of momentum is  
    10021002evaluated using a forward scheme, $i.e.$ the velocity appearing in its expression  
    10031003is the \textit{before} velocity in time, except for the pure vertical component  
    10041004that appears when a tensor of rotation is used. This latter term is solved  
    1005 implicitly together with the vertical diffusion term (see \S\ref{STP})  
     1005implicitly together with the vertical diffusion term (see \autoref{chap:STP})  
    10061006 
    10071007At the lateral boundaries either free slip, no slip or partial slip boundary  
    1008 conditions are applied according to the user's choice (see Chap.\ref{LBC}). 
     1008conditions are applied according to the user's choice (see \autoref{chap:LBC}). 
    10091009 
    10101010\gmcomment{ 
     
    10251025\subsection[Iso-level laplacian (\protect\np{ln\_dynldf\_lap}\forcode{ = .true.})] 
    10261026            {Iso-level laplacian operator (\protect\np{ln\_dynldf\_lap}\forcode{ = .true.})} 
    1027 \label{DYN_ldf_lap} 
     1027\label{subsec:DYN_ldf_lap} 
    10281028 
    10291029For lateral iso-level diffusion, the discrete operator is:  
    1030 \begin{equation} \label{Eq_dynldf_lap} 
     1030\begin{equation} \label{eq:dynldf_lap} 
    10311031\left\{ \begin{aligned} 
    10321032 D_u^{l{\rm {\bf U}}} =\frac{1}{e_{1u} }\delta _{i+1/2} \left[ {A_T^{lm}  
     
    10401040\end{equation}  
    10411041 
    1042 As explained in \S\ref{PE_ldf}, this formulation (as the gradient of a divergence  
     1042As explained in \autoref{subsec:PE_ldf}, this formulation (as the gradient of a divergence  
    10431043and curl of the vorticity) preserves symmetry and ensures a complete  
    10441044separation between the vorticity and divergence parts of the momentum diffusion.  
     
    10491049\subsection[Rotated laplacian (\protect\np{ln\_dynldf\_iso}\forcode{ = .true.})] 
    10501050            {Rotated laplacian operator (\protect\np{ln\_dynldf\_iso}\forcode{ = .true.})} 
    1051 \label{DYN_ldf_iso} 
     1051\label{subsec:DYN_ldf_iso} 
    10521052 
    10531053A rotation of the lateral momentum diffusion operator is needed in several cases:  
     
    10611061constraints on the stress tensor such as symmetry. The resulting discrete  
    10621062representation is: 
    1063 \begin{equation} \label{Eq_dyn_ldf_iso} 
     1063\begin{equation} \label{eq:dyn_ldf_iso} 
    10641064\begin{split} 
    10651065 D_u^{l\textbf{U}} &= \frac{1}{e_{1u} \, e_{2u} \, e_{3u} } \\ 
     
    11111111diffusion operator acts and the surface of computation ($z$- or $s$-surfaces).  
    11121112The way these slopes are evaluated is given in the lateral physics chapter  
    1113 (Chap.\ref{LDF}). 
     1113(\autoref{chap:LDF}). 
    11141114 
    11151115%-------------------------------------------------------------------------------------------------------------- 
     
    11181118\subsection[Iso-level bilaplacian (\protect\np{ln\_dynldf\_bilap}\forcode{ = .true.})] 
    11191119            {Iso-level bilaplacian operator (\protect\np{ln\_dynldf\_bilap}\forcode{ = .true.})} 
    1120 \label{DYN_ldf_bilap} 
     1120\label{subsec:DYN_ldf_bilap} 
    11211121 
    11221122The lateral fourth order operator formulation on momentum is obtained by  
    1123 applying \eqref{Eq_dynldf_lap} twice. It requires an additional assumption on  
     1123applying \autoref{eq:dynldf_lap} twice. It requires an additional assumption on  
    11241124boundary conditions: the first derivative term normal to the coast depends on  
    11251125the free or no-slip lateral boundary conditions chosen, while the third  
    1126 derivative terms normal to the coast are set to zero (see Chap.\ref{LBC}). 
     1126derivative terms normal to the coast are set to zero (see \autoref{chap:LBC}). 
    11271127%%% 
    11281128\gmcomment{add a remark on the the change in the position of the coefficient} 
     
    11331133% ================================================================ 
    11341134\section{Vertical diffusion term (\protect\mdl{dynzdf})} 
    1135 \label{DYN_zdf} 
     1135\label{sec:DYN_zdf} 
    11361136%----------------------------------------------namzdf------------------------------------------------------ 
    11371137\forfile{../namelists/namzdf}  
     
    11451145scheme (\np{ln\_zdfexp}\forcode{ = .true.}) using a time splitting technique  
    11461146(\np{nn\_zdfexp} $>$ 1) or $(b)$ a backward (or implicit) time differencing scheme  
    1147 (\np{ln\_zdfexp}\forcode{ = .false.}) (see \S\ref{STP}). Note that namelist variables  
     1147(\np{ln\_zdfexp}\forcode{ = .false.}) (see \autoref{chap:STP}). Note that namelist variables  
    11481148\np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics.  
    11491149 
    11501150The formulation of the vertical subgrid scale physics is the same whatever  
    11511151the vertical coordinate is. The vertical diffusion operators given by  
    1152 \eqref{Eq_PE_zdf} take the following semi-discrete space form: 
    1153 \begin{equation} \label{Eq_dynzdf} 
     1152\autoref{eq:PE_zdf} take the following semi-discrete space form: 
     1153\begin{equation} \label{eq:dynzdf} 
    11541154\left\{   \begin{aligned} 
    11551155D_u^{vm} &\equiv \frac{1}{e_{3u}} \ \delta _k \left[ \frac{A_{uw}^{vm} }{e_{3uw} } 
     
    11621162where $A_{uw}^{vm} $ and $A_{vw}^{vm} $ are the vertical eddy viscosity and  
    11631163diffusivity coefficients. The way these coefficients are evaluated  
    1164 depends on the vertical physics used (see \S\ref{ZDF}). 
     1164depends on the vertical physics used (see \autoref{chap:ZDF}). 
    11651165 
    11661166The surface boundary condition on momentum is the stress exerted by  
    11671167the wind. At the surface, the momentum fluxes are prescribed as the boundary  
    11681168condition on the vertical turbulent momentum fluxes, 
    1169 \begin{equation} \label{Eq_dynzdf_sbc} 
     1169\begin{equation} \label{eq:dynzdf_sbc} 
    11701170\left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{z=1} 
    11711171    = \frac{1}{\rho _o} \binom{\tau _u}{\tau _v } 
     
    11771177is small (when no mixed layer scheme is used) the surface stress enters only  
    11781178the top model level, as a body force. The surface wind stress is calculated  
    1179 in the surface module routines (SBC, see Chap.\ref{SBC}) 
     1179in the surface module routines (SBC, see \autoref{chap:SBC}) 
    11801180 
    11811181The turbulent flux of momentum at the bottom of the ocean is specified through  
    1182 a bottom friction parameterisation (see \S\ref{ZDF_bfr}) 
     1182a bottom friction parameterisation (see \autoref{sec:ZDF_bfr}) 
    11831183 
    11841184% ================================================================ 
     
    11861186% ================================================================ 
    11871187\section{External forcings} 
    1188 \label{DYN_forcing} 
     1188\label{sec:DYN_forcing} 
    11891189 
    11901190Besides the surface and bottom stresses (see the above section) which are  
     
    11921192may enter the dynamical equations by affecting the surface pressure gradient.  
    11931193 
    1194 (1) When \np{ln\_apr\_dyn}\forcode{ = .true.} (see \S\ref{SBC_apr}), the atmospheric pressure is taken  
     1194(1) When \np{ln\_apr\_dyn}\forcode{ = .true.} (see \autoref{sec:SBC_apr}), the atmospheric pressure is taken  
    11951195into account when computing the surface pressure gradient. 
    11961196 
    1197 (2) When \np{ln\_tide\_pot}\forcode{ = .true.} and \np{ln\_tide}\forcode{ = .true.} (see \S\ref{SBC_tide}),  
     1197(2) When \np{ln\_tide\_pot}\forcode{ = .true.} and \np{ln\_tide}\forcode{ = .true.} (see \autoref{sec:SBC_tide}),  
    11981198the tidal potential is taken into account when computing the surface pressure gradient. 
    11991199 
     
    12091209% ================================================================ 
    12101210\section{Time evolution term (\protect\mdl{dynnxt})} 
    1211 \label{DYN_nxt} 
     1211\label{sec:DYN_nxt} 
    12121212 
    12131213%----------------------------------------------namdom---------------------------------------------------- 
     
    12181218The general framework for dynamics time stepping is a leap-frog scheme,  
    12191219$i.e.$ a three level centred time scheme associated with an Asselin time filter  
    1220 (cf. Chap.\ref{STP}). The scheme is applied to the velocity, except when using  
    1221 the flux form of momentum advection (cf. \S\ref{DYN_adv_cor_flux}) in the variable  
     1220(cf. \autoref{chap:STP}). The scheme is applied to the velocity, except when using  
     1221the flux form of momentum advection (cf. \autoref{sec:DYN_adv_cor_flux}) in the variable  
    12221222volume case (\key{vvl} defined), where it has to be applied to the thickness  
    1223 weighted velocity (see \S\ref{Apdx_A_momentum})   
     1223weighted velocity (see \autoref{sec:A_momentum})   
    12241224 
    12251225$\bullet$ vector invariant form or linear free surface (\np{ln\_dynhpg\_vec}\forcode{ = .true.} ; \key{vvl} not defined): 
    1226 \begin{equation} \label{Eq_dynnxt_vec} 
     1226\begin{equation} \label{eq:dynnxt_vec} 
    12271227\left\{   \begin{aligned} 
    12281228&u^{t+\rdt} = u_f^{t-\rdt} + 2\rdt  \ \text{RHS}_u^t     \\ 
     
    12321232 
    12331233$\bullet$ flux form and nonlinear free surface (\np{ln\_dynhpg\_vec}\forcode{ = .false.} ; \key{vvl} defined): 
    1234 \begin{equation} \label{Eq_dynnxt_flux} 
     1234\begin{equation} \label{eq:dynnxt_flux} 
    12351235\left\{   \begin{aligned} 
    12361236&\left(e_{3u}\,u\right)^{t+\rdt} = \left(e_{3u}\,u\right)_f^{t-\rdt} + 2\rdt \; e_{3u} \;\text{RHS}_u^t     \\ 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_LBC.tex

    r9393 r9407  
    55% ================================================================ 
    66\chapter{Lateral Boundary Condition (LBC)} 
    7 \label{LBC} 
     7\label{chap:LBC} 
    88\minitoc 
    99 
     
    1818% ================================================================ 
    1919\section{Boundary condition at the coast (\protect\np{rn\_shlat})} 
    20 \label{LBC_coast} 
     20\label{sec:LBC_coast} 
    2121%--------------------------------------------nam_lbc------------------------------------------------------- 
    2222\forfile{../namelists/namlbc}  
    2323%-------------------------------------------------------------------------------------------------------------- 
    2424 
    25 %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}).  
    26  
    27 %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}. 
     25%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}).  
     26 
     27%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}. 
    2828 
    2929Options are defined through the \ngn{namlbc} namelist variables. 
     
    4444at $u$-points. Evaluating this quantity as, 
    4545 
    46 \begin{equation} \label{Eq_lbc_aaaa} 
     46\begin{equation} \label{eq:lbc_aaaa} 
    4747\frac{A^{lT} }{e_1 }\frac{\partial T}{\partial i}\equiv \frac{A_u^{lT}  
    4848}{e_{1u} } \; \delta _{i+1 / 2} \left[ T \right]\;\;mask_u  
     
    5151zero inside land and at the boundaries, since mask$_{u}$ is zero at solid boundaries  
    5252which in this case are defined at $u$-points (normal velocity $u$ remains zero at  
    53 the coast) (Fig.~\ref{Fig_LBC_uv}).  
     53the coast) (\autoref{fig:LBC_uv}).  
    5454 
    5555%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    5656\begin{figure}[!t]     \begin{center} 
    5757\includegraphics[width=0.90\textwidth]{Fig_LBC_uv} 
    58 \caption{  \protect\label{Fig_LBC_uv} 
     58\caption{  \protect\label{fig:LBC_uv} 
    5959Lateral boundary (thick line) at T-level. The velocity normal to the boundary is set to zero.} 
    6060\end{center}   \end{figure} 
     
    6666For example, at a given $T$-level, the lateral boundary (a coastline or an intersection  
    6767with the bottom topography) is made of segments joining $f$-points, and normal  
    68 velocity points are located between two $f-$points (Fig.~\ref{Fig_LBC_uv}).  
     68velocity points are located between two $f-$points (\autoref{fig:LBC_uv}).  
    6969The boundary condition on the normal velocity (no flux through solid boundaries)  
    7070can thus be easily implemented using the mask system. The boundary condition  
     
    7979\begin{figure}[!p] \begin{center} 
    8080\includegraphics[width=0.90\textwidth]{Fig_LBC_shlat} 
    81 \caption{     \protect\label{Fig_LBC_shlat}  
     81\caption{     \protect\label{fig:LBC_shlat}  
    8282lateral boundary condition (a) free-slip ($rn\_shlat=0$) ; (b) no-slip ($rn\_shlat=2$)  
    8383; (c) "partial" free-slip ($0<rn\_shlat<2$) and (d) "strong" no-slip ($2<rn\_shlat$).  
     
    9191coastline is equal to the offshore velocity, $i.e.$ the normal derivative of the  
    9292tangential velocity is zero at the coast, so the vorticity: mask$_{f}$ array is set  
    93 to zero inside the land and just at the coast (Fig.~\ref{Fig_LBC_shlat}-a). 
     93to zero inside the land and just at the coast (\autoref{fig:LBC_shlat}-a). 
    9494 
    9595\item[no-slip boundary condition (\np{rn\_shlat}\forcode{ = 2}): ] the tangential velocity vanishes  
     
    9898evaluated as if the velocities at the closest land velocity gridpoint and the closest  
    9999ocean velocity gridpoint were of the same magnitude but in the opposite direction  
    100 (Fig.~\ref{Fig_LBC_shlat}-b). Therefore, the vorticity along the coastlines is given by:  
     100(\autoref{fig:LBC_shlat}-b). Therefore, the vorticity along the coastlines is given by:  
    101101 
    102102\begin{equation*} 
     
    106106the coastline provides a vorticity field computed with the no-slip boundary condition,  
    107107simply by multiplying it by the mask$_{f}$ : 
    108 \begin{equation} \label{Eq_lbc_bbbb} 
     108\begin{equation} \label{eq:lbc_bbbb} 
    109109\zeta \equiv \frac{1}{e_{1f} {\kern 1pt}e_{2f} }\left( {\delta _{i+1/2}  
    110110\left[ {e_{2v} \,v} \right]-\delta _{j+1/2} \left[ {e_{1u} \,u} \right]}  
     
    115115velocity at the coastline is smaller than the offshore velocity, $i.e.$ there is a lateral  
    116116friction but not strong enough to make the tangential velocity at the coast vanish  
    117 (Fig.~\ref{Fig_LBC_shlat}-c). This can be selected by providing a value of mask$_{f}$  
     117(\autoref{fig:LBC_shlat}-c). This can be selected by providing a value of mask$_{f}$  
    118118strictly inbetween $0$ and $2$. 
    119119 
    120120\item["strong" no-slip boundary condition (2$<$\np{rn\_shlat}): ] the viscous boundary  
    121 layer is assumed to be smaller than half the grid size (Fig.~\ref{Fig_LBC_shlat}-d).  
     121layer is assumed to be smaller than half the grid size (\autoref{fig:LBC_shlat}-d).  
    122122The friction is thus larger than in the no-slip case. 
    123123 
     
    134134% ================================================================ 
    135135\section{Model domain boundary condition (\protect\np{jperio})} 
    136 \label{LBC_jperio} 
     136\label{sec:LBC_jperio} 
    137137 
    138138At the model domain boundaries several choices are offered: closed, cyclic east-west,  
     
    144144% ------------------------------------------------------------------------------------------------------------- 
    145145\subsection{Closed, cyclic, south symmetric (\protect\np{jperio}\forcode{= 0..2})} 
    146 \label{LBC_jperio012} 
     146\label{subsec:LBC_jperio012} 
    147147 
    148148The choice of closed, cyclic or symmetric model domain boundary condition is made  
     
    160160\item[For cyclic east-west boundary (\np{jperio}\forcode{ = 1})], first and last rows are set  
    161161to zero (closed) whilst the first column is set to the value of the last-but-one column  
    162 and the last column to the value of the second one (Fig.~\ref{Fig_LBC_jperio}-a).  
     162and the last column to the value of the second one (\autoref{fig:LBC_jperio}-a).  
    163163Whatever flows out of the eastern (western) end of the basin enters the western  
    164164(eastern) end. Note that there is no option for north-south cyclic or for doubly  
     
    171171to the value of the third row while for most of $v$- and $f$-point arrays ($v$, $\zeta$,  
    172172$j\psi$, but \gmcomment{not sure why this is "but"} scalar arrays such as eddy coefficients)  
    173 the first row is set to minus the value of the second row (Fig.~\ref{Fig_LBC_jperio}-b).  
     173the first row is set to minus the value of the second row (\autoref{fig:LBC_jperio}-b).  
    174174Note that this boundary condition is not yet available for the case of a massively  
    175175parallel computer (\textbf{key{\_}mpp} defined). 
     
    180180\begin{figure}[!t]     \begin{center} 
    181181\includegraphics[width=1.0\textwidth]{Fig_LBC_jperio} 
    182 \caption{    \protect\label{Fig_LBC_jperio} 
     182\caption{    \protect\label{fig:LBC_jperio} 
    183183setting of (a) east-west cyclic  (b) symmetric across the equator boundary conditions.} 
    184184\end{center}   \end{figure} 
     
    189189% ------------------------------------------------------------------------------------------------------------- 
    190190\subsection{North-fold (\protect\np{jperio}\forcode{ = 3..6})} 
    191 \label{LBC_north_fold} 
     191\label{subsec:LBC_north_fold} 
    192192 
    193193The north fold boundary condition has been introduced in order to handle the north  
    194194boundary of a three-polar ORCA grid. Such a grid has two poles in the northern hemisphere  
    195 (Fig.\ref{Fig_MISC_ORCA_msh}, and thus requires a specific treatment illustrated in Fig.\ref{Fig_North_Fold_T}.  
     195(\autoref{fig:MISC_ORCA_msh}, and thus requires a specific treatment illustrated in \autoref{fig:North_Fold_T}.  
    196196Further information can be found in \mdl{lbcnfd} module which applies the north fold boundary condition. 
    197197 
     
    199199\begin{figure}[!t]    \begin{center} 
    200200\includegraphics[width=0.90\textwidth]{Fig_North_Fold_T} 
    201 \caption{    \protect\label{Fig_North_Fold_T}  
     201\caption{    \protect\label{fig:North_Fold_T}  
    202202North fold boundary with a $T$-point pivot and cyclic east-west boundary condition  
    203203($jperio=4$), as used in ORCA 2, 1/4, and 1/12. Pink shaded area corresponds  
     
    210210% ==================================================================== 
    211211\section{Exchange with neighbouring processors (\protect\mdl{lbclnk}, \protect\mdl{lib\_mpp})} 
    212 \label{LBC_mpp} 
     212\label{sec:LBC_mpp} 
    213213 
    214214For massively parallel processing (mpp), a domain decomposition method is used.  
     
    261261\begin{figure}[!t]    \begin{center} 
    262262\includegraphics[width=0.90\textwidth]{Fig_mpp} 
    263 \caption{   \protect\label{Fig_mpp}  
     263\caption{   \protect\label{fig:mpp}  
    264264Positioning of a sub-domain when massively parallel processing is used. } 
    265265\end{center}   \end{figure} 
     
    279279\begin{eqnarray}  
    280280      jpi & = & ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci  \nonumber \\ 
    281       jpj & = & ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj  \label{Eq_lbc_jpi} 
     281      jpj & = & ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj  \label{eq:lbc_jpi} 
    282282\end{eqnarray} 
    283283where \jp{jpni}, \jp{jpnj} are the number of processors following the i- and j-axis. 
     
    287287An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$,  
    288288a global array (whole domain) by the relationship:  
    289 \begin{equation} \label{Eq_lbc_nimpp} 
     289\begin{equation} \label{eq:lbc_nimpp} 
    290290T_{g} (i+nimpp-1,j+njmpp-1,k) = T_{l} (i,j,k), 
    291291\end{equation} 
     
    315315global ocean where more than 50 \% of points are land points. For this reason, a  
    316316pre-processing tool can be used to choose the mpp domain decomposition with a  
    317 maximum number of only land points processors, which can then be eliminated (Fig. \ref{Fig_mppini2}) 
     317maximum number of only land points processors, which can then be eliminated (\autoref{fig:mppini2}) 
    318318(For example, the mpp\_optimiz tools, available from the DRAKKAR web site).  
    319319This optimisation is dependent on the specific bathymetry employed. The user  
     
    335335\begin{figure}[!ht]     \begin{center} 
    336336\includegraphics[width=0.90\textwidth]{Fig_mppini2} 
    337 \caption {    \protect\label{Fig_mppini2} 
     337\caption {    \protect\label{fig:mppini2} 
    338338Example of Atlantic domain defined for the CLIPPER projet. Initial grid is  
    339339composed of 773 x 1236 horizontal points.  
     
    350350% ==================================================================== 
    351351\section{Unstructured open boundary conditions (BDY)} 
    352 \label{LBC_bdy} 
     352\label{sec:LBC_bdy} 
    353353 
    354354%-----------------------------------------nambdy-------------------------------------------- 
     
    384384%---------------------------------------------- 
    385385\subsection{Namelists} 
    386 \label{BDY_namelist} 
     386\label{subsec:BDY_namelist} 
    387387 
    388388The BDY module is activated by setting \np{ln\_bdy} to true. 
     
    400400a file and the second is defined in a namelist. For more details of 
    401401the definition of the boundary geometry see section 
    402 \ref{BDY_geometry}. 
     402\autoref{subsec:BDY_geometry}. 
    403403 
    404404For each boundary set a boundary 
     
    457457%---------------------------------------------- 
    458458\subsection{Flow relaxation scheme} 
    459 \label{BDY_FRS_scheme} 
     459\label{subsec:BDY_FRS_scheme} 
    460460 
    461461The Flow Relaxation Scheme (FRS) \citep{Davies_QJRMS76,Engerdahl_Tel95}, 
     
    463463externally-specified values over a zone next to the edge of the model 
    464464domain. Given a model prognostic variable $\Phi$  
    465 \begin{equation}  \label{Eq_bdy_frs1} 
     465\begin{equation}  \label{eq:bdy_frs1} 
    466466\Phi(d) = \alpha(d)\Phi_{e}(d) + (1-\alpha(d))\Phi_{m}(d)\;\;\;\;\; d=1,N 
    467467\end{equation} 
     
    472472to adding a relaxation term to the prognostic equation for $\Phi$ of 
    473473the form: 
    474 \begin{equation}  \label{Eq_bdy_frs2} 
     474\begin{equation}  \label{eq:bdy_frs2} 
    475475-\frac{1}{\tau}\left(\Phi - \Phi_{e}\right) 
    476476\end{equation} 
    477477where the relaxation time scale $\tau$ is given by a function of 
    478478$\alpha$ and the model time step $\Delta t$: 
    479 \begin{equation}  \label{Eq_bdy_frs3} 
     479\begin{equation}  \label{eq:bdy_frs3} 
    480480\tau = \frac{1-\alpha}{\alpha}  \,\rdt 
    481481\end{equation} 
     
    487487 
    488488The function $\alpha$ is specified as a $tanh$ function: 
    489 \begin{equation}  \label{Eq_bdy_frs4} 
     489\begin{equation}  \label{eq:bdy_frs4} 
    490490\alpha(d) = 1 - \tanh\left(\frac{d-1}{2}\right),       \quad d=1,N 
    491491\end{equation} 
     
    495495%---------------------------------------------- 
    496496\subsection{Flather radiation scheme} 
    497 \label{BDY_flather_scheme} 
     497\label{subsec:BDY_flather_scheme} 
    498498 
    499499The \citet{Flather_JPO94} scheme is a radiation condition on the normal, depth-mean 
    500500transport across the open boundary. It takes the form 
    501 \begin{equation}  \label{Eq_bdy_fla1} 
     501\begin{equation}  \label{eq:bdy_fla1} 
    502502U = U_{e} + \frac{c}{h}\left(\eta - \eta_{e}\right), 
    503503\end{equation} 
     
    510510external depth-mean normal velocity, plus a correction term that 
    511511allows gravity waves generated internally to exit the model boundary. 
    512 Note that the sea-surface height gradient in \eqref{Eq_bdy_fla1} 
     512Note that the sea-surface height gradient in \autoref{eq:bdy_fla1} 
    513513is a spatial gradient across the model boundary, so that $\eta_{e}$ is 
    514514defined on the $T$ points with $nbr=1$ and $\eta$ is defined on the 
     
    518518%---------------------------------------------- 
    519519\subsection{Boundary geometry} 
    520 \label{BDY_geometry} 
     520\label{subsec:BDY_geometry} 
    521521 
    522522Each open boundary set is defined as a list of points. The information 
     
    529529further away from the edge of the model domain. A set of $nbi$, $nbj$, 
    530530and $nbr$ arrays is defined for each of the $T$, $U$ and $V$ 
    531 grids. Figure \ref{Fig_LBC_bdy_geom} shows an example of an irregular 
     531grids. Figure \autoref{fig:LBC_bdy_geom} shows an example of an irregular 
    532532boundary.  
    533533 
     
    545545 
    546546The boundary geometry may also be defined from a 
    547 ``\ifile{coordinates.bdy}'' file. Figure \ref{Fig_LBC_nc_header} 
     547``\ifile{coordinates.bdy}'' file. Figure \autoref{fig:LBC_nc_header} 
    548548gives an example of the header information from such a file. The file 
    549549should contain the index arrays for each of the $T$, $U$ and $V$ 
     
    566566\begin{figure}[!t]      \begin{center} 
    567567\includegraphics[width=1.0\textwidth]{Fig_LBC_bdy_geom} 
    568 \caption {      \protect\label{Fig_LBC_bdy_geom} 
     568\caption {      \protect\label{fig:LBC_bdy_geom} 
    569569Example of geometry of unstructured open boundary} 
    570570\end{center}   \end{figure} 
     
    573573%---------------------------------------------- 
    574574\subsection{Input boundary data files} 
    575 \label{BDY_data} 
     575\label{subsec:BDY_data} 
    576576 
    577577The data files contain the data arrays 
     
    607607\begin{figure}[!t]     \begin{center} 
    608608\includegraphics[width=1.0\textwidth]{Fig_LBC_nc_header} 
    609 \caption {     \protect\label{Fig_LBC_nc_header}  
    610 Example of the header for a \ifile{coordinates.bdy} file} 
     609\caption {     \protect\label{fig:LBC_nc_header}  
     610Example of the header for a \protect\ifile{coordinates.bdy} file} 
    611611\end{center}   \end{figure} 
    612612%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    614614%---------------------------------------------- 
    615615\subsection{Volume correction} 
    616 \label{BDY_vol_corr} 
     616\label{subsec:BDY_vol_corr} 
    617617 
    618618There is an option to force the total volume in the regional model to be constant,  
     
    631631%---------------------------------------------- 
    632632\subsection{Tidal harmonic forcing} 
    633 \label{BDY_tides} 
     633\label{subsec:BDY_tides} 
    634634 
    635635%-----------------------------------------nambdy_tide-------------------------------------------- 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_LDF.tex

    r9394 r9407  
    66% ================================================================ 
    77\chapter{Lateral Ocean Physics (LDF)} 
    8 \label{LDF} 
     8\label{chap:LDF} 
    99\minitoc 
    1010 
     
    1515 
    1616The lateral physics terms in the momentum and tracer equations have been  
    17 described in \S\ref{PE_zdf} and their discrete formulation in \S\ref{TRA_ldf}  
    18 and \S\ref{DYN_ldf}). In this section we further discuss each lateral physics option.  
     17described in \autoref{eq:PE_zdf} and their discrete formulation in \autoref{sec:TRA_ldf}  
     18and \autoref{sec:DYN_ldf}). In this section we further discuss each lateral physics option.  
    1919Choosing one lateral physics scheme means for the user defining,  
    2020(1) the type of operator used (laplacian or bilaplacian operators, or no lateral mixing term) ;  
     
    2525Note that this chapter describes the standard implementation of iso-neutral 
    2626tracer mixing, and Griffies's implementation, which is used if 
    27 \np{traldf\_grif}\forcode{ = .true.}, is described in Appdx\ref{sec:triad} 
     27\np{traldf\_grif}\forcode{ = .true.}, is described in Appdx\autoref{apdx:triad} 
    2828 
    2929%-----------------------------------nam_traldf - nam_dynldf-------------------------------------------- 
     
    3737% ================================================================ 
    3838\section{Direction of lateral mixing (\protect\mdl{ldfslp})} 
    39 \label{LDF_slp} 
     39\label{sec:LDF_slp} 
    4040 
    4141%%% 
     
    5050slopes in the \textbf{i}- and \textbf{j}-directions at the face of the cell of the  
    5151quantity to be diffused. For a tracer, this leads to the following four slopes :  
    52 $r_{1u}$, $r_{1w}$, $r_{2v}$, $r_{2w}$ (see \eqref{Eq_tra_ldf_iso}), while  
     52$r_{1u}$, $r_{1w}$, $r_{2v}$, $r_{2w}$ (see \autoref{eq:tra_ldf_iso}), while  
    5353for momentum the slopes are  $r_{1t}$, $r_{1uw}$, $r_{2f}$, $r_{2uw}$ for  
    5454$u$ and  $r_{1f}$, $r_{1vw}$, $r_{2t}$, $r_{2vw}$ for $v$.  
     
    6060In $s$-coordinates, geopotential mixing ($i.e.$ horizontal mixing) $r_1$ and  
    6161$r_2$ are the slopes between the geopotential and computational surfaces.  
    62 Their discrete formulation is found by locally solving \eqref{Eq_tra_ldf_iso}  
     62Their discrete formulation is found by locally solving \autoref{eq:tra_ldf_iso}  
    6363when the diffusive fluxes in the three directions are set to zero and $T$ is  
    6464assumed to be horizontally uniform, $i.e.$ a linear function of $z_T$, the  
     
    6666%gm { Steven : My version is obviously wrong since I'm left with an arbitrary constant which is the local vertical temperature gradient} 
    6767 
    68 \begin{equation} \label{Eq_ldfslp_geo} 
     68\begin{equation} \label{eq:ldfslp_geo} 
    6969\begin{aligned} 
    7070 r_{1u} &= \frac{e_{3u}}{ \left( e_{1u}\;\overline{\overline{e_{3w}}}^{\,i+1/2,\,k} \right)} 
     
    9191 
    9292\subsection{Slopes for tracer iso-neutral mixing} 
    93 \label{LDF_slp_iso} 
     93\label{subsec:LDF_slp_iso} 
    9494In iso-neutral mixing  $r_1$ and $r_2$ are the slopes between the iso-neutral  
    9595and computational surfaces. Their formulation does not depend on the vertical  
    9696coordinate used. Their discrete formulation is found using the fact that the  
    9797diffusive fluxes of locally referenced potential density ($i.e.$ $in situ$ density)  
    98 vanish. So, substituting $T$ by $\rho$ in \eqref{Eq_tra_ldf_iso} and setting the  
     98vanish. So, substituting $T$ by $\rho$ in \autoref{eq:tra_ldf_iso} and setting the  
    9999diffusive fluxes in the three directions to zero leads to the following definition for  
    100100the neutral slopes: 
    101101 
    102 \begin{equation} \label{Eq_ldfslp_iso} 
     102\begin{equation} \label{eq:ldfslp_iso} 
    103103\begin{split} 
    104104 r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac{\delta_{i+1/2}[\rho]} 
     
    120120 
    121121%gm% rewrite this as the explanation is not very clear !!! 
    122 %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.  
    123  
    124 %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). 
    125  
    126 %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.  
     122%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.  
     123 
     124%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). 
     125 
     126%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.  
    127127 
    128128As the mixing is performed along neutral surfaces, the gradient of $\rho$ in  
    129 \eqref{Eq_ldfslp_iso} has to be evaluated at the same local pressure (which,  
     129\autoref{eq:ldfslp_iso} has to be evaluated at the same local pressure (which,  
    130130in decibars, is approximated by the depth in meters in the model). Therefore  
    131 \eqref{Eq_ldfslp_iso} cannot be used as such, but further transformation is  
     131\autoref{eq:ldfslp_iso} cannot be used as such, but further transformation is  
    132132needed depending on the vertical coordinate used: 
    133133 
    134134\begin{description} 
    135135 
    136 \item[$z$-coordinate with full step : ] in \eqref{Eq_ldfslp_iso} the densities  
     136\item[$z$-coordinate with full step : ] in \autoref{eq:ldfslp_iso} the densities  
    137137appearing in the $i$ and $j$ derivatives  are taken at the same depth, thus  
    138138the $in situ$ density can be used. This is not the case for the vertical  
    139139derivatives: $\delta_{k+1/2}[\rho]$ is replaced by $-\rho N^2/g$, where $N^2$  
    140140is the local Brunt-Vais\"{a}l\"{a} frequency evaluated following  
    141 \citet{McDougall1987} (see \S\ref{TRA_bn2}).  
     141\citet{McDougall1987} (see \autoref{subsec:TRA_bn2}).  
    142142 
    143143\item[$z$-coordinate with partial step : ] this case is identical to the full step  
    144144case except that at partial step level, the \emph{horizontal} density gradient  
    145 is evaluated as described in \S\ref{TRA_zpshde}. 
     145is evaluated as described in \autoref{sec:TRA_zpshde}. 
    146146 
    147147\item[$s$- or hybrid $s$-$z$- coordinate : ] in the current release of \NEMO,  
    148148iso-neutral mixing is only employed for $s$-coordinates if the 
    149 Griffies scheme is used (\np{traldf\_grif}\forcode{ = .true.}; see Appdx \ref{sec:triad}).  
     149Griffies scheme is used (\np{traldf\_grif}\forcode{ = .true.}; see Appdx \autoref{apdx:triad}).  
    150150In other words, iso-neutral mixing will only be accurately represented with a  
    151151linear equation of state (\np{nn\_eos}\forcode{ = 1..2}). In the case of a "true" equation  
    152 of state, the evaluation of $i$ and $j$ derivatives in \eqref{Eq_ldfslp_iso}  
     152of state, the evaluation of $i$ and $j$ derivatives in \autoref{eq:ldfslp_iso}  
    153153will include a pressure dependent part, leading to the wrong evaluation of  
    154154the neutral slopes. 
     
    168168This constraint leads to the following definition for the slopes: 
    169169 
    170 \begin{equation} \label{Eq_ldfslp_iso2} 
     170\begin{equation} \label{eq:ldfslp_iso2} 
    171171\begin{split} 
    172172 r_{1u} &= \frac{e_{3u}}{e_{1u}}\; \frac 
     
    193193\end{equation} 
    194194where $\alpha$ and $\beta$, the thermal expansion and saline contraction  
    195 coefficients introduced in \S\ref{TRA_bn2}, have to be evaluated at the three  
     195coefficients introduced in \autoref{subsec:TRA_bn2}, have to be evaluated at the three  
    196196velocity points. In order to save computation time, they should be approximated  
    197197by the mean of their values at $T$-points (for example in the case of $\alpha$:   
     
    212212ocean model are modified \citep{Weaver_Eby_JPO97, 
    213213  Griffies_al_JPO98}. Griffies's scheme is now available in \NEMO if 
    214 \np{traldf\_grif\_iso} is set true; see Appdx \ref{sec:triad}. Here, 
     214\np{traldf\_grif\_iso} is set true; see Appdx \autoref{apdx:triad}. Here, 
    215215another strategy is presented \citep{Lazar_PhD97}: a local 
    216216filtering of the iso-neutral slopes (made on 9 grid-points) prevents 
    217217the development of grid point noise generated by the iso-neutral 
    218 diffusion operator (Fig.~\ref{Fig_LDF_ZDF1}). This allows an 
     218diffusion operator (\autoref{fig:LDF_ZDF1}). This allows an 
    219219iso-neutral diffusion scheme without additional background horizontal 
    220220mixing. This technique can be viewed as a diffusion operator that acts 
     
    231231\begin{figure}[!ht]      \begin{center} 
    232232\includegraphics[width=0.70\textwidth]{Fig_LDF_ZDF1} 
    233 \caption {    \protect\label{Fig_LDF_ZDF1} 
     233\caption {    \protect\label{fig:LDF_ZDF1} 
    234234averaging procedure for isopycnal slope computation.} 
    235235\end{center}    \end{figure} 
     
    259259\begin{figure}[!ht]     \begin{center} 
    260260\includegraphics[width=0.70\textwidth]{Fig_eiv_slp} 
    261 \caption {     \protect\label{Fig_eiv_slp} 
     261\caption {     \protect\label{fig:eiv_slp} 
    262262Vertical profile of the slope used for lateral mixing in the mixed layer :  
    263263\textit{(a)} in the real ocean the slope is the iso-neutral slope in the ocean interior,  
     
    280280The iso-neutral diffusion operator on momentum is the same as the one used on  
    281281tracers but applied to each component of the velocity separately (see  
    282 \eqref{Eq_dyn_ldf_iso} in section~\ref{DYN_ldf_iso}). The slopes between the  
     282\autoref{eq:dyn_ldf_iso} in section~\autoref{subsec:DYN_ldf_iso}). The slopes between the  
    283283surface along which the diffusion operator acts and the surface of computation  
    284284($z$- or $s$-surfaces) are defined at $T$-, $f$-, and \textit{uw}- points for the  
    285285$u$-component, and $T$-, $f$- and \textit{vw}- points for the $v$-component.  
    286286They are computed from the slopes used for tracer diffusion, $i.e.$  
    287 \eqref{Eq_ldfslp_geo} and \eqref{Eq_ldfslp_iso} : 
    288  
    289 \begin{equation} \label{Eq_ldfslp_dyn} 
     287\autoref{eq:ldfslp_geo} and \autoref{eq:ldfslp_iso} : 
     288 
     289\begin{equation} \label{eq:ldfslp_dyn} 
    290290\begin{aligned} 
    291291&r_{1t}\ \ = \overline{r_{1u}}^{\,i}       &&&    r_{1f}\ \ &= \overline{r_{1u}}^{\,i+1/2} \\ 
     
    300300diffusion along model level surfaces, i.e. using the shear computed along  
    301301the model levels and with no additional friction at the ocean bottom (see  
    302 \S\ref{LBC_coast}). 
     302\autoref{sec:LBC_coast}). 
    303303 
    304304 
     
    307307% ================================================================ 
    308308\section{Lateral mixing operators (\protect\mdl{traldf}, \protect\mdl{traldf}) } 
    309 \label{LDF_op} 
     309\label{sec:LDF_op} 
    310310 
    311311 
     
    315315% ================================================================ 
    316316\section{Lateral mixing coefficient (\protect\mdl{ldftra}, \protect\mdl{ldfdyn}) } 
    317 \label{LDF_coef} 
     317\label{sec:LDF_coef} 
    318318 
    319319Introducing a space variation in the lateral eddy mixing coefficients changes  
     
    362362By default the horizontal variation of the eddy coefficient depends on the local mesh  
    363363size and the type of operator used: 
    364 \begin{equation} \label{Eq_title} 
     364\begin{equation} \label{eq:title} 
    365365  A_l = \left\{      
    366366   \begin{aligned} 
     
    378378such as global ocean models. Indeed, in such a case, a constant mixing coefficient  
    379379can lead to a blow up of the model due to large coefficient compare to the smallest  
    380 grid size (see \S\ref{STP_forward_imp}), especially when using a bilaplacian operator. 
     380grid size (see \autoref{sec:STP_forward_imp}), especially when using a bilaplacian operator. 
    381381 
    382382Other formulations can be introduced by the user for a given configuration.  
     
    411411(1) the momentum diffusion operator acting along model level surfaces is  
    412412written in terms of curl and divergent components of the horizontal current  
    413 (see \S\ref{PE_ldf}). Although the eddy coefficient could be set to different values  
     413(see \autoref{subsec:PE_ldf}). Although the eddy coefficient could be set to different values  
    414414in these two terms, this option is not currently available.  
    415415 
     
    417417on enstrophy and on the square of the horizontal divergence for operators  
    418418acting along model-surfaces are no longer satisfied  
    419 (Appendix~\ref{Apdx_dynldf_properties}). 
     419(\autoref{sec:dynldf_properties}). 
    420420 
    421421(3) for isopycnal diffusion on momentum or tracers, an additional purely  
     
    425425values are $0$). However, the technique used to compute the isopycnal  
    426426slopes is intended to get rid of such a background diffusion, since it introduces  
    427 spurious diapycnal diffusion (see \S\ref{LDF_slp}). 
     427spurious diapycnal diffusion (see \autoref{sec:LDF_slp}). 
    428428 
    429429(4) when an eddy induced advection term is used (\key{traldf\_eiv}), $A^{eiv}$,  
     
    438438(7) it is possible to run without explicit lateral diffusion on momentum (\np{ln\_dynldf\_lap}\forcode{ =  
    439439}\np{ln\_dynldf\_bilap}\forcode{ = .false.}). This is recommended when using the UBS advection  
    440 scheme on momentum (\np{ln\_dynadv\_ubs}\forcode{ = .true.}, see \ref{DYN_adv_ubs})  
     440scheme on momentum (\np{ln\_dynadv\_ubs}\forcode{ = .true.}, see \autoref{subsec:DYN_adv_ubs})  
    441441and can be useful for testing purposes. 
    442442 
     
    445445% ================================================================ 
    446446\section{Eddy induced velocity (\protect\mdl{traadv\_eiv}, \protect\mdl{ldfeiv})} 
    447 \label{LDF_eiv} 
     447\label{sec:LDF_eiv} 
    448448 
    449449%%gm  from Triad appendix  : to be incorporated.... 
    450450\gmcomment{ 
    451451Values of iso-neutral diffusivity and GM coefficient are set as 
    452 described in \S\ref{LDF_coef}. If none of the keys \key{traldf\_cNd}, 
     452described in \autoref{sec:LDF_coef}. If none of the keys \key{traldf\_cNd}, 
    453453N=1,2,3 is set (the default), spatially constant iso-neutral $A_l$ and 
    454454GM diffusivity $A_e$ are directly set by \np{rn\_aeih\_0} and 
    455455\np{rn\_aeiv\_0}. If 2D-varying coefficients are set with 
    456456\key{traldf\_c2d} then $A_l$ is reduced in proportion with horizontal 
    457 scale factor according to \eqref{Eq_title} \footnote{Except in global ORCA 
     457scale factor according to \autoref{eq:title} \footnote{Except in global ORCA 
    458458  $0.5^{\circ}$ runs with \key{traldf\_eiv}, where 
    459459  $A_l$ is set like $A_e$ but with a minimum vale of 
     
    472472depends on the slopes of iso-neutral surfaces. Contrary to the case of iso-neutral  
    473473mixing, the slopes used here are referenced to the geopotential surfaces, $i.e.$  
    474 \eqref{Eq_ldfslp_geo} is used in $z$-coordinates, and the sum \eqref{Eq_ldfslp_geo}   
    475 + \eqref{Eq_ldfslp_iso} in $s$-coordinates. The eddy induced velocity is given by:  
    476 \begin{equation} \label{Eq_ldfeiv} 
     474\autoref{eq:ldfslp_geo} is used in $z$-coordinates, and the sum \autoref{eq:ldfslp_geo}   
     475+ \autoref{eq:ldfslp_iso} in $s$-coordinates. The eddy induced velocity is given by:  
     476\begin{equation} \label{eq:ldfeiv} 
    477477\begin{split} 
    478478 u^* & = \frac{1}{e_{2u}e_{3u}}\; \delta_k \left[e_{2u} \, A_{uw}^{eiv} \; \overline{r_{1w}}^{\,i+1/2} \right]\\ 
     
    487487separate computation of the advective trends associated with the eiv velocity,  
    488488since it allows us to take advantage of all the advection schemes offered for  
    489 the tracers (see \S\ref{TRA_adv}) and not just the $2^{nd}$ order advection  
     489the tracers (see \autoref{sec:TRA_adv}) and not just the $2^{nd}$ order advection  
    490490scheme as in previous releases of OPA \citep{Madec1998}. This is particularly  
    491491useful for passive tracers where \emph{positivity} of the advection scheme is  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_OBS.tex

    r9394 r9407  
    55% ================================================================ 
    66\chapter{Observation and Model Comparison (OBS)} 
    7 \label{OBS} 
     7\label{chap:OBS} 
    88 
    99Authors: D. Lea, M. Martin, K. Mogensen, A. Vidard, A. Weaver, A. Ryan, ...   % do we keep that ? 
     
    4242details on setting up the namelist. 
    4343 
    44 Section~\ref{OBS_example} introduces a test example of the observation operator code including 
    45 where to obtain data and how to setup the namelist. Section~\ref{OBS_details} introduces some 
     44\autoref{sec:OBS_example} introduces a test example of the observation operator code including 
     45where to obtain data and how to setup the namelist. \autoref{sec:OBS_details} introduces some 
    4646more technical details of the different observation types used and also shows a more complete 
    47 namelist. Section~\ref{OBS_theory} introduces some of the theoretical aspects of the observation 
     47namelist. \autoref{sec:OBS_theory} introduces some of the theoretical aspects of the observation 
    4848operator including interpolation methods and running on multiple processors. 
    49 Section~\ref{OBS_ooo} describes the offline observation operator code. 
    50 Section~\ref{OBS_obsutils} introduces some utilities to help working with the files 
     49\autoref{sec:OBS_ooo} describes the offline observation operator code. 
     50\autoref{sec:OBS_obsutils} introduces some utilities to help working with the files 
    5151produced by the OBS code. 
    5252 
     
    5555% ================================================================ 
    5656\section{Running the observation operator code example} 
    57 \label{OBS_example} 
     57\label{sec:OBS_example} 
    5858 
    5959This section describes an example of running the observation operator code using 
     
    9999Setting \np{ln\_grid\_global} means that the code distributes the observations 
    100100evenly between processors. Alternatively each processor will work with 
    101 observations located within the model subdomain (see section~\ref{OBS_parallel}). 
     101observations located within the model subdomain (see section~\autoref{subsec:OBS_parallel}). 
    102102 
    103103A number of utilities are now provided to plot the feedback files, convert and 
    104 recombine the files. These are explained in more detail in section~\ref{OBS_obsutils}. 
     104recombine the files. These are explained in more detail in section~\autoref{sec:OBS_obsutils}. 
    105105Utilites to convert other input data formats into the feedback format are also  
    106 described in section~\ref{OBS_obsutils}. 
     106described in section~\autoref{sec:OBS_obsutils}. 
    107107 
    108108\section{Technical details (feedback type observation file headers)} 
    109 \label{OBS_details} 
     109\label{sec:OBS_details} 
    110110 
    111111Here we show a more complete example namelist  \ngn{namobs} and also show the NetCDF headers 
     
    545545 
    546546\section{Theoretical details} 
    547 \label{OBS_theory} 
     547\label{sec:OBS_theory} 
    548548 
    549549\subsection{Horizontal interpolation and averaging methods} 
     
    683683\end{itemize} 
    684684 
    685 Examples of the weights calculated for an observation with rectangular and radial footprints are shown in Figs.~\ref{fig:obsavgrec} and~\ref{fig:obsavgrad}. 
     685Examples of the weights calculated for an observation with rectangular and radial footprints are shown in Figs.~\autoref{fig:obsavgrec} and~\autoref{fig:obsavgrad}. 
    686686 
    687687%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    768768 
    769769\subsection{Parallel aspects of horizontal interpolation} 
    770 \label{OBS_parallel} 
     770\label{subsec:OBS_parallel} 
    771771 
    772772For horizontal interpolation, there is the basic problem that the 
     
    794794 
    795795This is the simplest option in which the observations are distributed according  
    796 to the domain of the grid-point parallelization. Figure~\ref{fig:obslocal} 
     796to the domain of the grid-point parallelization. \autoref{fig:obslocal} 
    797797shows an example of the distribution of the {\em in situ} data on processors  
    798798with a different colour for each observation 
     
    823823among processors and use message passing in order to retrieve  
    824824the stencil for interpolation. The simplest distribution of the observations  
    825 is to distribute them using a round-robin scheme. Figure~\ref{fig:obsglobal} 
     825is to distribute them using a round-robin scheme. \autoref{fig:obsglobal} 
    826826shows the distribution of the {\em in situ} data on processors for the 
    827827round-robin distribution of observations with a different colour for 
    828828each observation on a given processor for a 4 $\times$ 2 decomposition  
    829 with ORCA2 for the same input data as in Fig.~\ref{fig:obslocal}. 
     829with ORCA2 for the same input data as in \autoref{fig:obslocal}. 
    830830The observations are now clearly randomly distributed on the globe. 
    831831In order to be able to perform horizontal interpolation in this case,  
     
    850850 
    851851\section{Offline observation operator} 
    852 \label{OBS_ooo} 
     852\label{sec:OBS_ooo} 
    853853 
    854854\subsection{Concept} 
     
    11831183 
    11841184\section{Observation utilities} 
    1185 \label{OBS_obsutils} 
     1185\label{sec:OBS_obsutils} 
    11861186 
    11871187Some tools for viewing and processing of observation and feedback files are provided in the 
     
    13541354\end{minted} 
    13551355 
    1356 Fig~\ref{fig:obsdataplotmain} shows the main window which is launched when dataplot starts. 
     1356\autoref{fig:obsdataplotmain} shows the main window which is launched when dataplot starts. 
    13571357This is split into three parts. At the top there is a menu bar which contains a variety of 
    13581358drop down menus. Areas - zooms into prespecified regions; plot - plots the data as a 
     
    13891389 
    13901390If a profile point is clicked with the mouse button a plot of the observation and background 
    1391 values as a function of depth (Fig~\ref{fig:obsdataplotprofile}). 
     1391values as a function of depth (\autoref{fig:obsdataplotprofile}). 
    13921392 
    13931393%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_SBC.tex

    r9394 r9407  
    55% ================================================================ 
    66\chapter{Surface Boundary Condition (SBC, ISF, ICB) } 
    7 \label{SBC} 
     7\label{chap:SBC} 
    88\minitoc 
    99 
     
    4040need not be supplied on the model grid. Instead a file of coordinates and weights can  
    4141be supplied which maps the data from the supplied grid to the model points  
    42 (so called "Interpolation on the Fly", see \S\ref{SBC_iof}). 
     42(so called "Interpolation on the Fly", see \autoref{subsec:SBC_iof}). 
    4343If the Interpolation on the Fly option is used, input data belonging to land points (in the native grid), 
    4444can be masked to avoid spurious results in proximity of the coasts  as large sea-land gradients characterize 
     
    6565Next the scheme for interpolation on the fly is described. 
    6666Finally, the different options that further modify the fluxes applied to the ocean are discussed. 
    67 One of these is modification by icebergs (see \S\ref{ICB_icebergs}), which act as drifting sources of fresh water. 
    68 Another example of modification is that due to the ice shelf melting/freezing (see \S\ref{SBC_isf}),  
     67One of these is modification by icebergs (see \autoref{sec:ICB_icebergs}), which act as drifting sources of fresh water. 
     68Another example of modification is that due to the ice shelf melting/freezing (see \autoref{sec:SBC_isf}),  
    6969which provides additional sources of fresh water. 
    7070 
     
    7474% ================================================================ 
    7575\section{Surface boundary condition for the ocean} 
    76 \label{SBC_general} 
     76\label{sec:SBC_general} 
    7777 
    7878The surface ocean stress is the stress exerted by the wind and the sea-ice  
    7979on the ocean. It is applied in \mdl{dynzdf} module as a surface boundary condition of the  
    80 computation of the momentum vertical mixing trend (see \eqref{Eq_dynzdf_sbc} in \S\ref{DYN_zdf}). 
     80computation of the momentum vertical mixing trend (see \autoref{eq:dynzdf_sbc} in \autoref{sec:DYN_zdf}). 
    8181As such, it has to be provided as a 2D vector interpolated  
    8282onto the horizontal velocity ocean mesh, $i.e.$ resolved onto the model  
     
    8888plus the heat content of the mass exchange with the atmosphere and sea-ice).  
    8989It is applied in \mdl{trasbc} module as a surface boundary condition trend of  
    90 the first level temperature time evolution equation (see \eqref{Eq_tra_sbc}  
    91 and \eqref{Eq_tra_sbc_lin} in \S\ref{TRA_sbc}).  
     90the first level temperature time evolution equation (see \autoref{eq:tra_sbc}  
     91and \autoref{eq:tra_sbc_lin} in \autoref{subsec:TRA_sbc}).  
    9292The latter is the penetrative part of the heat flux. It is applied as a 3D  
    9393trends of the temperature equation (\mdl{traqsr} module) when \np{ln\_traqsr}\forcode{ = .true.}. 
    9494The way the light penetrates inside the water column is generally a sum of decreasing  
    95 exponentials (see \S\ref{TRA_qsr}).  
     95exponentials (see \autoref{subsec:TRA_qsr}).  
    9696 
    9797The surface freshwater budget is provided by the \textit{emp} field. 
     
    130130The ocean model provides, at each time step, to the surface module (\mdl{sbcmod})  
    131131the surface currents, temperature and salinity.   
    132 These variables are averaged over \np{nn\_fsbc} time-step (\ref{Tab_ssm}),  
     132These variables are averaged over \np{nn\_fsbc} time-step (\autoref{tab:ssm}),  
    133133and it is these averaged fields which are used to computes the surface fluxes  
    134134at a frequency of \np{nn\_fsbc} time-step. 
     
    144144Sea surface salinty              & sss\_m & $psu$        & T \\   \hline 
    145145\end{tabular} 
    146 \caption{  \protect\label{Tab_ssm}    
     146\caption{  \protect\label{tab:ssm}    
    147147Ocean variables provided by the ocean to the surface module (SBC).  
    148148The variable are averaged over nn{\_}fsbc time step,  
     
    158158% ================================================================ 
    159159\section{Input data generic interface} 
    160 \label{SBC_input} 
     160\label{sec:SBC_input} 
    161161 
    162162A generic interface has been introduced to manage the way input data (2D or 3D fields,  
     
    181181 
    182182The only constraints are that the input file is a NetCDF file, the file name follows a nomenclature  
    183 (see \S\ref{SBC_fldread}), the period it cover is one year, month, week or day, and, if on-the-fly  
    184 interpolation is used, a file of weights must be supplied (see \S\ref{SBC_iof}). 
     183(see \autoref{subsec:SBC_fldread}), the period it cover is one year, month, week or day, and, if on-the-fly  
     184interpolation is used, a file of weights must be supplied (see \autoref{subsec:SBC_iof}). 
    185185 
    186186Note that when an input data is archived on a disc which is accessible directly  
     
    193193% ------------------------------------------------------------------------------------------------------------- 
    194194\subsection{Input data specification (\protect\mdl{fldread})} 
    195 \label{SBC_fldread} 
     195\label{subsec:SBC_fldread} 
    196196 
    197197The structure associated with an input variable contains the following information: 
     
    205205This stem will be completed automatically by the model, with the addition of a '.nc' at its end  
    206206and by date information and possibly a prefix (when using AGRIF).  
    207 Tab.\ref{Tab_fldread} provides the resulting file name in all possible cases according to whether  
     207Tab.\autoref{tab:fldread} provides the resulting file name in all possible cases according to whether  
    208208it is a climatological file or not, and to the open/close frequency (see below for definition).  
    209209 
     
    218218\end{tabular} 
    219219\end{center} 
    220 \caption{ \protect\label{Tab_fldread}   naming nomenclature for climatological or interannual input file,  
     220\caption{ \protect\label{tab:fldread}   naming nomenclature for climatological or interannual input file,  
    221221as a function of the Open/close frequency. The stem name is assumed to be 'fn'.  
    222222For 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  
     
    259259 
    260260\item[Others]: 'weights filename', 'pairing rotation' and 'land/sea mask' are associted with on-the-fly interpolation  
    261 which is described in \S\ref{SBC_iof}. 
     261which is described in \autoref{subsec:SBC_iof}. 
    262262 
    263263\end{description} 
     
    301301% ------------------------------------------------------------------------------------------------------------- 
    302302\subsection{Interpolation on-the-fly} 
    303 \label{SBC_iof} 
     303\label{subsec:SBC_iof} 
    304304 
    305305Interpolation on the Fly allows the user to supply input files required 
     
    325325 
    326326\subsubsection{Bilinear interpolation} 
    327 \label{SBC_iof_bilinear} 
     327\label{subsec:SBC_iof_bilinear} 
    328328 
    329329The input weights file in this case has two sets of variables: src01, src02, 
     
    347347 
    348348\subsubsection{Bicubic interpolation} 
    349 \label{SBC_iof_bicubic} 
     349\label{subsec:SBC_iof_bicubic} 
    350350 
    351351Again there are two sets of variables: "src" and "wgt". 
     
    363363 
    364364\subsubsection{Implementation} 
    365 \label{SBC_iof_imp} 
     365\label{subsec:SBC_iof_imp} 
    366366 
    367367To activate this option, a non-empty string should be supplied in the weights filename column  
     
    398398 
    399399\subsubsection{Limitations} 
    400 \label{SBC_iof_lim} 
     400\label{subsec:SBC_iof_lim} 
    401401 
    402402\begin{enumerate}   
     
    412412 
    413413\subsubsection{Utilities} 
    414 \label{SBC_iof_util} 
     414\label{subsec:SBC_iof_util} 
    415415 
    416416% to be completed 
     
    422422% ------------------------------------------------------------------------------------------------------------- 
    423423\subsection{Standalone surface boundary condition scheme} 
    424 \label{SAS_iof} 
     424\label{subsec:SAS_iof} 
    425425 
    426426%---------------------------------------namsbc_ana-------------------------------------------------- 
     
    482482% ================================================================ 
    483483\section{Analytical formulation (\protect\mdl{sbcana})} 
    484 \label{SBC_ana} 
     484\label{sec:SBC_ana} 
    485485 
    486486%---------------------------------------namsbc_ana-------------------------------------------------- 
     
    506506% ================================================================ 
    507507\section{Flux formulation (\protect\mdl{sbcflx})} 
    508 \label{SBC_flx} 
     508\label{sec:SBC_flx} 
    509509%------------------------------------------namsbc_flx---------------------------------------------------- 
    510510\forfile{../namelists/namsbc_flx}  
     
    516516read in the file, the time frequency at which it is given (in hours), and a logical  
    517517setting whether a time interpolation to the model time step is required  
    518 for this field. See \S\ref{SBC_fldread} for a more detailed description of the parameters. 
     518for this field. See \autoref{subsec:SBC_fldread} for a more detailed description of the parameters. 
    519519 
    520520Note that in general, a flux formulation is used in associated with a  
    521 restoring term to observed SST and/or SSS. See \S\ref{SBC_ssr} for its  
     521restoring term to observed SST and/or SSS. See \autoref{subsec:SBC_ssr} for its  
    522522specification. 
    523523 
     
    528528\section[Bulk formulation {(\textit{sbcblk\{\_core,\_clio,\_mfs\}.F90})}] 
    529529         {Bulk formulation {(\protect\mdl{sbcblk\_core}, \protect\mdl{sbcblk\_clio}, \protect\mdl{sbcblk\_mfs})}} 
    530 \label{SBC_blk} 
     530\label{sec:SBC_blk} 
    531531 
    532532In the bulk formulation, the surface boundary condition fields are computed  
     
    545545% ------------------------------------------------------------------------------------------------------------- 
    546546\subsection{CORE formulea (\protect\mdl{sbcblk\_core}, \protect\np{ln\_core}\forcode{ = .true.})} 
    547 \label{SBC_blk_core} 
     547\label{subsec:SBC_blk_core} 
    548548%------------------------------------------namsbc_core---------------------------------------------------- 
    549549%\forfile{../namelists/namsbc_core} 
     
    566566 
    567567%--------------------------------------------------TABLE-------------------------------------------------- 
    568 \begin{table}[htbp]   \label{Tab_CORE} 
     568\begin{table}[htbp]   \label{tab:CORE} 
    569569\begin{center} 
    570570\begin{tabular}{|l|c|c|c|} 
     
    609609% ------------------------------------------------------------------------------------------------------------- 
    610610\subsection{CLIO formulea (\protect\mdl{sbcblk\_clio}, \protect\np{ln\_clio}\forcode{ = .true.})} 
    611 \label{SBC_blk_clio} 
     611\label{subsec:SBC_blk_clio} 
    612612%------------------------------------------namsbc_clio---------------------------------------------------- 
    613613%\forfile{../namelists/namsbc_clio} 
     
    623623 
    624624%--------------------------------------------------TABLE-------------------------------------------------- 
    625 \begin{table}[htbp]   \label{Tab_CLIO} 
     625\begin{table}[htbp]   \label{tab:CLIO} 
    626626\begin{center} 
    627627\begin{tabular}{|l|l|l|l|} 
     
    643643As for the flux formulation, information about the input data required by the  
    644644model is provided in the namsbc\_blk\_core or namsbc\_blk\_clio  
    645 namelist (see \S\ref{SBC_fldread}).  
     645namelist (see \autoref{subsec:SBC_fldread}).  
    646646 
    647647% ------------------------------------------------------------------------------------------------------------- 
     
    649649% ------------------------------------------------------------------------------------------------------------- 
    650650\subsection{MFS formulea (\protect\mdl{sbcblk\_mfs}, \protect\np{ln\_mfs}\forcode{ = .true.})} 
    651 \label{SBC_blk_mfs} 
     651\label{subsec:SBC_blk_mfs} 
    652652%------------------------------------------namsbc_mfs---------------------------------------------------- 
    653653%\forfile{../namelists/namsbc_mfs} 
     
    687687% ================================================================ 
    688688\section{Coupled formulation (\protect\mdl{sbccpl})} 
    689 \label{SBC_cpl} 
     689\label{sec:SBC_cpl} 
    690690%------------------------------------------namsbc_cpl---------------------------------------------------- 
    691691\forfile{../namelists/namsbc_cpl}  
     
    725725% ================================================================ 
    726726\section{Atmospheric pressure (\protect\mdl{sbcapr})} 
    727 \label{SBC_apr} 
     727\label{sec:SBC_apr} 
    728728%------------------------------------------namsbc_apr---------------------------------------------------- 
    729729\forfile{../namelists/namsbc_apr}  
     
    737737pressure is further transformed into an equivalent inverse barometer sea surface height,  
    738738$\eta_{ib}$, using: 
    739 \begin{equation} \label{SBC_ssh_ib} 
     739\begin{equation} \label{eq:SBC_ssh_ib} 
    740740   \eta_{ib} = -  \frac{1}{g\,\rho_o}  \left( P_{atm} - P_o \right)  
    741741\end{equation} 
     
    759759% ================================================================ 
    760760\section{Tidal potential (\protect\mdl{sbctide})} 
    761 \label{SBC_tide} 
     761\label{sec:SBC_tide} 
    762762 
    763763%------------------------------------------nam_tide--------------------------------------- 
     
    814814% ================================================================ 
    815815\section{River runoffs (\protect\mdl{sbcrnf})} 
    816 \label{SBC_rnf} 
     816\label{sec:SBC_rnf} 
    817817%------------------------------------------namsbc_rnf---------------------------------------------------- 
    818818\forfile{../namelists/namsbc_rnf}  
     
    826826%coastal modelling and becomes more and more often open ocean and climate modelling  
    827827%\footnote{At least a top cells thickness of 1~meter and a 3 hours forcing frequency are 
    828 %required to properly represent the diurnal cycle \citep{Bernie_al_JC05}. see also \S\ref{SBC_dcy}.}. 
     828%required to properly represent the diurnal cycle \citep{Bernie_al_JC05}. see also \autoref{fig:SBC_dcy}.}. 
    829829 
    830830 
     
    847847more common in open ocean and climate modelling  
    848848\footnote{At least a top cells thickness of 1~meter and a 3 hours forcing frequency are 
    849 required to properly represent the diurnal cycle \citep{Bernie_al_JC05}. see also \S\ref{SBC_dcy}.}. 
     849required to properly represent the diurnal cycle \citep{Bernie_al_JC05}. see also \autoref{fig:SBC_dcy}.}. 
    850850 
    851851As such from V~3.3 onwards it is possible to add river runoff through a non-zero depth, and for the  
     
    929929% ================================================================ 
    930930\section{Ice shelf melting (\protect\mdl{sbcisf})} 
    931 \label{SBC_isf} 
     931\label{sec:SBC_isf} 
    932932%------------------------------------------namsbc_isf---------------------------------------------------- 
    933933\forfile{../namelists/namsbc_isf} 
     
    10061006The fw addition due to the ice shelf melting is, at each relevant depth level, added to the horizontal divergence  
    10071007(\textit{hdivn}) in the subroutine \rou{sbc\_isf\_div}, called from \mdl{divcur}.  
    1008 See the runoff section \ref{SBC_rnf} for all the details about the divergence correction.  
     1008See the runoff section \autoref{sec:SBC_rnf} for all the details about the divergence correction.  
    10091009 
    10101010 
    10111011\section{Ice sheet coupling} 
    1012 \label{SBC_iscpl} 
     1012\label{sec:SBC_iscpl} 
    10131013%------------------------------------------namsbc_iscpl---------------------------------------------------- 
    10141014\forfile{../namelists/namsbc_iscpl} 
     
    10481048% ================================================================ 
    10491049\section{Handling of icebergs (ICB)} 
    1050 \label{ICB_icebergs} 
     1050\label{sec:ICB_icebergs} 
    10511051%------------------------------------------namberg---------------------------------------------------- 
    10521052\forfile{../namelists/namberg} 
     
    11131113% ================================================================ 
    11141114\section{Miscellaneous options} 
    1115 \label{SBC_misc} 
     1115\label{sec:SBC_misc} 
    11161116 
    11171117% ------------------------------------------------------------------------------------------------------------- 
     
    11191119% ------------------------------------------------------------------------------------------------------------- 
    11201120\subsection{Diurnal cycle (\protect\mdl{sbcdcy})} 
    1121 \label{SBC_dcy} 
     1121\label{subsec:SBC_dcy} 
    11221122%------------------------------------------namsbc_rnf---------------------------------------------------- 
    11231123%\forfile{../namelists/namsbc}  
     
    11271127\begin{figure}[!t]    \begin{center} 
    11281128\includegraphics[width=0.8\textwidth]{Fig_SBC_diurnal} 
    1129 \caption{ \protect\label{Fig_SBC_diurnal}     
     1129\caption{ \protect\label{fig:SBC_diurnal}     
    11301130Example of recontruction of the diurnal cycle variation of short wave flux   
    11311131from daily mean values. The reconstructed diurnal cycle (black line) is chosen  
     
    11491149can be found in the appendix~A of \cite{Bernie_al_CD07}. The algorithm preserve the daily  
    11501150mean incomming SWF as the reconstructed SWF at a given time step is the mean value  
    1151 of the analytical cycle over this time step (Fig.\ref{Fig_SBC_diurnal}).  
     1151of the analytical cycle over this time step (\autoref{fig:SBC_diurnal}).  
    11521152The use of diurnal cycle reconstruction requires the input SWF to be daily  
    11531153($i.e.$ a frequency of 24 and a time interpolation set to true in \np{sn\_qsr} namelist parameter). 
    11541154Furthermore, it is recommended to have a least 8 surface module time step per day, 
    11551155that is  $\rdt \ nn\_fsbc < 10,800~s = 3~h$. An example of recontructed SWF  
    1156 is given in Fig.\ref{Fig_SBC_dcy} for a 12 reconstructed diurnal cycle, one every 2~hours  
     1156is given in \autoref{fig:SBC_dcy} for a 12 reconstructed diurnal cycle, one every 2~hours  
    11571157(from 1am to 11pm). 
    11581158 
     
    11601160\begin{figure}[!t]  \begin{center} 
    11611161\includegraphics[width=0.7\textwidth]{Fig_SBC_dcy} 
    1162 \caption{ \protect\label{Fig_SBC_dcy}    
     1162\caption{ \protect\label{fig:SBC_dcy}    
    11631163Example of recontruction of the diurnal cycle variation of short wave flux   
    11641164from daily mean values on an ORCA2 grid with a time sampling of 2~hours (from 1am to 11pm).  
     
    11761176% ------------------------------------------------------------------------------------------------------------- 
    11771177\subsection{Rotation of vector pairs onto the model grid directions} 
    1178 \label{SBC_rotation} 
     1178\label{subsec:SBC_rotation} 
    11791179 
    11801180When using a flux (\np{ln\_flx}\forcode{ = .true.}) or bulk (\np{ln\_clio}\forcode{ = .true.} or \np{ln\_core}\forcode{ = .true.}) formulation,  
     
    11951195% ------------------------------------------------------------------------------------------------------------- 
    11961196\subsection{Surface restoring to observed SST and/or SSS (\protect\mdl{sbcssr})} 
    1197 \label{SBC_ssr} 
     1197\label{subsec:SBC_ssr} 
    11981198%------------------------------------------namsbc_ssr---------------------------------------------------- 
    11991199\forfile{../namelists/namsbc_ssr}  
     
    12031203n forced mode using a flux formulation (\np{ln\_flx}\forcode{ = .true.}), a  
    12041204feedback term \emph{must} be added to the surface heat flux $Q_{ns}^o$: 
    1205 \begin{equation} \label{Eq_sbc_dmp_q} 
     1205\begin{equation} \label{eq:sbc_dmp_q} 
    12061206Q_{ns} = Q_{ns}^o + \frac{dQ}{dT} \left( \left. T \right|_{k=1} - SST_{Obs} \right) 
    12071207\end{equation} 
     
    12161216equivalent freshwater flux, it takes the following expression : 
    12171217 
    1218 \begin{equation} \label{Eq_sbc_dmp_emp} 
     1218\begin{equation} \label{eq:sbc_dmp_emp} 
    12191219\textit{emp} = \textit{emp}_o + \gamma_s^{-1} e_{3t}  \frac{  \left(\left.S\right|_{k=1}-SSS_{Obs}\right)} 
    12201220                                             {\left.S\right|_{k=1}} 
     
    12261226$\left.S\right|_{k=1}$ is the model surface layer salinity and $\gamma_s$ is a negative  
    12271227feedback coefficient which is provided as a namelist parameter. Unlike heat flux, there is no  
    1228 physical justification for the feedback term in \ref{Eq_sbc_dmp_emp} as the atmosphere  
     1228physical justification for the feedback term in \autoref{eq:sbc_dmp_emp} as the atmosphere  
    12291229does not care about ocean surface salinity \citep{Madec1997}. The SSS restoring  
    12301230term should be viewed as a flux correction on freshwater fluxes to reduce the  
     
    12351235% ------------------------------------------------------------------------------------------------------------- 
    12361236\subsection{Handling of ice-covered area  (\textit{sbcice\_...})} 
    1237 \label{SBC_ice-cover} 
     1237\label{subsec:SBC_ice-cover} 
    12381238 
    12391239The presence at the sea surface of an ice covered area modifies all the fluxes  
     
    12641264 
    12651265\subsection{Interface to CICE (\protect\mdl{sbcice\_cice})} 
    1266 \label{SBC_cice} 
     1266\label{subsec:SBC_cice} 
    12671267 
    12681268It is now possible to couple a regional or global NEMO configuration (without AGRIF) to the CICE sea-ice 
     
    12911291% ------------------------------------------------------------------------------------------------------------- 
    12921292\subsection{Freshwater budget control (\protect\mdl{sbcfwb})} 
    1293 \label{SBC_fwb} 
     1293\label{subsec:SBC_fwb} 
    12941294 
    12951295For global ocean simulation it can be useful to introduce a control of the mean sea  
     
    13131313\subsection[Neutral drag coeff. from external wave model (\protect\mdl{sbcwave})] 
    13141314            {Neutral drag coefficient from external wave model (\protect\mdl{sbcwave})} 
    1315 \label{SBC_wave} 
     1315\label{subsec:SBC_wave} 
    13161316%------------------------------------------namwave---------------------------------------------------- 
    13171317\forfile{../namelists/namsbc_wave} 
     
    13221322The \mdl{sbcwave} module containing the routine \np{sbc\_wave} reads the 
    13231323namelist \ngn{namsbc\_wave} (for external data names, locations, frequency, interpolation and all  
    1324 the miscellanous options allowed by Input Data generic Interface see \S\ref{SBC_input})  
     1324the miscellanous options allowed by Input Data generic Interface see \autoref{sec:SBC_input})  
    13251325and a 2D field of neutral drag coefficient.  
    13261326Then using the routine TURB\_CORE\_1Z or TURB\_CORE\_2Z, and starting from the neutral drag coefficent provided,  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_STO.tex

    r9393 r9407  
    55% ================================================================ 
    66\chapter{Stochastic Parametrization of EOS (STO)} 
    7 \label{STO} 
     7\label{chap:STO} 
    88 
    99Authors: P.-A. Bouttier 
     
    3939 
    4040\section{Stochastic processes} 
    41 \label{STO_the_details} 
     41\label{sec:STO_the_details} 
    4242 
    4343The starting point of our implementation of stochastic parameterizations 
     
    104104\noindent 
    105105In this way, higher order processes can be easily generated recursively using  
    106 the same piece of code implementing Eq.~(\ref{eq:autoreg}),  
     106the same piece of code implementing (\autoref{eq:autoreg}),  
    107107and using succesively processes from order $0$ to~$n-1$ as~$w^{(i)}$. 
    108 The parameters in Eq.~(\ref{eq:ord2}) are computed so that this recursive application 
    109 of Eq.~(\ref{eq:autoreg}) leads to processes with the required standard deviation 
     108The parameters in (\autoref{eq:ord2}) are computed so that this recursive application 
     109of (\autoref{eq:autoreg}) leads to processes with the required standard deviation 
    110110and correlation timescale, with the additional condition that 
    111111the $n-1$ first derivatives of the autocorrelation function 
     
    121121 
    122122\section{Implementation details} 
    123 \label{STO_thech_details} 
     123\label{sec:STO_thech_details} 
    124124 
    125125%---------------------------------------namsbc-------------------------------------------------- 
     
    135135                      (see \href{https://groups.google.com/forum/#!searchin/comp.lang.fortran/64-bit$20KISS$20RNGs}{here}) 
    136136\item[\mdl{stopts}] : stochastic parametrisation associated with the non-linearity of the equation of seawater,  
    137  implementing Eq~\ref{eq:sto_pert} and specific piece of code in the equation of state implementing Eq~\ref{eq:eos_sto}. 
     137 implementing \autoref{eq:sto_pert} and specific piece of code in the equation of state implementing \autoref{eq:eos_sto}. 
    138138\end{description} 
    139139 
    140140The \mdl{stopar} module has 3 public routines to be called by the model (in our case, NEMO): 
    141141 
    142 The first routine (\rou{sto\_par}) is a direct implementation of Eq.~(\ref{eq:autoreg}), 
     142The first routine (\rou{sto\_par}) is a direct implementation of (\autoref{eq:autoreg}), 
    143143applied at each model grid point (in 2D or 3D),  
    144144and called at each model time step ($k$) to update 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_TRA.tex

    r9394 r9407  
    55% ================================================================ 
    66\chapter{Ocean Tracers (TRA)} 
    7 \label{TRA} 
     7\label{chap:TRA} 
    88\minitoc 
    99 
     
    1717%$\ $\newline    % force a new ligne 
    1818 
    19 Using the representation described in Chap.~\ref{DOM}, several semi-discrete  
     19Using the representation described in \autoref{chap:DOM}, several semi-discrete  
    2020space forms of the tracer equations are available depending on the vertical  
    2121coordinate used and on the physics used. In all the equations presented  
     
    4040require complex inputs and complex calculations ($e.g.$ bulk formulae, estimation  
    4141of mixing coefficients) that are carried out in the SBC, LDF and ZDF modules and  
    42 described in chapters \S\ref{SBC}, \S\ref{LDF} and  \S\ref{ZDF}, respectively.  
     42described in \autoref{chap:SBC}, \autoref{chap:LDF} and \autoref{chap:ZDF}, respectively.  
    4343Note that \mdl{tranpc}, the non-penetrative convection module, although  
    4444located in the NEMO/OPA/TRA directory as it directly modifies the tracer fields,  
     
    5757 
    5858The user has the option of extracting each tendency term on the RHS of the tracer  
    59 equation for output (\np{ln\_tra\_trd} or \np{ln\_tra\_mxl}\forcode{ = .true.}), as described in Chap.~\ref{DIA}. 
     59equation for output (\np{ln\_tra\_trd} or \np{ln\_tra\_mxl}\forcode{ = .true.}), as described in \autoref{chap:DIA}. 
    6060 
    6161$\ $\newline    % force a new ligne 
     
    6464% ================================================================ 
    6565\section{Tracer advection (\protect\mdl{traadv})} 
    66 \label{TRA_adv} 
     66\label{sec:TRA_adv} 
    6767%------------------------------------------namtra_adv----------------------------------------------------- 
    6868\forfile{../namelists/namtra_adv} 
     
    7272the advection tendency of a tracer is expressed in flux form,  
    7373$i.e.$ as the divergence of the advective fluxes. Its discrete expression is given by : 
    74 \begin{equation} \label{Eq_tra_adv} 
     74\begin{equation} \label{eq:tra_adv} 
    7575ADV_\tau =-\frac{1}{b_t} \left(  
    7676\;\delta _i \left[ e_{2u}\,e_{3u} \;  u\; \tau _u  \right] 
     
    7979\end{equation} 
    8080where $\tau$ is either T or S, and $b_t= e_{1t}\,e_{2t}\,e_{3t}$ is the volume of $T$-cells.  
    81 The flux form in \eqref{Eq_tra_adv}  
     81The flux form in \autoref{eq:tra_adv}  
    8282implicitly requires the use of the continuity equation. Indeed, it is obtained 
    8383by using the following equality : $\nabla \cdot \left( \vect{U}\,T \right)=\vect{U} \cdot \nabla T$  
     
    8787advection tendency so that it is consistent with the continuity equation in order to  
    8888enforce the conservation properties of the continuous equations. In other words,  
    89 by setting $\tau = 1$ in (\ref{Eq_tra_adv}) we recover the discrete form of  
     89by setting $\tau = 1$ in (\autoref{eq:tra_adv}) we recover the discrete form of  
    9090the continuity equation which is used to calculate the vertical velocity. 
    9191%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    9292\begin{figure}[!t]    \begin{center} 
    9393\includegraphics[width=0.9\textwidth]{Fig_adv_scheme} 
    94 \caption{   \protect\label{Fig_adv_scheme}  
     94\caption{   \protect\label{fig:adv_scheme}  
    9595Schematic representation of some ways used to evaluate the tracer value  
    9696at $u$-point and the amount of tracer exchanged between two neighbouring grid  
     
    107107The key difference between the advection schemes available in \NEMO is the choice  
    108108made in space and time interpolation to define the value of the tracer at the  
    109 velocity points (Fig.~\ref{Fig_adv_scheme}).  
     109velocity points (\autoref{fig:adv_scheme}).  
    110110 
    111111Along solid lateral and bottom boundaries a zero tracer flux is automatically  
     
    131131height, two quantities that are not correlated \citep{Roullet_Madec_JGR00,Griffies_al_MWR01,Campin2004}. 
    132132 
    133 The velocity field that appears in (\ref{Eq_tra_adv}) and (\ref{Eq_tra_adv_zco})  
     133The velocity field that appears in (\autoref{eq:tra_adv}) and (\autoref{eq:tra_adv_zco})  
    134134is the centred (\textit{now}) \textit{effective} ocean velocity, $i.e.$ the \textit{eulerian} velocity 
    135 (see Chap.~\ref{DYN}) plus the eddy induced velocity (\textit{eiv})  
     135(see \autoref{chap:DYN}) plus the eddy induced velocity (\textit{eiv})  
    136136and/or the mixed layer eddy induced velocity (\textit{eiv}) 
    137 when those parameterisations are used (see Chap.~\ref{LDF}). 
     137when those parameterisations are used (see \autoref{chap:LDF}). 
    138138 
    139139Several tracer advection scheme are proposed, namely  
     
    174174% ------------------------------------------------------------------------------------------------------------- 
    175175\subsection{CEN: Centred scheme (\protect\np{ln\_traadv\_cen}\forcode{ = .true.})} 
    176 \label{TRA_adv_cen} 
     176\label{subsec:TRA_adv_cen} 
    177177 
    178178%        2nd order centred scheme   
     
    186186is evaluated as the mean of the two neighbouring $T$-point values.  
    187187For example, in the $i$-direction : 
    188 \begin{equation} \label{Eq_tra_adv_cen2} 
     188\begin{equation} \label{eq:tra_adv_cen2} 
    189189\tau _u^{cen2} =\overline T ^{i+1/2} 
    190190\end{equation} 
     
    195195produce a sensible solution. The associated time-stepping is performed using  
    196196a leapfrog scheme in conjunction with an Asselin time-filter, so $T$ in  
    197 (\ref{Eq_tra_adv_cen2}) is the \textit{now} tracer value.  
     197(\autoref{eq:tra_adv_cen2}) is the \textit{now} tracer value.  
    198198 
    199199Note that using the CEN2, the overall tracer advection is of second  
    200 order accuracy since both (\ref{Eq_tra_adv}) and (\ref{Eq_tra_adv_cen2})  
     200order accuracy since both (\autoref{eq:tra_adv}) and (\autoref{eq:tra_adv_cen2})  
    201201have this order of accuracy. 
    202202 
     
    206206a $4^{th}$ order interpolation, and thus depend on the four neighbouring $T$-points.  
    207207For example, in the $i$-direction: 
    208 \begin{equation} \label{Eq_tra_adv_cen4} 
     208\begin{equation} \label{eq:tra_adv_cen4} 
    209209\tau _u^{cen4}  
    210210=\overline{   T - \frac{1}{6}\,\delta _i \left[ \delta_{i+1/2}[T] \,\right]   }^{\,i+1/2} 
     
    219219Strictly speaking, the CEN4 scheme is not a $4^{th}$ order advection scheme  
    220220but a $4^{th}$ order evaluation of advective fluxes, since the divergence of  
    221 advective fluxes \eqref{Eq_tra_adv} is kept at $2^{nd}$ order.  
     221advective fluxes \autoref{eq:tra_adv} is kept at $2^{nd}$ order.  
    222222The expression \textit{$4^{th}$ order scheme} used in oceanographic literature  
    223223is usually associated with the scheme presented here.  
     
    232232to produce a sensible solution.  
    233233As in CEN2 case, the time-stepping is performed using a leapfrog scheme in conjunction  
    234 with an Asselin time-filter, so $T$ in (\ref{Eq_tra_adv_cen4}) is the \textit{now} tracer. 
     234with an Asselin time-filter, so $T$ in (\autoref{eq:tra_adv_cen4}) is the \textit{now} tracer. 
    235235 
    236236At a $T$-grid cell adjacent to a boundary (coastline, bottom and surface),  
     
    245245% ------------------------------------------------------------------------------------------------------------- 
    246246\subsection{FCT: Flux Corrected Transport scheme (\protect\np{ln\_traadv\_fct}\forcode{ = .true.})} 
    247 \label{TRA_adv_tvd} 
     247\label{subsec:TRA_adv_tvd} 
    248248 
    249249The Flux Corrected Transport schemes (FCT) is used when \np{ln\_traadv\_fct}\forcode{ = .true.}.  
     
    254254In FCT formulation, the tracer at velocity points is evaluated using a combination of  
    255255an upstream and a centred scheme. For example, in the $i$-direction : 
    256 \begin{equation} \label{Eq_tra_adv_fct} 
     256\begin{equation} \label{eq:tra_adv_fct} 
    257257\begin{split} 
    258258\tau _u^{ups}&= \begin{cases} 
     
    280280by vertical advection \citep{Lemarie_OM2015}. Note that in this case, a similar split-explicit  
    281281time stepping should be used on vertical advection of momentum to insure a better stability 
    282 (see \S\ref{DYN_zad}). 
    283  
    284 For stability reasons (see \S\ref{STP}), $\tau _u^{cen}$ is evaluated in (\ref{Eq_tra_adv_fct})  
     282(see \autoref{subsec:DYN_zad}). 
     283 
     284For stability reasons (see \autoref{chap:STP}), $\tau _u^{cen}$ is evaluated in (\autoref{eq:tra_adv_fct})  
    285285using the \textit{now} tracer while $\tau _u^{ups}$ is evaluated using the \textit{before} tracer. In other words,  
    286286the advective part of the scheme is time stepped with a leap-frog scheme  
     
    291291% ------------------------------------------------------------------------------------------------------------- 
    292292\subsection{MUSCL: Monotone Upstream Scheme for Conservative Laws (\protect\np{ln\_traadv\_mus}\forcode{ = .true.})} 
    293 \label{TRA_adv_mus} 
     293\label{subsec:TRA_adv_mus} 
    294294 
    295295The Monotone Upstream Scheme for Conservative Laws (MUSCL) is used when \np{ln\_traadv\_mus}\forcode{ = .true.}.  
     
    298298MUSCL has been first implemented in \NEMO by \citet{Levy_al_GRL01}. In its formulation, the tracer at velocity points  
    299299is evaluated assuming a linear tracer variation between two $T$-points  
    300 (Fig.\ref{Fig_adv_scheme}). For example, in the $i$-direction : 
    301 \begin{equation} \label{Eq_tra_adv_mus} 
     300(\autoref{fig:adv_scheme}). For example, in the $i$-direction : 
     301\begin{equation} \label{eq:tra_adv_mus} 
    302302   \tau _u^{mus} = \left\{      \begin{aligned} 
    303303         &\tau _i  &+ \frac{1}{2} \;\left( 1-\frac{u_{i+1/2} \;\rdt}{e_{1u}} \right) 
     
    323323% ------------------------------------------------------------------------------------------------------------- 
    324324\subsection{UBS a.k.a. UP3: Upstream-Biased Scheme (\protect\np{ln\_traadv\_ubs}\forcode{ = .true.})} 
    325 \label{TRA_adv_ubs} 
     325\label{subsec:TRA_adv_ubs} 
    326326 
    327327The Upstream-Biased Scheme (UBS) is used when \np{ln\_traadv\_ubs}\forcode{ = .true.}.  
     
    332332third order scheme based on an upstream-biased parabolic interpolation.   
    333333For example, in the $i$-direction : 
    334 \begin{equation} \label{Eq_tra_adv_ubs} 
     334\begin{equation} \label{eq:tra_adv_ubs} 
    335335   \tau _u^{ubs} =\overline T ^{i+1/2}-\;\frac{1}{6} \left\{       
    336336   \begin{aligned} 
     
    355355or a $4^th$ order COMPACT scheme (\np{nn\_cen\_v}\forcode{ = 2 or 4}). 
    356356 
    357 For stability reasons  (see \S\ref{STP}), 
    358 the first term  in \eqref{Eq_tra_adv_ubs} (which corresponds to a second order  
     357For stability reasons  (see \autoref{chap:STP}), 
     358the first term  in \autoref{eq:tra_adv_ubs} (which corresponds to a second order  
    359359centred scheme) is evaluated using the \textit{now} tracer (centred in time)  
    360360while the second term (which is the diffusive part of the scheme), is  
     
    362362This choice is discussed by \citet{Webb_al_JAOT98} in the context of the  
    363363QUICK advection scheme. UBS and QUICK schemes only differ  
    364 by one coefficient. Replacing 1/6 with 1/8 in \eqref{Eq_tra_adv_ubs}  
     364by one coefficient. Replacing 1/6 with 1/8 in \autoref{eq:tra_adv_ubs}  
    365365leads to the QUICK advection scheme \citep{Webb_al_JAOT98}.  
    366366This option is not available through a namelist parameter, since the  
     
    368368substitution in the \mdl{traadv\_ubs} module and obtain a QUICK scheme. 
    369369 
    370 Note that it is straightforward to rewrite \eqref{Eq_tra_adv_ubs} as follows: 
    371 \begin{equation} \label{Eq_traadv_ubs2} 
     370Note that it is straightforward to rewrite \autoref{eq:tra_adv_ubs} as follows: 
     371\begin{equation} \label{eq:traadv_ubs2} 
    372372\tau _u^{ubs} = \tau _u^{cen4} + \frac{1}{12} \left\{   
    373373   \begin{aligned} 
     
    377377\end{equation} 
    378378or equivalently  
    379 \begin{equation} \label{Eq_traadv_ubs2b} 
     379\begin{equation} \label{eq:traadv_ubs2b} 
    380380u_{i+1/2} \ \tau _u^{ubs}  
    381381=u_{i+1/2} \ \overline{ T - \frac{1}{6}\,\delta _i\left[ \delta_{i+1/2}[T] \,\right] }^{\,i+1/2} 
     
    383383\end{equation} 
    384384 
    385 \eqref{Eq_traadv_ubs2} has several advantages. Firstly, it clearly reveals  
     385\autoref{eq:traadv_ubs2} has several advantages. Firstly, it clearly reveals  
    386386that the UBS scheme is based on the fourth order scheme to which an  
    387387upstream-biased diffusion term is added. Secondly, this emphasises that the  
    388388$4^{th}$ order part (as well as the $2^{nd}$ order part as stated above) has  
    389 to be evaluated at the \emph{now} time step using \eqref{Eq_tra_adv_ubs}.  
     389to be evaluated at the \emph{now} time step using \autoref{eq:tra_adv_ubs}.  
    390390Thirdly, the diffusion term is in fact a biharmonic operator with an eddy  
    391391coefficient which is simply proportional to the velocity: 
    392392 $A_u^{lm}= \frac{1}{12}\,{e_{1u}}^3\,|u|$. Note the current version of NEMO uses  
    393 the computationally more efficient formulation \eqref{Eq_tra_adv_ubs}. 
     393the computationally more efficient formulation \autoref{eq:tra_adv_ubs}. 
    394394 
    395395% ------------------------------------------------------------------------------------------------------------- 
     
    397397% ------------------------------------------------------------------------------------------------------------- 
    398398\subsection{QCK: QuiCKest scheme (\protect\np{ln\_traadv\_qck}\forcode{ = .true.})} 
    399 \label{TRA_adv_qck} 
     399\label{subsec:TRA_adv_qck} 
    400400 
    401401The Quadratic Upstream Interpolation for Convective Kinematics with  
     
    423423% ================================================================ 
    424424\section{Tracer lateral diffusion (\protect\mdl{traldf})} 
    425 \label{TRA_ldf} 
     425\label{sec:TRA_ldf} 
    426426%-----------------------------------------nam_traldf------------------------------------------------------ 
    427427\forfile{../namelists/namtra_ldf} 
     
    434434$(iii)$ some specific options related to the rotated operators ($i.e.$ non-iso-level operator), and  
    435435$(iv)$  the specification of eddy diffusivity coefficient (either constant or variable in space and time). 
    436 Item $(iv)$ will be described in Chap.\ref{LDF} . 
     436Item $(iv)$ will be described in \autoref{chap:LDF} . 
    437437The direction along which the operators act is defined through the slope between this direction and the iso-level surfaces. 
    438 The slope is computed in the \mdl{ldfslp} module and will also be described in Chap.~\ref{LDF}.  
     438The slope is computed in the \mdl{ldfslp} module and will also be described in \autoref{chap:LDF}.  
    439439 
    440440The lateral diffusion of tracers is evaluated using a forward scheme,  
    441441$i.e.$ the tracers appearing in its expression are the \textit{before} tracers in time,  
    442442except for the pure vertical component that appears when a rotation tensor is used.  
    443 This latter component is solved implicitly together with the vertical diffusion term (see \S\ref{STP}).  
     443This latter component is solved implicitly together with the vertical diffusion term (see \autoref{chap:STP}).  
    444444When \np{ln\_traldf\_msc}\forcode{ = .true.}, a Method of Stabilizing Correction is used in which  
    445445the pure vertical component is split into an explicit and an implicit part \citep{Lemarie_OM2012}. 
     
    450450\subsection[Type of operator (\protect\np{ln\_traldf}\{\_NONE,\_lap,\_blp\}\})] 
    451451              {Type of operator (\protect\np{ln\_traldf\_NONE}, \protect\np{ln\_traldf\_lap}, or \protect\np{ln\_traldf\_blp}) }  
    452 \label{TRA_ldf_op} 
     452\label{subsec:TRA_ldf_op} 
    453453 
    454454Three operator options are proposed and, one and only one of them must be selected: 
     
    459459\item [\np{ln\_traldf\_lap}\forcode{ = .true.}]: a laplacian operator is selected. This harmonic operator  
    460460takes the following expression:  $\mathpzc{L}(T)=\nabla \cdot A_{ht}\;\nabla T $,  
    461 where the gradient operates along the selected direction (see \S\ref{TRA_ldf_dir}), 
    462 and $A_{ht}$ is the eddy diffusivity coefficient expressed in $m^2/s$ (see Chap.~\ref{LDF}). 
     461where the gradient operates along the selected direction (see \autoref{subsec:TRA_ldf_dir}), 
     462and $A_{ht}$ is the eddy diffusivity coefficient expressed in $m^2/s$ (see \autoref{chap:LDF}). 
    463463\item [\np{ln\_traldf\_blp}\forcode{ = .true.}]: a bilaplacian operator is selected. This biharmonic operator  
    464464takes the following expression:   
    465465$\mathpzc{B}=- \mathpzc{L}\left(\mathpzc{L}(T) \right) = -\nabla \cdot b\nabla \left( {\nabla \cdot b\nabla T} \right)$  
    466466where the gradient operats along the selected direction, 
    467 and $b^2=B_{ht}$ is the eddy diffusivity coefficient expressed in $m^4/s$  (see Chap.~\ref{LDF}). 
     467and $b^2=B_{ht}$ is the eddy diffusivity coefficient expressed in $m^4/s$  (see \autoref{chap:LDF}). 
    468468In the code, the bilaplacian operator is obtained by calling the laplacian twice. 
    469469\end{description} 
     
    483483\subsection[Action direction (\protect\np{ln\_traldf}\{\_lev,\_hor,\_iso,\_triad\})] 
    484484              {Direction of action (\protect\np{ln\_traldf\_lev}, \protect\np{ln\_traldf\_hor}, \protect\np{ln\_traldf\_iso}, or \protect\np{ln\_traldf\_triad}) }  
    485 \label{TRA_ldf_dir} 
     485\label{subsec:TRA_ldf_dir} 
    486486 
    487487The choice of a direction of action determines the form of operator used.  
     
    509509% ------------------------------------------------------------------------------------------------------------- 
    510510\subsection{Iso-level (bi-)laplacian operator ( \protect\np{ln\_traldf\_iso}) } 
    511 \label{TRA_ldf_lev} 
     511\label{subsec:TRA_ldf_lev} 
    512512 
    513513The laplacian diffusion operator acting along the model (\textit{i,j})-surfaces is given by:  
    514 \begin{equation} \label{Eq_tra_ldf_lap} 
     514\begin{equation} \label{eq:tra_ldf_lap} 
    515515D_t^{lT} =\frac{1}{b_t} \left( \; 
    516516   \delta _{i}\left[ A_u^{lT} \; \frac{e_{2u}\,e_{3u}}{e_{1u}} \;\delta _{i+1/2} [T] \right]  
     
    533533Note that in the partial step $z$-coordinate (\np{ln\_zps}\forcode{ = .true.}), tracers in horizontally  
    534534adjacent cells are located at different depths in the vicinity of the bottom.  
    535 In this case, horizontal derivatives in (\ref{Eq_tra_ldf_lap}) at the bottom level  
     535In this case, horizontal derivatives in (\autoref{eq:tra_ldf_lap}) at the bottom level  
    536536require a specific treatment. They are calculated in the \mdl{zpshde} module,  
    537 described in \S\ref{TRA_zpshde}. 
     537described in \autoref{sec:TRA_zpshde}. 
    538538 
    539539 
     
    542542% ------------------------------------------------------------------------------------------------------------- 
    543543\subsection{Standard and triad (bi-)laplacian operator} 
    544 \label{TRA_ldf_iso_triad} 
     544\label{subsec:TRA_ldf_iso_triad} 
    545545 
    546546%&&    Standard rotated (bi-)laplacian operator 
    547547%&& ---------------------------------------------- 
    548548\subsubsection{Standard rotated (bi-)laplacian operator (\protect\mdl{traldf\_iso})} 
    549 \label{TRA_ldf_iso} 
     549\label{subsec:TRA_ldf_iso} 
    550550The general form of the second order lateral tracer subgrid scale physics  
    551 (\ref{Eq_PE_zdf}) takes the following semi-discrete space form in $z$- and $s$-coordinates: 
    552 \begin{equation} \label{Eq_tra_ldf_iso} 
     551(\autoref{eq:PE_zdf}) takes the following semi-discrete space form in $z$- and $s$-coordinates: 
     552\begin{equation} \label{eq:tra_ldf_iso} 
    553553\begin{split} 
    554554 D_T^{lT} = \frac{1}{b_t}   & \left\{   \,\;\delta_i \left[   A_u^{lT}  \left(  
     
    576576in addition to \np{ln\_traldf\_lap}\forcode{ = .true.}, we have \np{ln\_traldf\_iso}\forcode{ = .true.},  
    577577or both \np{ln\_traldf\_hor}\forcode{ = .true.} and \np{ln\_zco}\forcode{ = .true.}. The way these  
    578 slopes are evaluated is given in \S\ref{LDF_slp}. At the surface, bottom  
     578slopes are evaluated is given in \autoref{sec:LDF_slp}. At the surface, bottom  
    579579and lateral boundaries, the turbulent fluxes of heat and salt are set to zero  
    580 using the mask technique (see \S\ref{LBC_coast}).  
    581  
    582 The operator in \eqref{Eq_tra_ldf_iso} involves both lateral and vertical  
     580using the mask technique (see \autoref{sec:LBC_coast}).  
     581 
     582The operator in \autoref{eq:tra_ldf_iso} involves both lateral and vertical  
    583583derivatives. For numerical stability, the vertical second derivative must  
    584584be solved using the same implicit time scheme as that used in the vertical  
    585 physics (see \S\ref{TRA_zdf}). For computer efficiency reasons, this term  
     585physics (see \autoref{sec:TRA_zdf}). For computer efficiency reasons, this term  
    586586is not computed in the \mdl{traldf\_iso} module, but in the \mdl{trazdf} module  
    587587where, if iso-neutral mixing is used, the vertical mixing coefficient is simply  
     
    590590This formulation conserves the tracer but does not ensure the decrease  
    591591of the tracer variance. Nevertheless the treatment performed on the slopes  
    592 (see \S\ref{LDF}) allows the model to run safely without any additional  
     592(see \autoref{chap:LDF}) allows the model to run safely without any additional  
    593593background horizontal diffusion \citep{Guilyardi_al_CD01}.  
    594594 
    595595Note that in the partial step $z$-coordinate (\np{ln\_zps}\forcode{ = .true.}), the horizontal derivatives  
    596 at the bottom level in \eqref{Eq_tra_ldf_iso} require a specific treatment.  
    597 They are calculated in module zpshde, described in \S\ref{TRA_zpshde}. 
     596at the bottom level in \autoref{eq:tra_ldf_iso} require a specific treatment.  
     597They are calculated in module zpshde, described in \autoref{sec:TRA_zpshde}. 
    598598 
    599599%&&     Triad rotated (bi-)laplacian operator 
    600600%&&  ------------------------------------------- 
    601601\subsubsection{Triad rotated (bi-)laplacian operator (\protect\np{ln\_traldf\_triad})} 
    602 \label{TRA_ldf_triad} 
    603  
    604 If the Griffies triad scheme is employed (\np{ln\_traldf\_triad}\forcode{ = .true.} ; see App.\ref{sec:triad})  
     602\label{subsec:TRA_ldf_triad} 
     603 
     604If the Griffies triad scheme is employed (\np{ln\_traldf\_triad}\forcode{ = .true.} ; see \autoref{apdx:triad})  
    605605 
    606606An alternative scheme developed by \cite{Griffies_al_JPO98} which ensures tracer variance decreases  
    607607is also available in \NEMO (\np{ln\_traldf\_grif}\forcode{ = .true.}). A complete description of  
    608 the algorithm is given in App.\ref{sec:triad}. 
     608the algorithm is given in \autoref{apdx:triad}. 
    609609 
    610610The lateral fourth order bilaplacian operator on tracers is obtained by  
    611 applying (\ref{Eq_tra_ldf_lap}) twice. The operator requires an additional assumption  
     611applying (\autoref{eq:tra_ldf_lap}) twice. The operator requires an additional assumption  
    612612on boundary conditions: both first and third derivative terms normal to the  
    613613coast are set to zero. 
    614614 
    615615The lateral fourth order operator formulation on tracers is obtained by  
    616 applying (\ref{Eq_tra_ldf_iso}) twice. It requires an additional assumption  
     616applying (\autoref{eq:tra_ldf_iso}) twice. It requires an additional assumption  
    617617on boundary conditions: first and third derivative terms normal to the  
    618618coast, normal to the bottom and normal to the surface are set to zero.  
     
    621621%&& ---------------------------------------------- 
    622622\subsubsection{Option for the rotated operators} 
    623 \label{TRA_ldf_options} 
     623\label{subsec:TRA_ldf_options} 
    624624 
    625625\np{ln\_traldf\_msc} = Method of Stabilizing Correction (both operators) 
     
    637637% ================================================================ 
    638638\section{Tracer vertical diffusion (\protect\mdl{trazdf})} 
    639 \label{TRA_zdf} 
     639\label{sec:TRA_zdf} 
    640640%--------------------------------------------namzdf--------------------------------------------------------- 
    641641\forfile{../namelists/namzdf} 
     
    645645The formulation of the vertical subgrid scale tracer physics is the same  
    646646for all the vertical coordinates, and is based on a laplacian operator.  
    647 The vertical diffusion operator given by (\ref{Eq_PE_zdf}) takes the  
     647The vertical diffusion operator given by (\autoref{eq:PE_zdf}) takes the  
    648648following semi-discrete space form: 
    649 \begin{equation} \label{Eq_tra_zdf} 
     649\begin{equation} \label{eq:tra_zdf} 
    650650\begin{split} 
    651651D^{vT}_T &= \frac{1}{e_{3t}} \; \delta_k \left[ \;\frac{A^{vT}_w}{e_{3w}}  \delta_{k+1/2}[T] \;\right]  
     
    658658$A_w^{vT}=A_w^{vS}$ except when double diffusive mixing is  
    659659parameterised ($i.e.$ \key{zdfddm} is defined). The way these coefficients  
    660 are evaluated is given in \S\ref{ZDF} (ZDF). Furthermore, when  
     660are evaluated is given in \autoref{chap:ZDF} (ZDF). Furthermore, when  
    661661iso-neutral mixing is used, both mixing coefficients are increased  
    662662by $\frac{e_{1w}\,e_{2w} }{e_{3w} }\ \left( {r_{1w} ^2+r_{2w} ^2} \right)$  
    663 to account for the vertical second derivative of \eqref{Eq_tra_ldf_iso}.  
     663to account for the vertical second derivative of \autoref{eq:tra_ldf_iso}.  
    664664 
    665665At the surface and bottom boundaries, the turbulent fluxes of  
    666666heat and salt must be specified. At the surface they are prescribed  
    667 from the surface forcing and added in a dedicated routine (see \S\ref{TRA_sbc}),  
     667from the surface forcing and added in a dedicated routine (see \autoref{subsec:TRA_sbc}),  
    668668whilst at the bottom they are set to zero for heat and salt unless  
    669669a geothermal flux forcing is prescribed as a bottom boundary  
    670 condition (see \S\ref{TRA_bbc}).  
     670condition (see \autoref{subsec:TRA_bbc}).  
    671671 
    672672The large eddy coefficient found in the mixed layer together with high  
     
    684684% ================================================================ 
    685685\section{External forcing} 
    686 \label{TRA_sbc_qsr_bbc} 
     686\label{sec:TRA_sbc_qsr_bbc} 
    687687 
    688688% ------------------------------------------------------------------------------------------------------------- 
     
    690690% ------------------------------------------------------------------------------------------------------------- 
    691691\subsection{Surface boundary condition (\protect\mdl{trasbc})} 
    692 \label{TRA_sbc} 
     692\label{subsec:TRA_sbc} 
    693693 
    694694The surface boundary condition for tracers is implemented in a separate  
     
    703703of the ocean is due both to the heat and salt fluxes crossing the sea surface (not linked with $F_{mass}$)  
    704704and to the heat and salt content of the mass exchange. They are both included directly in $Q_{ns}$,  
    705 the surface heat flux, and $F_{salt}$, the surface salt flux (see \S\ref{SBC} for further details). 
     705the surface heat flux, and $F_{salt}$, the surface salt flux (see \autoref{chap:SBC} for further details). 
    706706By doing this, the forcing formulation is the same for any tracer (including temperature and salinity). 
    707707 
    708 The surface module (\mdl{sbcmod}, see \S\ref{SBC}) provides the following  
     708The surface module (\mdl{sbcmod}, see \autoref{chap:SBC}) provides the following  
    709709forcing fields (used on tracers): 
    710710 
    711711$\bullet$ $Q_{ns}$, the non-solar part of the net surface heat flux that crosses the sea surface  
    712712(i.e. the difference between the total surface heat flux and the fraction of the short wave flux that  
    713 penetrates into the water column, see \S\ref{TRA_qsr}) plus the heat content associated with  
     713penetrates into the water column, see \autoref{subsec:TRA_qsr}) plus the heat content associated with  
    714714of the mass exchange with the atmosphere and lands. 
    715715 
     
    720720 
    721721$\bullet$ \textit{rnf}, the mass flux associated with runoff  
    722 (see \S\ref{SBC_rnf} for further detail of how it acts on temperature and salinity tendencies) 
     722(see \autoref{sec:SBC_rnf} for further detail of how it acts on temperature and salinity tendencies) 
    723723 
    724724$\bullet$ \textit{fwfisf}, the mass flux associated with ice shelf melt,  
    725 (see \S\ref{SBC_isf} for further details on how the ice shelf melt is computed and applied). 
     725(see \autoref{sec:SBC_isf} for further details on how the ice shelf melt is computed and applied). 
    726726 
    727727The surface boundary condition on temperature and salinity is applied as follows: 
    728 \begin{equation} \label{Eq_tra_sbc} 
     728\begin{equation} \label{eq:tra_sbc} 
    729729\begin{aligned} 
    730730 &F^T = \frac{ 1 }{\rho _o \;C_p \,\left. e_{3t} \right|_{k=1} }  &\overline{ Q_{ns}       }^t  & \\  
     
    734734where $\overline{x }^t$ means that $x$ is averaged over two consecutive time steps  
    735735($t-\rdt/2$ and $t+\rdt/2$). Such time averaging prevents the  
    736 divergence of odd and even time step (see \S\ref{STP}). 
     736divergence of odd and even time step (see \autoref{chap:STP}). 
    737737 
    738738In the linear free surface case (\np{ln\_linssh}\forcode{ = .true.}),  
     
    742742would have resulted from a change in the volume of the first level. 
    743743The resulting surface boundary condition is applied as follows: 
    744 \begin{equation} \label{Eq_tra_sbc_lin} 
     744\begin{equation} \label{eq:tra_sbc_lin} 
    745745\begin{aligned} 
    746746 &F^T = \frac{ 1 }{\rho _o \;C_p \,\left. e_{3t} \right|_{k=1} }    
     
    754754In the linear free surface case, there is a small imbalance. The imbalance is larger  
    755755than the imbalance associated with the Asselin time filter \citep{Leclair_Madec_OM09}.  
    756 This is the reason why the modified filter is not applied in the linear free surface case (see \S\ref{STP}). 
     756This is the reason why the modified filter is not applied in the linear free surface case (see \autoref{chap:STP}). 
    757757 
    758758% ------------------------------------------------------------------------------------------------------------- 
     
    760760% ------------------------------------------------------------------------------------------------------------- 
    761761\subsection{Solar radiation penetration (\protect\mdl{traqsr})} 
    762 \label{TRA_qsr} 
     762\label{subsec:TRA_qsr} 
    763763%--------------------------------------------namqsr-------------------------------------------------------- 
    764764\forfile{../namelists/namtra_qsr} 
    765765%-------------------------------------------------------------------------------------------------------------- 
    766766 
    767 Options are defined through the  \ngn{namtra\_qsr} namelist variables. 
     767Options are defined through the \ngn{namtra\_qsr} namelist variables. 
    768768When the penetrative solar radiation option is used (\np{ln\_flxqsr}\forcode{ = .true.}),  
    769769the solar radiation penetrates the top few tens of meters of the ocean. If it is not used  
    770770(\np{ln\_flxqsr}\forcode{ = .false.}) all the heat flux is absorbed in the first ocean level.  
    771771Thus, in the former case a term is added to the time evolution equation of  
    772 temperature \eqref{Eq_PE_tra_T} and the surface boundary condition is  
     772temperature \autoref{eq:PE_tra_T} and the surface boundary condition is  
    773773modified to take into account only the non-penetrative part of the surface  
    774774heat flux: 
    775 \begin{equation} \label{Eq_PE_qsr} 
     775\begin{equation} \label{eq:PE_qsr} 
    776776\begin{split} 
    777777\frac{\partial T}{\partial t} &= {\ldots} + \frac{1}{\rho_o\, C_p \,e_3} \; \frac{\partial I}{\partial k}   \\ 
     
    781781where $Q_{sr}$ is the penetrative part of the surface heat flux ($i.e.$ the shortwave radiation)  
    782782and $I$ is the downward irradiance ($\left. I \right|_{z=\eta}=Q_{sr}$).  
    783 The additional term in \eqref{Eq_PE_qsr} is discretized as follows: 
    784 \begin{equation} \label{Eq_tra_qsr} 
     783The additional term in \autoref{eq:PE_qsr} is discretized as follows: 
     784\begin{equation} \label{eq:tra_qsr} 
    785785\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] 
    786786\end{equation} 
    787787 
    788 The shortwave radiation,  $Q_{sr}$, consists of energy distributed across a wide spectral range.  
     788The shortwave radiation, $Q_{sr}$, consists of energy distributed across a wide spectral range.  
    789789The ocean is strongly absorbing for wavelengths longer than 700~nm and these  
    790790wavelengths contribute to heating the upper few tens of centimetres. The fraction of $Q_{sr}$  
    791791that resides in these almost non-penetrative wavebands, $R$, is $\sim 58\%$ (specified  
    792 through namelist parameter \np{rn\_abs}).  It is assumed to penetrate the ocean  
     792through namelist parameter \np{rn\_abs}). It is assumed to penetrate the ocean  
    793793with a decreasing exponential profile, with an e-folding depth scale, $\xi_0$,  
    794 of a few tens of centimetres (typically $\xi_0=0.35~m$ set as \np{rn\_si0} in the namtra\_qsr namelist). 
     794of a few tens of centimetres (typically $\xi_0=0.35~m$ set as \np{rn\_si0} in the \ngn{namtra\_qsr} namelist). 
    795795For shorter wavelengths (400-700~nm), the ocean is more transparent, and solar energy  
    796796propagates to larger depths where it contributes to  
    797797local heating.  
    798798The way this second part of the solar energy penetrates into the ocean depends on  
    799 which formulation is chosen. In the simple 2-waveband light penetration scheme  (\np{ln\_qsr\_2bd}\forcode{ = .true.})  
     799which formulation is chosen. In the simple 2-waveband light penetration scheme (\np{ln\_qsr\_2bd}\forcode{ = .true.})  
    800800a chlorophyll-independent monochromatic formulation is chosen for the shorter wavelengths,  
    801 leading to the following expression  \citep{Paulson1977}: 
    802 \begin{equation} \label{Eq_traqsr_iradiance} 
     801leading to the following expression \citep{Paulson1977}: 
     802\begin{equation} \label{eq:traqsr_iradiance} 
    803803I(z) = Q_{sr} \left[Re^{-z / \xi_0} + \left( 1-R\right) e^{-z / \xi_1} \right] 
    804804\end{equation} 
     
    810810Such assumptions have been shown to provide a very crude and simplistic  
    811811representation of observed light penetration profiles (\cite{Morel_JGR88}, see also  
    812 Fig.\ref{Fig_traqsr_irradiance}). Light absorption in the ocean depends on  
     812\autoref{fig:traqsr_irradiance}). Light absorption in the ocean depends on  
    813813particle concentration and is spectrally selective. \cite{Morel_JGR88} has shown  
    814814that an accurate representation of light penetration can be provided by a 61 waveband  
     
    819819attenuation coefficient is fitted to the coefficients computed from the full spectral model  
    820820of \cite{Morel_JGR88} (as modified by \cite{Morel_Maritorena_JGR01}), assuming  
    821 the same power-law relationship. As shown in Fig.\ref{Fig_traqsr_irradiance},  
     821the same power-law relationship. As shown in \autoref{fig:traqsr_irradiance},  
    822822this formulation, called RGB (Red-Green-Blue), reproduces quite closely  
    823823the light penetration profiles predicted by the full spectal model, but with much greater  
     
    842842light limitation in PISCES or LOBSTER and the oceanic heating rate.  
    843843\end{description}  
    844 The trend in \eqref{Eq_tra_qsr} associated with the penetration of the solar radiation  
     844The trend in \autoref{eq:tra_qsr} associated with the penetration of the solar radiation  
    845845is added to the temperature trend, and the surface heat flux is modified in routine \mdl{traqsr}.  
    846846 
     
    857857\begin{figure}[!t]     \begin{center} 
    858858\includegraphics[width=1.0\textwidth]{Fig_TRA_Irradiance} 
    859 \caption{    \protect\label{Fig_traqsr_irradiance} 
     859\caption{    \protect\label{fig:traqsr_irradiance} 
    860860Penetration profile of the downward solar irradiance calculated by four models.  
    861861Two waveband chlorophyll-independent formulation (blue), a chlorophyll-dependent  
     
    870870% ------------------------------------------------------------------------------------------------------------- 
    871871\subsection{Bottom boundary condition (\protect\mdl{trabbc})} 
    872 \label{TRA_bbc} 
     872\label{subsec:TRA_bbc} 
    873873%--------------------------------------------nambbc-------------------------------------------------------- 
    874874\forfile{../namelists/nambbc} 
     
    877877\begin{figure}[!t]     \begin{center} 
    878878\includegraphics[width=1.0\textwidth]{Fig_TRA_geoth} 
    879 \caption{   \protect\label{Fig_geothermal} 
     879\caption{   \protect\label{fig:geothermal} 
    880880Geothermal Heat flux (in $mW.m^{-2}$) used by \cite{Emile-Geay_Madec_OS09}. 
    881881It is inferred from the age of the sea floor and the formulae of \citet{Stein_Stein_Nat92}.} 
     
    902902When  \np{nn\_geoflx} is set to 2, a spatially varying geothermal heat flux is  
    903903introduced which is provided in the \ifile{geothermal\_heating} NetCDF file  
    904 (Fig.\ref{Fig_geothermal}) \citep{Emile-Geay_Madec_OS09}. 
     904(\autoref{fig:geothermal}) \citep{Emile-Geay_Madec_OS09}. 
    905905 
    906906% ================================================================ 
     
    908908% ================================================================ 
    909909\section{Bottom boundary layer (\protect\mdl{trabbl} - \protect\key{trabbl})} 
    910 \label{TRA_bbl} 
     910\label{sec:TRA_bbl} 
    911911%--------------------------------------------nambbl--------------------------------------------------------- 
    912912\forfile{../namelists/nambbl} 
     
    943943% ------------------------------------------------------------------------------------------------------------- 
    944944\subsection{Diffusive bottom boundary layer (\protect\np{nn\_bbl\_ldf}\forcode{ = 1})} 
    945 \label{TRA_bbl_diff} 
     945\label{subsec:TRA_bbl_diff} 
    946946 
    947947When applying sigma-diffusion (\key{trabbl} defined and \np{nn\_bbl\_ldf} set to 1),  
    948948the diffusive flux between two adjacent cells at the ocean floor is given by  
    949 \begin{equation} \label{Eq_tra_bbl_diff} 
     949\begin{equation} \label{eq:tra_bbl_diff} 
    950950{\rm {\bf F}}_\sigma=A_l^\sigma \; \nabla_\sigma T 
    951951\end{equation}  
     
    953953and  $A_l^\sigma$ the lateral diffusivity in the BBL. Following \citet{Beckmann_Doscher1997},  
    954954the latter is prescribed with a spatial dependence, $i.e.$ in the conditional form 
    955 \begin{equation} \label{Eq_tra_bbl_coef} 
     955\begin{equation} \label{eq:tra_bbl_coef} 
    956956A_l^\sigma (i,j,t)=\left\{ {\begin{array}{l} 
    957957 A_{bbl}  \quad \quad   \mbox{if}  \quad   \nabla_\sigma \rho  \cdot  \nabla H<0 \\  
     
    962962where $A_{bbl}$ is the BBL diffusivity coefficient, given by the namelist  
    963963parameter \np{rn\_ahtbbl} and usually set to a value much larger  
    964 than the one used for lateral mixing in the open ocean. The constraint in \eqref{Eq_tra_bbl_coef}  
     964than the one used for lateral mixing in the open ocean. The constraint in \autoref{eq:tra_bbl_coef}  
    965965implies that sigma-like diffusion only occurs when the density above the sea floor, at the top of  
    966 the slope, is larger than in the deeper ocean (see green arrow in Fig.\ref{Fig_bbl}).  
     966the slope, is larger than in the deeper ocean (see green arrow in \autoref{fig:bbl}).  
    967967In practice, this constraint is applied separately in the two horizontal directions,  
    968 and the density gradient in \eqref{Eq_tra_bbl_coef} is evaluated with the log gradient formulation:  
    969 \begin{equation} \label{Eq_tra_bbl_Drho} 
     968and the density gradient in \autoref{eq:tra_bbl_coef} is evaluated with the log gradient formulation:  
     969\begin{equation} \label{eq:tra_bbl_Drho} 
    970970   \nabla_\sigma \rho / \rho = \alpha \,\nabla_\sigma T + \beta   \,\nabla_\sigma S 
    971971\end{equation}  
     
    978978% ------------------------------------------------------------------------------------------------------------- 
    979979\subsection{Advective bottom boundary layer  (\protect\np{nn\_bbl\_adv}\forcode{ = 1..2})} 
    980 \label{TRA_bbl_adv} 
     980\label{subsec:TRA_bbl_adv} 
    981981 
    982982\sgacomment{"downsloping flow" has been replaced by "downslope flow" in the following 
     
    986986\begin{figure}[!t]   \begin{center} 
    987987\includegraphics[width=0.7\textwidth]{Fig_BBL_adv} 
    988 \caption{   \protect\label{Fig_bbl}   
     988\caption{   \protect\label{fig:bbl}   
    989989Advective/diffusive Bottom Boundary Layer. The BBL parameterisation is  
    990990activated when $\rho^i_{kup}$ is larger than $\rho^{i+1}_{kdnw}$.  
     
    10111011 
    10121012\np{nn\_bbl\_adv}\forcode{ = 1} : the downslope velocity is chosen to be the Eulerian 
    1013 ocean velocity just above the topographic step (see black arrow in Fig.\ref{Fig_bbl})  
     1013ocean velocity just above the topographic step (see black arrow in \autoref{fig:bbl})  
    10141014\citep{Beckmann_Doscher1997}. It is a \textit{conditional advection}, that is, advection 
    10151015is allowed only if dense water overlies less dense water on the slope ($i.e.$  
     
    10211021The advection is allowed only  if dense water overlies less dense water on the slope ($i.e.$  
    10221022$\nabla_\sigma \rho  \cdot  \nabla H<0$). For example, the resulting transport of the  
    1023 downslope flow, here in the $i$-direction (Fig.\ref{Fig_bbl}), is simply given by the  
     1023downslope flow, here in the $i$-direction (\autoref{fig:bbl}), is simply given by the  
    10241024following expression: 
    1025 \begin{equation} \label{Eq_bbl_Utr} 
     1025\begin{equation} \label{eq:bbl_Utr} 
    10261026 u^{tr}_{bbl} = \gamma \, g \frac{\Delta \rho}{\rho_o}  e_{1u} \; min \left( {e_{3u}}_{kup},{e_{3u}}_{kdwn} \right) 
    10271027\end{equation} 
     
    10391039water at intermediate depths. The entrainment is replaced by the vertical mixing  
    10401040implicit in the advection scheme. Let us consider as an example the  
    1041 case displayed in Fig.\ref{Fig_bbl} where the density at level $(i,kup)$ is  
     1041case displayed in \autoref{fig:bbl} where the density at level $(i,kup)$ is  
    10421042larger than the one at level $(i,kdwn)$. The advective BBL scheme 
    10431043modifies the tracer time tendency of the ocean cells near the  
    1044 topographic step by the downslope flow \eqref{Eq_bbl_dw},  
    1045 the horizontal \eqref{Eq_bbl_hor}  and the upward \eqref{Eq_bbl_up}  
     1044topographic step by the downslope flow \autoref{eq:bbl_dw},  
     1045the horizontal \autoref{eq:bbl_hor} and the upward \autoref{eq:bbl_up}  
    10461046return flows as follows:  
    10471047\begin{align}  
    10481048\partial_t T^{do}_{kdw} &\equiv \partial_t T^{do}_{kdw} 
    1049                                      +  \frac{u^{tr}_{bbl}}{{b_t}^{do}_{kdw}}  \left( T^{sh}_{kup} - T^{do}_{kdw} \right)  \label{Eq_bbl_dw} \\ 
     1049                                     +  \frac{u^{tr}_{bbl}}{{b_t}^{do}_{kdw}}  \left( T^{sh}_{kup} - T^{do}_{kdw} \right)  \label{eq:bbl_dw} \\ 
    10501050% 
    10511051\partial_t T^{sh}_{kup} &\equiv \partial_t T^{sh}_{kup}  
    1052                + \frac{u^{tr}_{bbl}}{{b_t}^{sh}_{kup}}   \left( T^{do}_{kup} - T^{sh}_{kup} \right)   \label{Eq_bbl_hor} \\ 
     1052               + \frac{u^{tr}_{bbl}}{{b_t}^{sh}_{kup}}   \left( T^{do}_{kup} - T^{sh}_{kup} \right)   \label{eq:bbl_hor} \\ 
    10531053% 
    10541054\intertext{and for $k =kdw-1,\;..., \; kup$ :}  
    10551055% 
    10561056\partial_t T^{do}_{k} &\equiv \partial_t S^{do}_{k} 
    1057                + \frac{u^{tr}_{bbl}}{{b_t}^{do}_{k}}   \left( T^{do}_{k+1} - T^{sh}_{k} \right)   \label{Eq_bbl_up} 
     1057               + \frac{u^{tr}_{bbl}}{{b_t}^{do}_{k}}   \left( T^{do}_{k+1} - T^{sh}_{k} \right)   \label{eq:bbl_up} 
    10581058\end{align} 
    10591059where $b_t$ is the $T$-cell volume.  
     
    10671067% ================================================================ 
    10681068\section{Tracer damping (\protect\mdl{tradmp})} 
    1069 \label{TRA_dmp} 
     1069\label{sec:TRA_dmp} 
    10701070%--------------------------------------------namtra_dmp------------------------------------------------- 
    10711071\forfile{../namelists/namtra_dmp} 
     
    10741074In some applications it can be useful to add a Newtonian damping term  
    10751075into the temperature and salinity equations: 
    1076 \begin{equation} \label{Eq_tra_dmp} 
     1076\begin{equation} \label{eq:tra_dmp} 
    10771077\begin{split} 
    10781078 \frac{\partial T}{\partial t}=\;\cdots \;-\gamma \,\left( {T-T_o } \right)  \\ 
     
    10871087in \textit{namtsd} namelist as well as \np{sn\_tem} and \np{sn\_sal} structures are  
    10881088correctly set  ($i.e.$ that $T_o$ and $S_o$ are provided in input files and read  
    1089 using \mdl{fldread}, see \S\ref{SBC_fldread}).  
     1089using \mdl{fldread}, see \autoref{subsec:SBC_fldread}).  
    10901090The 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. 
    10911091 
    1092 The two main cases in which \eqref{Eq_tra_dmp} is used are \textit{(a)}  
     1092The two main cases in which \autoref{eq:tra_dmp} is used are \textit{(a)}  
    10931093the specification of the boundary conditions along artificial walls of a  
    10941094limited domain basin and \textit{(b)} the computation of the velocity  
     
    11511151% ================================================================ 
    11521152\section{Tracer time evolution (\protect\mdl{tranxt})} 
    1153 \label{TRA_nxt} 
     1153\label{sec:TRA_nxt} 
    11541154%--------------------------------------------namdom----------------------------------------------------- 
    11551155\forfile{../namelists/namdom} 
     
    11591159The general framework for tracer time stepping is a modified leap-frog scheme  
    11601160\citep{Leclair_Madec_OM09}, $i.e.$ a three level centred time scheme associated  
    1161 with a Asselin time filter (cf. \S\ref{STP_mLF}): 
    1162 \begin{equation} \label{Eq_tra_nxt} 
     1161with a Asselin time filter (cf. \autoref{sec:STP_mLF}): 
     1162\begin{equation} \label{eq:tra_nxt} 
    11631163\begin{aligned} 
    11641164(e_{3t}T)^{t+\rdt} &= (e_{3t}T)_f^{t-\rdt} &+ 2 \, \rdt  \,e_{3t}^t\ \text{RHS}^t & \\ 
     
    11741174$\gamma$ is initialized as \np{rn\_atfp} (\textbf{namelist} parameter).  
    11751175Its default value is \np{rn\_atfp}\forcode{ = 10.e-3}. Note that the forcing correction term in the filter 
    1176 is not applied in linear free surface (\jp{lk\_vvl}\forcode{ = .false.}) (see \S\ref{TRA_sbc}. 
     1176is not applied in linear free surface (\jp{lk\_vvl}\forcode{ = .false.}) (see \autoref{subsec:TRA_sbc}. 
    11771177Not also that in constant volume case, the time stepping is performed on $T$,  
    11781178not on its content, $e_{3t}T$. 
     
    11891189% ================================================================ 
    11901190\section{Equation of state (\protect\mdl{eosbn2}) } 
    1191 \label{TRA_eosbn2} 
     1191\label{sec:TRA_eosbn2} 
    11921192%--------------------------------------------nameos----------------------------------------------------- 
    11931193\forfile{../namelists/nameos} 
     
    11981198% ------------------------------------------------------------------------------------------------------------- 
    11991199\subsection{Equation of seawater (\protect\np{nn\_eos}\forcode{ = -1..1})} 
    1200 \label{TRA_eos} 
     1200\label{subsec:TRA_eos} 
    12011201 
    12021202The Equation Of Seawater (EOS) is an empirical nonlinear thermodynamic relationship  
     
    12721272and \textit{practical} salinity. 
    12731273S-EOS takes the following expression: 
    1274 \begin{equation} \label{Eq_tra_S-EOS} 
     1274\begin{equation} \label{eq:tra_S-EOS} 
    12751275\begin{split} 
    12761276  d_a(T,S,z)  =  ( & - a_0 \; ( 1 + 0.5 \; \lambda_1 \; T_a + \mu_1 \; z ) * T_a  \\ 
     
    12801280\end{split} 
    12811281\end{equation}  
    1282 where the computer name of the coefficients as well as their standard value are given in \ref{Tab_SEOS}. 
     1282where the computer name of the coefficients as well as their standard value are given in \autoref{tab:SEOS}. 
    12831283In fact, when choosing S-EOS, various approximation of EOS can be specified simply by changing  
    12841284the associated coefficients.  
     
    13031303$\mu_2$     & \np{rn\_mu2}    & 1.1090 $10^{-5}$ &  thermobaric coeff. in S            \\ \hline 
    13041304\end{tabular} 
    1305 \caption{ \protect\label{Tab_SEOS} 
     1305\caption{ \protect\label{tab:SEOS} 
    13061306Standard value of S-EOS coefficients. } 
    13071307\end{center} 
     
    13141314% ------------------------------------------------------------------------------------------------------------- 
    13151315\subsection{Brunt-V\"{a}is\"{a}l\"{a} frequency (\protect\np{nn\_eos}\forcode{ = 0..2})} 
    1316 \label{TRA_bn2} 
     1316\label{subsec:TRA_bn2} 
    13171317 
    13181318An accurate computation of the ocean stability (i.e. of $N$, the brunt-V\"{a}is\"{a}l\"{a} 
     
    13231323 (pressure in decibar being approximated by the depth in meters). The expression for $N^2$  
    13241324 is given by:  
    1325 \begin{equation} \label{Eq_tra_bn2} 
     1325\begin{equation} \label{eq:tra_bn2} 
    13261326N^2 = \frac{g}{e_{3w}} \left(   \beta \;\delta_{k+1/2}[S] - \alpha \;\delta_{k+1/2}[T]   \right) 
    13271327\end{equation}  
     
    13361336% ------------------------------------------------------------------------------------------------------------- 
    13371337\subsection{Freezing point of seawater} 
    1338 \label{TRA_fzp} 
     1338\label{subsec:TRA_fzp} 
    13391339 
    13401340The freezing point of seawater is a function of salinity and pressure \citep{UNESCO1983}: 
    1341 \begin{equation} \label{Eq_tra_eos_fzp} 
     1341\begin{equation} \label{eq:tra_eos_fzp} 
    13421342   \begin{split} 
    13431343T_f (S,p) = \left( -0.0575 + 1.710523 \;10^{-3} \, \sqrt{S}  
     
    13471347\end{equation} 
    13481348 
    1349 \eqref{Eq_tra_eos_fzp} is only used to compute the potential freezing point of  
     1349\autoref{eq:tra_eos_fzp} is only used to compute the potential freezing point of  
    13501350sea water ($i.e.$ referenced to the surface $p=0$), thus the pressure dependent  
    1351 terms in \eqref{Eq_tra_eos_fzp} (last term) have been dropped. The freezing 
     1351terms in \autoref{eq:tra_eos_fzp} (last term) have been dropped. The freezing 
    13521352point is computed through \textit{eos\_fzp}, a \textsc{Fortran} function that can be found  
    13531353in \mdl{eosbn2}.   
     
    13581358% ------------------------------------------------------------------------------------------------------------- 
    13591359%\subsection{Potential Energy anomalies} 
    1360 %\label{TRA_bn2} 
     1360%\label{subsec:TRA_bn2} 
    13611361 
    13621362%    =====>>>>> TO BE written 
     
    13681368% ================================================================ 
    13691369\section{Horizontal derivative in \textit{zps}-coordinate (\protect\mdl{zpshde})} 
    1370 \label{TRA_zpshde} 
     1370\label{sec:TRA_zpshde} 
    13711371 
    13721372\gmcomment{STEVEN: to be consistent with earlier discussion of differencing and averaging operators,  
     
    13821382Before taking horizontal gradients between the tracers next to the bottom, a linear  
    13831383interpolation in the vertical is used to approximate the deeper tracer as if it actually  
    1384 lived at the depth of the shallower tracer point (Fig.~\ref{Fig_Partial_step_scheme}).  
     1384lived at the depth of the shallower tracer point (\autoref{fig:Partial_step_scheme}).  
    13851385For example, for temperature in the $i$-direction the needed interpolated  
    13861386temperature, $\widetilde{T}$, is: 
     
    13891389\begin{figure}[!p]    \begin{center} 
    13901390\includegraphics[width=0.9\textwidth]{Partial_step_scheme} 
    1391 \caption{   \protect\label{Fig_Partial_step_scheme}  
     1391\caption{   \protect\label{fig:Partial_step_scheme}  
    13921392Discretisation of the horizontal difference and average of tracers in the $z$-partial  
    1393 step coordinate (\np{ln\_zps}\forcode{ = .true.}) in the case $( e3w_k^{i+1} - e3w_k^i  )>0$.  
     1393step coordinate (\protect\np{ln\_zps}\forcode{ = .true.}) in the case $( e3w_k^{i+1} - e3w_k^i  )>0$.  
    13941394A linear interpolation is used to estimate $\widetilde{T}_k^{i+1}$, the tracer value  
    13951395at the depth of the shallower tracer point of the two adjacent bottom $T$-points.  
     
    14091409and the resulting forms for the horizontal difference and the horizontal average  
    14101410value of $T$ at a $U$-point are:  
    1411 \begin{equation} \label{Eq_zps_hde} 
     1411\begin{equation} \label{eq:zps_hde} 
    14121412\begin{aligned} 
    14131413 \delta _{i+1/2} T=  \begin{cases} 
     
    14321432of density, we compute $\widetilde{\rho }$ from the interpolated values of $T$  
    14331433and $S$, and the pressure at a $u$-point (in the equation of state pressure is  
    1434 approximated by depth, see \S\ref{TRA_eos} ) :  
    1435 \begin{equation} \label{Eq_zps_hde_rho} 
     1434approximated by depth, see \autoref{subsec:TRA_eos} ) :  
     1435\begin{equation} \label{eq:zps_hde_rho} 
    14361436\widetilde{\rho } = \rho ( {\widetilde{T},\widetilde {S},z_u })  
    14371437\quad \text{where }\  z_u = \min \left( {z_T^{i+1} ,z_T^i } \right) 
     
    14411441thus pressure) is highly non-linear with a true equation of state and thus is badly  
    14421442approximated with a linear interpolation. This approximation is used to compute  
    1443 both the horizontal pressure gradient (\S\ref{DYN_hpg}) and the slopes of neutral  
    1444 surfaces (\S\ref{LDF_slp}) 
     1443both the horizontal pressure gradient (\autoref{sec:DYN_hpg}) and the slopes of neutral  
     1444surfaces (\autoref{sec:LDF_slp}) 
    14451445 
    14461446Note that in almost all the advection schemes presented in this Chapter, both  
    1447 averaging and differencing operators appear. Yet \eqref{Eq_zps_hde} has not  
     1447averaging and differencing operators appear. Yet \autoref{eq:zps_hde} has not  
    14481448been used in these schemes: in contrast to diffusion and pressure gradient  
    14491449computations, no correction for partial steps is applied for advection. The main  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_ZDF.tex

    r9393 r9407  
    55% ================================================================ 
    66\chapter{Vertical Ocean Physics (ZDF)} 
    7 \label{ZDF} 
     7\label{chap:ZDF} 
    88\minitoc 
    99 
     
    1919% ================================================================ 
    2020\section{Vertical mixing} 
    21 \label{ZDF_zdf} 
     21\label{sec:ZDF_zdf} 
    2222 
    2323The discrete form of the ocean subgrid scale physics has been presented in  
    24 \S\ref{TRA_zdf} and \S\ref{DYN_zdf}. At the surface and bottom boundaries,  
     24\autoref{sec:TRA_zdf} and \autoref{sec:DYN_zdf}. At the surface and bottom boundaries,  
    2525the turbulent fluxes of momentum, heat and salt have to be defined. At the  
    26 surface they are prescribed from the surface forcing (see Chap.~\ref{SBC}),  
     26surface they are prescribed from the surface forcing (see \autoref{chap:SBC}),  
    2727while at the bottom they are set to zero for heat and salt, unless a geothermal  
    2828flux forcing is prescribed as a bottom boundary condition ($i.e.$ \key{trabbl}  
    29 defined, see \S\ref{TRA_bbc}), and specified through a bottom friction  
    30 parameterisation for momentum (see \S\ref{ZDF_bfr}). 
     29defined, see \autoref{subsec:TRA_bbc}), and specified through a bottom friction  
     30parameterisation for momentum (see \autoref{sec:ZDF_bfr}). 
    3131 
    3232In this section we briefly discuss the various choices offered to compute  
    3333the vertical eddy viscosity and diffusivity coefficients, $A_u^{vm}$ ,  
    3434$A_v^{vm}$ and $A^{vT}$ ($A^{vS}$), defined at $uw$-, $vw$- and $w$-  
    35 points, respectively (see \S\ref{TRA_zdf} and \S\ref{DYN_zdf}). These  
     35points, respectively (see \autoref{sec:TRA_zdf} and \autoref{sec:DYN_zdf}). These  
    3636coefficients can be assumed to be either constant, or a function of the local  
    3737Richardson number, or computed from a turbulent closure model (either  
     
    4444(namelist parameter \np{ln\_zdfexp}\forcode{ = .true.}) or a backward time stepping  
    4545scheme (\np{ln\_zdfexp}\forcode{ = .false.}) depending on the magnitude of the mixing  
    46 coefficients, and thus of the formulation used (see \S\ref{STP}). 
     46coefficients, and thus of the formulation used (see \autoref{chap:STP}). 
    4747 
    4848% ------------------------------------------------------------------------------------------------------------- 
     
    5050% ------------------------------------------------------------------------------------------------------------- 
    5151\subsection{Constant (\protect\key{zdfcst})} 
    52 \label{ZDF_cst} 
     52\label{subsec:ZDF_cst} 
    5353%--------------------------------------------namzdf--------------------------------------------------------- 
    5454\forfile{../namelists/namzdf} 
     
    7575% ------------------------------------------------------------------------------------------------------------- 
    7676\subsection{Richardson number dependent (\protect\key{zdfric})} 
    77 \label{ZDF_ric} 
     77\label{subsec:ZDF_ric} 
    7878 
    7979%--------------------------------------------namric--------------------------------------------------------- 
     
    9191ratio of stratification to vertical shear). Following \citet{Pacanowski_Philander_JPO81}, the following  
    9292formulation has been implemented: 
    93 \begin{equation} \label{Eq_zdfric} 
     93\begin{equation} \label{eq:zdfric} 
    9494   \left\{      \begin{aligned} 
    9595         A^{vT} &= \frac {A_{ric}^{vT}}{\left( 1+a \; Ri \right)^n} + A_b^{vT}       \\ 
     
    9898\end{equation} 
    9999where $Ri = N^2 / \left(\partial_z \textbf{U}_h \right)^2$ is the local Richardson  
    100 number, $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \S\ref{TRA_bn2}),  
     100number, $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}),  
    101101$A_b^{vT} $ and $A_b^{vm}$ are the constant background values set as in the  
    102 constant case (see \S\ref{ZDF_cst}), and $A_{ric}^{vT} = 10^{-4}~m^2.s^{-1}$  
     102constant case (see \autoref{subsec:ZDF_cst}), and $A_{ric}^{vT} = 10^{-4}~m^2.s^{-1}$  
    103103is the maximum value that can be reached by the coefficient when $Ri\leq 0$,  
    104104$a=5$ and $n=2$. The last three values can be modified by setting the  
     
    133133% ------------------------------------------------------------------------------------------------------------- 
    134134\subsection{TKE turbulent closure scheme (\protect\key{zdftke})} 
    135 \label{ZDF_tke} 
     135\label{subsec:ZDF_tke} 
    136136 
    137137%--------------------------------------------namzdf_tke-------------------------------------------------- 
     
    150150$\bar{e}$ through vertical shear, its destruction through stratification, its vertical  
    151151diffusion, and its dissipation of \citet{Kolmogorov1942} type: 
    152 \begin{equation} \label{Eq_zdftke_e} 
     152\begin{equation} \label{eq:zdftke_e} 
    153153\frac{\partial \bar{e}}{\partial t} =  
    154154\frac{K_m}{{e_3}^2 }\;\left[ {\left( {\frac{\partial u}{\partial k}} \right)^2 
     
    159159- c_\epsilon \;\frac{\bar {e}^{3/2}}{l_\epsilon } 
    160160\end{equation} 
    161 \begin{equation} \label{Eq_zdftke_kz} 
     161\begin{equation} \label{eq:zdftke_kz} 
    162162   \begin{split} 
    163163         K_m &= C_k\  l_k\  \sqrt {\bar{e}\; }     \\ 
     
    165165   \end{split} 
    166166\end{equation} 
    167 where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \S\ref{TRA_bn2}),  
     167where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2}),  
    168168$l_{\epsilon }$ and $l_{\kappa }$ are the dissipation and mixing length scales,  
    169169$P_{rt}$ is the Prandtl number, $K_m$ and $K_\rho$ are the vertical eddy viscosity  
     
    173173$P_{rt}$ can be set to unity or, following \citet{Blanke1993}, be a function  
    174174of the local Richardson number, $R_i$: 
    175 \begin{align*} \label{Eq_prt} 
     175\begin{align*} \label{eq:prt} 
    176176P_{rt} = \begin{cases} 
    177177                    \ \ \ 1 &      \text{if $\ R_i \leq 0.2$}  \\ 
     
    187187namelist parameter. The default value of $e_{bb}$ is 3.75. \citep{Gaspar1990}),  
    188188however a much larger value can be used when taking into account the  
    189 surface wave breaking (see below Eq. \eqref{ZDF_Esbc}).  
     189surface wave breaking (see below Eq. \autoref{eq:ZDF_Esbc}).  
    190190The bottom value of TKE is assumed to be equal to the value of the level just above.  
    191191The time integration of the $\bar{e}$ equation may formally lead to negative values  
     
    199199instabilities associated with too weak vertical diffusion. They must be  
    200200specified at least larger than the molecular values, and are set through  
    201 \np{rn\_avm0} and \np{rn\_avt0} (namzdf namelist, see \S\ref{ZDF_cst}). 
     201\np{rn\_avm0} and \np{rn\_avt0} (namzdf namelist, see \autoref{subsec:ZDF_cst}). 
    202202 
    203203\subsubsection{Turbulent length scale} 
     
    207207parameter. The first two are based on the following first order approximation  
    208208\citep{Blanke1993}: 
    209 \begin{equation} \label{Eq_tke_mxl0_1} 
     209\begin{equation} \label{eq:tke_mxl0_1} 
    210210l_k = l_\epsilon = \sqrt {2 \bar{e}\; } / N 
    211211\end{equation} 
     
    219219\np{nn\_mxl}\forcode{ = 2..3} cases, which add an extra assumption concerning the vertical  
    220220gradient of the computed length scale. So, the length scales are first evaluated  
    221 as in \eqref{Eq_tke_mxl0_1} and then bounded such that: 
    222 \begin{equation} \label{Eq_tke_mxl_constraint} 
     221as in \autoref{eq:tke_mxl0_1} and then bounded such that: 
     222\begin{equation} \label{eq:tke_mxl_constraint} 
    223223\frac{1}{e_3 }\left| {\frac{\partial l}{\partial k}} \right| \leq 1 
    224224\qquad \text{with }\  l =  l_k = l_\epsilon 
    225225\end{equation} 
    226 \eqref{Eq_tke_mxl_constraint} means that the vertical variations of the length  
     226\autoref{eq:tke_mxl_constraint} means that the vertical variations of the length  
    227227scale cannot be larger than the variations of depth. It provides a better  
    228228approximation of the \citet{Gaspar1990} formulation while being much less  
     
    230230by the distance to the surface or to the ocean bottom but also by the distance  
    231231to a strongly stratified portion of the water column such as the thermocline  
    232 (Fig.~\ref{Fig_mixing_length}). In order to impose the \eqref{Eq_tke_mxl_constraint}  
     232(\autoref{fig:mixing_length}). In order to impose the \autoref{eq:tke_mxl_constraint}  
    233233constraint, we introduce two additional length scales: $l_{up}$ and $l_{dwn}$,  
    234234the upward and downward length scales, and evaluate the dissipation and  
     
    237237\begin{figure}[!t] \begin{center} 
    238238\includegraphics[width=1.00\textwidth]{Fig_mixing_length} 
    239 \caption{ \protect\label{Fig_mixing_length}  
     239\caption{ \protect\label{fig:mixing_length}  
    240240Illustration of the mixing length computation. } 
    241241\end{center}   
    242242\end{figure} 
    243243%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    244 \begin{equation} \label{Eq_tke_mxl2} 
     244\begin{equation} \label{eq:tke_mxl2} 
    245245\begin{aligned} 
    246246 l_{up\ \ }^{(k)} &= \min \left(  l^{(k)} \ , \ l_{up}^{(k+1)} + e_{3t}^{(k)}\ \ \ \;  \right) 
     
    250250\end{aligned} 
    251251\end{equation} 
    252 where $l^{(k)}$ is computed using \eqref{Eq_tke_mxl0_1},  
     252where $l^{(k)}$ is computed using \autoref{eq:tke_mxl0_1},  
    253253$i.e.$ $l^{(k)} = \sqrt {2 {\bar e}^{(k)} / {N^2}^{(k)} }$. 
    254254 
     
    257257\np{nn\_mxl}\forcode{ = 3} case, the dissipation and mixing turbulent length scales are give  
    258258as in \citet{Gaspar1990}: 
    259 \begin{equation} \label{Eq_tke_mxl_gaspar} 
     259\begin{equation} \label{eq:tke_mxl_gaspar} 
    260260\begin{aligned} 
    261261& l_k          = \sqrt{\  l_{up} \ \ l_{dwn}\ }    \\ 
     
    282282 
    283283Following \citet{Craig_Banner_JPO94}, the boundary condition on surface TKE value is : 
    284 \begin{equation}  \label{ZDF_Esbc} 
     284\begin{equation}  \label{eq:ZDF_Esbc} 
    285285\bar{e}_o = \frac{1}{2}\,\left(  15.8\,\alpha_{CB} \right)^{2/3} \,\frac{|\tau|}{\rho_o} 
    286286\end{equation} 
     
    289289younger waves \citep{Mellor_Blumberg_JPO04}.  
    290290The boundary condition on the turbulent length scale follows the Charnock's relation: 
    291 \begin{equation} \label{ZDF_Lsbc} 
     291\begin{equation} \label{eq:ZDF_Lsbc} 
    292292l_o = \kappa \beta \,\frac{|\tau|}{g\,\rho_o} 
    293293\end{equation} 
     
    297297As the surface boundary condition on TKE is prescribed through $\bar{e}_o = e_{bb} |\tau| / \rho_o$,  
    298298with $e_{bb}$ the \np{rn\_ebb} namelist parameter, setting \np{rn\_ebb}\forcode{ = 67.83} corresponds  
    299 to $\alpha_{CB} = 100$. Further setting  \np{ln\_mxl0} to true applies \eqref{ZDF_Lsbc}  
     299to $\alpha_{CB} = 100$. Further setting  \np{ln\_mxl0} to true applies \autoref{eq:ZDF_Lsbc}  
    300300as surface boundary condition on length scale, with $\beta$ hard coded to the Stacey's value. 
    301301Note that a minimal threshold of \np{rn\_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters)  
     
    316316The parameterization, tuned against large-eddy simulation, includes the whole effect 
    317317of LC in an extra source terms of TKE, $P_{LC}$. 
    318 The presence of $P_{LC}$ in \eqref{Eq_zdftke_e}, the TKE equation, is controlled  
     318The presence of $P_{LC}$ in \autoref{eq:zdftke_e}, the TKE equation, is controlled  
    319319by setting \np{ln\_lc} to \forcode{.true.} in the namtke namelist. 
    320320  
     
    368368When using this parameterization ($i.e.$ when \np{nn\_etau}\forcode{ = 1}), the TKE input to the ocean ($S$)  
    369369imposed by the winds in the form of near-inertial oscillations, swell and waves is parameterized  
    370 by \eqref{ZDF_Esbc} the standard TKE surface boundary condition, plus a depth depend one given by: 
    371 \begin{equation}  \label{ZDF_Ehtau} 
     370by \autoref{eq:ZDF_Esbc} the standard TKE surface boundary condition, plus a depth depend one given by: 
     371\begin{equation}  \label{eq:ZDF_Ehtau} 
    372372S = (1-f_i) \; f_r \; e_s \; e^{-z / h_\tau}  
    373373\end{equation} 
     
    385385 
    386386Note that two other option existe, \np{nn\_etau}\forcode{ = 2..3}. They correspond to applying  
    387 \eqref{ZDF_Ehtau} only at the base of the mixed layer, or to using the high frequency part  
     387\autoref{eq:ZDF_Ehtau} only at the base of the mixed layer, or to using the high frequency part  
    388388of the stress to evaluate the fraction of TKE that penetrate the ocean.  
    389389Those two options are obsolescent features introduced for test purposes. 
     
    406406% ------------------------------------------------------------------------------------------------------------- 
    407407\subsection{TKE discretization considerations (\protect\key{zdftke})} 
    408 \label{ZDF_tke_ene} 
     408\label{subsec:ZDF_tke_ene} 
    409409 
    410410%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    411411\begin{figure}[!t]   \begin{center} 
    412412\includegraphics[width=1.00\textwidth]{Fig_ZDF_TKE_time_scheme} 
    413 \caption{ \protect\label{Fig_TKE_time_scheme}  
     413\caption{ \protect\label{fig:TKE_time_scheme}  
    414414Illustration of the TKE time integration and its links to the momentum and tracer time integration. } 
    415415\end{center}   
     
    418418 
    419419The production of turbulence by vertical shear (the first term of the right hand side  
    420 of \eqref{Eq_zdftke_e}) should balance the loss of kinetic energy associated with 
    421 the vertical momentum diffusion (first line in \eqref{Eq_PE_zdf}). To do so a special care  
     420of \autoref{eq:zdftke_e}) should balance the loss of kinetic energy associated with 
     421the vertical momentum diffusion (first line in \autoref{eq:PE_zdf}). To do so a special care  
    422422have to be taken for both the time and space discretization of the TKE equation  
    423423\citep{Burchard_OM02,Marsaleix_al_OM08}. 
    424424 
    425 Let us first address the time stepping issue. Fig.~\ref{Fig_TKE_time_scheme} shows  
     425Let us first address the time stepping issue. \autoref{fig:TKE_time_scheme} shows  
    426426how the two-level Leap-Frog time stepping of the momentum and tracer equations interplays  
    427427with the one-level forward time stepping of TKE equation. With this framework, the total loss  
    428428of kinetic energy (in 1D for the demonstration) due to the vertical momentum diffusion is  
    429429obtained by multiplying this quantity by $u^t$ and summing the result vertically:    
    430 \begin{equation} \label{Eq_energ1} 
     430\begin{equation} \label{eq:energ1} 
    431431\begin{split} 
    432432\int_{-H}^{\eta}  u^t \,\partial_z &\left( {K_m}^t \,(\partial_z u)^{t+\rdt}  \right) \,dz   \\ 
     
    436436\end{equation} 
    437437Here, the vertical diffusion of momentum is discretized backward in time  
    438 with a coefficient, $K_m$, known at time $t$ (Fig.~\ref{Fig_TKE_time_scheme}),  
    439 as it is required when using the TKE scheme (see \S\ref{STP_forward_imp}).  
    440 The first term of the right hand side of \eqref{Eq_energ1} represents the kinetic energy  
     438with a coefficient, $K_m$, known at time $t$ (\autoref{fig:TKE_time_scheme}),  
     439as it is required when using the TKE scheme (see \autoref{sec:STP_forward_imp}).  
     440The first term of the right hand side of \autoref{eq:energ1} represents the kinetic energy  
    441441transfer at the surface (atmospheric forcing) and at the bottom (friction effect).  
    442442The second term is always negative. It is the dissipation rate of kinetic energy,  
    443 and thus minus the shear production rate of $\bar{e}$. \eqref{Eq_energ1}  
     443and thus minus the shear production rate of $\bar{e}$. \autoref{eq:energ1}  
    444444implies that, to be energetically consistent, the production rate of $\bar{e}$  
    445445used to compute $(\bar{e})^t$ (and thus ${K_m}^t$) should be expressed as  
     
    448448 
    449449A similar consideration applies on the destruction rate of $\bar{e}$ due to stratification  
    450 (second term of the right hand side of \eqref{Eq_zdftke_e}). This term  
     450(second term of the right hand side of \autoref{eq:zdftke_e}). This term  
    451451must balance the input of potential energy resulting from vertical mixing.  
    452452The rate of change of potential energy (in 1D for the demonstration) due vertical  
    453453mixing is obtained by multiplying vertical density diffusion  
    454454tendency by $g\,z$ and and summing the result vertically: 
    455 \begin{equation} \label{Eq_energ2} 
     455\begin{equation} \label{eq:energ2} 
    456456\begin{split} 
    457457\int_{-H}^{\eta} g\,z\,\partial_z &\left( {K_\rho}^t \,(\partial_k \rho)^{t+\rdt}   \right) \,dz    \\ 
     
    463463\end{equation} 
    464464where we use $N^2 = -g \,\partial_k \rho / (e_3 \rho)$.  
    465 The first term of the right hand side of \eqref{Eq_energ2}  is always zero  
     465The first term of the right hand side of \autoref{eq:energ2}  is always zero  
    466466because there is no diffusive flux through the ocean surface and bottom).  
    467467The second term is minus the destruction rate of  $\bar{e}$ due to stratification.  
    468 Therefore \eqref{Eq_energ1} implies that, to be energetically consistent, the product  
    469 ${K_\rho}^{t-\rdt}\,(N^2)^t$ should be used in \eqref{Eq_zdftke_e}, the TKE equation. 
     468Therefore \autoref{eq:energ1} implies that, to be energetically consistent, the product  
     469${K_\rho}^{t-\rdt}\,(N^2)^t$ should be used in \autoref{eq:zdftke_e}, the TKE equation. 
    470470 
    471471Let us now address the space discretization issue.  
    472472The vertical eddy coefficients are defined at $w$-point whereas the horizontal velocity  
    473473components are in the centre of the side faces of a $t$-box in staggered C-grid  
    474 (Fig.\ref{Fig_cell}). A space averaging is thus required to obtain the shear TKE production term. 
    475 By redoing the \eqref{Eq_energ1} in the 3D case, it can be shown that the product of  
     474(\autoref{fig:cell}). A space averaging is thus required to obtain the shear TKE production term. 
     475By redoing the \autoref{eq:energ1} in the 3D case, it can be shown that the product of  
    476476eddy coefficient by the shear at $t$ and $t-\rdt$ must be performed prior to the averaging. 
    477477Furthermore, the possible time variation of $e_3$ (\key{vvl} case) have to be taken into  
     
    480480The above energetic considerations leads to  
    481481the following final discrete form for the TKE equation: 
    482 \begin{equation} \label{Eq_zdftke_ene} 
     482\begin{equation} \label{eq:zdftke_ene} 
    483483\begin{split} 
    484484\frac { (\bar{e})^t - (\bar{e})^{t-\rdt} } {\rdt}  \equiv   
     
    497497\end{split} 
    498498\end{equation} 
    499 where the last two terms in \eqref{Eq_zdftke_ene} (vertical diffusion and Kolmogorov dissipation)  
    500 are time stepped using a backward scheme (see\S\ref{STP_forward_imp}).  
     499where the last two terms in \autoref{eq:zdftke_ene} (vertical diffusion and Kolmogorov dissipation)  
     500are time stepped using a backward scheme (see\autoref{sec:STP_forward_imp}).  
    501501Note that the Kolmogorov term has been linearized in time in order to render  
    502502the implicit computation possible. The restart of the TKE scheme  
    503503requires the storage of $\bar {e}$, $K_m$, $K_\rho$ and $l_\epsilon$ as they all appear in  
    504 the right hand side of \eqref{Eq_zdftke_ene}. For the latter, it is in fact  
     504the right hand side of \autoref{eq:zdftke_ene}. For the latter, it is in fact  
    505505the ratio $\sqrt{\bar{e}}/l_\epsilon$ which is stored.  
    506506 
     
    509509% ------------------------------------------------------------------------------------------------------------- 
    510510\subsection{GLS: Generic Length Scale (\protect\key{zdfgls})} 
    511 \label{ZDF_gls} 
     511\label{subsec:ZDF_gls} 
    512512 
    513513%--------------------------------------------namzdf_gls--------------------------------------------------------- 
     
    519519for the generic length scale, $\psi$ \citep{Umlauf_Burchard_JMS03, Umlauf_Burchard_CSR05}.  
    520520This later variable is defined as : $\psi = {C_{0\mu}}^{p} \ {\bar{e}}^{m} \ l^{n}$,  
    521 where the triplet $(p, m, n)$ value given in Tab.\ref{Tab_GLS} allows to recover  
     521where the triplet $(p, m, n)$ value given in Tab.\autoref{tab:GLS} allows to recover  
    522522a number of well-known turbulent closures ($k$-$kl$ \citep{Mellor_Yamada_1982},  
    523523$k$-$\epsilon$ \citep{Rodi_1987}, $k$-$\omega$ \citep{Wilcox_1988}  
    524524among others \citep{Umlauf_Burchard_JMS03,Kantha_Carniel_CSR05}).  
    525525The GLS scheme is given by the following set of equations: 
    526 \begin{equation} \label{Eq_zdfgls_e} 
     526\begin{equation} \label{eq:zdfgls_e} 
    527527\frac{\partial \bar{e}}{\partial t} =  
    528528\frac{K_m}{\sigma_e e_3 }\;\left[ {\left( \frac{\partial u}{\partial k} \right)^2 
     
    533533\end{equation} 
    534534 
    535 \begin{equation} \label{Eq_zdfgls_psi} 
     535\begin{equation} \label{eq:zdfgls_psi} 
    536536   \begin{split} 
    537537\frac{\partial \psi}{\partial t} =& \frac{\psi}{\bar{e}} \left\{ 
     
    544544\end{equation} 
    545545 
    546 \begin{equation} \label{Eq_zdfgls_kz} 
     546\begin{equation} \label{eq:zdfgls_kz} 
    547547   \begin{split} 
    548548         K_m    &= C_{\mu} \ \sqrt {\bar{e}} \ l         \\ 
     
    551551\end{equation} 
    552552 
    553 \begin{equation} \label{Eq_zdfgls_eps} 
     553\begin{equation} \label{eq:zdfgls_eps} 
    554554{\epsilon} = C_{0\mu} \,\frac{\bar {e}^{3/2}}{l} \; 
    555555\end{equation} 
    556 where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \S\ref{TRA_bn2})  
     556where $N$ is the local Brunt-Vais\"{a}l\"{a} frequency (see \autoref{subsec:TRA_bn2})  
    557557and $\epsilon$ the dissipation rate.  
    558558The constants $C_1$, $C_2$, $C_3$, ${\sigma_e}$, ${\sigma_{\psi}}$ and the wall function ($Fw$)  
    559559depends of the choice of the turbulence model. Four different turbulent models are pre-defined  
    560 (Tab.\ref{Tab_GLS}). They are made available through the \np{nn\_clo} namelist parameter.  
     560(Tab.\autoref{tab:GLS}). They are made available through the \np{nn\_clo} namelist parameter.  
    561561 
    562562%--------------------------------------------------TABLE-------------------------------------------------- 
     
    579579\hline 
    580580\end{tabular} 
    581 \caption{   \protect\label{Tab_GLS}  
     581\caption{   \protect\label{tab:GLS}  
    582582Set of predefined GLS parameters, or equivalently predefined turbulence models available  
    583583with \protect\key{zdfgls} and controlled by the \protect\np{nn\_clos} namelist variable in \protect\ngn{namzdf\_gls} .} 
     
    596596As for TKE closure , the wave effect on the mixing is considered when \np{ln\_crban}\forcode{ = .true.} 
    597597\citep{Craig_Banner_JPO94, Mellor_Blumberg_JPO04}. The \np{rn\_crban} namelist parameter  
    598 is $\alpha_{CB}$ in \eqref{ZDF_Esbc} and \np{rn\_charn} provides the value of $\beta$ in \eqref{ZDF_Lsbc}.  
     598is $\alpha_{CB}$ in \autoref{eq:ZDF_Esbc} and \np{rn\_charn} provides the value of $\beta$ in \autoref{eq:ZDF_Lsbc}.  
    599599 
    600600The $\psi$ equation is known to fail in stably stratified flows, and for this reason  
     
    609609 
    610610The time and space discretization of the GLS equations follows the same energetic  
    611 consideration as for the TKE case described in \S\ref{ZDF_tke_ene}  \citep{Burchard_OM02}.  
     611consideration as for the TKE case described in \autoref{subsec:ZDF_tke_ene}  \citep{Burchard_OM02}.  
    612612Examples of performance of the 4 turbulent closure scheme can be found in \citet{Warner_al_OM05}. 
    613613 
     
    616616% ------------------------------------------------------------------------------------------------------------- 
    617617\subsection{OSM: OSMOSIS boundary layer scheme (\protect\key{zdfosm})} 
    618 \label{ZDF_osm} 
     618\label{subsec:ZDF_osm} 
    619619 
    620620%--------------------------------------------namzdf_osm--------------------------------------------------------- 
     
    628628% ================================================================ 
    629629\section{Convection} 
    630 \label{ZDF_conv} 
     630\label{sec:ZDF_conv} 
    631631 
    632632%--------------------------------------------namzdf-------------------------------------------------------- 
     
    648648\subsection[Non-penetrative convective adjmt (\protect\np{ln\_tranpc}\forcode{ = .true.})] 
    649649            {Non-penetrative convective adjustment (\protect\np{ln\_tranpc}\forcode{ = .true.})} 
    650 \label{ZDF_npc} 
     650\label{subsec:ZDF_npc} 
    651651 
    652652%--------------------------------------------namzdf-------------------------------------------------------- 
     
    657657\begin{figure}[!htb]    \begin{center} 
    658658\includegraphics[width=0.90\textwidth]{Fig_npc} 
    659 \caption{  \protect\label{Fig_npc}  
     659\caption{  \protect\label{fig:npc}  
    660660Example of an unstable density profile treated by the non penetrative  
    661661convective adjustment algorithm. $1^{st}$ step: the initial profile is checked from  
     
    677677column has \textit{exactly} the density of the water just below) \citep{Madec_al_JPO91}.  
    678678The associated algorithm is an iterative process used in the following way  
    679 (Fig. \ref{Fig_npc}): starting from the top of the ocean, the first instability is  
     679(\autoref{fig:npc}): starting from the top of the ocean, the first instability is  
    680680found. Assume in the following that the instability is located between levels  
    681681$k$ and $k+1$. The temperature and salinity in the two levels are  
     
    714714% ------------------------------------------------------------------------------------------------------------- 
    715715\subsection{Enhanced vertical diffusion (\protect\np{ln\_zdfevd}\forcode{ = .true.})} 
    716 \label{ZDF_evd} 
     716\label{subsec:ZDF_evd} 
    717717 
    718718%--------------------------------------------namzdf-------------------------------------------------------- 
     
    739739Note that the stability test is performed on both \textit{before} and \textit{now}  
    740740values of $N^2$. This removes a potential source of divergence of odd and 
    741 even time step in a leapfrog environment \citep{Leclair_PhD2010} (see \S\ref{STP_mLF}). 
     741even time step in a leapfrog environment \citep{Leclair_PhD2010} (see \autoref{sec:STP_mLF}). 
    742742 
    743743% ------------------------------------------------------------------------------------------------------------- 
     
    745745% ------------------------------------------------------------------------------------------------------------- 
    746746\subsection[Turbulent closure scheme (\protect\key{zdf}\{tke,gls,osm\})]{Turbulent Closure Scheme (\protect\key{zdftke}, \protect\key{zdfgls} or \protect\key{zdfosm})} 
    747 \label{ZDF_tcs} 
    748  
    749 The turbulent closure scheme presented in \S\ref{ZDF_tke} and \S\ref{ZDF_gls}  
     747\label{subsec:ZDF_tcs} 
     748 
     749The turbulent closure scheme presented in \autoref{subsec:ZDF_tke} and \autoref{subsec:ZDF_gls}  
    750750(\key{zdftke} or \key{zdftke} is defined) in theory solves the problem of statically  
    751751unstable density profiles. In such a case, the term corresponding to the  
    752 destruction of turbulent kinetic energy through stratification in \eqref{Eq_zdftke_e}  
    753 or \eqref{Eq_zdfgls_e} becomes a source term, since $N^2$ is negative.  
     752destruction of turbulent kinetic energy through stratification in \autoref{eq:zdftke_e}  
     753or \autoref{eq:zdfgls_e} becomes a source term, since $N^2$ is negative.  
    754754It results in large values of $A_T^{vT}$ and  $A_T^{vT}$, and also the four neighbouring  
    755755$A_u^{vm} {and}\;A_v^{vm}$ (up to $1\;m^2s^{-1})$. These large values  
    756756restore the static stability of the water column in a way similar to that of the  
    757 enhanced vertical diffusion parameterisation (\S\ref{ZDF_evd}). However,  
     757enhanced vertical diffusion parameterisation (\autoref{subsec:ZDF_evd}). However,  
    758758in the vicinity of the sea surface (first ocean layer), the eddy coefficients  
    759759computed by the turbulent closure scheme do not usually exceed $10^{-2}m.s^{-1}$,  
     
    772772% ================================================================ 
    773773\section{Double diffusion mixing (\protect\key{zdfddm})} 
    774 \label{ZDF_ddm} 
     774\label{sec:ZDF_ddm} 
    775775 
    776776%-------------------------------------------namzdf_ddm------------------------------------------------- 
     
    789789 
    790790Diapycnal mixing of S and T are described by diapycnal diffusion coefficients  
    791 \begin{align*} % \label{Eq_zdfddm_Kz} 
     791\begin{align*} % \label{eq:zdfddm_Kz} 
    792792    &A^{vT} = A_o^{vT}+A_f^{vT}+A_d^{vT}  \\ 
    793793    &A^{vS} = A_o^{vS}+A_f^{vS}+A_d^{vS} 
     
    797797mixing depend on the buoyancy ratio $R_\rho = \alpha \partial_z T / \beta \partial_z S$,  
    798798where $\alpha$ and $\beta$ are coefficients of thermal expansion and saline  
    799 contraction (see \S\ref{TRA_eos}). To represent mixing of $S$ and $T$ by salt  
     799contraction (see \autoref{subsec:TRA_eos}). To represent mixing of $S$ and $T$ by salt  
    800800fingering, we adopt the diapycnal diffusivities suggested by Schmitt (1981): 
    801 \begin{align} \label{Eq_zdfddm_f} 
     801\begin{align} \label{eq:zdfddm_f} 
    802802A_f^{vS} &=    \begin{cases} 
    803803   \frac{A^{\ast v}}{1+(R_\rho / R_c)^n   } &\text{if  $R_\rho > 1$ and $N^2>0$ } \\ 
    804804   0                              &\text{otherwise}  
    805805            \end{cases}    
    806 \\           \label{Eq_zdfddm_f_T} 
     806\\           \label{eq:zdfddm_f_T} 
    807807A_f^{vT} &= 0.7 \ A_f^{vS} / R_\rho  
    808808\end{align} 
     
    811811\begin{figure}[!t]   \begin{center} 
    812812\includegraphics[width=0.99\textwidth]{Fig_zdfddm} 
    813 \caption{  \protect\label{Fig_zdfddm} 
     813\caption{  \protect\label{fig:zdfddm} 
    814814From \citet{Merryfield1999} : (a) Diapycnal diffusivities $A_f^{vT}$  
    815815and $A_f^{vS}$ for temperature and salt in regions of salt fingering. Heavy  
     
    822822%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    823823 
    824 The factor 0.7 in \eqref{Eq_zdfddm_f_T} reflects the measured ratio  
     824The factor 0.7 in \autoref{eq:zdfddm_f_T} reflects the measured ratio  
    825825$\alpha F_T /\beta F_S \approx  0.7$ of buoyancy flux of heat to buoyancy  
    826826flux of salt ($e.g.$, \citet{McDougall_Taylor_JMR84}). Following  \citet{Merryfield1999},  
     
    828828 
    829829To represent mixing of S and T by diffusive layering,  the diapycnal diffusivities suggested by Federov (1988) is used:  
    830 \begin{align}  \label{Eq_zdfddm_d} 
     830\begin{align}  \label{eq:zdfddm_d} 
    831831A_d^{vT} &=    \begin{cases} 
    832832   1.3635 \, \exp{\left( 4.6\, \exp{ \left[  -0.54\,( R_{\rho}^{-1} - 1 )  \right] }    \right)} 
     
    834834   0                       &\text{otherwise}  
    835835            \end{cases}    
    836 \\          \label{Eq_zdfddm_d_S} 
     836\\          \label{eq:zdfddm_d_S} 
    837837A_d^{vS} &=    \begin{cases} 
    838838   A_d^{vT}\ \left( 1.85\,R_{\rho} - 0.85 \right) 
     
    844844\end{align} 
    845845 
    846 The dependencies of \eqref{Eq_zdfddm_f} to \eqref{Eq_zdfddm_d_S} on $R_\rho$  
    847 are illustrated in Fig.~\ref{Fig_zdfddm}. Implementing this requires computing  
     846The dependencies of \autoref{eq:zdfddm_f} to \autoref{eq:zdfddm_d_S} on $R_\rho$  
     847are illustrated in \autoref{fig:zdfddm}. Implementing this requires computing  
    848848$R_\rho$ at each grid point on every time step. This is done in \mdl{eosbn2} at the  
    849849same time as $N^2$ is computed. This avoids duplication in the computation of  
     
    854854% ================================================================ 
    855855\section{Bottom and top friction (\protect\mdl{zdfbfr})} 
    856 \label{ZDF_bfr} 
     856\label{sec:ZDF_bfr} 
    857857 
    858858%--------------------------------------------nambfr-------------------------------------------------------- 
     
    870870flux (bottom friction) enter the equations as a condition on the vertical  
    871871diffusive flux. For the bottom boundary layer, one has: 
    872 \begin{equation} \label{Eq_zdfbfr_flux} 
     872\begin{equation} \label{eq:zdfbfr_flux} 
    873873A^{vm} \left( \partial {\textbf U}_h / \partial z \right) = {{\cal F}}_h^{\textbf U} 
    874874\end{equation} 
     
    886886as a body force over the depth of the top or bottom model layer. To illustrate  
    887887this, consider the equation for $u$ at $k$, the last ocean level: 
    888 \begin{equation} \label{Eq_zdfbfr_flux2} 
     888\begin{equation} \label{eq:zdfbfr_flux2} 
    889889\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}} 
    890890\end{equation} 
     
    907907These coefficients are computed in \mdl{zdfbfr} and generally take the form  
    908908$c_b^{\textbf U}$ where: 
    909 \begin{equation} \label{Eq_zdfbfr_bdef} 
     909\begin{equation} \label{eq:zdfbfr_bdef} 
    910910\frac{\partial {\textbf U_h}}{\partial t} =  
    911911  - \frac{{\cal F}^{\textbf U}_{h}}{e_{3u}} = \frac{c_b^{\textbf U}}{e_{3u}} \;{\textbf U}_h^b 
     
    917917% ------------------------------------------------------------------------------------------------------------- 
    918918\subsection{Linear bottom friction (\protect\np{nn\_botfr}\forcode{ = 0..1})} 
    919 \label{ZDF_bfr_linear} 
     919\label{subsec:ZDF_bfr_linear} 
    920920 
    921921The linear bottom friction parameterisation (including the special case  
     
    923923is proportional to the interior velocity (i.e. the velocity of the last  
    924924model level): 
    925 \begin{equation} \label{Eq_zdfbfr_linear} 
     925\begin{equation} \label{eq:zdfbfr_linear} 
    926926{\cal F}_h^\textbf{U} = \frac{A^{vm}}{e_3} \; \frac{\partial \textbf{U}_h}{\partial k} = r \; \textbf{U}_h^b 
    927927\end{equation} 
     
    941941 
    942942For the linear friction case the coefficients defined in the general  
    943 expression \eqref{Eq_zdfbfr_bdef} are:  
    944 \begin{equation} \label{Eq_zdfbfr_linbfr_b} 
     943expression \autoref{eq:zdfbfr_bdef} are:  
     944\begin{equation} \label{eq:zdfbfr_linbfr_b} 
    945945\begin{split} 
    946946 c_b^u &= - r\\ 
     
    961961% ------------------------------------------------------------------------------------------------------------- 
    962962\subsection{Non-linear bottom friction (\protect\np{nn\_botfr}\forcode{ = 2})} 
    963 \label{ZDF_bfr_nonlinear} 
     963\label{subsec:ZDF_bfr_nonlinear} 
    964964 
    965965The non-linear bottom friction parameterisation assumes that the bottom  
    966966friction is quadratic:  
    967 \begin{equation} \label{Eq_zdfbfr_nonlinear} 
     967\begin{equation} \label{eq:zdfbfr_nonlinear} 
    968968{\cal F}_h^\textbf{U} = \frac{A^{vm}}{e_3 }\frac{\partial \textbf {U}_h  
    969969}{\partial k}=C_D \;\sqrt {u_b ^2+v_b ^2+e_b } \;\; \textbf {U}_h^b  
     
    983983For the non-linear friction case the terms 
    984984computed in \mdl{zdfbfr}  are:  
    985 \begin{equation} \label{Eq_zdfbfr_nonlinbfr} 
     985\begin{equation} \label{eq:zdfbfr_nonlinbfr} 
    986986\begin{split} 
    987987 c_b^u &= - \; C_D\;\left[ u^2 + \left(\bar{\bar{v}}^{i+1,j}\right)^2 + e_b \right]^{1/2}\\ 
     
    10031003\subsection[Log-layer btm frict enhncmnt (\protect\np{nn\_botfr}\forcode{ = 2}, \protect\np{ln\_loglayer}\forcode{ = .true.})] 
    10041004            {Log-layer bottom friction enhancement (\protect\np{nn\_botfr}\forcode{ = 2}, \protect\np{ln\_loglayer}\forcode{ = .true.})} 
    1005 \label{ZDF_bfr_loglayer} 
     1005\label{subsec:ZDF_bfr_loglayer} 
    10061006 
    10071007In the non-linear bottom friction case, the drag coefficient, $C_D$, can be optionally 
     
    10331033% ------------------------------------------------------------------------------------------------------------- 
    10341034\subsection{Bottom friction stability considerations} 
    1035 \label{ZDF_bfr_stability} 
     1035\label{subsec:ZDF_bfr_stability} 
    10361036 
    10371037Some care needs to exercised over the choice of parameters to ensure that the 
    10381038implementation of bottom friction does not induce numerical instability. For  
    1039 the purposes of stability analysis, an approximation to \eqref{Eq_zdfbfr_flux2} 
     1039the purposes of stability analysis, an approximation to \autoref{eq:zdfbfr_flux2} 
    10401040is: 
    1041 \begin{equation} \label{Eqn_bfrstab} 
     1041\begin{equation} \label{eq:Eqn_bfrstab} 
    10421042\begin{split} 
    10431043 \Delta u &= -\frac{{{\cal F}_h}^u}{e_{3u}}\;2 \rdt    \\ 
     
    10501050 |\Delta u| < \;|u|  
    10511051\end{equation} 
    1052 \noindent which, using \eqref{Eqn_bfrstab}, gives: 
     1052\noindent which, using \autoref{eq:Eqn_bfrstab}, gives: 
    10531053\begin{equation} 
    10541054r\frac{2\rdt}{e_{3u}} < 1 \qquad  \Rightarrow \qquad r < \frac{e_{3u}}{2\rdt}\\ 
     
    10751075 
    10761076Limits on the bottom friction coefficient are not imposed if the user has elected to 
    1077 handle the bottom friction implicitly (see \S\ref{ZDF_bfr_imp}). The number of potential 
     1077handle the bottom friction implicitly (see \autoref{subsec:ZDF_bfr_imp}). The number of potential 
    10781078breaches of the explicit stability criterion are still reported for information purposes. 
    10791079 
     
    10821082% ------------------------------------------------------------------------------------------------------------- 
    10831083\subsection{Implicit bottom friction (\protect\np{ln\_bfrimp}\forcode{ = .true.})} 
    1084 \label{ZDF_bfr_imp} 
     1084\label{subsec:ZDF_bfr_imp} 
    10851085 
    10861086An optional implicit form of bottom friction has been implemented to improve 
     
    10931093bottom boundary condition is implemented implicitly. 
    10941094 
    1095 \begin{equation} \label{Eq_dynzdf_bfr} 
     1095\begin{equation} \label{eq:dynzdf_bfr} 
    10961096\left.{\left( {\frac{A^{vm} }{e_3 }\ \frac{\partial \textbf{U}_h}{\partial k}} \right)} \right|_{mbk} 
    10971097    = \binom{c_{b}^{u}u^{n+1}_{mbk}}{c_{b}^{v}v^{n+1}_{mbk}} 
     
    11121112following: 
    11131113 
    1114 \begin{equation} \label{Eq_dynspg_ts_bfr1} 
     1114\begin{equation} \label{eq:dynspg_ts_bfr1} 
    11151115\frac{\textbf{U}_{med}-\textbf{U}^{m-1}}{2\Delta t}=-g\nabla\eta-f\textbf{k}\times\textbf{U}^{m}+c_{b} 
    11161116\left(\textbf{U}_{med}-\textbf{U}^{m-1}\right) 
    11171117\end{equation} 
    1118 \begin{equation} \label{Eq_dynspg_ts_bfr2} 
     1118\begin{equation} \label{eq:dynspg_ts_bfr2} 
    11191119\frac{\textbf{U}^{m+1}-\textbf{U}_{med}}{2\Delta t}=\textbf{T}+ 
    11201120\left(g\nabla\eta^{'}+f\textbf{k}\times\textbf{U}^{'}\right)- 
     
    11361136\subsection[Bottom friction w/ split-explicit time splitting (\protect\np{ln\_bfrimp})] 
    11371137            {Bottom friction with split-explicit time splitting (\protect\np{ln\_bfrimp})} 
    1138 \label{ZDF_bfr_ts} 
     1138\label{subsec:ZDF_bfr_ts} 
    11391139 
    11401140When calculating the momentum trend due to bottom friction in \mdl{dynbfr}, the 
     
    11751175the barotropic component which uses the unrestricted value of the coefficient. However, if the 
    11761176limiting is thought to be having a major effect (a more likely prospect in coastal and shelf seas 
    1177 applications) then the fully implicit form of the bottom friction should be used (see \S\ref{ZDF_bfr_imp} )  
     1177applications) then the fully implicit form of the bottom friction should be used (see \autoref{subsec:ZDF_bfr_imp} )  
    11781178which can be selected by setting \np{ln\_bfrimp} $=$ \forcode{.true.}. 
    11791179 
    11801180Otherwise, the implicit formulation takes the form: 
    1181 \begin{equation} \label{Eq_zdfbfr_implicitts} 
     1181\begin{equation} \label{eq:zdfbfr_implicitts} 
    11821182 \bar{U}^{t+ \rdt} = \; \left [ \bar{U}^{t-\rdt}\; + 2 \rdt\;RHS \right ] / \left [ 1 - 2 \rdt \;c_b^{u} / H_e \right ]   
    11831183\end{equation} 
     
    11931193% ================================================================ 
    11941194\section{Tidal mixing (\protect\key{zdftmx})} 
    1195 \label{ZDF_tmx} 
     1195\label{sec:ZDF_tmx} 
    11961196 
    11971197%--------------------------------------------namzdf_tmx-------------------------------------------------- 
     
    12041204% ------------------------------------------------------------------------------------------------------------- 
    12051205\subsection{Bottom intensified tidal mixing} 
    1206 \label{ZDF_tmx_bottom} 
     1206\label{subsec:ZDF_tmx_bottom} 
    12071207 
    12081208Options are defined through the  \ngn{namzdf\_tmx} namelist variables. 
     
    12131213$A^{vT}_{tides}$ is expressed as a function of $E(x,y)$, the energy transfer from barotropic  
    12141214tides to baroclinic tides :  
    1215 \begin{equation} \label{Eq_Ktides} 
     1215\begin{equation} \label{eq:Ktides} 
    12161216A^{vT}_{tides} =  q \,\Gamma \,\frac{ E(x,y) \, F(z) }{ \rho \, N^2 } 
    12171217\end{equation} 
    12181218where $\Gamma$ is the mixing efficiency, $N$ the Brunt-Vais\"{a}l\"{a} frequency  
    1219 (see \S\ref{TRA_bn2}), $\rho$ the density, $q$ the tidal dissipation efficiency,  
     1219(see \autoref{subsec:TRA_bn2}), $\rho$ the density, $q$ the tidal dissipation efficiency,  
    12201220and $F(z)$ the vertical structure function.  
    12211221 
     
    12301230It is implemented as a simple exponential decaying upward away from the bottom,  
    12311231with a vertical scale of $h_o$ (\np{rn\_htmx} namelist parameter, with a typical value of $500\,m$) \citep{St_Laurent_Nash_DSR04},  
    1232 \begin{equation} \label{Eq_Fz} 
     1232\begin{equation} \label{eq:Fz} 
    12331233F(i,j,k) = \frac{ e^{ -\frac{H+z}{h_o} } }{ h_o \left( 1- e^{ -\frac{H}{h_o} } \right) } 
    12341234\end{equation} 
     
    12411241usually set to $10^{-8} s^{-2}$. These bounds are usually rarely encountered. 
    12421242 
    1243 The internal wave energy map, $E(x, y)$ in \eqref{Eq_Ktides}, is derived  
     1243The internal wave energy map, $E(x, y)$ in \autoref{eq:Ktides}, is derived  
    12441244from a barotropic model of the tides utilizing a parameterization of the  
    12451245conversion of barotropic tidal energy into internal waves.  
     
    12501250the barotropic global ocean tide model MOG2D-G \citep{Carrere_Lyard_GRL03}. 
    12511251This model provides the dissipation associated with internal wave energy for the M2 and K1  
    1252 tides component (Fig.~\ref{Fig_ZDF_M2_K1_tmx}). The S2 dissipation is simply approximated 
     1252tides component (\autoref{fig:ZDF_M2_K1_tmx}). The S2 dissipation is simply approximated 
    12531253as being $1/4$ of the M2 one. The internal wave energy is thus : $E(x, y) = 1.25 E_{M2} + E_{K1}$.  
    12541254Its global mean value is $1.1$ TW, in agreement with independent estimates  
     
    12581258\begin{figure}[!t]   \begin{center} 
    12591259\includegraphics[width=0.90\textwidth]{Fig_ZDF_M2_K1_tmx} 
    1260 \caption{  \protect\label{Fig_ZDF_M2_K1_tmx}  
     1260\caption{  \protect\label{fig:ZDF_M2_K1_tmx}  
    12611261(a) M2 and (b) K1 internal wave drag energy from \citet{Carrere_Lyard_GRL03} ($W/m^2$). } 
    12621262\end{center}   \end{figure} 
     
    12671267% ------------------------------------------------------------------------------------------------------------- 
    12681268\subsection{Indonesian area specific treatment (\protect\np{ln\_zdftmx\_itf})} 
    1269 \label{ZDF_tmx_itf} 
     1269\label{subsec:ZDF_tmx_itf} 
    12701270 
    12711271When the Indonesian Through Flow (ITF) area is included in the model domain, 
     
    12941294proportional to $N^2$ below the core of the thermocline and to $N$ above.  
    12951295The resulting $F(z)$ is: 
    1296 \begin{equation} \label{Eq_Fz_itf} 
     1296\begin{equation} \label{eq:Fz_itf} 
    12971297F(i,j,k) \sim     \left\{ \begin{aligned} 
    12981298\frac{q\,\Gamma E(i,j) } {\rho N \, \int N     dz}    \qquad \text{when $\partial_z N < 0$} \\ 
     
    13151315% ================================================================ 
    13161316\section{Internal wave-driven mixing (\protect\key{zdftmx\_new})} 
    1317 \label{ZDF_tmx_new} 
     1317\label{sec:ZDF_tmx_new} 
    13181318 
    13191319%--------------------------------------------namzdf_tmx_new------------------------------------------ 
     
    13251325A three-dimensional field of internal wave energy dissipation $\epsilon(x,y,z)$ is first constructed,  
    13261326and the resulting diffusivity is obtained as  
    1327 \begin{equation} \label{Eq_Kwave} 
     1327\begin{equation} \label{eq:Kwave} 
    13281328A^{vT}_{wave} =  R_f \,\frac{ \epsilon }{ \rho \, N^2 } 
    13291329\end{equation} 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_conservation.tex

    r9393 r9407  
    66% ================================================================ 
    77\chapter{Invariants of the Primitive Equations} 
    8 \label{Invariant} 
     8\label{chap:Invariant} 
    99\minitoc 
    1010 
     
    4848% ------------------------------------------------------------------------------------------------------------- 
    4949\section{Conservation properties on ocean dynamics} 
    50 \label{Invariant_dyn} 
     50\label{sec:Invariant_dyn} 
    5151 
    5252The non linear term of the momentum equations has been split into a  
     
    6868vorticity, i.e. , , and , respectively. The continuous formulation of the  
    6969vorticity term satisfies following integral constraints: 
    70 \begin{equation} \label{Eq_vor_vorticity} 
     70\begin{equation} \label{eq:vor_vorticity} 
    7171\int_D {{\textbf {k}}\cdot \frac{1}{e_3 }\nabla \times \left( {\varsigma  
    7272\;{\rm {\bf k}}\times {\textbf {U}}_h } \right)\;dv} =0 
    7373\end{equation} 
    7474 
    75 \begin{equation} \label{Eq_vor_enstrophy} 
     75\begin{equation} \label{eq:vor_enstrophy} 
    7676if\quad \chi =0\quad \quad \int\limits_D {\varsigma \;{\textbf{k}}\cdot  
    7777\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}  
     
    7979\end{equation} 
    8080 
    81 \begin{equation} \label{Eq_vor_energy} 
     81\begin{equation} \label{eq:vor_energy} 
    8282\int_D {{\textbf{U}}_h \times \left( {\varsigma \;{\textbf{k}}\times {\textbf{U}}_h } \right)\;dv} =0 
    8383\end{equation} 
     
    107107energy due to the horizontal gradient of horizontal kinetic energy: 
    108108 
    109 \begin{equation} \label{Eq_keg_zad} 
     109\begin{equation} \label{eq:keg_zad} 
    110110\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  
    111111{\textbf{U}}_h }{\partial k}\;dv} 
     
    113113 
    114114Using the discrete form given in {\S}II.2-a and the symmetry or  
    115 anti-symmetry properties of the mean and difference operators, \eqref{Eq_keg_zad} is  
     115anti-symmetry properties of the mean and difference operators, \autoref{eq:keg_zad} is  
    116116demonstrated in the Appendix C. The main point here is that satisfying  
    117 \eqref{Eq_keg_zad} links the choice of the discrete forms of the vertical advection  
     117\autoref{eq:keg_zad} links the choice of the discrete forms of the vertical advection  
    118118and of the horizontal gradient of horizontal kinetic energy. Choosing one  
    119119imposes the other. The discrete form of the vertical advection given in  
     
    132132energy due to buoyancy forces: 
    133133 
    134 \begin{equation} \label{Eq_hpg_pe} 
     134\begin{equation} \label{eq:hpg_pe} 
    135135\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} 
    136136\end{equation} 
     
    155155approximation, the change of horizontal kinetic energy due to the work of  
    156156surface pressure forces is exactly zero: 
    157 \begin{equation} \label{Eq_spg} 
     157\begin{equation} \label{eq:spg} 
    158158\int_D {-\frac{1}{\rho _o }\nabla _h } \left( {p_s } \right)\cdot {\textbf{U}}_h \;dv=0 
    159159\end{equation} 
     
    169169% ------------------------------------------------------------------------------------------------------------- 
    170170\section{Conservation properties on ocean thermodynamics} 
    171 \label{Invariant_tra} 
     171\label{sec:Invariant_tra} 
    172172 
    173173In continuous formulation, the advective terms of the tracer equations  
    174174conserve the tracer content and the quadratic form of the tracer, i.e. 
    175 \begin{equation} \label{Eq_tra_tra2} 
     175\begin{equation} \label{eq:tra_tra2} 
    176176\int_D {\nabla .\left( {T\;{\textbf{U}}} \right)\;dv} =0 
    177177\;\text{and} 
     
    189189% ------------------------------------------------------------------------------------------------------------- 
    190190\subsection{Conservation properties on momentum physics} 
    191 \label{Invariant_dyn_physics} 
     191\label{subsec:Invariant_dyn_physics} 
    192192 
    193193\textbf{* lateral momentum diffusion term} 
     
    195195The continuous formulation of the horizontal diffusion of momentum satisfies  
    196196the following integral constraints~: 
    197 \begin{equation} \label{Eq_dynldf_dyn} 
     197\begin{equation} \label{eq:dynldf_dyn} 
    198198\int\limits_D {\frac{1}{e_3 }{\rm {\bf k}}\cdot \nabla \times \left[ {\nabla  
    199199_h \left( {A^{lm}\;\chi } \right)-\nabla _h \times \left( {A^{lm}\;\zeta  
     
    201201\end{equation} 
    202202 
    203 \begin{equation} \label{Eq_dynldf_div} 
     203\begin{equation} \label{eq:dynldf_div} 
    204204\int\limits_D {\nabla _h \cdot \left[ {\nabla _h \left( {A^{lm}\;\chi }  
    205205\right)-\nabla _h \times \left( {A^{lm}\;\zeta \;{\rm {\bf k}}} \right)}  
     
    207207\end{equation} 
    208208 
    209 \begin{equation} \label{Eq_dynldf_curl} 
     209\begin{equation} \label{eq:dynldf_curl} 
    210210\int_D {{\rm {\bf U}}_h \cdot \left[ {\nabla _h \left( {A^{lm}\;\chi }  
    211211\right)-\nabla _h \times \left( {A^{lm}\;\zeta \;{\rm {\bf k}}} \right)}  
     
    213213\end{equation} 
    214214 
    215 \begin{equation} \label{Eq_dynldf_curl2} 
     215\begin{equation} \label{eq:dynldf_curl2} 
    216216\mbox{if}\quad A^{lm}=cste\quad \quad \int_D {\zeta \;{\rm {\bf k}}\cdot  
    217217\nabla \times \left[ {\nabla _h \left( {A^{lm}\;\chi } \right)-\nabla _h  
     
    220220\end{equation} 
    221221 
    222 \begin{equation} \label{Eq_dynldf_div2} 
     222\begin{equation} \label{eq:dynldf_div2} 
    223223\mbox{if}\quad A^{lm}=cste\quad \quad \int_D {\chi \;\nabla _h \cdot \left[  
    224224{\nabla _h \left( {A^{lm}\;\chi } \right)-\nabla _h \times \left(  
     
    256256conservation of momentum, dissipation of horizontal kinetic energy 
    257257 
    258 \begin{equation} \label{Eq_dynzdf_dyn} 
     258\begin{equation} \label{eq:dynzdf_dyn} 
    259259\begin{aligned} 
    260260& \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}} \\  
     
    263263 \end{equation} 
    264264conservation of vorticity, dissipation of enstrophy 
    265 \begin{equation} \label{Eq_dynzdf_vor} 
     265\begin{equation} \label{eq:dynzdf_vor} 
    266266\begin{aligned} 
    267267& \int_D {\frac{1}{e_3 }{\rm {\bf k}}\cdot \nabla \times \left( {\frac{1}{e_3  
     
    275275conservation of horizontal divergence, dissipation of square of the  
    276276horizontal divergence 
    277 \begin{equation} \label{Eq_dynzdf_div} 
     277\begin{equation} \label{eq:dynzdf_div} 
    278278\begin{aligned} 
    279279 &\int_D {\nabla \cdot \left( {\frac{1}{e_3 }\frac{\partial }{\partial  
     
    295295% ------------------------------------------------------------------------------------------------------------- 
    296296\subsection{Conservation properties on tracer physics} 
    297 \label{Invariant_tra_physics} 
     297\label{subsec:Invariant_tra_physics} 
    298298 
    299299The numerical schemes used for tracer subgridscale physics are written in  
     
    308308variance, i.e. 
    309309 
    310 \begin{equation} \label{Eq_traldf_t_t2} 
     310\begin{equation} \label{eq:traldf_t_t2} 
    311311\begin{aligned} 
    312312&\int_D \nabla\, \cdot\, \left( A^{lT} \,\Re \,\nabla \,T \right)\;dv = 0 \\  
     
    318318variance, i.e. 
    319319 
    320 \begin{equation} \label{Eq_trazdf_t_t2} 
     320\begin{equation} \label{eq:trazdf_t_t2} 
    321321\begin{aligned} 
    322322& \int_D \frac{1}{e_3 } \frac{\partial }{\partial k}\left( \frac{A^{vT}}{e_3 }  \frac{\partial T}{\partial k}  \right)\;dv = 0 \\  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_misc.tex

    r9394 r9407  
    55% ================================================================ 
    66\chapter{Miscellaneous Topics} 
    7 \label{MISC} 
     7\label{chap:MISC} 
    88\minitoc 
    99 
     
    1515% ================================================================ 
    1616\section{Representation of unresolved straits} 
    17 \label{MISC_strait} 
     17\label{sec:MISC_strait} 
    1818 
    1919In climate modeling, it often occurs that a crucial connections between water masses 
     
    4343% ------------------------------------------------------------------------------------------------------------- 
    4444\subsection{Hand made geometry changes} 
    45 \label{MISC_strait_hand} 
     45\label{subsec:MISC_strait_hand} 
    4646 
    4747$\bullet$ reduced scale factor in the cross-strait direction to a value in better agreement  
    48 with the true mean width of the strait. (Fig.~\ref{Fig_MISC_strait_hand}). 
     48with the true mean width of the strait. (\autoref{fig:MISC_strait_hand}). 
    4949This technique is sometime called "partially open face" or "partially closed cells". 
    5050The key issue here is only to reduce the faces of $T$-cell ($i.e.$ change the value  
     
    5656 
    5757$\bullet$ increase of the viscous boundary layer thickness by local increase of the  
    58 fmask value at the coast (Fig.~\ref{Fig_MISC_strait_hand}). This is done in  
     58fmask value at the coast (\autoref{fig:MISC_strait_hand}). This is done in  
    5959\mdl{dommsk} together with the setting of the coastal value of fmask  
    60 (see Section \ref{LBC_coast}) 
     60(see  \autoref{sec:LBC_coast}) 
    6161 
    6262%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    6464\includegraphics[width=0.80\textwidth]{Fig_Gibraltar} 
    6565\includegraphics[width=0.80\textwidth]{Fig_Gibraltar2} 
    66 \caption{   \protect\label{Fig_MISC_strait_hand}  
     66\caption{   \protect\label{fig:MISC_strait_hand}  
    6767Example of the Gibraltar strait defined in a $1^{\circ} \times 1^{\circ}$ mesh.  
    6868\textit{Top}: using partially open cells. The meridional scale factor at $v$-point  
     
    7171\textit{Bottom}: using viscous boundary layers. The four fmask parameters  
    7272along the strait coastlines are set to a value larger than 4, $i.e.$ "strong" no-slip  
    73 case (see Fig.\ref{Fig_LBC_shlat}) creating a large viscous boundary layer  
     73case (see \autoref{fig:LBC_shlat}) creating a large viscous boundary layer  
    7474that allows a reduced transport through the strait.} 
    7575\end{center}   \end{figure} 
     
    8181% ================================================================ 
    8282\section{Closed seas (\protect\mdl{closea})} 
    83 \label{MISC_closea} 
     83\label{sec:MISC_closea} 
    8484 
    8585\colorbox{yellow}{Add here a short description of the way closed seas are managed} 
     
    9090% ================================================================ 
    9191\section{Sub-domain functionality} 
    92 \label{MISC_zoom} 
     92\label{sec:MISC_zoom} 
    9393 
    9494\subsection{Simple subsetting of input files via NetCDF attributes} 
     
    140140\begin{figure}[!ht]    \begin{center} 
    141141\includegraphics[width=0.90\textwidth]{Fig_LBC_zoom} 
    142 \caption{   \protect\label{Fig_LBC_zoom} 
     142\caption{   \protect\label{fig:LBC_zoom} 
    143143Position of a model domain compared to the data input domain when the zoom functionality is used.} 
    144144\end{center}   \end{figure} 
     
    150150% ================================================================ 
    151151\section{Accuracy and reproducibility (\protect\mdl{lib\_fortran})} 
    152 \label{MISC_fortran} 
     152\label{sec:MISC_fortran} 
    153153 
    154154\subsection{Issues with intrinsinc SIGN function (\protect\key{nosignedzero})} 
    155 \label{MISC_sign} 
     155\label{subsec:MISC_sign} 
    156156 
    157157The SIGN(A, B) is the \textsc {Fortran} intrinsic function delivers the magnitude  
     
    179179 
    180180\subsection{MPP reproducibility} 
    181 \label{MISC_glosum} 
     181\label{subsec:MISC_glosum} 
    182182 
    183183The numerical reproducibility of simulations on distributed memory parallel computers  
     
    207207 
    208208\subsection{MPP scalability} 
    209 \label{MISC_mppsca} 
     209\label{subsec:MISC_mppsca} 
    210210 
    211211The default method of communicating values across the north-fold in distributed memory applications 
     
    231231% ================================================================ 
    232232\section{Model optimisation, control print and benchmark} 
    233 \label{MISC_opt} 
     233\label{sec:MISC_opt} 
    234234%--------------------------------------------namctl------------------------------------------------------- 
    235235\forfile{../namelists/namctl}  
     
    270270 
    271271$\bullet$  Benchmark (\np{nn\_bench}). This option defines a benchmark run based on  
    272 a GYRE configuration (see \S\ref{CFG_gyre}) in which the resolution remains the same  
     272a GYRE configuration (see \autoref{sec:CFG_gyre}) in which the resolution remains the same  
    273273whatever the domain size. This allows a very large model domain to be used, just by  
    274274changing the domain size (\jp{jpiglo}, \jp{jpjglo}) and without adjusting either the time-step  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics.tex

    r9393 r9407  
    66 
    77\chapter{Model Basics} 
    8 \label{PE} 
     8\label{chap:PE} 
    99\minitoc 
    1010 
     
    1616% ================================================================ 
    1717\section{Primitive equations} 
    18 \label{PE_PE} 
     18\label{sec:PE_PE} 
    1919 
    2020% ------------------------------------------------------------------------------------------------------------- 
     
    2323 
    2424\subsection{Vector invariant formulation} 
    25 \label{PE_Vector} 
     25\label{subsec:PE_Vector} 
    2626 
    2727 
     
    6161hydrostatic equilibrium, the incompressibility equation, the heat and salt conservation  
    6262equations and an equation of state): 
    63 \begin{subequations} \label{Eq_PE} 
    64   \begin{equation}     \label{Eq_PE_dyn} 
     63\begin{subequations} \label{eq:PE} 
     64  \begin{equation}     \label{eq:PE_dyn} 
    6565\frac{\partial {\rm {\bf U}}_h }{\partial t}= 
    6666-\left[    {\left( {\nabla \times {\rm {\bf U}}} \right)\times {\rm {\bf U}} 
     
    6969-\frac{1}{\rho _o }\nabla _h p + {\rm {\bf D}}^{\rm {\bf U}} + {\rm {\bf F}}^{\rm {\bf U}} 
    7070  \end{equation} 
    71   \begin{equation}     \label{Eq_PE_hydrostatic} 
     71  \begin{equation}     \label{eq:PE_hydrostatic} 
    7272\frac{\partial p }{\partial z} = - \rho \ g 
    7373  \end{equation} 
    74   \begin{equation}     \label{Eq_PE_continuity} 
     74  \begin{equation}     \label{eq:PE_continuity} 
    7575\nabla \cdot {\bf U}=  0 
    7676  \end{equation} 
    77 \begin{equation} \label{Eq_PE_tra_T} 
     77\begin{equation} \label{eq:PE_tra_T} 
    7878\frac{\partial T}{\partial t} = - \nabla \cdot  \left( T \ \rm{\bf U} \right) + D^T + F^T 
    7979  \end{equation} 
    80   \begin{equation}     \label{Eq_PE_tra_S} 
     80  \begin{equation}     \label{eq:PE_tra_S} 
    8181\frac{\partial S}{\partial t} = - \nabla \cdot  \left( S \ \rm{\bf U} \right) + D^S + F^S 
    8282  \end{equation} 
    83   \begin{equation}     \label{Eq_PE_eos} 
     83  \begin{equation}     \label{eq:PE_eos} 
    8484\rho = \rho \left( T,S,p \right) 
    8585  \end{equation} 
     
    8787where $\nabla$ is the generalised derivative vector operator in $(\bf i,\bf j, \bf k)$ directions,  
    8888$t$ is the time, $z$ is the vertical coordinate, $\rho $ is the \textit{in situ} density given by  
    89 the equation of state (\ref{Eq_PE_eos}), $\rho_o$ is a reference density, $p$ the pressure,  
     89the equation of state (\autoref{eq:PE_eos}), $\rho_o$ is a reference density, $p$ the pressure,  
    9090$f=2 \bf \Omega \cdot \bf k$ is the Coriolis acceleration (where $\bf \Omega$ is the Earth's  
    9191angular velocity vector), and $g$ is the gravitational acceleration.  
     
    9393physics for momentum, temperature and salinity, and ${\rm {\bf F}}^{\rm {\bf U}}$, $F^T$  
    9494and $F^S$ surface forcing terms. Their nature and formulation are discussed in  
    95 \S\ref{PE_zdf_ldf} and page \S\ref{PE_boundary_condition}. 
     95\autoref{sec:PE_zdf_ldf} and \autoref{subsec:PE_boundary_condition}. 
    9696 
    9797. 
     
    101101% ------------------------------------------------------------------------------------------------------------- 
    102102\subsection{Boundary conditions} 
    103 \label{PE_boundary_condition} 
     103\label{subsec:PE_boundary_condition} 
    104104 
    105105An ocean is bounded by complex coastlines, bottom topography at its base and an air-sea  
     
    107107and $z=\eta(i,j,k,t)$, where $H$ is the depth of the ocean bottom and $\eta$ is the height  
    108108of the sea surface. Both $H$ and $\eta$ are usually referenced to a given surface, $z=0$,  
    109 chosen as a mean sea surface (Fig.~\ref{Fig_ocean_bc}). Through these two boundaries,  
     109chosen as a mean sea surface (\autoref{fig:ocean_bc}). Through these two boundaries,  
    110110the ocean can exchange fluxes of heat, fresh water, salt, and momentum with the solid earth,  
    111111the continental margins, the sea ice and the atmosphere. However, some of these fluxes are  
     
    117117\begin{figure}[!ht]   \begin{center} 
    118118\includegraphics[width=0.90\textwidth]{Fig_I_ocean_bc} 
    119 \caption{    \protect\label{Fig_ocean_bc}  
     119\caption{    \protect\label{fig:ocean_bc}  
    120120The ocean is bounded by two surfaces, $z=-H(i,j)$ and $z=\eta(i,j,t)$, where $H$  
    121121is the depth of the sea floor and $\eta$ the height of the sea surface.  
     
    137137\footnote{In fact, it has been shown that the heat flux associated with the solid Earth cooling  
    138138($i.e.$the geothermal heating) is not negligible for the thermohaline circulation of the world  
    139 ocean (see \ref{TRA_bbc}).}.  
     139ocean (see \autoref{subsec:TRA_bbc}).}.  
    140140The boundary condition is thus set to no flux of heat and salt across solid boundaries.  
    141141For momentum, the situation is different. There is no flow across solid boundaries,  
     
    143143the bottom velocity is parallel to solid boundaries). This kinematic boundary condition  
    144144can be expressed as: 
    145 \begin{equation} \label{Eq_PE_w_bbc} 
     145\begin{equation} \label{eq:PE_w_bbc} 
    146146w = -{\rm {\bf U}}_h \cdot  \nabla _h \left( H \right) 
    147147\end{equation} 
     
    150150in terms of turbulent fluxes using bottom and/or lateral boundary conditions. Its specification  
    151151depends on the nature of the physical parameterisation used for ${\rm {\bf D}}^{\rm {\bf U}}$  
    152 in \eqref{Eq_PE_dyn}. It is discussed in \S\ref{PE_zdf}, page~\pageref{PE_zdf}.% and Chap. III.6 to 9. 
     152in \autoref{eq:PE_dyn}. It is discussed in \autoref{eq:PE_zdf}.% and Chap. III.6 to 9. 
    153153\item[Atmosphere - ocean interface:] the kinematic surface condition plus the mass flux  
    154154of fresh water PE  (the precipitation minus evaporation budget) leads to:  
    155 \begin{equation} \label{Eq_PE_w_sbc} 
     155\begin{equation} \label{eq:PE_w_sbc} 
    156156w = \frac{\partial \eta }{\partial t}  
    157157    + \left. {{\rm {\bf U}}_h } \right|_{z=\eta } \cdot  \nabla _h \left( \eta \right)  
     
    176176% ================================================================ 
    177177\section{Horizontal pressure gradient } 
    178 \label{PE_hor_pg} 
     178\label{sec:PE_hor_pg} 
    179179 
    180180% ------------------------------------------------------------------------------------------------------------- 
     
    182182% ------------------------------------------------------------------------------------------------------------- 
    183183\subsection{Pressure formulation} 
    184 \label{PE_p_formulation} 
     184\label{subsec:PE_p_formulation} 
    185185 
    186186The total pressure at a given depth $z$ is composed of a surface pressure $p_s$ at a  
    187187reference geopotential surface ($z=0$) and a hydrostatic pressure $p_h$ such that:  
    188 $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}),  
    189 assuming that pressure in decibars can be approximated by depth in meters in (\ref{Eq_PE_eos}).  
     188$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}),  
     189assuming that pressure in decibars can be approximated by depth in meters in (\autoref{eq:PE_eos}).  
    190190The hydrostatic pressure is then given by: 
    191 \begin{equation} \label{Eq_PE_pressure} 
     191\begin{equation} \label{eq:PE_pressure} 
    192192p_h \left( {i,j,z,t} \right) 
    193193 = \int_{\varsigma =z}^{\varsigma =0} {g\;\rho \left( {T,S,\varsigma} \right)\;d\varsigma }  
     
    213213% ------------------------------------------------------------------------------------------------------------- 
    214214\subsection{Free surface formulation} 
    215 \label{PE_free_surface} 
     215\label{subsec:PE_free_surface} 
    216216 
    217217In the free surface formulation, a variable $\eta$, the sea-surface height, is introduced  
    218218which describes the shape of the air-sea interface. This variable is solution of a  
    219219prognostic equation which is established by forming the vertical average of the kinematic  
    220 surface condition (\ref{Eq_PE_w_bbc}): 
    221 \begin{equation} \label{Eq_PE_ssh} 
     220surface condition (\autoref{eq:PE_w_bbc}): 
     221\begin{equation} \label{eq:PE_ssh} 
    222222\frac{\partial \eta }{\partial t}=-D+P-E 
    223223   \quad \text{where} \  
    224224D=\nabla \cdot \left[ {\left( {H+\eta } \right) \; {\rm{\bf \overline{U}}}_h \,} \right] 
    225225\end{equation} 
    226 and using (\ref{Eq_PE_hydrostatic}) the surface pressure is given by: $p_s = \rho \, g \, \eta$. 
     226and using (\autoref{eq:PE_hydrostatic}) the surface pressure is given by: $p_s = \rho \, g \, \eta$. 
    227227 
    228228Allowing the air-sea interface to move introduces the external gravity waves (EGWs)  
     
    237237with the baroclinic structure of the ocean (internal waves) possibly in shallow seas,  
    238238then a non linear free surface is the most appropriate. This means that no  
    239 approximation is made in (\ref{Eq_PE_ssh}) and that the variation of the ocean  
     239approximation is made in (\autoref{eq:PE_ssh}) and that the variation of the ocean  
    240240volume is fully taken into account. Note that in order to study the fast time scales  
    241241associated with EGWs it is necessary to minimize time filtering effects (use an  
    242242explicit time scheme with very small time step, or a split-explicit scheme with  
    243 reasonably small time step, see \S\ref{DYN_spg_exp} or \S\ref{DYN_spg_ts}. 
     243reasonably small time step, see \autoref{subsec:DYN_spg_exp} or \autoref{subsec:DYN_spg_ts}. 
    244244 
    245245$\bullet$ If one is not interested in EGW but rather sees them as high frequency  
     
    247247not altering the slow barotropic Rossby waves. If further, an approximative conservation  
    248248of heat and salt contents is sufficient for the problem solved, then it is  
    249 sufficient to solve a linearized version of (\ref{Eq_PE_ssh}), which still allows  
     249sufficient to solve a linearized version of (\autoref{eq:PE_ssh}), which still allows  
    250250to take into account freshwater fluxes applied at the ocean surface \citep{Roullet_Madec_JGR00}. 
    251251Nevertheless, with the linearization, an exact conservation of heat and salt contents is lost. 
     
    255255or the implicit scheme \citep{Dukowicz1994} or the addition of a filtering force in the momentum equation  
    256256\citep{Roullet_Madec_JGR00}. With the present release, \NEMO offers the choice between  
    257 an explicit free surface (see \S\ref{DYN_spg_exp}) or a split-explicit scheme strongly  
    258 inspired the one proposed by \citet{Shchepetkin_McWilliams_OM05} (see \S\ref{DYN_spg_ts}). 
     257an explicit free surface (see \autoref{subsec:DYN_spg_exp}) or a split-explicit scheme strongly  
     258inspired the one proposed by \citet{Shchepetkin_McWilliams_OM05} (see \autoref{subsec:DYN_spg_ts}). 
    259259 
    260260%\newpage 
     
    265265% ================================================================ 
    266266\section{Curvilinear \textit{z-}coordinate system} 
    267 \label{PE_zco} 
     267\label{sec:PE_zco} 
    268268 
    269269 
     
    272272% ------------------------------------------------------------------------------------------------------------- 
    273273\subsection{Tensorial formalism} 
    274 \label{PE_tensorial} 
     274\label{subsec:PE_tensorial} 
    275275 
    276276In many ocean circulation problems, the flow field has regions of enhanced dynamics  
     
    294294associated with the positively oriented orthogonal set of unit vectors (\textbf{i},\textbf{j},\textbf{k})  
    295295linked to the earth such that \textbf{k} is the local upward vector and (\textbf{i},\textbf{j}) are  
    296 two vectors orthogonal to \textbf{k}, $i.e.$ along geopotential surfaces (Fig.\ref{Fig_referential}).  
     296two vectors orthogonal to \textbf{k}, $i.e.$ along geopotential surfaces (\autoref{fig:referential}).  
    297297Let $(\lambda,\varphi,z)$ be the geographical coordinate system in which a position is defined  
    298298by the latitude $\varphi(i,j)$, the longitude $\lambda(i,j)$ and the distance from the centre of  
    299299the earth $a+z(k)$ where $a$ is the earth's radius and $z$ the altitude above a reference sea  
    300 level (Fig.\ref{Fig_referential}). The local deformation of the curvilinear coordinate system is  
     300level (\autoref{fig:referential}). The local deformation of the curvilinear coordinate system is  
    301301given by $e_1$, $e_2$ and $e_3$, the three scale factors: 
    302 \begin{equation} \label{Eq_scale_factors} 
     302\begin{equation} \label{eq:scale_factors} 
    303303\begin{aligned} 
    304304 e_1 &=\left( {a+z} \right)\;\left[ {\left( {\frac{\partial \lambda  
     
    315315\begin{figure}[!tb]   \begin{center} 
    316316\includegraphics[width=0.60\textwidth]{Fig_I_earth_referential} 
    317 \caption{   \protect\label{Fig_referential}  
     317\caption{   \protect\label{fig:referential}  
    318318the geographical coordinate system $(\lambda,\varphi,z)$ and the curvilinear  
    319319coordinate system (\textbf{i},\textbf{j},\textbf{k}). } 
     
    322322 
    323323Since the ocean depth is far smaller than the earth's radius, $a+z$, can be replaced by  
    324 $a$ in (\ref{Eq_scale_factors}) (thin-shell approximation). The resulting horizontal scale  
     324$a$ in (\autoref{eq:scale_factors}) (thin-shell approximation). The resulting horizontal scale  
    325325factors $e_1$, $e_2$  are independent of $k$ while the vertical scale factor is a single  
    326326function of $k$ as \textbf{k} is parallel to \textbf{z}. The scalar and vector operators that  
    327 appear in the primitive equations (Eqs. \eqref{Eq_PE_dyn} to \eqref{Eq_PE_eos}) can  
     327appear in the primitive equations (\autoref{eq:PE_dyn} to \autoref{eq:PE_eos}) can  
    328328be written in the tensorial form, invariant in any orthogonal horizontal curvilinear coordinate  
    329329system transformation: 
    330 \begin{subequations} \label{Eq_PE_discrete_operators} 
    331 \begin{equation} \label{Eq_PE_grad} 
     330\begin{subequations} \label{eq:PE_discrete_operators} 
     331\begin{equation} \label{eq:PE_grad} 
    332332\nabla q=\frac{1}{e_1 }\frac{\partial q}{\partial i}\;{\rm {\bf  
    333333i}}+\frac{1}{e_2 }\frac{\partial q}{\partial j}\;{\rm {\bf j}}+\frac{1}{e_3  
    334334}\frac{\partial q}{\partial k}\;{\rm {\bf k}}    \\ 
    335335\end{equation} 
    336 \begin{equation} \label{Eq_PE_div} 
     336\begin{equation} \label{eq:PE_div} 
    337337\nabla \cdot {\rm {\bf A}}  
    338338= \frac{1}{e_1 \; e_2} \left[  
     
    341341+ \frac{1}{e_3} \left[ \frac{\partial a_3}{\partial k }   \right] 
    342342\end{equation} 
    343 \begin{equation} \label{Eq_PE_curl} 
     343\begin{equation} \label{eq:PE_curl} 
    344344   \begin{split} 
    345345\nabla \times \vect{A} =  
     
    352352   \end{split} 
    353353\end{equation} 
    354 \begin{equation} \label{Eq_PE_lap} 
     354\begin{equation} \label{eq:PE_lap} 
    355355\Delta q = \nabla \cdot \left(  \nabla q \right) 
    356356\end{equation} 
    357 \begin{equation} \label{Eq_PE_lap_vector} 
     357\begin{equation} \label{eq:PE_lap_vector} 
    358358\Delta {\rm {\bf A}} = 
    359359  \nabla \left( \nabla \cdot {\rm {\bf A}} \right) 
     
    367367% ------------------------------------------------------------------------------------------------------------- 
    368368\subsection{Continuous model equations} 
    369 \label{PE_zco_Eq} 
     369\label{subsec:PE_zco_Eq} 
    370370 
    371371In order to express the Primitive Equations in tensorial formalism, it is necessary to compute  
    372372the horizontal component of the non-linear and viscous terms of the equation using  
    373 \eqref{Eq_PE_grad}) to \eqref{Eq_PE_lap_vector}.  
     373\autoref{eq:PE_grad}) to \autoref{eq:PE_lap_vector}.  
    374374Let us set $\vect U=(u,v,w)={\vect{U}}_h +w\;\vect{k}$, the velocity in the $(i,j,k)$ coordinate  
    375375system and define the relative vorticity $\zeta$ and the divergence of the horizontal velocity  
    376376field $\chi$, by: 
    377 \begin{equation} \label{Eq_PE_curl_Uh} 
     377\begin{equation} \label{eq:PE_curl_Uh} 
    378378\zeta =\frac{1}{e_1 e_2 }\left[ {\frac{\partial \left( {e_2 \,v}  
    379379\right)}{\partial i}-\frac{\partial \left( {e_1 \,u} \right)}{\partial j}}  
    380380\right] 
    381381\end{equation} 
    382 \begin{equation} \label{Eq_PE_div_Uh} 
     382\begin{equation} \label{eq:PE_div_Uh} 
    383383\chi =\frac{1}{e_1 e_2 }\left[ {\frac{\partial \left( {e_2 \,u}  
    384384\right)}{\partial i}+\frac{\partial \left( {e_1 \,v} \right)}{\partial j}}  
     
    388388Using the fact that the horizontal scale factors $e_1$ and $e_2$ are independent of $k$  
    389389and that $e_3$  is a function of the single variable $k$, the nonlinear term of  
    390 \eqref{Eq_PE_dyn} can be transformed as follows: 
     390\autoref{eq:PE_dyn} can be transformed as follows: 
    391391\begin{flalign*} 
    392392&\left[ {\left( { \nabla \times {\rm {\bf U}}    } \right) \times {\rm {\bf U}} 
     
    427427 
    428428The last term of the right hand side is obviously zero, and thus the nonlinear term of  
    429 \eqref{Eq_PE_dyn} is written in the $(i,j,k)$ coordinate system: 
    430 \begin{equation} \label{Eq_PE_vector_form} 
     429\autoref{eq:PE_dyn} is written in the $(i,j,k)$ coordinate system: 
     430\begin{equation} \label{eq:PE_vector_form} 
    431431\left[ {\left( {  \nabla \times {\rm {\bf U}}    } \right) \times {\rm {\bf U}} 
    432432+\frac{1}{2}   \nabla \left( {{\rm {\bf U}}^2} \right)}   \right]_h  
     
    440440For some purposes, it can be advantageous to write this term in the so-called flux form,  
    441441$i.e.$ to write it as the divergence of fluxes. For example, the first component of  
    442 \eqref{Eq_PE_vector_form} (the $i$-component) is transformed as follows: 
     442\autoref{eq:PE_vector_form} (the $i$-component) is transformed as follows: 
    443443\begin{flalign*} 
    444444&{ \begin{array}{*{20}l} 
     
    509509 
    510510The flux form of the momentum advection term is therefore given by: 
    511 \begin{multline} \label{Eq_PE_flux_form} 
     511\begin{multline} \label{eq:PE_flux_form} 
    512512      \left[  
    513513  \left(    {\nabla \times {\rm {\bf U}}}    \right) \times {\rm {\bf U}} 
     
    529529the curvilinear nature of the coordinate system used. The latter is called the \emph{metric}  
    530530term and can be viewed as a modification of the Coriolis parameter:  
    531 \begin{equation} \label{Eq_PE_cor+metric} 
     531\begin{equation} \label{eq:PE_cor+metric} 
    532532f \to f + \frac{1}{e_1\;e_2}  \left(  v \frac{\partial e_2}{\partial i} 
    533533                        -u \frac{\partial e_1}{\partial j}  \right) 
     
    547547$\bullet$ \textbf{Vector invariant form of the momentum equations} : 
    548548 
    549 \begin{subequations} \label{Eq_PE_dyn_vect} 
    550 \begin{equation} \label{Eq_PE_dyn_vect_u} \begin{split} 
     549\begin{subequations} \label{eq:PE_dyn_vect} 
     550\begin{equation} \label{eq:PE_dyn_vect_u} \begin{split} 
    551551\frac{\partial u}{\partial t}  
    552552= +   \left( {\zeta +f} \right)\,v                                     
     
    568568\vspace{+10pt} 
    569569$\bullet$ \textbf{flux form of the momentum equations} : 
    570 \begin{subequations} \label{Eq_PE_dyn_flux} 
    571 \begin{multline} \label{Eq_PE_dyn_flux_u} 
     570\begin{subequations} \label{eq:PE_dyn_flux} 
     571\begin{multline} \label{eq:PE_dyn_flux_u} 
    572572\frac{\partial u}{\partial t}= 
    573573+   \left( { f + \frac{1}{e_1 \; e_2} 
     
    581581+   D_u^{\vect{U}} +   F_u^{\vect{U}} 
    582582\end{multline} 
    583 \begin{multline} \label{Eq_PE_dyn_flux_v} 
     583\begin{multline} \label{eq:PE_dyn_flux_v} 
    584584\frac{\partial v}{\partial t}= 
    585585-   \left( { f + \frac{1}{e_1 \; e_2} 
     
    594594\end{multline} 
    595595\end{subequations} 
    596 where $\zeta$, the relative vorticity, is given by \eqref{Eq_PE_curl_Uh} and $p_s $,  
     596where $\zeta$, the relative vorticity, is given by \autoref{eq:PE_curl_Uh} and $p_s $,  
    597597the surface pressure, is given by: 
    598 \begin{equation} \label{Eq_PE_spg} 
     598\begin{equation} \label{eq:PE_spg} 
    599599p_s =  \rho \,g \,\eta  
    600600\end{equation} 
    601 with $\eta$ is solution of \eqref{Eq_PE_ssh} 
     601with $\eta$ is solution of \autoref{eq:PE_ssh} 
    602602 
    603603The vertical velocity and the hydrostatic pressure are diagnosed from the following equations: 
    604 \begin{equation} \label{Eq_w_diag} 
     604\begin{equation} \label{eq:w_diag} 
    605605\frac{\partial w}{\partial k}=-\chi \;e_3  
    606606\end{equation} 
    607 \begin{equation} \label{Eq_hp_diag} 
     607\begin{equation} \label{eq:hp_diag} 
    608608\frac{\partial p_h }{\partial k}=-\rho \;g\;e_3  
    609609\end{equation} 
    610 where the divergence of the horizontal velocity, $\chi$ is given by \eqref{Eq_PE_div_Uh}. 
     610where the divergence of the horizontal velocity, $\chi$ is given by \autoref{eq:PE_div_Uh}. 
    611611 
    612612\vspace{+10pt} 
    613613$\bullet$ \textit{tracer equations} : 
    614 \begin{equation} \label{Eq_S} 
     614\begin{equation} \label{eq:S} 
    615615\frac{\partial T}{\partial t} =  
    616616-\frac{1}{e_1 e_2 }\left[ {      \frac{\partial \left( {e_2 T\,u} \right)}{\partial i} 
     
    618618-\frac{1}{e_3 }\frac{\partial \left( {T\,w} \right)}{\partial k} + D^T + F^T 
    619619\end{equation} 
    620 \begin{equation} \label{Eq_T} 
     620\begin{equation} \label{eq:T} 
    621621\frac{\partial S}{\partial t} =  
    622622-\frac{1}{e_1 e_2 }\left[    {\frac{\partial \left( {e_2 S\,u} \right)}{\partial i} 
     
    624624-\frac{1}{e_3 }\frac{\partial \left( {S\,w} \right)}{\partial k} + D^S + F^S 
    625625\end{equation} 
    626 \begin{equation} \label{Eq_rho} 
     626\begin{equation} \label{eq:rho} 
    627627\rho =\rho \left( {T,S,z(k)} \right) 
    628628\end{equation} 
    629629 
    630630The expression of \textbf{D}$^{U}$, $D^{S}$ and $D^{T}$ depends on the subgrid scale  
    631 parameterisation used. It will be defined in \S\ref{PE_zdf}. The nature and formulation of  
     631parameterisation used. It will be defined in \autoref{eq:PE_zdf}. The nature and formulation of  
    632632${\rm {\bf F}}^{\rm {\bf U}}$, $F^T$ and $F^S$, the surface forcing terms, are discussed  
    633 in Chapter~\ref{SBC}. 
     633in \autoref{chap:SBC}. 
    634634 
    635635 
     
    640640% ================================================================ 
    641641\section{Curvilinear generalised vertical coordinate system} 
    642 \label{PE_gco} 
     642\label{sec:PE_gco} 
    643643 
    644644The 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.  
     
    648648 
    649649In fact one is totally free to choose any space and time vertical coordinate by introducing an arbitrary vertical coordinate : 
    650 \begin{equation} \label{Eq_s} 
     650\begin{equation} \label{eq:s} 
    651651s=s(i,j,k,t) 
    652652\end{equation} 
    653 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}. 
     653with 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}. 
    654654This 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). 
    655655The 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. 
     
    693693\subsection{\textit{S-}coordinate formulation} 
    694694 
    695 Starting from the set of equations established in \S\ref{PE_zco} for the special case $k=z$  
     695Starting from the set of equations established in \autoref{sec:PE_zco} for the special case $k=z$  
    696696and thus $e_3=1$, we introduce an arbitrary vertical coordinate $s=s(i,j,k,t)$, which includes  
    697697$z$-, \textit{z*}- and $\sigma-$coordinates as special cases ($s=z$, $s=\textit{z*}$, and  
    698698$s=\sigma=z/H$ or $=z/\left(H+\eta \right)$, resp.). A formal derivation of the transformed  
    699 equations is given in Appendix~\ref{Apdx_A}. Let us define the vertical scale factor by  
     699equations is given in \autoref{apdx:A}. Let us define the vertical scale factor by  
    700700$e_3=\partial_s z$  ($e_3$ is now a function of $(i,j,k,t)$ ), and the slopes in the  
    701701(\textbf{i},\textbf{j}) directions between $s-$ and $z-$surfaces by : 
    702 \begin{equation} \label{Eq_PE_sco_slope} 
     702\begin{equation} \label{eq:PE_sco_slope} 
    703703\sigma _1 =\frac{1}{e_1 }\;\left. {\frac{\partial z}{\partial i}} \right|_s  
    704704\quad \text{, and } \quad  
     
    707707We also introduce  $\omega $, a dia-surface velocity component, defined as the velocity  
    708708relative to the moving $s$-surfaces and normal to them: 
    709 \begin{equation} \label{Eq_PE_sco_w} 
     709\begin{equation} \label{eq:PE_sco_w} 
    710710\omega  = w - e_3 \, \frac{\partial s}{\partial t} - \sigma _1 \,u - \sigma _2 \,v    \\ 
    711711\end{equation} 
    712712 
    713 The equations solved by the ocean model \eqref{Eq_PE} in $s-$coordinate can be written as follows (see Appendix~\ref{Apdx_A_momentum}): 
     713The equations solved by the ocean model \autoref{eq:PE} in $s-$coordinate can be written as follows (see \autoref{sec:A_momentum}): 
    714714 
    715715 \vspace{0.5cm} 
    716716$\bullet$ Vector invariant form of the momentum equation : 
    717 \begin{multline} \label{Eq_PE_sco_u} 
     717\begin{multline} \label{eq:PE_sco_u} 
    718718\frac{\partial  u   }{\partial t}= 
    719719   +   \left( {\zeta +f} \right)\,v                                     
     
    724724   +   D_u^{\vect{U}}  +   F_u^{\vect{U}} \quad 
    725725\end{multline} 
    726 \begin{multline} \label{Eq_PE_sco_v} 
     726\begin{multline} \label{eq:PE_sco_v} 
    727727\frac{\partial v }{\partial t}= 
    728728   -   \left( {\zeta +f} \right)\,u    
     
    736736 \vspace{0.5cm} 
    737737$\bullet$ Vector invariant form of the momentum equation : 
    738 \begin{multline} \label{Eq_PE_sco_u} 
     738\begin{multline} \label{eq:PE_sco_u} 
    739739\frac{1}{e_3} \frac{\partial \left(  e_3\,u  \right) }{\partial t}= 
    740740   +   \left( { f + \frac{1}{e_1 \; e_2 } 
     
    749749   +   D_u^{\vect{U}}  +   F_u^{\vect{U}} \quad 
    750750\end{multline} 
    751 \begin{multline} \label{Eq_PE_sco_v} 
     751\begin{multline} \label{eq:PE_sco_v} 
    752752\frac{1}{e_3} \frac{\partial \left(  e_3\,v  \right) }{\partial t}= 
    753753   -   \left( { f + \frac{1}{e_1 \; e_2} 
     
    766766pressure have the same expressions as in $z$-coordinates although they do not represent  
    767767exactly the same quantities. $\omega$ is provided by the continuity equation  
    768 (see Appendix~\ref{Apdx_A}): 
    769 \begin{equation} \label{Eq_PE_sco_continuity} 
     768(see \autoref{apdx:A}): 
     769\begin{equation} \label{eq:PE_sco_continuity} 
    770770\frac{\partial e_3}{\partial t} + e_3 \; \chi + \frac{\partial \omega }{\partial s} = 0    
    771771\qquad \text{with }\;\;   
     
    777777 \vspace{0.5cm} 
    778778$\bullet$ tracer equations: 
    779 \begin{multline} \label{Eq_PE_sco_t} 
     779\begin{multline} \label{eq:PE_sco_t} 
    780780\frac{1}{e_3} \frac{\partial \left(  e_3\,T  \right) }{\partial t}= 
    781781-\frac{1}{e_1 e_2 e_3 }\left[ {\frac{\partial \left( {e_2 e_3\,u\,T} \right)}{\partial i} 
     
    784784\end{multline} 
    785785 
    786 \begin{multline} \label{Eq_PE_sco_s} 
     786\begin{multline} \label{eq:PE_sco_s} 
    787787\frac{1}{e_3} \frac{\partial \left(  e_3\,S  \right) }{\partial t}= 
    788788-\frac{1}{e_1 e_2 e_3 }\left[ {\frac{\partial \left( {e_2 e_3\,u\,S} \right)}{\partial i} 
     
    805805% ------------------------------------------------------------------------------------------------------------- 
    806806\subsection{Curvilinear \textit{z*}--coordinate system} 
    807 \label{PE_zco_star} 
     807\label{subsec:PE_zco_star} 
    808808 
    809809%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    810810\begin{figure}[!b]    \begin{center} 
    811811\includegraphics[width=1.0\textwidth]{Fig_z_zstar} 
    812 \caption{   \protect\label{Fig_z_zstar}  
     812\caption{   \protect\label{fig:z_zstar}  
    813813(a) $z$-coordinate in linear free-surface case ;  
    814814(b) $z-$coordinate in non-linear free surface case ;  
     
    837837detailed in Adcroft and Campin (2004). The major points are summarized 
    838838here. The position ( \textit{z*}) and vertical discretization (\textit{z*}) are expressed as: 
    839 \begin{equation} \label{Eq_z-star} 
     839\begin{equation} \label{eq:z-star} 
    840840H +  \textit{z*} = (H + z) / r \quad \text{and} \ \delta \textit{z*} = \delta z / r \quad \text{with} \ r = \frac{H+\eta} {H} 
    841841\end{equation}  
     
    855855To overcome problems with vanishing surface and/or bottom cells, we consider the  
    856856zstar coordinate  
    857 \begin{equation} \label{PE_} 
     857\begin{equation} \label{eq:PE_} 
    858858   z^\star = H \left( \frac{z-\eta}{H+\eta} \right) 
    859859\end{equation} 
     
    867867The 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  
    868868undulations of the bottom topography versus undulations in the surface height, it  
    869 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}.  
     869is 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}.  
    870870Additionally, since $z^\star$ when $\eta = 0$, no flow is spontaneously generated in an  
    871871unforced ocean starting from rest, regardless the bottom topography. This behaviour is in contrast to the case with "s"-models, where pressure gradient errors in  
     
    873873gradient solver. The quasi-horizontal nature of the coordinate surfaces also facilitates the implementation of neutral physics parameterizations in $z^\star$ models using  
    874874the same techniques as in $z$-models (see Chapters 13-16 of \cite{Griffies_Bk04}) for a  
    875 discussion of neutral physics in $z$-models, as well as Section \S\ref{LDF_slp}  
     875discussion of neutral physics in $z$-models, as well as \autoref{sec:LDF_slp}  
    876876in this document for treatment in \NEMO).  
    877877 
     
    902902% ------------------------------------------------------------------------------------------------------------- 
    903903\subsection{Curvilinear terrain-following \textit{s}--coordinate} 
    904 \label{PE_sco} 
     904\label{subsec:PE_sco} 
    905905 
    906906% ------------------------------------------------------------------------------------------------------------- 
     
    915915one along continental slopes. Topographic Rossby waves can be excited and can interact  
    916916with the mean current. In the $z-$coordinate system presented in the previous section  
    917 (\S\ref{PE_zco}), $z-$surfaces are geopotential surfaces. The bottom topography is  
     917(\autoref{sec:PE_zco}), $z-$surfaces are geopotential surfaces. The bottom topography is  
    918918discretised by steps. This often leads to a misrepresentation of a gradually sloping bottom  
    919919and to large localized depth gradients associated with large localized vertical velocities.  
     
    937937The main two problems come from the truncation error in the horizontal pressure  
    938938gradient and a possibly increased diapycnal diffusion. The horizontal pressure force  
    939 in $s$-coordinate consists of two terms (see Appendix~\ref{Apdx_A}), 
    940  
    941 \begin{equation} \label{Eq_PE_p_sco} 
     939in $s$-coordinate consists of two terms (see \autoref{apdx:A}), 
     940 
     941\begin{equation} \label{eq:PE_p_sco} 
    942942\left. {\nabla p} \right|_z =\left. {\nabla p} \right|_s -\frac{\partial  
    943943p}{\partial s}\left. {\nabla z} \right|_s  
    944944\end{equation} 
    945945 
    946 The second term in \eqref{Eq_PE_p_sco} depends on the tilt of the coordinate surface  
     946The second term in \autoref{eq:PE_p_sco} depends on the tilt of the coordinate surface  
    947947and introduces a truncation error that is not present in a $z$-model. In the special case  
    948948of a $\sigma-$coordinate (i.e. a depth-normalised coordinate system $\sigma = z/H$),  
     
    958958topography: a envelope topography is defined in $s$-coordinate on which a full or  
    959959partial step bottom topography is then applied in order to adjust the model depth to  
    960 the observed one (see \S\ref{DOM_zgr}. 
     960the observed one (see \autoref{sec:DOM_zgr}. 
    961961 
    962962For numerical reasons a minimum of diffusion is required along the coordinate surfaces  
     
    973973the 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  
    974974($i.e.$ the main thermocline) \citep{Madec_al_JPO96}. An alternate solution consists of rotating  
    975 the lateral diffusive tensor to geopotential or to isoneutral surfaces (see \S\ref{PE_ldf}.  
     975the lateral diffusive tensor to geopotential or to isoneutral surfaces (see \autoref{subsec:PE_ldf}.  
    976976Unfortunately, the slope of isoneutral surfaces relative to the $s$-surfaces can very large,  
    977 strongly exceeding the stability limit of such a operator when it is discretized (see Chapter~\ref{LDF}).  
     977strongly exceeding the stability limit of such a operator when it is discretized (see \autoref{chap:LDF}).  
    978978 
    979979The $s-$coordinates introduced here \citep{Lott_al_OM90,Madec_al_JPO96} differ mainly in two  
     
    988988% ------------------------------------------------------------------------------------------------------------- 
    989989\subsection{\texorpdfstring{Curvilinear $\tilde{z}$--coordinate}{}} 
    990 \label{PE_zco_tilde} 
     990\label{subsec:PE_zco_tilde} 
    991991 
    992992The $\tilde{z}$-coordinate has been developed by \citet{Leclair_Madec_OM11}. 
     
    10001000% ================================================================ 
    10011001\section{Subgrid scale physics} 
    1002 \label{PE_zdf_ldf} 
     1002\label{sec:PE_zdf_ldf} 
    10031003 
    10041004The primitive equations describe the behaviour of a geophysical fluid at  
     
    10191019The control exerted by gravity on the flow induces a strong anisotropy  
    10201020between the lateral and vertical motions. Therefore subgrid-scale physics   
    1021 \textbf{D}$^{\vect{U}}$, $D^{S}$ and $D^{T}$  in \eqref{Eq_PE_dyn},  
    1022 \eqref{Eq_PE_tra_T} and \eqref{Eq_PE_tra_S} are divided into a lateral part   
     1021\textbf{D}$^{\vect{U}}$, $D^{S}$ and $D^{T}$  in \autoref{eq:PE_dyn},  
     1022\autoref{eq:PE_tra_T} and \autoref{eq:PE_tra_S} are divided into a lateral part   
    10231023\textbf{D}$^{l \vect{U}}$, $D^{lS}$ and $D^{lT}$ and a vertical part   
    10241024\textbf{D}$^{vU}$, $D^{vS}$ and $D^{vT}$. The formulation of these terms  
     
    10291029% ------------------------------------------------------------------------------------------------------------- 
    10301030\subsection{Vertical subgrid scale physics} 
    1031 \label{PE_zdf} 
     1031\label{subsec:PE_zdf} 
    10321032 
    10331033The model resolution is always larger than the scale at which the major  
     
    10441044turbulent motions is simply impractical. The resulting vertical momentum and  
    10451045tracer diffusive operators are of second order: 
    1046 \begin{equation} \label{Eq_PE_zdf} 
     1046\begin{equation} \label{eq:PE_zdf} 
    10471047   \begin{split} 
    10481048{\vect{D}}^{v \vect{U}} &=\frac{\partial }{\partial z}\left( {A^{vm}\frac{\partial {\vect{U}}_h }{\partial z}} \right) \ , \\          
     
    10541054where $A^{vm}$ and $A^{vT}$ are the vertical eddy viscosity and diffusivity coefficients,  
    10551055respectively. At the sea surface and at the bottom, turbulent fluxes of momentum, heat  
    1056 and salt must be specified (see Chap.~\ref{SBC} and \ref{ZDF} and \S\ref{TRA_bbl}).  
     1056and salt must be specified (see \autoref{chap:SBC} and \autoref{chap:ZDF} and \autoref{sec:TRA_bbl}).  
    10571057All the vertical physics is embedded in the specification of the eddy coefficients.  
    10581058They can be assumed to be either constant, or function of the local fluid properties  
    10591059($e.g.$ Richardson number, Brunt-Vais\"{a}l\"{a} frequency...), or computed from a  
    1060 turbulent closure model. The choices available in \NEMO are discussed in \S\ref{ZDF}). 
     1060turbulent closure model. The choices available in \NEMO are discussed in \autoref{chap:ZDF}). 
    10611061 
    10621062% ------------------------------------------------------------------------------------------------------------- 
     
    10641064% ------------------------------------------------------------------------------------------------------------- 
    10651065\subsection{Formulation of the lateral diffusive and viscous operators} 
    1066 \label{PE_ldf} 
     1066\label{subsec:PE_ldf} 
    10671067 
    10681068Lateral turbulence can be roughly divided into a mesoscale turbulence  
     
    11241124\subsubsection{Lateral laplacian tracer diffusive operator} 
    11251125 
    1126 The lateral Laplacian tracer diffusive operator is defined by (see Appendix~\ref{Apdx_B}): 
    1127 \begin{equation} \label{Eq_PE_iso_tensor} 
     1126The lateral Laplacian tracer diffusive operator is defined by (see \autoref{apdx:B}): 
     1127\begin{equation} \label{eq:PE_iso_tensor} 
    11281128D^{lT}=\nabla {\rm {\bf .}}\left( {A^{lT}\;\Re \;\nabla T} \right) \qquad  
    11291129\mbox{with}\quad \;\;\Re =\left( {{\begin{array}{*{20}c} 
     
    11351135where $r_1 \;\mbox{and}\;r_2 $ are the slopes between the surface along  
    11361136which the diffusive operator acts and the model level ($e. g.$ $z$- or  
    1137 $s$-surfaces). Note that the formulation \eqref{Eq_PE_iso_tensor} is exact for the  
     1137$s$-surfaces). Note that the formulation \autoref{eq:PE_iso_tensor} is exact for the  
    11381138rotation between geopotential and $s$-surfaces, while it is only an approximation  
    11391139for the rotation between isoneutral and $z$- or $s$-surfaces. Indeed, in the latter  
    1140 case, two assumptions are made to simplify  \eqref{Eq_PE_iso_tensor} \citep{Cox1987}.  
     1140case, two assumptions are made to simplify  \autoref{eq:PE_iso_tensor} \citep{Cox1987}.  
    11411141First, the horizontal contribution of the dianeutral mixing is neglected since the ratio  
    11421142between iso and dia-neutral diffusive coefficients is known to be several orders of  
    11431143magnitude smaller than unity. Second, the two isoneutral directions of diffusion are  
    11441144assumed to be independent since the slopes are generally less than $10^{-2}$ in the  
    1145 ocean (see Appendix~\ref{Apdx_B}). 
     1145ocean (see \autoref{apdx:B}). 
    11461146 
    11471147For \textit{iso-level} diffusion, $r_1$ and $r_2 $ are zero. $\Re $ reduces to the identity  
     
    11501150For \textit{geopotential} diffusion, $r_1$ and $r_2 $ are the slopes between the  
    11511151geopotential and computational surfaces: they are equal to $\sigma _1$ and $\sigma _2$,  
    1152 respectively (see \eqref{Eq_PE_sco_slope} ). 
     1152respectively (see \autoref{eq:PE_sco_slope}). 
    11531153 
    11541154For \textit{isoneutral} diffusion $r_1$ and $r_2$ are the slopes between the isoneutral  
    11551155and computational surfaces. Therefore, they are different quantities, 
    11561156but have similar expressions in $z$- and $s$-coordinates. In $z$-coordinates: 
    1157 \begin{equation} \label{Eq_PE_iso_slopes} 
     1157\begin{equation} \label{eq:PE_iso_slopes} 
    11581158r_1 =\frac{e_3 }{e_1 }  \left( \pd[\rho]{i} \right) \left( \pd[\rho]{k} \right)^{-1} \, \quad 
    11591159r_2 =\frac{e_3 }{e_2 }  \left( \pd[\rho]{j} \right) \left( \pd[\rho]{k} \right)^{-1} \, 
     
    11641164 When the \textit{eddy induced velocity} parametrisation (eiv) \citep{Gent1990} is used,  
    11651165an additional tracer advection is introduced in combination with the isoneutral diffusion of tracers: 
    1166 \begin{equation} \label{Eq_PE_iso+eiv} 
     1166\begin{equation} \label{eq:PE_iso+eiv} 
    11671167D^{lT}=\nabla \cdot \left( {A^{lT}\;\Re \;\nabla T} \right) 
    11681168           +\nabla \cdot \left( {{\vect{U}}^\ast \,T} \right) 
     
    11701170where ${\vect{U}}^\ast =\left( {u^\ast ,v^\ast ,w^\ast } \right)$ is a non-divergent,  
    11711171eddy-induced transport velocity. This velocity field is defined by: 
    1172 \begin{equation} \label{Eq_PE_eiv} 
     1172\begin{equation} \label{eq:PE_eiv} 
    11731173   \begin{split} 
    11741174 u^\ast  &= +\frac{1}{e_3       }\frac{\partial }{\partial k}\left[ {A^{eiv}\;\tilde{r}_1 } \right] \\  
     
    11831183between isoneutral and \emph{geopotential} surfaces. Their values are 
    11841184thus independent of the vertical coordinate, but their expression depends on the coordinate:  
    1185 \begin{align} \label{Eq_PE_slopes_eiv} 
     1185\begin{align} \label{eq:PE_slopes_eiv} 
    11861186\tilde{r}_n = \begin{cases} 
    11871187   r_n            &      \text{in $z$-coordinate}    \\ 
     
    11931193The normal component of the eddy induced velocity is zero at all the boundaries.  
    11941194This can be achieved in a model by tapering either the eddy coefficient or the slopes  
    1195 to zero in the vicinity of the boundaries. The latter strategy is used in \NEMO (cf. Chap.~\ref{LDF}). 
     1195to zero in the vicinity of the boundaries. The latter strategy is used in \NEMO (cf. \autoref{chap:LDF}). 
    11961196 
    11971197\subsubsection{Lateral bilaplacian tracer diffusive operator} 
    11981198 
    11991199The lateral bilaplacian tracer diffusive operator is defined by: 
    1200 \begin{equation} \label{Eq_PE_bilapT} 
     1200\begin{equation} \label{eq:PE_bilapT} 
    12011201D^{lT}= - \Delta \left( \;\Delta T \right)  
    12021202\qquad \text{where} \;\; \Delta \bullet = \nabla \left( {\sqrt{B^{lT}\,}\;\Re \;\nabla \bullet} \right) 
    12031203 \end{equation} 
    1204 It is the Laplacian operator given by \eqref{Eq_PE_iso_tensor} applied twice with  
     1204It is the Laplacian operator given by \autoref{eq:PE_iso_tensor} applied twice with  
    12051205the harmonic eddy diffusion coefficient set to the square root of the biharmonic one.  
    12061206 
     
    12091209 
    12101210The Laplacian momentum diffusive operator along $z$- or $s$-surfaces is found by  
    1211 applying \eqref{Eq_PE_lap_vector} to the horizontal velocity vector (see Appendix~\ref{Apdx_B}): 
    1212 \begin{equation} \label{Eq_PE_lapU} 
     1211applying \autoref{eq:PE_lap_vector} to the horizontal velocity vector (see \autoref{apdx:B}): 
     1212\begin{equation} \label{eq:PE_lapU} 
    12131213\begin{split} 
    12141214{\rm {\bf D}}^{l{\rm {\bf U}}}  
     
    12251225 
    12261226Such a formulation ensures a complete separation between the vorticity and  
    1227 horizontal divergence fields (see Appendix~\ref{Apdx_C}).  
     1227horizontal divergence fields (see \autoref{apdx:C}).  
    12281228Unfortunately, it is only available in \textit{iso-level} direction.  
    12291229When a rotation is required ($i.e.$ geopotential diffusion in $s-$coordinates  
    12301230or isoneutral diffusion in both $z$- and $s$-coordinates), the $u$ and $v-$fields  
    12311231are considered as independent scalar fields, so that the diffusive operator is given by: 
    1232 \begin{equation} \label{Eq_PE_lapU_iso} 
     1232\begin{equation} \label{eq:PE_lapU_iso} 
    12331233\begin{split} 
    12341234 D_u^{l{\rm {\bf U}}} &= \nabla .\left( {A^{lm} \;\Re \;\nabla u} \right) \\  
     
    12361236 \end{split} 
    12371237 \end{equation} 
    1238 where $\Re$ is given by  \eqref{Eq_PE_iso_tensor}. It is the same expression as  
     1238where $\Re$ is given by \autoref{eq:PE_iso_tensor}. It is the same expression as  
    12391239those used for diffusive operator on tracers. It must be emphasised that such a  
    12401240formulation is only exact in a Cartesian coordinate system, $i.e.$ on a $f-$ or  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics_zstar.tex

    r9393 r9407  
    2727To overcome problems with vanishing surface and/or bottom cells, we consider the  
    2828zstar coordinate  
    29 \begin{equation} \label{PE_} 
     29\begin{equation} \label{eq:PE_} 
    3030   z^\star = H \left( \frac{z-\eta}{H+\eta} \right) 
    3131\end{equation} 
     
    3939The 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  
    4040undulations of the bottom topography versus undulations in the surface height, it  
    41 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}.  
     41is 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}.  
    4242Additionally, since $z^\star$ when $\eta = 0$, no flow is spontaneously generated in an  
    4343unforced ocean starting from rest, regardless the bottom topography. This behaviour is in contrast to the case with "s"-models, where pressure gradient errors in  
     
    4545gradient solver. The quasi-horizontal nature of the coordinate surfaces also facilitates the implementation of neutral physics parameterizations in $z^\star$ models using  
    4646the same techniques as in $z$-models (see Chapters 13-16 of Griffies (2004) for a  
    47 discussion of neutral physics in $z$-models, as well as Section \S\ref{LDF_slp}  
     47discussion of neutral physics in $z$-models, as well as  \autoref{sec:LDF_slp}  
    4848in this document for treatment in \NEMO).  
    4949 
     
    7676% ================================================================ 
    7777\section{Surface pressure gradient and sea surface heigth (\protect\mdl{dynspg})} 
    78 \label{DYN_hpg_spg} 
     78\label{sec:DYN_hpg_spg} 
    7979%-----------------------------------------nam_dynspg---------------------------------------------------- 
    8080\forfile{../namelists/nam_dynspg}  
    8181%------------------------------------------------------------------------------------------------------------ 
    8282Options are defined through the  \ngn{nam\_dynspg} namelist variables. 
    83 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}. 
     83The 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}. 
    8484 
    8585%------------------------------------------------------------- 
     
    8787%------------------------------------------------------------- 
    8888\subsubsection{Explicit (\protect\key{dynspg\_exp})} 
    89 \label{DYN_spg_exp} 
     89\label{subsec:DYN_spg_exp} 
    9090 
    9191In 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 : 
    92 \begin{equation} \label{Eq_dynspg_ssh} 
     92\begin{equation} \label{eq:dynspg_ssh} 
    9393\frac{\partial \eta }{\partial t}\equiv \frac{\text{EMP}}{\rho _w }+\frac{1}{e_{1T}  
    9494e_{2T} }\sum\limits_k {\left( {\delta _i \left[ {e_{2u} e_{3u} u}  
     
    9696\end{equation} 
    9797 
    98 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).  
     98where 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).  
    9999 
    100100The surface pressure gradient, also evaluated using a leap-frog scheme, is then simply given by : 
    101 \begin{equation} \label{Eq_dynspg_exp} 
     101\begin{equation} \label{eq:dynspg_exp} 
    102102\left\{ \begin{aligned} 
    103103 - \frac{1}                      {e_{1u}} \; \delta _{i+1/2} \left[  \,\eta\,  \right]    \\ 
     
    107107\end{equation}  
    108108 
    109 Consistent with the linearization, a $\left. \rho \right|_{k=1} / \rho _o$ factor is omitted in (\ref{Eq_dynspg_exp}).  
     109Consistent with the linearization, a $\left. \rho \right|_{k=1} / \rho _o$ factor is omitted in (\autoref{eq:dynspg_exp}).  
    110110 
    111111%------------------------------------------------------------- 
     
    113113%------------------------------------------------------------- 
    114114\subsubsection{Split-explicit time-stepping (\protect\key{dynspg\_ts})} 
    115 \label{DYN_spg_ts} 
     115\label{subsec:DYN_spg_ts} 
    116116%--------------------------------------------namdom---------------------------------------------------- 
    117117\forfile{../namelists/namdom}  
     
    124124\begin{figure}[!t]   \begin{center} 
    125125\includegraphics[width=0.90\textwidth]{Fig_DYN_dynspg_ts} 
    126 \caption{    \protect\label{Fig_DYN_dynspg_ts} 
     126\caption{    \protect\label{fig:DYN_dynspg_ts} 
    127127Schematic of the split-explicit time stepping scheme for the barotropic and baroclinic modes,  
    128128after \citet{Griffies2004}. Time increases to the right. Baroclinic time steps are denoted by  
     
    151151scheme using the small barotropic time step $\Delta t$. We have  
    152152 
    153 \begin{equation} \label{DYN_spg_ts_eta} 
     153\begin{equation} \label{eq:DYN_spg_ts_eta} 
    154154\eta^{(b)}(\tau,t_{n+1}) - \eta^{(b)}(\tau,t_{n+1}) (\tau,t_{n-1}) 
    155155   = 2 \Delta t \left[-\nabla \cdot \textbf{U}^{(b)}(\tau,t_n) + \text{EMP}_w(\tau) \right]  
    156156\end{equation} 
    157 \begin{multline} \label{DYN_spg_ts_u} 
     157\begin{multline} \label{eq:DYN_spg_ts_u} 
    158158\textbf{U}^{(b)}(\tau,t_{n+1}) - \textbf{U}^{(b)}(\tau,t_{n-1})  \\ 
    159159   = 2\Delta t \left[ - f \textbf{k} \times \textbf{U}^{(b)}(\tau,t_{n})  
     
    165165and $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  
    166166that sets the barotropic time steps via  
    167 \begin{equation} \label{DYN_spg_ts_t} 
     167\begin{equation} \label{eq:DYN_spg_ts_t} 
    168168t_n=\tau+n\Delta t    
    169169\end{equation} 
    170170with $n$ an integer. The density scaled surface pressure is evaluated via  
    171 \begin{equation} \label{DYN_spg_ts_ps} 
     171\begin{equation} \label{eq:DYN_spg_ts_ps} 
    172172p_s^{(b)}(\tau,t_{n}) = \begin{cases} 
    173173   g \;\eta_s^{(b)}(\tau,t_{n}) \;\rho(\tau)_{k=1}) / \rho_o  &      \text{non-linear case} \\ 
     
    176176\end{equation} 
    177177To get started, we assume the following initial conditions  
    178 \begin{equation} \label{DYN_spg_ts_eta} 
     178\begin{equation} \label{eq:DYN_spg_ts_eta} 
    179179\begin{split} 
    180180\eta^{(b)}(\tau,t_{n=0}) &= \overline{\eta^{(b)}(\tau)} 
     
    184184\end{equation} 
    185185with  
    186 \begin{equation} \label{DYN_spg_ts_etaF} 
     186\begin{equation} \label{eq:DYN_spg_ts_etaF} 
    187187 \overline{\eta^{(b)}(\tau)} = \frac{1}{N+1} \sum\limits_{n=0}^N \eta^{(b)}(\tau-\Delta t,t_{n}) 
    188188\end{equation} 
    189189the time averaged surface height taken from the previous barotropic cycle. Likewise,  
    190 \begin{equation} \label{DYN_spg_ts_u} 
     190\begin{equation} \label{eq:DYN_spg_ts_u} 
    191191\textbf{U}^{(b)}(\tau,t_{n=0}) = \overline{\textbf{U}^{(b)}(\tau)}   \\ 
    192192\\ 
     
    194194\end{equation} 
    195195with  
    196 \begin{equation} \label{DYN_spg_ts_u} 
     196\begin{equation} \label{eq:DYN_spg_ts_u} 
    197197 \overline{\textbf{U}^{(b)}(\tau)}  
    198198   = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau-\Delta t,t_{n}) 
     
    201201 
    202202Upon 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$  
    203 \begin{equation} \label{DYN_spg_ts_u} 
     203\begin{equation} \label{eq:DYN_spg_ts_u} 
    204204\textbf{U}(\tau+\Delta t) = \overline{\textbf{U}^{(b)}(\tau+\Delta t)}  
    205205   = \frac{1}{N+1} \sum\limits_{n=0}^N\textbf{U}^{(b)}(\tau,t_{n}) 
     
    207207The surface height on the new baroclinic time step is then determined via a baroclinic leap-frog using the following form  
    208208 
    209 \begin{equation} \label{DYN_spg_ts_ssh} 
     209\begin{equation} \label{eq:DYN_spg_ts_ssh} 
    210210\eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\Delta t \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right]   
    211211\end{equation} 
     
    214214  
    215215In general, some form of time filter is needed to maintain integrity of the surface  
    216 height field due to the leap-frog splitting mode in equation \ref{DYN_spg_ts_ssh}. We  
     216height field due to the leap-frog splitting mode in equation \autoref{eq:DYN_spg_ts_ssh}. We  
    217217have tried various forms of such filtering, with the following method discussed in  
    218218Griffies et al. (2001) chosen due to its stability and reasonably good maintenance of  
    219 tracer conservation properties (see Section ??)  
    220  
    221 \begin{equation} \label{DYN_spg_ts_sshf} 
     219tracer conservation properties (see ??)  
     220 
     221\begin{equation} \label{eq:DYN_spg_ts_sshf} 
    222222\eta^{F}(\tau-\Delta) =  \overline{\eta^{(b)}(\tau)}  
    223223\end{equation} 
    224224Another approach tried was  
    225225 
    226 \begin{equation} \label{DYN_spg_ts_sshf2} 
     226\begin{equation} \label{eq:DYN_spg_ts_sshf2} 
    227227\eta^{F}(\tau-\Delta) = \eta(\tau)  
    228228   + (\alpha/2) \left[\overline{\eta^{(b)}}(\tau+\Delta t) 
     
    232232which is useful since it isolates all the time filtering aspects into the term multiplied  
    233233by $\alpha$. This isolation allows for an easy check that tracer conservation is exact when  
    234 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.  
     234eliminating 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.  
    235235 
    236236 
     
    242242%------------------------------------------------------------- 
    243243\subsubsection{Filtered formulation (\protect\key{dynspg\_flt})} 
    244 \label{DYN_spg_flt} 
     244\label{subsec:DYN_spg_flt} 
    245245 
    246246The 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  
    247 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} 
     247documented 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} 
    248248 
    249249\colorbox{red}{\np{rnu}\forcode{ = 1} to be suppressed from namelist !} 
     
    253253%------------------------------------------------------------- 
    254254\subsection{Non-linear free surface formulation (\protect\key{vvl})} 
    255 \label{DYN_spg_vvl} 
    256  
    257 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. 
     255\label{subsec:DYN_spg_vvl} 
     256 
     257In 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. 
    258258 
    259259 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_time_domain.tex

    r9394 r9407  
    66% ================================================================ 
    77\chapter{Time Domain (STP) } 
    8 \label{STP} 
     8\label{chap:STP} 
    99\minitoc 
    1010 
     
    2222 
    2323 
    24 Having defined the continuous equations in Chap.~\ref{PE}, we need now to choose  
     24Having defined the continuous equations in \autoref{chap:PE}, we need now to choose  
    2525a time discretization, a key feature of an ocean model as it exerts a strong influence   
    2626on the structure of the computer code ($i.e.$ on its flowchart).  
     
    3434% ================================================================ 
    3535\section{Time stepping environment} 
    36 \label{STP_environment} 
     36\label{sec:STP_environment} 
    3737 
    3838The time stepping used in \NEMO is a three level scheme that can be  
    3939represented as follows: 
    40 \begin{equation} \label{Eq_STP} 
     40\begin{equation} \label{eq:STP} 
    4141   x^{t+\rdt} = x^{t-\rdt} + 2 \, \rdt \  \text{RHS}_x^{t-\rdt,\,t,\,t+\rdt} 
    4242\end{equation}  
     
    5757although referred to as $x_a$ (after) in the code, is usually not the variable at  
    5858the after time step; but rather it is used to store the time derivative (RHS in  
    59 \eqref{Eq_STP}) prior to time-stepping the equation. Generally, the time  
     59\autoref{eq:STP}) prior to time-stepping the equation. Generally, the time  
    6060stepping is performed once at each time step in the \mdl{tranxt} and \mdl{dynnxt}  
    6161modules, except when using implicit vertical diffusion or calculating sea surface height  
     
    6666% ------------------------------------------------------------------------------------------------------------- 
    6767\section{Non-diffusive part --- Leapfrog scheme} 
    68 \label{STP_leap_frog} 
     68\label{sec:STP_leap_frog} 
    6969 
    7070The time stepping used for processes other than diffusion is the well-known leapfrog 
    7171scheme \citep{Mesinger_Arakawa_Bk76}.  This scheme is widely used for advection  
    7272processes in low-viscosity fluids. It is a time centred scheme, $i.e.$  
    73 the RHS in \eqref{Eq_STP} is evaluated at time step $t$, the now time step.  
     73the RHS in \autoref{eq:STP} is evaluated at time step $t$, the now time step.  
    7474It may be used for momentum and tracer advection,  
    7575pressure gradient, and Coriolis terms, but not for diffusion terms. 
     
    8787by \citet{Asselin_MWR72}, is a kind of laplacian diffusion in time that mixes odd and  
    8888even time steps: 
    89 \begin{equation} \label{Eq_STP_asselin} 
     89\begin{equation} \label{eq:STP_asselin} 
    9090x_F^t  = x^t + \gamma \, \left[ x_F^{t-\rdt} - 2 x^t + x^{t+\rdt} \right] 
    9191\end{equation}  
    9292where the subscript $F$ denotes filtered values and $\gamma$ is the Asselin  
    9393coefficient. $\gamma$ is initialized as \np{rn\_atfp} (namelist parameter).  
    94 Its default value is \np{rn\_atfp}\forcode{ = 10.e-3} (see \S~\ref{STP_mLF}),  
     94Its default value is \np{rn\_atfp}\forcode{ = 10.e-3} (see \autoref{sec:STP_mLF}),  
    9595causing only a weak dissipation of high frequency motions (\citep{Farge1987}).  
    9696The addition of a time filter degrades the accuracy of the  
     
    110110% ------------------------------------------------------------------------------------------------------------- 
    111111\section{Diffusive part --- Forward or backward scheme} 
    112 \label{STP_forward_imp} 
     112\label{sec:STP_forward_imp} 
    113113 
    114114The leapfrog differencing scheme is unsuitable for the representation of  
    115115diffusion and damping processes. For a tendancy $D_x$, representing a  
    116116diffusion term or a restoring term to a tracer climatology  
    117 (when present, see \S~\ref{TRA_dmp}), a forward time differencing scheme 
     117(when present, see \autoref{sec:TRA_dmp}), a forward time differencing scheme 
    118118 is used : 
    119 \begin{equation} \label{Eq_STP_euler} 
     119\begin{equation} \label{eq:STP_euler} 
    120120   x^{t+\rdt} = x^{t-\rdt} + 2 \, \rdt \ {D_x}^{t-\rdt} 
    121121\end{equation}  
     
    123123This is diffusive in time and conditionally stable. The  
    124124conditions for stability of second and fourth order horizontal diffusion schemes are \citep{Griffies_Bk04}: 
    125 \begin{equation} \label{Eq_STP_euler_stability} 
     125\begin{equation} \label{eq:STP_euler_stability} 
    126126A^h < \left\{ 
    127127\begin{aligned} 
     
    132132\end{equation} 
    133133where $e$ is the smallest grid size in the two horizontal directions and $A^h$ is  
    134 the mixing coefficient. The linear constraint \eqref{Eq_STP_euler_stability}  
     134the mixing coefficient. The linear constraint \autoref{eq:STP_euler_stability}  
    135135is a necessary condition, but not sufficient. If it is not satisfied, even mildly,  
    136136then the model soon becomes wildly unstable. The instability can be removed  
     
    146146stability criterion is reduced by a factor of $N$. The computation is performed as  
    147147follows: 
    148 \begin{equation} \label{Eq_STP_ts} 
     148\begin{equation} \label{eq:STP_ts} 
    149149\begin{split} 
    150150& x_\ast ^{t-\rdt} = x^{t-\rdt}   \\ 
     
    158158by setting \np{nn\_zdfexp}, (namelist parameter). The scheme $(b)$ is unconditionally  
    159159stable but diffusive. It can be written as follows: 
    160 \begin{equation} \label{Eq_STP_imp} 
     160\begin{equation} \label{eq:STP_imp} 
    161161   x^{t+\rdt} = x^{t-\rdt} + 2 \, \rdt \  \text{RHS}_x^{t+\rdt} 
    162162\end{equation}  
     
    170170the forward time differencing scheme. For example, the finite difference  
    171171approximation of the temperature equation is: 
    172 \begin{equation} \label{Eq_STP_imp_zdf} 
     172\begin{equation} \label{eq:STP_imp_zdf} 
    173173\frac{T(k)^{t+1}-T(k)^{t-1}}{2\;\rdt}\equiv \text{RHS}+\frac{1}{e_{3t} }\delta  
    174174_k \left[ {\frac{A_w^{vT} }{e_{3w} }\delta _{k+1/2} \left[ {T^{t+1}} \right]}  
     
    176176\end{equation} 
    177177where RHS is the right hand side of the equation except for the vertical diffusion term.  
    178 We rewrite \eqref{Eq_STP_imp} as: 
    179 \begin{equation} \label{Eq_STP_imp_mat} 
     178We rewrite \autoref{eq:STP_imp} as: 
     179\begin{equation} \label{eq:STP_imp_mat} 
    180180-c(k+1)\;T^{t+1}(k+1) + d(k)\;T^{t+1}(k) - \;c(k)\;T^{t+1}(k-1) \equiv b(k) 
    181181\end{equation} 
     
    187187\end{align*} 
    188188 
    189 \eqref{Eq_STP_imp_mat} is a linear system of equations with an associated  
     189\autoref{eq:STP_imp_mat} is a linear system of equations with an associated  
    190190matrix which is tridiagonal. Moreover, $c(k)$ and $d(k)$ are positive and the diagonal  
    191191term is greater than the sum of the two extra-diagonal terms, therefore a special  
     
    199199% ------------------------------------------------------------------------------------------------------------- 
    200200\section{Surface pressure gradient} 
    201 \label{STP_spg_ts} 
     201\label{sec:STP_spg_ts} 
    202202 
    203203===>>>>  TO BE written....  :-) 
     
    207207\begin{figure}[!t]     \begin{center} 
    208208\includegraphics[width=0.7\textwidth]{Fig_TimeStepping_flowchart} 
    209 \caption{   \protect\label{Fig_TimeStep_flowchart} 
     209\caption{   \protect\label{fig:TimeStep_flowchart} 
    210210Sketch of the leapfrog time stepping sequence in \NEMO from \citet{Leclair_Madec_OM09}.  
    211211The use of a semi-implicit computation of the hydrostatic pressure gradient requires 
     
    215215prior to the computation of the tracer equation. 
    216216Note that the method for the evaluation of the surface pressure gradient $\nabla p_s$ is not presented here  
    217 (see \S~\ref{DYN_spg}). } 
     217(see \autoref{sec:DYN_spg}). } 
    218218\end{center}   \end{figure} 
    219219%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    224224% ------------------------------------------------------------------------------------------------------------- 
    225225\section{Modified Leapfrog -- Asselin filter scheme} 
    226 \label{STP_mLF} 
     226\label{sec:STP_mLF} 
    227227 
    228228Significant changes have been introduced by \cite{Leclair_Madec_OM09} in the  
     
    233233In a classical LF-RA environment, the forcing term is centred in time, $i.e.$  
    234234it is time-stepped over a $2\rdt$ period:  $x^t  = x^t + 2\rdt Q^t $ where $Q$  
    235 is the forcing applied to $x$, and the time filter is given by \eqref{Eq_STP_asselin}  
     235is the forcing applied to $x$, and the time filter is given by \autoref{eq:STP_asselin}  
    236236so that $Q$ is redistributed over several time step.  
    237237In the modified LF-RA environment, these two formulations have been replaced by: 
    238238\begin{align}  
    239 x^{t+\rdt}  &= x^{t-\rdt} + \rdt \left( Q^{t-\rdt/2} + Q^{t+\rdt/2} \right)                   \label{Eq_STP_forcing} \\ 
     239x^{t+\rdt}  &= x^{t-\rdt} + \rdt \left( Q^{t-\rdt/2} + Q^{t+\rdt/2} \right)                   \label{eq:STP_forcing} \\ 
    240240% 
    241241x_F^t  &= x^t + \gamma \, \left[ x_F^{t-\rdt} - 2 x^t + x^{t+\rdt} \right]  
    242            - \gamma\,\rdt \, \left[ Q^{t+\rdt/2} -  Q^{t-\rdt/2} \right]                          \label{Eq_STP_RA} 
     242           - \gamma\,\rdt \, \left[ Q^{t+\rdt/2} -  Q^{t-\rdt/2} \right]                          \label{eq:STP_RA} 
    243243\end{align} 
    244 The change in the forcing formulation given by \eqref{Eq_STP_forcing}  
    245 (see Fig.\ref{Fig_MLF_forcing}) has a significant effect: the forcing term no  
     244The change in the forcing formulation given by \autoref{eq:STP_forcing}  
     245(see \autoref{fig:MLF_forcing}) has a significant effect: the forcing term no  
    246246longer excites the divergence of odd and even time steps \citep{Leclair_Madec_OM09}.  
    247247% forcing seen by the model.... 
     
    250250Indeed, time filtering is no longer required on the forcing part. The influence of  
    251251the Asselin filter on the forcing is be removed by adding a new term in the filter 
    252 (last term in \eqref{Eq_STP_RA} compared to \eqref{Eq_STP_asselin}). Since  
     252(last term in \autoref{eq:STP_RA} compared to \autoref{eq:STP_asselin}). Since  
    253253the filtering of the forcing was the source of non-conservation in the classical  
    254254LF-RA scheme, the modified formulation becomes conservative  \citep{Leclair_Madec_OM09}. 
    255255Second, the LF-RA becomes a truly quasi-second order scheme. Indeed,  
    256 \eqref{Eq_STP_forcing} used in combination with a careful treatment of static  
    257 instability (\S\ref{ZDF_evd}) and of the TKE physics (\S\ref{ZDF_tke_ene}), 
     256\autoref{eq:STP_forcing} used in combination with a careful treatment of static  
     257instability (\autoref{subsec:ZDF_evd}) and of the TKE physics (\autoref{subsec:ZDF_tke_ene}), 
    258258the two other main sources of time step divergence, allows a reduction by  
    259259two orders of magnitude of the Asselin filter parameter.  
     
    261261Note that the forcing is now provided at the middle of a time step: $Q^{t+\rdt/2}$  
    262262is the forcing applied over the $[t,t+\rdt]$ time interval. This and the change  
    263 in the time filter, \eqref{Eq_STP_RA}, allows an exact evaluation of the  
     263in the time filter, \autoref{eq:STP_RA}, allows an exact evaluation of the  
    264264contribution due to the forcing term between any two time steps,  
    265265even if separated by only $\rdt$ since the time filter is no longer applied to the 
     
    269269\begin{figure}[!t]     \begin{center} 
    270270\includegraphics[width=0.90\textwidth]{Fig_MLF_forcing} 
    271 \caption{   \protect\label{Fig_MLF_forcing} 
     271\caption{   \protect\label{fig:MLF_forcing} 
    272272Illustration of forcing integration methods.  
    273273(top) ''Traditional'' formulation : the forcing is defined at the same time as the variable  
     
    283283% ------------------------------------------------------------------------------------------------------------- 
    284284\section{Start/Restart strategy} 
    285 \label{STP_rst} 
     285\label{sec:STP_rst} 
    286286 
    287287%--------------------------------------------namrun------------------------------------------- 
     
    291291The first time step of this three level scheme when starting from initial conditions  
    292292is a forward step (Euler time integration):  
    293 \begin{equation} \label{Eq_DOM_euler} 
     293\begin{equation} \label{eq:DOM_euler} 
    294294   x^1 = x^0 + \rdt \ \text{RHS}^0 
    295295\end{equation} 
    296 This is done simply by keeping the leapfrog environment ($i.e.$ the \eqref{Eq_STP}  
     296This is done simply by keeping the leapfrog environment ($i.e.$ the \autoref{eq:STP}  
    297297three level time stepping) but setting all $x^0$ (\textit{before}) and $x^{1}$ (\textit{now}) fields  
    298298equal at the first time step and using half the value of $\rdt$. 
     
    307307 
    308308Note that when a semi-implicit scheme is used to evaluate the hydrostatic pressure  
    309 gradient (see \S\ref{DYN_hpg_imp}), an extra three-dimensional field has to be  
     309gradient (see \autoref{subsec:DYN_hpg_imp}), an extra three-dimensional field has to be  
    310310added to the restart file to ensure an exact restartability. This is done optionally  
    311311via the  \np{nn\_dynhpg\_rst} namelist parameter, so that the size of the 
     
    335335% ------------------------------------------------------------------------------------------------------------- 
    336336\subsection{Time domain} 
    337 \label{STP_time} 
     337\label{subsec:STP_time} 
    338338%--------------------------------------------namrun------------------------------------------- 
    339339\forfile{../namelists/namdom}          
  • branches/2017/dev_merge_2017/DOC/tex_sub/introduction.tex

    r9393 r9407  
    2929model coupled with the sea-ice and/or the atmosphere.   
    3030 
    31 This manual is organised in as follows. Chapter~\ref{PE} presents the model basics,  
     31This manual is organised in as follows. \autoref{chap:PE} presents the model basics,  
    3232$i.e.$ the equations and their assumptions, the vertical coordinates used, and the  
    3333subgrid scale physics. This part deals with the continuous equations of the model  
     
    3939are used throughout. 
    4040 
    41 The following chapters deal with the discrete equations. Chapter~\ref{STP} presents the  
     41The following chapters deal with the discrete equations. \autoref{chap:STP} presents the  
    4242time domain. The model time stepping environment is a three level scheme in which  
    4343the tendency terms of the equations are evaluated either centered  in time, or forward,  
    4444or backward depending of the nature of the term. 
    45 Chapter~\ref{DOM} presents the space domain. The model is discretised on a staggered  
     45\autoref{chap:DOM} presents the space domain. The model is discretised on a staggered  
    4646grid (Arakawa C grid) with masking of land areas. Vertical discretisation used depends  
    4747on both how the bottom topography is represented and whether the free surface is linear or not.  
     
    5050the corresponding rescaled height coordinate formulation (\textit{z*} or \textit{s*}) is used  
    5151(the level position then vary in time as a function of the sea surface heigh).  
    52 The following two chapters (\ref{TRA} and \ref{DYN}) describe the discretisation of the  
     52The following two chapters (\autoref{chap:TRA} and \autoref{chap:DYN}) describe the discretisation of the  
    5353prognostic equations for the active tracers and the momentum. Explicit, split-explicit  
    5454and filtered free surface formulations are implemented.  
     
    5757order advection schemes, including positive ones). 
    5858 
    59 Surface boundary conditions (chapter~\ref{SBC}) can be implemented as prescribed 
     59Surface boundary conditions (\autoref{chap:SBC}) can be implemented as prescribed 
    6060fluxes, or bulk formulations for the surface fluxes (wind stress, heat, freshwater). The  
    6161model allows penetration of solar radiation  There is an optional geothermal heating at  
     
    6969is still not available. 
    7070 
    71 Other model characteristics are the lateral boundary conditions (chapter~\ref{LBC}).   
     71Other model characteristics are the lateral boundary conditions (\autoref{chap:LBC}).   
    7272Global configurations of the model make use of the ORCA tripolar grid, with special north  
    7373fold boundary condition. Free-slip or no-slip boundary conditions are allowed at land  
     
    7575conditions are possible.  
    7676 
    77 Physical parameterisations are described in chapters~\ref{LDF} and \ref{ZDF}. The  
     77Physical parameterisations are described in \autoref{chap:LDF} and \autoref{chap:ZDF}. The  
    7878model includes an implicit treatment of vertical viscosity and diffusivity. The lateral  
    7979Laplacian and biharmonic viscosity and diffusion can be rotated following a geopotential  
     
    112112%%gm  end 
    113113 
    114 Model outputs management and specific online diagnostics are described in chapters~\ref{DIA}. 
     114Model outputs management and specific online diagnostics are described in \autoref{chap:DIA}. 
    115115The diagnostics includes the output of all the tendencies of the momentum and tracers equations,  
    116116the output of tracers tendencies averaged over the time evolving mixed layer, the output of  
    117117the tendencies of the barotropic vorticity equation, the computation of on-line floats trajectories...  
    118 Chapter~\ref{OBS} describes a tool which reads in observation files (profile temperature  
     118\autoref{chap:OBS} describes a tool which reads in observation files (profile temperature  
    119119and salinity, sea surface temperature, sea level anomaly and sea ice concentration)  
    120120and calculates an interpolated model equivalent value at the observation location  
    121121and nearest model timestep. Originally developed of data assimilation, it is a fantastic  
    122 tool for model and data comparison. Chapter~\ref{ASM} describes how increments  
     122tool for model and data comparison. \autoref{chap:ASM} describes how increments  
    123123produced by data assimilation may be applied to the model equations. 
    124 Finally, Chapter~\ref{CFG} provides a brief introduction to the pre-defined model  
     124Finally, \autoref{chap:CFG} provides a brief introduction to the pre-defined model  
    125125configurations (water column model, ORCA and GYRE families of configurations). 
    126126 
     
    132132include conventions for naming variables, with different starting letters for different types  
    133133of variables (real, integer, parameter\ldots). Those rules are briefly presented in  
    134 Appendix~\ref{Apdx_D} and a more complete document is available on the \NEMO web site. 
     134\autoref{apdx:D} and a more complete document is available on the \NEMO web site. 
    135135 
    136136The model is organized with a high internal modularity based on physics. For example,  
     
    139139around the code, the module names follow a three-letter rule. For example, \mdl{traldf}  
    140140is a module related to the TRAcers equation, computing the Lateral DiFfussion.  
    141 %The complete list of module names is presented in Appendix~\ref{Apdx_D}.      %====>>>> to be done ! 
     141%The complete list of module names is presented in \autoref{apdx:D}.      %====>>>> to be done ! 
    142142Furthermore, modules are organized in a few directories that correspond to their category,  
    143 as indicated by the first three letters of their name (Tab.~\ref{Tab_chap}).  
     143as indicated by the first three letters of their name (\autoref{tab:chap}). 
    144144 
    145145The manual mirrors the organization of the model.  
    146 After the presentation of the continuous equations (Chapter \ref{PE}), the following chapters  
    147 refer to specific terms of the equations each associated with a group of modules (Tab.~\ref{Tab_chap}). 
     146After the presentation of the continuous equations (\autoref{chap:PE}), the following chapters  
     147refer to specific terms of the equations each associated with a group of modules (\autoref{tab:chap}). 
    148148 
    149149 
     
    151151\begin{table}[!t]  
    152152%\begin{center} \begin{tabular}{|p{143pt}|l|l|} \hline 
    153 \caption{ \protect\label{Tab_chap}   Organization of Chapters mimicking the one of the model directories. } 
     153\caption{ \protect\label{tab:chap}   Organization of Chapters mimicking the one of the model directories. } 
    154154\begin{center}    \begin{tabular}{|l|l|l|}   \hline 
    155 Chapter \ref{STP} & -                 & model time STePping environment \\    \hline 
    156 Chapter \ref{DOM} & DOM    & model DOMain \\    \hline 
    157 Chapter \ref{TRA} & TRA    & TRAcer equations (potential temperature and salinity) \\   \hline 
    158 Chapter \ref{DYN} & DYN    & DYNamic equations (momentum) \\      \hline 
    159 Chapter \ref{SBC}    & SBC    & Surface Boundary Conditions \\       \hline 
    160 Chapter \ref{LBC} & LBC    & Lateral Boundary Conditions (also OBC and BDY)  \\     \hline 
    161 Chapter \ref{LDF} & LDF    & Lateral DiFfusion (parameterisations) \\   \hline 
    162 Chapter \ref{ZDF} & ZDF    & vertical (Z) DiFfusion (parameterisations)  \\      \hline 
    163 Chapter \ref{DIA} & DIA    & I/O and DIAgnostics (also IOM, FLO and TRD) \\      \hline 
    164 Chapter \ref{OBS} & OBS    & OBServation and model comparison  \\    \hline 
    165 Chapter \ref{ASM} & ASM    & ASsiMilation increment  \\     \hline 
    166 Chapter \ref{MISC}   & SOL    & Miscellaneous  topics (including solvers)  \\       \hline 
    167 Chapter \ref{CFG} &  -        & predefined configurations (including C1D) \\     \hline 
     155\autoref{chap:STP}   & -                 & model time STePping environment \\    \hline 
     156\autoref{chap:DOM}   & DOM    & model DOMain \\    \hline 
     157\autoref{chap:TRA}   & TRA    & TRAcer equations (potential temperature and salinity) \\   \hline 
     158\autoref{chap:DYN}   & DYN    & DYNamic equations (momentum) \\      \hline 
     159\autoref{chap:SBC}   & SBC    & Surface Boundary Conditions \\       \hline 
     160\autoref{chap:LBC}   & LBC    & Lateral Boundary Conditions (also OBC and BDY)  \\     \hline 
     161\autoref{chap:LDF}   & LDF    & Lateral DiFfusion (parameterisations) \\   \hline 
     162\autoref{chap:ZDF}   & ZDF    & vertical (Z) DiFfusion (parameterisations)  \\      \hline 
     163\autoref{chap:DIA}   & DIA    & I/O and DIAgnostics (also IOM, FLO and TRD) \\      \hline 
     164\autoref{chap:OBS}   & OBS    & OBServation and model comparison  \\    \hline 
     165\autoref{chap:ASM}   & ASM    & ASsiMilation increment  \\     \hline 
     166\autoref{chap:MISC}  & SOL    & Miscellaneous  topics (including solvers)  \\       \hline 
     167\autoref{chap:CFG}   &  -        & predefined configurations (including C1D) \\     \hline 
    168168\end{tabular}   
    169169\end{center}   \end{table} 
Note: See TracChangeset for help on using the changeset viewer.