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/dev_merge_2017/DOC/tex_sub/chap_DOM.tex – NEMO

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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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. 
Note: See TracChangeset for help on using the changeset viewer.