Changeset 11435


Ignore:
Timestamp:
2019-08-14T14:45:08+02:00 (15 months ago)
Author:
nicolasmartin
Message:

Various corrections on chapters

Cleaning the indexes by fixing/removing wrong entries (or appending a ? to unknown items) and
improve the classification with new index definitions for CPP keys and namelist blocks:

  • from \key{...} cmd, key_ prefix no longer precedes the index entry
  • namelist block declaration moves from \ngn{nam...} to \nam{...} (i.e. \ngn{namtra\_ldf}\nam{tra\_ldf}) The expected prefix nam is added to the printed word but not the index entry.

Now we have indexes with a better sorting instead of all CPP keys under 'K' and namelists blocks under 'N'.

Fix missing space issues with alias commands by adding a trailing backslash (\NEMO\, \ie\, \eg\, …).
There is no perfect solution for this, and I prefer not using a particular package to solve it.

Review the initial LaTeX code snippet for the historic changes in chapters

Finally, for readability and future diff visualisations, please avoid writing paragraphs with continuous lines.
Break the lines around 80 to 100 characters long

Location:
NEMO/trunk/doc/latex/NEMO/subfiles
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/doc/latex/NEMO/subfiles/annex_A.tex

    r11337 r11435  
    99\label{apdx:A} 
    1010 
    11 \minitoc 
     11\chaptertoc 
    1212 
    1313\vfill 
     
    3131 
    3232In order to establish the set of Primitive Equation in curvilinear $s$-coordinates 
    33 (\ie an orthogonal curvilinear coordinate in the horizontal and 
     33(\ie\ an orthogonal curvilinear coordinate in the horizontal and 
    3434an Arbitrary Lagrangian Eulerian (ALE) coordinate in the vertical), 
    3535we start from the set of equations established in \autoref{subsec:PE_zco_Eq} for 
     
    329329\] 
    330330This leads to the $s-$coordinate formulation of the total $z-$coordinate time derivative, 
    331 \ie the total $s-$coordinate time derivative : 
     331\ie\ the total $s-$coordinate time derivative : 
    332332\begin{align} 
    333333  \label{apdx:A_sco_Dt_vect} 
     
    368368% 
    369369Introducing the vertical scale factor inside the horizontal derivative of the first two terms  
    370 (\ie the horizontal divergence), it becomes : 
     370(\ie\ the horizontal divergence), it becomes : 
    371371\begin{align*} 
    372372  { 
     
    411411\end{align*} 
    412412which leads to the $s-$coordinate flux formulation of the total $s-$coordinate time derivative,  
    413 \ie the total $s-$coordinate time derivative in flux form: 
     413\ie\ the total $s-$coordinate time derivative in flux form: 
    414414\begin{flalign} 
    415415  \label{apdx:A_sco_Dt_flux} 
     
    569569in particular the pressure gradient. 
    570570By contrast, $\omega$ is not $w$, the third component of the velocity, but the dia-surface velocity component, 
    571 \ie the volume flux across the moving $s$-surfaces per unit horizontal area.  
     571\ie\ the volume flux across the moving $s$-surfaces per unit horizontal area.  
    572572 
    573573 
  • NEMO/trunk/doc/latex/NEMO/subfiles/annex_B.tex

    r11351 r11435  
    88\label{apdx:B} 
    99 
    10 \minitoc 
     10\chaptertoc 
    1111 
    1212\newpage 
  • NEMO/trunk/doc/latex/NEMO/subfiles/annex_C.tex

    r10442 r11435  
    88\label{apdx:C} 
    99 
    10 \minitoc 
     10\chaptertoc 
    1111 
    1212%%%  Appendix put in gmcomment as it has not been updated for \zstar and s coordinate 
     
    3939$dv=e_1\,e_2\,e_3 \,di\,dj\,dk$  is the volume element, with only $e_3$ that depends on time. 
    4040$D$ and $S$ are the ocean domain volume and surface, respectively. 
    41 No wetting/drying is allow (\ie $\frac{\partial S}{\partial t} = 0$). 
     41No wetting/drying is allow (\ie\ $\frac{\partial S}{\partial t} = 0$). 
    4242Let $k_s$ and $k_b$ be the ocean surface and bottom, resp. 
    43 (\ie $s(k_s) = \eta$ and $s(k_b)=-H$, where $H$ is the bottom depth). 
     43(\ie\ $s(k_s) = \eta$ and $s(k_b)=-H$, where $H$ is the bottom depth). 
    4444\begin{flalign*} 
    4545  z(k) = \eta - \int\limits_{\tilde{k}=k}^{\tilde{k}=k_s}  e_3(\tilde{k}) \;d\tilde{k} 
     
    9999\label{sec:C.1} 
    100100 
    101 The discretization of pimitive equation in $s$-coordinate (\ie time and space varying vertical coordinate) 
    102 must be chosen so that the discrete equation of the model satisfy integral constrains on energy and enstrophy.  
     101The discretization of pimitive equation in $s$-coordinate (\ie\ time and space varying vertical coordinate) 
     102must be chosen so that the discrete equation of the model satisfy integral constrains on energy and enstrophy. 
    103103 
    104104Let us first establish those constraint in the continuous world. 
    105 The total energy (\ie kinetic plus potential energies) is conserved: 
     105The total energy (\ie\ kinetic plus potential energies) is conserved: 
    106106\begin{flalign} 
    107107  \label{eq:Tot_Energy} 
     
    109109\end{flalign} 
    110110under the following assumptions: no dissipation, no forcing (wind, buoyancy flux, atmospheric pressure variations), 
    111 mass conservation, and closed domain.  
     111mass conservation, and closed domain. 
    112112 
    113113This equation can be transformed to obtain several sub-equalities. 
     
    211211\end{subequations} 
    212212 
    213 \autoref{eq:E_tot_pg_3} is the balance between the conversion KE to PE and PE to KE.  
     213\autoref{eq:E_tot_pg_3} is the balance between the conversion KE to PE and PE to KE. 
    214214Indeed the left hand side of \autoref{eq:E_tot_pg_3} can be transformed as follows: 
    215215\begin{flalign*} 
     
    224224  &=+  \int\limits_D g\, \rho \; w \; dv   &&&\\ 
    225225\end{flalign*} 
    226 where the last equality is obtained by noting that the brackets is exactly the expression of $w$,  
    227 the vertical velocity referenced to the fixe $z$-coordinate system (see \autoref{apdx:A_w_s}).  
    228   
     226where the last equality is obtained by noting that the brackets is exactly the expression of $w$, 
     227the vertical velocity referenced to the fixe $z$-coordinate system (see \autoref{apdx:A_w_s}). 
     228 
    229229The left hand side of \autoref{eq:E_tot_pg_3} can be transformed as follows: 
    230230\begin{flalign*} 
     
    367367% ------------------------------------------------------------------------------------------------------------- 
    368368\subsubsection{Vorticity term with ENE scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})} 
    369 \label{subsec:C_vorENE}  
     369\label{subsec:C_vorENE} 
    370370 
    371371For the ENE scheme, the two components of the vorticity term are given by: 
     
    399399        - \overline{ U }^{\,j+1/2}\; \overline{ V }^{\,i+1/2}         \biggr\}  \quad  \equiv 0 
    400400    \end{array} 
    401   }       
     401  } 
    402402\end{flalign*} 
    403403In other words, the domain averaged kinetic energy does not change due to the vorticity term. 
     
    407407% ------------------------------------------------------------------------------------------------------------- 
    408408\subsubsection{Vorticity term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} 
    409 \label{subsec:C_vorEEN_vect}  
    410  
    411 With the EEN scheme, the vorticity terms are represented as:  
     409\label{subsec:C_vorEEN_vect} 
     410 
     411With the EEN scheme, the vorticity terms are represented as: 
    412412\begin{equation} 
    413413  \tag{\ref{eq:dynvor_een}} 
     
    420420      \end{aligned} 
    421421    } \right. 
    422 \end{equation}  
     422\end{equation} 
    423423where the indices $i_p$ and $j_p$ take the following value: $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$, 
    424 and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by:  
     424and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: 
    425425\begin{equation} 
    426426  \tag{\ref{eq:Q_triads}} 
     
    479479% ------------------------------------------------------------------------------------------------------------- 
    480480\subsubsection{Gradient of kinetic energy / Vertical advection} 
    481 \label{subsec:C_zad}  
     481\label{subsec:C_zad} 
    482482 
    483483The change of Kinetic Energy (KE) due to the vertical advection is exactly balanced by the change of KE due to the horizontal gradient of KE~: 
     
    487487  +   \frac{1}{2} \int_D {  \frac{{\textbf{U}_h}^2}{e_3} \partial_t ( e_3) \;dv } 
    488488\] 
    489 Indeed, using successively \autoref{eq:DOM_di_adj} (\ie the skew symmetry property of the $\delta$ operator) 
     489Indeed, using successively \autoref{eq:DOM_di_adj} (\ie\ the skew symmetry property of the $\delta$ operator) 
    490490and the continuity equation, then \autoref{eq:DOM_di_adj} again, 
    491491then the commutativity of operators $\overline {\,\cdot \,}$ and $\delta$, and finally \autoref{eq:DOM_mi_adj} 
    492 (\ie the symmetry property of the $\overline {\,\cdot \,}$ operator) 
     492(\ie\ the symmetry property of the $\overline {\,\cdot \,}$ operator) 
    493493applied in the horizontal and vertical directions, it becomes: 
    494494\begin{flalign*} 
     
    566566      } } \right) 
    567567\] 
    568 a formulation that requires an additional horizontal mean in contrast with the one used in NEMO. 
     568a formulation that requires an additional horizontal mean in contrast with the one used in \NEMO. 
    569569Nine velocity points have to be used instead of 3. 
    570570This is the reason why it has not been chosen. 
     
    595595  A pressure gradient has no contribution to the evolution of the vorticity as the curl of a gradient is zero. 
    596596  In the $z$-coordinate, this property is satisfied locally on a C-grid with 2nd order finite differences 
    597   (property \autoref{eq:DOM_curl_grad}).  
     597  (property \autoref{eq:DOM_curl_grad}). 
    598598} 
    599599 
    600600When the equation of state is linear 
    601 (\ie when an advection-diffusion equation for density can be derived from those of temperature and salinity) 
     601(\ie\ when an advection-diffusion equation for density can be derived from those of temperature and salinity) 
    602602the change of KE due to the work of pressure forces is balanced by 
    603 the change of potential energy due to buoyancy forces:  
     603the change of potential energy due to buoyancy forces: 
    604604\[ 
    605605  - \int_D  \left. \nabla p \right|_z \cdot \textbf{U}_h \;dv 
     
    621621  % 
    622622  \allowdisplaybreaks 
    623   \intertext{Using successively \autoref{eq:DOM_di_adj}, \ie the skew symmetry property of 
     623  \intertext{Using successively \autoref{eq:DOM_di_adj}, \ie\ the skew symmetry property of 
    624624    the $\delta$ operator, \autoref{eq:wzv}, the continuity equation, \autoref{eq:dynhpg_sco}, 
    625625    the hydrostatic equation in the $s$-coordinate, and $\delta_{k+1/2} \left[ z_t \right] \equiv e_{3w} $, 
     
    771771% ------------------------------------------------------------------------------------------------------------- 
    772772\subsubsection{Coriolis plus ``metric'' term} 
    773 \label{subsec:C.3.3}  
     773\label{subsec:C.3.3} 
    774774 
    775775In flux from the vorticity term reduces to a Coriolis term in which 
     
    792792% ------------------------------------------------------------------------------------------------------------- 
    793793\subsubsection{Flux form advection} 
    794 \label{subsec:C.3.4}  
     794\label{subsec:C.3.4} 
    795795 
    796796The flux form operator of the momentum advection is evaluated using 
     
    811811 
    812812Let us first consider the first term of the scalar product 
    813 (\ie just the the terms associated with the i-component of the advection): 
     813(\ie\ just the the terms associated with the i-component of the advection): 
    814814\begin{flalign*} 
    815815  &  - \int_D u \cdot \nabla \cdot \left(   \textbf{U}\,u   \right) \; dv   \\ 
     
    867867When the UBS scheme is used to evaluate the flux form momentum advection, 
    868868the discrete operator does not contribute to the global budget of linear momentum (flux form). 
    869 The horizontal kinetic energy is not conserved, but forced to decay (\ie the scheme is diffusive).  
     869The horizontal kinetic energy is not conserved, but forced to decay (\ie\ the scheme is diffusive). 
    870870 
    871871% ================================================================ 
     
    879879% ------------------------------------------------------------------------------------------------------------- 
    880880\subsubsection{Vorticity term with ENS scheme  (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})} 
    881 \label{subsec:C_vorENS}  
     881\label{subsec:C_vorENS} 
    882882 
    883883In the ENS scheme, the vorticity term is descretized as follows: 
     
    890890    \end{aligned} 
    891891  \right. 
    892 \end{equation}  
     892\end{equation} 
    893893 
    894894The scheme does not allow but the conservation of the total kinetic energy but the conservation of $q^2$, 
    895 the potential enstrophy for a horizontally non-divergent flow (\ie when $\chi$=$0$). 
     895the potential enstrophy for a horizontally non-divergent flow (\ie\ when $\chi$=$0$). 
    896896Indeed, using the symmetry or skew symmetry properties of the operators 
    897897( \autoref{eq:DOM_mi_adj} and \autoref{eq:DOM_di_adj}), 
     
    942942  } 
    943943\end{flalign*} 
    944 The later equality is obtain only when the flow is horizontally non-divergent, \ie $\chi$=$0$.  
     944The later equality is obtain only when the flow is horizontally non-divergent, \ie\ $\chi$=$0$. 
    945945 
    946946% ------------------------------------------------------------------------------------------------------------- 
     
    948948% ------------------------------------------------------------------------------------------------------------- 
    949949\subsubsection{Vorticity Term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} 
    950 \label{subsec:C_vorEEN}  
    951  
    952 With the EEN scheme, the vorticity terms are represented as:  
     950\label{subsec:C_vorEEN} 
     951 
     952With the EEN scheme, the vorticity terms are represented as: 
    953953\begin{equation} 
    954954  \tag{\ref{eq:dynvor_een}} 
     
    961961      \end{aligned} 
    962962    } \right. 
    963 \end{equation}  
    964 where the indices $i_p$ and $k_p$ take the following values:  
     963\end{equation} 
     964where the indices $i_p$ and $k_p$ take the following values: 
    965965$i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$, 
    966 and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by:  
     966and the vorticity triads, ${^i_j}\mathbb{Q}^{i_p}_{j_p}$, defined at $T$-point, are given by: 
    967967\begin{equation} 
    968968  \tag{\ref{eq:Q_triads}} 
     
    971971\end{equation} 
    972972 
    973 This formulation does conserve the potential enstrophy for a horizontally non-divergent flow (\ie $\chi=0$).  
     973This formulation does conserve the potential enstrophy for a horizontally non-divergent flow (\ie\ $\chi=0$). 
    974974 
    975975Let consider one of the vorticity triad, for example ${^{i}_j}\mathbb{Q}^{+1/2}_{+1/2} $, 
     
    10231023\label{sec:C.5} 
    10241024 
    1025 All the numerical schemes used in NEMO are written such that the tracer content is conserved by 
     1025All the numerical schemes used in \NEMO\ are written such that the tracer content is conserved by 
    10261026the internal dynamics and physics (equations in flux form). 
    10271027For advection, 
    1028 only the CEN2 scheme (\ie $2^{nd}$ order finite different scheme) conserves the global variance of tracer. 
     1028only the CEN2 scheme (\ie\ $2^{nd}$ order finite different scheme) conserves the global variance of tracer. 
    10291029Nevertheless the other schemes ensure that the global variance decreases 
    1030 (\ie they are at least slightly diffusive). 
     1030(\ie\ they are at least slightly diffusive). 
    10311031For diffusion, all the schemes ensure the decrease of the total tracer variance, except the iso-neutral operator. 
    10321032There is generally no strict conservation of mass, 
    10331033as the equation of state is non linear with respect to $T$ and $S$. 
    1034 In practice, the mass is conserved to a very high accuracy.  
     1034In practice, the mass is conserved to a very high accuracy. 
    10351035% ------------------------------------------------------------------------------------------------------------- 
    10361036%       Advection Term 
     
    10561056Indeed, let $T$ be the tracer and its $\tau_u$, $\tau_v$, and $\tau_w$ interpolated values at velocity point 
    10571057(whatever the interpolation is), 
    1058 the conservation of the tracer content due to the advection tendency is obtained as follows:  
     1058the conservation of the tracer content due to the advection tendency is obtained as follows: 
    10591059\begin{flalign*} 
    10601060  &\int_D { \frac{1}{e_3}\frac{\partial \left( e_3 \, T \right)}{\partial t} \;dv } = - \int_D \nabla \cdot \left( T \textbf{U} \right)\;dv    &&&\\ 
     
    10721072 
    10731073The conservation of the variance of tracer due to the advection tendency can be achieved only with the CEN2 scheme, 
    1074 \ie when $\tau_u= \overline T^{\,i+1/2}$, $\tau_v= \overline T^{\,j+1/2}$, and $\tau_w= \overline T^{\,k+1/2}$.  
     1074\ie\ when $\tau_u= \overline T^{\,i+1/2}$, $\tau_v= \overline T^{\,j+1/2}$, and $\tau_w= \overline T^{\,k+1/2}$. 
    10751075It can be demonstarted as follows: 
    10761076\begin{flalign*} 
     
    11081108the conservation of potential vorticity and the horizontal divergence, 
    11091109and the dissipation of the square of these quantities 
    1110 (\ie enstrophy and the variance of the horizontal divergence) as well as 
     1110(\ie\ enstrophy and the variance of the horizontal divergence) as well as 
    11111111the dissipation of the horizontal kinetic energy. 
    11121112In particular, when the eddy coefficients are horizontally uniform, 
    11131113it ensures a complete separation of vorticity and horizontal divergence fields, 
    11141114so that diffusion (dissipation) of vorticity (enstrophy) does not generate horizontal divergence 
    1115 (variance of the horizontal divergence) and \textit{vice versa}.  
     1115(variance of the horizontal divergence) and \textit{vice versa}. 
    11161116 
    11171117These properties of the horizontal diffusion operator are a direct consequence of 
    11181118properties \autoref{eq:DOM_curl_grad} and \autoref{eq:DOM_div_curl}. 
    11191119When the vertical curl of the horizontal diffusion of momentum (discrete sense) is taken, 
    1120 the term associated with the horizontal gradient of the divergence is locally zero.  
     1120the term associated with the horizontal gradient of the divergence is locally zero. 
    11211121 
    11221122% ------------------------------------------------------------------------------------------------------------- 
     
    12371237 
    12381238When the horizontal divergence of the horizontal diffusion of momentum (discrete sense) is taken, 
    1239 the term associated with the vertical curl of the vorticity is zero locally, due to \autoref{eq:DOM_div_curl}.  
     1239the term associated with the vertical curl of the vorticity is zero locally, due to \autoref{eq:DOM_div_curl}. 
    12401240The resulting term conserves the $\chi$ and dissipates $\chi^2$ when the eddy coefficients are horizontally uniform. 
    12411241\begin{flalign*} 
     
    13961396    \left( \frac{A^{\,vm}} {e_3 }\; \frac{\partial \textbf{U}_h } {\partial k} \right) \right)\; dv = 0    &&& 
    13971397\end{flalign*} 
    1398 and the square of the horizontal divergence decreases (\ie the horizontal divergence is dissipated) if 
     1398and the square of the horizontal divergence decreases (\ie\ the horizontal divergence is dissipated) if 
    13991399the vertical diffusion coefficient is uniform over the whole domain: 
    14001400 
     
    14631463the heat and salt contents are conserved (equations in flux form). 
    14641464Since a flux form is used to compute the temperature and salinity, 
    1465 the quadratic form of these quantities (\ie their variance) globally tends to diminish. 
    1466 As for the advection term, there is conservation of mass only if the Equation Of Seawater is linear.  
     1465the quadratic form of these quantities (\ie\ their variance) globally tends to diminish. 
     1466As for the advection term, there is conservation of mass only if the Equation Of Seawater is linear. 
    14671467 
    14681468% ------------------------------------------------------------------------------------------------------------- 
     
    14971497\end{flalign*} 
    14981498 
    1499 In fact, this property simply results from the flux form of the operator.  
     1499In fact, this property simply results from the flux form of the operator. 
    15001500 
    15011501% ------------------------------------------------------------------------------------------------------------- 
  • NEMO/trunk/doc/latex/NEMO/subfiles/annex_DOMAINcfg.tex

    r11330 r11435  
    88\label{apdx:DOMAINcfg} 
    99 
    10 \minitoc 
     10\chaptertoc 
    1111\vfill 
    1212\begin{figure}[b] 
     
    2525 
    2626This tool will evolve into an independent utility with its own documentation but its 
    27 current manifestation is mostly a wrapper for \NEMO \forcode{DOM} modules more aligned to 
    28 those in the previous versions of NEMO. These versions allowed the user to define some 
     27current manifestation is mostly a wrapper for \NEMO\ \forcode{DOM} modules more aligned to 
     28those in the previous versions of \NEMO. These versions allowed the user to define some 
    2929horizontal and vertical grids through additional namelist parameters. Explanations of 
    3030these parameters are retained here for reference pending better documentation for 
     
    3232those read by \forcode{DOMAINcfg} via its own \forcode{namelist_ref} and 
    3333\forcode{namelist_cfg} files. Although, due to their origins, these namelists share names 
    34 with those used by NEMO, they are not interchangeable and should be considered independent 
     34with those used by \NEMO, they are not interchangeable and should be considered independent 
    3535of those described elsewhere in this manual. 
    3636 
     
    4343%--------------------------------------------namdom------------------------------------------------------- 
    4444 
    45 \nlst{namdom_domcfg}  
     45\nlst{namdom_domcfg} 
    4646%-------------------------------------------------------------------------------------------------------------- 
    4747 
    4848The user has three options available in defining a horizontal grid, which involve the 
    49 namelist variable \np{jphgr\_mesh} of the \ngn{namdom} (\forcode{DOMAINcfg} variant only) 
     49namelist variable \np{jphgr\_mesh} of the \nam{dom} (\texttt{DOMAINcfg} variant only) 
    5050namelist. 
    5151 
     
    5454  The coordinates and their first derivatives with respect to $i$ and $j$ are provided 
    5555  in a input file (\ifile{coordinates}), read in \rou{hgr\_read} subroutine of the domhgr module. 
    56   This is now the only option available within \NEMO itself from v4.0 onwards. 
    57 \item[\np{jphgr\_mesh}=1 to 5] A few simple analytical grids are provided (see below).  
    58   For other analytical grids, the \textit{domhgr.f90} module (\forcode{DOMAINcfg} variant) must be  
    59   modified by the user. In most cases, modifying the \mdl{usrdef\_hgr} module of \NEMO is 
    60   a better alternative since this is designed to allow simple analytical domains to be  
     56  This is now the only option available within \NEMO\ itself from v4.0 onwards. 
     57\item[\np{jphgr\_mesh}=1 to 5] A few simple analytical grids are provided (see below). 
     58  For other analytical grids, the \mdl{domhgr} module (\texttt{DOMAINcfg} variant) must be 
     59  modified by the user. In most cases, modifying the \mdl{usrdef\_hgr} module of \NEMO\ is 
     60  a better alternative since this is designed to allow simple analytical domains to be 
    6161  configured and used without the need for external data files. 
    6262\end{description} 
    6363 
    64 There are two simple cases of geographical grids on the sphere. With  
    65 \np{jphgr\_mesh}=1, the grid (expressed in degrees) is regular in space,  
    66 with grid sizes specified by parameters \np{ppe1\_deg} and \np{ppe2\_deg},  
    67 respectively. Such a geographical grid can be very anisotropic at high latitudes  
    68 because of the convergence of meridians (the zonal scale factors $e_1$  
    69 become much smaller than the meridional scale factors $e_2$). The Mercator  
    70 grid (\np{jphgr\_mesh}=4) avoids this anisotropy by refining the meridional scale  
    71 factors in the same way as the zonal ones. In this case, meridional scale factors  
    72 and latitudes are calculated analytically using the formulae appropriate for  
    73 a Mercator projection, based on \np{ppe1\_deg} which is a reference grid spacing  
    74 at the equator (this applies even when the geographical equator is situated outside  
    75 the model domain).  
    76  
    77 In these two cases (\np{jphgr\_mesh}=1 or 4), the grid position is defined by the  
    78 longitude and latitude of the south-westernmost point (\np{ppglamt0}  
    79 and \np{ppgphi0}). Note that for the Mercator grid the user need only provide  
    80 an approximate starting latitude: the real latitude will be recalculated analytically,  
    81 in order to ensure that the equator corresponds to line passing through $t$-  
    82 and $u$-points.   
    83  
    84 Rectangular grids ignoring the spherical geometry are defined with  
    85 \np{jphgr\_mesh} = 2, 3, 5. The domain is either an $f$-plane (\np{jphgr\_mesh} = 2,  
    86 Coriolis factor is constant) or a beta-plane (\np{jphgr\_mesh} = 3, the Coriolis factor  
    87 is linear in the $j$-direction). The grid size is uniform in meter in each direction,  
    88 and given by the parameters \np{ppe1\_m} and \np{ppe2\_m} respectively.  
    89 The zonal grid coordinate (\textit{glam} arrays) is in kilometers, starting at zero  
    90 with the first $t$-point. The meridional coordinate (gphi. arrays) is in kilometers,  
    91 and the second $t$-point corresponds to coordinate $gphit=0$. The input  
    92 variable \np{ppglam0} is ignored. \np{ppgphi0} is used to set the reference  
    93 latitude for computation of the Coriolis parameter. In the case of the beta plane,  
    94 \np{ppgphi0} corresponds to the center of the domain. Finally, the special case  
    95 \np{jphgr\_mesh}=5 corresponds to a beta plane in a rotated domain for the  
    96 GYRE configuration, representing a classical mid-latitude double gyre system.  
    97 The rotation allows us to maximize the jet length relative to the gyre areas  
    98 (and the number of grid points).  
     64There are two simple cases of geographical grids on the sphere. With 
     65\np{jphgr\_mesh}=1, the grid (expressed in degrees) is regular in space, 
     66with grid sizes specified by parameters \np{ppe1\_deg} and \np{ppe2\_deg}, 
     67respectively. Such a geographical grid can be very anisotropic at high latitudes 
     68because of the convergence of meridians (the zonal scale factors $e_1$ 
     69become much smaller than the meridional scale factors $e_2$). The Mercator 
     70grid (\np{jphgr\_mesh}=4) avoids this anisotropy by refining the meridional scale 
     71factors in the same way as the zonal ones. In this case, meridional scale factors 
     72and latitudes are calculated analytically using the formulae appropriate for 
     73a Mercator projection, based on \np{ppe1\_deg} which is a reference grid spacing 
     74at the equator (this applies even when the geographical equator is situated outside 
     75the model domain). 
     76 
     77In these two cases (\np{jphgr\_mesh}=1 or 4), the grid position is defined by the 
     78longitude and latitude of the south-westernmost point (\np{ppglamt0} 
     79and \np{ppgphi0}). Note that for the Mercator grid the user need only provide 
     80an approximate starting latitude: the real latitude will be recalculated analytically, 
     81in order to ensure that the equator corresponds to line passing through $t$- 
     82and $u$-points. 
     83 
     84Rectangular grids ignoring the spherical geometry are defined with 
     85\np{jphgr\_mesh} = 2, 3, 5. The domain is either an $f$-plane (\np{jphgr\_mesh} = 2, 
     86Coriolis factor is constant) or a beta-plane (\np{jphgr\_mesh} = 3, the Coriolis factor 
     87is linear in the $j$-direction). The grid size is uniform in meter in each direction, 
     88and given by the parameters \np{ppe1\_m} and \np{ppe2\_m} respectively. 
     89The zonal grid coordinate (\textit{glam} arrays) is in kilometers, starting at zero 
     90with the first $t$-point. The meridional coordinate (gphi. arrays) is in kilometers, 
     91and the second $t$-point corresponds to coordinate $gphit=0$. The input 
     92variable \np{ppglam0} is ignored. \np{ppgphi0} is used to set the reference 
     93latitude for computation of the Coriolis parameter. In the case of the beta plane, 
     94\np{ppgphi0} corresponds to the center of the domain. Finally, the special case 
     95\np{jphgr\_mesh}=5 corresponds to a beta plane in a rotated domain for the 
     96GYRE configuration, representing a classical mid-latitude double gyre system. 
     97The rotation allows us to maximize the jet length relative to the gyre areas 
     98(and the number of grid points). 
    9999 
    100100% ------------------------------------------------------------------------------------------------------------- 
     
    128128the vertical scale factors.  The user must provide the analytical expression of both $z_0$ 
    129129and its first derivative with respect to $k$.  This is done in routine \mdl{domzgr} 
    130 through statement functions, using parameters provided in the \ngn{namdom} namelist 
    131 (\forcode{DOMAINcfg} variant). 
     130through statement functions, using parameters provided in the \nam{dom} namelist 
     131(\texttt{DOMAINcfg} variant). 
    132132 
    133133It is possible to define a simple regular vertical grid by giving zero stretching 
     
    156156    \begin{split} 
    157157    z_0  (k) = h_{sur} - h_0 \; k &- \; h_1 \; \log  \big[ \cosh ((k - h_{th}) / h_{cr}) \big] \\ 
    158                              \;   &- \; h2_1 \; \log  \big[ \cosh ((k - h2_{th}) / h2_{cr}) \big]  
     158                             \;   &- \; h2_1 \; \log  \big[ \cosh ((k - h2_{th}) / h2_{cr}) \big] 
    159159    \end{split} 
    160160\end{gather} 
     
    177177\end{equation} 
    178178 
    179 This formulation decreases the self-generated circulation into the ice shelf cavity  
     179This formulation decreases the self-generated circulation into the ice shelf cavity 
    180180(which can, in extreme case, leads to numerical instability). This is now the recommended formulation for all configurations using v4.0 onwards. The analytical derivation of thicknesses is maintained for backwards compatibility. 
    181181 
     
    200200The resulting depths and scale factors as a function of the model levels are shown in 
    201201\autoref{fig:DOMCFG_zgr} and given in \autoref{tab:DOMCFG_orca_zgr}. 
    202 Those values correspond to the parameters \np{ppsur}, \np{ppa0}, \np{ppa1}, \np{ppkth} in \ngn{namcfg} namelist. 
     202Those values correspond to the parameters \np{ppsur}, \np{ppa0}, \np{ppa1}, \np{ppkth} in \nam{cfg} namelist. 
    203203 
    204204Rather than entering parameters $h_{sur}$, $h_0$, and $h_1$ directly, it is possible to 
    205205recalculate them.  In that case the user sets \np{ppsur}~$=$~\np{ppa0}~$=$~\np{ppa1}~$= 
    206 999999$., in \ngn{namcfg} namelist, and specifies instead the four following parameters: 
     206999999$., in \nam{cfg} namelist, and specifies instead the four following parameters: 
    207207\begin{itemize} 
    208208\item 
     
    309309 
    310310Three options are possible for defining the bathymetry, according to the namelist variable 
    311 \np{nn\_bathy} (found in \ngn{namdom} namelist (\forcode{DOMAINCFG} variant) ): 
     311\np{nn\_bathy} (found in \nam{dom} namelist (\texttt{DOMAINCFG} variant) ): 
    312312\begin{description} 
    313313\item[\np{nn\_bathy}\forcode{ = 0}]: 
     
    322322  The \ifile{bathy\_meter} file (Netcdf format) provides the ocean depth (positive, in meters) at 
    323323  each grid point of the model grid. 
    324   The bathymetry is usually built by interpolating a standard bathymetry product (\eg ETOPO2) onto 
     324  The bathymetry is usually built by interpolating a standard bathymetry product (\eg\ ETOPO2) onto 
    325325  the horizontal ocean mesh. 
    326326  Defining the bathymetry also defines the coastline: where the bathymetry is zero, 
     
    352352\end{description} 
    353353%%% 
    354   
     354 
    355355% ------------------------------------------------------------------------------------------------------------- 
    356356%        z-coordinate with constant thickness 
     
    386386thickness than $e_{3t}(jpk)$: the maximum thickness allowed is $2*e_{3t}(jpk - 1)$. 
    387387 
    388 This has to be kept in mind when specifying values in \ngn{namdom} namelist 
    389 (\forcode{DOMMAINCFG} variant), such as the maximum depth \np{pphmax} in partial steps. 
     388This has to be kept in mind when specifying values in \nam{dom} namelist 
     389(\texttt{DOMAINCFG} variant), such as the maximum depth \np{pphmax} in partial steps. 
    390390 
    391391For example, with \np{pphmax}~$= 5750~m$ for the DRAKKAR 45 layer grid, the maximum ocean 
     
    405405%------------------------------------------nam_zgr_sco--------------------------------------------------- 
    406406% 
    407 \nlst{namzgr_sco_domcfg}  
     407\nlst{namzgr_sco_domcfg} 
    408408%-------------------------------------------------------------------------------------------------------------- 
    409 Options are defined in \ngn{namzgr\_sco} (\forcode{DOMAINcfg} only). 
     409Options are defined in \nam{zgr\_sco} (\texttt{DOMAINcfg} only). 
    410410In $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}), the depth and thickness of the model levels are defined from 
    411411the product of a depth field and either a stretching function or its derivative, respectively: 
     
    430430but care must be taken to ensure that the vertical stretch used is appropriate for the application. 
    431431 
    432 The original default NEMO s-coordinate stretching is available if neither of the other options are specified as true 
     432The original default \NEMO\ s-coordinate stretching is available if neither of the other options are specified as true 
    433433(\np{ln\_s\_SH94}\forcode{ = .false.} and \np{ln\_s\_SF12}\forcode{ = .false.}). 
    434434This uses a depth independent $\tanh$ function for the stretching \citep{madec.delecluse.ea_JPO96}: 
     
    555555\label{subsec:DOMCFG_zgr_star} 
    556556 
    557 This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO web site. 
     557This option is described in the Report by Levier \textit{et al.} (2007), available on the \NEMO\ web site. 
    558558 
    559559\biblio 
  • NEMO/trunk/doc/latex/NEMO/subfiles/annex_E.tex

    r11151 r11435  
    88\label{apdx:E} 
    99 
    10 \minitoc 
     10\chaptertoc 
    1111 
    1212\newpage 
     
    4848$\tau "_i =\frac{e_{1T}}{e_{2T}\,e_{3T}}\delta_i \left[ \frac{e_{2u} e_{3u} }{e_{1u} }\delta_{i+1/2}[\tau] \right]$. 
    4949 
    50 This results in a dissipatively dominant (\ie hyper-diffusive) truncation error 
     50This results in a dissipatively dominant (\ie\ hyper-diffusive) truncation error 
    5151\citep{shchepetkin.mcwilliams_OM05}. 
    5252The overall performance of the advection scheme is similar to that reported in \cite{farrow.stevens_JPO95}. 
     
    135135\end{equation} 
    136136with ${A_u^{lT}}^2 = \frac{1}{12} {e_{1u}}^3\ |u|$,  
    137 \ie $A_u^{lT} = \frac{1}{\sqrt{12}} \,e_{1u}\ \sqrt{ e_{1u}\,|u|\,}$ 
     137\ie\ $A_u^{lT} = \frac{1}{\sqrt{12}} \,e_{1u}\ \sqrt{ e_{1u}\,|u|\,}$ 
    138138it comes: 
    139139\begin{equation} 
     
    147147  \end{split} 
    148148\end{equation} 
    149 if the velocity is uniform (\ie $|u|=cst$) then the diffusive flux is 
     149if the velocity is uniform (\ie\ $|u|=cst$) then the diffusive flux is 
    150150\begin{equation} 
    151151  \label{eq:tra_ldf_lap} 
     
    166166  \end{split} 
    167167\end{equation} 
    168 if the velocity is uniform (\ie $|u|=cst$) and 
     168if the velocity is uniform (\ie\ $|u|=cst$) and 
    169169choosing $\tau "_i =\frac{e_{1T}}{e_{2T}\,e_{3T}}\delta_i \left[ \frac{e_{2u} e_{3u} }{e_{1u} } \delta_{i+1/2}[\tau] \right]$ 
    170170 
     
    218218not $2\rdt$ as it can be found sometimes in literature. 
    219219The leap-Frog time stepping is a second order centered scheme. 
    220 As such it respects the quadratic invariant in integral forms, \ie the following continuous property, 
     220As such it respects the quadratic invariant in integral forms, \ie\ the following continuous property, 
    221221\[ 
    222222  % \label{eq:Energy} 
     
    256256 
    257257Let try to define a scheme that get its inspiration from the \citet{griffies.gnanadesikan.ea_JPO98} scheme, 
    258 but is formulated within the \NEMO framework 
    259 (\ie using scale factors rather than grid-size and having a position of $T$-points that 
     258but is formulated within the \NEMO\ framework 
     259(\ie\ using scale factors rather than grid-size and having a position of $T$-points that 
    260260is not necessary in the middle of vertical velocity points, see \autoref{fig:zgr_e3}). 
    261261 
     
    271271(see \autoref{chap:LDF}). 
    272272Nevertheless, this technique works fine for $T$ and $S$ as they are active tracers 
    273 (\ie they enter the computation of density), but it does not work for a passive tracer. 
     273(\ie\ they enter the computation of density), but it does not work for a passive tracer. 
    274274\citep{griffies.gnanadesikan.ea_JPO98} introduce a different way to discretise the off-diagonal terms that 
    275275nicely solve the problem. 
     
    386386\item[$\bullet$ implicit treatment in the vertical] 
    387387  In the diagonal term associated with the vertical divergence of the iso-neutral fluxes 
    388   \ie the term associated with a second order vertical derivative) 
     388  \ie\ the term associated with a second order vertical derivative) 
    389389  appears only tracer values associated with a single water column. 
    390390  This is of paramount importance since it means that 
     
    431431It is a key property for a diffusion term. 
    432432It means that the operator is also a dissipation term, 
    433 \ie it is a sink term for the square of the quantity on which it is applied. 
     433\ie\ it is a sink term for the square of the quantity on which it is applied. 
    434434It therfore ensures that, when the diffusivity coefficient is large enough, 
    435435the field on which it is applied become free of grid-point noise. 
     
    457457the formulation of which depends on the slopes of iso-neutral surfaces. 
    458458Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces, 
    459 \ie \autoref{eq:ldfslp_geo} is used in $z$-coordinate, 
     459\ie\ \autoref{eq:ldfslp_geo} is used in $z$-coordinate, 
    460460and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates.  
    461461 
     
    578578Nevertheless this property can be used to choose a discret form of \autoref{eq:eiv_skew_continuous} which 
    579579is consistent with the iso-neutral operator \autoref{eq:Gf_operator}. 
    580 Using the slopes \autoref{eq:Gf_slopes} and defining $A_e$ at $T$-point(\ie as $A$, 
     580Using the slopes \autoref{eq:Gf_slopes} and defining $A_e$ at $T$-point(\ie\ as $A$, 
    581581the eddy diffusivity coefficient), the resulting discret form is given by: 
    582582\begin{equation} 
     
    600600it uses the same definition for the slopes. 
    601601It also ensures the conservation of the tracer variance (see Appendix \autoref{apdx:eiv_skew}), 
    602 \ie it does not include a diffusive component but is a "pure" advection term. 
     602\ie\ it does not include a diffusive component but is a "pure" advection term. 
    603603 
    604604$\ $\newpage      %force an empty line 
     
    840840Exactly the same thing occurs for the triad ${_i^k \mathbb{R}_{-1/2}^{+1/2}}$ in the $i$ direction. 
    841841Therefore the sum over the domain is zero, 
    842 \ie the variance of the tracer is preserved by the discretisation of the skew fluxes. 
     842\ie\ the variance of the tracer is preserved by the discretisation of the skew fluxes. 
    843843 
    844844\biblio 
  • NEMO/trunk/doc/latex/NEMO/subfiles/annex_iso.tex

    r11187 r11435  
    1818\label{apdx:triad} 
    1919 
    20 \minitoc 
     20\chaptertoc 
    2121 
    2222\newpage 
    2323 
    24 \section{Choice of \protect\ngn{namtra\_ldf} namelist parameters} 
     24\section[Choice of \texttt{namtra\_ldf} namelist parameters] 
     25{Choice of \protect\nam{tra\_ldf} namelist parameters} 
    2526%-----------------------------------------nam_traldf------------------------------------------------------ 
    2627 
     
    3031Two scheme are available to perform the iso-neutral diffusion. 
    3132If the namelist logical \np{ln\_traldf\_triad} is set true, 
    32 \NEMO updates both active and passive tracers using the Griffies triad representation of iso-neutral diffusion and 
     33\NEMO\ updates both active and passive tracers using the Griffies triad representation of iso-neutral diffusion and 
    3334the eddy-induced advective skew (GM) fluxes. 
    3435If the namelist logical \np{ln\_traldf\_iso} is set true, 
     
    3839 
    3940Values of iso-neutral diffusivity and GM coefficient are set as described in \autoref{sec:LDF_coef}. 
    40 Note that when GM fluxes are used, the eddy-advective (GM) velocities are output for diagnostic purposes using xIOS, 
     41Note that when GM fluxes are used, the eddy-advective (GM) velocities are output for diagnostic purposes using XIOS, 
    4142even though the eddy advection is accomplished by means of the skew fluxes. 
    4243 
     
    7273\label{sec:iso} 
    7374 
    74 We have implemented into \NEMO a scheme inspired by \citet{griffies.gnanadesikan.ea_JPO98}, 
    75 but formulated within the \NEMO framework, using scale factors rather than grid-sizes. 
     75We have implemented into \NEMO\ a scheme inspired by \citet{griffies.gnanadesikan.ea_JPO98}, 
     76but formulated within the \NEMO\ framework, using scale factors rather than grid-sizes. 
    7677 
    7778\subsection{Iso-neutral diffusion operator} 
     
    191192To correct this, we introduced a smoothing of the slopes of the iso-neutral surfaces (see \autoref{chap:LDF}). 
    192193This technique works for $T$ and $S$ in so far as they are active tracers 
    193 (\ie they enter the computation of density), but it does not work for a passive tracer. 
     194(\ie\ they enter the computation of density), but it does not work for a passive tracer. 
    194195 
    195196\subsection{Expression of the skew-flux in terms of triad slopes} 
     
    280281the intersection of the $i,k$ $T$-cell, the $i+i_p,k$ $u$-cell and the $i,k+k_p$ $w$-cell. 
    281282Expressing the slopes $s_i$ and $s'_i$ in \autoref{eq:i13} and \autoref{eq:i31} in this notation, 
    282 we have \eg \ $s_1=s'_1={\:}_i^k \mathbb{R}_{1/2}^{1/2}$. 
     283we have \eg\ \ $s_1=s'_1={\:}_i^k \mathbb{R}_{1/2}^{1/2}$. 
    283284Each triad slope $_i^k\mathbb{R}_{i_p}^{k_p}$ is used once (as an $s$) to 
    284285calculate the lateral flux along its $u$-arm, at $(i+i_p,k)$, 
     
    288289and we notate these areas, similarly to the triad slopes, 
    289290as $_i^k{\mathbb{A}_u}_{i_p}^{k_p}$, $_i^k{\mathbb{A}_w}_{i_p}^{k_p}$, 
    290 where \eg in \autoref{eq:i13} $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$, 
     291where \eg\ in \autoref{eq:i13} $a_{1}={\:}_i^k{\mathbb{A}_u}_{1/2}^{1/2}$, 
    291292and in \autoref{eq:i31} $a'_{1}={\:}_i^k{\mathbb{A}_w}_{1/2}^{1/2}$. 
    292293 
     
    477478defined in terms of the distances between $T$, $u$,$f$ and $w$-points. 
    478479This is the natural discretization of \autoref{eq:cts-var}. 
    479 The \NEMO model, however, operates with scale factors instead of grid sizes, 
     480The \NEMO\ model, however, operates with scale factors instead of grid sizes, 
    480481and scale factors for the quarter cells are not defined. 
    481482Instead, therefore we simply choose 
     
    600601  It is a key property for a diffusion term. 
    601602  It means that it is also a dissipation term, 
    602   \ie it dissipates the square of the quantity on which it is applied. 
     603  \ie\ it dissipates the square of the quantity on which it is applied. 
    603604  It therefore ensures that, when the diffusivity coefficient is large enough, 
    604605  the field on which it is applied becomes free of grid-point noise. 
     
    649650Similar comments apply to triads that would intersect the ocean floor (\autoref{fig:bdry_triads}b). 
    650651Note that both near bottom triad slopes \triad{i}{k}{R}{1/2}{1/2} and \triad{i+1}{k}{R}{-1/2}{1/2} are masked when 
    651 either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, \ie the $i,k+1$ $u$-point is masked. 
     652either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, \ie\ the $i,k+1$ $u$-point is masked. 
    652653The associated lateral fluxes (grey-black dashed line) are masked if \np{ln\_botmix\_triad}\forcode{ = .false.}, 
    653654but left unmasked, giving bottom mixing, if \np{ln\_botmix\_triad}\forcode{ = .true.}. 
    654655 
    655656The default option \np{ln\_botmix\_triad}\forcode{ = .false.} is suitable when the bbl mixing option is enabled 
    656 (\key{trabbl}, with \np{nn\_bbl\_ldf}\forcode{ = 1}), or for simple idealized problems. 
     657(\np{ln\_trabbl}\forcode{ = .true.}, with \np{nn\_bbl\_ldf}\forcode{ = 1}), or for simple idealized problems. 
    657658For setups with topography without bbl mixing, \np{ln\_botmix\_triad}\forcode{ = .true.} may be necessary. 
    658659% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    672673      (b) Both near bottom triad slopes \triad{i}{k}{R}{1/2}{1/2} and 
    673674      \triad{i+1}{k}{R}{-1/2}{1/2} are masked when either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, 
    674       \ie the $i,k+1$ $u$-point is masked. 
     675      \ie\ the $i,k+1$ $u$-point is masked. 
    675676      The associated lateral fluxes (grey-black dashed line) are masked if 
    676       \protect\np{botmix\_triad}\forcode{ = .false.}, but left unmasked, 
    677       giving bottom mixing, if \protect\np{botmix\_triad}\forcode{ = .true.} 
     677      \protect\np{ln\_botmix\_triad}\forcode{ = .false.}, but left unmasked, 
     678      giving bottom mixing, if \protect\np{ln\_botmix\_triad}\forcode{ = .true.} 
    678679    } 
    679680  \end{center} 
     
    687688iso-neutral slopes relative to geopotentials must be bounded everywhere, 
    688689both for consistency with the small-slope approximation and for numerical stability \citep{cox_OM87, griffies_bk04}. 
    689 The bound chosen in \NEMO is applied to each component of the slope separately and 
     690The bound chosen in \NEMO\ is applied to each component of the slope separately and 
    690691has a value of $1/100$ in the ocean interior. 
    691692%, ramping linearly down above 70~m depth to zero at the surface 
     
    765766  where $i,k_{10}$ is the tracer gridbox within which the depth reaches 10~m. 
    766767  See the left side of \autoref{fig:MLB_triad}. 
    767   We use the $k_{10}$-gridbox instead of the surface gridbox to avoid problems \eg with thin daytime mixed-layers. 
     768  We use the $k_{10}$-gridbox instead of the surface gridbox to avoid problems \eg\ with thin daytime mixed-layers. 
    768769  Currently we use the same $\Delta\rho_c=0.01\;\mathrm{kg\:m^{-3}}$ for ML triad tapering as is used to 
    769770  output the diagnosed mixed-layer depth $h_{\mathrm{ML}}=|z_{W}|_{k_{\mathrm{ML}}+1/2}$, 
     
    781782                                                       % \label{eq:Rbase} 
    782783    \\ 
    783     \intertext{with \eg the green triad} 
     784    \intertext{with \eg\ the green triad} 
    784785    {\:}_i{\mathbb{R}_{\mathrm{base}}}_{1/2}^{-1/2}&= 
    785786                                                     {\:}^{k_{\mathrm{ML}}}_i{\mathbb{R}_{\mathrm{base}}}_{\,1/2}^{-1/2}. 
     
    828829    ${\:}_i{\mathbb{R}_{\mathrm{base}}}_{\,i_p}^{k_p}$. 
    829830    Triads with different $i_p,k_p$, denoted by different colours, 
    830     (\eg the green triad $i_p=1/2,k_p=-1/2$) are tapered to the appropriate basal triad.} 
     831    (\eg\ the green triad $i_p=1/2,k_p=-1/2$) are tapered to the appropriate basal triad.} 
    831832  % } 
    832833  \includegraphics[width=\textwidth]{Fig_GRIFF_MLB_triads} 
     
    889890the formulation of which depends on the slopes of iso-neutral surfaces. 
    890891Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces, 
    891 \ie \autoref{eq:ldfslp_geo} is used in $z$-coordinate, 
     892\ie\ \autoref{eq:ldfslp_geo} is used in $z$-coordinate, 
    892893and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $z^*$ or $s$-coordinates. 
    893894 
     
    918919The traditional way to implement this additional advection is to add it to the Eulerian velocity prior to 
    919920computing the tracer advection. 
    920 This is implemented if \key{traldf\_eiv} is set in the default implementation, 
     921This is implemented if \texttt{traldf\_eiv?} is set in the default implementation, 
    921922where \np{ln\_traldf\_triad} is set false. 
    922923This allows us to take advantage of all the advection schemes offered for the tracers 
     
    926927 
    927928However, when \np{ln\_traldf\_triad} is set true, 
    928 \NEMO instead implements eddy induced advection according to the so-called skew form \citep{griffies_JPO98}. 
     929\NEMO\ instead implements eddy induced advection according to the so-called skew form \citep{griffies_JPO98}. 
    929930It is based on a transformation of the advective fluxes using the non-divergent nature of the eddy induced velocity. 
    930931For example in the (\textbf{i},\textbf{k}) plane, 
     
    10341035\subsubsection{No change in tracer variance} 
    10351036 
    1036 The discretization conserves tracer variance, \ie it does not include a diffusive component but is a `pure' advection term. 
     1037The discretization conserves tracer variance, \ie\ it does not include a diffusive component but is a `pure' advection term. 
    10371038This can be seen %either from Appendix \autoref{apdx:eiv_skew} or 
    10381039by considering the fluxes associated with a given triad slope $_i^k{\mathbb{R}}_{i_p}^{k_p} (T)$. 
     
    11161117Thus surface layer triads $\triadt{i}{1}{R}{1/2}{-1/2}$ and $\triadt{i+1}{1}{R}{-1/2}{-1/2}$ are masked,  
    11171118and both near bottom triad slopes $\triadt{i}{k}{R}{1/2}{1/2}$ and $\triadt{i+1}{k}{R}{-1/2}{1/2}$ are masked when  
    1118 either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, \ie the $i,k+1$ $u$-point is masked.  
     1119either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, \ie\ the $i,k+1$ $u$-point is masked.  
    11191120The namelist parameter \np{ln\_botmix\_triad} has no effect on the eddy-induced skew-fluxes. 
    11201121 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_ASM.tex

    r11316 r11435  
    88\label{chap:ASM} 
    99 
    10 \minitoc 
     10\chaptertoc 
    1111 
    1212\vfill 
     
    1515\begin{tabular}{l||l|m{0.65\linewidth}} 
    1616    Release   & Author        & Modifications \\ 
    17     {\em 4.0} & {\em D. J. Lea} & {\em \NEMO 4.0 updates}  \\ 
     17    {\em 4.0} & {\em D. J. Lea} & {\em \NEMO\ 4.0 updates}  \\ 
    1818    {\em 3.4} & {\em D. J. Lea, M. Martin, K. Mogensen, A. Weaver} & {\em Initial version}  \\ 
    1919\end{tabular} 
     
    2626These are read into the model from a NetCDF file which may be produced by separate data assimilation code. 
    2727The code can also output model background fields which are used as an input to data assimilation code. 
    28 This is all controlled by the namelist \textit{\ngn{nam\_asminc} }. 
     28This is all controlled by the namelist \nam{\_asminc}. 
    2929There is a brief description of all the namelist options provided. 
    3030To build the ASM code \key{asminc} must be set. 
     
    101101 
    102102It is quite challenging for data assimilation systems to provide non-divergent velocity increments. 
    103 Applying divergent velocity increments will likely cause spurious vertical velocities in the model. This section describes a method to take velocity increments provided to \NEMO ($u^0_I$ and $v^0_I$) and adjust them by the iterative application of a divergence damping operator. The method is also described in \citet{dobricic.pinardi.ea_OS07}. 
     103Applying divergent velocity increments will likely cause spurious vertical velocities in the model. This section describes a method to take velocity increments provided to \NEMO\ ($u^0_I$ and $v^0_I$) and adjust them by the iterative application of a divergence damping operator. The method is also described in \citet{dobricic.pinardi.ea_OS07}. 
    104104 
    105105In iteration step $n$ (starting at $n=1$) new estimates of velocity increments $u^{n}_I$ and $v^{n}_I$ are updated by: 
     
    134134\citep{talagrand_JAS72, dobricic.pinardi.ea_OS07}. 
    135135Diffusion coefficients are defined as $A_D = \alpha e_{1t} e_{2t}$, where $\alpha = 0.2$. 
    136 The divergence damping is activated by assigning to \np{nn\_divdmp} in the \textit{nam\_asminc} namelist 
     136The divergence damping is activated by assigning to \np{nn\_divdmp} in the \nam{\_asminc} namelist 
    137137a value greater than zero. 
    138138This specifies the number of iterations of the divergence damping. Setting a value of the order of 100 will result in a significant reduction in the vertical velocity induced by the increments. 
     
    144144\label{sec:ASM_details} 
    145145 
    146 Here we show an example \ngn{nam\_asminc} namelist and the header of an example assimilation increments file on 
     146Here we show an example \nam{\_asminc} namelist and the header of an example assimilation increments file on 
    147147the ORCA2 grid. 
    148148 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_CONFIG.tex

    r11214 r11435  
    88\label{chap:CFG} 
    99 
    10 \minitoc 
     10\chaptertoc 
    1111 
    1212\newpage 
     
    1818\label{sec:CFG_intro} 
    1919 
    20 The purpose of this part of the manual is to introduce the NEMO reference configurations. 
     20The purpose of this part of the manual is to introduce the \NEMO\ reference configurations. 
    2121These configurations are offered as means to explore various numerical and physical options, 
    2222thus allowing the user to verify that the code is performing in a manner consistent with that we are running. 
     
    2424The reference configurations also provide a sense for some of the options available in the code, 
    2525though by no means are all options exercised in the reference configurations. 
    26 Configuration is defined manually through the \textit{namcfg} namelist variables. 
     26Configuration is defined manually through the \nam{cfg} namelist variables. 
    2727 
    2828%------------------------------------------namcfg---------------------------------------------------- 
     
    3838\label{sec:CFG_c1d} 
    3939 
    40 The 1D model option simulates a stand alone water column within the 3D NEMO system. 
     40The 1D model option simulates a stand alone water column within the 3D \NEMO\ system. 
    4141It can be applied to the ocean alone or to the ocean-ice system and can include passive tracers or a biogeochemical model. 
    4242It is set up by defining the position of the 1D water column in the grid 
    43 (see \textit{cfgs/SHARED/namelist\_ref}).  
     43(see \path{./cfgs/SHARED/namelist\_ref}). 
    4444The 1D model is a very useful tool 
    4545\textit{(a)} to learn about the physics and numerical treatment of vertical mixing processes; 
     
    5454 
    5555The 1D model has some specifies. First, all the horizontal derivatives are assumed to be zero, 
    56 and second, the two components of the velocity are moved on a $T$-point.  
    57 Therefore, defining \key{c1d} changes some things in the code behaviour:  
     56and second, the two components of the velocity are moved on a $T$-point. 
     57Therefore, defining \key{c1d} changes some things in the code behaviour: 
    5858\begin{description} 
    5959\item[(1)] 
     
    6868\end{description} 
    6969All the relevant \textit{\_c1d} modules can be found in the src/OCE/C1D directory of 
    70 the NEMO distribution. 
     70the \NEMO\ distribution. 
    7171 
    7272% to be added:  a test case on the yearlong Ocean Weather Station (OWS) Papa dataset of Martin (1985) 
     
    8080The ORCA family is a series of global ocean configurations that are run together with 
    8181the SI3 model (ORCA-ICE) and possibly with PISCES biogeochemical model (ORCA-ICE-PISCES). 
    82 An appropriate namelist is available in \path{cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg} for ORCA2. 
     82An appropriate namelist is available in \path{./cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg} for ORCA2. 
    8383The domain of ORCA2 configuration is defined in \ifile{ORCA\_R2\_zps\_domcfg} file, 
    84 this file is available in tar file on the NEMO community zenodo platform: \\ 
     84this file is available in tar file on the \NEMO\ community zenodo platform: \\ 
    8585https://doi.org/10.5281/zenodo.2640723 
    8686 
    87 In this namelist\_cfg the name of domain input file is set in \ngn{namcfg} block of namelist.  
     87In this namelist\_cfg the name of domain input file is set in \nam{cfg} block of namelist. 
    8888 
    8989%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    118118(\autoref{fig:MISC_ORCA_msh}). 
    119119The resulting mesh presents no loss of continuity in either the mesh lines or the scale factors, 
    120 or even the scale factor derivatives over the whole ocean domain, as the mesh is not a composite mesh.  
     120or even the scale factor derivatives over the whole ocean domain, as the mesh is not a composite mesh. 
    121121%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    122122\begin{figure}[!tbp] 
     
    137137%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    138138 
    139 The method is applied to Mercator grid (\ie same zonal and meridional grid spacing) poleward of 20\deg{N}, 
     139The method is applied to Mercator grid (\ie\ same zonal and meridional grid spacing) poleward of 20\deg{N}, 
    140140so that the Equator is a mesh line, which provides a better numerical solution for equatorial dynamics. 
    141141The choice of the series of embedded ellipses (position of the foci and variation of the ellipses) 
     
    146146a half a degree grid (ORCA\_R05). 
    147147The smallest ocean scale factor is found in along Antarctica, 
    148 while the ratio of anisotropy remains close to one except near the Victoria Island in the Canadian Archipelago.  
     148while the ratio of anisotropy remains close to one except near the Victoria Island in the Canadian Archipelago. 
    149149 
    150150% ------------------------------------------------------------------------------------------------------------- 
     
    154154\label{subsec:CFG_orca_resolution} 
    155155 
    156 The NEMO system is provided with five built-in ORCA configurations which differ in the horizontal resolution. 
     156The \NEMO\ system is provided with five built-in ORCA configurations which differ in the horizontal resolution. 
    157157The value of the resolution is given by the resolution at the Equator expressed in degrees. 
    158158Each of configuration is set through the \textit{domain\_cfg} domain configuration file, 
    159159which sets the grid size and configuration name parameters. 
    160 The NEMO System Team provides only ORCA2 domain input file "\ifile{ORCA\_R2\_zps\_domcfg}" file 
    161 (Tab. \autoref{tab:ORCA}). 
     160The \NEMO\ System Team provides only ORCA2 domain input file "\ifile{ORCA\_R2\_zps\_domcfg}" file 
     161(\autoref{tab:ORCA}). 
    162162 
    163163%--------------------------------------------------TABLE-------------------------------------------------- 
     
    165165  \begin{center} 
    166166    \begin{tabular}{p{4cm} c c c c} 
    167       Horizontal Grid                         & \np{ORCA\_index} &  \np{jpiglo} & \np{jpjglo} &       \\ 
    168       \hline 
    169       \hline 
    170       \~4\deg     &        4         &         92     &      76      &       \\ 
    171       \~2\deg        &        2         &       182     &    149      &        \\ 
    172       \~1\deg        &        1         &       362     &     292     &        \\ 
    173       \~0.5\deg     &        05       &       722     &     511     &        \\ 
    174       \~0.25\deg   &        025     &      1442    &   1021     &        \\ 
    175       % \key{orca\_r8}       &        8         &      2882    &   2042     &        \\ 
    176       % \key{orca\_r12}     &      12         &      4322    &   3062      &       \\ 
    177       \hline 
    178       \hline 
     167      Horizontal Grid & \jp{ORCA\_index} & \jp{jpiglo} & \jp{jpjglo} \\ 
     168      \hline \hline 
     169%             4   \deg &              4   &          92 &          76 \\ 
     170             2   \deg &              2   &         182 &         149 \\ 
     171             1   \deg &              1   &         362 &         292 \\ 
     172             0.5 \deg &              05  &         722 &         511 \\ 
     173             0.25\deg &              025 &        1442 &        1021 \\ 
     174      \hline \hline 
    179175    \end{tabular} 
    180176    \caption{ 
     
    198194Note that the tropical mesh refinements in ORCA\_R2 and R1 strongly increases the mesh anisotropy there. 
    199195 
    200 The ORCA\_R05 and higher global configurations do not incorporate any regional refinements.   
     196The ORCA\_R05 and higher global configurations do not incorporate any regional refinements. 
    201197 
    202198For ORCA\_R1 and R025, setting the configuration key to 75 allows to use 75 vertical levels, otherwise 46 are used. 
     
    204200(see \autoref{tab:orca_zgr}). %\sfcomment{HERE I need to put new table for ORCA2 values} and \autoref{fig:zgr}). 
    205201 
    206 Only the ORCA\_R2 is provided with all its input files in the NEMO distribution. 
     202Only the ORCA\_R2 is provided with all its input files in the \NEMO\ distribution. 
    207203%It is very similar to that used as part of the climate model developed at IPSL for the 4th IPCC assessment of 
    208204%climate change (Marti et al., 2009). 
    209 %It is also the basis for the \NEMO contribution to the Coordinate Ocean-ice Reference Experiments (COREs) 
    210 %documented in \citet{griffies.biastoch.ea_OM09}.  
     205%It is also the basis for the \NEMO\ contribution to the Coordinate Ocean-ice Reference Experiments (COREs) 
     206%documented in \citet{griffies.biastoch.ea_OM09}. 
    211207 
    212208This version of ORCA\_R2 has 31 levels in the vertical, with the highest resolution (10m) in the upper 150m 
    213 (see \autoref{tab:orca_zgr} and \autoref{fig:zgr}).  
    214 The bottom topography and the coastlines are derived from the global atlas of Smith and Sandwell (1997).  
    215 The default forcing uses the boundary forcing from \citet{large.yeager_rpt04} (see \autoref{subsec:SBC_blk_core}),  
     209(see \autoref{tab:orca_zgr} and \autoref{fig:zgr}). 
     210The bottom topography and the coastlines are derived from the global atlas of Smith and Sandwell (1997). 
     211The default forcing uses the boundary forcing from \citet{large.yeager_rpt04} (see \autoref{subsec:SBC_blk_core}), 
    216212which was developed for the purpose of running global coupled ocean-ice simulations without 
    217213an interactive atmosphere. 
    218214This \citet{large.yeager_rpt04} dataset is available through 
    219215the \href{http://nomads.gfdl.noaa.gov/nomads/forms/mom4/CORE.html}{GFDL web site}. 
    220 The "normal year" of \citet{large.yeager_rpt04} has been chosen of the NEMO distribution since release v3.3.  
    221  
    222 ORCA\_R2 pre-defined configuration can also be run with multiply online nested zooms (\ie with AGRIF, \key{agrif} defined). This is available as the AGRIF\_DEMO configuration that can be found in the \path{cfgs/AGRIF_DEMO/} directory. 
     216The "normal year" of \citet{large.yeager_rpt04} has been chosen of the \NEMO\ distribution since release v3.3. 
     217 
     218ORCA\_R2 pre-defined configuration can also be run with multiply online nested zooms (\ie\ with AGRIF, \key{agrif} defined). 
     219This is available as the AGRIF\_DEMO configuration that can be found in the \path{./cfgs/AGRIF_DEMO/} directory. 
    223220 
    224221A regional Arctic or peri-Antarctic configuration is extracted from an ORCA\_R2 or R05 configurations using 
    225 sponge layers at open boundaries.  
     222sponge layers at open boundaries. 
    226223 
    227224% ------------------------------------------------------------------------------------------------------------- 
     
    236233\citet{hazeleger.drijfhout_JPO98, hazeleger.drijfhout_JPO99, hazeleger.drijfhout_JGR00, hazeleger.drijfhout_JPO00}, 
    237234over which an analytical seasonal forcing is applied. 
    238 This allows to investigate the spontaneous generation of a large number of interacting, transient mesoscale eddies  
    239 and their contribution to the large scale circulation.  
     235This allows to investigate the spontaneous generation of a large number of interacting, transient mesoscale eddies 
     236and their contribution to the large scale circulation. 
    240237 
    241238The GYRE configuration run together with the PISCES biogeochemical model (GYRE-PISCES). 
     
    245242The configuration is meant to represent an idealized North Atlantic or North Pacific basin. 
    246243The circulation is forced by analytical profiles of wind and buoyancy fluxes. 
    247 The applied forcings vary seasonally in a sinusoidal manner between winter and summer extrema \citep{levy.klein.ea_OM10}.  
     244The applied forcings vary seasonally in a sinusoidal manner between winter and summer extrema \citep{levy.klein.ea_OM10}. 
    248245The wind stress is zonal and its curl changes sign at 22\deg{N} and 36\deg{N}. 
    249246It forces a subpolar gyre in the north, a subtropical gyre in the wider part of the domain and 
     
    257254 
    258255The GYRE configuration is set like an analytical configuration. 
    259 Through \np{ln\_read\_cfg}\forcode{ = .false.} in \textit{namcfg} namelist defined in 
    260 the reference configuration \path{cfgs/GYRE_PISCES/EXPREF/namelist_cfg} 
     256Through \np{ln\_read\_cfg}\forcode{ = .false.} in \nam{cfg} namelist defined in 
     257the reference configuration \path{./cfgs/GYRE_PISCES/EXPREF/namelist_cfg} 
    261258analytical definition of grid in GYRE is done in usrdef\_hrg, usrdef\_zgr routines. 
    262259Its horizontal resolution (and thus the size of the domain) is determined by 
    263 setting \np{nn\_GYRE} in \ngn{namusr\_def}: \\ 
    264  
    265 \np{jpiglo} $= 30 \times$ \np{nn\_GYRE} + 2   \\ 
    266  
    267 \np{jpjglo} $= 20 \times$ \np{nn\_GYRE} + 2   \\ 
     260setting \np{nn\_GYRE} in \nam{usr\_def}: \\ 
     261 
     262\jp{jpiglo} $= 30 \times$ \np{nn\_GYRE} + 2   \\ 
     263 
     264\jp{jpjglo} $= 20 \times$ \np{nn\_GYRE} + 2   \\ 
    268265 
    269266Obviously, the namelist parameters have to be adjusted to the chosen resolution, 
    270 see the Configurations pages on the NEMO web site (NEMO Configurations). 
     267see the Configurations pages on the \NEMO\ web site (\NEMO\ Configurations). 
    271268In the vertical, GYRE uses the default 30 ocean levels (\jp{jpk}\forcode{ = 31}) (\autoref{fig:zgr}). 
    272269 
     
    275272For example, keeping a same model size on each processor while increasing the number of processor used is very easy, 
    276273even though the physical integrity of the solution can be compromised. 
    277 Benchmark is activate via \np{ln\_bench}\forcode{ = .true.} in \ngn{namusr\_def} in 
    278 namelist \path{cfgs/GYRE_PISCES/EXPREF/namelist_cfg}. 
     274Benchmark is activate via \np{ln\_bench}\forcode{ = .true.} in \nam{usr\_def} in 
     275namelist \path{./cfgs/GYRE_PISCES/EXPREF/namelist_cfg}. 
    279276 
    280277%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    299296The AMM, Atlantic Margins Model, is a regional model covering the Northwest European Shelf domain on 
    300297a regular lat-lon grid at approximately 12km horizontal resolution. 
    301 The appropriate \textit{\&namcfg} namelist  is available in \textit{cfgs/AMM12/EXPREF/namelist\_cfg}. 
     298The appropriate \textit{\&namcfg} namelist  is available in \path{./cfgs/AMM12/EXPREF/namelist\_cfg}. 
    302299It is used to build the correct dimensions of the AMM domain. 
    303300 
    304 This configuration tests several features of NEMO functionality specific to the shelf seas. 
     301This configuration tests several features of \NEMO\ functionality specific to the shelf seas. 
    305302In particular, the AMM uses $s$-coordinates in the vertical rather than $z$-coordinates and 
    306303is forced with tidal lateral boundary conditions using a Flather boundary condition from the BDY module. 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIA.tex

    r11346 r11435  
    88\label{chap:DIA} 
    99 
    10 \minitoc 
     10\chaptertoc 
    1111 
    1212\vfill 
     
    1818    {\em }      & {\em Dorotea Iovino, Nicolas Martin} & {\em }  \\ 
    1919    {\em 3.6} & {\em Gurvan Madec, Sebastien Masson } & {\em }  \\ 
    20     {\em 3.4} & {\em Gurvan Madec, Rachid Benshila, Andrew Coward } & {\em }  \\  
    21     {\em }      & {\em Christian Ethe, Sebastien Masson } & {\em }  \\  
     20    {\em 3.4} & {\em Gurvan Madec, Rachid Benshila, Andrew Coward } & {\em }  \\ 
     21    {\em }      & {\em Christian Ethe, Sebastien Masson } & {\em }  \\ 
    2222\end{tabular} 
    23 \end{figure}  
     23\end{figure} 
    2424 
    2525\newpage 
    2626 
    2727% ================================================================ 
    28 %       Old Model Output  
     28%       Old Model Output 
    2929% ================================================================ 
    3030\section{Model output} 
     
    4141 
    4242The output listing and file(s) are predefined but should be checked and eventually adapted to the user's needs. 
    43 The output listing is stored in the $ocean.output$ file. 
    44 The information is printed from within the code on the logical unit $numout$. 
     43The output listing is stored in the \textit{ocean.output} file. 
     44The information is printed from within the code on the logical unit \texttt{numout}. 
    4545To locate these prints, use the UNIX command "\textit{grep -i numout}" in the source code directory. 
    4646 
     
    5959\label{sec:DIA_iom} 
    6060 
    61 Since version 3.2, iomput is the NEMO output interface of choice. 
     61Since version 3.2, iomput is the \NEMO\ output interface of choice. 
    6262It has been designed to be simple to use, flexible and efficient. 
    63 The two main purposes of iomput are:  
     63The two main purposes of iomput are: 
    6464 
    6565\begin{enumerate} 
     
    7272\end{enumerate} 
    7373 
    74 The first functionality allows the user to specify, without code changes or recompilation,  
     74The first functionality allows the user to specify, without code changes or recompilation, 
    7575aspects of the diagnostic output stream, such as: 
    7676 
     
    9494in a very easy way. 
    9595All details of iomput functionalities are listed in the following subsections. 
    96 Examples of the XML files that control the outputs can be found in:  
     96Examples of the XML files that control the outputs can be found in: 
    9797\path{cfgs/ORCA2_ICE_PISCES/EXPREF/iodef.xml}, 
    9898\path{cfgs/SHARED/field_def_nemo-oce.xml}, 
     
    101101 
    102102The second functionality targets output performance when running in parallel (\key{mpp\_mpi}). 
    103 Iomput provides the possibility to specify N dedicated I/O processes (in addition to the NEMO processes) 
     103Iomput provides the possibility to specify N dedicated I/O processes (in addition to the \NEMO\ processes) 
    104104to collect and write the outputs. 
    105105With an appropriate choice of N by the user, the bottleneck associated with the writing of 
    106106the output files can be greatly reduced. 
    107107 
    108 In version 3.6, the iom\_put interface depends on 
    109 an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-2.5}{XIOS-2.5}  
    110 (use of revision 618 or higher is required). 
     108In version 3.6, the \rou{iom\_put} interface depends on 
     109an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-2.5}{XIOS-2.5} 
     110%(use of revision 618 or higher is required). 
    111111This new IO server can take advantage of the parallel I/O functionality of NetCDF4 to 
    112112create a single output file and therefore to bypass the rebuilding phase. 
    113113Note that writing in parallel into the same NetCDF files requires that your NetCDF4 library is linked to 
    114 an HDF5 library that has been correctly compiled (\ie with the configure option $--$enable-parallel). 
     114an HDF5 library that has been correctly compiled (\ie\ with the configure option $--$enable-parallel). 
    115115Note that the files created by iomput through XIOS are incompatible with NetCDF3. 
    116116All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3. 
    117117 
    118118Even if not using the parallel I/O functionality of NetCDF4, using N dedicated I/O servers, 
    119 where N is typically much less than the number of NEMO processors, will reduce the number of output files created. 
    120 This can greatly reduce the post-processing burden usually associated with using large numbers of NEMO processors. 
     119where N is typically much less than the number of \NEMO\ processors, will reduce the number of output files created. 
     120This can greatly reduce the post-processing burden usually associated with using large numbers of \NEMO\ processors. 
    121121Note that for smaller configurations, the rebuilding phase can be avoided, 
    122122even without a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server. 
     
    124124\subsection{XIOS: Reading and writing restart file} 
    125125 
    126 XIOS may be used to read single file restart produced by NEMO. Currently only the variables written to  
     126XIOS may be used to read single file restart produced by \NEMO. Currently only the variables written to 
    127127file \forcode{numror} can be handled by XIOS. To activate restart reading using XIOS, set \np{ln\_xios\_read}\forcode{ = .true. } 
    128 in \textit{namelist\_cfg}. This setting will be ignored when multiple restart files are present, and default NEMO  
    129 functionality will be used for reading. There is no need to change iodef.xml file to use XIOS to read  
    130 restart, all definitions are done within the NEMO code. For high resolution configuration, however,  
     128in \textit{namelist\_cfg}. This setting will be ignored when multiple restart files are present, and default \NEMO 
     129functionality will be used for reading. There is no need to change iodef.xml file to use XIOS to read 
     130restart, all definitions are done within the \NEMO\ code. For high resolution configuration, however, 
    131131there may be a need to add the following line in iodef.xml (xios context): 
    132132 
     
    135135\end{xmllines} 
    136136 
    137 This variable sets timeout for reading.  
    138  
    139 If XIOS is to be used to read restart from file generated with an earlier NEMO version (3.6 for instance), 
     137This variable sets timeout for reading. 
     138 
     139If XIOS is to be used to read restart from file generated with an earlier \NEMO\ version (3.6 for instance), 
    140140dimension \forcode{z} defined in restart file must be renamed to \forcode{nav_lev}.\\ 
    141141 
    142 XIOS can also be used to write NEMO restart. A namelist parameter \np{nn\_wxios} is used to determine the  
    143 type of restart NEMO will write. If it is set to 0, default NEMO functionality will be used - each  
    144 processor writes its own restart file; if it is set to 1 XIOS will write restart into a single file;  
    145 for \np{nn\_wxios = 2} the restart will be written by XIOS into multiple files, one for each XIOS server.  
    146 Note, however, that \textbf{NEMO will not read restart generated by XIOS when \np{nn\_wxios = 2}}. The restart will  
    147 have to be rebuild before continuing the run. This option aims to reduce number of restart files generated by NEMO only,  
    148 and may be useful when there is a need to change number of processors used to run simulation.  
     142XIOS can also be used to write \NEMO\ restart. A namelist parameter \np{nn\_wxios} is used to determine the 
     143type of restart \NEMO\ will write. If it is set to 0, default \NEMO\ functionality will be used - each 
     144processor writes its own restart file; if it is set to 1 XIOS will write restart into a single file; 
     145for \np{nn\_wxios}\forcode{ = 2} the restart will be written by XIOS into multiple files, one for each XIOS server. 
     146Note, however, that \textbf{\NEMO\ will not read restart generated by XIOS when \np{nn\_wxios}\forcode{ = 2}}. The restart will 
     147have to be rebuild before continuing the run. This option aims to reduce number of restart files generated by \NEMO\ only, 
     148and may be useful when there is a need to change number of processors used to run simulation. 
    149149 
    150150If an additional variable must be written to a restart file, the following steps are needed: 
    151151\begin{description} 
    152    \item[step 1:] add variable name to a list of restart variables (in subroutine \rou{iom\_set\_rst\_vars,} \mdl{iom}) and  
    153 define correct grid for the variable (\forcode{grid_N_3D} - 3D variable, \forcode{grid_N} - 2D variable, \forcode{grid_vector} -  
     152   \item[step 1:] add variable name to a list of restart variables (in subroutine \rou{iom\_set\_rst\_vars,} \mdl{iom}) and 
     153define correct grid for the variable (\forcode{grid_N_3D} - 3D variable, \forcode{grid_N} - 2D variable, \forcode{grid_vector} - 
    1541541D variable, \forcode{grid_scalar} - scalar), 
    155    \item[step 2:] add variable to the list of fields written by restart.  This can be done either in subroutine  
    156 \rou{iom\_set\_rstw\_core} (\mdl{iom}) or by calling  \rou{iom\_set\_rstw\_active} (\mdl{iom}) with the name of a variable  
    157 as an argument. This convention follows approach for writing restart using iom, where variables are  
     155   \item[step 2:] add variable to the list of fields written by restart.  This can be done either in subroutine 
     156\rou{iom\_set\_rstw\_core} (\mdl{iom}) or by calling  \rou{iom\_set\_rstw\_active} (\mdl{iom}) with the name of a variable 
     157as an argument. This convention follows approach for writing restart using iom, where variables are 
    158158written either by \rou{rst\_write} or by calling \rou{iom\_rstput} from individual routines. 
    159159\end{description} 
     
    181181 
    182182In \textit{attached mode} and if the type of file is ''multiple\_file'', 
    183 then each NEMO process will also act as an IO server and produce its own set of output files. 
     183then each \NEMO\ process will also act as an IO server and produce its own set of output files. 
    184184Superficially, this emulates the standard behaviour in previous versions. 
    185185However, the subdomain written out by each process does not correspond to 
     
    193193write to its own set of output files. 
    194194If the ''one\_file'' option is chosen then all XIOS processes will collect their longitudinal strips and 
    195 write (in parallel) to a single output file.  
     195write (in parallel) to a single output file. 
    196196Note running in detached mode requires launching a Multiple Process Multiple Data (MPMD) parallel job. 
    197197The following subsection provides a typical example but the syntax will vary in different MPP environments. 
     
    200200 
    201201The number of cores used by the XIOS is specified when launching the model. 
    202 The number of cores dedicated to XIOS should be from \texttildelow1/10 to \texttildelow1/50 of the number of  
    203 cores dedicated to NEMO. 
     202The number of cores dedicated to XIOS should be from \texttildelow1/10 to \texttildelow1/50 of the number of 
     203cores dedicated to \NEMO. 
    204204Some manufacturers suggest using O($\sqrt{N}$) dedicated IO processors for N processors but 
    205 this is a general recommendation and not specific to NEMO. 
     205this is a general recommendation and not specific to \NEMO. 
    206206It is difficult to provide precise recommendations because the optimal choice will depend on 
    207 the particular hardware properties of the target system  
     207the particular hardware properties of the target system 
    208208(parallel filesystem performance, available memory, memory bandwidth etc.) 
    209209and the volume and frequency of data to be created. 
     
    213213\subsubsection{Control of XIOS: the context in iodef.xml} 
    214214 
    215 As well as the {\ttfamily using\_server} flag, other controls on the use of XIOS are set in the XIOS context in iodef.xml. 
     215As well as the \texttt{using\_server} flag, other controls on the use of XIOS are set in 
     216the XIOS context in \textit{iodef.xml}. 
    216217See the XML basics section below for more details on XML syntax and rules. 
    217218 
     
    226227    \hline 
    227228    buffer\_size                                                            & 
    228     buffer size used by XIOS to send data from NEMO to XIOS. 
     229    buffer size used by XIOS to send data from \NEMO\ to XIOS. 
    229230    Larger is more efficient. 
    230231    Note that needed/used buffer sizes are summarized at the end of the job & 
     
    232233    \hline 
    233234    buffer\_server\_factor\_size                                            & 
    234     ratio between NEMO and XIOS buffer size. 
     235    ratio between \NEMO\ and XIOS buffer size. 
    235236    Should be 2.                                                            & 
    236237    2        \\ 
     
    249250    \hline 
    250251    oasis\_codes\_id                                                        & 
    251     when using oasis, define the identifier of NEMO in the namcouple. 
     252    when using oasis, define the identifier of \NEMO\ in the namcouple. 
    252253    Note that the identifier of XIOS is xios.x                              & 
    253254    oceanx   \\ 
     
    260261\subsubsection{Installation} 
    261262 
    262 As mentioned, XIOS is supported separately and must be downloaded and compiled before it can be used with NEMO. 
     263As mentioned, XIOS is supported separately and must be downloaded and compiled before it can be used with \NEMO. 
    263264See the installation guide on the \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS} wiki for help and guidance. 
    264 NEMO will need to link to the compiled XIOS library. 
     265\NEMO\ will need to link to the compiled XIOS library. 
    265266The \href{https://forge.ipsl.jussieu.fr/nemo/chrome/site/doc/NEMO/guide/html/install.html#extract-and-install-xios} 
    266267{Extract and install XIOS} guide provides an example illustration of how this can be achieved. 
     
    275276\begin{enumerate} 
    276277\item[1.] 
    277   in NEMO code, add a \forcode{CALL iom_put( 'identifier', array )} where you want to output a 2D or 3D array. 
     278  in \NEMO\ code, add a \forcode{CALL iom_put( 'identifier', array )} where you want to output a 2D or 3D array. 
    278279\item[2.] 
    279280  If necessary, add \forcode{USE iom ! I/O manager library} to the list of used modules in 
     
    288289   <field_group id="grid_T" grid_ref="grid_T_3D"> <!-- T grid --> 
    289290   ... 
    290       <field id="identifier" long_name="blabla" ... />    
     291      <field id="identifier" long_name="blabla" ... /> 
    291292      ... 
    292 </field_definition>  
     293</field_definition> 
    293294\end{xmllines} 
    294295 
     
    313314 
    314315\begin{xmllines} 
    315 <file id="file1" .../>    
     316<file id="file1" .../> 
    316317... 
    317    <field field_ref="identifier" />    
     318   <field field_ref="identifier" /> 
    318319   ... 
    319 </file>    
     320</file> 
    320321\end{xmllines} 
    321322 
     
    333334See \href{http://www.xmlnews.org/docs/xml-basics.html}{here} for more details. 
    334335 
    335 \subsubsection{Structure of the XML file used in NEMO} 
     336\subsubsection{Structure of the XML file used in \NEMO} 
    336337 
    337338The XML file used in XIOS is structured by 7 families of tags: 
     
    382383                                                                                                     \xmlcode{<context id="xios" ... >}   \\ 
    383384    \hline 
    384     context nemo    &   context containing IO information for NEMO (mother grid when using AGRIF)  &  
     385    context nemo    &   context containing IO information for \NEMO\ (mother grid when using AGRIF)  & 
    385386                                                                                                     \xmlcode{<context id="nemo" ... >}   \\ 
    386387    \hline 
    387     context 1\_nemo &   context containing IO information for NEMO child grid 1 (when using AGRIF) &  
     388    context 1\_nemo &   context containing IO information for \NEMO\ child grid 1 (when using AGRIF) & 
    388389                                                                                                     \xmlcode{<context id="1_nemo" ... >} \\ 
    389390    \hline 
    390     context n\_nemo &   context containing IO information for NEMO child grid n (when using AGRIF) &  
     391    context n\_nemo &   context containing IO information for \NEMO\ child grid n (when using AGRIF) & 
    391392                                                                                                     \xmlcode{<context id="n_nemo" ... >} \\ 
    392393    \hline 
     
    413414\end{table} 
    414415 
    415 \noindent Each context tag related to NEMO (mother or child grids) is divided into 5 parts  
     416\noindent Each context tag related to \NEMO\ (mother or child grids) is divided into 5 parts 
    416417(that can be defined in any order): 
    417418 
     
    447448The inclusion of XML files into the main XML file can be done through the attribute src: 
    448449\xmlline|<context src="./nemo_def.xml" />| 
    449   
    450 \noindent In NEMO, by default, the field definition is done in 3 separate files ( 
     450 
     451\noindent In \NEMO, by default, the field definition is done in 3 separate files ( 
    451452\path{cfgs/SHARED/field_def_nemo-oce.xml}, 
    452453\path{cfgs/SHARED/field_def_nemo-pisces.xml} and 
     
    455456are included in the main iodef.xml file through the following commands: 
    456457\begin{xmllines} 
    457 <context id="nemo" src="./context_nemo.xml"/>  
     458<context id="nemo" src="./context_nemo.xml"/> 
    458459\end{xmllines} 
    459460 
     
    470471\begin{xmllines} 
    471472<field_definition operation="average" > 
    472    <field id="sst"                    />   <!-- averaged      sst -->  
    473    <field id="sss" operation="instant"/>   <!-- instantaneous sss -->  
    474 </field_definition>  
     473   <field id="sst"                    />   <!-- averaged      sst --> 
     474   <field id="sss" operation="instant"/>   <!-- instantaneous sss --> 
     475</field_definition> 
    475476\end{xmllines} 
    476477 
     
    489490</field_definition> 
    490491<file_definition> 
    491    <file id="myfile" output_freq="1d" />    
     492   <file id="myfile" output_freq="1d" /> 
    492493      <field field_ref="sst"                            />  <!-- default def --> 
    493494      <field field_ref="sss" long_name="my description" />  <!-- overwrite   --> 
    494495   </file> 
    495 </file_definition>  
     496</file_definition> 
    496497\end{xmllines} 
    497498 
     
    536537   <field_group group_ref="groupU" /> 
    537538   <field field_ref="uocetr_eff"   />  <!-- add another field --> 
    538 </file>    
     539</file> 
    539540\end{xmllines} 
    540541 
     
    548549Horizontal subdomains are defined through the attributs zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj of 
    549550the tag family domain. 
    550 It must therefore be done in the domain part of the XML file.  
    551 For example, in \path{cfgs/SHARED/domain_def.xml}, we provide the following example of a definition of  
     551It must therefore be done in the domain part of the XML file. 
     552For example, in \path{cfgs/SHARED/domain_def.xml}, we provide the following example of a definition of 
    552553a 5 by 5 box with the bottom left corner at point (10,10). 
    553554 
     
    566567\end{xmllines} 
    567568 
    568 Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain.  
     569Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain. 
    569570The Equatorial section, the TAO, RAMA and PIRATA moorings are already registered in the code and 
    570571can therefore be outputted without taking care of their (i,j) position in the grid. 
     
    579580\end{xmllines} 
    580581 
    581 Note that if the domain decomposition used in XIOS cuts the subdomain in several parts and if  
    582 you use the ''multiple\_file'' type for your output files,  
    583 you will endup with several files you will need to rebuild using unprovided tools (like ncpdq and ncrcat,  
     582Note that if the domain decomposition used in XIOS cuts the subdomain in several parts and if 
     583you use the ''multiple\_file'' type for your output files, 
     584you will endup with several files you will need to rebuild using unprovided tools (like ncpdq and ncrcat, 
    584585\href{http://nco.sourceforge.net/nco.html#Concatenation}{see nco manual}). 
    585586We are therefore advising to use the ''one\_file'' type in this case. 
     
    614615 
    615616\begin{xmllines} 
    616 <file_group id="1d" output_freq="1d" name="myfile_1d" >  
     617<file_group id="1d" output_freq="1d" name="myfile_1d" > 
    617618   <file id="myfileA" name_suffix="_AAA" > <!-- will create file "myfile_1d_AAA"  --> 
    618619      ... 
     
    669670\end{table} 
    670671 
    671 \noindent For example,  
     672\noindent For example, 
    672673\xmlline|<file id="myfile_hzoom" name="myfile_@expname@_@startdate@_freq@freq@" output_freq="1d" >| 
    673674 
     
    681682\noindent will give the following file name radical: \ifile{myfile\_ORCA2\_19891231\_freq1d} 
    682683 
    683 \subsubsection{Other controls of the XML attributes from NEMO} 
    684  
    685 The values of some attributes are defined by subroutine calls within NEMO  
     684\subsubsection{Other controls of the XML attributes from \NEMO} 
     685 
     686The values of some attributes are defined by subroutine calls within \NEMO 
    686687(calls to iom\_set\_domain\_attr, iom\_set\_axis\_attr and iom\_set\_field\_attr in \mdl{iom}). 
    687688Any definition given in the XML file will be overwritten. 
     
    778779\end{xmllines} 
    779780 
    780 Note that, then the code is crashing, writting real4 variables forces a numerical conversion from  
     781Note that, then the code is crashing, writting real4 variables forces a numerical conversion from 
    781782real8 to real4 which will create an internal error in NetCDF and will avoid the creation of the output files. 
    782783Forcing double precision outputs with prec="8" (for example in the field\_definition) will avoid this problem. 
     
    786787 
    787788\begin{xmllines} 
    788 <file_group id="1d" output_freq="1d" output_level="10" enabled=".true."> <!-- 1d files -->  
     789<file_group id="1d" output_freq="1d" output_level="10" enabled=".true."> <!-- 1d files --> 
    789790   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    790791      <field field_ref="sst" name="tos" > 
     
    795796      <variable id="my_global_attribute" type="string" > blabla_global </variable> 
    796797   </file> 
    797 </file_group>  
     798</file_group> 
    798799\end{xmllines} 
    799800 
     
    810811 
    811812\begin{xmllines} 
    812 <file_group id="5d" output_freq="5d"  output_level="10" enabled=".true." >  <!-- 5d files -->   
     813<file_group id="5d" output_freq="5d"  output_level="10" enabled=".true." >  <!-- 5d files --> 
    813814   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    814815      <field field_ref="toce" operation="instant" freq_op="5d" > @toce_e3t / @e3t </field> 
    815816   </file> 
    816 </file_group>  
     817</file_group> 
    817818\end{xmllines} 
    818819 
     
    839840 
    840841\begin{xmllines} 
    841 <file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files -->   
     842<file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files --> 
    842843   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    843       <field field_ref="ssh" name="sshstd" long_name="sea_surface_temperature_standard_deviation"  
     844      <field field_ref="ssh" name="sshstd" long_name="sea_surface_temperature_standard_deviation" 
    844845      operation="instant" freq_op="1m" > 
    845846         sqrt( @ssh2 - @ssh * @ssh ) 
    846847      </field> 
    847848   </file> 
    848 </file_group>  
     849</file_group> 
    849850\end{xmllines} 
    850851 
     
    853854here we use the default, average. 
    854855So, in the above case, @ssh2 will do the monthly mean of ssh*ssh. 
    855 Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'':  
     856Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'': 
    856857here the temporal average is alreday done by the ``@'' function so we just use instant. 
    857858field\_ref="ssh" means that attributes not explicitely defined, are inherited from ssh field. 
     
    871872 
    872873\begin{xmllines} 
    873 <file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files -->   
     874<file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files --> 
    874875   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
    875876      <field field_ref="sst" name="sstdcy" long_name="amplitude of sst diurnal cycle" operation="average" freq_op="1d" > 
     
    877878      </field> 
    878879   </file> 
    879 </file_group>  
     880</file_group> 
    880881\end{xmllines} 
    881882 
     
    13311332\subsection{CF metadata standard compliance} 
    13321333 
    1333 Output from the XIOS IO server is compliant with  
     1334Output from the XIOS IO server is compliant with 
    13341335\href{http://cfconventions.org/Data/cf-conventions/cf-conventions-1.5/build/cf-conventions.html}{version 1.5} of 
    1335 the CF metadata standard.  
     1336the CF metadata standard. 
    13361337Therefore while a user may wish to add their own metadata to the output files (as demonstrated in example 4 of 
    13371338section \autoref{subsec:IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard. 
    13381339 
    13391340Some metadata that may significantly increase the file size (horizontal cell areas and vertices) are controlled by 
    1340 the namelist parameter \np{ln\_cfmeta} in the \ngn{namrun} namelist. 
     1341the namelist parameter \np{ln\_cfmeta} in the \nam{run} namelist. 
    13411342This must be set to true if these metadata are to be included in the output files. 
    13421343 
     
    13601361Datasets created with chunking and compression are not backwards compatible with NetCDF3 "classic" format but 
    13611362most analysis codes can be relinked simply with the new libraries and will then read both NetCDF3 and NetCDF4 files. 
    1362 NEMO executables linked with NetCDF4 libraries can be made to produce NetCDF3 files by 
    1363 setting the \np{ln\_nc4zip} logical to false in the \textit{namnc4} namelist: 
     1363\NEMO\ executables linked with NetCDF4 libraries can be made to produce NetCDF3 files by 
     1364setting the \np{ln\_nc4zip} logical to false in the \nam{nc4} namelist: 
    13641365 
    13651366%------------------------------------------namnc4---------------------------------------------------- 
     
    14041405 
    14051406\noindent for a standard ORCA2\_LIM configuration gives chunksizes of {\small\ttfamily 46x38x1} respectively in 
    1406 the mono-processor case (\ie global domain of {\small\ttfamily 182x149x31}). 
    1407 An illustration of the potential space savings that NetCDF4 chunking and compression provides is given in  
     1407the mono-processor case (\ie\ global domain of {\small\ttfamily 182x149x31}). 
     1408An illustration of the potential space savings that NetCDF4 chunking and compression provides is given in 
    14081409table \autoref{tab:NC4} which compares the results of two short runs of the ORCA2\_LIM reference configuration with 
    14091410a 4x2 mpi partitioning. 
     
    14531454 
    14541455When \key{iomput} is activated with \key{netcdf4} chunking and compression parameters for fields produced via 
    1455 \np{iom\_put} calls are set via an equivalent and identically named namelist to \textit{namnc4} in 
    1456 \np{xmlio\_server.def}. 
    1457 Typically this namelist serves the mean files whilst the \ngn{ namnc4} in the main namelist file continues to 
     1456\rou{iom\_put} calls are set via an equivalent and identically named namelist to \nam{nc4} in 
     1457\textit{xmlio\_server.def}. 
     1458Typically this namelist serves the mean files whilst the \nam{nc4} in the main namelist file continues to 
    14581459serve the restart files. 
    14591460This duplication is unfortunate but appropriate since, if using io\_servers, the domain sizes of 
    14601461the individual files produced by the io\_server processes may be different to those produced by 
    14611462the invidual processing regions and different chunking choices may be desired. 
    1462   
     1463 
    14631464% ------------------------------------------------------------------------------------------------------------- 
    14641465%       Tracer/Dynamics Trends 
    14651466% ------------------------------------------------------------------------------------------------------------- 
    14661467\section[Tracer/Dynamics trends (\texttt{namtrd})] 
    1467 {Tracer/Dynamics trends (\protect\ngn{namtrd})} 
     1468{Tracer/Dynamics trends (\protect\nam{trd})} 
    14681469\label{sec:DIA_trd} 
    14691470 
    14701471%------------------------------------------namtrd---------------------------------------------------- 
    14711472 
    1472 \nlst{namtrd}  
     1473\nlst{namtrd} 
    14731474%------------------------------------------------------------------------------------------------------------- 
    14741475 
    14751476Each trend of the dynamics and/or temperature and salinity time evolution equations can be send to 
    14761477\mdl{trddyn} and/or \mdl{trdtra} modules (see TRD directory) just after their computation 
    1477 (\ie at the end of each $dyn\cdots.F90$ and/or $tra\cdots.F90$ routines). 
    1478 This capability is controlled by options offered in \ngn{namtrd} namelist. 
     1478(\ie\ at the end of each \textit{dyn....F90} and/or \textit{tra....F90} routines). 
     1479This capability is controlled by options offered in \nam{trd} namelist. 
    14791480Note that the output are done with XIOS, and therefore the \key{iomput} is required. 
    14801481 
    1481 What is done depends on the \ngn{namtrd} logical set to \forcode{.true.}: 
     1482What is done depends on the \nam{trd} logical set to \forcode{.true.}: 
    14821483 
    14831484\begin{description} 
     
    15021503\end{description} 
    15031504 
    1504 Note that the mixed layer tendency diagnostic can also be used on biogeochemical models via  
     1505Note that the mixed layer tendency diagnostic can also be used on biogeochemical models via 
    15051506the \key{trdtrc} and \key{trdmxl\_trc} CPP keys. 
    15061507 
    15071508\textbf{Note that} in the current version (v3.6), many changes has been introduced but not fully tested. 
    15081509In particular, options associated with \np{ln\_dyn\_mxl}, \np{ln\_vor\_trd}, and \np{ln\_tra\_mxl} are not working, 
    1509 and none of the options have been tested with variable volume (\ie \np{ln\_linssh}\forcode{ = .true.}). 
     1510and none of the options have been tested with variable volume (\ie\ \np{ln\_linssh}\forcode{ = .true.}). 
    15101511 
    15111512% ------------------------------------------------------------------------------------------------------------- 
     
    15171518%--------------------------------------------namflo------------------------------------------------------- 
    15181519 
    1519 \nlst{namflo}  
     1520\nlst{namflo} 
    15201521%-------------------------------------------------------------------------------------------------------------- 
    15211522 
    15221523The on-line computation of floats advected either by the three dimensional velocity field or constraint to 
    15231524remain at a given depth ($w = 0$ in the computation) have been introduced in the system during the CLIPPER project. 
    1524 Options are defined by \ngn{namflo} namelist variables. 
     1525Options are defined by \nam{flo} namelist variables. 
    15251526The algorithm used is based either on the work of \cite{blanke.raynaud_JPO97} (default option), 
    15261527or on a $4^th$ Runge-Hutta algorithm (\np{ln\_flork4}\forcode{ = .true.}). 
     
    15331534(IJK coordinates, (\np{ln\_ariane}\forcode{ = .true.}) ) or with longitude and latitude. 
    15341535 
    1535 In case of Ariane convention, input filename is \np{init\_float\_ariane}. 
     1536In case of Ariane convention, input filename is \textit{init\_float\_ariane}. 
    15361537Its format is: \\ 
    15371538{\scriptsize \texttt{I J K nisobfl itrash}} 
     
    15411542 - I,J,K  : indexes of initial position 
    15421543 
    1543  - nisobfl: 0 for an isobar float, 1 for a float following the w velocity   
     1544 - nisobfl: 0 for an isobar float, 1 for a float following the w velocity 
    15441545 
    15451546 - itrash : set to zero; it is a dummy variable to respect Ariane Tools convention 
     
    16271628This on-line Harmonic analysis is actived with \key{diaharm}. 
    16281629 
    1629 Some parameters are available in namelist \ngn{nam\_diaharm}: 
     1630Some parameters are available in namelist \nam{\_diaharm}: 
    16301631 
    16311632 - \np{nit000\_han} is the first time step used for harmonic analysis 
     
    16351636 - \np{nstep\_han}  is the  time step frequency for harmonic analysis 
    16361637 
    1637  - \np{nb\_ana}     is the number of harmonics to analyse 
     1638% - \np{nb\_ana}     is the number of harmonics to analyse 
    16381639 
    16391640 - \np{tname}       is an array with names of tidal constituents to analyse 
     
    16781679The pathways between them are contructed using tools which can be found in \texttt{tools/SECTIONS\_DIADCT} 
    16791680and are written in a binary file \texttt{section\_ijglobal.diadct} which is later read in by 
    1680 NEMO to compute on-line transports. 
     1681\NEMO\ to compute on-line transports. 
    16811682 
    16821683The on-line transports module creates three output ascii files: 
     
    16881689- \texttt{salt\_transport}   for   salt transports (unit: $10^{9}Kg s^{-1}$) \\ 
    16891690 
    1690 Namelist variables in \ngn{namdct} control how frequently the flows are summed and the time scales over which 
     1691Namelist variables in \nam{dct} control how frequently the flows are summed and the time scales over which 
    16911692they are averaged, as well as the level of output for debugging: 
    16921693\np{nn\_dct}   : frequency of instantaneous transports computing 
     
    17101711 - \texttt{long2 lat2}, coordinates of the second extremity of the section; 
    17111712 
    1712  - \texttt{nclass}    the number of bounds of your classes (\eg bounds for 2 classes); 
     1713 - \texttt{nclass}    the number of bounds of your classes (\eg\ bounds for 2 classes); 
    17131714 
    17141715 - \texttt{okstrpond} to compute    heat and       salt transports, \texttt{nostrpond} if no; 
     
    17431744 
    17441745 - \texttt{zsigp} for potential density classes \\ 
    1745    
     1746 
    17461747 The script \texttt{job.ksh} computes the pathway for each section and creates a binary file 
    1747  \texttt{section\_ijglobal.diadct} which is read by NEMO. \\ 
     1748 \texttt{section\_ijglobal.diadct} which is read by \NEMO. \\ 
    17481749 
    17491750 It is possible to use this tools for new configuations: \texttt{job.ksh} has to be updated with 
     
    18311832 
    18321833Let denote 
    1833 $\mathcal{M}$ the total mass    of liquid seawater ($\mathcal{M} = \int_D \rho dv$),  
    1834 $\mathcal{V}$ the total volume  of        seawater      ($\mathcal{V} = \int_D dv$),  
    1835 $\mathcal{A}$ the total surface of       the ocean      ($\mathcal{A} = \int_S ds$),  
    1836 $\bar{\rho}$ the global mean  seawater (\textit{in situ}) density  
     1834$\mathcal{M}$ the total mass    of liquid seawater ($\mathcal{M} = \int_D \rho dv$), 
     1835$\mathcal{V}$ the total volume  of        seawater      ($\mathcal{V} = \int_D dv$), 
     1836$\mathcal{A}$ the total surface of       the ocean      ($\mathcal{A} = \int_S ds$), 
     1837$\bar{\rho}$ the global mean  seawater (\textit{in situ}) density 
    18371838($\bar{\rho} = 1/\mathcal{V} \int_D \rho \,dv$), and 
    1838 $\bar{\eta}$ the global mean sea level  
     1839$\bar{\eta}$ the global mean sea level 
    18391840($\bar{\eta} = 1/\mathcal{A} \int_S \eta \,ds$). 
    18401841 
     
    18591860where $\rho$ is the \textit{in situ} density, and \textit{emp} the surface mass exchanges with the other media of 
    18601861the Earth system (atmosphere, sea-ice, land). 
    1861 Its global averaged leads to the total mass change  
     1862Its global averaged leads to the total mass change 
    18621863 
    18631864\begin{equation} 
     
    18761877\end{equation} 
    18771878 
    1878 The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or subtracting mass from the ocean.  
    1879 The second term arises from temporal changes in the global mean density; \ie from steric effects. 
     1879The first term in equation \autoref{eq:ssh_nBq} alters sea level by adding or subtracting mass from the ocean. 
     1880The second term arises from temporal changes in the global mean density; \ie\ from steric effects. 
    18801881 
    18811882In a Boussinesq fluid, $\rho$ is replaced by $\rho_o$ in all the equation except when $\rho$ appears multiplied by 
    1882 the gravity (\ie in the hydrostatic balance of the primitive Equations). 
     1883the gravity (\ie\ in the hydrostatic balance of the primitive Equations). 
    18831884In particular, the mass conservation equation, \autoref{eq:Co_nBq}, degenerates into the incompressibility equation: 
    18841885 
     
    19011902 
    19021903Nevertheless, following \citep{greatbatch_JGR94}, the steric effect on the volume can be diagnosed by 
    1903 considering the mass budget of the ocean.  
     1904considering the mass budget of the ocean. 
    19041905The apparent changes in $\mathcal{M}$, mass of the ocean, which are not induced by surface mass flux 
    19051906must be compensated by a spatially uniform change in the mean sea level due to expansion/contraction of the ocean 
     
    19171918is converted into a mean change in sea level. 
    19181919Introducing the total density anomaly, $\mathcal{D}= \int_D d_a \,dv$, 
    1919 where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO (cf. \autoref{subsec:TRA_eos}) 
     1920where $d_a = (\rho -\rho_o ) / \rho_o$ is the density anomaly used in \NEMO\ (cf. \autoref{subsec:TRA_eos}) 
    19201921in \autoref{eq:M_Bq} leads to a very simple form for the steric height: 
    19211922 
     
    19271928The above formulation of the steric height of a Boussinesq ocean requires four remarks. 
    19281929First, one can be tempted to define $\rho_o$ as the initial value of $\mathcal{M}/\mathcal{V}$, 
    1929 \ie set $\mathcal{D}_{t=0}=0$, so that the initial steric height is zero. 
     1930\ie\ set $\mathcal{D}_{t=0}=0$, so that the initial steric height is zero. 
    19301931We do not recommend that. 
    19311932Indeed, in this case $\rho_o$ depends on the initial state of the ocean. 
     
    19411942does not change when the sea level is changing as it is the case in all global ocean GCMs 
    19421943(wetting and drying of grid point is not allowed). 
    1943    
     1944 
    19441945Third, the discretisation of \autoref{eq:steric_Bq} depends on the type of free surface which is considered. 
    1945 In the non linear free surface case, \ie \np{ln\_linssh}\forcode{ = .true.}, it is given by 
     1946In the non linear free surface case, \ie\ \np{ln\_linssh}\forcode{ = .true.}, it is given by 
    19461947 
    19471948\[ 
     
    19661967so that there are no associated ocean currents. 
    19671968Hence, the dynamically relevant sea level is the effective sea level, 
    1968 \ie the sea level as if sea ice (and snow) were converted to liquid seawater \citep{campin.marshall.ea_OM08}. 
    1969 However, in the current version of \NEMO the sea-ice is levitating above the ocean without mass exchanges between 
     1969\ie\ the sea level as if sea ice (and snow) were converted to liquid seawater \citep{campin.marshall.ea_OM08}. 
     1970However, in the current version of \NEMO\ the sea-ice is levitating above the ocean without mass exchanges between 
    19701971ice and ocean. 
    19711972Therefore the model effective sea level is always given by $\eta + \eta_s$, whether or not there is sea ice present. 
     
    20212022    } 
    20222023  \end{center} 
    2023 \end{figure}   
     2024\end{figure} 
    20242025%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    20252026 
    20262027% ----------------------------------------------------------- 
    2027 %       CMIP specific diagnostics  
     2028%       CMIP specific diagnostics 
    20282029% ----------------------------------------------------------- 
    20292030\subsection[CMIP specific diagnostics (\textit{diaar5.F90}, \textit{diaptr.F90})] 
     
    20332034In \mdl{diaar5} they correspond to outputs that are required for AR5 simulations (CMIP5) 
    20342035(see also \autoref{sec:DIA_steric} for one of them). 
    2035 The module \mdl{diaar5} is active when one of the following outputs is required : global total volume (voltot), global mean ssh (sshtot), global total mass (masstot), global mean temperature (temptot), global mean ssh steric (sshsteric), global mean ssh thermosteric (sshthster), global mean salinity (saltot), sea water pressure at sea floor (botpres), dynamic sea surface height (sshdyn). 
    2036  
    2037 In \mdl{diaptr} when \np{ln\_diaptr}\forcode{ = .true.}  
    2038 (see the \textit{\ngn{namptr} } namelist below) can be computed on-line the poleward heat and salt transports, their advective and diffusive component, and the meriodional stream function . 
     2036The module \mdl{diaar5} is active when one of the following outputs is required : 
     2037global total volume (voltot), global mean ssh (sshtot), global total mass (masstot), global mean temperature (temptot), 
     2038global mean ssh steric (sshsteric), global mean ssh thermosteric (sshthster), global mean salinity (saltot), 
     2039sea water pressure at sea floor (botpres), dynamic sea surface height (sshdyn). 
     2040 
     2041In \mdl{diaptr} when \np{ln\_diaptr}\forcode{ = .true.} 
     2042(see the \nam{ptr} namelist below) can be computed on-line the poleward heat and salt transports, 
     2043their advective and diffusive component, and the meriodional stream function . 
    20392044When \np{ln\_subbas}\forcode{ = .true.}, transports and stream function are computed for the Atlantic, Indian, 
    20402045Pacific and Indo-Pacific Oceans (defined north of 30\deg{S}) as well as for the World Ocean. 
     
    20442049%------------------------------------------namptr----------------------------------------- 
    20452050 
    2046 \nlst{namptr}  
     2051\nlst{namptr} 
    20472052%----------------------------------------------------------------------------------------- 
    20482053 
    20492054% ----------------------------------------------------------- 
    2050 %       25 hour mean and hourly Surface, Mid and Bed  
     2055%       25 hour mean and hourly Surface, Mid and Bed 
    20512056% ----------------------------------------------------------- 
    20522057\subsection{25 hour mean output for tidal models} 
     
    20972102Values greater than 1 indicate that information is propagated across more than one grid cell in a single time step. 
    20982103 
    2099 The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \ngn{namctl} namelist. 
     2104The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \nam{ctl} namelist. 
    21002105The diagnostics will be written out to an ascii file named cfl\_diagnostics.ascii. 
    21012106In this file the maximum value of $C_u$, $C_v$, and $C_w$ are printed at each timestep along with the coordinates of 
     
    21032108At the end of the model run the maximum value of $C_u$, $C_v$, and $C_w$ for the whole model run is printed along 
    21042109with the coordinates of each. 
    2105 The maximum values from the run are also copied to the ocean.output file.  
     2110The maximum values from the run are also copied to the ocean.output file. 
    21062111 
    21072112% ================================================================ 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIU.tex

    r11151 r11435  
    99\label{chap:DIU} 
    1010 
    11 \minitoc 
     11\chaptertoc 
    1212 
    1313 
     
    1616 
    1717Code to produce an estimate of the diurnal warming and cooling of the sea surface skin 
    18 temperature (skin SST) is found in the DIU directory.   
     18temperature (skin SST) is found in the DIU directory. 
    1919The skin temperature can be split into three parts: 
    2020\begin{itemize} 
     
    3030 
    3131Models are provided for both the warm layer, \mdl{diurnal\_bulk}, and the cool skin, \mdl{cool\_skin}. 
    32 Foundation SST is not considered as it can be obtained either from the main NEMO model 
    33 (\ie from the temperature of the top few model levels) or from some other source.   
     32Foundation SST is not considered as it can be obtained either from the main \NEMO\ model 
     33(\ie\ from the temperature of the top few model levels) or from some other source. 
    3434It must be noted that both the cool skin and warm layer models produce estimates of the change in temperature 
    3535($\Delta T_{\mathrm{cs}}$ and $\Delta T_{\mathrm{wl}}$) and 
    3636both must be added to a foundation SST to obtain the true skin temperature. 
    3737 
    38 Both the cool skin and warm layer models are controlled through the namelist \ngn{namdiu}: 
     38Both the cool skin and warm layer models are controlled through the namelist \nam{diu}: 
    3939 
    4040\nlst{namdiu} 
     
    4444  A logical switch for turning on/off both the cool skin and warm layer. 
    4545\item[\np{ln\_diurnal\_only}] 
    46   A logical switch which if \forcode{.true.} will run the diurnal model without the other dynamical parts of NEMO. 
     46  A logical switch which if \forcode{.true.} will run the diurnal model without the other dynamical parts of \NEMO. 
    4747  \np{ln\_diurnal\_only} must be \forcode{.false.} if \np{ln\_diurnal} is \forcode{.false.}. 
    4848\end{description} 
     
    5353Initialisation is through the restart file. 
    5454Specifically the code will expect the presence of the 2-D variable ``Dsst'' to initialise the warm layer. 
    55 The cool skin model, which is determined purely by the instantaneous fluxes, has no initialisation variable.   
     55The cool skin model, which is determined purely by the instantaneous fluxes, has no initialisation variable. 
    5656 
    5757%=============================================================== 
     
    102102\end{equation} 
    103103where $\zeta=\frac{D_T}{L}$.  It is clear that the first derivative of (\autoref{eq:stab_func_eqn}), 
    104 and thus of (\autoref{eq:ecmwf1}), is discontinuous at $\zeta=0$ (\ie $Q\rightarrow0$ in 
     104and thus of (\autoref{eq:ecmwf1}), is discontinuous at $\zeta=0$ (\ie\ $Q\rightarrow0$ in 
    105105equation (\autoref{eq:ecmwf2})). 
    106106 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_DOM.tex

    r11330 r11435  
    88\label{chap:DOM} 
    99 
    10 \minitoc 
     10%\chaptertoc 
    1111 
    1212% Missing things: 
    1313%  - istate: description of the initial state   ==> this has to be put elsewhere.. 
    14 %                  perhaps in MISC ?  By the way the initialisation of T S and dynamics  
     14%                  perhaps in MISC ?  By the way the initialisation of T S and dynamics 
    1515%                  should be put outside of DOM routine (better with TRC staff and off-line 
    1616%                  tracers) 
     
    1919 
    2020\vfill 
    21 \begin{figure}[b] 
    22 \subsubsection*{Changes record} 
    23 \begin{tabular}{m{0.08\linewidth}||m{0.32\linewidth}|m{0.6\linewidth}} 
    24     Release   & Author(s)     & Modifications \\ 
    25 \hline 
    26     {\em 4.0} & {\em Simon M{\"u}ller \& Andrew Coward} & {\em Compatibility changes for v4.0. Major simplication has moved many of the options to external domain configuration tools. For now this information has been retained in \autoref{apdx:DOMAINcfg} }  \\ 
    27     {\em 3.x} & {\em Sebastien Masson, Gurvan Madec \& Rashid Benshila } & {\em }  \\ 
    28 \end{tabular} 
    29 \end{figure} 
     21 
     22\begin{table}[b] 
     23  \footnotesize 
     24  \caption*{Changes record} 
     25  \begin{tabularx}{\textwidth}{l||X|X} 
     26    Release & Author(s) & Modifications                                                          \\ 
     27    \hline 
     28    {\em 4.0} & {\em Simon M\"{u}ller \& Andrew Coward} & 
     29    {\em 
     30      Compatibility changes Major simplification has moved many of the options to external domain configuration tools. 
     31      (see \autoref{apdx:DOMAINcfg}) 
     32    }                                                                                            \\ 
     33    {\em 3.x} & {\em Rachid Benshila, Gurvan Madec \& S\'{e}bastien Masson} & 
     34    {\em First version}                                                                          \\ 
     35  \end{tabularx} 
     36\end{table} 
    3037 
    3138\newpage 
    3239 
    33 Having defined the continuous equations in \autoref{chap:PE} and chosen a time discretization \autoref{chap:STP}, 
    34 we need to choose a grid for spatial discretization and related numerical algorithms. 
     40Having defined the continuous equations in \autoref{chap:PE} and chosen a time discretisation \autoref{chap:STP}, 
     41we need to choose a grid for spatial discretisation and related numerical algorithms. 
    3542In the present chapter, we provide a general description of the staggered grid used in \NEMO, 
    36 and other relevant information about the DOM (DOMain) source-code modules . 
     43and other relevant information about the DOM (DOMain) source code modules. 
    3744 
    3845% ================================================================ 
     
    4350 
    4451% ------------------------------------------------------------------------------------------------------------- 
    45 %        Arrangement of Variables  
     52%        Arrangement of Variables 
    4653% ------------------------------------------------------------------------------------------------------------- 
    4754\subsection{Arrangement of variables} 
     
    7582the barotropic stream function $\psi$ is defined at horizontal points overlying the $\zeta$ and $f$-points. 
    7683 
    77 The ocean mesh (\ie the position of all the scalar and vector points) is defined by the transformation that 
     84The ocean mesh (\ie\ the position of all the scalar and vector points) is defined by the transformation that 
    7885gives $(\lambda,\varphi,z)$ as a function of $(i,j,k)$. 
    7986The grid-points are located at integer or integer and a half value of $(i,j,k)$ as indicated on \autoref{tab:cell}. 
     
    127134 
    128135Note that the definition of the scale factors 
    129 (\ie as the analytical first derivative of the transformation that 
     136(\ie\ as the analytical first derivative of the transformation that 
    130137results in $(\lambda,\varphi,z)$ as a function of $(i,j,k)$) 
    131 is specific to the \NEMO model \citep{marti.madec.ea_JGR92}. 
     138is specific to the \NEMO\ model \citep{marti.madec.ea_JGR92}. 
    132139As an example, a scale factor in the $i$ direction is defined locally at a $t$-point, 
    133140whereas many other models on a C grid choose to define such a scale factor as 
     
    159166 
    160167% ------------------------------------------------------------------------------------------------------------- 
    161 %        Vector Invariant Formulation  
     168%        Vector Invariant Formulation 
    162169% ------------------------------------------------------------------------------------------------------------- 
    163170\subsection{Discrete operators} 
     
    173180 
    174181Similar operators are defined with respect to $i + 1/2$, $j$, $j + 1/2$, $k$, and $k + 1/2$. 
    175 Following \autoref{eq:PE_grad} and \autoref{eq:PE_lap}, the gradient of a variable $q$ defined at 
    176 a $t$-point has its three components defined at $u$-, $v$- and $w$-points while 
    177 its Laplacian is defined at the $t$-point. 
     182Following \autoref{eq:PE_grad} and \autoref{eq:PE_lap}, the gradient of a variable $q$ defined at a $t$-point has 
     183its three components defined at $u$-, $v$- and $w$-points while its Laplacian is defined at the $t$-point. 
    178184These operators have the following discrete forms in the curvilinear $s$-coordinates system: 
    179185\[ 
     
    215221 
    216222The vertical average over the whole water column is denoted by an overbar and is for 
    217 a masked field $q$ (\ie a quantity that is equal to zero inside solid areas): 
     223a masked field $q$ (\ie\ a quantity that is equal to zero inside solid areas): 
    218224\begin{equation} 
    219225  \label{eq:DOM_bar} 
     
    247253\end{alignat} 
    248254 
    249 In other words, the adjoint of the differencing and averaging operators are $\delta_i^* = \delta_{i + 1/2}$ and  
     255In other words, the adjoint of the differencing and averaging operators are $\delta_i^* = \delta_{i + 1/2}$ and 
    250256$(\overline{\cdots}^{\, i})^* = \overline{\cdots}^{\, i + 1/2}$, respectively. 
    251257These two properties will be used extensively in the \autoref{apdx:C} to 
     
    253259 
    254260% ------------------------------------------------------------------------------------------------------------- 
    255 %        Numerical Indexing  
     261%        Numerical Indexing 
    256262% ------------------------------------------------------------------------------------------------------------- 
    257263\subsection{Numerical indexing} 
     
    275281integer values for $t$-points only while all the other points involve integer and a half values. 
    276282Therefore, a specific integer indexing has been defined for points other than $t$-points 
    277 (\ie velocity and vorticity grid-points). 
     283(\ie\ velocity and vorticity grid-points). 
    278284Furthermore, the direction of the vertical indexing has been reversed and the surface level set at $k = 1$. 
    279285 
    280286% ----------------------------------- 
    281 %        Horizontal Indexing  
     287%        Horizontal Indexing 
    282288% ----------------------------------- 
    283289\subsubsection{Horizontal indexing} 
     
    288294the $t$-point and the eastward $u$-point (northward $v$-point) have the same index 
    289295(see the dashed area in \autoref{fig:index_hor}). 
    290 A $t$-point and its nearest northeast $f$-point have the same $i$-and $j$-indices. 
     296A $t$-point and its nearest north-east $f$-point have the same $i$-and $j$-indices. 
    291297 
    292298% ----------------------------------- 
    293 %        Vertical indexing  
     299%        Vertical indexing 
    294300% ----------------------------------- 
    295301\subsubsection{Vertical indexing} 
     
    303309The last $w$-level ($k = jpk$) either corresponds to or is below the ocean floor while 
    304310the last $t$-level is always outside the ocean domain (\autoref{fig:index_vert}). 
    305 Note that a $w$-point and the directly underlaying $t$-point have a common $k$ index (\ie $t$-points and their 
    306 nearest $w$-point neighbour in negative index direction), in contrast to the indexing on the horizontal plane where 
    307 the $t$-point has the same index as the nearest velocity points in the positive direction of the respective horizontal axis index 
     311Note that a $w$-point and the directly underlaying $t$-point have a common $k$ index 
     312(\ie\ $t$-points and their nearest $w$-point neighbour in negative index direction), 
     313in contrast to the indexing on the horizontal plane where the $t$-point has the same index as 
     314the nearest velocity points in the positive direction of the respective horizontal axis index 
    308315(compare the dashed area in \autoref{fig:index_hor} and \autoref{fig:index_vert}). 
    309316Since the scale factors are chosen to be strictly positive, 
    310 a \textit{minus sign} is included in the \fortran implementations of \textit{all the vertical derivatives} of 
    311 the discrete equations given in this manual in order to accommodate the opposing vertical index directions in implementation and documentation. 
     317a \textit{minus sign} is included in the \fortran implementations of 
     318\textit{all the vertical derivatives} of the discrete equations given in this manual in order to 
     319accommodate the opposing vertical index directions in implementation and documentation. 
    312320 
    313321%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    333341\nlst{namcfg} 
    334342 
    335 Two typical methods are available to specify the spatial domain 
    336 configuration; they can be selected using parameter \np{ln\_read\_cfg} 
    337 parameter in namelist \ngn{namcfg}.  
    338  
    339 If \np{ln\_read\_cfg} is set to \forcode{.true.}, the domain-specific parameters 
    340 and fields are read from a netCDF input file, whose name (without its .nc 
    341 suffix) can be specified as the value of the \np{cn\_domcfg} parameter in 
    342 namelist \ngn{namcfg}. 
    343  
    344 If \np{ln\_read\_cfg} is set to \forcode{.false.}, the domain-specific 
    345 parameters and fields can be provided (\eg analytically computed) by subroutines 
    346 \mdl{usrdef\_hgr} and \mdl{usrdef\_zgr}. These subroutines can be supplied in 
    347 the \path{MY_SRC} directory of the configuration, and default versions that 
    348 configure the spatial domain for the GYRE reference configuration are present in 
    349 the \path{src/OCE/USR} directory. 
    350  
    351 In version 4.0 there are no longer any options for reading complex bathmetries and  
    352 performing a vertical discretization at run-time. Whilst it is occasionally convenient 
    353 to have a common bathymetry file and, for example, to run similar models with and 
    354 without partial bottom boxes and/or sigma-coordinates, supporting such choices leads to 
    355 overly complex code. Worse still is the difficulty of ensuring the model configurations  
    356 intended to be identical are indeed so when the model domain itself can be altered by runtime 
    357 selections. The code previously used to perform vertical discretization has be incorporated  
    358 into an external tool (\path{tools/DOMAINcfg}) which is briefly described in \autoref{apdx:DOMAINcfg}. 
    359  
    360 The next subsections summarise the parameter and fields related to the 
    361 configuration of the whole model domain. These represent the minimum information 
    362 that must be provided either via the \np{cn\_domcfg} file or set by code 
    363 inserted into user-supplied versions of the \mdl{usrdef\_*} subroutines. The 
    364 requirements are presented in three sections: the domain size 
    365 (\autoref{subsec:DOM_size}), the horizontal mesh 
    366 (\autoref{subsec:DOM_hgr}), and the vertical grid 
    367 (\autoref{subsec:DOM_zgr}). 
     343Two typical methods are available to specify the spatial domain configuration; 
     344they can be selected using parameter \np{ln\_read\_cfg} parameter in namelist \nam{cfg}. 
     345 
     346If \np{ln\_read\_cfg} is set to \forcode{.true.}, 
     347the domain-specific parameters and fields are read from a netCDF input file, 
     348whose name (without its .nc suffix) can be specified as the value of the \np{cn\_domcfg} parameter in namelist \nam{cfg}. 
     349 
     350If \np{ln\_read\_cfg} is set to \forcode{.false.}, 
     351the domain-specific parameters and fields can be provided (\eg\ analytically computed) by 
     352subroutines \mdl{usrdef\_hgr} and \mdl{usrdef\_zgr}. 
     353These subroutines can be supplied in the \path{MY_SRC} directory of the configuration, 
     354and default versions that configure the spatial domain for the GYRE reference configuration are present in 
     355the \path{./src/OCE/USR} directory. 
     356 
     357In version 4.0 there are no longer any options for reading complex bathymetries and 
     358performing a vertical discretisation at run-time. 
     359Whilst it is occasionally convenient to have a common bathymetry file and, for example, 
     360to run similar models with and without partial bottom boxes and/or sigma-coordinates, 
     361supporting such choices leads to overly complex code. 
     362Worse still is the difficulty of ensuring the model configurations intended to be identical are indeed so when 
     363the model domain itself can be altered by runtime selections. 
     364The code previously used to perform vertical discretisation has been incorporated into an external tool 
     365(\path{./tools/DOMAINcfg}) which is briefly described in \autoref{apdx:DOMAINcfg}. 
     366 
     367The next subsections summarise the parameter and fields related to the configuration of the whole model domain. 
     368These represent the minimum information that must be provided either via the \np{cn\_domcfg} file or set by code 
     369inserted into user-supplied versions of the \texttt{usrdef\_*} subroutines. 
     370The requirements are presented in three sections: 
     371the domain size (\autoref{subsec:DOM_size}), the horizontal mesh (\autoref{subsec:DOM_hgr}), 
     372and the vertical grid (\autoref{subsec:DOM_zgr}). 
    368373 
    369374% ----------------------------------- 
     
    373378\label{subsec:DOM_size} 
    374379 
    375 The total size of the computational domain is set by the parameters 
    376 \np{jpiglo}, \np{jpjglo} and \np{jpkglo} for the $i$, $j$ and $k$ 
    377 directions, respectively. Note, that the variables \forcode{jpi} and \forcode{jpj} 
    378 refer to the size of each processor subdomain when the code is run in 
    379 parallel using domain decomposition (\key{mpp\_mpi} defined, see 
    380 \autoref{sec:LBC_mpp}). 
     380The total size of the computational domain is set by the parameters \jp{jpiglo}, \jp{jpjglo} and \jp{jpkglo} for 
     381the $i$, $j$ and $k$ directions, respectively. 
     382Note, that the variables \texttt{jpi} and \texttt{jpj} refer to the size of each processor subdomain when 
     383the code is run in parallel using domain decomposition (\key{mpp\_mpi} defined, 
     384see \autoref{sec:LBC_mpp}). 
    381385 
    382386The name of the configuration is set through parameter \np{cn\_cfg}, 
    383 and the nominal resolution through parameter \np{nn\_cfg} (unless in 
    384 the input file both of variables \forcode{ORCA} and \forcode{ORCA_index} 
    385 are present, in which case \np{cn\_cfg} and \np{nn\_cfg} are set from these 
    386 values accordingly). 
    387  
    388 The global lateral boundary condition type is selected from 8 options 
    389 using parameter \np{jperio}. See \autoref{sec:LBC_jperio} for 
    390 details on the available options and the corresponding values for 
    391 \np{jperio}. 
    392  
    393 % ================================================================ 
    394 % Domain: Horizontal Grid (mesh)  
     387and the nominal resolution through parameter \np{nn\_cfg} 
     388(unless in the input file both of variables \texttt{ORCA} and \texttt{ORCA\_index} are present, 
     389in which case \np{cn\_cfg} and \np{nn\_cfg} are set from these values accordingly). 
     390 
     391The global lateral boundary condition type is selected from 8 options using parameter \jp{jperio}. 
     392See \autoref{sec:LBC_jperio} for details on the available options and the corresponding values for \jp{jperio}. 
     393 
     394% ================================================================ 
     395% Domain: Horizontal Grid (mesh) 
    395396% ================================================================ 
    396397\subsection{Horizontal grid mesh (\protect\mdl{domhgr})} 
     
    402403\subsubsection{Required fields} 
    403404\label{sec:DOM_hgr_fields} 
    404 The explicit specification of a range of mesh-related fields are required for the definition of a configuration. These include: 
    405  
    406 \begin{Verbatim}[fontsize=\tiny] 
     405 
     406The explicit specification of a range of mesh-related fields are required for the definition of a configuration. 
     407These include: 
     408 
     409\begin{clines} 
    407410int    jpiglo, jpjglo, jpkglo            /* global domain sizes                                          */ 
    408411int    jperio                            /* lateral global domain b.c.                                   */ 
     
    411414double e1t, e1u, e1v, e1f                /* horizontal scale factors                                     */ 
    412415double e2t, e2u, e2v, e2f                /* horizontal scale factors                                     */ 
    413 \end{Verbatim} 
    414  
    415 The values of the geographic longitude and latitude arrays at indices $i,j$ correspond to the analytical expressions of the longitude $\lambda$ and latitude $\varphi$ as a function of $(i,j)$, evaluated at the values as specified in Table \autoref{tab:cell} for the respective grid-point position. The calculation of the values of the horizontal scale factor arrays in general additionally involves partial derivatives of $\lambda$ and $\varphi$ with respect to $i$ and $j$, evaluated for the same arguments as $\lambda$ and $\varphi$. 
     416\end{clines} 
     417 
     418The values of the geographic longitude and latitude arrays at indices $i,j$ correspond to 
     419the analytical expressions of the longitude $\lambda$ and latitude $\varphi$ as a function of $(i,j)$, 
     420evaluated at the values as specified in \autoref{tab:cell} for the respective grid-point position. 
     421The calculation of the values of the horizontal scale factor arrays in general additionally involves 
     422partial derivatives of $\lambda$ and $\varphi$ with respect to $i$ and $j$, 
     423evaluated for the same arguments as $\lambda$ and $\varphi$. 
    416424 
    417425\subsubsection{Optional fields} 
    418 \begin{Verbatim}[fontsize=\tiny] 
     426 
     427\begin{clines} 
    419428                                         /* Optional:                                                    */ 
    420429int    ORCA, ORCA_index                  /* configuration name, configuration resolution                 */ 
    421430double e1e2u, e1e2v                      /* U and V surfaces (if grid size reduction in some straits)    */ 
    422431double ff_f, ff_t                        /* Coriolis parameter (if not on the sphere)                    */ 
    423 \end{Verbatim} 
    424  
    425 NEMO can support the local reduction of key strait widths by altering individual values of 
    426 e2u or e1v at the appropriate locations. This is particularly useful for locations such as 
    427 Gibraltar or Indonesian Throughflow pinch-points (see \autoref{sec:MISC_strait} for 
    428 illustrated examples). The key is to reduce the faces of $T$-cell (\ie change the value of 
    429 the horizontal scale factors at $u$- or $v$-point) but not the volume of the cells. Doing 
    430 otherwise can lead to numerical instability issues.  In normal operation the surface areas 
    431 are computed from $\texttt{e1u} * \texttt{e2u}$ and $\texttt{e1v} * \texttt{e2v}$ but in 
    432 cases where a gridsize reduction is required, the unaltered surface areas at $u$ and $v$ 
    433 grid points (\texttt{e1e2u} and \texttt{e1e2v}, respectively) must be read or pre-computed 
    434 in \mdl{usrdef\_hgr}. If these arrays are present in the \np{cn\_domcfg} file they are 
    435 read and the internal computation is suppressed. Versions of \mdl{usrdef\_hgr} which set 
    436 their own values of \texttt{e1e2u} and \texttt{e1e2v} should set the surface-area 
    437 computation flag: \texttt{ie1e2u\_v} to a non-zero value to suppress their re-computation. 
     432\end{clines} 
     433 
     434\NEMO\ can support the local reduction of key strait widths by 
     435altering individual values of e2u or e1v at the appropriate locations. 
     436This is particularly useful for locations such as Gibraltar or Indonesian Throughflow pinch-points 
     437(see \autoref{sec:MISC_strait} for illustrated examples). 
     438The key is to reduce the faces of $T$-cell (\ie\ change the value of the horizontal scale factors at $u$- or $v$-point) but 
     439not the volume of the cells. 
     440Doing otherwise can lead to numerical instability issues. 
     441In normal operation the surface areas are computed from $e1u * e2u$ and $e1v * e2v$ but 
     442in cases where a gridsize reduction is required, 
     443the unaltered surface areas at $u$ and $v$ grid points (\texttt{e1e2u} and \texttt{e1e2v}, respectively) must be read or 
     444pre-computed in \mdl{usrdef\_hgr}. 
     445If these arrays are present in the \np{cn\_domcfg} file they are read and the internal computation is suppressed. 
     446Versions of \mdl{usrdef\_hgr} which set their own values of \texttt{e1e2u} and \texttt{e1e2v} should set 
     447the surface-area computation flag: 
     448\texttt{ie1e2u\_v} to a non-zero value to suppress their re-computation. 
    438449 
    439450\smallskip 
    440 Similar logic applies to the other optional fields: \texttt{ff\_f} and \texttt{ff\_t} 
    441 which can be used to provide the Coriolis parameter at F- and T-points respectively if the 
    442 mesh is not on a sphere. If present these fields will be read and used and the normal 
    443 calculation ($2*\Omega*\sin(\varphi)$) suppressed. Versions of \mdl{usrdef\_hgr} which set 
    444 their own values of \texttt{ff\_f} and \texttt{ff\_t} should set the Coriolis computation 
    445 flag: \texttt{iff} to a non-zero value to suppress their re-computation. 
    446  
    447 Note that longitudes, latitudes, and scale factors at $w$ points are exactly 
    448 equal to those of $t$ points, thus no specific arrays are defined at $w$ points. 
     451Similar logic applies to the other optional fields: 
     452\texttt{ff\_f} and \texttt{ff\_t} which can be used to provide the Coriolis parameter at F- and T-points respectively if 
     453the mesh is not on a sphere. 
     454If present these fields will be read and used and the normal calculation ($2 * \Omega * \sin(\varphi)$) suppressed. 
     455Versions of \mdl{usrdef\_hgr} which set their own values of \texttt{ff\_f} and \texttt{ff\_t} should set 
     456the Coriolis computation flag: 
     457\texttt{iff} to a non-zero value to suppress their re-computation. 
     458 
     459Note that longitudes, latitudes, and scale factors at $w$ points are exactly equal to those of $t$ points, 
     460thus no specific arrays are defined at $w$ points. 
    449461 
    450462 
     
    459471%------------------------------------------------------------------------------------------------------------- 
    460472 
    461 In the vertical, the model mesh is determined by four things:  
     473In the vertical, the model mesh is determined by four things: 
    462474\begin{enumerate} 
    463   \item the bathymetry given in meters;  
    464   \item the number of levels of the model (\jp{jpk});  
     475  \item the bathymetry given in meters; 
     476  \item the number of levels of the model (\jp{jpk}); 
    465477  \item the analytical transformation $z(i,j,k)$ and the vertical scale factors (derivatives of the transformation); and 
    466   \item the masking system, \ie the number of wet model levels at each  
     478  \item the masking system, \ie\ the number of wet model levels at each 
    467479$(i,j)$ location of the horizontal grid. 
    468480\end{enumerate} 
     
    488500 
    489501The choice of a vertical coordinate is made when setting up the configuration; 
    490 it is not intended to be an option which can be changed in the middle of an 
    491 experiment. The one exception to this statement being the choice of linear or 
    492 non-linear free surface. In v4.0 the linear free surface option is implemented 
    493 as a special case of the non-linear free surface. This is computationally 
    494 wasteful since it uses the structures for time-varying 3D metrics for fields 
    495 that (in the linear free surface case) are fixed. However, the linear 
    496 free-surface is rarely used and implementing it this way means a single configuration 
    497 file can support both options. 
    498  
    499 By default a non-linear free surface is used (\np{ln\_linssh} set to \forcode{ = 
    500 .false.} in \ngn{namdom}): the coordinate follow the time-variation of the free 
    501 surface so that the transformation is time dependent: $z(i,j,k,t)$ 
    502 (\eg \autoref{fig:z_zps_s_sps}f).  When a linear free surface is assumed 
    503 (\np{ln\_linssh} set to \forcode{ = .true.} in \ngn{namdom}), the vertical 
    504 coordinates are fixed in time, but the seawater can move up and down across the 
    505 $z_0$ surface (in other words, the top of the ocean in not a rigid lid). 
    506  
    507 Note that settings: \np{ln\_zco}, \np{ln\_zps}, \np{ln\_sco} and \np{ln\_isfcav} mentioned 
    508 in the following sections appear to be namelist options but they are no longer truly 
    509 namelist options for NEMO. Their value is written to and read from the domain configuration file 
    510 and they should be treated as fixed parameters for a particular configuration. They are 
    511 namelist options for the \forcode{DOMAINcfg} tool that can be used to build the 
    512 configuration file and serve both to provide a record of the choices made whilst building the 
    513 configuration and to trigger appropriate code blocks within NEMO. 
     502it is not intended to be an option which can be changed in the middle of an experiment. 
     503The one exception to this statement being the choice of linear or non-linear free surface. 
     504In v4.0 the linear free surface option is implemented as a special case of the non-linear free surface. 
     505This is computationally wasteful since it uses the structures for time-varying 3D metrics 
     506for fields that (in the linear free surface case) are fixed. 
     507However, the linear free-surface is rarely used and implementing it this way means 
     508a single configuration file can support both options. 
     509 
     510By default a non-linear free surface is used (\np{ln\_linssh} set to \forcode{ = .false.} in \nam{dom}): 
     511the coordinate follow the time-variation of the free surface so that the transformation is time dependent: 
     512$z(i,j,k,t)$ (\eg\ \autoref{fig:z_zps_s_sps}f). 
     513When a linear free surface is assumed (\np{ln\_linssh} set to \forcode{ = .true.} in \nam{dom}), 
     514the vertical coordinates are fixed in time, but the seawater can move up and down across the $z_0$ surface 
     515(in other words, the top of the ocean in not a rigid lid). 
     516 
     517Note that settings: 
     518\np{ln\_zco}, \np{ln\_zps}, \np{ln\_sco} and \np{ln\_isfcav} mentioned in the following sections 
     519appear to be namelist options but they are no longer truly namelist options for \NEMO. 
     520Their value is written to and read from the domain configuration file and 
     521they should be treated as fixed parameters for a particular configuration. 
     522They are namelist options for the \texttt{DOMAINcfg} tool that can be used to build the configuration file and 
     523serve both to provide a record of the choices made whilst building the configuration and 
     524to trigger appropriate code blocks within \NEMO. 
    514525These values should not be altered in the \np{cn\_domcfg} file. 
    515526 
     
    527538$s-z$ or $s-zps$ coordinate (\autoref{fig:z_zps_s_sps}d and \autoref{fig:z_zps_s_sps}e). 
    528539 
    529 A further choice related to vertical coordinate concerns the presence (or not) of ocean 
    530 cavities beneath ice shelves within the model domain.  A setting of \np{ln\_isfcav} as 
    531 \forcode{.true.} indicates that the domain contains  ocean cavities, otherwise the top, 
    532 wet layer of the ocean will always be at the ocean surface.  This option is currently only 
    533 available for $z$- or $zps$-coordinates. In the latter case, partial steps are also applied 
    534 at the ocean/ice shelf interface. 
    535  
    536 Within the model, the arrays describing the grid point depths and vertical scale factors 
    537 are three set of three dimensional arrays $(i,j,k)$ defined at \textit{before}, 
    538 \textit{now} and \textit{after} time step.  The time at which they are defined is 
    539 indicated by a suffix: $\_b$, $\_n$, or $\_a$, respectively.  They are updated at each 
    540 model time step. The initial fixed reference coordinate system is held in variable names 
    541 with a $\_0$ suffix.  When the linear free surface option is used 
    542 (\np{ln\_linssh}\forcode{ = .true.}), \textit{before}, \textit{now} and \textit{after} 
    543 arrays are initially set to their reference counterpart and remain fixed. 
     540A further choice related to vertical coordinate concerns 
     541the presence (or not) of ocean cavities beneath ice shelves within the model domain. 
     542A setting of \np{ln\_isfcav} as \forcode{.true.} indicates that the domain contains ocean cavities, 
     543otherwise the top, wet layer of the ocean will always be at the ocean surface. 
     544This option is currently only available for $z$- or $zps$-coordinates. 
     545In the latter case, partial steps are also applied at the ocean/ice shelf interface. 
     546 
     547Within the model, the arrays describing the grid point depths and vertical scale factors are three set of 
     548three dimensional arrays $(i,j,k)$ defined at \textit{before}, \textit{now} and \textit{after} time step. 
     549The time at which they are defined is indicated by a suffix: $\_b$, $\_n$, or $\_a$, respectively. 
     550They are updated at each model time step. 
     551The initial fixed reference coordinate system is held in variable names with a $\_0$ suffix. 
     552When the linear free surface option is used (\np{ln\_linssh}\forcode{ = .true.}), 
     553\textit{before}, \textit{now} and \textit{after} arrays are initially set to 
     554their reference counterpart and remain fixed. 
    544555 
    545556\subsubsection{Required fields} 
    546557\label{sec:DOM_zgr_fields} 
    547 The explicit specification of a range of fields related to the vertical grid are required for the definition of a configuration. These include: 
    548  
    549 \begin{Verbatim}[fontsize=\tiny] 
     558 
     559The explicit specification of a range of fields related to the vertical grid are required for 
     560the definition of a configuration. 
     561These include: 
     562 
     563\begin{clines} 
    550564int    ln_zco, ln_zps, ln_sco            /* flags for z-coord, z-coord with partial steps and s-coord    */ 
    551565int    ln_isfcav                         /* flag  for ice shelf cavities                                 */ 
     
    556570                                         /* For reference:                                               */ 
    557571float  bathy_metry                       /* bathymetry used in setting top and bottom levels             */ 
    558 \end{Verbatim} 
    559  
    560 This set of vertical metrics is sufficient to describe the initial depth and thickness of 
    561 every gridcell in the model regardless of the choice of vertical coordinate. With constant 
    562 z-levels, e3 metrics will be uniform across each horizontal level. In the partial step 
    563 case each e3 at the \np{bottom\_level} (and, possibly, \np{top\_level} if ice cavities are 
    564 present) may vary from its horizontal neighbours. And, in s-coordinates, variations can 
    565 occur throughout the water column. With the non-linear free-surface, all the coordinates 
    566 behave more like the s-coordinate in that variations occurr throughout the water column 
    567 with displacements related to the sea surface height. These variations are typically much 
    568 smaller than those arising from bottom fitted coordinates. The values for vertical metrics 
    569 supplied in the domain configuration file can be considered as those arising from a flat 
    570 sea surface with zero elevation. 
    571  
    572 The \np{bottom\_level} and \np{top\_level} 2D arrays define the \np{bottom\_level} and top 
    573 wet levels in each grid column. Without ice cavities, \np{top\_level} is essentially a land 
    574 mask (0 on land; 1 everywhere else). With ice cavities, \np{top\_level} determines the 
    575 first wet point below the overlying ice shelf. 
    576  
    577  
    578  
    579 % ------------------------------------------------------------------------------------------------------------- 
    580 %        level bathymetry and mask  
     572\end{clines} 
     573 
     574This set of vertical metrics is sufficient to describe the initial depth and thickness of every gridcell in 
     575the model regardless of the choice of vertical coordinate. 
     576With constant z-levels, e3 metrics will be uniform across each horizontal level. 
     577In the partial step case each e3 at the \jp{bottom\_level} 
     578(and, possibly, \jp{top\_level} if ice cavities are present) 
     579may vary from its horizontal neighbours. 
     580And, in s-coordinates, variations can occur throughout the water column. 
     581With the non-linear free-surface, all the coordinates behave more like the s-coordinate in 
     582that variations occur throughout the water column with displacements related to the sea surface height. 
     583These variations are typically much smaller than those arising from bottom fitted coordinates. 
     584The values for vertical metrics supplied in the domain configuration file can be considered as 
     585those arising from a flat sea surface with zero elevation. 
     586 
     587The \jp{bottom\_level} and \jp{top\_level} 2D arrays define the \jp{bottom\_level} and top wet levels in each grid column. 
     588Without ice cavities, \jp{top\_level} is essentially a land mask (0 on land; 1 everywhere else). 
     589With ice cavities, \jp{top\_level} determines the first wet point below the overlying ice shelf. 
     590 
     591 
     592% ------------------------------------------------------------------------------------------------------------- 
     593%        level bathymetry and mask 
    581594% ------------------------------------------------------------------------------------------------------------- 
    582595\subsubsection{Level bathymetry and mask} 
     
    584597 
    585598 
    586 From \np{top\_level} and \np{bottom\_level} fields, the mask fields are defined as follows: 
     599From \jp{top\_level} and \jp{bottom\_level} fields, the mask fields are defined as follows: 
    587600\begin{alignat*}{2} 
    588601  tmask(i,j,k) &= &  & 
     
    603616Note that, without ice shelves cavities, 
    604617masks at $t-$ and $w-$points are identical with the numerical indexing used (\autoref{subsec:DOM_Num_Index}). 
    605 Nevertheless, $wmask$ are required with ocean cavities to deal with the top boundary (ice shelf/ocean interface)  
     618Nevertheless, $wmask$ are required with ocean cavities to deal with the top boundary (ice shelf/ocean interface) 
    606619exactly in the same way as for the bottom boundary. 
    607620 
     
    614627 
    615628%------------------------------------------------------------------------------------------------- 
    616 %        Closed seas  
     629%        Closed seas 
    617630%------------------------------------------------------------------------------------------------- 
    618 \subsection{Closed seas} \label{subsec:DOM_closea}  
    619  
    620 When a global ocean is coupled to an atmospheric model it is better to represent all large 
    621 water bodies (\eg great lakes, Caspian sea...) even if the model resolution does not allow 
    622 their communication with the rest of the ocean.  This is unnecessary when the ocean is 
    623 forced by fixed atmospheric conditions, so these seas can be removed from the ocean 
    624 domain.  The user has the option to set the bathymetry in closed seas to zero (see 
    625 \autoref{sec:MISC_closea}) and to optionally decide on the fate of any freshwater 
    626 imbalance over the area. The options are explained in \autoref{sec:MISC_closea} but it 
    627 should be noted here that a successful use of these options requires appropriate mask 
    628 fields to be present in the domain configuration file. Among the possibilities are: 
    629  
    630 \begin{Verbatim}[fontsize=\tiny] 
     631\subsection{Closed seas} \label{subsec:DOM_closea} 
     632 
     633When a global ocean is coupled to an atmospheric model it is better to represent all large water bodies 
     634(\eg\ Great Lakes, Caspian sea \dots) even if the model resolution does not allow their communication with 
     635the rest of the ocean. 
     636This is unnecessary when the ocean is forced by fixed atmospheric conditions, 
     637so these seas can be removed from the ocean domain. 
     638The user has the option to set the bathymetry in closed seas to zero (see \autoref{sec:MISC_closea}) and 
     639to optionally decide on the fate of any freshwater imbalance over the area. 
     640The options are explained in \autoref{sec:MISC_closea} but it should be noted here that 
     641a successful use of these options requires appropriate mask fields to be present in the domain configuration file. 
     642Among the possibilities are: 
     643 
     644\begin{clines} 
    631645int    closea_mask          /* non-zero values in closed sea areas for optional masking                  */ 
    632646int    closea_mask_rnf      /* non-zero values in closed sea areas with runoff locations (precip only)   */ 
    633647int    closea_mask_emp      /* non-zero values in closed sea areas with runoff locations (total emp)     */ 
    634 \end{Verbatim} 
     648\end{clines} 
    635649 
    636650% ------------------------------------------------------------------------------------------------------------- 
     
    642656\nlst{namcfg} 
    643657 
    644 Most of the arrays relating to a particular ocean model configuration dicussed in this 
    645 chapter (grid-point position, scale factors) can be saved in a file if namelist parameter 
    646 \np{ln\_write\_cfg} (namelist \ngn{namcfg}) is set to \forcode{.true.}; the output 
    647 filename is set thorugh parameter \np{cn\_domcfg\_out}. This is only really useful 
    648 if the fields are computed in subroutines \mdl{usrdef\_hgr} or \mdl{usrdef\_zgr} and 
     658Most of the arrays relating to a particular ocean model configuration discussed in this chapter 
     659(grid-point position, scale factors) 
     660can be saved in a file if 
     661namelist parameter \np{ln\_write\_cfg} (namelist \nam{cfg}) is set to \forcode{.true.}; 
     662the output filename is set through parameter \np{cn\_domcfg\_out}. 
     663This is only really useful if 
     664the fields are computed in subroutines \mdl{usrdef\_hgr} or \mdl{usrdef\_zgr} and 
    649665checking or confirmation is required. 
    650666 
     
    652668 
    653669Alternatively, all the arrays relating to a particular ocean model configuration 
    654 (grid-point position, scale factors, depths and masks) can be saved in a file called 
    655 \texttt{mesh\_mask} if namelist parameter \np{ln\_meshmask} (namelist \ngn{namdom}) is set 
    656 to \forcode{.true.}. This file contains additional fields that can be useful for 
    657 post-processing applications 
     670(grid-point position, scale factors, depths and masks) 
     671can be saved in a file called \texttt{mesh\_mask} if 
     672namelist parameter \np{ln\_meshmask} (namelist \nam{dom}) is set to \forcode{.true.}. 
     673This file contains additional fields that can be useful for post-processing applications. 
    658674 
    659675% ================================================================ 
     
    664680\label{sec:DTA_tsd} 
    665681%-----------------------------------------namtsd------------------------------------------- 
    666 \nlst{namtsd}  
     682\nlst{namtsd} 
    667683%------------------------------------------------------------------------------------------ 
    668684 
    669 Basic initial state options are defined in \ngn{namtsd}.  By default, the ocean starts 
    670 from rest (the velocity field is set to zero) and the initialization of temperature and 
    671 salinity fields is controlled through the \np{ln\_tsd\_init} namelist parameter. 
     685Basic initial state options are defined in \nam{tsd}. 
     686By default, the ocean starts from rest (the velocity field is set to zero) and 
     687the initialization of temperature and salinity fields is controlled through the \np{ln\_tsd\_init} namelist parameter. 
    672688 
    673689\begin{description} 
    674690\item[\np{ln\_tsd\_init}\forcode{= .true.}] 
    675   Use T and S input files that can be given on the model grid itself or on their native 
    676   input data grids.  In the latter case, the data will be interpolated on-the-fly both in 
    677   the horizontal and the vertical to the model grid (see \autoref{subsec:SBC_iof}).  The 
    678   information relating to the input files are specified in the \np{sn\_tem} and 
    679   \np{sn\_sal} structures.  The computation is done in the \mdl{dtatsd} module. 
     691  Use T and S input files that can be given on the model grid itself or on their native input data grids. 
     692  In the latter case, the data will be interpolated on-the-fly both in the horizontal and the vertical to the model grid 
     693  (see \autoref{subsec:SBC_iof}). 
     694  The information relating to the input files are specified in the \np{sn\_tem} and \np{sn\_sal} structures. 
     695  The computation is done in the \mdl{dtatsd} module. 
    680696\item[\np{ln\_tsd\_init}\forcode{= .false.}] 
    681   Initial values for T and S are set via a user supplied \rou{usr\_def\_istate} routine 
    682   contained in \mdl{userdef\_istate}. The default version sets horizontally uniform T and 
    683   profiles as used in the  GYRE configuration (see \autoref{sec:CFG_gyre}). 
     697  Initial values for T and S are set via a user supplied \rou{usr\_def\_istate} routine contained in \mdl{userdef\_istate}. 
     698  The default version sets horizontally uniform T and profiles as used in the GYRE configuration 
     699  (see \autoref{sec:CFG_gyre}). 
    684700\end{description} 
    685701 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_DYN.tex

    r11187 r11435  
    88\label{chap:DYN} 
    99 
    10 \minitoc 
     10\chaptertoc 
    1111 
    1212Using the representation described in \autoref{chap:DOM}, 
     
    3636(surface wind stress calculation using bulk formulae, estimation of mixing coefficients) 
    3737that are carried out in modules SBC, LDF and ZDF and are described in 
    38 \autoref{chap:SBC}, \autoref{chap:LDF} and \autoref{chap:ZDF}, respectively.  
     38\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 the horizontal divergence, 
    4141curl of the velocities (\emph{divcur} module) and the vertical velocity (\emph{wzvmod} module). 
    4242 
    43 The different options available to the user are managed by namelist variables.  
    44 For term \textit{ttt} in the momentum equations, the logical namelist variables are \textit{ln\_dynttt\_xxx},  
     43The different options available to the user are managed by namelist variables. 
     44For term \textit{ttt} in the momentum equations, the logical namelist variables are \textit{ln\_dynttt\_xxx}, 
    4545where \textit{xxx} is a 3 or 4 letter acronym corresponding to each optional scheme. 
    46 If a CPP key is used for this term its name is \key{ttt}. 
     46%If a CPP key is used for this term its name is \key{ttt}. 
    4747The corresponding code can be found in the \textit{dynttt\_xxx} module in the DYN directory, 
    4848and it is usually computed in the \textit{dyn\_ttt\_xxx} subroutine. 
    4949 
    5050The user has the option of extracting and outputting each tendency term from the 3D momentum equations 
    51 (\key{trddyn} defined), as described in \autoref{chap:MISC}. 
    52 Furthermore, the tendency terms associated with the 2D barotropic vorticity balance (when \key{trdvor} is defined) 
     51(\texttt{trddyn?} defined), as described in \autoref{chap:MISC}. 
     52Furthermore, the tendency terms associated with the 2D barotropic vorticity balance (when \texttt{trdvor?} is defined) 
    5353can be derived from the 3D terms. 
    5454%%% 
    55 \gmcomment{STEVEN: not quite sure I've got the sense of the last sentence. does  
     55\gmcomment{STEVEN: not quite sure I've got the sense of the last sentence. does 
    5656MISC correspond to "extracting tendency terms" or "vorticity balance"?} 
    5757 
     
    6969\label{subsec:DYN_divcur} 
    7070 
    71 The vorticity is defined at an $f$-point (\ie corner point) as follows: 
     71The vorticity is defined at an $f$-point (\ie\ corner point) as follows: 
    7272\begin{equation} 
    7373  \label{eq:divcur_cur} 
    7474  \zeta =\frac{1}{e_{1f}\,e_{2f} }\left( {\;\delta_{i+1/2} \left[ {e_{2v}\;v} \right] 
    7575      -\delta_{j+1/2} \left[ {e_{1u}\;u} \right]\;} \right) 
    76 \end{equation}  
     76\end{equation} 
    7777 
    7878The horizontal divergence is defined at a $T$-point. 
     
    9797ensure perfect restartability. 
    9898The vorticity and divergence at the \textit{now} time step are used for the computation of 
    99 the nonlinear advection and of the vertical velocity respectively.  
     99the nonlinear advection and of the vertical velocity respectively. 
    100100 
    101101%-------------------------------------------------------------------------------------------------------------- 
     
    117117  \end{aligned} 
    118118\end{equation} 
    119 where \textit{emp} is the surface freshwater budget (evaporation minus precipitation),  
     119where \textit{emp} is the surface freshwater budget (evaporation minus precipitation), 
    120120expressed in Kg/m$^2$/s (which is equal to mm/s), 
    121121and $\rho_w$=1,035~Kg/m$^3$ is the reference density of sea water (Boussinesq approximation). 
    122122If river runoff is expressed as a surface freshwater flux (see \autoref{chap:SBC}) then 
    123 \textit{emp} can be written as the evaporation minus precipitation, minus the river runoff.  
     123\textit{emp} can be written as the evaporation minus precipitation, minus the river runoff. 
    124124The sea-surface height is evaluated using exactly the same time stepping scheme as 
    125125the tracer equation \autoref{eq:tra_nxt}: 
    126126a leapfrog scheme in combination with an Asselin time filter, 
    127 \ie the velocity appearing in \autoref{eq:dynspg_ssh} is centred in time (\textit{now} velocity). 
     127\ie\ the velocity appearing in \autoref{eq:dynspg_ssh} is centred in time (\textit{now} velocity). 
    128128This is of paramount importance. 
    129129Replacing $T$ by the number $1$ in the tracer equation and summing over the water column must lead to 
     
    144144\end{equation} 
    145145 
    146 In the case of a non-linear free surface (\key{vvl}), the top vertical velocity is $-\textit{emp}/\rho_w$,  
     146In the case of a non-linear free surface (\texttt{vvl?}), the top vertical velocity is $-\textit{emp}/\rho_w$, 
    147147as changes in the divergence of the barotropic transport are absorbed into the change of the level thicknesses, 
    148148re-orientated downward. 
     
    151151The upper boundary condition applies at a fixed level $z=0$. 
    152152The top vertical velocity is thus equal to the divergence of the barotropic transport 
    153 (\ie the first term in the right-hand-side of \autoref{eq:dynspg_ssh}). 
     153(\ie\ the first term in the right-hand-side of \autoref{eq:dynspg_ssh}). 
    154154 
    155155Note also that whereas the vertical velocity has the same discrete expression in $z$- and $s$-coordinates, 
     
    158158Note also that the $k$-axis is re-orientated downwards in the \fortran code compared to 
    159159the indexing used in the semi-discrete equations such as \autoref{eq:wzv} 
    160 (see \autoref{subsec:DOM_Num_Index_vertical}).  
     160(see \autoref{subsec:DOM_Num_Index_vertical}). 
    161161 
    162162 
     
    168168%-----------------------------------------nam_dynadv---------------------------------------------------- 
    169169 
    170 \nlst{namdyn_adv}  
     170\nlst{namdyn_adv} 
    171171%------------------------------------------------------------------------------------------------------------- 
    172172 
    173173The vector invariant form of the momentum equations is the one most often used in 
    174 applications of the \NEMO ocean model. 
     174applications of the \NEMO\ ocean model. 
    175175The flux form option (see next section) has been present since version $2$. 
    176 Options are defined through the \ngn{namdyn\_adv} namelist variables Coriolis and 
     176Options are defined through the \nam{dyn\_adv} namelist variables Coriolis and 
    177177momentum advection terms are evaluated using a leapfrog scheme, 
    178 \ie the velocity appearing in these expressions is centred in time (\textit{now} velocity).  
     178\ie\ the velocity appearing in these expressions is centred in time (\textit{now} velocity). 
    179179At the lateral boundaries either free slip, no slip or partial slip boundary conditions are applied following 
    180180\autoref{chap:LBC}. 
    181181 
    182182% ------------------------------------------------------------------------------------------------------------- 
    183 %        Vorticity term  
     183%        Vorticity term 
    184184% ------------------------------------------------------------------------------------------------------------- 
    185185\subsection[Vorticity term (\textit{dynvor.F90})] 
     
    188188%------------------------------------------nam_dynvor---------------------------------------------------- 
    189189 
    190 \nlst{namdyn_vor}  
     190\nlst{namdyn_vor} 
    191191%------------------------------------------------------------------------------------------------------------- 
    192192 
    193 Options are defined through the \ngn{namdyn\_vor} namelist variables. 
    194 Four discretisations of the vorticity term (\np{ln\_dynvor\_xxx}\forcode{ = .true.}) are available: 
     193Options are defined through the \nam{dyn\_vor} namelist variables. 
     194Four discretisations of the vorticity term (\texttt{ln\_dynvor\_xxx}\forcode{ = .true.}) are available: 
    195195conserving potential enstrophy of horizontally non-divergent flow (ENS scheme); 
    196196conserving horizontal kinetic energy (ENE scheme); 
     
    212212In the enstrophy conserving case (ENS scheme), 
    213213the discrete formulation of the vorticity term provides a global conservation of the enstrophy 
    214 ($ [ (\zeta +f ) / e_{3f} ]^2 $ in $s$-coordinates) for a horizontally non-divergent flow (\ie $\chi$=$0$), 
     214($ [ (\zeta +f ) / e_{3f} ]^2 $ in $s$-coordinates) for a horizontally non-divergent flow (\ie\ $\chi$=$0$), 
    215215but does not conserve the total kinetic energy. 
    216216It is given by: 
     
    225225    \end{aligned} 
    226226  \right. 
    227 \end{equation}  
     227\end{equation} 
    228228 
    229229%------------------------------------------------------------- 
     
    246246    \end{aligned} 
    247247  \right. 
    248 \end{equation}  
     248\end{equation} 
    249249 
    250250%------------------------------------------------------------- 
     
    285285the presence of grid point oscillation structures that will be invisible to the operator. 
    286286These structures are \textit{computational modes} that will be at least partly damped by 
    287 the momentum diffusion operator (\ie the subgrid-scale advection), but not by the resolved advection term. 
     287the momentum diffusion operator (\ie\ the subgrid-scale advection), but not by the resolved advection term. 
    288288The ENS and ENE schemes therefore do not contribute to dump any grid point noise in the horizontal velocity field. 
    289289Such noise would result in more noise in the vertical velocity field, an undesirable feature. 
     
    291291$u$ and $v$ are located at different grid points, 
    292292a price worth paying to avoid a double averaging in the pressure gradient term as in the $B$-grid. 
    293 \gmcomment{ To circumvent this, Adcroft (ADD REF HERE)  
     293\gmcomment{ To circumvent this, Adcroft (ADD REF HERE) 
    294294Nevertheless, this technique strongly distort the phase and group velocity of Rossby waves....} 
    295295 
     
    299299\citep{griffies.gnanadesikan.ea_JPO98} for the discretization of the iso-neutral diffusion operator (see \autoref{apdx:C}). 
    300300 
    301 The \citet{arakawa.hsu_MWR90} vorticity advection scheme for a single layer is modified  
    302 for spherical coordinates as described by \citet{arakawa.lamb_MWR81} to obtain the EEN scheme.  
    303 First consider the discrete expression of the potential vorticity, $q$, defined at an $f$-point:  
     301The \citet{arakawa.hsu_MWR90} vorticity advection scheme for a single layer is modified 
     302for spherical coordinates as described by \citet{arakawa.lamb_MWR81} to obtain the EEN scheme. 
     303First consider the discrete expression of the potential vorticity, $q$, defined at an $f$-point: 
    304304\[ 
    305305  % \label{eq:pot_vor} 
     
    307307\] 
    308308where the relative vorticity is defined by (\autoref{eq:divcur_cur}), 
    309 the Coriolis parameter is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is:  
     309the Coriolis parameter is given by $f=2 \,\Omega \;\sin \varphi _f $ and the layer thickness at $f$-points is: 
    310310\begin{equation} 
    311311  \label{eq:een_e3f} 
     
    326326% >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    327327 
    328 A key point in \autoref{eq:een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made.  
     328A key point in \autoref{eq:een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made. 
    329329It uses the sum of masked t-point vertical scale factor divided either by the sum of the four t-point masks 
    330330(\np{nn\_een\_e3f}\forcode{ = 1}), or just by $4$ (\np{nn\_een\_e3f}\forcode{ = .true.}). 
     
    334334(with a systematic reduction of $e_{3f}$ when a model level intercept the bathymetry) 
    335335that tends to reinforce the topostrophy of the flow 
    336 (\ie the tendency of the flow to follow the isobaths) \citep{penduff.le-sommer.ea_OS07}.  
     336(\ie\ the tendency of the flow to follow the isobaths) \citep{penduff.le-sommer.ea_OS07}. 
    337337 
    338338Next, the vorticity triads, $ {^i_j}\mathbb{Q}^{i_p}_{j_p}$ can be defined at a $T$-point as 
    339339the following triad combinations of the neighbouring potential vorticities defined at f-points 
    340 (\autoref{fig:DYN_een_triad}):  
     340(\autoref{fig:DYN_een_triad}): 
    341341\begin{equation} 
    342342  \label{eq:Q_triads} 
     
    344344  = \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) 
    345345\end{equation} 
    346 where the indices $i_p$ and $k_p$ take the values: $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$.  
    347  
    348 Finally, the vorticity terms are represented as:  
     346where the indices $i_p$ and $k_p$ take the values: $i_p = -1/2$ or $1/2$ and $j_p = -1/2$ or $1/2$. 
     347 
     348Finally, the vorticity terms are represented as: 
    349349\begin{equation} 
    350350  \label{eq:dynvor_een} 
     
    357357      \end{aligned} 
    358358    } \right. 
    359 \end{equation}  
     359\end{equation} 
    360360 
    361361This EEN scheme in fact combines the conservation properties of the ENS and ENE schemes. 
    362362It conserves both total energy and potential enstrophy in the limit of horizontally nondivergent flow 
    363 (\ie $\chi$=$0$) (see \autoref{subsec:C_vorEEN}).  
     363(\ie\ $\chi$=$0$) (see \autoref{subsec:C_vorEEN}). 
    364364Applied to a realistic ocean configuration, it has been shown that it leads to a significant reduction of 
    365365the noise in the vertical velocity field \citep{le-sommer.penduff.ea_OM09}. 
    366366Furthermore, used in combination with a partial steps representation of bottom topography, 
    367367it improves the interaction between current and topography, 
    368 leading to a larger topostrophy of the flow \citep{barnier.madec.ea_OD06, penduff.le-sommer.ea_OS07}.  
     368leading to a larger topostrophy of the flow \citep{barnier.madec.ea_OD06, penduff.le-sommer.ea_OS07}. 
    369369 
    370370%-------------------------------------------------------------------------------------------------------------- 
     
    412412When \np{ln\_dynzad\_zts}\forcode{ = .true.}, 
    413413a split-explicit time stepping with 5 sub-timesteps is used on the vertical advection term. 
    414 This option can be useful when the value of the timestep is limited by vertical advection \citep{lemarie.debreu.ea_OM15}.  
     414This option can be useful when the value of the timestep is limited by vertical advection \citep{lemarie.debreu.ea_OM15}. 
    415415Note that in this case, 
    416416a similar split-explicit time stepping should be used on vertical advection of tracer to ensure a better stability, 
     
    425425%------------------------------------------nam_dynadv---------------------------------------------------- 
    426426 
    427 \nlst{namdyn_adv}  
     427\nlst{namdyn_adv} 
    428428%------------------------------------------------------------------------------------------------------------- 
    429429 
    430 Options are defined through the \ngn{namdyn\_adv} namelist variables. 
     430Options are defined through the \nam{dyn\_adv} namelist variables. 
    431431In the flux form (as in the vector invariant form), 
    432432the Coriolis and momentum advection terms are evaluated using a leapfrog scheme, 
    433 \ie the velocity appearing in their expressions is centred in time (\textit{now} velocity). 
     433\ie\ the velocity appearing in their expressions is centred in time (\textit{now} velocity). 
    434434At the lateral boundaries either free slip, 
    435435no slip or partial slip boundary conditions are applied following \autoref{chap:LBC}. 
     
    445445In flux form, the vorticity term reduces to a Coriolis term in which the Coriolis parameter has been modified to account for the "metric" term. 
    446446This altered Coriolis parameter is thus discretised at $f$-points. 
    447 It is given by:  
     447It is given by: 
    448448\begin{multline*} 
    449449  % \label{eq:dyncor_metric} 
     
    451451  \equiv   f + \frac{1}{e_{1f} e_{2f} } \left( { \ \overline v ^{i+1/2}\delta_{i+1/2} \left[ {e_{2u} } \right] 
    452452      -  \overline u ^{j+1/2}\delta_{j+1/2} \left[ {e_{1u} } \right]  }  \ \right) 
    453 \end{multline*}  
     453\end{multline*} 
    454454 
    455455Any of the (\autoref{eq:dynvor_ens}), (\autoref{eq:dynvor_ene}) and (\autoref{eq:dynvor_een}) schemes can be used to 
    456456compute the product of the Coriolis parameter and the vorticity. 
    457457However, the energy-conserving scheme (\autoref{eq:dynvor_een}) has exclusively been used to date. 
    458 This term is evaluated using a leapfrog scheme, \ie the velocity is centred in time (\textit{now} velocity). 
     458This term is evaluated using a leapfrog scheme, \ie\ the velocity is centred in time (\textit{now} velocity). 
    459459 
    460460%-------------------------------------------------------------------------------------------------------------- 
     
    487487or a $3^{rd}$ order upstream biased scheme, UBS. 
    488488The latter is described in \citet{shchepetkin.mcwilliams_OM05}. 
    489 The schemes are selected using the namelist logicals \np{ln\_dynadv\_cen2} and \np{ln\_dynadv\_ubs}.  
     489The schemes are selected using the namelist logicals \np{ln\_dynadv\_cen2} and \np{ln\_dynadv\_ubs}. 
    490490In flux form, the schemes differ by the choice of a space and time interpolation to define the value of 
    491 $u$ and $v$ at the centre of each face of $u$- and $v$-cells, \ie at the $T$-, $f$-, 
    492 and $uw$-points for $u$ and at the $f$-, $T$- and $vw$-points for $v$.  
     491$u$ and $v$ at the centre of each face of $u$- and $v$-cells, \ie\ at the $T$-, $f$-, 
     492and $uw$-points for $u$ and at the $f$-, $T$- and $vw$-points for $v$. 
    493493 
    494494%------------------------------------------------------------- 
     
    508508    \end{aligned} 
    509509  \right. 
    510 \end{equation}  
    511  
    512 The scheme is non diffusive (\ie conserves the kinetic energy) but dispersive (\ie it may create false extrema). 
     510\end{equation} 
     511 
     512The scheme is non diffusive (\ie\ conserves the kinetic energy) but dispersive (\ie\ it may create false extrema). 
    513513It is therefore notoriously noisy and must be used in conjunction with an explicit diffusion operator to 
    514514produce a sensible solution. 
     
    535535\end{equation} 
    536536where $u"_{i+1/2} =\delta_{i+1/2} \left[ {\delta_i \left[ u \right]} \right]$. 
    537 This results in a dissipatively dominant (\ie hyper-diffusive) truncation error 
     537This results in a dissipatively dominant (\ie\ hyper-diffusive) truncation error 
    538538\citep{shchepetkin.mcwilliams_OM05}. 
    539539The overall performance of the advection scheme is similar to that reported in \citet{farrow.stevens_JPO95}. 
     
    541541It is not a \emph{positive} scheme, meaning that false extrema are permitted. 
    542542But the amplitudes of the false extrema are significantly reduced over those in the centred second order method. 
    543 As the scheme already includes a diffusion component, it can be used without explicit lateral diffusion on momentum  
    544 (\ie \np{ln\_dynldf\_lap}\forcode{ = }\np{ln\_dynldf\_bilap}\forcode{ = .false.}), 
     543As the scheme already includes a diffusion component, it can be used without explicit lateral diffusion on momentum 
     544(\ie\ \np{ln\_dynldf\_lap}\forcode{ = }\np{ln\_dynldf\_bilap}\forcode{ = .false.}), 
    545545and it is recommended to do so. 
    546546 
    547547The UBS scheme is not used in all directions. 
    548 In the vertical, the centred $2^{nd}$ order evaluation of the advection is preferred, \ie $u_{uw}^{ubs}$ and 
     548In the vertical, the centred $2^{nd}$ order evaluation of the advection is preferred, \ie\ $u_{uw}^{ubs}$ and 
    549549$u_{vw}^{ubs}$ in \autoref{eq:dynadv_cen2} are used. 
    550 UBS is diffusive and is associated with vertical mixing of momentum. \gmcomment{ gm  pursue the  
     550UBS is diffusive and is associated with vertical mixing of momentum. \gmcomment{ gm  pursue the 
    551551sentence:Since vertical mixing of momentum is a source term of the TKE equation...  } 
    552552 
     
    578578%------------------------------------------nam_dynhpg--------------------------------------------------- 
    579579 
    580 \nlst{namdyn_hpg}  
     580\nlst{namdyn_hpg} 
    581581%------------------------------------------------------------------------------------------------------------- 
    582582 
    583 Options are defined through the \ngn{namdyn\_hpg} namelist variables. 
     583Options are defined through the \nam{dyn\_hpg} namelist variables. 
    584584The key distinction between the different algorithms used for 
    585585the hydrostatic pressure gradient is the vertical coordinate used, 
    586 since HPG is a \emph{horizontal} pressure gradient, \ie computed along geopotential surfaces. 
     586since HPG is a \emph{horizontal} pressure gradient, \ie\ computed along geopotential surfaces. 
    587587As a result, any tilt of the surface of the computational levels will require a specific treatment to 
    588588compute the hydrostatic pressure gradient. 
    589589 
    590590The hydrostatic pressure gradient term is evaluated either using a leapfrog scheme, 
    591 \ie the density appearing in its expression is centred in time (\emph{now} $\rho$), 
     591\ie\ the density appearing in its expression is centred in time (\emph{now} $\rho$), 
    592592or a semi-implcit scheme. 
    593593At the lateral boundaries either free slip, no slip or partial slip boundary conditions are applied. 
     
    616616    \end{aligned} 
    617617  \right. 
    618 \end{equation}  
     618\end{equation} 
    619619 
    620620for $1<k<km$ (interior layer) 
     
    631631    \end{aligned} 
    632632  \right. 
    633 \end{equation}  
     633\end{equation} 
    634634 
    635635Note that the $1/2$ factor in (\autoref{eq:dynhpg_zco_surf}) is adequate because of the definition of $e_{3w}$ as 
    636636the vertical derivative of the scale factor at the surface level ($z=0$). 
    637 Note also that in case of variable volume level (\key{vvl} defined), 
     637Note also that in case of variable volume level (\texttt{vvl?} defined), 
    638638the surface pressure gradient is included in \autoref{eq:dynhpg_zco_surf} and 
    639639\autoref{eq:dynhpg_zco} through the space and time variations of the vertical scale factor $e_{3w}$. 
     
    649649Before taking horizontal gradients between these tracer points, 
    650650a linear interpolation is used to approximate the deeper tracer as if 
    651 it actually lived at the depth of the shallower tracer point.  
     651it actually lived at the depth of the shallower tracer point. 
    652652 
    653653Apart from this modification, 
     
    668668 
    669669Pressure gradient formulations in an $s$-coordinate have been the subject of a vast number of papers 
    670 (\eg, \citet{song_MWR98, shchepetkin.mcwilliams_OM05}).  
     670(\eg, \citet{song_MWR98, shchepetkin.mcwilliams_OM05}). 
    671671A number of different pressure gradient options are coded but the ROMS-like, 
    672672density Jacobian with cubic polynomial method is currently disabled whilst known bugs are under investigation. 
     
    683683    \end{aligned} 
    684684  \right. 
    685 \end{equation}  
     685\end{equation} 
    686686 
    687687Where the first term is the pressure gradient along coordinates, 
    688688computed as in \autoref{eq:dynhpg_zco_surf} - \autoref{eq:dynhpg_zco}, 
    689 and $z_T$ is the depth of the $T$-point evaluated from the sum of the vertical scale factors at the $w$-point  
     689and $z_T$ is the depth of the $T$-point evaluated from the sum of the vertical scale factors at the $w$-point 
    690690($e_{3w}$). 
    691   
     691 
    692692$\bullet$ Traditional coding with adaptation for ice shelf cavities (\np{ln\_dynhpg\_isf}\forcode{ = .true.}). 
    693693This scheme need the activation of ice shelf cavities (\np{ln\_isfcav}\forcode{ = .true.}). 
     
    695695$\bullet$ Pressure Jacobian scheme (prj) (a research paper in preparation) (\np{ln\_dynhpg\_prj}\forcode{ = .true.}) 
    696696 
    697 $\bullet$ Density Jacobian with cubic polynomial scheme (DJC) \citep{shchepetkin.mcwilliams_OM05}  
     697$\bullet$ Density Jacobian with cubic polynomial scheme (DJC) \citep{shchepetkin.mcwilliams_OM05} 
    698698(\np{ln\_dynhpg\_djc}\forcode{ = .true.}) (currently disabled; under development) 
    699699 
    700700Note that expression \autoref{eq:dynhpg_sco} is commonly used when the variable volume formulation is activated 
    701 (\key{vvl}) because in that case, even with a flat bottom, 
     701(\texttt{vvl?}) because in that case, even with a flat bottom, 
    702702the coordinate surfaces are not horizontal but follow the free surface \citep{levier.treguier.ea_rpt07}. 
    703703The pressure jacobian scheme (\np{ln\_dynhpg\_prj}\forcode{ = .true.}) is available as 
    704 an improved option to \np{ln\_dynhpg\_sco}\forcode{ = .true.} when \key{vvl} is active. 
     704an improved option to \np{ln\_dynhpg\_sco}\forcode{ = .true.} when \texttt{vvl?} is active. 
    705705The pressure Jacobian scheme uses a constrained cubic spline to 
    706706reconstruct the density profile across the water column. 
     
    723723 
    724724The pressure gradient due to ocean load is computed using the expression \autoref{eq:dynhpg_sco} described in 
    725 \autoref{subsec:DYN_hpg_sco}.  
     725\autoref{subsec:DYN_hpg_sco}. 
    726726 
    727727%-------------------------------------------------------------------------------------------------------------- 
     
    742742It involves the evaluation of the hydrostatic pressure gradient as 
    743743an average over the three time levels $t-\rdt$, $t$, and $t+\rdt$ 
    744 (\ie \textit{before}, \textit{now} and  \textit{after} time-steps), 
    745 rather than at the central time level $t$ only, as in the standard leapfrog scheme.  
     744(\ie\ \textit{before}, \textit{now} and  \textit{after} time-steps), 
     745rather than at the central time level $t$ only, as in the standard leapfrog scheme. 
    746746 
    747747$\bullet$ leapfrog scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}): 
     
    795795%-----------------------------------------nam_dynspg---------------------------------------------------- 
    796796 
    797 \nlst{namdyn_spg}  
     797\nlst{namdyn_spg} 
    798798%------------------------------------------------------------------------------------------------------------ 
    799799 
    800 Options are defined through the \ngn{namdyn\_spg} namelist variables. 
     800Options are defined through the \nam{dyn\_spg} namelist variables. 
    801801The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:PE_hor_pg}). 
    802802The main distinction is between the fixed volume case (linear free surface) and 
    803 the variable volume case (nonlinear free surface, \key{vvl} is defined). 
     803the variable volume case (nonlinear free surface, \texttt{vvl?} is defined). 
    804804In the linear free surface case (\autoref{subsec:PE_free_surface}) 
    805805the vertical scale factors $e_{3}$ are fixed in time, 
    806806while they are time-dependent in the nonlinear case (\autoref{subsec:PE_free_surface}). 
    807 With both linear and nonlinear free surface, external gravity waves are allowed in the equations,  
     807With both linear and nonlinear free surface, external gravity waves are allowed in the equations, 
    808808which imposes a very small time step when an explicit time stepping is used. 
    809 Two methods are proposed to allow a longer time step for the three-dimensional equations:  
    810 the filtered free surface, which is a modification of the continuous equations (see \autoref{eq:PE_flt?}),  
     809Two methods are proposed to allow a longer time step for the three-dimensional equations: 
     810the filtered free surface, which is a modification of the continuous equations (see \autoref{eq:PE_flt?}), 
    811811and the split-explicit free surface described below. 
    812 The extra term introduced in the filtered method is calculated implicitly,  
     812The extra term introduced in the filtered method is calculated implicitly, 
    813813so that the update of the next velocities is done in module \mdl{dynspg\_flt} and not in \mdl{dynnxt}. 
    814814 
     
    819819an explicit formulation which requires a small time step; 
    820820a filtered free surface formulation which allows a larger time step by 
    821 adding a filtering term into the momentum equation;  
     821adding a filtering term into the momentum equation; 
    822822and a split-explicit free surface formulation, described below, which also allows a larger time step. 
    823823 
     
    829829% Explicit free surface formulation 
    830830%-------------------------------------------------------------------------------------------------------------- 
    831 \subsection[Explicit free surface (\texttt{\textbf{key\_dynspg\_exp}})] 
    832 {Explicit free surface (\protect\key{dynspg\_exp})} 
     831\subsection[Explicit free surface (\texttt{ln\_dynspg\_exp}\forcode{ = .true.})] 
     832{Explicit free surface (\protect\np{ln\_dynspg\_exp}\forcode{ = .true.})} 
    833833\label{subsec:DYN_spg_exp} 
    834834 
    835 In the explicit free surface formulation (\key{dynspg\_exp} defined), 
     835In the explicit free surface formulation (\np{ln\_dynspg\_exp} set to true), 
    836836the model time step is chosen to be small enough to resolve the external gravity waves 
    837837(typically a few tens of seconds). 
    838 The surface pressure gradient, evaluated using a leap-frog scheme (\ie centered in time), 
     838The surface pressure gradient, evaluated using a leap-frog scheme (\ie\ centered in time), 
    839839is thus simply given by : 
    840840\begin{equation} 
     
    846846    \end{aligned} 
    847847  \right. 
    848 \end{equation}  
    849  
    850 Note that in the non-linear free surface case (\ie \key{vvl} defined), 
     848\end{equation} 
     849 
     850Note that in the non-linear free surface case (\ie\ \texttt{vvl?} defined), 
    851851the surface pressure gradient is already included in the momentum tendency through 
    852852the level thickness variation allowed in the computation of the hydrostatic pressure gradient. 
     
    856856% Split-explict free surface formulation 
    857857%-------------------------------------------------------------------------------------------------------------- 
    858 \subsection[Split-explicit free surface (\texttt{\textbf{key\_dynspg\_ts}})] 
    859 {Split-explicit free surface (\protect\key{dynspg\_ts})} 
     858\subsection[Split-explicit free surface (\texttt{ln\_dynspg\_ts}\forcode{ = .true.})] 
     859{Split-explicit free surface (\protect\np{ln\_dynspg\_ts}\forcode{ = .true.})} 
    860860\label{subsec:DYN_spg_ts} 
    861861%------------------------------------------namsplit----------------------------------------------------------- 
     
    864864%------------------------------------------------------------------------------------------------------------- 
    865865 
    866 The split-explicit free surface formulation used in \NEMO (\key{dynspg\_ts} defined), 
     866The split-explicit free surface formulation used in \NEMO\ (\np{ln\_dynspg\_ts} set to true), 
    867867also called the time-splitting formulation, follows the one proposed by \citet{shchepetkin.mcwilliams_OM05}. 
    868868The general idea is to solve the free surface equation and the associated barotropic velocity equations with 
     
    897897Temporal discretization of the system above follows a three-time step Generalized Forward Backward algorithm 
    898898detailed in \citet{shchepetkin.mcwilliams_OM05}. 
    899 AB3-AM4 coefficients used in \NEMO follow the second-order accurate, 
     899AB3-AM4 coefficients used in \NEMO\ follow the second-order accurate, 
    900900"multi-purpose" stability compromise as defined in \citet{shchepetkin.mcwilliams_ibk09} 
    901 (see their figure 12, lower left).  
     901(see their figure 12, lower left). 
    902902 
    903903%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   > 
     
    935935provide time filtered quantities. 
    936936These are used for the subsequent initialization of the barotropic mode in the following baroclinic step. 
    937 Since external mode equations written at baroclinic time steps finally follow a forward time stepping scheme,  
     937Since external mode equations written at baroclinic time steps finally follow a forward time stepping scheme, 
    938938asselin filtering is not applied to barotropic quantities.\\ 
    939939Alternatively, one can choose to integrate barotropic equations starting from \textit{before} time step 
     
    963963 
    964964One can eventually choose to feedback instantaneous values by not using any time filter 
    965 (\np{ln\_bt\_av}\forcode{ = .false.}).  
     965(\np{ln\_bt\_av}\forcode{ = .false.}). 
    966966In that case, external mode equations are continuous in time, 
    967 \ie they are not re-initialized when starting a new sub-stepping sequence. 
     967\ie\ they are not re-initialized when starting a new sub-stepping sequence. 
    968968This is the method used so far in the POM model, the stability being maintained by 
    969969refreshing at (almost) each barotropic time step advection and horizontal diffusion terms. 
    970 Since the latter terms have not been added in \NEMO for computational efficiency, 
     970Since the latter terms have not been added in \NEMO\ for computational efficiency, 
    971971removing time filtering is not recommended except for debugging purposes. 
    972972This may be used for instance to appreciate the damping effect of the standard formulation on 
     
    976976 
    977977%>>>>>=============== 
    978 \gmcomment{               %%% copy from griffies Book  
     978\gmcomment{               %%% copy from griffies Book 
    979979 
    980980\textbf{title: Time stepping the barotropic system } 
     
    983983Hence, we can update the surface height and vertically integrated velocity with a leap-frog scheme using 
    984984the small barotropic time step $\rdt$. 
    985 We have  
     985We have 
    986986 
    987987\[ 
     
    10061006and total depth of the ocean $H(\tau)$ are held for the duration of the barotropic time stepping over 
    10071007a single cycle. 
    1008 This is also the time that sets the barotropic time steps via  
     1008This is also the time that sets the barotropic time steps via 
    10091009\[ 
    10101010  % \label{eq:DYN_spg_ts_t} 
     
    10121012\] 
    10131013with $n$ an integer. 
    1014 The density scaled surface pressure is evaluated via  
     1014The density scaled surface pressure is evaluated via 
    10151015\[ 
    10161016  % \label{eq:DYN_spg_ts_ps} 
     
    10211021  \end{cases} 
    10221022\] 
    1023 To get started, we assume the following initial conditions  
     1023To get started, we assume the following initial conditions 
    10241024\[ 
    10251025  % \label{eq:DYN_spg_ts_eta} 
     
    10291029  \end{split} 
    10301030\] 
    1031 with  
     1031with 
    10321032\[ 
    10331033  % \label{eq:DYN_spg_ts_etaF} 
     
    10351035\] 
    10361036the time averaged surface height taken from the previous barotropic cycle. 
    1037 Likewise,  
     1037Likewise, 
    10381038\[ 
    10391039  % \label{eq:DYN_spg_ts_u} 
     
    10411041  \textbf{U}(\tau,t_{n=1}) = \textbf{U}^{(b)}(\tau,t_{n=0}) + \rdt \ \text{RHS}_{n=0} 
    10421042\] 
    1043 with  
     1043with 
    10441044\[ 
    10451045  % \label{eq:DYN_spg_ts_u} 
     
    10471047\] 
    10481048the time averaged vertically integrated transport. 
    1049 Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration.  
     1049Notably, there is no Robert-Asselin time filter used in the barotropic portion of the integration. 
    10501050 
    10511051Upon reaching $t_{n=N} = \tau + 2\rdt \tau$ , 
    10521052the vertically integrated velocity is time averaged to produce the updated vertically integrated velocity at 
    1053 baroclinic time $\tau + \rdt \tau$  
     1053baroclinic time $\tau + \rdt \tau$ 
    10541054\[ 
    10551055  % \label{eq:DYN_spg_ts_u} 
     
    10571057\] 
    10581058The surface height on the new baroclinic time step is then determined via a baroclinic leap-frog using 
    1059 the following form  
     1059the following form 
    10601060 
    10611061\begin{equation} 
    10621062  \label{eq:DYN_spg_ts_ssh} 
    1063   \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\rdt \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right]   
     1063  \eta(\tau+\Delta) - \eta^{F}(\tau-\Delta) = 2\rdt \ \left[ - \nabla \cdot \textbf{U}(\tau) + \text{EMP}_w \right] 
    10641064\end{equation} 
    10651065 
    10661066The use of this "big-leap-frog" scheme for the surface height ensures compatibility between 
    10671067the mass/volume budgets and the tracer budgets. 
    1068 More discussion of this point is provided in Chapter 10 (see in particular Section 10.2).  
    1069   
     1068More discussion of this point is provided in Chapter 10 (see in particular Section 10.2). 
     1069 
    10701070In general, some form of time filter is needed to maintain integrity of the surface height field due to 
    10711071the leap-frog splitting mode in equation \autoref{eq:DYN_spg_ts_ssh}. 
     
    10781078  \eta^{F}(\tau-\Delta) =  \overline{\eta^{(b)}(\tau)} 
    10791079\end{equation} 
    1080 Another approach tried was  
     1080Another approach tried was 
    10811081 
    10821082\[ 
     
    10911091eliminating tracer and surface height time filtering (see ?? for more complete discussion). 
    10921092However, in the general case with a non-zero $\alpha$, 
    1093 the filter \autoref{eq:DYN_spg_ts_sshf} was found to be more conservative, and so is recommended.  
     1093the filter \autoref{eq:DYN_spg_ts_sshf} was found to be more conservative, and so is recommended. 
    10941094 
    10951095}            %%end gm comment (copy of griffies book) 
     
    11011101% Filtered free surface formulation 
    11021102%-------------------------------------------------------------------------------------------------------------- 
    1103 \subsection[Filtered free surface (\texttt{\textbf{key\_dynspg\_flt}})] 
    1104 {Filtered free surface (\protect\key{dynspg\_flt})} 
     1103\subsection[Filtered free surface (\texttt{dynspg\_flt?})] 
     1104{Filtered free surface (\protect\texttt{dynspg\_flt?})} 
    11051105\label{subsec:DYN_spg_fltp} 
    11061106 
    1107 The filtered formulation follows the \citet{roullet.madec_JGR00} implementation.  
    1108 The extra term introduced in the equations (see \autoref{subsec:PE_free_surface}) is solved implicitly.  
     1107The filtered formulation follows the \citet{roullet.madec_JGR00} implementation. 
     1108The extra term introduced in the equations (see \autoref{subsec:PE_free_surface}) is solved implicitly. 
    11091109The elliptic solvers available in the code are documented in \autoref{chap:MISC}. 
    11101110 
    11111111%% gm %%======>>>>   given here the discrete eqs provided to the solver 
    1112 \gmcomment{               %%% copy from chap-model basics  
     1112\gmcomment{               %%% copy from chap-model basics 
    11131113  \[ 
    11141114    % \label{eq:spg_flt} 
     
    11231123}   %end gmcomment 
    11241124 
    1125 Note that in the linear free surface formulation (\key{vvl} not defined), 
     1125Note that in the linear free surface formulation (\texttt{vvl?} not defined), 
    11261126the ocean depth is time-independent and so is the matrix to be inverted. 
    1127 It is computed once and for all and applies to all ocean time steps.  
     1127It is computed once and for all and applies to all ocean time steps. 
    11281128 
    11291129% ================================================================ 
     
    11351135%------------------------------------------nam_dynldf---------------------------------------------------- 
    11361136 
    1137 \nlst{namdyn_ldf}  
     1137\nlst{namdyn_ldf} 
    11381138%------------------------------------------------------------------------------------------------------------- 
    11391139 
    1140 Options are defined through the \ngn{namdyn\_ldf} namelist variables. 
     1140Options are defined through the \nam{dyn\_ldf} namelist variables. 
    11411141The options available for lateral diffusion are to use either laplacian (rotated or not) or biharmonic operators. 
    11421142The coefficients may be constant or spatially variable; 
    11431143the description of the coefficients is found in the chapter on lateral physics (\autoref{chap:LDF}). 
    11441144The lateral diffusion of momentum is evaluated using a forward scheme, 
    1145 \ie the velocity appearing in its expression is the \textit{before} velocity in time, 
     1145\ie\ the velocity appearing in its expression is the \textit{before} velocity in time, 
    11461146except for the pure vertical component that appears when a tensor of rotation is used. 
    11471147This latter term is solved implicitly together with the vertical diffusion term (see \autoref{chap:STP}). 
     
    11591159  In finite difference methods, 
    11601160  the biharmonic operator is frequently the method of choice to achieve this scale selective dissipation since 
    1161   its damping time (\ie its spin down time) scale like $\lambda^{-4}$ for disturbances of wavelength $\lambda$ 
     1161  its damping time (\ie\ its spin down time) scale like $\lambda^{-4}$ for disturbances of wavelength $\lambda$ 
    11621162  (so that short waves damped more rapidelly than long ones), 
    11631163  whereas the Laplace operator damping time scales only like $\lambda^{-2}$. 
     
    11691169\label{subsec:DYN_ldf_lap} 
    11701170 
    1171 For lateral iso-level diffusion, the discrete operator is:  
     1171For lateral iso-level diffusion, the discrete operator is: 
    11721172\begin{equation} 
    11731173  \label{eq:dynldf_lap} 
     
    11751175    \begin{aligned} 
    11761176      D_u^{l{\mathrm {\mathbf U}}} =\frac{1}{e_{1u} }\delta_{i+1/2} \left[ {A_T^{lm} 
    1177           \;\chi } \right]-\frac{1}{e_{2u} {\kern 1pt}e_{3u} }\delta_j \left[  
     1177          \;\chi } \right]-\frac{1}{e_{2u} {\kern 1pt}e_{3u} }\delta_j \left[ 
    11781178        {A_f^{lm} \;e_{3f} \zeta } \right] \\ \\ 
    11791179      D_v^{l{\mathrm {\mathbf U}}} =\frac{1}{e_{2v} }\delta_{j+1/2} \left[ {A_T^{lm} 
    1180           \;\chi } \right]+\frac{1}{e_{1v} {\kern 1pt}e_{3v} }\delta_i \left[  
     1180          \;\chi } \right]+\frac{1}{e_{1v} {\kern 1pt}e_{3v} }\delta_i \left[ 
    11811181        {A_f^{lm} \;e_{3f} \zeta } \right] 
    11821182    \end{aligned} 
    11831183  \right. 
    1184 \end{equation}  
     1184\end{equation} 
    11851185 
    11861186As explained in \autoref{subsec:PE_ldf}, 
    11871187this formulation (as the gradient of a divergence and curl of the vorticity) preserves symmetry and 
    1188 ensures a complete separation between the vorticity and divergence parts of the momentum diffusion.  
     1188ensures a complete separation between the vorticity and divergence parts of the momentum diffusion. 
    11891189 
    11901190%-------------------------------------------------------------------------------------------------------------- 
     
    12301230                -e_{2f} \; r_{1f} \,\overline{\overline {\delta_{k+1/2}[v]}}^{\,i+1/2,\,k}} 
    12311231            \right)} \right]}    \right. \\ 
    1232     & \qquad +\ \delta_j \left[ {A_T^{lm} \left( {\frac{e_{1t}\,e_{3t} }{e_{2t}  
     1232    & \qquad +\ \delta_j \left[ {A_T^{lm} \left( {\frac{e_{1t}\,e_{3t} }{e_{2t} 
    12331233            }\,\delta_{j} [v] - e_{1t}\, r_{2t} 
    12341234            \,\overline{\overline {\delta_{k+1/2} [v]}} ^{\,j,\,k}} 
    12351235        \right)} \right] \\ 
    1236     & \qquad +\ \delta_k \left[ {A_{vw}^{lm} \left( {-e_{2v} \, r_{1vw} \,\overline{\overline  
     1236    & \qquad +\ \delta_k \left[ {A_{vw}^{lm} \left( {-e_{2v} \, r_{1vw} \,\overline{\overline 
    12371237              {\delta_{i+1/2} [v]}}^{\,i+1/2,\,k+1/2} }\right.} \right. \\ 
    12381238    &  \ \qquad \qquad \qquad \quad\ 
    12391239    - e_{1v} \, r_{2vw} \,\overline{\overline {\delta_{j+1/2} [v]}} ^{\,j+1/2,\,k+1/2} \\ 
    1240     & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\  
     1240    & \left. {\left. { \ \qquad \qquad \qquad \ \ \ \left. {\ 
    12411241                +\frac{e_{1v}\, e_{2v} }{e_{3vw} }\,\left( {r_{1vw}^2+r_{2vw}^2} 
    1242                 \right)\,\delta_{k+1/2} [v]} \right)} \right]\;\;\;} \right\}  
     1242                \right)\,\delta_{k+1/2} [v]} \right)} \right]\;\;\;} \right\} 
    12431243  \end{split} 
    12441244\end{equation} 
    12451245where $r_1$ and $r_2$ are the slopes between the surface along which the diffusion operator acts and 
    1246 the surface of computation ($z$- or $s$-surfaces).  
     1246the surface of computation ($z$- or $s$-surfaces). 
    12471247The way these slopes are evaluated is given in the lateral physics chapter (\autoref{chap:LDF}). 
    12481248 
     
    12701270%----------------------------------------------namzdf------------------------------------------------------ 
    12711271 
    1272 \nlst{namzdf}  
     1272\nlst{namzdf} 
    12731273%------------------------------------------------------------------------------------------------------------- 
    12741274 
    1275 Options are defined through the \ngn{namzdf} namelist variables. 
     1275Options are defined through the \nam{zdf} namelist variables. 
    12761276The large vertical diffusion coefficient found in the surface mixed layer together with high vertical resolution implies that in the case of explicit time stepping there would be too restrictive a constraint on the time step. 
    12771277Two time stepping schemes can be used for the vertical diffusion term: 
     
    12801280$(b)$ a backward (or implicit) time differencing scheme (\np{ln\_zdfexp}\forcode{ = .false.}) 
    12811281(see \autoref{chap:STP}). 
    1282 Note that namelist variables \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics.  
     1282Note that namelist variables \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics. 
    12831283 
    12841284The formulation of the vertical subgrid scale physics is the same whatever the vertical coordinate is. 
     
    13091309where $\left( \tau_u ,\tau_v \right)$ are the two components of the wind stress vector in 
    13101310the (\textbf{i},\textbf{j}) coordinate system. 
    1311 The high mixing coefficients in the surface mixed layer ensure that the surface wind stress is distributed in  
     1311The high mixing coefficients in the surface mixed layer ensure that the surface wind stress is distributed in 
    13121312the vertical over the mixed layer depth. 
    13131313If the vertical mixing coefficient is small (when no mixed layer scheme is used) 
     
    13261326Besides the surface and bottom stresses (see the above section) 
    13271327which are introduced as boundary conditions on the vertical mixing, 
    1328 three other forcings may enter the dynamical equations by affecting the surface pressure gradient.  
     1328three other forcings may enter the dynamical equations by affecting the surface pressure gradient. 
    13291329 
    13301330(1) When \np{ln\_apr\_dyn}\forcode{ = .true.} (see \autoref{sec:SBC_apr}), 
     
    13351335 
    13361336(3) When \np{nn\_ice\_embd}\forcode{ = 2} and LIM or CICE is used 
    1337 (\ie when the sea-ice is embedded in the ocean), 
     1337(\ie\ when the sea-ice is embedded in the ocean), 
    13381338the snow-ice mass is taken into account when computing the surface pressure gradient. 
    13391339 
     
    13431343 
    13441344% ================================================================ 
    1345 % Wetting and drying  
     1345% Wetting and drying 
    13461346% ================================================================ 
    13471347\section{Wetting and drying } 
     
    13591359 
    13601360The following terminology is used. The depth of the topography (positive downwards) 
    1361 at each $(i,j)$ point is the quantity stored in array $\mathrm{ht\_wd}$ in the NEMO code. 
     1361at each $(i,j)$ point is the quantity stored in array $\mathrm{ht\_wd}$ in the \NEMO\ code. 
    13621362The height of the free surface (positive upwards) is denoted by $ \mathrm{ssh}$. Given the sign 
    13631363conventions used, the water depth, $h$, is the height of the free surface plus the depth of the 
     
    13671367covered by water. They require the topography specified with a model 
    13681368configuration to have negative depths at points where the land is higher than the 
    1369 topography's reference sea-level. The vertical grid in NEMO is normally computed relative to an 
     1369topography's reference sea-level. The vertical grid in \NEMO\ is normally computed relative to an 
    13701370initial state with zero sea surface height elevation. 
    13711371The user can choose to compute the vertical grid and heights in the model relative to 
     
    13861386All these configurations have used pure sigma coordinates. It is expected that 
    13871387the wetting and drying code will work in domains with more general s-coordinates provided 
    1388 the coordinates are pure sigma in the region where wetting and drying actually occurs.  
     1388the coordinates are pure sigma in the region where wetting and drying actually occurs. 
    13891389 
    13901390The next sub-section descrbies the directional limiter and the following sub-section the iterative limiter. 
     
    13991399\label{subsec:DYN_wd_directional_limiter} 
    14001400The principal idea of the directional limiter is that 
    1401 water should not be allowed to flow out of a dry tracer cell (i.e. one whose water depth is less than rn\_wdmin1). 
     1401water should not be allowed to flow out of a dry tracer cell (i.e. one whose water depth is less than \np{rn\_wdmin1}). 
    14021402 
    14031403All the changes associated with this option are made to the barotropic solver for the non-linear 
     
    14091409 
    14101410The flux across each $u$-face of a tracer cell is multiplied by a factor zuwdmask (an array which depends on ji and jj). 
    1411 If the user sets ln\_wd\_dl\_ramp = .False. then zuwdmask is 1 when the 
    1412 flux is from a cell with water depth greater than rn\_wdmin1 and 0 otherwise. If the user sets 
    1413 ln\_wd\_dl\_ramp = .True. the flux across the face is ramped down as the water depth decreases 
    1414 from 2 * rn\_wdmin1 to rn\_wdmin1. The use of this ramp reduced grid-scale noise in idealised test cases. 
     1411If the user sets \np{ln\_wd\_dl\_ramp}\forcode{ = .false.} then zuwdmask is 1 when the 
     1412flux is from a cell with water depth greater than \np{rn\_wdmin1} and 0 otherwise. If the user sets 
     1413\np{ln\_wd\_dl\_ramp}\forcode{ = .true.} the flux across the face is ramped down as the water depth decreases 
     1414from 2 * \np{rn\_wdmin1} to \np{rn\_wdmin1}. The use of this ramp reduced grid-scale noise in idealised test cases. 
    14151415 
    14161416At the point where the flux across a $u$-face is multiplied by zuwdmask , we have chosen 
     
    14281428fields (tracers independent of $x$, $y$ and $z$). Our scheme conserves constant tracers because 
    14291429the velocities used at the tracer cell faces on the baroclinic timesteps are carefully calculated by dynspg\_ts 
    1430 to equal their mean value during the barotropic steps. If the user sets ln\_wd\_dl\_bc = .True., the 
    1431 baroclinic velocities are also multiplied by a suitably weighted average of zuwdmask.   
     1430to equal their mean value during the barotropic steps. If the user sets \np{ln\_wd\_dl\_bc}\forcode{ = .true.}, the 
     1431baroclinic velocities are also multiplied by a suitably weighted average of zuwdmask. 
    14321432 
    14331433%----------------------------------------------------------------------------------------- 
     
    14551455 
    14561456\begin{align} \label{dyn_wd_continuity_2} 
    1457 \frac{e_1 e_2}{\Delta t} ( h_{i,j}(t_{n+1}) - h_{i,j}(t_e) )  
     1457\frac{e_1 e_2}{\Delta t} ( h_{i,j}(t_{n+1}) - h_{i,j}(t_e) ) 
    14581458&= - ( \mathrm{flxu}_{i+1,j} - \mathrm{flxu}_{i,j}  + \mathrm{flxv}_{i,j+1} - \mathrm{flxv}_{i,j} ) \\ 
    14591459&= \mathrm{zzflx}_{i,j} . 
     
    14711471 
    14721472\begin{equation} \label{dyn_wd_zzflx_p_n_1} 
    1473 \mathrm{zzflx}_{i,j} = \mathrm{zzflxp}_{i,j} + \mathrm{zzflxn}_{i,j} .   
     1473\mathrm{zzflx}_{i,j} = \mathrm{zzflxp}_{i,j} + \mathrm{zzflxn}_{i,j} . 
    14741474\end{equation} 
    14751475 
     
    14951495 
    14961496\begin{equation} \label{dyn_wd_zzflx_initial} 
    1497 \mathrm{zzflxp^{(0)}}_{i,j} = \mathrm{zzflxp}_{i,j} , \quad  \mathrm{zzflxn^{(0)}}_{i,j} = \mathrm{zzflxn}_{i,j} .  
     1497\mathrm{zzflxp^{(0)}}_{i,j} = \mathrm{zzflxp}_{i,j} , \quad  \mathrm{zzflxn^{(0)}}_{i,j} = \mathrm{zzflxn}_{i,j} . 
    14981498\end{equation} 
    14991499 
     
    15251525\begin{split} 
    15261526\mathrm{zcoef}^{(m+1)}_{i,j} = \Big[ (h_{i,j}(t_e) & - \mathrm{rn\_wdmin1} - \mathrm{rn\_wdmin2})  \frac{e_1 e_2}{\Delta t} \phantom{]} \\ 
    1527 \phantom{[} & -  \mathrm{zzflxn}^{(m)}_{i,j} \Big] \frac{1}{ \mathrm{zzflxp}^{(0)}_{i,j} }  
     1527\phantom{[} & -  \mathrm{zzflxn}^{(m)}_{i,j} \Big] \frac{1}{ \mathrm{zzflxp}^{(0)}_{i,j} } 
    15281528\end{split} 
    15291529\end{equation} 
     
    16351635 
    16361636% ================================================================ 
    1637 % Time evolution term  
     1637% Time evolution term 
    16381638% ================================================================ 
    16391639\section[Time evolution term (\textit{dynnxt.F90})] 
     
    16431643%----------------------------------------------namdom---------------------------------------------------- 
    16441644 
    1645 \nlst{namdom}  
     1645\nlst{namdom} 
    16461646%------------------------------------------------------------------------------------------------------------- 
    16471647 
    1648 Options are defined through the \ngn{namdom} namelist variables. 
     1648Options are defined through the \nam{dom} namelist variables. 
    16491649The general framework for dynamics time stepping is a leap-frog scheme, 
    1650 \ie a three level centred time scheme associated with an Asselin time filter (cf. \autoref{chap:STP}). 
     1650\ie\ a three level centred time scheme associated with an Asselin time filter (cf. \autoref{chap:STP}). 
    16511651The scheme is applied to the velocity, except when 
    16521652using the flux form of momentum advection (cf. \autoref{sec:DYN_adv_cor_flux}) 
    1653 in the variable volume case (\key{vvl} defined), 
    1654 where it has to be applied to the thickness weighted velocity (see \autoref{sec:A_momentum})   
     1653in the variable volume case (\texttt{vvl?} defined), 
     1654where it has to be applied to the thickness weighted velocity (see \autoref{sec:A_momentum}) 
    16551655 
    16561656$\bullet$ vector invariant form or linear free surface 
    1657 (\np{ln\_dynhpg\_vec}\forcode{ = .true.} ; \key{vvl} not defined): 
     1657(\np{ln\_dynhpg\_vec}\forcode{ = .true.} ; \texttt{vvl?} not defined): 
    16581658\[ 
    16591659  % \label{eq:dynnxt_vec} 
     
    16671667 
    16681668$\bullet$ flux form and nonlinear free surface 
    1669 (\np{ln\_dynhpg\_vec}\forcode{ = .false.} ; \key{vvl} defined): 
     1669(\np{ln\_dynhpg\_vec}\forcode{ = .false.} ; \texttt{vvl?} defined): 
    16701670\[ 
    16711671  % \label{eq:dynnxt_flux} 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_LBC.tex

    r11179 r11435  
    33\begin{document} 
    44% ================================================================ 
    5 % Chapter — Lateral Boundary Condition (LBC)  
     5% Chapter — Lateral Boundary Condition (LBC) 
    66% ================================================================ 
    77\chapter{Lateral Boundary Condition (LBC)} 
    88\label{chap:LBC} 
    99 
    10 \minitoc 
     10\chaptertoc 
    1111 
    1212\newpage 
     
    2222%--------------------------------------------nam_lbc------------------------------------------------------- 
    2323 
    24 \nlst{namlbc}  
     24\nlst{namlbc} 
    2525%-------------------------------------------------------------------------------------------------------------- 
    2626 
    27 %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}).  
    28  
    29 %OPA allows land and topography grid points in the computational domain due to the presence of continents or islands, and includes the use of a full or partial step representation of bottom topography. The computation is performed over the whole domain, \ie we do not try to restrict the computation to ocean-only points. This choice has two motivations. Firstly, working on ocean only grid points overloads the code and harms the code readability. Secondly, and more importantly, it drastically reduces the vector portion of the computation, leading to a dramatic increase of CPU time requirement on vector computers.  The current section describes how the masking affects the computation of the various terms of the equations with respect to the boundary condition at solid walls. The process of defining which areas are to be masked is described in \autoref{subsec:DOM_msk}. 
    30  
    31 Options are defined through the \ngn{namlbc} namelist variables. 
     27%The lateral ocean boundary conditions contiguous to coastlines are Neumann conditions for heat and salt 
     28%(no flux across boundaries) and Dirichlet conditions for momentum (ranging from free-slip to "strong" no-slip). 
     29%They are handled automatically by the mask system (see \autoref{subsec:DOM_msk}). 
     30 
     31%OPA allows land and topography grid points in the computational domain due to the presence of continents or islands, 
     32%and includes the use of a full or partial step representation of bottom topography. 
     33%The computation is performed over the whole domain, \ie\ we do not try to restrict the computation to ocean-only points. 
     34%This choice has two motivations. 
     35%Firstly, working on ocean only grid points overloads the code and harms the code readability. 
     36%Secondly, and more importantly, it drastically reduces the vector portion of the computation, 
     37%leading to a dramatic increase of CPU time requirement on vector computers. 
     38%The current section describes how the masking affects the computation of the various terms of the equations 
     39%with respect to the boundary condition at solid walls. 
     40%The process of defining which areas are to be masked is described in \autoref{subsec:DOM_msk}. 
     41 
     42Options are defined through the \nam{lbc} namelist variables. 
    3243The discrete representation of a domain with complex boundaries (coastlines and bottom topography) leads to 
    3344arrays that include large portions where a computation is not required as the model variables remain at zero. 
     
    4152Since most of the boundary conditions consist of a zero flux across the solid boundaries, 
    4253they can be simply applied by multiplying variables by the correct mask arrays, 
    43 \ie the mask array of the grid point where the flux is evaluated. 
     54\ie\ the mask array of the grid point where the flux is evaluated. 
    4455For example, the heat flux in the \textbf{i}-direction is evaluated at $u$-points. 
    4556Evaluating this quantity as, 
     
    5263(where mask$_{u}$ is the mask array at a $u$-point) ensures that the heat flux is zero inside land and 
    5364at the boundaries, since mask$_{u}$ is zero at solid boundaries which in this case are defined at $u$-points 
    54 (normal velocity $u$ remains zero at the coast) (\autoref{fig:LBC_uv}).  
     65(normal velocity $u$ remains zero at the coast) (\autoref{fig:LBC_uv}). 
    5566 
    5667%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    104115\item[free-slip boundary condition (\np{rn\_shlat}\forcode{ = 0}):] the tangential velocity at 
    105116  the coastline is equal to the offshore velocity, 
    106   \ie the normal derivative of the tangential velocity is zero at the coast, 
     117  \ie\ the normal derivative of the tangential velocity is zero at the coast, 
    107118  so the vorticity: mask$_{f}$ array is set to zero inside the land and just at the coast 
    108119  (\autoref{fig:LBC_shlat}-a). 
     
    114125  the closest ocean velocity gridpoint were of the same magnitude but in the opposite direction 
    115126  (\autoref{fig:LBC_shlat}-b). 
    116   Therefore, the vorticity along the coastlines is given by:  
     127  Therefore, the vorticity along the coastlines is given by: 
    117128 
    118129  \[ 
     
    130141 
    131142\item["partial" free-slip boundary condition (0$<$\np{rn\_shlat}$<$2):] the tangential velocity at 
    132   the coastline is smaller than the offshore velocity, \ie there is a lateral friction but 
     143  the coastline is smaller than the offshore velocity, \ie\ there is a lateral friction but 
    133144  not strong enough to make the tangential velocity at the coast vanish (\autoref{fig:LBC_shlat}-c). 
    134145  This can be selected by providing a value of mask$_{f}$ strictly inbetween $0$ and $2$. 
     
    149160% ================================================================ 
    150161\section[Model domain boundary condition (\texttt{jperio})] 
    151 {Model domain boundary condition (\protect\np{jperio})} 
     162{Model domain boundary condition (\protect\jp{jperio})} 
    152163\label{sec:LBC_jperio} 
    153164 
     
    155166closed, cyclic east-west, cyclic north-south, a north-fold, and combination closed-north fold or 
    156167bi-cyclic east-west and north-fold. 
    157 The north-fold boundary condition is associated with the 3-pole ORCA mesh.  
     168The north-fold boundary condition is associated with the 3-pole ORCA mesh. 
    158169 
    159170% ------------------------------------------------------------------------------------------------------------- 
    160 %        Closed, cyclic (\np{jperio}\forcode{ = 0..2})  
     171%        Closed, cyclic (\jp{jperio}\forcode{ = 0..2}) 
    161172% ------------------------------------------------------------------------------------------------------------- 
    162173\subsection[Closed, cyclic (\forcode{jperio = [0127]})] 
    163 {Closed, cyclic (\protect\np{jperio}\forcode{ = [0127]})} 
     174{Closed, cyclic (\protect\jp{jperio}\forcode{ = [0127]})} 
    164175\label{subsec:LBC_jperio012} 
    165176 
    166177The choice of closed or cyclic model domain boundary condition is made by 
    167 setting \np{jperio} to 0, 1, 2 or 7 in namelist \ngn{namcfg}. 
     178setting \jp{jperio} to 0, 1, 2 or 7 in namelist \nam{cfg}. 
    168179Each time such a boundary condition is needed, it is set by a call to routine \mdl{lbclnk}. 
    169180The computation of momentum and tracer trends proceeds from $i=2$ to $i=jpi-1$ and from $j=2$ to $j=jpj-1$, 
    170 \ie in the model interior. 
     181\ie\ in the model interior. 
    171182To choose a lateral model boundary condition is to specify the first and last rows and columns of 
    172 the model variables.  
     183the model variables. 
    173184 
    174185\begin{description} 
    175186 
    176 \item[For closed boundary (\np{jperio}\forcode{ = 0})], 
     187\item[For closed boundary (\jp{jperio}\forcode{ = 0})], 
    177188  solid walls are imposed at all model boundaries: 
    178189  first and last rows and columns are set to zero. 
    179190 
    180 \item[For cyclic east-west boundary (\np{jperio}\forcode{ = 1})], 
     191\item[For cyclic east-west boundary (\jp{jperio}\forcode{ = 1})], 
    181192  first and last rows are set to zero (closed) whilst the first column is set to 
    182193  the value of the last-but-one column and the last column to the value of the second one 
     
    184195  Whatever flows out of the eastern (western) end of the basin enters the western (eastern) end. 
    185196 
    186 \item[For cyclic north-south boundary (\np{jperio}\forcode{ = 2})], 
     197\item[For cyclic north-south boundary (\jp{jperio}\forcode{ = 2})], 
    187198  first and last columns are set to zero (closed) whilst the first row is set to 
    188199  the value of the last-but-one row and the last row to the value of the second one 
     
    190201  Whatever flows out of the northern (southern) end of the basin enters the southern (northern) end. 
    191202 
    192 \item[Bi-cyclic east-west and north-south boundary (\np{jperio}\forcode{ = 7})] combines cases 1 and 2. 
     203\item[Bi-cyclic east-west and north-south boundary (\jp{jperio}\forcode{ = 7})] combines cases 1 and 2. 
    193204 
    194205\end{description} 
     
    207218 
    208219% ------------------------------------------------------------------------------------------------------------- 
    209 %        North fold (\textit{jperio = 3 }to $6)$  
     220%        North fold (\textit{jperio = 3 }to $6)$ 
    210221% ------------------------------------------------------------------------------------------------------------- 
    211222\subsection[North-fold (\forcode{jperio = [3-6]})] 
    212 {North-fold (\protect\np{jperio}\forcode{ = [3-6]})} 
     223{North-fold (\protect\jp{jperio}\forcode{ = [3-6]})} 
    213224\label{subsec:LBC_north_fold} 
    214225 
     
    216227a three-polar ORCA grid. 
    217228Such a grid has two poles in the northern hemisphere (\autoref{fig:MISC_ORCA_msh}, 
    218 and thus requires a specific treatment illustrated in \autoref{fig:North_Fold_T}.  
     229and thus requires a specific treatment illustrated in \autoref{fig:North_Fold_T}. 
    219230Further information can be found in \mdl{lbcnfd} module which applies the north fold boundary condition. 
    220231 
     
    234245 
    235246% ==================================================================== 
    236 % Exchange with neighbouring processors  
     247% Exchange with neighbouring processors 
    237248% ==================================================================== 
    238249\section[Exchange with neighbouring processors (\textit{lbclnk.F90}, \textit{lib\_mpp.F90})] 
     
    272283After a computation, a communication phase starts: 
    273284each processor sends to its neighbouring processors the update values of the points corresponding to 
    274 the interior overlapping area to its neighbouring sub-domain (\ie the innermost of the two overlapping rows). 
     285the interior overlapping area to its neighbouring sub-domain (\ie\ the innermost of the two overlapping rows). 
    275286The communication is done through the Message Passing Interface (MPI). 
    276287The data exchanges between processors are required at the very place where 
    277288lateral domain boundary conditions are set in the mono-domain computation: 
    278289the \rou{lbc\_lnk} routine (found in \mdl{lbclnk} module) which manages such conditions is interfaced with 
    279 routines found in \mdl{lib\_mpp} module when running on an MPP computer (\ie when \key{mpp\_mpi} defined). 
     290routines found in \mdl{lib\_mpp} module when running on an MPP computer (\ie\ when \key{mpp\_mpi} defined). 
    280291It has to be pointed out that when using the MPP version of the model, 
    281292the east-west cyclic boundary condition is done implicitly, 
     
    297308The i-axis is divided by \jp{jpni} and 
    298309the j-axis by \jp{jpnj} for a number of processors \jp{jpnij} most often equal to $jpni \times jpnj$ 
    299 (parameters set in  \ngn{nammpp} namelist). 
     310(parameters set in  \nam{mpp} namelist). 
    300311Each processor is independent and without message passing or synchronous process, 
    301312programs run alone and access just its own local memory. 
     
    304315These dimensions include the internal domain and the overlapping rows. 
    305316The number of rows to exchange (known as the halo) is usually set to one (\jp{jpreci}=1, in \mdl{par\_oce}). 
    306 The whole domain dimensions are named \np{jpiglo}, \np{jpjglo} and \jp{jpk}. 
     317The whole domain dimensions are named \jp{jpiglo}, \jp{jpjglo} and \jp{jpk}. 
    307318The relationship between the whole domain and a sub-domain is: 
    308319\[ 
     
    312323where \jp{jpni}, \jp{jpnj} are the number of processors following the i- and j-axis. 
    313324 
    314 One also defines variables nldi and nlei which correspond to the internal domain bounds,  
    315 and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain.  
     325One also defines variables nldi and nlei which correspond to the internal domain bounds, 
     326and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain. 
    316327An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$, 
    317 a global array (whole domain) by the relationship:  
     328a global array (whole domain) by the relationship: 
    318329\[ 
    319330  % \label{eq:lbc_nimpp} 
     
    337348 
    338349 
    339 The \NEMO model computes equation terms with the help of mask arrays (0 on land points and 1 on sea points). 
     350The \NEMO\ model computes equation terms with the help of mask arrays (0 on land points and 1 on sea points). 
    340351It is easily readable and very efficient in the context of a computer with vectorial architecture. 
    341352However, in the case of a scalar processor, computations over the land regions become more expensive in 
    342 terms of CPU time.  
     353terms of CPU time. 
    343354It is worse when we use a complex configuration with a realistic bathymetry like the global ocean where 
    344355more than 50 \% of points are land points. 
     
    349360The user then chooses optimal parameters \jp{jpni}, \jp{jpnj} and \jp{jpnij} with $jpnij < jpni \times jpnj$, 
    350361leading to the elimination of $jpni \times jpnj - jpnij$ land processors. 
    351 When those parameters are specified in \ngn{nammpp} namelist, 
     362When those parameters are specified in \nam{mpp} namelist, 
    352363the algorithm in the \rou{inimpp2} routine sets each processor's parameters (nbound, nono, noea,...) so that 
    353364the land-only processors are not taken into account. 
    354365 
    355 \gmcomment{Note that the inimpp2 routine is general so that the original inimpp  
     366\gmcomment{Note that the inimpp2 routine is general so that the original inimpp 
    356367routine should be suppressed from the code.} 
    357368 
     
    360371Note that this is a problem for the meshmask file which requires to be defined over the whole domain. 
    361372Therefore, user should not eliminate land processors when creating a meshmask file 
    362 (\ie when setting a non-zero value to \np{nn\_msh}). 
     373(\ie\ when setting a non-zero value to \np{nn\_msh}). 
    363374 
    364375%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    381392 
    382393% ==================================================================== 
    383 % Unstructured open boundaries BDY  
     394% Unstructured open boundaries BDY 
    384395% ==================================================================== 
    385396\section{Unstructured open boundary conditions (BDY)} 
     
    388399%-----------------------------------------nambdy-------------------------------------------- 
    389400 
    390 \nlst{nambdy}  
     401\nlst{nambdy} 
    391402%----------------------------------------------------------------------------------------------- 
    392403%-----------------------------------------nambdy_dta-------------------------------------------- 
    393404 
    394 \nlst{nambdy_dta}  
     405\nlst{nambdy_dta} 
    395406%----------------------------------------------------------------------------------------------- 
    396407 
    397 Options are defined through the \ngn{nambdy} \ngn{nambdy\_dta} namelist variables. 
    398 The BDY module is the core implementation of open boundary conditions for regional configurations on  
     408Options are defined through the \nam{bdy} \nam{bdy\_dta} namelist variables. 
     409The BDY module is the core implementation of open boundary conditions for regional configurations on 
    399410temperature, salinity, barotropic and baroclinic velocities, as well as ice concentration, ice and snow thicknesses). 
    400411 
    401 The BDY module was modelled on the OBC module (see NEMO 3.4) and shares many features and 
     412The BDY module was modelled on the OBC module (see \NEMO\ 3.4) and shares many features and 
    402413a similar coding structure \citep{chanut_rpt05}. 
    403414The specification of the location of the open boundary is completely flexible and 
    404 allows for example the open boundary to follow an isobath or other irregular contour.  
    405 Boundary data files used with versions of NEMO prior to Version 3.4 may need to be re-ordered to work with this version. 
     415allows for example the open boundary to follow an isobath or other irregular contour. 
     416Boundary data files used with versions of \NEMO\ prior to Version 3.4 may need to be re-ordered to work with this version. 
    406417See the section on the Input Boundary Data Files for details. 
    407418 
     
    415426Each boundary set may be defined as a set of straight line segments in a namelist 
    416427(\np{ln\_coords\_file}\forcode{ = .false.}) or read in from a file (\np{ln\_coords\_file}\forcode{ = .true.}). 
    417 If the set is defined in a namelist, then the namelists \ngn{nambdy\_index} must be included separately, one for each set. 
     428If the set is defined in a namelist, then the namelists \nam{bdy\_index} must be included separately, one for each set. 
    418429If the set is defined by a file, then a ``\ifile{coordinates.bdy}'' file must be provided. 
    419 The coordinates.bdy file is analagous to the usual NEMO ``\ifile{coordinates}'' file. 
     430The coordinates.bdy file is analagous to the usual \NEMO\ ``\ifile{coordinates}'' file. 
    420431In the example above, there are two boundary sets, the first of which is defined via a file and 
    421432the second is defined in a namelist. 
     
    423434 
    424435For each boundary set a boundary condition has to be chosen for the barotropic solution 
    425 (``u2d'':sea-surface height and barotropic velocities), for the baroclinic velocities (``u3d''),  
     436(``u2d'':sea-surface height and barotropic velocities), for the baroclinic velocities (``u3d''), 
    426437for the active tracers \footnote{The BDY module does not deal with passive tracers at this version} (``tra''), and sea-ice (``ice''). 
    427438For each set of variables there is a choice of algorithm and a choice for the data, 
    428 eg. for the active tracers the algorithm is set by \np{cn\_tra} and the choice of data is set by \np{nn\_tra\_dta}.\\  
     439eg. for the active tracers the algorithm is set by \np{cn\_tra} and the choice of data is set by \np{nn\_tra\_dta}.\\ 
    429440 
    430441The choice of algorithm is currently as follows: 
     
    436447\item[\forcode{'neumann'}:] Value at the boundary are duplicated (No gradient). Only available for baroclinic velocity and tracer variables. 
    437448\item[\forcode{'frs'}:] Flow Relaxation Scheme (FRS) available for all variables. 
    438 \item[\forcode{'Orlanski'}:] Orlanski radiation scheme (fully oblique) for barotropic, baroclinic and tracer variables.  
    439 \item[\forcode{'Orlanski_npo'}:] Orlanski radiation scheme for barotropic, baroclinic and tracer variables.  
     449\item[\forcode{'Orlanski'}:] Orlanski radiation scheme (fully oblique) for barotropic, baroclinic and tracer variables. 
     450\item[\forcode{'Orlanski_npo'}:] Orlanski radiation scheme for barotropic, baroclinic and tracer variables. 
    440451\item[\forcode{'flather'}:] Flather radiation scheme for the barotropic variables only. 
    441452\end{description} 
     
    443454The main choice for the boundary data is to use initial conditions as boundary data 
    444455(\np{nn\_tra\_dta}\forcode{ = 0}) or to use external data from a file (\np{nn\_tra\_dta}\forcode{ = 1}). 
    445 In case the 3d velocity data contain the total velocity (ie, baroclinic and barotropic velocity),  
     456In case the 3d velocity data contain the total velocity (ie, baroclinic and barotropic velocity), 
    446457the bdy code can derived baroclinic and barotropic velocities by setting \np{ln\_full\_vel}\forcode{ = .true. } 
    447458For the barotropic solution there is also the option to use tidal harmonic forcing either by 
    448459itself (\np{nn\_dyn2d\_dta}\forcode{ = 2}) or in addition to other external data (\np{nn\_dyn2d\_dta}\forcode{ = 3}).\\ 
    449 Sea-ice salinity, temperature and age data at the boundary are constant and defined repectively by \np{rn\_ice\_sal}, \np{rn\_ice\_tem} and \np{rn\_ice\_age}.  
    450  
    451 If external boundary data is required then the \ngn{nambdy\_dta} namelist must be defined. 
    452 One \ngn{nambdy\_dta} namelist is required for each boundary set in the order in which 
     460Sea-ice salinity, temperature and age data at the boundary are constant and defined repectively by \np{rn\_ice\_sal}, \np{rn\_ice\_tem} and \np{rn\_ice\_age}. 
     461 
     462If external boundary data is required then the \nam{bdy\_dta} namelist must be defined. 
     463One \nam{bdy\_dta} namelist is required for each boundary set in the order in which 
    453464the boundary sets are defined in nambdy. 
    454 In the example given, two boundary sets have been defined. The first one is reading data file in the \ngn{nambdy\_dta} namelist shown above  
     465In the example given, two boundary sets have been defined. The first one is reading data file in the \nam{bdy\_dta} namelist shown above 
    455466and the second one is using data from intial condition (no namelist bloc needed). 
    456467The boundary data is read in using the fldread module, 
    457 so the \ngn{nambdy\_dta} namelist is in the format required for fldread. 
     468so the \nam{bdy\_dta} namelist is in the format required for fldread. 
    458469For each variable required, the filename, the frequency of the files and 
    459470the frequency of the data in the files is given. 
     
    461472 
    462473There is currently an option to vertically interpolate the open boundary data onto the native grid at run-time. 
    463 If \np{nn\_bdy\_jpk} $< -1$, it is assumed that the lateral boundary data are already on the native grid.  
    464 However, if \np{nn\_bdy\_jpk} is set to the number of vertical levels present in the boundary data,  
    465 a bilinear interpolation onto the native grid will be triggered at runtime.  
    466 For this to be successful the additional variables: $gdept$, $gdepu$, $gdepv$, $e3t$, $e3u$ and $e3v$, are required to be present in the lateral boundary files.  
    467 These correspond to the depths and scale factors of the input data,  
     474If \np{nn\_bdy\_jpk} $< -1$, it is assumed that the lateral boundary data are already on the native grid. 
     475However, if \np{nn\_bdy\_jpk} is set to the number of vertical levels present in the boundary data, 
     476a bilinear interpolation onto the native grid will be triggered at runtime. 
     477For this to be successful the additional variables: $gdept$, $gdepu$, $gdepv$, $e3t$, $e3u$ and $e3v$, are required to be present in the lateral boundary files. 
     478These correspond to the depths and scale factors of the input data, 
    468479the latter used to make any adjustment to the velocity fields due to differences in the total water depths between the two vertical grids.\\ 
    469480 
     
    474485Tidal harmonic forcing is also used. 
    475486The second set is defined in a namelist. 
    476 FRS conditions are applied on temperature and salinity and climatological data is read from initial condition files.  
     487FRS conditions are applied on temperature and salinity and climatological data is read from initial condition files. 
    477488 
    478489%---------------------------------------------- 
     
    505516is relaxed towards the external conditions over the rest of the FRS zone. 
    506517The application of a relaxation zone helps to prevent spurious reflection of 
    507 outgoing signals from the model boundary.  
     518outgoing signals from the model boundary. 
    508519 
    509520The function $\alpha$ is specified as a $tanh$ function: 
     
    534545Note that the sea-surface height gradient in \autoref{eq:bdy_fla1} is a spatial gradient across the model boundary, 
    535546so that $\eta_{e}$ is defined on the $T$ points with $nbr=1$ and $\eta$ is defined on the $T$ points with $nbr=2$. 
    536 $U$ and $U_{e}$ are defined on the $U$ or $V$ points with $nbr=1$, \ie between the two $T$ grid points. 
     547$U$ and $U_{e}$ are defined on the $U$ or $V$ points with $nbr=1$, \ie\ between the two $T$ grid points. 
    537548 
    538549%---------------------------------------------- 
     
    575586\end{equation} 
    576587 
    577 Generally the relaxation time scale at inward propagation points \np{(rn\_time\_dmp}) is set much shorter than the time scale at outward propagation 
     588Generally the relaxation time scale at inward propagation points (\np{rn\_time\_dmp}) is set much shorter than the time scale at outward propagation 
    578589points (\np{rn\_time\_dmp\_out}) so that the solution is constrained more strongly by the external data at inward propagation points. 
    579 See \autoref{subsec:BDY_relaxation} for detailed on the spatial shape of the scaling.\\  
    580 The ``normal propagation of oblique radiation'' or NPO approximation (called \forcode{'orlanski_npo'}) involves assuming  
     590See \autoref{subsec:BDY_relaxation} for detailed on the spatial shape of the scaling.\\ 
     591The ``normal propagation of oblique radiation'' or NPO approximation (called \forcode{'orlanski_npo'}) involves assuming 
    581592that $c_y$ is zero in equation (\autoref{eq:wave_continuous}), but including 
    582593this term in the denominator of equation (\autoref{eq:cx}). Both versions of the scheme are options in BDY. Equations 
     
    587598\label{subsec:BDY_relaxation} 
    588599 
    589 In addition to a specific boundary condition specified as \np{cn\_tra} and \np{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available.  
     600In addition to a specific boundary condition specified as \np{cn\_tra} and \np{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available. 
    590601It is control by the namelist parameter \np{ln\_tra\_dmp} and \np{ln\_dyn3d\_dmp} for each boundary set. 
    591602 
    592 The relaxation time scale value (\np{rn\_time\_dmp} and \np{rn\_time\_dmp\_out}, $\tau$) are defined at the boundaries itself.  
     603The relaxation time scale value (\np{rn\_time\_dmp} and \np{rn\_time\_dmp\_out}, $\tau$) are defined at the boundaries itself. 
    593604This time scale ($\alpha$) is weighted by the distance ($d$) from the boundary over \np{nn\_rimwidth} cells ($N$): 
    594605 
     
    597608\] 
    598609 
    599 The same scaling is applied in the Orlanski damping.  
     610The same scaling is applied in the Orlanski damping. 
    600611 
    601612%---------------------------------------------- 
     
    610621the point is increasingly further away from the edge of the model domain. 
    611622A set of $nbi$, $nbj$, and $nbr$ arrays is defined for each of the $T$, $U$ and $V$ grids. 
    612 Figure \autoref{fig:LBC_bdy_geom} shows an example of an irregular boundary.  
     623Figure \autoref{fig:LBC_bdy_geom} shows an example of an irregular boundary. 
    613624 
    614625The boundary geometry for each set may be defined in a namelist nambdy\_index or 
    615626by reading in a ``\ifile{coordinates.bdy}'' file. 
    616627The nambdy\_index namelist defines a series of straight-line segments for north, east, south and west boundaries. 
    617 One nambdy\_index namelist bloc is needed for each boundary condition defined by indexes.  
    618 For the northern boundary, \np{nbdysegn} gives the number of segments, 
    619 \np{jpjnob} gives the $j$ index for each segment and \np{jpindt} and 
    620 \np{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries. 
     628One nambdy\_index namelist bloc is needed for each boundary condition defined by indexes. 
     629For the northern boundary, \texttt{nbdysegn} gives the number of segments, 
     630\jp{jpjnob} gives the $j$ index for each segment and \jp{jpindt} and 
     631\jp{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries. 
    621632These segments define a list of $T$ grid points along the outermost row of the boundary ($nbr\,=\, 1$). 
    622633The code deduces the $U$ and $V$ points and also the points for $nbr\,>\, 1$ if \np{nn\_rimwidth}\forcode{ > 1}. 
     
    629640Typically this file will be used to generate external boundary data via interpolation and so 
    630641will also contain the latitudes and longitudes of each point as shown. 
    631 However, this is not necessary to run the model.  
     642However, this is not necessary to run the model. 
    632643 
    633644For some choices of irregular boundary the model domain may contain areas of ocean which 
     
    658669a time dimension; 
    659670$xb$ which is the index of the boundary data point in the horizontal; 
    660 and $yb$ which is a degenerate dimension of 1 to enable the file to be read by the standard NEMO I/O routines. 
    661 The 3D fields also have a depth dimension.  
     671and $yb$ which is a degenerate dimension of 1 to enable the file to be read by the standard \NEMO\ I/O routines. 
     672The 3D fields also have a depth dimension. 
    662673 
    663674From Version 3.4 there are new restrictions on the order in which the boundary points are defined 
     
    670681\item All the data for a particular boundary set must be in the same order. 
    671682  (Prior to 3.4 it was possible to define barotropic data in a different order to 
    672   the data for tracers and baroclinic velocities).  
     683  the data for tracers and baroclinic velocities). 
    673684\end{enumerate} 
    674685 
     
    697708This is controlled  by the \np{ln\_vol} parameter in the namelist. 
    698709A value of \np{ln\_vol}\forcode{ = .false.} indicates that this option is not used. 
    699 Two options to control the volume are available (\np{nn\_volctl}).  
     710Two options to control the volume are available (\np{nn\_volctl}). 
    700711If \np{nn\_volctl}\forcode{ = 0} then a correction is applied to the normal barotropic velocities around the boundary at 
    701712each timestep to ensure that the integrated volume flow through the boundary is zero. 
     
    713724%-----------------------------------------nambdy_tide-------------------------------------------- 
    714725 
    715 \nlst{nambdy_tide}  
     726\nlst{nambdy_tide} 
    716727%----------------------------------------------------------------------------------------------- 
    717728 
    718729Tidal forcing at open boundaries requires the activation of surface 
    719 tides (i.e., in \ngn{nam\_tide}, \np{ln\_tide} needs to be set to 
     730tides (i.e., in \nam{\_tide}, \np{ln\_tide} needs to be set to 
    720731\forcode{.true.} and the required constituents need to be activated by 
    721 including their names in the \np{cname} array; see 
     732including their names in the \np{clname} array; see 
    722733\autoref{sec:SBC_tide}). Specific options related to the reading in of 
    723734the complex harmonic amplitudes of elevation (SSH) and barotropic 
    724735velocity (u,v) at open boundaries are defined through the 
    725 \ngn{nambdy\_tide} namelist parameters.\\ 
     736\nam{bdy\_tide} namelist parameters.\\ 
    726737 
    727738The tidal harmonic data at open boundaries can be specified in two 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_LDF.tex

    r11386 r11435  
    99\label{chap:LDF} 
    1010 
    11 \minitoc 
     11\chaptertoc 
    1212 
    1313\newpage 
     
    2222(3) the space and time variations of the eddy coefficients. 
    2323These three aspects of the lateral diffusion are set through namelist parameters 
    24 (see the \ngn{nam\_traldf} and \ngn{nam\_dynldf} below). 
     24(see the \nam{tra\_ldf} and \nam{dyn\_ldf} below). 
    2525Note that this chapter describes the standard implementation of iso-neutral tracer mixing.  
    2626Griffies's implementation, which is used if \np{ln\_traldf\_triad}\forcode{ = .true.}, 
     
    5353{Laplacian mixing (\protect\np{ln\_traldf\_lap}, \protect\np{ln\_dynldf\_lap})} 
    5454Setting \protect\np{ln\_traldf\_lap}\forcode{ = .true.} and/or \protect\np{ln\_dynldf\_lap}\forcode{ = .true.} enables  
    55 a second order diffusion on tracers and momentum respectively. Note that in \NEMO 4, one can not combine  
     55a second order diffusion on tracers and momentum respectively. Note that in \NEMO\ 4, one can not combine  
    5656Laplacian and Bilaplacian operators for the same variable. 
    5757 
     
    6060Setting \protect\np{ln\_traldf\_blp}\forcode{ = .true.} and/or \protect\np{ln\_dynldf\_blp}\forcode{ = .true.} enables  
    6161a fourth order diffusion on tracers and momentum respectively. It is implemented by calling the above Laplacian operator twice.  
    62 We stress again that from \NEMO 4, the simultaneous use Laplacian and Bilaplacian operators is not allowed. 
     62We stress again that from \NEMO\ 4, the simultaneous use Laplacian and Bilaplacian operators is not allowed. 
    6363 
    6464% ================================================================ 
     
    9090\subsection{Slopes for tracer geopotential mixing in the $s$-coordinate} 
    9191 
    92 In $s$-coordinates, geopotential mixing (\ie horizontal mixing) $r_1$ and $r_2$ are the slopes between 
     92In $s$-coordinates, geopotential mixing (\ie\ horizontal mixing) $r_1$ and $r_2$ are the slopes between 
    9393the geopotential and computational surfaces. 
    9494Their discrete formulation is found by locally solving \autoref{eq:tra_ldf_iso} when 
    9595the diffusive fluxes in the three directions are set to zero and $T$ is assumed to be horizontally uniform, 
    96 \ie a linear function of $z_T$, the depth of a $T$-point.  
     96\ie\ a linear function of $z_T$, the depth of a $T$-point.  
    9797%gm { Steven : My version is obviously wrong since I'm left with an arbitrary constant which is the local vertical temperature gradient} 
    9898 
     
    124124Their formulation does not depend on the vertical coordinate used. 
    125125Their discrete formulation is found using the fact that the diffusive fluxes of 
    126 locally referenced potential density (\ie $in situ$ density) vanish. 
     126locally referenced potential density (\ie\ $in situ$ density) vanish. 
    127127So, substituting $T$ by $\rho$ in \autoref{eq:tra_ldf_iso} and setting the diffusive fluxes in 
    128128the three directions to zero leads to the following definition for the neutral slopes: 
     
    230230To overcome this problem, several techniques have been proposed in which the numerical schemes of 
    231231the ocean model are modified \citep{weaver.eby_JPO97, griffies.gnanadesikan.ea_JPO98}. 
    232 Griffies's scheme is now available in \NEMO if \np{ln\_traldf\_triad}=\forcode{= .true.}; see \autoref{apdx:triad}. 
     232Griffies's scheme is now available in \NEMO\ if \np{ln\_traldf\_triad}\forcode{ = .true.}; see \autoref{apdx:triad}. 
    233233Here, another strategy is presented \citep{lazar_phd97}: 
    234234a local filtering of the iso-neutral slopes (made on 9 grid-points) prevents the development of 
     
    284284      \textit{(a)} in the real ocean the slope is the iso-neutral slope in the ocean interior, 
    285285      which has to be adjusted at the surface boundary 
    286       \ie it must tend to zero at the surface since there is no mixing across the air-sea interface: 
     286      \ie\ it must tend to zero at the surface since there is no mixing across the air-sea interface: 
    287287      wall boundary condition). 
    288288      Nevertheless, the profile between the surface zero value and the interior iso-neutral one is unknown, 
     
    309309\textit{vw}- points for the $v$-component. 
    310310They are computed from the slopes used for tracer diffusion, 
    311 \ie \autoref{eq:ldfslp_geo} and \autoref{eq:ldfslp_iso}: 
     311\ie\ \autoref{eq:ldfslp_geo} and \autoref{eq:ldfslp_iso}: 
    312312 
    313313\[ 
     
    323323The major issue remaining is in the specification of the boundary conditions. 
    324324The same boundary conditions are chosen as those used for lateral diffusion along model level surfaces, 
    325 \ie using the shear computed along the model levels and with no additional friction at the ocean bottom 
     325\ie\ using the shear computed along the model levels and with no additional friction at the ocean bottom 
    326326(see \autoref{sec:LBC_coast}). 
    327327 
     
    420420 
    421421The 3D space variation of the mixing coefficient is simply the combination of the 1D and 2D cases above, 
    422 \ie a hyperbolic tangent variation with depth associated with a grid size dependence of 
     422\ie\ a hyperbolic tangent variation with depth associated with a grid size dependence of 
    423423the magnitude of the coefficient.  
    424424 
     
    527527the formulation of which depends on the slopes of iso-neutral surfaces. 
    528528Contrary to the case of iso-neutral mixing, the slopes used here are referenced to the geopotential surfaces, 
    529 \ie \autoref{eq:ldfslp_geo} is used in $z$-coordinates, 
     529\ie\ \autoref{eq:ldfslp_geo} is used in $z$-coordinates, 
    530530and the sum \autoref{eq:ldfslp_geo} + \autoref{eq:ldfslp_iso} in $s$-coordinates. 
    531531 
    532 If isopycnal mixing is used in the standard way, \ie \np{ln\_traldf\_triad}\forcode{ = .false.}, the eddy induced velocity is given by:  
     532If isopycnal mixing is used in the standard way, \ie\ \np{ln\_traldf\_triad}\forcode{ = .false.}, the eddy induced velocity is given by:  
    533533\begin{equation} 
    534534  \label{eq:ldfeiv} 
     
    539539  \end{split} 
    540540\end{equation} 
    541 where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{nn\_aei\_ijk\_t} \ngn{namtra\_eiv} namelist parameter.  
     541where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{nn\_aei\_ijk\_t} \nam{tra\_eiv} namelist parameter.  
    542542The three components of the eddy induced velocity are computed in \rou{ldf\_eiv\_trp} and 
    543543added to the eulerian velocity in \rou{tra\_adv} where tracer advection is performed. 
     
    570570%-------------------------------------------------------------------------------------------------------------- 
    571571 
    572 If  \np{ln\_mle}\forcode{ = .true.} in \ngn{namtra\_mle} namelist, a parameterization of the mixing due to unresolved mixed layer instabilities is activated (\citet{foxkemper.ferrari_JPO08}). Additional transport is computed in \rou{ldf\_mle\_trp} and added to the eulerian transport in \rou{tra\_adv} as done for eddy induced advection. 
     572If  \np{ln\_mle}\forcode{ = .true.} in \nam{tra\_mle} namelist, a parameterization of the mixing due to unresolved mixed layer instabilities is activated (\citet{foxkemper.ferrari_JPO08}). Additional transport is computed in \rou{ldf\_mle\_trp} and added to the eulerian transport in \rou{tra\_adv} as done for eddy induced advection. 
    573573 
    574574\colorbox{yellow}{TBC} 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_OBS.tex

    r11316 r11435  
    88\label{chap:OBS} 
    99 
    10 \minitoc 
     10\chaptertoc 
    1111 
    1212\vfill 
     
    1515\begin{tabular}{l||l|m{0.65\linewidth}} 
    1616    Release   & Author        & Modifications \\ 
    17     {\em 4.0} & {\em D. J. Lea} & {\em \NEMO 4.0 updates}  \\ 
     17    {\em 4.0} & {\em D. J. Lea} & {\em \NEMO\ 4.0 updates}  \\ 
    1818    {\em 3.6} & {\em M. Martin, A. Ryan} & {\em Add averaging operator, standalone obs oper} \\ 
    1919    {\em 3.4} & {\em D. J. Lea, M. Martin, ...} & {\em Initial version}  \\ 
     
    3232The OBS code is called from \mdl{nemogcm} for model initialisation and to calculate the model equivalent values for observations on the 0th time step. 
    3333The code is then called again after each time step from \mdl{step}. 
    34 The code is only activated if the \ngn{namobs} namelist logical \np{ln\_diaobs} is set to true. 
     34The code is only activated if the \nam{obs} namelist logical \np{ln\_diaobs} is set to true. 
    3535 
    3636For all data types a 2D horizontal interpolator or averager is needed to 
     
    4040This now works in a generalised vertical coordinate system. 
    4141 
    42 Some profile observation types (\eg tropical moored buoys) are made available as daily averaged quantities. 
     42Some profile observation types (\eg\ tropical moored buoys) are made available as daily averaged quantities. 
    4343The observation operator code can be set-up to calculate the equivalent daily average model temperature fields using 
    4444the \np{nn\_profdavtypes} namelist array. 
     
    4848Otherwise (by default) the model value from the nearest time step to the observation time is used. 
    4949 
    50 The code is controlled by the namelist \ngn{namobs}. 
     50The code is controlled by the namelist \nam{obs}. 
    5151See the following sections for more details on setting up the namelist. 
    5252 
     
    6868In this section an example of running the observation operator code is described using 
    6969profile observation data which can be freely downloaded. 
    70 It shows how to adapt an existing run and build of \NEMO to run the observation operator. Note also the observation operator and the assimilation increments code are run in the \np{ORCA2\_ICE\_OBS} SETTE test. 
     70It shows how to adapt an existing run and build of \NEMO\ to run the observation operator. Note also the observation operator and the assimilation increments code are run in the ORCA2\_ICE\_OBS SETTE test. 
    7171 
    7272\begin{enumerate} 
    73 \item Compile NEMO. 
     73\item Compile \NEMO. 
    7474 
    7575\item Download some EN4 data from \href{http://www.metoffice.gov.uk/hadobs}{www.metoffice.gov.uk/hadobs}. 
     
    7777  the observation operator compares the model and observations for a matching date and time. 
    7878 
    79 \item Compile the OBSTOOLS code in the \np{tools} directory using: 
     79\item Compile the OBSTOOLS code in the \path{tools} directory using: 
    8080\begin{cmds} 
    8181./maketools -n OBSTOOLS -m [ARCH] 
    8282\end{cmds} 
    8383 
    84 replacing \np{[ARCH]} with the build architecture file for your machine. Note the tools are checked out from a separate repository under \np{utils/tools}. 
     84replacing \texttt{[ARCH]} with the build architecture file for your machine. Note the tools are checked out from a separate location of the repository (under \path{/utils/tools}). 
    8585 
    8686\item Convert the EN4 data into feedback format: 
     
    8989\end{cmds} 
    9090 
    91 \item Include the following in the \NEMO namelist to run the observation operator on this data: 
     91\item Include the following in the \NEMO\ namelist to run the observation operator on this data: 
    9292\end{enumerate} 
    9393 
    94 Options are defined through the \ngn{namobs} namelist variables. 
     94Options are defined through the \nam{obs} namelist variables. 
    9595The options \np{ln\_t3d} and \np{ln\_s3d} switch on the temperature and salinity profile observation operator code. 
    9696The filename or array of filenames are specified using the \np{cn\_profbfiles} variable. 
     
    114114\label{sec:OBS_details} 
    115115 
    116 Here we show a more complete example namelist \ngn{namobs} and also show the NetCDF headers of 
     116Here we show a more complete example namelist \nam{obs} and also show the NetCDF headers of 
    117117the observation files that may be used with the observation operator. 
    118118 
     
    554554the model equivalent of the observation is calculated by interpolating from 
    555555the four surrounding grid points to the observation location. 
    556 Some satellite observations (\eg microwave satellite SST data, or satellite SSS data) have a footprint which 
     556Some satellite observations (\eg\ microwave satellite SST data, or satellite SSS data) have a footprint which 
    557557is similar in size or larger than the model grid size (particularly when the grid size is small). 
    558558In those cases the model counterpart should be calculated by averaging the model grid points over 
    559559the same size as the footprint. 
    560 \NEMO therefore has the capability to specify either an interpolation or an averaging 
     560\NEMO\ therefore has the capability to specify either an interpolation or an averaging 
    561561(for surface observation types only). 
    562562 
     
    571571\item \np{nn\_2dint}\forcode{ = 4}: Polynomial interpolation 
    572572\item \np{nn\_2dint}\forcode{ = 5}: Radial footprint averaging with diameter specified in the namelist as 
    573   \np{rn\_[var]\_avglamscl} in degrees or metres (set using \np{ln\_[var]\_fp\_indegs}) 
     573  \texttt{rn\_[var]\_avglamscl} in degrees or metres (set using \texttt{ln\_[var]\_fp\_indegs}) 
    574574\item \np{nn\_2dint}\forcode{ = 6}: Rectangular footprint averaging with E/W and N/S size specified in 
    575   the namelist as \np{rn\_[var]\_avglamscl} and \np{rn\_[var]\_avgphiscl} in degrees or metres 
    576   (set using \np{ln\_[var]\_fp\_indegs}) 
     575  the namelist as \texttt{rn\_[var]\_avglamscl} and \texttt{rn\_[var]\_avgphiscl} in degrees or metres 
     576  (set using \texttt{ln\_[var]\_fp\_indegs}) 
    577577\end{itemize} 
    578 Replace \np{[var]} in the last two options with the observation type (sla, sst, sss or sic) for 
     578Replace \texttt{[var]} in the last two options with the observation type (sla, sst, sss or sic) for 
    579579which the averaging is to be performed (see namelist example above). 
    580580The \np{nn\_2dint} default option can be overridden for surface observation types using 
    581 namelist values \np{nn\_2dint\_[var]} where \np{[var]} is the observation type. 
    582  
    583 Below is some more detail on the various options for interpolation and averaging available in NEMO. 
     581namelist values \texttt{nn\_2dint\_[var]} where \texttt{[var]} is the observation type. 
     582 
     583Below is some more detail on the various options for interpolation and averaging available in \NEMO. 
    584584 
    585585\subsubsection{Horizontal interpolation} 
     
    588588the four nearest neighbouring model grid points ${\mathrm A}$, ${\mathrm B}$, ${\mathrm C}$ and ${\mathrm D}$ with 
    589589longitude and latitude ($\lambda_{\mathrm A}$, $\phi_{\mathrm A}$),($\lambda_{\mathrm B}$, $\phi_{\mathrm B}$) etc. 
    590 All horizontal interpolation methods implemented in \NEMO estimate the value of a model variable $x$ at point $P$ as 
     590All horizontal interpolation methods implemented in \NEMO\ estimate the value of a model variable $x$ at point $P$ as 
    591591a weighted linear combination of the values of the model variables at the grid points ${\mathrm A}$, ${\mathrm B}$ etc.: 
    592592 
     
    628628   and $M$ corresponds to $B$, $C$ or $D$. 
    629629   A more stable form of the great-circle distance formula for small distances ($x$ near 1) 
    630    involves the arcsine function (\eg see p.~101 of \citet{daley.barker_bk01}: 
     630   involves the arcsine function (\eg\ see p.~101 of \citet{daley.barker_bk01}: 
    631631 
    632632   \begin{alignat*}{2} 
     
    722722\subsection{Grid search} 
    723723 
    724 For many grids used by the \NEMO model, such as the ORCA family, the horizontal grid coordinates $i$ and $j$ are not simple functions of latitude and longitude. 
     724For many grids used by the \NEMO\ model, such as the ORCA family, the horizontal grid coordinates $i$ and $j$ are not simple functions of latitude and longitude. 
    725725Therefore, it is not always straightforward to determine the grid points surrounding any given observational position. 
    726726Before the interpolation can be performed, a search algorithm is then required to determine the corner points of 
     
    759759\end{align*} 
    760760point in the opposite direction to the unit normal $\widehat{\mathbf k}$ 
    761 (\ie that the coefficients of $\widehat{\mathbf k}$ are negative), 
     761(\ie\ that the coefficients of $\widehat{\mathbf k}$ are negative), 
    762762where ${{\mathbf r}_{}}_{\mathrm PA}$, ${{\mathbf r}_{}}_{\mathrm PB}$, etc. correspond to 
    763763the vectors between points P and A, P and B, etc.. 
     
    775775For horizontal interpolation, there is the basic problem that 
    776776the observations are unevenly distributed on the globe. 
    777 In \NEMO the model grid is divided into subgrids (or domains) where 
     777In \NEMO\ the model grid is divided into subgrids (or domains) where 
    778778each subgrid is executed on a single processing element with explicit message passing for 
    779779exchange of information along the domain boundaries when running on a massively parallel processor (MPP) system. 
     
    807807any MPP communication. 
    808808This is under the assumption that we are dealing with point observations and only using a $2 \times 2$ grid-point stencil for 
    809 the interpolation (\eg bilinear interpolation). 
     809the interpolation (\eg\ bilinear interpolation). 
    810810For higher order interpolation schemes this is no longer valid. 
    811811A disadvantage with the above scheme is that the number of observations on each processor can be very different. 
     
    844844At the bottom boundary, this is done using the land-ocean mask. 
    845845 
    846 For profile observation types we do both vertical and horizontal interpolation. \NEMO has a generalised vertical coordinate system this means the vertical level depths can vary with location. Therefore, it is necessary first to perform vertical interpolation of the model value to the observation depths for each of the four surrounding grid points. After this the model values, at these points, at the observation depth, are horizontally interpolated to the observation location. 
     846For profile observation types we do both vertical and horizontal interpolation. \NEMO\ has a generalised vertical coordinate system this means the vertical level depths can vary with location. Therefore, it is necessary first to perform vertical interpolation of the model value to the observation depths for each of the four surrounding grid points. After this the model values, at these points, at the observation depth, are horizontally interpolated to the observation location. 
    847847 
    848848\newpage 
     
    892892 
    893893The simplest way to use the executable is to edit and append the \textbf{sao.nml} namelist to 
    894 a full \NEMO namelist and then to run the executable as if it were nemo.exe. 
     894a full \NEMO\ namelist and then to run the executable as if it were nemo.exe. 
    895895 
    896896%-------------------------------------------------------------------------------------------------------- 
     
    898898%-------------------------------------------------------------------------------------------------------- 
    899899\subsection{Configuring the standalone observation operator} 
    900 The observation files and settings understood by \ngn{namobs} have been outlined in the online observation operator section. 
    901 In addition is a further namelist \ngn{namsao} which used to set the input model fields for the SAO 
     900The observation files and settings understood by \nam{obs} have been outlined in the online observation operator section. 
     901In addition is a further namelist \nam{sao} which used to set the input model fields for the SAO 
    902902 
    903903\subsubsection{Single field} 
     
    909909\textbf{votemper}, \textbf{vosaline} and optionally \textbf{sshn} present. 
    910910 
    911 For each field read there must be an entry in the \ngn{namsao} namelist specifying 
     911For each field read there must be an entry in the \nam{sao} namelist specifying 
    912912the name of the file to read and the index along the \emph{time\_counter}. 
    913913For example, to read the second time counter from a single file the namelist would be. 
     
    958958However, just to note, it is possible to extend this approach by comparing multiple forecasts, analyses, persisted analyses and 
    959959climatologies with the same set of observations. 
    960 This approach is referred to as \emph{Class 4} since it is the fourth metric defined by the GODAE intercomparison project. This requires multiple runs of the SAO and running an additional utility (not currently in the \NEMO repository) to combine the feedback files into one class 4 file. 
     960This approach is referred to as \emph{Class 4} since it is the fourth metric defined by the GODAE intercomparison project. This requires multiple runs of the SAO and running an additional utility (not currently in the \NEMO\ repository) to combine the feedback files into one class 4 file. 
    961961 
    962962\newpage 
     
    966966 
    967967For convenience some tools for viewing and processing of observation and feedback files are provided in 
    968 the \NEMO repository. 
     968the \NEMO\ repository. 
    969969These tools include OBSTOOLS which are a collection of \fortran programs which are helpful to deal with feedback files. 
    970970They do such tasks as observation file conversion, printing of file contents, 
     
    976976\subsection{Obstools} 
    977977 
    978 A series of \fortran utilities is provided with \NEMO called OBSTOOLS. 
     978A series of \fortran utilities is provided with \NEMO\ called OBSTOOLS. 
    979979This are helpful in handling observation files and the feedback file output from the observation operator. A brief description of some of the utilities follows 
    980980 
     
    10001000 
    10011001The program fbcomb combines multiple feedback files produced by individual processors in 
    1002 an MPI run of \NEMO into a single feedback file. 
     1002an MPI run of \NEMO\ into a single feedback file. 
    10031003It is called in the following way: 
    10041004 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_SBC.tex

    r11338 r11435  
    44 
    55% ================================================================ 
    6 % Chapter —— Surface Boundary Condition (SBC, SAS, ISF, ICB)  
     6% Chapter —— Surface Boundary Condition (SBC, SAS, ISF, ICB) 
    77% ================================================================ 
    88\chapter{Surface Boundary Condition (SBC, SAS, ISF, ICB)} 
    99\label{chap:SBC} 
    10 \minitoc 
     10\chaptertoc 
    1111 
    1212\newpage 
     
    3333 
    3434Four different ways are available to provide the seven fields to the ocean. They are controlled by 
    35 namelist \ngn{namsbc} variables: 
     35namelist \nam{sbc} variables: 
    3636 
    3737\begin{itemize} 
     
    4646  a user defined formulation (\np{ln\_usr}\forcode{ = .true.}). 
    4747\end{itemize} 
    48  
    4948 
    5049The frequency at which the forcing fields have to be updated is given by the \np{nn\_fsbc} namelist parameter. 
     
    8887  a neutral drag coefficient is read from an external wave model (\np{ln\_cdgw}\forcode{ = .true.}), 
    8988\item 
    90   the Stokes drift from an external wave model is accounted for (\np{ln\_sdw}\forcode{ = .true.}),  
    91 \item 
    92   the choice of the Stokes drift profile parameterization (\np{nn\_sdrift}\forcode{ = 0..2}),  
     89  the Stokes drift from an external wave model is accounted for (\np{ln\_sdw}\forcode{ = .true.}), 
     90\item 
     91  the choice of the Stokes drift profile parameterization (\np{nn\_sdrift}\forcode{ = 0..2}), 
    9392\item 
    9493  the surface stress given to the ocean is modified by surface waves (\np{ln\_tauwoc}\forcode{ = .true.}), 
     
    9897  the Stokes-Coriolis term is included (\np{ln\_stcor}\forcode{ = .true.}), 
    9998\item 
    100   the light penetration in the ocean (\np{ln\_traqsr}\forcode{ = .true.} with namelist \ngn{namtra\_qsr}), 
    101 \item 
    102   the atmospheric surface pressure gradient effect on ocean and ice dynamics (\np{ln\_apr\_dyn}\forcode{ = .true.} with namelist \ngn{namsbc\_apr}), 
     99  the light penetration in the ocean (\np{ln\_traqsr}\forcode{ = .true.} with namelist \nam{tra\_qsr}), 
     100\item 
     101  the atmospheric surface pressure gradient effect on ocean and ice dynamics (\np{ln\_apr\_dyn}\forcode{ = .true.} with namelist \nam{sbc\_apr}), 
    103102\item 
    104103  the effect of sea-ice pressure on the ocean (\np{ln\_ice\_embd}\forcode{ = .true.}). 
     
    106105 
    107106In this chapter, we first discuss where the surface boundary conditions appear in the model equations. 
    108 Then we present the three ways of providing the surface boundary conditions,  
    109 followed by the description of the atmospheric pressure and the river runoff.  
     107Then we present the three ways of providing the surface boundary conditions, 
     108followed by the description of the atmospheric pressure and the river runoff. 
    110109Next, the scheme for interpolation on the fly is described. 
    111110Finally, the different options that further modify the fluxes applied to the ocean are discussed. 
    112111One of these is modification by icebergs (see \autoref{sec:ICB_icebergs}), 
    113112which act as drifting sources of fresh water. 
    114 Another example of modification is that due to the ice shelf melting/freezing (see \autoref{sec:SBC_isf}),  
     113Another example of modification is that due to the ice shelf melting/freezing (see \autoref{sec:SBC_isf}), 
    115114which provides additional sources of fresh water. 
    116115 
     
    127126the momentum vertical mixing trend (see \autoref{eq:dynzdf_sbc} in \autoref{sec:DYN_zdf}). 
    128127As such, it has to be provided as a 2D vector interpolated onto the horizontal velocity ocean mesh, 
    129 \ie resolved onto the model (\textbf{i},\textbf{j}) direction at $u$- and $v$-points. 
     128\ie\ resolved onto the model (\textbf{i},\textbf{j}) direction at $u$- and $v$-points. 
    130129 
    131130The surface heat flux is decomposed into two parts, a non solar and a solar heat flux, 
    132131$Q_{ns}$ and $Q_{sr}$, respectively. 
    133132The former is the non penetrative part of the heat flux 
    134 (\ie the sum of sensible, latent and long wave heat fluxes plus 
     133(\ie\ the sum of sensible, latent and long wave heat fluxes plus 
    135134the heat content of the mass exchange between the ocean and sea-ice). 
    136135It is applied in \mdl{trasbc} module as a surface boundary condition trend of 
     
    141140\np{ln\_traqsr}\forcode{ = .true.}. 
    142141The way the light penetrates inside the water column is generally a sum of decreasing exponentials 
    143 (see \autoref{subsec:TRA_qsr}).  
     142(see \autoref{subsec:TRA_qsr}). 
    144143 
    145144The surface freshwater budget is provided by the \textit{emp} field. 
     
    148147It affects the ocean in two different ways: 
    149148$(i)$  it changes the volume of the ocean, and therefore appears in the sea surface height equation as      %GS: autoref ssh equation to be added 
    150 a volume flux, and  
     149a volume flux, and 
    151150$(ii)$ it changes the surface temperature and salinity through the heat and salt contents of 
    152151the mass exchanged with atmosphere, sea-ice and ice shelves. 
     
    155154%\colorbox{yellow}{Miss: } 
    156155% 
    157 %A extensive description of all namsbc namelist (parameter that have to be  
     156%A extensive description of all namsbc namelist (parameter that have to be 
    158157%created!) 
    159158% 
    160 %Especially the \np{nn\_fsbc}, the \mdl{sbc\_oce} module (fluxes + mean sst sss ssu  
    161 %ssv) \ie information required by flux computation or sea-ice 
     159%Especially the \np{nn\_fsbc}, the \mdl{sbc\_oce} module (fluxes + mean sst sss ssu 
     160%ssv) \ie\ information required by flux computation or sea-ice 
    162161% 
    163 %\mdl{sbc\_oce} containt the definition in memory of the 7 fields (6+runoff), add  
     162%\mdl{sbc\_oce} containt the definition in memory of the 7 fields (6+runoff), add 
    164163%a word on runoff: included in surface bc or add as lateral obc{\ldots}. 
    165164% 
    166165%Sbcmod manage the ``providing'' (fourniture) to the ocean the 7 fields 
    167166% 
    168 %Fluxes update only each nf{\_}sbc time step (namsbc) explain relation  
    169 %between nf{\_}sbc and nf{\_}ice, do we define nf{\_}blk??? ? only one  
    170 %nf{\_}sbc 
     167%Fluxes update only each nf\_sbc time step (namsbc) explain relation 
     168%between nf\_sbc and nf\_ice, do we define nf\_blk??? ? only one 
     169%nf\_sbc 
    171170% 
    172171%Explain here all the namlist namsbc variable{\ldots}. 
    173 %  
     172% 
    174173% explain : use or not of surface currents 
    175174% 
     
    177176 
    178177The ocean model provides, at each time step, to the surface module (\mdl{sbcmod}) 
    179 the surface currents, temperature and salinity.   
     178the surface currents, temperature and salinity. 
    180179These variables are averaged over \np{nn\_fsbc} time-step (\autoref{tab:ssm}), and 
    181180these averaged fields are used to compute the surface fluxes at the frequency of \np{nn\_fsbc} time-steps. 
     
    197196      Ocean variables provided by the ocean to the surface module (SBC). 
    198197      The variable are averaged over \np{nn\_fsbc} time-step, 
    199       \ie the frequency of computation of surface fluxes. 
     198      \ie\ the frequency of computation of surface fluxes. 
    200199    } 
    201200  \end{center} 
     
    203202%-------------------------------------------------------------------------------------------------------------- 
    204203 
    205 %\colorbox{yellow}{Penser a} mettre dans le restant l'info nn{\_}fsbc ET nn{\_}fsbc*rdt de sorte de reinitialiser la moyenne si on change la frequence ou le pdt 
    206  
    207  
    208  
    209 % ================================================================ 
    210 %       Input Data  
     204%\colorbox{yellow}{Penser a} mettre dans le restant l'info nn\_fsbc ET nn\_fsbc*rdt de sorte de reinitialiser la moyenne si on change la frequence ou le pdt 
     205 
     206 
     207 
     208% ================================================================ 
     209%       Input Data 
    211210% ================================================================ 
    212211\section{Input data generic interface} 
     
    216215(2D or 3D fields, like surface forcing or ocean T and S) are specified in \NEMO. 
    217216This task is achieved by \mdl{fldread}. 
    218 The module is designed with four main objectives in mind:  
     217The module is designed with four main objectives in mind: 
    219218\begin{enumerate} 
    220219\item 
     
    227226\item 
    228227  provide a simple user interface and a rather simple developer interface by 
    229   limiting the number of prerequisite informations.  
     228  limiting the number of prerequisite informations. 
    230229\end{enumerate} 
    231230 
     
    238237and simply call \rou{fld\_read} to obtain the desired input field at the model time-step and grid points. 
    239238 
    240 The only constraints are that the input file is a NetCDF file, the file name follows a nomenclature  
     239The only constraints are that the input file is a NetCDF file, the file name follows a nomenclature 
    241240(see \autoref{subsec:SBC_fldread}), the period it cover is one year, month, week or day, and, 
    242241if on-the-fly interpolation is used, a file of weights must be supplied (see \autoref{subsec:SBC_iof}). 
     
    256255The structure associated with an input variable contains the following information: 
    257256\begin{forlines} 
    258 !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !  
     257!  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
    259258!             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      ! 
    260259\end{forlines} 
    261 where  
    262 \begin{description}   
     260where 
     261\begin{description} 
    263262\item[File name]: 
    264263  the stem name of the NetCDF file to be opened. 
    265264  This stem will be completed automatically by the model, with the addition of a '.nc' at its end and 
    266265  by date information and possibly a prefix (when using AGRIF). 
    267   Tab.\autoref{tab:fldread} provides the resulting file name in all possible cases according to 
     266  \autoref{tab:fldread} provides the resulting file name in all possible cases according to 
    268267  whether it is a climatological file or not, and to the open/close frequency (see below for definition). 
    269268 
     
    283282      The stem name is assumed to be 'fn'. 
    284283      For weekly files, the 'LLL' corresponds to the first three letters of the first day of the week 
    285       (\ie 'sun','sat','fri','thu','wed','tue','mon'). 
     284      (\ie\ 'sun','sat','fri','thu','wed','tue','mon'). 
    286285      The 'YYYY', 'MM' and 'DD' should be replaced by the actual year/month/day, always coded with 4 or 2 digits. 
    287286      Note that (1) in mpp, if the file is split over each subdomain, the suffix '.nc' is replaced by '\_PPPP.nc', 
     
    291290  \end{table} 
    292291%-------------------------------------------------------------------------------------------------------------- 
    293    
     292 
    294293 
    295294\item[Record frequency]: 
     
    311310  Records are assumed to be dated at the middle of the forcing period. 
    312311  For example, when using a daily forcing with time interpolation, 
    313   linear interpolation will be performed between mid-day of two consecutive days.  
     312  linear interpolation will be performed between mid-day of two consecutive days. 
    314313 
    315314\item[Climatological forcing]: 
     
    317316  or an interannual forcing which will requires additional files if 
    318317  the period covered by the simulation exceeds the one of the file.