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

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

Changeset 9393


Ignore:
Timestamp:
2018-03-13T15:00:56+01:00 (6 years ago)
Author:
nicolasmartin
Message:

Cleaning of section headings, reinstating the index by mixing \np and \forcode macros, continued conversion of source code inclusions

Location:
branches/2017/dev_merge_2017/DOC
Files:
1 added
30 edited

Legend:

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

    r9388 r9393  
    77 
    88latex       ${latex_opts}           ${latex_file} 
    9 makeindex   -s ${latex_file}.sty    ${latex_file} 
     9makeindex   -s ${latex_file}.ist    ${latex_file} 
    1010bibtex                              ${latex_file} 
     11latex       ${latex_opts}           ${latex_file} 
    1112 
    1213pdflatex    ${latex_opts}           ${latex_file} 
  • branches/2017/dev_merge_2017/DOC/clean.sh

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

    r9389 r9393  
    128128\newcommand{\NEMO}{\textit{NEMO}\xspace} 
    129129 
    130 \newcommand{\ifile}[1]{\textit{   #1.nc}\index{Input NetCDF files!#1.nc}} 
    131 \newcommand{   \hf}[1]{\textit{  #1.h90}\index{             h90 file!#1}} 
    132 \newcommand{  \key}[1]{\textbf{ key\_#1}\index{        CPP keys!key\_#1}} 
    133 \newcommand{  \mdl}[1]{\textit{  #1.F90}\index{              Modules!#1}} 
    134 \newcommand{  \ngn}[1]{\textit{      #1}\index{  Namelist Group Name!#1}} 
    135 \newcommand{  \rou}[1]{\textit{      #1}\index{             Routines!#1}} 
    136  
    137 \newcommand{\jp}[1]{\forcode{#1}\index{  Model parameters!#1}} 
    138 \newcommand{\np}[1]{\forcode{#1}\index{Namelist variables!#1}} 
     130\newcommand{\hf}[1]{\textit{#1.h90}\index{h90 file!#1}} 
     131\newcommand{\ifile}[1]{\textit{#1.nc}\index{Input NetCDF files!#1.nc}} 
     132\newcommand{\jp}[1]{\textit{#1}\index{Model parameters!#1}} 
     133\newcommand{\key}[1]{\textbf{key\_#1}\index{CPP keys!key\_#1}} 
     134\newcommand{\mdl}[1]{\textit{#1.F90}\index{Modules!#1}} 
     135\newcommand{\ngn}[1]{\textit{#1}\index{Namelist Group Name!#1}} 
     136\newcommand{\np}[1]{\textit{#1}\index{Namelist variables!#1}} 
     137\newcommand{\rou}[1]{\textit{#1}\index{Routines!#1}} 
    139138 
    140139\newcommand{\grad}{\nabla} 
  • branches/2017/dev_merge_2017/DOC/tex_main/NEMO_manual.tex

    r9389 r9393  
    142142%% Index 
    143143 
    144 %\addcontentsline{toc}{chapter}{Index} 
     144\addcontentsline{toc}{chapter}{Index} 
    145145\printindex 
    146146 
     
    148148%% Bibliography 
    149149 
     150\addcontentsline{toc}{chapter}{Bibliography} 
    150151\bibliography{../tex_main/NEMO_manual} 
    151152 
  • branches/2017/dev_merge_2017/DOC/tex_sub/abstract_foreword.tex

    r9389 r9393  
    3131\chapter*{Disclaimer} 
    3232 
    33 Like all components of NEMO, the ocean component is developed under the CECILL license,  
     33Like all components of NEMO, the ocean component is developed under the \href{http://www.cecill.info/}{CECILL license},  
    3434which is a French adaptation of the GNU GPL (General Public License). Anyone may use it  
    3535freely for research purposes, and is encouraged to communicate back to the NEMO team  
  • branches/2017/dev_merge_2017/DOC/tex_sub/annex_A.tex

    r9389 r9393  
    1515% Chain rule 
    1616% ================================================================ 
    17 \section{The chain rule for $s-$coordinates} 
     17\section{Chain rule for $s-$coordinates} 
    1818\label{Apdx_A_continuity} 
    1919 
     
    6464% continuity equation 
    6565% ================================================================ 
    66 \section{Continuity Equation in $s-$coordinates} 
     66\section{Continuity equation in $s-$coordinates} 
    6767\label{Apdx_A_continuity} 
    6868 
     
    183183% momentum equation 
    184184% ================================================================ 
    185 \section{Momentum Equation in $s-$coordinate} 
     185\section{Momentum equation in $s-$coordinate} 
    186186\label{Apdx_A_momentum} 
    187187 
     
    515515% Tracer equation 
    516516% ================================================================ 
    517 \section{Tracer Equation} 
     517\section{Tracer equation} 
    518518\label{Apdx_A_tracer} 
    519519 
  • branches/2017/dev_merge_2017/DOC/tex_sub/annex_B.tex

    r9389 r9393  
    1515% Horizontal/Vertical 2nd Order Tracer Diffusive Operators 
    1616% ================================================================ 
    17 \section{Horizontal/Vertical 2nd Order Tracer Diffusive Operators} 
     17\section{Horizontal/Vertical $2^{nd}$ order tracer diffusive operators} 
    1818\label{Apdx_B_1} 
    1919 
     
    138138% Isopycnal/Vertical 2nd Order Tracer Diffusive Operators 
    139139% ================================================================ 
    140 \section{Iso/diapycnal 2nd Order Tracer Diffusive Operators} 
     140\section{Iso/Diapycnal $2^{nd}$ order tracer diffusive operators} 
    141141\label{Apdx_B_2} 
    142142 
     
    288288% Lateral/Vertical Momentum Diffusive Operators 
    289289% ================================================================ 
    290 \section{Lateral/Vertical Momentum Diffusive Operators} 
     290\section{Lateral/Vertical momentum diffusive operators} 
    291291\label{Apdx_B_3} 
    292292 
  • branches/2017/dev_merge_2017/DOC/tex_sub/annex_C.tex

    r9392 r9393  
    324324% Discrete Total energy Conservation : vector invariant form 
    325325% ================================================================ 
    326 \section{Discrete total energy conservation : vector invariant form} 
     326\section{Discrete total energy conservation: vector invariant form} 
    327327\label{Apdx_C.1} 
    328328 
     
    363363%       Vorticity Term with ENE scheme 
    364364% ------------------------------------------------------------------------------------------------------------- 
    365 \subsubsection{Vorticity Term with ENE scheme (\protect\np{ln_dynvor_ene}=.true.)} 
     365\subsubsection{Vorticity term with ENE scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})} 
    366366\label{Apdx_C_vorENE}  
    367367 
     
    400400%       Vorticity Term with EEN scheme 
    401401% ------------------------------------------------------------------------------------------------------------- 
    402 \subsubsection{Vorticity Term with EEN scheme (\protect\np{ln_dynvor_een}=.true.)} 
     402\subsubsection{Vorticity term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} 
    403403\label{Apdx_C_vorEEN}  
    404404 
     
    470470%       Gradient of Kinetic Energy / Vertical Advection 
    471471% ------------------------------------------------------------------------------------------------------------- 
    472 \subsubsection{Gradient of Kinetic Energy / Vertical Advection} 
     472\subsubsection{Gradient of kinetic energy / Vertical advection} 
    473473\label{Apdx_C_zad}  
    474474 
     
    579579%       Pressure Gradient Term 
    580580% ------------------------------------------------------------------------------------------------------------- 
    581 \subsection{Pressure Gradient Term} 
     581\subsection{Pressure gradient term} 
    582582\label{Apdx_C.1.4} 
    583583 
     
    732732% Discrete Total energy Conservation : flux form 
    733733% ================================================================ 
    734 \section{Discrete total energy conservation : flux form} 
     734\section{Discrete total energy conservation: flux form} 
    735735\label{Apdx_C.1} 
    736736 
     
    768768%       Coriolis plus ``metric'' Term 
    769769% ------------------------------------------------------------------------------------------------------------- 
    770 \subsubsection{Coriolis plus ``metric'' Term} 
     770\subsubsection{Coriolis plus ``metric'' term} 
    771771\label{Apdx_C.1.3.1}  
    772772 
     
    883883%       Vorticity Term with ENS scheme 
    884884% ------------------------------------------------------------------------------------------------------------- 
    885 \subsubsection{Vorticity Term with ENS scheme  (\protect\np{ln_dynvor_ens}=.true.)} 
     885\subsubsection{Vorticity term with ENS scheme  (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})} 
    886886\label{Apdx_C_vorENS}  
    887887 
     
    943943%       Vorticity Term with EEN scheme 
    944944% ------------------------------------------------------------------------------------------------------------- 
    945 \subsubsection{Vorticity Term with EEN scheme (\protect\np{ln_dynvor_een}=.true.)} 
     945\subsubsection{Vorticity Term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} 
    946946\label{Apdx_C_vorEEN}  
    947947 
     
    10161016% Conservation Properties on Tracers 
    10171017% ================================================================ 
    1018 \section{Conservation Properties on Tracers} 
     1018\section{Conservation properties on tracers} 
    10191019\label{Apdx_C.2} 
    10201020 
     
    10321032%       Advection Term 
    10331033% ------------------------------------------------------------------------------------------------------------- 
    1034 \subsection{Advection Term} 
     1034\subsection{Advection term} 
    10351035\label{Apdx_C.2.1} 
    10361036 
     
    10991099% Conservation Properties on Lateral Momentum Physics 
    11001100% ================================================================ 
    1101 \section{Conservation Properties on Lateral Momentum Physics} 
     1101\section{Conservation properties on lateral momentum physics} 
    11021102\label{Apdx_dynldf_properties} 
    11031103 
     
    11221122%       Conservation of Potential Vorticity 
    11231123% ------------------------------------------------------------------------------------------------------------- 
    1124 \subsection{Conservation of Potential Vorticity} 
     1124\subsection{Conservation of potential vorticity} 
    11251125\label{Apdx_C.3.1} 
    11261126 
     
    11561156%       Dissipation of Horizontal Kinetic Energy 
    11571157% ------------------------------------------------------------------------------------------------------------- 
    1158 \subsection{Dissipation of Horizontal Kinetic Energy} 
     1158\subsection{Dissipation of horizontal kinetic energy} 
    11591159\label{Apdx_C.3.2} 
    11601160 
     
    12081208%       Dissipation of Enstrophy 
    12091209% ------------------------------------------------------------------------------------------------------------- 
    1210 \subsection{Dissipation of Enstrophy} 
     1210\subsection{Dissipation of enstrophy} 
    12111211\label{Apdx_C.3.3} 
    12121212 
     
    12331233%       Conservation of Horizontal Divergence 
    12341234% ------------------------------------------------------------------------------------------------------------- 
    1235 \subsection{Conservation of Horizontal Divergence} 
     1235\subsection{Conservation of horizontal divergence} 
    12361236\label{Apdx_C.3.4} 
    12371237 
     
    12621262%       Dissipation of Horizontal Divergence Variance 
    12631263% ------------------------------------------------------------------------------------------------------------- 
    1264 \subsection{Dissipation of Horizontal Divergence Variance} 
     1264\subsection{Dissipation of horizontal divergence variance} 
    12651265\label{Apdx_C.3.5} 
    12661266 
     
    12881288% Conservation Properties on Vertical Momentum Physics 
    12891289% ================================================================ 
    1290 \section{Conservation Properties on Vertical Momentum Physics} 
     1290\section{Conservation properties on vertical momentum physics} 
    12911291\label{Apdx_C_4} 
    12921292 
     
    14601460% Conservation Properties on Tracer Physics 
    14611461% ================================================================ 
    1462 \section{Conservation Properties on Tracer Physics} 
     1462\section{Conservation properties on tracer physics} 
    14631463\label{Apdx_C.5} 
    14641464 
     
    14721472%       Conservation of Tracers 
    14731473% ------------------------------------------------------------------------------------------------------------- 
    1474 \subsection{Conservation of Tracers} 
     1474\subsection{Conservation of tracers} 
    14751475\label{Apdx_C.5.1} 
    14761476 
     
    15061506%       Dissipation of Tracer Variance 
    15071507% ------------------------------------------------------------------------------------------------------------- 
    1508 \subsection{Dissipation of Tracer Variance} 
     1508\subsection{Dissipation of tracer variance} 
    15091509\label{Apdx_C.5.2} 
    15101510 
  • branches/2017/dev_merge_2017/DOC/tex_sub/annex_D.tex

    r9389 r9393  
    4646% The program structure 
    4747% ================================================================ 
    48 \section{The program structure} 
     48\section{Program structure} 
    4949\label{Apdx_D_structure} 
    5050 
     
    106106% Naming Conventions 
    107107% ================================================================ 
    108 \section{Naming Conventions} 
     108\section{Naming conventions} 
    109109\label{Apdx_D_naming} 
    110110 
     
    200200% The program structure 
    201201% ================================================================ 
    202 \section{The program structure} 
    203 \label{Apdx_D_structure} 
    204  
    205 To be done.... 
     202%\section{Program structure} 
     203%label{Apdx_D_structure} 
     204 
     205%To be done.... 
    206206\end{document} 
  • branches/2017/dev_merge_2017/DOC/tex_sub/annex_E.tex

    r9392 r9393  
    1919%        UBS scheme   
    2020% ------------------------------------------------------------------------------------------------------------- 
    21 \section{Upstream Biased Scheme (UBS) (\protect\forcode{ln_traadv_ubs = .true.})} 
     21\section{Upstream Biased Scheme (UBS) (\protect\np{ln\_traadv\_ubs}\forcode{ = .true.})} 
    2222\label{TRA_adv_ubs} 
    2323 
     
    5959where the control of artificial diapycnal fluxes is of paramount importance.  
    6060It has therefore been preferred to evaluate the vertical flux using the TVD  
    61 scheme when \forcode{ln_traadv_ubs = .true.}. 
     61scheme when \np{ln\_traadv\_ubs}\forcode{ = .true.}. 
    6262 
    6363For stability reasons, in \eqref{Eq_tra_adv_ubs}, the first term which corresponds  
     
    188188%        Leap-Frog energetic   
    189189% ------------------------------------------------------------------------------------------------------------- 
    190 \section{Leap-Frog energetic } 
     190\section{Leapfrog energetic} 
    191191\label{LF} 
    192192 
     
    247247% Griffies' iso-neutral diffusion operator :  
    248248% ================================================================ 
    249 \subsection{Griffies' iso-neutral diffusion operator} 
     249\subsection{Griffies iso-neutral diffusion operator} 
    250250 
    251251Let try to define a scheme that get its inspiration from the \citet{Griffies_al_JPO98} 
     
    436436% Skew flux formulation for Eddy Induced Velocity :  
    437437% ================================================================ 
    438 \subsection{ Eddy induced velocity and Skew flux formulation} 
     438\subsection{Eddy induced velocity and skew flux formulation} 
    439439 
    440440When Gent and McWilliams [1990] diffusion is used (\key{traldf\_eiv} defined),  
     
    585585% Discrete Invariants of the iso-neutral diffrusion  
    586586% ================================================================ 
    587 \subsection{Discrete Invariants of the iso-neutral diffrusion} 
     587\subsection{Discrete invariants of the iso-neutral diffrusion} 
    588588\label{Apdx_Gf_operator} 
    589589 
     
    738738% Discrete Invariants of the skew flux formulation 
    739739% ================================================================ 
    740 \subsection{Discrete Invariants of the skew flux formulation} 
     740\subsection{Discrete invariants of the skew flux formulation} 
    741741\label{Apdx_eiv_skew} 
    742742 
  • branches/2017/dev_merge_2017/DOC/tex_sub/annex_iso.tex

    r9392 r9393  
    44% Iso-neutral diffusion : 
    55% ================================================================ 
    6 \chapter[Iso-neutral diffusion and eddy advection using 
    7 triads]{Iso-neutral diffusion and eddy advection using triads} 
     6\chapter{Iso-neutral diffusion and eddy advection using triads} 
    87\label{sec:triad} 
    98\minitoc 
     
    1514 
    1615Two scheme are available to perform the iso-neutral diffusion.  
    17 If the namelist logical \np{ln_traldf_triad} is set true,  
     16If the namelist logical \np{ln\_traldf\_triad} is set true,  
    1817\NEMO updates both active and passive tracers using the Griffies triad representation  
    1918of iso-neutral diffusion and the eddy-induced advective skew (GM) fluxes.  
    20 If the namelist logical \np{ln_traldf_iso} is set true,  
     19If the namelist logical \np{ln\_traldf\_iso} is set true,  
    2120the filtered version of Cox's original scheme (the Standard scheme) is employed (\S\ref{LDF_slp}).  
    2221In the present implementation of the Griffies scheme,  
    23 the advective skew fluxes are implemented even if \np{ln_traldf_eiv} is false. 
     22the advective skew fluxes are implemented even if \np{ln\_traldf\_eiv} is false. 
    2423 
    2524Values of iso-neutral diffusivity and GM coefficient are set as 
     
    3130The options specific to the Griffies scheme include: 
    3231\begin{description}[font=\normalfont] 
    33 \item[\np{ln_triad_iso}] See \S\ref{sec:triad:taper}. If this is set false (the default), then 
     32\item[\np{ln\_triad\_iso}] See \S\ref{sec:triad:taper}. If this is set false (the default), then 
    3433  `iso-neutral' mixing is accomplished within the surface mixed-layer 
    3534  along slopes linearly decreasing with depth from the value immediately below 
    3635  the mixed-layer to zero (flat) at the surface (\S\ref{sec:triad:lintaper}).  
    3736  This is the same treatment as used in the default implementation \S\ref{LDF_slp_iso}; Fig.~\ref{Fig_eiv_slp}.   
    38   Where \np{ln_triad_iso} is set true, the vertical skew flux is further reduced  
     37  Where \np{ln\_triad\_iso} is set true, the vertical skew flux is further reduced  
    3938  to ensure no vertical buoyancy flux, giving an almost pure 
    4039  horizontal diffusive tracer flux within the mixed layer. This is similar to 
    4140  the tapering suggested by \citet{Gerdes1991}. See \S\ref{sec:triad:Gerdes-taper} 
    42 \item[\np{ln_botmix_triad}] See \S\ref{sec:triad:iso_bdry}.  
     41\item[\np{ln\_botmix\_triad}] See \S\ref{sec:triad:iso_bdry}.  
    4342  If this is set false (the default) then the lateral diffusive fluxes 
    4443  associated with triads partly masked by topography are neglected.  
    4544  If it is set true, however, then these lateral diffusive fluxes are applied,  
    4645  giving smoother bottom tracer fields at the cost of introducing diapycnal mixing. 
    47 \item[\np{rn_sw_triad}]  blah blah to be added.... 
     46\item[\np{rn\_sw\_triad}]  blah blah to be added.... 
    4847\end{description} 
    4948The options shared with the Standard scheme include: 
    5049\begin{description}[font=\normalfont] 
    51 \item[\np{ln_traldf_msc}]   blah blah to be added 
    52 \item[\np{rn_slpmax}]  blah blah to be added 
     50\item[\np{ln\_traldf\_msc}]   blah blah to be added 
     51\item[\np{rn\_slpmax}]  blah blah to be added 
    5352\end{description} 
     53 
    5454\section{Triad formulation of iso-neutral diffusion} 
    5555\label{sec:triad:iso} 
     
    5757but formulated within the \NEMO framework, using scale factors rather than grid-sizes. 
    5858 
    59 \subsection{The iso-neutral diffusion operator} 
     59\subsection{Iso-neutral diffusion operator} 
    6060The iso-neutral second order tracer diffusive operator for small 
    6161angles between iso-neutral surfaces and geopotentials is given by 
     
    147147$w$-points but involves horizontal gradients defined at $u$-points. 
    148148 
    149 \subsection{The standard discretization} 
     149\subsection{Standard discretization} 
    150150The straightforward approach to discretize the lateral skew flux 
    151151\eqref{eq:triad:i13c} from tracer cell $i,k$ to $i+1,k$, introduced in 1995 
     
    185185($i.e.$ they enter the computation of density), but it does not work 
    186186for a passive tracer. 
     187 
    187188\subsection{Expression of the skew-flux in terms of triad slopes} 
    188189\citep{Griffies_al_JPO98} introduce a different discretization of the 
     
    278279and in \eqref{eq:triad:i31} $a'_{1}={\:}_i^k{\mathbb{A}_w}_{1/2}^{1/2}$. 
    279280 
    280 \subsection{The full triad fluxes} 
     281\subsection{Full triad fluxes} 
    281282A key property of iso-neutral diffusion is that it should not affect 
    282283the (locally referenced) density. In particular there should be no 
     
    368369  \end{pmatrix}. 
    369370\end{flalign} 
     371 
    370372\subsection{Ensuring the scheme does not increase tracer variance} 
    371373\label{sec:triad:variance} 
     
    471473\right) 
    472474\] 
     475 
    473476\subsection{Triad volumes in Griffes's scheme and in \NEMO} 
    474477To complete the discretization we now need only specify the triad 
     
    633636RHS of \eqref{eq:triad:iso_property3}. 
    634637\end{description} 
     638 
    635639\subsection{Treatment of the triads at the boundaries}\label{sec:triad:iso_bdry} 
    636640The triad slope can only be defined where both the grid boxes centred at 
     
    651655or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ $u$-point is 
    652656masked. The associated lateral fluxes (grey-black dashed line) are 
    653 masked if \forcode{ln_botmix_triad = .false.}, but left unmasked, 
    654 giving bottom mixing, if \forcode{ln_botmix_triad = .true.}. 
    655  
    656 The default option \forcode{ln_botmix_triad = .false.} is suitable when the 
    657 bbl mixing option is enabled (\key{trabbl}, with \forcode{nn_bbl_ldf = 1}), 
     657masked if \np{ln\_botmix\_triad}\forcode{ = .false.}, but left unmasked, 
     658giving bottom mixing, if \np{ln\_botmix\_triad}\forcode{ = .true.}. 
     659 
     660The default option \np{ln\_botmix\_triad}\forcode{ = .false.} is suitable when the 
     661bbl mixing option is enabled (\key{trabbl}, with \np{nn\_bbl\_ldf}\forcode{ = 1}), 
    658662or  for simple idealized  problems. For setups with topography without 
    659 bbl mixing, \forcode{ln_botmix_triad = .true.} may be necessary. 
     663bbl mixing, \np{ln\_botmix\_triad}\forcode{ = .true.} may be necessary. 
    660664% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    661665\begin{figure}[h] \begin{center} 
     
    674678      or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ $u$-point 
    675679      is masked. The associated lateral fluxes (grey-black dashed 
    676       line) are masked if \protect\np{botmix_triad}=.false., but left 
    677       unmasked, giving bottom mixing, if \protect\np{botmix_triad}=.true.} 
     680      line) are masked if \np{botmix\_triad}\forcode{ = .false.}, but left 
     681      unmasked, giving bottom mixing, if \np{botmix\_triad}\forcode{ = .true.}} 
    678682 \end{center} \end{figure} 
    679683% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     684 
    680685\subsection{ Limiting of the slopes within the interior}\label{sec:triad:limit} 
    681686As discussed in \S\ref{LDF_slp_iso}, iso-neutral slopes relative to 
     
    703708iso-neutral density flux that drives dianeutral mixing.  In particular this iso-neutral density flux 
    704709is always downwards, and so acts to reduce gravitational potential energy. 
     710 
    705711\subsection{Tapering within the surface mixed layer}\label{sec:triad:taper} 
    706  
    707712Additional tapering of the iso-neutral fluxes is necessary within the 
    708713surface mixed layer. When the Griffies triads are used, we offer two 
    709714options for this. 
     715 
    710716\subsubsection{Linear slope tapering within the surface mixed layer}\label{sec:triad:lintaper} 
    711717This is the option activated by the default choice 
    712 \forcode{ln_triad_iso = .false.}. Slopes $\tilde{r}_i$ relative to 
     718\np{ln\_triad\_iso}\forcode{ = .false.}. Slopes $\tilde{r}_i$ relative to 
    713719geopotentials are tapered linearly from their value immediately below the mixed layer to zero at the 
    714720surface, as described in option (c) of Fig.~\ref{Fig_eiv_slp}, to values 
     
    839845% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    840846 
    841 \subsubsection{Additional truncation of skew iso-neutral flux 
    842   components} 
     847\subsubsection{Additional truncation of skew iso-neutral flux components} 
    843848\label{sec:triad:Gerdes-taper} 
    844 The alternative option is activated by setting \np{ln_triad_iso} = 
     849The alternative option is activated by setting \np{ln\_triad\_iso} = 
    845850  true. This retains the same tapered slope $\rML$  described above for the 
    846851calculation of the $_{33}$ term of the iso-neutral diffusion tensor (the 
     
    884889\section{Eddy induced advection formulated as a skew flux}\label{sec:triad:skew-flux} 
    885890 
    886 \subsection{The continuous skew flux formulation}\label{sec:triad:continuous-skew-flux} 
     891\subsection{Continuous skew flux formulation}\label{sec:triad:continuous-skew-flux} 
    887892 
    888893 When Gent and McWilliams's [1990] diffusion is used, 
     
    917922it to the Eulerian velocity prior to computing the tracer 
    918923advection. This is implemented if \key{traldf\_eiv} is set in the 
    919 default implementation, where \np{ln_traldf_triad} is set 
     924default implementation, where \np{ln\_traldf\_triad} is set 
    920925false. This allows us to take advantage of all the advection schemes 
    921926offered for the tracers (see \S\ref{TRA_adv}) and not just a $2^{nd}$ 
     
    924929paramount importance. 
    925930 
    926 However, when \np{ln_traldf_triad} is set true, \NEMO instead 
     931However, when \np{ln\_traldf\_triad} is set true, \NEMO instead 
    927932implements eddy induced advection according to the so-called skew form 
    928933\citep{Griffies_JPO98}. It is based on a transformation of the advective fluxes 
     
    989994 preserves the tracer variance. 
    990995 
    991 \subsection{The discrete skew flux formulation} 
     996\subsection{Discrete skew flux formulation} 
    992997The skew fluxes in (\ref{eq:triad:eiv_skew_physical}, \ref{eq:triad:eiv_skew_ijk}), like the off-diagonal terms 
    993998(\ref{eq:triad:i13c}, \ref{eq:triad:i31c}) of the small angle diffusion tensor, are best 
     
    10301035operator as it uses the same definition for the slopes.  It also 
    10311036ensures the following two key properties. 
     1037 
    10321038\subsubsection{No change in tracer variance} 
    10331039The discretization conserves tracer variance, $i.e.$ it does not 
     
    11231129and $\triadt{i+1}{k}{R}{-1/2}{1/2}$ are masked when either of the 
    11241130$i,k+1$ or $i+1,k+1$ tracer points is masked, i.e.\ the $i,k+1$ 
    1125 $u$-point is masked. The namelist parameter \np{ln_botmix_triad} has 
     1131$u$-point is masked. The namelist parameter \np{ln\_botmix\_triad} has 
    11261132no effect on the eddy-induced skew-fluxes. 
    11271133 
    1128 \subsection{ Limiting of the slopes within the interior}\label{sec:triad:limitskew} 
     1134\subsection{Limiting of the slopes within the interior}\label{sec:triad:limitskew} 
    11291135Presently, the iso-neutral slopes $\tilde{r}_i$ relative 
    11301136to geopotentials are limited to be less than $1/100$, exactly as in 
     
    11381144option (c) of Fig.~\ref{Fig_eiv_slp}. This linear tapering for the 
    11391145slopes used to calculate the eddy-induced fluxes is 
    1140 unaffected by the value of \np{ln_triad_iso}. 
     1146unaffected by the value of \np{ln\_triad\_iso}. 
    11411147 
    11421148The justification for this linear slope tapering is that, for $A_e$ 
     
    11531159 
    11541160\subsection{Streamfunction diagnostics}\label{sec:triad:sfdiag} 
    1155 Where the namelist parameter \forcode{ln_traldf_gdia = .true.}, diagnosed 
     1161Where the namelist parameter \np{ln\_traldf\_gdia}\forcode{ = .true.}, diagnosed 
    11561162mean eddy-induced velocities are output. Each time step, 
    11571163streamfunctions are calculated in the $i$-$k$ and $j$-$k$ planes at 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_ASM.tex

    r9392 r9393  
    44% Chapter Assimilation increments (ASM) 
    55% ================================================================ 
    6 \chapter{Apply assimilation increments (ASM)} 
     6\chapter{Apply Assimilation Increments (ASM)} 
    77\label{ASM} 
    88 
     
    3030Direct initialization (DI) refers to the instantaneous correction 
    3131of the model background state using the analysis increment. 
    32 DI is used when \np{ln_asmdin} is set to true. 
     32DI is used when \np{ln\_asmdin} is set to true. 
    3333 
    34 \section{Incremental Analysis Updates} 
     34\section{Incremental analysis updates} 
    3535\label{ASM_IAU} 
    3636 
     
    4040is referred to as Incremental Analysis Updates (IAU) \citep{Bloom_al_MWR96}. 
    4141IAU is a common technique used with 3D assimilation methods such as 3D-Var or OI. 
    42 IAU is used when \np{ln_asmiau} is set to true. 
     42IAU is used when \np{ln\_asmiau} is set to true. 
    4343 
    4444With IAU, the model state trajectory ${\bf x}$ in the assimilation window  
     
    117117integration \citep{Talagrand_JAS72, Dobricic_al_OS07}. Diffusion coefficients are defined as  
    118118$A_D = \alpha e_{1t} e_{2t}$, where $\alpha = 0.2$. The divergence damping is activated by 
    119 assigning to \np{nn_divdmp} in the \textit{nam\_asminc} namelist a value greater than zero.  
     119assigning to \np{nn\_divdmp} in the \textit{nam\_asminc} namelist a value greater than zero.  
    120120By choosing this value to be of the order of 100 the increments in the vertical velocity will  
    121121be significantly reduced. 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_CONFIG.tex

    r9392 r9393  
    3232% 1D model configuration 
    3333% ================================================================ 
    34 \section{Water column model: 1D model (C1D) (\protect\key{c1d}) } 
     34\section{C1D: 1D Water column model (\protect\key{c1d}) } 
    3535\label{CFG_c1d} 
    3636 
     
    8080% ORCA family configurations 
    8181% ================================================================ 
    82 \section{ORCA family: global ocean with tripolar grid } 
     82\section{ORCA family: global ocean with tripolar grid} 
    8383\label{CFG_orca} 
    8484 
     
    164164\begin{table}[!t]     \begin{center} 
    165165\begin{tabular}{p{4cm} c c c c} 
    166 Horizontal Grid                         & \np{ORCA_index} &  \np{jpiglo} & \np{jpjglo} &       \\   
     166Horizontal Grid                         & \np{ORCA\_index} &  \np{jpiglo} & \np{jpjglo} &       \\   
    167167\hline  \hline 
    168168\~4\deg     &        4         &         92     &      76      &       \\ 
     
    251251uniformly applied to the whole domain. 
    252252 
    253 The GYRE configuration is set like an analytical configuration. Through \np{ln\_read\_cfg\textit{=false}} in \textit{namcfg} namelist defined in the reference configuration \textit{CONFIG/GYRE/EXP00/namelist\_cfg} anaylitical definition of grid in GYRE is done in usrdef\_hrg, usrdef\_zgr routines. Its horizontal resolution  
    254 (and thus the size of the domain) is determined by setting \np{nn_GYRE} in  \ngn{namusr\_def}: \\ 
    255 \np{jpiglo} $= 30 \times$ \np{nn_GYRE} + 2   \\ 
    256 \np{jpjglo} $= 20 \times$ \np{nn_GYRE} + 2   \\ 
     253The GYRE configuration is set like an analytical configuration. Through \np{ln\_read\_cfg}\forcode{ = .false.} in \textit{namcfg} namelist defined in the reference configuration \path{CONFIG/GYRE/EXP00/namelist_cfg} anaylitical definition of grid in GYRE is done in usrdef\_hrg, usrdef\_zgr routines. Its horizontal resolution  
     254(and thus the size of the domain) is determined by setting \np{nn\_GYRE} in  \ngn{namusr\_def}: \\ 
     255\np{jpiglo} $= 30 \times$ \np{nn\_GYRE} + 2   \\ 
     256\np{jpjglo} $= 20 \times$ \np{nn\_GYRE} + 2   \\ 
    257257Obviously, the namelist parameters have to be adjusted to the chosen resolution, see the Configurations  
    258258pages on the NEMO web site (Using NEMO\/Configurations) . 
    259 In the vertical, GYRE uses the default 30 ocean levels (\jp{jpk}=31) (Fig.~\ref{Fig_zgr}). 
     259In the vertical, GYRE uses the default 30 ocean levels (\jp{jpk}\forcode{ = 31}) (Fig.~\ref{Fig_zgr}). 
    260260 
    261261The GYRE configuration is also used in benchmark test as it is very simple to increase  
    262262its resolution and as it does not requires any input file. For example, keeping a same model size  
    263263on each processor while increasing the number of processor used is very easy, even though the  
    264 physical integrity of the solution can be compromised. Benchmark is activate via \np{ln\_bench\textit{=true}} in \ngn{namusr\_def} in namelist  \textit{CONFIG/GYRE/EXP00/namelist\_cfg}. 
     264physical integrity of the solution can be compromised. Benchmark is activate via \np{ln\_bench}\forcode{ = .true.} in \ngn{namusr\_def} in namelist \path{CONFIG/GYRE/EXP00/namelist_cfg}. 
    265265 
    266266%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    276276%       AMM configuration 
    277277% ------------------------------------------------------------------------------------------------------------- 
    278 \section{AMM: atlantic margin configuration } 
     278\section{AMM: atlantic margin configuration} 
    279279\label{MISC_config_AMM} 
    280280 
     
    296296In addition to the tidal boundary condition the model may also take 
    297297open boundary conditions from a North Atlantic model. Boundaries may be 
    298 completely omitted by setting \np{ln_bdy} to false. 
     298completely omitted by setting \np{ln\_bdy} to false. 
    299299Sample surface fluxes, river forcing and a sample initial restart file 
    300300are included to test a realistic model run. The Baltic boundary is 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIA.tex

    r9392 r9393  
    1414%       Old Model Output  
    1515% ================================================================ 
    16 \section{Old Model Output (default)} 
     16\section{Old model output (default)} 
    1717\label{DIA_io_old} 
    1818 
     
    5555% Diagnostics 
    5656% ================================================================ 
    57 \section{Standard model Output (IOM)} 
     57\section{Standard model output (IOM)} 
    5858\label{DIA_iom} 
    5959 
     
    106106even without a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server. 
    107107 
    108 \subsection{XIOS: the IO\_SERVER} 
     108\subsection{XIOS: XML Inputs-Outputs Server} 
    109109 
    110110\subsubsection{Attached or detached mode?} 
     
    148148\texttt{ mpirun -np 62 ./nemo.exe : -np 2 ./xios\_server.exe } 
    149149 
    150 \subsubsection{Control of XIOS: the XIOS context in iodef.xml} 
     150\subsubsection{Control of XIOS: the context in iodef.xml} 
    151151 
    152152As well as the {\tt using\_server} flag, other controls on the use of XIOS are set in the XIOS context in iodef.xml.  
     
    216216you used in the f90 code (see subsequent sections for a details of the XML syntax and rules).  
    217217For example: 
    218 \vspace{-20pt} 
    219218\begin{xmllines} 
    220219   <field_definition> 
     
    232231and axes either defined in the code (iom\_set\_domain\_attr and iom\_set\_axis\_attr in iom.F90)  
    233232or defined in the domain\_def.xml file. $e.g.$: 
    234 \vspace{-20pt} 
    235233\begin{xmllines} 
    236234     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/> 
    237235\end{xmllines} 
    238 Note, if your array is computed within the surface module each nn\_fsbc time\_step,  
     236Note, if your array is computed within the surface module each \np{nn\_fsbc} time\_step,  
    239237add the field definition within the field\_group defined with the id ''SBC'': $<$field\_group id=''SBC''...$>$  
    240238which has been defined with the correct frequency of operations (iom\_set\_field\_attr in iom.F90) 
    241239 
    242 \item[4.] add your field in one of the output files defined in iodef.xml (again see subsequent sections for syntax and rules)   \\ 
    243 \vspace{-20pt} 
     240\item[4.] add your field in one of the output files defined in iodef.xml (again see subsequent sections for syntax and rules) 
    244241\begin{xmllines} 
    245242   <file id="file1" .../>    
     
    251248 
    252249\end{description} 
     250 
    253251\subsection{XML fundamentals} 
    254252 
     
    262260See \href{http://www.xmlnews.org/docs/xml-basics.html}{here} for more details. 
    263261 
    264 \subsubsection{Structure of the xml file used in NEMO} 
     262\subsubsection{Structure of the XML file used in NEMO} 
    265263 
    266264The XML file used in XIOS is structured by 7 families of tags: context, axis, domain, grid, field, file and variable.  
     
    397395\\ 
    398396example 1: Direct inheritance. 
    399 \vspace{-20pt} 
    400397\begin{xmllines} 
    401398   <field_definition operation="average" > 
     
    410407\\ 
    411408example 2: Inheritance by reference. 
    412 \vspace{-20pt} 
    413409\begin{xmllines} 
    414410   <field_definition> 
     
    426422Inherit (and overwrite, if needed) the attributes of a tag you are refering to. 
    427423 
    428 \subsubsection{Use of Groups} 
     424\subsubsection{Use of groups} 
    429425 
    430426Groups can be used for 2 purposes.  
     
    432428In the following example, we define a group of field that will share a common grid ''grid\_T\_2D''.  
    433429Note that for the field ''toce'', we overwrite the grid definition inherited from the group by ''grid\_T\_3D''. 
    434 \vspace{-20pt} 
    435430\begin{xmllines} 
    436431   <field_group id="grid_T" grid_ref="grid_T_2D"> 
     
    445440Several examples of groups of fields are proposed at the end of the file {\tt CONFIG/SHARED/field\_def.xml}.  
    446441For example, a short list of the usual variables related to the U grid: 
    447 \vspace{-20pt} 
    448442\begin{xmllines} 
    449443   <field_group id="groupU" > 
     
    454448\end{xmllines} 
    455449that can be directly included in a file through the following syntax: 
    456 \vspace{-20pt} 
    457450\begin{xmllines} 
    458451   <file id="myfile_U" output_freq="1d" />    
     
    472465For example, in {\tt CONFIG/SHARED/domain\_def.xml}, we provide the following example of a definition  
    473466of a 5 by 5 box with the bottom left corner at point (10,10). 
    474 \vspace{-20pt} 
    475467\begin{xmllines} 
    476468   <domain_group id="grid_T"> 
     
    478470\end{xmllines} 
    479471The use of this subdomain is done through the redefinition of the attribute domain\_ref of the tag family field. For example: 
    480 \vspace{-20pt} 
    481472\begin{xmllines} 
    482473   <file id="myfile_vzoom" output_freq="1d" > 
     
    490481for the equatorial sections and the mooring position for TAO, RAMA and PIRATA followed  
    491482by ''T'' (for example: ''8s137eT'', ''1.5s80.5eT'' ...) 
    492 \vspace{-20pt} 
    493483\begin{xmllines} 
    494484   <file id="myfile_vzoom" output_freq="1d" > 
     
    500490\subsubsection{Define vertical zooms} 
    501491Vertical zooms are defined through the attributs zoom\_begin and zoom\_end of the tag family axis. It must therefore be done in the axis part of the XML file. For example, in NEMOGCM/CONFIG/ORCA2\_LIM/iodef\_demo.xml, we provide the following example: 
    502 \vspace{-20pt} 
    503492\begin{xmllines} 
    504493   <axis_group id="deptht" long_name="Vertical T levels" unit="m" positive="down" > 
     
    507496\end{xmllines} 
    508497The use of this vertical zoom is done through the redefinition of the attribute axis\_ref of the tag family field. For example: 
    509 \vspace{-20pt} 
    510498\begin{xmllines} 
    511499   <file id="myfile_hzoom" output_freq="1d" > 
     
    517505 
    518506The output file names are defined by the attributs ''name'' and ''name\_suffix'' of the tag family file. for example: 
    519 \vspace{-20pt} 
    520507\begin{xmllines} 
    521508   <file_group id="1d" output_freq="1d" name="myfile_1d" >  
     
    577564}} 
    578565 
    579 \subsubsection{Other controls of the xml attributes from NEMO} 
     566\subsubsection{Other controls of the XML attributes from NEMO} 
    580567 
    581568The values of some attributes are defined by subroutine calls within NEMO (calls to iom\_set\_domain\_attr, iom\_set\_axis\_attr and iom\_set\_field\_attr in iom.F90). Any definition given in the xml file will be overwritten. By convention, these attributes are defined to ''auto'' (for string) or ''0000'' (for integer) in the xml file (but this is not necessary).  
     
    589576   \hline 
    590577   \hline 
    591     \multicolumn{2}{|c|}{field\_definition} & freq\_op & \np{rn_rdt} \\ 
    592    \hline 
    593     \multicolumn{2}{|c|}{SBC}               & freq\_op & \np{rn_rdt} $\times$ \np{nn_fsbc}  \\ 
    594    \hline 
    595     \multicolumn{2}{|c|}{ptrc\_T}           & freq\_op & \np{rn_rdt} $\times$ \np{nn_dttrc} \\ 
    596    \hline 
    597     \multicolumn{2}{|c|}{diad\_T}           & freq\_op & \np{rn_rdt} $\times$ \np{nn_dttrc} \\ 
     578    \multicolumn{2}{|c|}{field\_definition} & freq\_op & \np{rn\_rdt} \\ 
     579   \hline 
     580    \multicolumn{2}{|c|}{SBC}               & freq\_op & \np{rn\_rdt} $\times$ \np{nn\_fsbc}  \\ 
     581   \hline 
     582    \multicolumn{2}{|c|}{ptrc\_T}           & freq\_op & \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ 
     583   \hline 
     584    \multicolumn{2}{|c|}{diad\_T}           & freq\_op & \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ 
    598585   \hline 
    599586    \multicolumn{2}{|c|}{EqT, EqU, EqW} & jbegin, ni,      & according to the grid    \\ 
     
    612599(1) Simple computation: directly define the computation when refering to the variable in the file definition. 
    613600 
    614 \vspace{-20pt} 
    615 \begin{xmllines} 
    616  <field field\_ref="sst"  name="tosK"  unit="degK" > sst + 273.15 </field> 
    617  <field field\_ref="taum" name="taum2" unit="N2/m4" long\_name="square of wind stress module" > taum * taum </field> 
    618  <field field\_ref="qt"   name="stupid\_check" > qt - qsr - qns </field> 
     601\begin{xmllines} 
     602 <field field_ref="sst"  name="tosK"  unit="degK" > sst + 273.15 </field> 
     603 <field field_ref="taum" name="taum2" unit="N2/m4" long_name="square of wind stress module" > taum * taum </field> 
     604 <field field_ref="qt"   name="stupid_check" > qt - qsr - qns </field> 
    619605\end{xmllines} 
    620606 
     
    622608 
    623609in field\_definition: 
    624 \vspace{-20pt} 
    625 \begin{xmllines} 
    626  <field id="sst2" long\_name="square of sea surface temperature" unit="degC2" >  sst * sst </field > 
     610\begin{xmllines} 
     611 <field id="sst2" long_name="square of sea surface temperature" unit="degC2" >  sst * sst </field > 
    627612\end{xmllines} 
    628613in file\_definition: 
    629 \vspace{-20pt} 
    630 \begin{xmllines} 
    631  <field field\_ref="sst2" > sst2 </field> 
     614\begin{xmllines} 
     615 <field field_ref="sst2" > sst2 </field> 
    632616\end{xmllines} 
    633617Note that in this case, the following syntaxe $<$field field\_ref="sst2" /$>$ is not working as sst2 won't be evaluated. 
     
    635619(3) Change of variable precision: 
    636620 
    637 \vspace{-20pt} 
    638621\begin{xmllines} 
    639622     <!-- force to keep real 8 --> 
    640  <field field\_ref="sst" name="tos\_r8" prec="8" /> 
    641       <!-- integer 2  with add\_offset and scale\_factor attributes --> 
    642  <field field\_ref="sss" name="sos\_i2" prec="2" add\_offset="20." scale\_factor="1.e-3" /> 
     623 <field field_ref="sst" name="tos_r8" prec="8" /> 
     624      <!-- integer 2  with add_offset and scale_factor attributes --> 
     625 <field field_ref="sss" name="sos_i2" prec="2" add_offset="20." scale_factor="1.e-3" /> 
    643626\end{xmllines} 
    644627Note that, then the code is crashing, writting real4 variables forces a numerical convection from real8 to real4 which will create an internal error in NetCDF and will avoid the creation of the output files. Forcing double precision outputs with prec="8" (for example in the field\_definition) will avoid this problem. 
     
    646629(4) add user defined attributes: 
    647630 
    648 \vspace{-20pt} 
    649 \begin{xmllines} 
    650       <file\_group id="1d" output\_freq="1d" output\_level="10" enabled=".TRUE."> <!-- 1d files -->  
    651    <file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" > 
    652      <field field\_ref="sst" name="tos" > 
    653        <variable id="my\_attribute1" type="string"  > blabla </variable> 
    654        <variable id="my\_attribute2" type="integer" > 3      </variable> 
    655        <variable id="my\_attribute3" type="float"   > 5.0    </variable> 
     631\begin{xmllines} 
     632      <file_group id="1d" output_freq="1d" output_level="10" enabled=".true."> <!-- 1d files -->  
     633   <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
     634     <field field_ref="sst" name="tos" > 
     635       <variable id="my_attribute1" type="string"  > blabla </variable> 
     636       <variable id="my_attribute2" type="integer" > 3      </variable> 
     637       <variable id="my_attribute3" type="float"   > 5.0    </variable> 
    656638     </field> 
    657      <variable id="my\_global\_attribute" type="string" > blabla\_global </variable> 
     639     <variable id="my_global_attribute" type="string" > blabla_global </variable> 
    658640       </file> 
    659      </file\_group>  
     641     </file_group>  
    660642\end{xmllines} 
    661643 
     
    663645 
    664646 - define a new variable in field\_definition 
    665 \vspace{-20pt} 
    666 \begin{xmllines} 
    667  <field id="toce\_e3t" long\_name="temperature * e3t" unit="degC*m" grid\_ref="grid\_T\_3D" > toce * e3t </field > 
     647\begin{xmllines} 
     648 <field id="toce_e3t" long_name="temperature * e3t" unit="degC*m" grid_ref="grid_T_3D" > toce * e3t </field > 
    668649\end{xmllines} 
    669650 - use it when defining your file.   
    670 \vspace{-20pt} 
    671 \begin{xmllines} 
    672 <file\_group id="5d" output\_freq="5d"  output\_level="10" enabled=".TRUE." >  <!-- 5d files -->   
    673  <file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" > 
    674   <field field\_ref="toce" operation="instant" freq\_op="5d" > @toce\_e3t / @e3t </field> 
     651\begin{xmllines} 
     652<file_group id="5d" output_freq="5d"  output_level="10" enabled=".true." >  <!-- 5d files -->   
     653 <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
     654  <field field_ref="toce" operation="instant" freq_op="5d" > @toce_e3t / @e3t </field> 
    675655 </file> 
    676 </file\_group>  
     656</file_group>  
    677657\end{xmllines} 
    678658The freq\_op="5d" attribute is used to define the operation frequency of the ``@'' function: here 5 day. The temporal operation done by the ``@'' is the one defined in the field definition: here we use the default, average. So, in the above case, @toce\_e3t will do the 5-day mean of toce*e3t. Operation="instant" refers to the temporal operation to be performed on the field''@toce\_e3t / @e3t'': here the temporal average is alreday done by the ``@'' function so we just use instant to do the ratio of the 2 mean values. field\_ref="toce" means that attributes not explicitely defined, are inherited from toce field. Note that in this case, freq\_op must be equal to the file output\_freq. 
     
    681661 
    682662 - define a new variable in field\_definition 
    683 \vspace{-20pt} 
    684 \begin{xmllines} 
    685  <field id="ssh2" long\_name="square of sea surface temperature" unit="degC2" >  ssh * ssh </field > 
     663\begin{xmllines} 
     664 <field id="ssh2" long_name="square of sea surface temperature" unit="degC2" >  ssh * ssh </field > 
    686665\end{xmllines} 
    687666 - use it when defining your file.   
    688 \vspace{-20pt} 
    689 \begin{xmllines} 
    690 <file\_group id="1m" output\_freq="1m"  output\_level="10" enabled=".TRUE." >  <!-- 1m files -->   
    691  <file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" > 
    692   <field field\_ref="ssh" name="sshstd" long\_name="sea\_surface\_temperature\_standard\_deviation" operation="instant" freq\_op="1m" > sqrt( @ssh2 - @ssh * @ssh ) </field> 
     667\begin{xmllines} 
     668<file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files -->   
     669 <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
     670  <field field_ref="ssh" name="sshstd" long_name="sea_surface_temperature_standard_deviation" operation="instant" freq_op="1m" > sqrt( @ssh2 - @ssh * @ssh ) </field> 
    693671 </file> 
    694 </file\_group>  
     672</file_group>  
    695673\end{xmllines} 
    696674The freq\_op="1m" attribute is used to define the operation frequency of the ``@'' function: here 1 month. The temporal operation done by the ``@'' is the one defined in the field definition: here we use the default, average. So, in the above case, @ssh2 will do the monthly mean of ssh*ssh. Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'': here the temporal average is alreday done by the ``@'' function so we just use instant. field\_ref="ssh" means that attributes not explicitely defined, are inherited from ssh field. Note that in this case, freq\_op must be equal to the file output\_freq. 
     
    699677 
    700678 - define 2 new variables in field\_definition 
    701 \vspace{-20pt} 
    702 \begin{xmllines} 
    703  <field id="sstmax" field\_ref="sst" long\_name="max of sea surface temperature" operation="maximum" /> 
    704  <field id="sstmin" field\_ref="sst" long\_name="min of sea surface temperature" operation="minimum" /> 
     679\begin{xmllines} 
     680 <field id="sstmax" field_ref="sst" long_name="max of sea surface temperature" operation="maximum" /> 
     681 <field id="sstmin" field_ref="sst" long_name="min of sea surface temperature" operation="minimum" /> 
    705682\end{xmllines} 
    706683 - use these 2 new variables when defining your file.   
    707 \vspace{-20pt} 
    708 \begin{xmllines} 
    709 <file\_group id="1m" output\_freq="1m"  output\_level="10" enabled=".TRUE." >  <!-- 1m files -->   
    710  <file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" > 
    711   <field field\_ref="sst" name="sstdcy" long\_name="amplitude of sst diurnal cycle" operation="average" freq\_op="1d" > @sstmax - @sstmin </field> 
     684\begin{xmllines} 
     685<file_group id="1m" output_freq="1m"  output_level="10" enabled=".true." >  <!-- 1m files -->   
     686 <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 
     687  <field field_ref="sst" name="sstdcy" long_name="amplitude of sst diurnal cycle" operation="average" freq_op="1d" > @sstmax - @sstmin </field> 
    712688 </file> 
    713 </file\_group>  
     689</file_group>  
    714690\end{xmllines} 
    715691The freq\_op="1d" attribute is used to define the operation frequency of the ``@'' function: here 1 day. The temporal operation done by the ``@'' is the one defined in the field definition: here maximum for sstmax and minimum for sstmin. So, in the above case, @sstmax will do the daily max and @sstmin the daily min. Operation="average" refers to the temporal operation to be performed on the field ``@sstmax - @sstmin'': here monthly mean (of daily max - daily min of the sst). field\_ref="sst" means that attributes not explicitely defined, are inherited from sst field. 
     
    852828   enabled &  
    853829   switch on/off the output of a field or a file &  
    854    enabled=".TRUE." &  
     830   enabled=".true." &  
    855831   field, file families \\  
    856832   \hline    
     
    10241000Output from the XIOS-1.0 IO server is compliant with \href{http://cfconventions.org/Data/cf-conventions/cf-conventions-1.5/build/cf-conventions.html}{version 1.5} of the CF metadata standard. Therefore while a user may wish to add their own metadata to the output files (as demonstrated in example 4 of section \ref{IOM_xmlref}) the metadata should, for the most part, comply with the CF-1.5 standard. 
    10251001 
    1026 Some metadata that may significantly increase the file size (horizontal cell areas and vertices) are controlled by the namelist parameter \np{ln_cfmeta} in the \ngn{namrun} namelist. This must be set to true if these metadata are to be included in the output files. 
     1002Some metadata that may significantly increase the file size (horizontal cell areas and vertices) are controlled by the namelist parameter \np{ln\_cfmeta} in the \ngn{namrun} namelist. This must be set to true if these metadata are to be included in the output files. 
    10271003 
    10281004 
     
    10301006%       NetCDF4 support 
    10311007% ================================================================ 
    1032 \section{NetCDF4 Support (\protect\key{netcdf4})} 
     1008\section{NetCDF4 support (\protect\key{netcdf4})} 
    10331009\label{DIA_iom} 
    10341010 
     
    10481024new libraries and will then read both NetCDF3 and NetCDF4 files. NEMO 
    10491025executables linked with NetCDF4 libraries can be made to produce NetCDF3 
    1050 files by setting the \np{ln_nc4zip} logical to false in the \textit{namnc4}  
     1026files by setting the \np{ln\_nc4zip} logical to false in the \textit{namnc4}  
    10511027namelist: 
    10521028 
     
    10561032 
    10571033If \key{netcdf4} has not been defined, these namelist parameters are not read.  
    1058 In this case, \np{ln_nc4zip} is set false and dummy routines for a few 
     1034In this case, \np{ln\_nc4zip} is set false and dummy routines for a few 
    10591035NetCDF4-specific functions are defined. These functions will not be used but 
    10601036need to be included so that compilation is possible with NetCDF3 libraries. 
     
    10791055domain size in any dimension. The algorithm used is: 
    10801056 
    1081 \vspace{-20pt} 
    10821057\begin{forlines} 
    10831058     ichunksz(1) = MIN( idomain_size,MAX( (idomain_size-1)/nn_nchunks_i + 1 ,16 ) ) 
     
    10881063 
    10891064\noindent As an example, setting: 
    1090 \vspace{-20pt} 
    10911065\begin{forlines} 
    10921066     nn_nchunks_i=4, nn_nchunks_j=4 and nn_nchunks_k=31 
     
    11061080         &filesize & filesize & \% \\ 
    11071081         &(KB)     & (KB)     & \\ 
    1108 \ifile{ORCA2\_restart\_0000} & 16420 & 8860 & 47\%\\ 
    1109 \ifile{ORCA2\_restart\_0001} & 16064 & 11456 & 29\%\\ 
    1110 \ifile{ORCA2\_restart\_0002} & 16064 & 9744 & 40\%\\ 
    1111 \ifile{ORCA2\_restart\_0003} & 16420 & 9404 & 43\%\\ 
    1112 \ifile{ORCA2\_restart\_0004} & 16200 & 5844 & 64\%\\ 
    1113 \ifile{ORCA2\_restart\_0005} & 15848 & 8172 & 49\%\\ 
    1114 \ifile{ORCA2\_restart\_0006} & 15848 & 8012 & 50\%\\ 
    1115 \ifile{ORCA2\_restart\_0007} & 16200 & 5148 & 69\%\\ 
    1116 \ifile{ORCA2\_2d\_grid\_T\_0000} & 2200 & 1504 & 32\%\\ 
    1117 \ifile{ORCA2\_2d\_grid\_T\_0001} & 2200 & 1748 & 21\%\\ 
    1118 \ifile{ORCA2\_2d\_grid\_T\_0002} & 2200 & 1592 & 28\%\\ 
    1119 \ifile{ORCA2\_2d\_grid\_T\_0003} & 2200 & 1540 & 30\%\\ 
    1120 \ifile{ORCA2\_2d\_grid\_T\_0004} & 2200 & 1204 & 46\%\\ 
    1121 \ifile{ORCA2\_2d\_grid\_T\_0005} & 2200 & 1444 & 35\%\\ 
    1122 \ifile{ORCA2\_2d\_grid\_T\_0006} & 2200 & 1428 & 36\%\\ 
    1123 \ifile{ORCA2\_2d\_grid\_T\_0007} & 2200 & 1148 & 48\%\\ 
    1124             ...         & ...  &  ... & ...  \\ 
    1125 \ifile{ORCA2\_2d\_grid\_W\_0000} & 4416 & 2240 & 50\%\\ 
    1126 \ifile{ORCA2\_2d\_grid\_W\_0001} & 4416 & 2924 & 34\%\\ 
    1127 \ifile{ORCA2\_2d\_grid\_W\_0002} & 4416 & 2512 & 44\%\\ 
    1128 \ifile{ORCA2\_2d\_grid\_W\_0003} & 4416 & 2368 & 47\%\\ 
    1129 \ifile{ORCA2\_2d\_grid\_W\_0004} & 4416 & 1432 & 68\%\\ 
    1130 \ifile{ORCA2\_2d\_grid\_W\_0005} & 4416 & 1972 & 56\%\\ 
    1131 \ifile{ORCA2\_2d\_grid\_W\_0006} & 4416 & 2028 & 55\%\\ 
    1132 \ifile{ORCA2\_2d\_grid\_W\_0007} & 4416 & 1368 & 70\%\\ 
     1082ORCA2\_restart\_0000.nc & 16420 & 8860 & 47\%\\ 
     1083ORCA2\_restart\_0001.nc & 16064 & 11456 & 29\%\\ 
     1084ORCA2\_restart\_0002.nc & 16064 & 9744 & 40\%\\ 
     1085ORCA2\_restart\_0003.nc & 16420 & 9404 & 43\%\\ 
     1086ORCA2\_restart\_0004.nc & 16200 & 5844 & 64\%\\ 
     1087ORCA2\_restart\_0005.nc & 15848 & 8172 & 49\%\\ 
     1088ORCA2\_restart\_0006.nc & 15848 & 8012 & 50\%\\ 
     1089ORCA2\_restart\_0007.nc & 16200 & 5148 & 69\%\\ 
     1090ORCA2\_2d\_grid\_T\_0000.nc & 2200 & 1504 & 32\%\\ 
     1091ORCA2\_2d\_grid\_T\_0001.nc & 2200 & 1748 & 21\%\\ 
     1092ORCA2\_2d\_grid\_T\_0002.nc & 2200 & 1592 & 28\%\\ 
     1093ORCA2\_2d\_grid\_T\_0003.nc & 2200 & 1540 & 30\%\\ 
     1094ORCA2\_2d\_grid\_T\_0004.nc & 2200 & 1204 & 46\%\\ 
     1095ORCA2\_2d\_grid\_T\_0005.nc & 2200 & 1444 & 35\%\\ 
     1096ORCA2\_2d\_grid\_T\_0006.nc & 2200 & 1428 & 36\%\\ 
     1097ORCA2\_2d\_grid\_T\_0007.nc & 2200 & 1148 & 48\%\\ 
     1098     ...         & ...  &  ... & ...  \\ 
     1099ORCA2\_2d\_grid\_W\_0000.nc & 4416 & 2240 & 50\%\\ 
     1100ORCA2\_2d\_grid\_W\_0001.nc & 4416 & 2924 & 34\%\\ 
     1101ORCA2\_2d\_grid\_W\_0002.nc & 4416 & 2512 & 44\%\\ 
     1102ORCA2\_2d\_grid\_W\_0003.nc & 4416 & 2368 & 47\%\\ 
     1103ORCA2\_2d\_grid\_W\_0004.nc & 4416 & 1432 & 68\%\\ 
     1104ORCA2\_2d\_grid\_W\_0005.nc & 4416 & 1972 & 56\%\\ 
     1105ORCA2\_2d\_grid\_W\_0006.nc & 4416 & 2028 & 55\%\\ 
     1106ORCA2\_2d\_grid\_W\_0007.nc & 4416 & 1368 & 70\%\\ 
    11331107\end{tabular} 
    11341108\caption{   \protect\label{Tab_NC4}  
     
    11381112 
    11391113When \key{iomput} is activated with \key{netcdf4} chunking and 
    1140 compression parameters for fields produced via \np{iom_put} calls are 
     1114compression parameters for fields produced via \np{iom\_put} calls are 
    11411115set via an equivalent and identically named namelist to \textit{namnc4}  
    11421116in \np{xmlio\_server.def}. Typically this namelist serves the mean files 
     
    11511125%       Tracer/Dynamics Trends 
    11521126% ------------------------------------------------------------------------------------------------------------- 
    1153 \section[Tracer/Dynamics Trends (TRD)] 
    1154                   {Tracer/Dynamics Trends  (\protect\ngn{namtrd})} 
     1127\section{Tracer/Dynamics trends  (\protect\ngn{namtrd})} 
    11551128\label{DIA_trd} 
    11561129 
     
    11651138Note that the output are done with xIOS, and therefore the \key{IOM} is required. 
    11661139 
    1167 What is done depends on the \ngn{namtrd} logical set to \textit{true}: 
     1140What is done depends on the \ngn{namtrd} logical set to \forcode{.true.}: 
    11681141\begin{description} 
    1169 \item[\np{ln_glo_trd}] : at each \np{nn_trd} time-step a check of the basin averaged properties  
     1142\item[\np{ln\_glo\_trd}] : at each \np{nn\_trd} time-step a check of the basin averaged properties  
    11701143of the momentum and tracer equations is performed. This also includes a check of $T^2$, $S^2$,  
    11711144$\tfrac{1}{2} (u^2+v2)$, and potential energy time evolution equations properties ;  
    1172 \item[\np{ln_dyn_trd}] : each 3D trend of the evolution of the two momentum components is output ;  
    1173 \item[\np{ln_dyn_mxl}] : each 3D trend of the evolution of the two momentum components averaged  
     1145\item[\np{ln\_dyn\_trd}] : each 3D trend of the evolution of the two momentum components is output ;  
     1146\item[\np{ln\_dyn\_mxl}] : each 3D trend of the evolution of the two momentum components averaged  
    11741147                           over the mixed layer is output  ;  
    1175 \item[\np{ln_vor_trd}] : a vertical summation of the moment tendencies is performed,  
     1148\item[\np{ln\_vor\_trd}] : a vertical summation of the moment tendencies is performed,  
    11761149                           then the curl is computed to obtain the barotropic vorticity tendencies which are output ; 
    1177 \item[\np{ln_KE_trd}]  : each 3D trend of the Kinetic Energy equation is output ; 
    1178 \item[\np{ln_tra_trd}] : each 3D trend of the evolution of temperature and salinity is output ; 
    1179 \item[\np{ln_tra_mxl}] : each 2D trend of the evolution of temperature and salinity averaged  
     1150\item[\np{ln\_KE\_trd}]  : each 3D trend of the Kinetic Energy equation is output ; 
     1151\item[\np{ln\_tra\_trd}] : each 3D trend of the evolution of temperature and salinity is output ; 
     1152\item[\np{ln\_tra\_mxl}] : each 2D trend of the evolution of temperature and salinity averaged  
    11801153                           over the mixed layer is output ; 
    11811154\end{description} 
     
    11851158 
    11861159\textbf{Note that} in the current version (v3.6), many changes has been introduced but not fully tested.  
    1187 In particular, options associated with \np{ln_dyn_mxl}, \np{ln_vor_trd}, and \np{ln_tra_mxl}  
     1160In particular, options associated with \np{ln\_dyn\_mxl}, \np{ln\_vor\_trd}, and \np{ln\_tra\_mxl}  
    11881161are not working, and none of the option have been tested with variable volume ($i.e.$ \key{vvl} defined). 
    11891162 
     
    11921165%       On-line Floats trajectories 
    11931166% ------------------------------------------------------------------------------------------------------------- 
    1194 \section{On-line Floats trajectories (FLO) (\protect\key{floats})} 
     1167\section{FLO: On-Line Floats trajectories (\protect\key{floats})} 
    11951168\label{FLO} 
    11961169%--------------------------------------------namflo------------------------------------------------------- 
     
    12031176namelis variables. The algorithm used is based  
    12041177either on the work of \cite{Blanke_Raynaud_JPO97} (default option), or on a $4^th$ 
    1205 Runge-Hutta algorithm (\forcode{ln_flork4 = .true.}). Note that the \cite{Blanke_Raynaud_JPO97}  
     1178Runge-Hutta algorithm (\np{ln\_flork4}\forcode{ = .true.}). Note that the \cite{Blanke_Raynaud_JPO97}  
    12061179algorithm have the advantage of providing trajectories which are consistent with the  
    12071180numeric of the code, so that the trajectories never intercept the bathymetry.  
     
    12091182\subsubsection{ Input data: initial coordinates } 
    12101183 
    1211 Initial coordinates can be given with Ariane Tools convention ( IJK coordinates ,(\forcode{ln_ariane = .true.}) ) 
     1184Initial coordinates can be given with Ariane Tools convention ( IJK coordinates ,(\np{ln\_ariane}\forcode{ = .true.}) ) 
    12121185or with longitude and latitude. 
    12131186 
    12141187 
    1215 In case of Ariane convention, input filename is \np{init_float_ariane}. Its format is: 
     1188In case of Ariane convention, input filename is \np{init\_float\_ariane}. Its format is: 
    12161189 
    12171190\texttt{ I J K nisobfl itrash itrash } 
     
    12581231 
    12591232\np{jpnfl} is the total number of floats during the run. 
    1260 When initial positions are read in a restart file ( \np{ln_rstflo}= .TRUE. ),  \np{jpnflnewflo} 
     1233When initial positions are read in a restart file (\np{ln\_rstflo}\forcode{ = .true.} ),  \np{jpnflnewflo} 
    12611234can be added in the initialization file.  
    12621235 
    1263 \subsubsection{ Output data } 
    1264  
    1265 \np{nn_writefl} is the frequency of writing in float output file and \np{nn_stockfl}  
     1236\subsubsection{Output data} 
     1237 
     1238\np{nn\_writefl} is the frequency of writing in float output file and \np{nn\_stockfl}  
    12661239is the frequency of creation of the float restart file. 
    12671240 
    1268 Output data can be written in ascii files (\np{ln_flo_ascii} = .TRUE. ). In that case,  
     1241Output data can be written in ascii files (\np{ln\_flo\_ascii}\forcode{ = .true.}). In that case,  
    12691242output filename is trajec\_float. 
    12701243 
    1271 Another possiblity of writing format is Netcdf (\np{ln_flo_ascii} = .FALSE. ). There are 2 possibilities: 
     1244Another possiblity of writing format is Netcdf (\np{ln\_flo\_ascii}\forcode{ = .false.}). There are 2 possibilities: 
    12721245 
    12731246 - if (\key{iomput}) is used, outputs are selected in  iodef.xml. Here it is an example of specification  
    12741247   to put in files description section: 
    12751248 
    1276 \vspace{-30pt} 
    1277 \begin{xmllines} 
    1278      <group id="1d\_grid\_T" name="auto" description="ocean T grid variables" >   } 
     1249\begin{xmllines} 
     1250     <group id="1d_grid_T" name="auto" description="ocean T grid variables" >   } 
    12791251       <file id="floats"  description="floats variables"> }\\ 
    1280            <field ref="traj\_lon"   name="floats\_longitude"   freq\_op="86400" />} 
    1281            <field ref="traj\_lat"   name="floats\_latitude"    freq\_op="86400" />} 
    1282            <field ref="traj\_dep"   name="floats\_depth"       freq\_op="86400" />} 
    1283            <field ref="traj\_temp"  name="floats\_temperature" freq\_op="86400" />} 
    1284            <field ref="traj\_salt"  name="floats\_salinity"    freq\_op="86400" />} 
    1285            <field ref="traj\_dens"  name="floats\_density"     freq\_op="86400" />} 
    1286            <field ref="traj\_group" name="floats\_group"       freq\_op="86400" />} 
     1252           <field ref="traj_lon"   name="floats_longitude"   freq_op="86400" />} 
     1253           <field ref="traj_lat"   name="floats_latitude"    freq_op="86400" />} 
     1254           <field ref="traj_dep"   name="floats_depth"       freq_op="86400" />} 
     1255           <field ref="traj_temp"  name="floats_temperature" freq_op="86400" />} 
     1256           <field ref="traj_salt"  name="floats_salinity"    freq_op="86400" />} 
     1257           <field ref="traj_dens"  name="floats_density"     freq_op="86400" />} 
     1258           <field ref="traj_group" name="floats_group"       freq_op="86400" />} 
    12871259       </file>} 
    12881260  </group>} 
     
    13121284Some parameters are available in namelist \ngn{namdia\_harm} : 
    13131285 
    1314 - \np{nit000_han} is the first time step used for harmonic analysis 
    1315  
    1316 - \np{nitend_han} is the last time step used for harmonic analysis 
    1317  
    1318 - \np{nstep_han} is the time step frequency for harmonic analysis 
    1319  
    1320 - \np{nb_ana} is the number of harmonics to analyse 
     1286- \np{nit000\_han} is the first time step used for harmonic analysis 
     1287 
     1288- \np{nitend\_han} is the last time step used for harmonic analysis 
     1289 
     1290- \np{nstep\_han} is the time step frequency for harmonic analysis 
     1291 
     1292- \np{nb\_ana} is the number of harmonics to analyse 
    13211293 
    13221294- \np{tname} is an array with names of tidal constituents to analyse 
    13231295 
    1324 \np{nit000_han} and \np{nitend_han} must be between \np{nit000} and \np{nitend} of the simulation. 
     1296\np{nit000\_han} and \np{nitend\_han} must be between \np{nit000} and \np{nitend} of the simulation. 
    13251297The restart capability is not implemented. 
    13261298 
     
    13691341and the time scales over which they are averaged, as well as the level of output for debugging: 
    13701342 
    1371 \np{nn_dct}: frequency of instantaneous transports computing 
    1372  
    1373 \np{nn_dctwri}: frequency of writing ( mean of instantaneous transports ) 
    1374  
    1375 \np{nn_debug}: debugging of the section 
    1376  
    1377 \subsubsection{ Creating a binary file containing the pathway of each section } 
     1343\np{nn\_dct}: frequency of instantaneous transports computing 
     1344 
     1345\np{nn\_dctwri}: frequency of writing ( mean of instantaneous transports ) 
     1346 
     1347\np{nn\_debug}: debugging of the section 
     1348 
     1349\subsubsection{Creating a binary file containing the pathway of each section} 
    13781350 
    13791351In \texttt{NEMOGCM/TOOLS/SECTIONS\_DIADCT/run}, the file \textit{ {list\_sections.ascii\_global}} 
     
    14601432 
    14611433 
    1462 \subsubsection{ To read the output files } 
     1434\subsubsection{To read the output files} 
    14631435 
    14641436The output format is : 
     
    14941466% Steric effect in sea surface height 
    14951467% ================================================================ 
    1496 \section{Diagnosing the Steric effect in sea surface height} 
     1468\section{Diagnosing the steric effect in sea surface height} 
    14971469\label{DIA_steric} 
    14981470 
     
    16491621%       Other Diagnostics 
    16501622% ------------------------------------------------------------------------------------------------------------- 
    1651 \section{Other Diagnostics (\protect\key{diahth}, \protect\key{diaar5})} 
     1623\section{Other diagnostics (\protect\key{diahth}, \protect\key{diaar5})} 
    16521624\label{DIA_diag_others} 
    16531625 
     
    16811653The poleward heat and salt transports, their advective and diffusive component, and  
    16821654the meriodional stream function can be computed on-line in \mdl{diaptr}  
    1683 \np{ln_diaptr} to true (see the \textit{\ngn{namptr} } namelist below).   
    1684 When \np{ln_subbas}~=~true, transports and stream function are computed  
     1655\np{ln\_diaptr} to true (see the \textit{\ngn{namptr} } namelist below).   
     1656When \np{ln\_subbas}\forcode{ = .true.}, transports and stream function are computed  
    16851657for the Atlantic, Indian, Pacific and Indo-Pacific Oceans (defined north of 30\deg S)  
    16861658as well as for the World Ocean. The sub-basin decomposition requires an input file  
     
    17161688%       25 hour mean and hourly Surface, Mid and Bed  
    17171689% ----------------------------------------------------------- 
    1718 \subsection{25 hour mean output for tidal models } 
     1690\subsection{25 hour mean output for tidal models} 
    17191691 
    17201692%------------------------------------------nam_dia25h------------------------------------- 
     
    17311703%     Top Middle and Bed hourly output 
    17321704% ----------------------------------------------------------- 
    1733 \subsection{Top Middle and Bed hourly output } 
     1705\subsection{Top middle and bed hourly output} 
    17341706 
    17351707%------------------------------------------nam_diatmb----------------------------------------------------- 
     
    17561728in the zonal, meridional and vertical directions respectively. The vertical component is included although it is not strictly valid as the vertical velocity is calculated from the continuity equation rather than as a prognostic variable. Physically this represents the rate at which information is propogated across a grid cell. Values greater than 1 indicate that information is propagated across more than one grid cell in a single time step. 
    17571729 
    1758 The variables can be activated by setting the \np{nn_diacfl} namelist parameter to 1 in the \ngn{namctl} namelist. The diagnostics will be written out to an ascii file named cfl\_diagnostics.ascii. In this file the maximum value of $C_u$, $C_v$, and $C_w$ are printed at each timestep along with the coordinates of where the maximum value occurs. At 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 with the coordinates of each. The maximum values from the run are also copied to the ocean.output file.  
     1730The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \ngn{namctl} namelist. The diagnostics will be written out to an ascii file named cfl\_diagnostics.ascii. In this file the maximum value of $C_u$, $C_v$, and $C_w$ are printed at each timestep along with the coordinates of where the maximum value occurs. At 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 with the coordinates of each. The maximum values from the run are also copied to the ocean.output file.  
    17591731 
    17601732 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_DIU.tex

    r9392 r9393  
    55% Edited by James While 
    66% ================================================================ 
    7 \chapter{Diurnal SST models (DIU)} 
     7\chapter{Diurnal SST Models (DIU)} 
    88\label{DIU} 
    99 
     
    3737This namelist contains only two variables: 
    3838\begin{description} 
    39 \item[\np{ln_diurnal}] A logical switch for turning on/off both the cool skin and warm layer. 
    40 \item[\np{ln_diurnal_only}] A logical switch which if .TRUE. will run the diurnal model 
     39\item[\np{ln\_diurnal}] A logical switch for turning on/off both the cool skin and warm layer. 
     40\item[\np{ln\_diurnal\_only}] A logical switch which if \forcode{.true.} will run the diurnal model 
    4141without the other dynamical parts of NEMO.   
    42 \np{ln_diurnal_only} must be .FALSE. if \np{ln_diurnal} is .FALSE. 
     42\np{ln\_diurnal\_only} must be \forcode{.false.} if \np{ln\_diurnal} is \forcode{.false.}. 
    4343\end{description} 
    4444 
     
    5353 
    5454%=============================================================== 
    55 \section{Warm Layer model} 
     55\section{Warm layer model} 
    5656\label{warm_layer_sec} 
    5757%=============================================================== 
     
    120120%=============================================================== 
    121121 
    122 \section{Cool Skin model} 
     122\section{Cool skin model} 
    123123\label{cool_skin_sec} 
    124124 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_DOM.tex

    r9392 r9393  
    44% Chapter 2 ——— Space and Time Domain (DOM) 
    55% ================================================================ 
    6 \chapter{Space Domain (DOM) } 
     6\chapter{Space Domain (DOM)} 
    77\label{DOM} 
    88\minitoc 
     
    3131% Fundamentals of the Discretisation 
    3232% ================================================================ 
    33 \section{Fundamentals of the Discretisation} 
     33\section{Fundamentals of the discretisation} 
    3434\label{DOM_basics} 
    3535 
     
    3737%        Arrangement of Variables  
    3838% ------------------------------------------------------------------------------------------------------------- 
    39 \subsection{Arrangement of Variables} 
     39\subsection{Arrangement of variables} 
    4040\label{DOM_cell} 
    4141 
     
    107107%        Vector Invariant Formulation  
    108108% ------------------------------------------------------------------------------------------------------------- 
    109 \subsection{Discrete Operators} 
     109\subsection{Discrete operators} 
    110110\label{DOM_operators} 
    111111 
     
    198198%        Numerical Indexing  
    199199% ------------------------------------------------------------------------------------------------------------- 
    200 \subsection{Numerical Indexing} 
     200\subsection{Numerical indexing} 
    201201\label{DOM_Num_Index} 
    202202 
     
    221221%        Horizontal Indexing  
    222222% ----------------------------------- 
    223 \subsubsection{Horizontal Indexing} 
     223\subsubsection{Horizontal indexing} 
    224224\label{DOM_Num_Index_hor} 
    225225 
     
    232232%        Vertical indexing  
    233233% ----------------------------------- 
    234 \subsubsection{Vertical Indexing} 
     234\subsubsection{Vertical indexing} 
    235235\label{DOM_Num_Index_vertical} 
    236236 
     
    264264%        Domain Size 
    265265% ----------------------------------- 
    266 \subsubsection{Domain Size} 
     266\subsubsection{Domain size} 
    267267\label{DOM_size} 
    268268 
     
    281281% Domain: List of fields needed 
    282282% ================================================================ 
    283 \section  [Domain: Needed fields] 
    284       {Domain: Needed fields} 
     283\section{Needed fields} 
    285284\label{DOM_fields} 
    286285The ocean mesh ($i.e.$ the position of all the scalar and vector points) is defined  
     
    309308ie1e2u\_v is a flag to flag set u and  v surfaces are neither read nor computed.\\ 
    310309  
    311 These fields can be read in an domain input file which name is setted in \np{cn_domcfg} parameter specified in \ngn{namcfg}. 
     310These fields can be read in an domain input file which name is setted in \np{cn\_domcfg} parameter specified in \ngn{namcfg}. 
    312311\forfile{../namelists/namcfg} 
    313312or they can be defined in an analytical way in MY\_SRC directory of the configuration. 
     
    323322% Domain: Horizontal Grid (mesh)  
    324323% ================================================================ 
    325 \section  [Domain: Horizontal Grid (mesh) (\textit{domhgr})]                
    326       {Domain: Horizontal Grid (mesh) \small{(\protect\mdl{domhgr} module)} } 
     324\section{Horizontal grid mesh (\protect\mdl{domhgr})} 
    327325\label{DOM_hgr} 
    328326 
     
    409407%        Grid files 
    410408% ------------------------------------------------------------------------------------------------------------- 
    411 \subsection{Output Grid files} 
     409\subsection{Output grid files} 
    412410\label{DOM_hgr_files} 
    413411 
    414412All the arrays relating to a particular ocean model configuration (grid-point  
    415 position, scale factors, masks) can be saved in files if $nn\_msh \not= 0$  
     413position, scale factors, masks) can be saved in files if \np{nn\_msh} $\not= 0$  
    416414(namelist variable in \ngn{namdom}). This can be particularly useful for plots and off-line  
    417415diagnostics. In some cases, the user may choose to make a local modification  
     
    420418happens to be too wide due to insufficient model resolution). An example  
    421419is Gibraltar Strait in the ORCA2 configuration. When such modifications are done,  
    422 the output grid written when $nn\_msh \not= 0$ is no more equal to the input grid. 
     420the output grid written when \np{nn\_msh} $\not= 0$ is no more equal to the input grid. 
    423421 
    424422$\ $\newline    % force a new line 
     
    427425% Domain: Vertical Grid (domzgr) 
    428426% ================================================================ 
    429 \section  [Domain: Vertical Grid (\textit{domzgr})] 
    430       {Domain: Vertical Grid \small{(\protect\mdl{domzgr} module)} } 
     427\section{Vertical grid (\protect\mdl{domzgr})} 
    431428\label{DOM_zgr} 
    432429%-----------------------------------------nam_zgr & namdom------------------------------------------- 
     
    454451(d) hybrid $s-z$ coordinate,  
    455452(e) hybrid $s-z$ coordinate with partial step, and  
    456 (f) same as (e) but in the non-linear free surface (\protect\forcode{ln_linssh = .false.}).  
     453(f) same as (e) but in the non-linear free surface (\np{ln\_linssh}\forcode{ = .false.}).  
    457454Note that the non-linear free surface can be used with any of the  
    4584555 coordinates (a) to (e).} 
     
    464461option which can be enabled or disabled in the middle of an experiment. Three main  
    465462choices are offered (Fig.~\ref{Fig_z_zps_s_sps}a to c): $z$-coordinate with full step  
    466 bathymetry (\np{ln_zco}~=~true), $z$-coordinate with partial step bathymetry  
    467 (\np{ln_zps}~=~true), or generalized, $s$-coordinate (\np{ln_sco}~=~true).  
     463bathymetry (\np{ln\_zco}\forcode{ = .true.}), $z$-coordinate with partial step bathymetry  
     464(\np{ln\_zps}\forcode{ = .true.}), or generalized, $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}).  
    468465Hybridation of the three main coordinates are available: $s-z$ or $s-zps$ coordinate  
    469466(Fig.~\ref{Fig_z_zps_s_sps}d and \ref{Fig_z_zps_s_sps}e). By default a non-linear free surface is used: 
    470467the coordinate follow the time-variation of the free surface so that the transformation is time dependent:  
    471 $z(i,j,k,t)$ (Fig.~\ref{Fig_z_zps_s_sps}f). When a linear free surface is assumed (\forcode{ln_linssh = .true.}),  
     468$z(i,j,k,t)$ (Fig.~\ref{Fig_z_zps_s_sps}f). When a linear free surface is assumed (\np{ln\_linssh}\forcode{ = .true.}),  
    472469the vertical coordinate are fixed in time, but the seawater can move up and down across the z=0 surface  
    473470(in other words, the top of the ocean in not a rigid-lid).  
    474471The last choice in terms of vertical coordinate concerns the presence (or not) in the model domain  
    475 of ocean cavities beneath ice shelves. Setting \np{ln_isfcav} to true allows to manage ocean cavities,  
     472of ocean cavities beneath ice shelves. Setting \np{ln\_isfcav} to true allows to manage ocean cavities,  
    476473otherwise they are filled in. This option is currently only available in $z$- or $zps$-coordinate, 
    477474and partial step are also applied at the ocean/ice shelf interface.  
     
    483480\ifile{bathy\_meter} file, so that the computation of the number of wet ocean point  
    484481in each water column is by-passed}.  
    485 If \np{ln_isfcav}~=~true, an extra file input file describing the ice shelf draft  
     482If \np{ln\_isfcav}\forcode{ = .true.}, an extra file input file describing the ice shelf draft  
    486483(in meters) (\ifile{isf\_draft\_meter}) is needed. 
    487484 
     
    503500%%% 
    504501 
    505 Unless a linear free surface is used (\forcode{ln_linssh = .false.}), the arrays describing  
     502Unless a linear free surface is used (\np{ln\_linssh}\forcode{ = .false.}), the arrays describing  
    506503the grid point depths and vertical scale factors are three set of three dimensional arrays $(i,j,k)$  
    507504defined at \textit{before}, \textit{now} and \textit{after} time step. The time at which they are 
    508505defined is indicated by a suffix:$\_b$, $\_n$, or $\_a$, respectively. They are updated at each model time step 
    509506using a fixed reference coordinate system which computer names have a $\_0$ suffix.  
    510 When the linear free surface option is used (\forcode{ln_linssh = .true.}), \textit{before}, \textit{now}  
     507When the linear free surface option is used (\np{ln\_linssh}\forcode{ = .true.}), \textit{before}, \textit{now}  
    511508and \textit{after} arrays are simply set one for all to their reference counterpart.  
    512509 
     
    515512%        Meter Bathymetry 
    516513% ------------------------------------------------------------------------------------------------------------- 
    517 \subsection{Meter Bathymetry} 
     514\subsection{Meter bathymetry} 
    518515\label{DOM_bathy} 
    519516 
    520517Three options are possible for defining the bathymetry, according to the  
    521 namelist variable \np{nn_bathy} (found in \ngn{namdom} namelist):  
     518namelist variable \np{nn\_bathy} (found in \ngn{namdom} namelist):  
    522519\begin{description} 
    523 \item[\np{nn_bathy} = 0] a flat-bottom domain is defined. The total depth $z_w (jpk)$  
     520\item[\np{nn\_bathy}\forcode{ = 0}]: a flat-bottom domain is defined. The total depth $z_w (jpk)$  
    524521is given by the coordinate transformation. The domain can either be a closed  
    525522basin or a periodic channel depending on the parameter \np{jperio}.  
    526 \item[\np{nn_bathy} = -1] a domain with a bump of topography one third of the  
     523\item[\np{nn\_bathy}\forcode{ = -1}]: a domain with a bump of topography one third of the  
    527524domain width at the central latitude. This is meant for the "EEL-R5" configuration,  
    528525a periodic or open boundary channel with a seamount.  
    529 \item[\np{nn_bathy} = 1] read a bathymetry and ice shelf draft (if needed). 
     526\item[\np{nn\_bathy}\forcode{ = 1}]: read a bathymetry and ice shelf draft (if needed). 
    530527 The \ifile{bathy\_meter} file (Netcdf format) provides the ocean depth (positive, in meters) 
    531528 at each grid point of the model grid. The bathymetry is usually built by interpolating a standard bathymetry product  
     
    535532 
    536533The \ifile{isfdraft\_meter} file (Netcdf format) provides the ice shelf draft (positive, in meters) 
    537  at each grid point of the model grid. This file is only needed if \np{ln_isfcav}~=~true.  
     534 at each grid point of the model grid. This file is only needed if \np{ln\_isfcav}\forcode{ = .true.}.  
    538535Defining the ice shelf draft will also define the ice shelf edge and the grounding line position. 
    539536\end{description} 
     
    550547%        z-coordinate  and reference coordinate transformation 
    551548% ------------------------------------------------------------------------------------------------------------- 
    552 \subsection[$z$-coordinate (\protect\np{ln_zco}] 
    553         {$z$-coordinate (\protect\forcode{ln_zco = .true.}) and reference coordinate} 
     549\subsection[$Z$-coordinate (\protect\np{ln\_zco}\forcode{ = .true.}) and ref. coordinate] 
     550            {$Z$-coordinate (\protect\np{ln\_zco}\forcode{ = .true.}) and reference coordinate} 
    554551\label{DOM_zco} 
    555552 
     
    593590(Fig.~\ref{Fig_zgr}). 
    594591 
    595 If the ice shelf cavities are opened (\np{ln_isfcav}=~true~), the definition of $z_0$ is the same.  
     592If the ice shelf cavities are opened (\np{ln\_isfcav}\forcode{ = .true.}), the definition of $z_0$ is the same.  
    596593However, definition of $e_3^0$ at $t$- and $w$-points is respectively changed to: 
    597594\begin{equation} \label{DOM_zgr_ana} 
     
    629626Rather than entering parameters $h_{sur}$, $h_{0}$, and $h_{1}$ directly, it is  
    630627possible to recalculate them. In that case the user sets  
    631 \np{ppsur}=\np{ppa0}=\forcode{ppa1 = 999999}., in \ngn{namcfg} namelist,  
     628\np{ppsur}\forcode{ = }\np{ppa0}\forcode{ = }\np{ppa1}\forcode{ = 999999}., in \ngn{namcfg} namelist,  
    632629and specifies instead the four following parameters: 
    633630\begin{itemize} 
     
    640637\end{itemize} 
    641638As an example, for the $45$ layers used in the DRAKKAR configuration those  
    642 parameters are: \jp{jpk}=46, \forcode{ppacr = 9}, \forcode{ppkth = 23}.563, \forcode{ppdzmin = 6}m,  
    643 \forcode{pphmax = 5750}m. 
     639parameters are: \jp{jpk}\forcode{ = 46}, \np{ppacr}\forcode{ = 9}, \np{ppkth}\forcode{ = 23.563}, \np{ppdzmin}\forcode{ = 6}m, \np{pphmax}\forcode{ = 5750}m. 
    644640 
    645641%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    688684%        z-coordinate with partial step 
    689685% ------------------------------------------------------------------------------------------------------------- 
    690 \subsection   [$z$-coordinate with partial step (\protect\np{ln_zps})] 
    691          {$z$-coordinate with partial step (\protect\np{ln_zps}=.true.)} 
     686\subsection{$Z$-coordinate with partial step (\protect\np{ln\_zps}\forcode{ = .true.})} 
    692687\label{DOM_zps} 
    693688%--------------------------------------------namdom------------------------------------------------------- 
     
    712707Two variables in the namdom namelist are used to define the partial step  
    713708vertical grid. The mimimum water thickness (in meters) allowed for a cell  
    714 partially filled with bathymetry at level jk is the minimum of \np{rn_e3zps_min}  
    715 (thickness in meters, usually $20~m$) or $e_{3t}(jk)*rn\_e3zps\_rat$ (a fraction,  
     709partially filled with bathymetry at level jk is the minimum of \np{rn\_e3zps\_min}  
     710(thickness in meters, usually $20~m$) or $e_{3t}(jk)*$\np{rn\_e3zps\_rat} (a fraction,  
    716711usually 10\%, of the default thickness $e_{3t}(jk)$). 
    717712 
     
    721716%        s-coordinate 
    722717% ------------------------------------------------------------------------------------------------------------- 
    723 \subsection   [$s$-coordinate (\protect\np{ln_sco})] 
    724            {$s$-coordinate (\protect\forcode{ln_sco = .true.})} 
     718\subsection{$S$-coordinate (\protect\np{ln\_sco}\forcode{ = .true.})} 
    725719\label{DOM_sco} 
    726720%------------------------------------------nam_zgr_sco--------------------------------------------------- 
     
    728722%-------------------------------------------------------------------------------------------------------------- 
    729723Options are defined in \ngn{namzgr\_sco}. 
    730 In $s$-coordinate (\np{ln_sco}~=~true), the depth and thickness of the model  
     724In $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}), the depth and thickness of the model  
    731725levels are defined from the product of a depth field and either a stretching  
    732726function or its derivative, respectively: 
     
    744738depth, since a mixed step-like and bottom-following representation of the  
    745739topography can be used (Fig.~\ref{Fig_z_zps_s_sps}d-e) or an envelop bathymetry can be defined (Fig.~\ref{Fig_z_zps_s_sps}f). 
    746 The namelist parameter \np{rn_rmax} determines the slope at which the terrain-following coordinate intersects  
     740The namelist parameter \np{rn\_rmax} determines the slope at which the terrain-following coordinate intersects  
    747741the sea bed and becomes a pseudo z-coordinate.  
    748 The coordinate can also be hybridised by specifying \np{rn_sbot_min} and \np{rn_sbot_max}  
     742The coordinate can also be hybridised by specifying \np{rn\_sbot\_min} and \np{rn\_sbot\_max}  
    749743as the minimum and maximum depths at which the terrain-following vertical coordinate is calculated. 
    750744 
     
    753747 
    754748The original default NEMO s-coordinate stretching is available if neither of the other options  
    755 are specified as true (\np{ln_s_SH94}~=~false and \np{ln_s_SF12}~=~false).  
     749are specified as true (\np{ln\_s\_SH94}\forcode{ = .false.} and \np{ln\_s\_SF12}\forcode{ = .false.}).  
    756750This uses a depth independent $\tanh$ function for the stretching \citep{Madec_al_JPO96}: 
    757751 
     
    779773 
    780774A stretching function, modified from the commonly used \citet{Song_Haidvogel_JCP94}  
    781 stretching (\np{ln_s_SH94}~=~true), is also available and is more commonly used for shelf seas modelling: 
     775stretching (\np{ln\_s\_SH94}\forcode{ = .true.}), is also available and is more commonly used for shelf seas modelling: 
    782776 
    783777\begin{equation} 
     
    796790%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    797791 
    798 where $H_c$ is the critical depth (\np{rn_hc}) at which the coordinate transitions from  
    799 pure $\sigma$ to the stretched coordinate,  and $\theta$ (\np{rn_theta}) and $b$ (\np{rn_bb})  
     792where $H_c$ is the critical depth (\np{rn\_hc}) at which the coordinate transitions from  
     793pure $\sigma$ to the stretched coordinate,  and $\theta$ (\np{rn\_theta}) and $b$ (\np{rn\_bb})  
    800794are the surface and bottom control parameters such that $0\leqslant \theta \leqslant 20$, and  
    801795$0\leqslant b\leqslant 1$. $b$ has been designed to allow surface and/or bottom  
    802796increase of the vertical resolution (Fig.~\ref{Fig_sco_function}). 
    803797 
    804 Another example has been provided at version 3.5 (\np{ln_s_SF12}) that allows  
     798Another example has been provided at version 3.5 (\np{ln\_s\_SF12}) that allows  
    805799a fixed surface resolution in an analytical terrain-following stretching \citet{Siddorn_Furner_OM12}.  
    806800In this case the a stretching function $\gamma$ is defined such that: 
     
    823817 
    824818This gives an analytical stretching of $\sigma$ that is solvable in $A$ and $B$ as a function of  
    825 the user prescribed stretching parameter $\alpha$ (\np{rn_alpha}) that stretches towards  
    826 the surface ($\alpha > 1.0$) or the bottom ($\alpha < 1.0$) and user prescribed surface (\np{rn_zs})  
     819the user prescribed stretching parameter $\alpha$ (\np{rn\_alpha}) that stretches towards  
     820the surface ($\alpha > 1.0$) or the bottom ($\alpha < 1.0$) and user prescribed surface (\np{rn\_zs})  
    827821and bottom depths. The bottom cell depth in this example is given as a function of water depth: 
    828822 
     
    831825\end{equation} 
    832826 
    833 where the namelist parameters \np{rn_zb_a} and \np{rn_zb_b} are $a$ and $b$ respectively. 
     827where the namelist parameters \np{rn\_zb\_a} and \np{rn\_zb\_b} are $a$ and $b$ respectively. 
    834828 
    835829%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    843837This gives a smooth analytical stretching in computational space that is constrained to given specified surface and bottom grid cell thicknesses in real space. This is not to be confused with the hybrid schemes that superimpose geopotential coordinates on terrain following coordinates thus creating a non-analytical vertical coordinate that therefore may suffer from large gradients in the vertical resolutions. This stretching is less straightforward to implement than the \citet{Song_Haidvogel_JCP94} stretching, but has the advantage of resolving diurnal processes in deep water and has generally flatter slopes. 
    844838 
    845 As with the \citet{Song_Haidvogel_JCP94} stretching the stretch is only applied at depths greater than the critical depth $h_c$. In this example two options are available in depths shallower than $h_c$, with pure sigma being applied if the \np{ln_sigcrit} is true and pure z-coordinates if it is false (the z-coordinate being equal to the depths of the stretched coordinate at $h_c$. 
     839As with the \citet{Song_Haidvogel_JCP94} stretching the stretch is only applied at depths greater than the critical depth $h_c$. In this example two options are available in depths shallower than $h_c$, with pure sigma being applied if the \np{ln\_sigcrit} is true and pure z-coordinates if it is false (the z-coordinate being equal to the depths of the stretched coordinate at $h_c$. 
    846840 
    847841Minimising the horizontal slope of the vertical coordinate is important in terrain-following systems as large slopes lead to hydrostatic consistency. A hydrostatic consistency parameter diagnostic following \citet{Haney1991} has been implemented, and is output as part of the model mesh file at the start of the run. 
     
    850844%        z*- or s*-coordinate 
    851845% ------------------------------------------------------------------------------------------------------------- 
    852 \subsection{$z^*$- or $s^*$-coordinate (\protect\forcode{ln_linssh = .false.}) } 
     846\subsection{$Z^*$- or $S^*$-coordinate (\protect\np{ln\_linssh}\forcode{ = .false.}) } 
    853847\label{DOM_zgr_star} 
    854848 
     
    860854%        level bathymetry and mask  
    861855% ------------------------------------------------------------------------------------------------------------- 
    862 \subsection{level bathymetry and mask} 
     856\subsection{Level bathymetry and mask} 
    863857\label{DOM_msk} 
    864858 
     
    881875In case of ice shelf cavities, modifications of the model bathymetry and ice shelf draft into  
    882876the cavities are performed in the \textit{zgr\_isf} routine. The compatibility between ice shelf draft and bathymetry is checked.  
    883 All the locations where the isf cavity is thinnest than \np{rn_isfhmin} meters are grounded ($i.e.$ masked).  
     877All the locations where the isf cavity is thinnest than \np{rn\_isfhmin} meters are grounded ($i.e.$ masked).  
    884878If only one cell on the water column is opened at $t$-, $u$- or $v$-points, the bathymetry or the ice shelf draft is dug to fit this constrain. 
    885879If the incompatibility is too strong (need to dig more than 1 cell), the cell is masked.\\  
     
    912906% Domain: Initial State (dtatsd & istate) 
    913907% ================================================================ 
    914 \section  [Domain: Initial State (\textit{istate and dtatsd})] 
    915       {Domain: Initial State \small{(\protect\mdl{istate} and \protect\mdl{dtatsd} modules)} } 
     908\section{Initial state (\protect\mdl{istate} and \protect\mdl{dtatsd})} 
    916909\label{DTA_tsd} 
    917910%-----------------------------------------namtsd------------------------------------------- 
     
    921914Options are defined in \ngn{namtsd}. 
    922915By default, the ocean start from rest (the velocity field is set to zero) and the initialization of  
    923 temperature and salinity fields is controlled through the \np{ln_tsd_ini} namelist parameter. 
     916temperature and salinity fields is controlled through the \np{ln\_tsd\_ini} namelist parameter. 
    924917\begin{description} 
    925 \item[ln\_tsd\_init = .true.] use a T and S input files that can be given on the model grid itself or  
     918\item[\np{ln\_tsd\_init}\forcode{ = .true.}] use a T and S input files that can be given on the model grid itself or  
    926919on their native input data grid. In the latter case, the data will be interpolated on-the-fly both in the  
    927920horizontal and the vertical to the model grid (see \S~\ref{SBC_iof}). The information relative to the  
    928 input files are given in the \np{sn_tem} and \np{sn_sal} structures.  
     921input files are given in the \np{sn\_tem} and \np{sn\_sal} structures.  
    929922The computation is done in the \mdl{dtatsd} module. 
    930 \item[ln\_tsd\_init = .false.] use constant salinity value of 35.5 psu and an analytical profile of temperature 
     923\item[\np{ln\_tsd\_init}\forcode{ = .false.}] use constant salinity value of 35.5 psu and an analytical profile of temperature 
    931924(typical of the tropical ocean), see \rou{istate\_t\_s} subroutine called from \mdl{istate} module. 
    932925\end{description} 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_DYN.tex

    r9392 r9393  
    6969%           Horizontal divergence and relative vorticity 
    7070%-------------------------------------------------------------------------------------------------------------- 
    71 \subsection   [Horizontal divergence and relative vorticity (\textit{divcur})] 
    72          {Horizontal divergence and relative vorticity (\protect\mdl{divcur})} 
     71\subsection{Horizontal divergence and relative vorticity (\protect\mdl{divcur})} 
    7372\label{DYN_divcur} 
    7473 
     
    102101%           Sea Surface Height evolution 
    103102%-------------------------------------------------------------------------------------------------------------- 
    104 \subsection   [Sea surface height evolution and vertical velocity (\textit{sshwzv})] 
    105          {Horizontal divergence and relative vorticity (\protect\mdl{sshwzv})} 
     103\subsection{Horizontal divergence and relative vorticity (\protect\mdl{sshwzv})} 
    106104\label{DYN_sshwzv} 
    107105 
     
    159157% Coriolis and Advection terms: vector invariant form 
    160158% ================================================================ 
    161 \section{Coriolis and Advection: vector invariant form} 
     159\section{Coriolis and advection: vector invariant form} 
    162160\label{DYN_adv_cor_vect} 
    163161%-----------------------------------------nam_dynadv---------------------------------------------------- 
     
    178176%        Vorticity term  
    179177% ------------------------------------------------------------------------------------------------------------- 
    180 \subsection   [Vorticity term (\textit{dynvor}) ] 
    181          {Vorticity term (\protect\mdl{dynvor})} 
     178\subsection{Vorticity term (\protect\mdl{dynvor})} 
    182179\label{DYN_vor} 
    183180%------------------------------------------nam_dynvor---------------------------------------------------- 
     
    186183 
    187184Options are defined through the \ngn{namdyn\_vor} namelist variables. 
    188 Four discretisations of the vorticity term (\textit{ln\_dynvor\_xxx}=true) are available:  
     185Four discretisations of the vorticity term (\np{ln\_dynvor\_xxx}\forcode{ = .true.}) are available:  
    189186conserving potential enstrophy of horizontally non-divergent flow (ENS scheme) ;  
    190187conserving horizontal kinetic energy (ENE scheme) ; conserving potential enstrophy for  
     
    193190flow and horizontal kinetic energy (EEN scheme) (see  Appendix~\ref{Apdx_C_vorEEN}). In the  
    194191case of ENS, ENE or MIX schemes the land sea mask may be slightly modified to ensure the  
    195 consistency of vorticity term with analytical equations (\textit{ln\_dynvor\_con}=true). 
     192consistency of vorticity term with analytical equations (\np{ln\_dynvor\_con}\forcode{ = .true.}). 
    196193The vorticity terms are all computed in dedicated routines that can be found in  
    197194the \mdl{dynvor} module. 
     
    200197%                 enstrophy conserving scheme 
    201198%------------------------------------------------------------- 
    202 \subsubsection{Enstrophy conserving scheme (\protect\forcode{ln_dynvor_ens = .true.})} 
     199\subsubsection{Enstrophy conserving scheme (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})} 
    203200\label{DYN_vor_ens} 
    204201 
     
    221218%                 energy conserving scheme 
    222219%------------------------------------------------------------- 
    223 \subsubsection{Energy conserving scheme (\protect\forcode{ln_dynvor_ene = .true.})} 
     220\subsubsection{Energy conserving scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})} 
    224221\label{DYN_vor_ene} 
    225222 
     
    238235%                 mix energy/enstrophy conserving scheme 
    239236%------------------------------------------------------------- 
    240 \subsubsection{Mixed energy/enstrophy conserving scheme (\protect\forcode{ln_dynvor_mix = .true.}) } 
     237\subsubsection{Mixed energy/enstrophy conserving scheme (\protect\np{ln\_dynvor\_mix}\forcode{ = .true.}) } 
    241238\label{DYN_vor_mix} 
    242239 
     
    261258%                 energy and enstrophy conserving scheme 
    262259%------------------------------------------------------------- 
    263 \subsubsection{Energy and enstrophy conserving scheme (\protect\forcode{ln_dynvor_een = .true.}) } 
     260\subsubsection{Energy and enstrophy conserving scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.}) } 
    264261\label{DYN_vor_een} 
    265262 
     
    305302A key point in \eqref{Eq_een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made.  
    306303It uses the sum of masked t-point vertical scale factor divided either  
    307 by the sum of the four t-point masks (\np{nn_een_e3f}~=~1),  
    308 or  just by $4$ (\np{nn_een_e3f}~=~true). 
     304by the sum of the four t-point masks (\np{nn\_een\_e3f}\forcode{ = 1}),  
     305or  just by $4$ (\np{nn\_een\_e3f}\forcode{ = .true.}). 
    309306The latter case preserves the continuity of $e_{3f}$ when one or more of the neighbouring $e_{3t}$  
    310307tends to zero and extends by continuity the value of $e_{3f}$ into the land areas.  
     
    346343%           Kinetic Energy Gradient term 
    347344%-------------------------------------------------------------------------------------------------------------- 
    348 \subsection   [Kinetic Energy Gradient term (\textit{dynkeg})] 
    349          {Kinetic Energy Gradient term (\protect\mdl{dynkeg})} 
     345\subsection{Kinetic energy gradient term (\protect\mdl{dynkeg})} 
    350346\label{DYN_keg} 
    351347 
     
    363359%           Vertical advection term 
    364360%-------------------------------------------------------------------------------------------------------------- 
    365 \subsection   [Vertical advection term (\textit{dynzad}) ] 
    366          {Vertical advection term (\protect\mdl{dynzad}) } 
     361\subsection{Vertical advection term (\protect\mdl{dynzad}) } 
    367362\label{DYN_zad} 
    368363 
     
    377372\end{aligned}         \right. 
    378373\end{equation}  
    379 When \np{ln_dynzad_zts}~=~\textit{true}, a split-explicit time stepping with 5 sub-timesteps is used  
     374When \np{ln\_dynzad\_zts}\forcode{ = .true.}, a split-explicit time stepping with 5 sub-timesteps is used  
    380375on the vertical advection term. 
    381376This option can be useful when the value of the timestep is limited by vertical advection \citep{Lemarie_OM2015}.  
    382377Note that in this case, a similar split-explicit time stepping should be used on  
    383378vertical advection of tracer to ensure a better stability,  
    384 an option which is only available with a TVD scheme (see \np{ln_traadv_tvd_zts} in \S\ref{TRA_adv_tvd}). 
     379an option which is only available with a TVD scheme (see \np{ln\_traadv\_tvd\_zts} in \S\ref{TRA_adv_tvd}). 
    385380 
    386381 
     
    388383% Coriolis and Advection : flux form 
    389384% ================================================================ 
    390 \section{Coriolis and Advection: flux form} 
     385\section{Coriolis and advection: flux form} 
    391386\label{DYN_adv_cor_flux} 
    392387%------------------------------------------nam_dynadv---------------------------------------------------- 
     
    405400%           Coriolis plus curvature metric terms 
    406401%-------------------------------------------------------------------------------------------------------------- 
    407 \subsection   [Coriolis plus curvature metric terms (\textit{dynvor}) ] 
    408          {Coriolis plus curvature metric terms (\protect\mdl{dynvor}) } 
     402\subsection{Coriolis plus curvature metric terms (\protect\mdl{dynvor}) } 
    409403\label{DYN_cor_flux} 
    410404 
     
    427421%           Flux form Advection term 
    428422%-------------------------------------------------------------------------------------------------------------- 
    429 \subsection   [Flux form Advection term (\textit{dynadv}) ] 
    430          {Flux form Advection term (\protect\mdl{dynadv}) } 
     423\subsection{Flux form advection term (\protect\mdl{dynadv}) } 
    431424\label{DYN_adv_flux} 
    432425 
     
    451444difference scheme, CEN2, or a $3^{rd}$ order upstream biased scheme, UBS.  
    452445The latter is described in \citet{Shchepetkin_McWilliams_OM05}. The schemes are  
    453 selected using the namelist logicals \np{ln_dynadv_cen2} and \np{ln_dynadv_ubs}.  
     446selected using the namelist logicals \np{ln\_dynadv\_cen2} and \np{ln\_dynadv\_ubs}.  
    454447In flux form, the schemes differ by the choice of a space and time interpolation to  
    455448define the value of $u$ and $v$ at the centre of each face of $u$- and $v$-cells,  
     
    460453%                 2nd order centred scheme 
    461454%------------------------------------------------------------- 
    462 \subsubsection{$2^{nd}$ order centred scheme (cen2) (\protect\forcode{ln_dynadv_cen2 = .true.})} 
     455\subsubsection{CEN2: $2^{nd}$ order centred scheme (\protect\np{ln\_dynadv\_cen2}\forcode{ = .true.})} 
    463456\label{DYN_adv_cen2} 
    464457 
     
    481474%                 UBS scheme 
    482475%------------------------------------------------------------- 
    483 \subsubsection{Upstream Biased Scheme (UBS) (\protect\forcode{ln_dynadv_ubs = .true.})} 
     476\subsubsection{UBS: Upstream Biased Scheme (\protect\np{ln\_dynadv\_ubs}\forcode{ = .true.})} 
    484477\label{DYN_adv_ubs} 
    485478 
     
    500493permitted. But the amplitudes of the false extrema are significantly reduced over  
    501494those in the centred second order method. As the scheme already includes  
    502 a diffusion component, it can be used without explicit  lateral diffusion on momentum  
    503 ($i.e.$ \np{ln_dynldf_lap}=\forcode{ln_dynldf_bilap = .false.}), and it is recommended to do so. 
     495a diffusion component, it can be used without explicit lateral diffusion on momentum  
     496($i.e.$ \np{ln\_dynldf\_lap}\forcode{ = }\np{ln\_dynldf\_bilap}\forcode{ = .false.}), and it is recommended to do so. 
    504497 
    505498The UBS scheme is not used in all directions. In the vertical, the centred $2^{nd}$  
     
    532525%           Hydrostatic pressure gradient term 
    533526% ================================================================ 
    534 \section  [Hydrostatic pressure gradient (\textit{dynhpg})] 
    535       {Hydrostatic pressure gradient (\protect\mdl{dynhpg})} 
     527\section{Hydrostatic pressure gradient (\protect\mdl{dynhpg})} 
    536528\label{DYN_hpg} 
    537529%------------------------------------------nam_dynhpg--------------------------------------------------- 
     
    554546%           z-coordinate with full step 
    555547%-------------------------------------------------------------------------------------------------------------- 
    556 \subsection   [$z$-coordinate with full step (\protect\np{ln_dynhpg_zco}) ] 
    557          {$z$-coordinate with full step (\protect\forcode{ln_dynhpg_zco = .true.})} 
     548\subsection{Full step $Z$-coordinate (\protect\np{ln\_dynhpg\_zco}\forcode{ = .true.})} 
    558549\label{DYN_hpg_zco} 
    559550 
     
    595586%           z-coordinate with partial step 
    596587%-------------------------------------------------------------------------------------------------------------- 
    597 \subsection   [$z$-coordinate with partial step (\protect\np{ln_dynhpg_zps})] 
    598          {$z$-coordinate with partial step (\protect\forcode{ln_dynhpg_zps = .true.})} 
     588\subsection{Partial step $Z$-coordinate (\protect\np{ln\_dynhpg\_zps}\forcode{ = .true.})} 
    599589\label{DYN_hpg_zps} 
    600590 
     
    616606%           s- and s-z-coordinates 
    617607%-------------------------------------------------------------------------------------------------------------- 
    618 \subsection{$s$- and $z$-$s$-coordinates} 
     608\subsection{$S$- and $Z$-$S$-coordinates} 
    619609\label{DYN_hpg_sco} 
    620610 
     
    624614cubic polynomial method is currently disabled whilst known bugs are under investigation. 
    625615 
    626 $\bullet$ Traditional coding (see for example \citet{Madec_al_JPO96}: (\forcode{ln_dynhpg_sco = .true.}) 
     616$\bullet$ Traditional coding (see for example \citet{Madec_al_JPO96}: (\np{ln\_dynhpg\_sco}\forcode{ = .true.}) 
    627617\begin{equation} \label{Eq_dynhpg_sco} 
    628618\left\{ \begin{aligned} 
     
    639629($e_{3w}$). 
    640630  
    641 $\bullet$ Traditional coding with adaptation for ice shelf cavities (\forcode{ln_dynhpg_isf = .true.}). 
    642 This scheme need the activation of ice shelf cavities (\forcode{ln_isfcav = .true.}). 
    643  
    644 $\bullet$ Pressure Jacobian scheme (prj) (a research paper in preparation) (\forcode{ln_dynhpg_prj = .true.}) 
     631$\bullet$ Traditional coding with adaptation for ice shelf cavities (\np{ln\_dynhpg\_isf}\forcode{ = .true.}). 
     632This scheme need the activation of ice shelf cavities (\np{ln\_isfcav}\forcode{ = .true.}). 
     633 
     634$\bullet$ Pressure Jacobian scheme (prj) (a research paper in preparation) (\np{ln\_dynhpg\_prj}\forcode{ = .true.}) 
    645635 
    646636$\bullet$ Density Jacobian with cubic polynomial scheme (DJC) \citep{Shchepetkin_McWilliams_OM05}  
    647 (\forcode{ln_dynhpg_djc = .true.}) (currently disabled; under development) 
     637(\np{ln\_dynhpg\_djc}\forcode{ = .true.}) (currently disabled; under development) 
    648638 
    649639Note that expression \eqref{Eq_dynhpg_sco} is commonly used when the variable volume formulation is 
    650640activated (\key{vvl}) because in that case, even with a flat bottom, the coordinate surfaces are not 
    651641horizontal but follow the free surface \citep{Levier2007}. The pressure jacobian scheme 
    652 (\forcode{ln_dynhpg_prj = .true.}) is available as an improved option to \forcode{ln_dynhpg_sco = .true.} when 
     642(\np{ln\_dynhpg\_prj}\forcode{ = .true.}) is available as an improved option to \np{ln\_dynhpg\_sco}\forcode{ = .true.} when 
    653643\key{vvl} is active.  The pressure Jacobian scheme uses a constrained cubic spline to reconstruct 
    654644the density profile across the water column. This method maintains the monotonicity between the 
     
    660650\label{DYN_hpg_isf} 
    661651Beneath an ice shelf, the total pressure gradient is the sum of the pressure gradient due to the ice shelf load and 
    662  the pressure gradient due to the ocean load. If cavity opened (\np{ln_isfcav}~=~true) these 2 terms can be 
    663  calculated by setting \np{ln_dynhpg_isf}~=~true. No other scheme are working with the ice shelf.\\ 
     652 the pressure gradient due to the ocean load. If cavity opened (\np{ln\_isfcav}\forcode{ = .true.}) these 2 terms can be 
     653 calculated by setting \np{ln\_dynhpg\_isf}\forcode{ = .true.}. No other scheme are working with the ice shelf.\\ 
    664654 
    665655$\bullet$ The main hypothesis to compute the ice shelf load is that the ice shelf is in an isostatic equilibrium. 
     
    673663%           Time-scheme 
    674664%-------------------------------------------------------------------------------------------------------------- 
    675 \subsection   [Time-scheme (\protect\np{ln_dynhpg_imp}) ] 
    676          {Time-scheme (\protect\np{ln_dynhpg_imp}= true/false)} 
     665\subsection{Time-scheme (\protect\np{ln\_dynhpg\_imp}\forcode{ = .true./.false.})} 
    677666\label{DYN_hpg_imp} 
    678667 
     
    689678time level $t$ only, as in the standard leapfrog scheme.  
    690679 
    691 $\bullet$ leapfrog scheme (\forcode{ln_dynhpg_imp = .true.}): 
     680$\bullet$ leapfrog scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}): 
    692681 
    693682\begin{equation} \label{Eq_dynhpg_lf} 
     
    696685\end{equation} 
    697686 
    698 $\bullet$ semi-implicit scheme (\forcode{ln_dynhpg_imp = .true.}): 
     687$\bullet$ semi-implicit scheme (\np{ln\_dynhpg\_imp}\forcode{ = .true.}): 
    699688\begin{equation} \label{Eq_dynhpg_imp} 
    700689\frac{u^{t+\rdt}-u^{t-\rdt}}{2\rdt} = \;\cdots \; 
     
    713702the stability limits associated with advection or diffusion. 
    714703 
    715 In practice, the semi-implicit scheme is used when \forcode{ln_dynhpg_imp = .true.}.  
     704In practice, the semi-implicit scheme is used when \np{ln\_dynhpg\_imp}\forcode{ = .true.}.  
    716705In this case, we choose to apply the time filter to temperature and salinity used in  
    717706the equation of state, instead of applying it to the hydrostatic pressure or to the  
     
    727716Note that in the semi-implicit case, it is necessary to save the filtered density, an  
    728717extra three-dimensional field, in the restart file to restart the model with exact  
    729 reproducibility. This option is controlled by  \np{nn_dynhpg_rst}, a namelist parameter. 
     718reproducibility. This option is controlled by  \np{nn\_dynhpg\_rst}, a namelist parameter. 
    730719 
    731720% ================================================================ 
    732721% Surface Pressure Gradient 
    733722% ================================================================ 
    734 \section  [Surface pressure gradient (\textit{dynspg}) ] 
    735       {Surface pressure gradient (\protect\mdl{dynspg})} 
     723\section{Surface pressure gradient (\protect\mdl{dynspg})} 
    736724\label{DYN_spg} 
    737725%-----------------------------------------nam_dynspg---------------------------------------------------- 
     
    793781% Split-explict free surface formulation 
    794782%-------------------------------------------------------------------------------------------------------------- 
    795 \subsection{Split-Explicit free surface (\protect\key{dynspg\_ts})} 
     783\subsection{Split-explicit free surface (\protect\key{dynspg\_ts})} 
    796784\label{DYN_spg_ts} 
    797785%------------------------------------------namsplit----------------------------------------------------------- 
     
    806794variables (Fig.~\ref{Fig_DYN_dynspg_ts}).  
    807795The size of the small time step, $\rdt_e$ (the external mode or barotropic time step) 
    808  is provided through the \np{nn_baro} namelist parameter as:  
    809 $\rdt_e = \rdt / nn\_baro$. This parameter can be optionally defined automatically (\forcode{ln_bt_nn_auto = .true.})  
     796 is provided through the \np{nn\_baro} namelist parameter as:  
     797$\rdt_e = \rdt / nn\_baro$. This parameter can be optionally defined automatically (\np{ln\_bt\_nn\_auto}\forcode{ = .true.})  
    810798considering that the stability of the barotropic system is essentially controled by external waves propagation.  
    811799Maximum Courant number is in that case time independent, and easily computed online from the input bathymetry. 
    812 Therefore, $\rdt_e$ is adjusted so that the Maximum allowed Courant number is smaller than \np{rn_bt_cmax}. 
     800Therefore, $\rdt_e$ is adjusted so that the Maximum allowed Courant number is smaller than \np{rn\_bt\_cmax}. 
    813801 
    814802%%% 
     
    839827The former are used to obtain time filtered quantities at $t+\rdt$ while the latter are used to obtain time averaged  
    840828transports to advect tracers. 
    841 a) Forward time integration: \protect\forcode{ln_bt_fw = .true.},  \protect\forcode{ln_bt_av = .true.}.  
    842 b) Centred time integration: \protect\forcode{ln_bt_fw = .false.}, \protect\forcode{ln_bt_av = .true.}.  
    843 c) Forward time integration with no time filtering (POM-like scheme): \protect\forcode{ln_bt_fw = .true.}, \protect\forcode{ln_bt_av = .false.}. } 
     829a) Forward time integration: \np{ln\_bt\_fw}\forcode{ = .true.},  \np{ln\_bt\_av}\forcode{ = .true.}. 
     830b) Centred time integration: \np{ln\_bt\_fw}\forcode{ = .false.}, \np{ln\_bt\_av}\forcode{ = .true.}. 
     831c) Forward time integration with no time filtering (POM-like scheme): \np{ln\_bt\_fw}\forcode{ = .true.}, \np{ln\_bt\_av}\forcode{ = .false.}. } 
    844832\end{center}    \end{figure} 
    845833%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   > 
    846834 
    847 In the default case (\forcode{ln_bt_fw = .true.}), the external mode is integrated  
     835In the default case (\np{ln\_bt\_fw}\forcode{ = .true.}), the external mode is integrated  
    848836between \textit{now} and  \textit{after} baroclinic time-steps (Fig.~\ref{Fig_DYN_dynspg_ts}a). To avoid aliasing of fast barotropic motions into three dimensional equations, time filtering is eventually applied on barotropic  
    849 quantities (\forcode{ln_bt_av = .true.}). In that case, the integration is extended slightly beyond  \textit{after} time step to provide time filtered quantities.  
     837quantities (\np{ln\_bt\_av}\forcode{ = .true.}). In that case, the integration is extended slightly beyond  \textit{after} time step to provide time filtered quantities.  
    850838These are used for the subsequent initialization of the barotropic mode in the following baroclinic step.  
    851839Since external mode equations written at baroclinic time steps finally follow a forward time stepping scheme,  
    852840asselin filtering is not applied to barotropic quantities. \\ 
    853841Alternatively, one can choose to integrate barotropic equations starting  
    854 from \textit{before} time step (\forcode{ln_bt_fw = .false.}). Although more computationaly expensive ( \np{nn_baro} additional iterations are indeed necessary), the baroclinic to barotropic forcing term given at \textit{now} time step  
     842from \textit{before} time step (\np{ln\_bt\_fw}\forcode{ = .false.}). Although more computationaly expensive ( \np{nn\_baro} additional iterations are indeed necessary), the baroclinic to barotropic forcing term given at \textit{now} time step  
    855843become centred in the middle of the integration window. It can easily be shown that this property  
    856844removes part of splitting errors between modes, which increases the overall numerical robustness. 
     
    868856%%% 
    869857 
    870 One can eventually choose to feedback instantaneous values by not using any time filter (\forcode{ln_bt_av = .false.}).  
     858One can eventually choose to feedback instantaneous values by not using any time filter (\np{ln\_bt\_av}\forcode{ = .false.}).  
    871859In that case, external mode equations are continuous in time, ie they are not re-initialized when starting a new  
    872860sub-stepping sequence. This is the method used so far in the POM model, the stability being maintained by refreshing at (almost)  
     
    1001989% Lateral diffusion term 
    1002990% ================================================================ 
    1003 \section  [Lateral diffusion term (\textit{dynldf})] 
    1004       {Lateral diffusion term (\protect\mdl{dynldf})} 
     991\section{Lateral diffusion term and operators (\protect\mdl{dynldf})} 
    1005992\label{DYN_ldf} 
    1006993%------------------------------------------nam_dynldf---------------------------------------------------- 
     
    10361023 
    10371024% ================================================================ 
    1038 \subsection   [Iso-level laplacian operator (\protect\np{ln_dynldf_lap}) ] 
    1039          {Iso-level laplacian operator (\protect\forcode{ln_dynldf_lap = .true.})} 
     1025\subsection[Iso-level laplacian (\protect\np{ln\_dynldf\_lap}\forcode{ = .true.})] 
     1026            {Iso-level laplacian operator (\protect\np{ln\_dynldf\_lap}\forcode{ = .true.})} 
    10401027\label{DYN_ldf_lap} 
    10411028 
     
    10601047%           Rotated laplacian operator 
    10611048%-------------------------------------------------------------------------------------------------------------- 
    1062 \subsection   [Rotated laplacian operator (\protect\np{ln_dynldf_iso}) ] 
    1063          {Rotated laplacian operator (\protect\forcode{ln_dynldf_iso = .true.})} 
     1049\subsection[Rotated laplacian (\protect\np{ln\_dynldf\_iso}\forcode{ = .true.})] 
     1050            {Rotated laplacian operator (\protect\np{ln\_dynldf\_iso}\forcode{ = .true.})} 
    10641051\label{DYN_ldf_iso} 
    10651052 
    10661053A rotation of the lateral momentum diffusion operator is needed in several cases:  
    1067 for iso-neutral diffusion in the $z$-coordinate (\forcode{ln_dynldf_iso = .true.}) and for  
    1068 either iso-neutral (\forcode{ln_dynldf_iso = .true.}) or geopotential  
    1069 (\forcode{ln_dynldf_hor = .true.}) diffusion in the $s$-coordinate. In the partial step  
     1054for iso-neutral diffusion in the $z$-coordinate (\np{ln\_dynldf\_iso}\forcode{ = .true.}) and for  
     1055either iso-neutral (\np{ln\_dynldf\_iso}\forcode{ = .true.}) or geopotential  
     1056(\np{ln\_dynldf\_hor}\forcode{ = .true.}) diffusion in the $s$-coordinate. In the partial step  
    10701057case, coordinates are horizontal except at the deepest level and no  
    1071 rotation is performed when \forcode{ln_dynldf_hor = .true.}. The diffusion operator  
     1058rotation is performed when \np{ln\_dynldf\_hor}\forcode{ = .true.}. The diffusion operator  
    10721059is defined simply as the divergence of down gradient momentum fluxes on each  
    10731060momentum component. It must be emphasized that this formulation ignores  
     
    11291116%           Iso-level bilaplacian operator 
    11301117%-------------------------------------------------------------------------------------------------------------- 
    1131 \subsection   [Iso-level bilaplacian operator (\protect\np{ln_dynldf_bilap})] 
    1132          {Iso-level bilaplacian operator (\protect\forcode{ln_dynldf_bilap = .true.})} 
     1118\subsection[Iso-level bilaplacian (\protect\np{ln\_dynldf\_bilap}\forcode{ = .true.})] 
     1119            {Iso-level bilaplacian operator (\protect\np{ln\_dynldf\_bilap}\forcode{ = .true.})} 
    11331120\label{DYN_ldf_bilap} 
    11341121 
     
    11451132%           Vertical diffusion term 
    11461133% ================================================================ 
    1147 \section  [Vertical diffusion term (\protect\mdl{dynzdf})] 
    1148       {Vertical diffusion term (\protect\mdl{dynzdf})} 
     1134\section{Vertical diffusion term (\protect\mdl{dynzdf})} 
    11491135\label{DYN_zdf} 
    11501136%----------------------------------------------namzdf------------------------------------------------------ 
     
    11571143would be too restrictive a constraint on the time step. Two time stepping schemes  
    11581144can be used for the vertical diffusion term : $(a)$ a forward time differencing  
    1159 scheme (\forcode{ln_zdfexp = .true.}) using a time splitting technique  
    1160 (\np{nn_zdfexp} $>$ 1) or $(b)$ a backward (or implicit) time differencing scheme  
    1161 (\forcode{ln_zdfexp = .false.}) (see \S\ref{STP}). Note that namelist variables  
    1162 \np{ln_zdfexp} and \np{nn_zdfexp} apply to both tracers and dynamics.  
     1145scheme (\np{ln\_zdfexp}\forcode{ = .true.}) using a time splitting technique  
     1146(\np{nn\_zdfexp} $>$ 1) or $(b)$ a backward (or implicit) time differencing scheme  
     1147(\np{ln\_zdfexp}\forcode{ = .false.}) (see \S\ref{STP}). Note that namelist variables  
     1148\np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics.  
    11631149 
    11641150The formulation of the vertical subgrid scale physics is the same whatever  
     
    11991185% External Forcing 
    12001186% ================================================================ 
    1201 \section{External Forcings} 
     1187\section{External forcings} 
    12021188\label{DYN_forcing} 
    12031189 
     
    12061192may enter the dynamical equations by affecting the surface pressure gradient.  
    12071193 
    1208 (1) When \np{ln_apr_dyn}~=~true (see \S\ref{SBC_apr}), the atmospheric pressure is taken  
     1194(1) When \np{ln\_apr\_dyn}\forcode{ = .true.} (see \S\ref{SBC_apr}), the atmospheric pressure is taken  
    12091195into account when computing the surface pressure gradient. 
    12101196 
    1211 (2) When \np{ln_tide_pot}~=~true and \np{ln_tide}~=~true (see \S\ref{SBC_tide}),  
     1197(2) When \np{ln\_tide\_pot}\forcode{ = .true.} and \np{ln\_tide}\forcode{ = .true.} (see \S\ref{SBC_tide}),  
    12121198the tidal potential is taken into account when computing the surface pressure gradient. 
    12131199 
    1214 (3) When \np{nn_ice_embd}~=~2 and LIM or CICE is used ($i.e.$ when the sea-ice is embedded in the ocean),  
     1200(3) When \np{nn\_ice\_embd}\forcode{ = 2} and LIM or CICE is used ($i.e.$ when the sea-ice is embedded in the ocean),  
    12151201the snow-ice mass is taken into account when computing the surface pressure gradient. 
    12161202 
     
    12221208% Time evolution term  
    12231209% ================================================================ 
    1224 \section  [Time evolution term (\textit{dynnxt})] 
    1225       {Time evolution term (\protect\mdl{dynnxt})} 
     1210\section{Time evolution term (\protect\mdl{dynnxt})} 
    12261211\label{DYN_nxt} 
    12271212 
     
    12381223weighted velocity (see \S\ref{Apdx_A_momentum})   
    12391224 
    1240 $\bullet$ vector invariant form or linear free surface (\forcode{ln_dynhpg_vec = .true.} ; \key{vvl} not defined): 
     1225$\bullet$ vector invariant form or linear free surface (\np{ln\_dynhpg\_vec}\forcode{ = .true.} ; \key{vvl} not defined): 
    12411226\begin{equation} \label{Eq_dynnxt_vec} 
    12421227\left\{   \begin{aligned} 
     
    12461231\end{equation}  
    12471232 
    1248 $\bullet$ flux form and nonlinear free surface (\forcode{ln_dynhpg_vec = .false.} ; \key{vvl} defined): 
     1233$\bullet$ flux form and nonlinear free surface (\np{ln\_dynhpg\_vec}\forcode{ = .false.} ; \key{vvl} defined): 
    12491234\begin{equation} \label{Eq_dynnxt_flux} 
    12501235\left\{   \begin{aligned} 
     
    12561241where RHS is the right hand side of the momentum equation, the subscript $f$  
    12571242denotes filtered values and $\gamma$ is the Asselin coefficient. $\gamma$ is  
    1258 initialized as \np{nn_atfp} (namelist parameter). Its default value is \np{nn_atfp} = $10^{-3}$. 
     1243initialized as \np{nn\_atfp} (namelist parameter). Its default value is \np{nn\_atfp}\forcode{ = 10.e-3}. 
    12591244In both cases, the modified Asselin filter is not applied since perfect conservation  
    12601245is not an issue for the momentum equations. 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_LBC.tex

    r9392 r9393  
    44% Chapter — Lateral Boundary Condition (LBC)  
    55% ================================================================ 
    6 \chapter{Lateral Boundary Condition (LBC) } 
     6\chapter{Lateral Boundary Condition (LBC)} 
    77\label{LBC} 
    88\minitoc 
     
    1717% Boundary Condition at the Coast 
    1818% ================================================================ 
    19 \section{Boundary Condition at the Coast (\protect\np{rn_shlat})} 
     19\section{Boundary condition at the coast (\protect\np{rn\_shlat})} 
    2020\label{LBC_coast} 
    2121%--------------------------------------------nam_lbc------------------------------------------------------- 
     
    7272condition influences the relative vorticity and momentum diffusive trends, and is  
    7373required in order to compute the vorticity at the coast. Four different types of  
    74 lateral boundary condition are available, controlled by the value of the \np{rn_shlat}  
     74lateral boundary condition are available, controlled by the value of the \np{rn\_shlat}  
    7575namelist parameter. (The value of the mask$_{f}$ array along the coastline is set  
    7676equal to this parameter.) These are: 
     
    8888\begin{description} 
    8989 
    90 \item[free-slip boundary condition (\forcode{rn_shlat = 0}): ]  the tangential velocity at the  
     90\item[free-slip boundary condition (\np{rn\_shlat}\forcode{ = 0}): ]  the tangential velocity at the  
    9191coastline is equal to the offshore velocity, $i.e.$ the normal derivative of the  
    9292tangential velocity is zero at the coast, so the vorticity: mask$_{f}$ array is set  
    9393to zero inside the land and just at the coast (Fig.~\ref{Fig_LBC_shlat}-a). 
    9494 
    95 \item[no-slip boundary condition (\forcode{rn_shlat = 2}): ] the tangential velocity vanishes  
     95\item[no-slip boundary condition (\np{rn\_shlat}\forcode{ = 2}): ] the tangential velocity vanishes  
    9696at the coastline. Assuming that the tangential velocity decreases linearly from  
    9797the closest ocean velocity grid point to the coastline, the normal derivative is  
     
    112112\end{equation} 
    113113 
    114 \item["partial" free-slip boundary condition (0$<$\np{rn_shlat}$<$2): ] the tangential  
     114\item["partial" free-slip boundary condition (0$<$\np{rn\_shlat}$<$2): ] the tangential  
    115115velocity at the coastline is smaller than the offshore velocity, $i.e.$ there is a lateral  
    116116friction but not strong enough to make the tangential velocity at the coast vanish  
     
    118118strictly inbetween $0$ and $2$. 
    119119 
    120 \item["strong" no-slip boundary condition (2$<$\np{rn_shlat}): ] the viscous boundary  
     120\item["strong" no-slip boundary condition (2$<$\np{rn\_shlat}): ] the viscous boundary  
    121121layer is assumed to be smaller than half the grid size (Fig.~\ref{Fig_LBC_shlat}-d).  
    122122The friction is thus larger than in the no-slip case. 
     
    133133% Boundary Condition around the Model Domain 
    134134% ================================================================ 
    135 \section{Model Domain Boundary Condition (\protect\np{jperio})} 
     135\section{Model domain boundary condition (\protect\np{jperio})} 
    136136\label{LBC_jperio} 
    137137 
     
    141141 
    142142% ------------------------------------------------------------------------------------------------------------- 
    143 %        Closed, cyclic, south symmetric (\np{jperio} = 0, 1 or 2)  
     143%        Closed, cyclic, south symmetric (\np{jperio}\forcode{ = 0..2})  
    144144% ------------------------------------------------------------------------------------------------------------- 
    145 \subsection{Closed, cyclic, south symmetric (\protect\np{jperio} = 0, 1 or 2)} 
     145\subsection{Closed, cyclic, south symmetric (\protect\np{jperio}\forcode{= 0..2})} 
    146146\label{LBC_jperio012} 
    147147 
     
    155155\begin{description} 
    156156 
    157 \item[For closed boundary (\textit{jperio=0})], solid walls are imposed at all model  
     157\item[For closed boundary (\np{jperio}\forcode{ = 0})], solid walls are imposed at all model  
    158158boundaries: first and last rows and columns are set to zero. 
    159159 
    160 \item[For cyclic east-west boundary (\textit{jperio=1})], first and last rows are set  
     160\item[For cyclic east-west boundary (\np{jperio}\forcode{ = 1})], first and last rows are set  
    161161to zero (closed) whilst the first column is set to the value of the last-but-one column  
    162162and the last column to the value of the second one (Fig.~\ref{Fig_LBC_jperio}-a).  
     
    165165cyclic cases. 
    166166 
    167 \item[For symmetric boundary condition across the equator (\textit{jperio=2})],  
     167\item[For symmetric boundary condition across the equator (\np{jperio}\forcode{ = 2})],  
    168168last rows, and first and last columns are set to zero (closed). The row of symmetry  
    169169is chosen to be the $u$- and $T-$points equator line ($j=2$, i.e. at the southern  
     
    188188%        North fold (\textit{jperio = 3 }to $6)$  
    189189% ------------------------------------------------------------------------------------------------------------- 
    190 \subsection{North-fold (\textit{jperio = 3 }to $6$) } 
     190\subsection{North-fold (\protect\np{jperio}\forcode{ = 3..6})} 
    191191\label{LBC_north_fold} 
    192192 
     
    209209% Exchange with neighbouring processors  
    210210% ==================================================================== 
    211 \section  [Exchange with neighbouring processors (\textit{lbclnk}, \textit{lib\_mpp})] 
    212       {Exchange with neighbouring processors (\protect\mdl{lbclnk}, \protect\mdl{lib\_mpp})} 
     211\section{Exchange with neighbouring processors (\protect\mdl{lbclnk}, \protect\mdl{lib\_mpp})} 
    213212\label{LBC_mpp} 
    214213 
     
    331330the model output files is undefined. Note that this is a problem for the meshmask file  
    332331which requires to be defined over the whole domain. Therefore, user should not eliminate  
    333 land processors when creating a meshmask file ($i.e.$ when setting a non-zero value to \np{nn_msh}). 
     332land processors when creating a meshmask file ($i.e.$ when setting a non-zero value to \np{nn\_msh}). 
    334333 
    335334%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    350349% Unstructured open boundaries BDY  
    351350% ==================================================================== 
    352 \section{Unstructured Open Boundary Conditions (BDY)} 
     351\section{Unstructured open boundary conditions (BDY)} 
    353352\label{LBC_bdy} 
    354353 
     
    384383 
    385384%---------------------------------------------- 
    386 \subsection{The namelists} 
     385\subsection{Namelists} 
    387386\label{BDY_namelist} 
    388387 
    389 The BDY module is activated by setting \np{ln_bdy} to true. 
     388The BDY module is activated by setting \np{ln\_bdy} to true. 
    390389It is possible to define more than one boundary ``set'' and apply 
    391390different boundary conditions to each set. The number of boundary 
    392 sets is defined by \np{nb_bdy}.  Each boundary set may be defined 
     391sets is defined by \np{nb\_bdy}.  Each boundary set may be defined 
    393392as a set of straight line segments in a namelist 
    394 (\np{ln_coords_file}=.false.) or read in from a file 
    395 (\np{ln_coords_file}=.true.). If the set is defined in a namelist, 
     393(\np{ln\_coords\_file}\forcode{ = .false.}) or read in from a file 
     394(\np{ln\_coords\_file}\forcode{ = .true.}). If the set is defined in a namelist, 
    396395then the namelists nambdy\_index must be included separately, one for 
    397396each set. If the set is defined by a file, then a 
     
    410409(``tra''). For each set of variables there is a choice of algorithm 
    411410and a choice for the data, eg. for the active tracers the algorithm is 
    412 set by \np{nn_tra} and the choice of data is set by 
    413 \np{nn_tra_dta}.  
     411set by \np{nn\_tra} and the choice of data is set by 
     412\np{nn\_tra\_dta}.  
    414413 
    415414The choice of algorithm is currently as follows: 
     
    429428 
    430429The main choice for the boundary data is 
    431 to use initial conditions as boundary data (\forcode{nn_tra_dta = 0}) or to 
    432 use external data from a file (\forcode{nn_tra_dta = 1}). For the 
     430to use initial conditions as boundary data (\np{nn\_tra\_dta}\forcode{ = 0}) or to 
     431use external data from a file (\np{nn\_tra\_dta}\forcode{ = 1}). For the 
    433432barotropic solution there is also the option to use tidal 
    434433harmonic forcing either by itself or in addition to other external 
     
    457456 
    458457%---------------------------------------------- 
    459 \subsection{The Flow Relaxation Scheme} 
     458\subsection{Flow relaxation scheme} 
    460459\label{BDY_FRS_scheme} 
    461460 
     
    492491\end{equation} 
    493492The width of the FRS zone is specified in the namelist as  
    494 \np{nn_rimwidth}. This is typically set to a value between 8 and 10.  
     493\np{nn\_rimwidth}. This is typically set to a value between 8 and 10.  
    495494 
    496495%---------------------------------------------- 
    497 \subsection{The Flather radiation scheme} 
     496\subsection{Flather radiation scheme} 
    498497\label{BDY_flather_scheme} 
    499498 
     
    561560shelf break, then the areas of ocean outside of this boundary will 
    562561need to be masked out. This can be done by reading a mask file defined 
    563 as \np{cn_mask_file} in the nam\_bdy namelist. Only one mask file is 
     562as \np{cn\_mask\_file} in the nam\_bdy namelist. Only one mask file is 
    564563used even if multiple boundary sets are defined. 
    565564 
     
    618617 
    619618There is an option to force the total volume in the regional model to be constant,  
    620 similar to the option in the OBC module. This is controlled  by the \np{nn_volctl}  
    621 parameter in the namelist. A value of \np{nn_volctl}~=~0 indicates that this option is not used.  
    622 If  \np{nn_volctl}~=~1 then a correction is applied to the normal velocities  
     619similar to the option in the OBC module. This is controlled  by the \np{nn\_volctl}  
     620parameter in the namelist. A value of \np{nn\_volctl}\forcode{ = 0} indicates that this option is not used.  
     621If  \np{nn\_volctl}\forcode{ = 1} then a correction is applied to the normal velocities  
    623622around the boundary at each timestep to ensure that the integrated volume flow  
    624 through the boundary is zero. If \np{nn_volctl}~=~2 then the calculation of  
     623through the boundary is zero. If \np{nn\_volctl}\forcode{ = 2} then the calculation of  
    625624the volume change on the timestep includes the change due to the freshwater  
    626625flux across the surface and the correction velocity corrects for this as well. 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_LDF.tex

    r9392 r9393  
    2525Note that this chapter describes the standard implementation of iso-neutral 
    2626tracer mixing, and Griffies's implementation, which is used if 
    27 \forcode{traldf_grif = .true.}, is described in Appdx\ref{sec:triad} 
     27\np{traldf\_grif}\forcode{ = .true.}, is described in Appdx\ref{sec:triad} 
    2828 
    2929%-----------------------------------nam_traldf - nam_dynldf-------------------------------------------- 
     
    3636% Direction of lateral Mixing 
    3737% ================================================================ 
    38 \section  [Direction of Lateral Mixing (\textit{ldfslp})] 
    39       {Direction of Lateral Mixing (\protect\mdl{ldfslp})} 
     38\section{Direction of lateral mixing (\protect\mdl{ldfslp})} 
    4039\label{LDF_slp} 
    4140 
     
    4645A direction for lateral mixing has to be defined when the desired operator does  
    4746not act along the model levels. This occurs when $(a)$ horizontal mixing is  
    48 required on tracer or momentum (\np{ln_traldf_hor} or \np{ln_dynldf_hor})  
     47required on tracer or momentum (\np{ln\_traldf\_hor} or \np{ln\_dynldf\_hor})  
    4948in $s$- or mixed $s$-$z$- coordinates, and $(b)$ isoneutral mixing is required  
    5049whatever the vertical coordinate is. This direction of mixing is defined by its  
     
    5756%gm% add here afigure of the slope in i-direction 
    5857 
    59 \subsection{slopes for tracer geopotential mixing in the $s$-coordinate} 
     58\subsection{Slopes for tracer geopotential mixing in the $s$-coordinate} 
    6059 
    6160In $s$-coordinates, geopotential mixing ($i.e.$ horizontal mixing) $r_1$ and  
     
    8887%gm%  caution I'm not sure the simplification was a good idea!  
    8988 
    90 These slopes are computed once in \rou{ldfslp\_init} when \forcode{ln_sco = .true.}rue,  
    91 and either \forcode{ln_traldf_hor = .true.}rue or \forcode{ln_dynldf_hor = .true.}rue.  
    92  
    93 \subsection{Slopes for tracer iso-neutral mixing}\label{LDF_slp_iso} 
     89These slopes are computed once in \rou{ldfslp\_init} when \np{ln\_sco}\forcode{ = .true.}rue,  
     90and either \np{ln\_traldf\_hor}\forcode{ = .true.}rue or \np{ln\_dynldf\_hor}\forcode{ = .true.}rue.  
     91 
     92\subsection{Slopes for tracer iso-neutral mixing} 
     93\label{LDF_slp_iso} 
    9494In iso-neutral mixing  $r_1$ and $r_2$ are the slopes between the iso-neutral  
    9595and computational surfaces. Their formulation does not depend on the vertical  
     
    147147\item[$s$- or hybrid $s$-$z$- coordinate : ] in the current release of \NEMO,  
    148148iso-neutral mixing is only employed for $s$-coordinates if the 
    149 Griffies scheme is used (\forcode{traldf_grif = .true.}; see Appdx \ref{sec:triad}).  
     149Griffies scheme is used (\np{traldf\_grif}\forcode{ = .true.}; see Appdx \ref{sec:triad}).  
    150150In other words, iso-neutral mixing will only be accurately represented with a  
    151 linear equation of state (\forcode{nn_eos = 1} or 2). In the case of a "true" equation  
     151linear equation of state (\np{nn\_eos}\forcode{ = 1..2}). In the case of a "true" equation  
    152152of state, the evaluation of $i$ and $j$ derivatives in \eqref{Eq_ldfslp_iso}  
    153153will include a pressure dependent part, leading to the wrong evaluation of  
     
    212212ocean model are modified \citep{Weaver_Eby_JPO97, 
    213213  Griffies_al_JPO98}. Griffies's scheme is now available in \NEMO if 
    214 \np{traldf_grif_iso} is set true; see Appdx \ref{sec:triad}. Here, 
     214\np{traldf\_grif\_iso} is set true; see Appdx \ref{sec:triad}. Here, 
    215215another strategy is presented \citep{Lazar_PhD97}: a local 
    216216filtering of the iso-neutral slopes (made on 9 grid-points) prevents 
     
    276276\colorbox{yellow}{add here a discussion about the flattening of the slopes, vs  tapering the coefficient.} 
    277277 
    278 \subsection{slopes for momentum iso-neutral mixing} 
     278\subsection{Slopes for momentum iso-neutral mixing} 
    279279 
    280280The iso-neutral diffusion operator on momentum is the same as the one used on  
     
    306306% Lateral Mixing Operator 
    307307% ================================================================ 
    308 \section [Lateral Mixing Operators (\textit{ldftra}, \textit{ldfdyn})]  
    309         {Lateral Mixing Operators (\protect\mdl{traldf}, \protect\mdl{traldf}) } 
     308\section{Lateral mixing operators (\protect\mdl{traldf}, \protect\mdl{traldf}) } 
    310309\label{LDF_op} 
    311310 
     
    315314% Lateral Mixing Coefficients 
    316315% ================================================================ 
    317 \section [Lateral Mixing Coefficient (\textit{ldftra}, \textit{ldfdyn})]  
    318         {Lateral Mixing Coefficient (\protect\mdl{ldftra}, \protect\mdl{ldfdyn}) } 
     316\section{Lateral mixing coefficient (\protect\mdl{ldftra}, \protect\mdl{ldfdyn}) } 
    319317\label{LDF_coef} 
    320318 
     
    344342as follows: 
    345343 
    346 \subsubsection{Constant Mixing Coefficients (default option)} 
     344\subsubsection{Constant mixing coefficients (default option)} 
    347345When none of the \textbf{key\_dynldf\_...} and \textbf{key\_traldf\_...} keys are  
    348346defined, a constant value is used over the whole ocean for momentum and  
    349 tracers, which is specified through the \np{rn_ahm0} and \np{rn_aht0} namelist  
     347tracers, which is specified through the \np{rn\_ahm0} and \np{rn\_aht0} namelist  
    350348parameters. 
    351349 
    352 \subsubsection{Vertically varying Mixing Coefficients (\protect\key{traldf\_c1d} and \key{dynldf\_c1d})}  
     350\subsubsection{Vertically varying mixing coefficients (\protect\key{traldf\_c1d} and \key{dynldf\_c1d})}  
    353351The 1D option is only available when using the $z$-coordinate with full step.  
    354352Indeed in all the other types of vertical coordinate, the depth is a 3D function  
     
    356354mixing coefficients will require 3D arrays. In the 1D option, a hyperbolic variation  
    357355of the lateral mixing coefficient is introduced in which the surface value is  
    358 \np{rn_aht0} (\np{rn_ahm0}), the bottom value is 1/4 of the surface value,  
     356\np{rn\_aht0} (\np{rn\_ahm0}), the bottom value is 1/4 of the surface value,  
    359357and the transition takes place around z=300~m with a width of 300~m  
    360358($i.e.$ both the depth and the width of the inflection point are set to 300~m).  
    361359This profile is hard coded in file \hf{traldf\_c1d}, but can be easily modified by users. 
    362360 
    363 \subsubsection{Horizontally Varying Mixing Coefficients (\protect\key{traldf\_c2d} and \protect\key{dynldf\_c2d})} 
     361\subsubsection{Horizontally varying mixing coefficients (\protect\key{traldf\_c2d} and \protect\key{dynldf\_c2d})} 
    364362By default the horizontal variation of the eddy coefficient depends on the local mesh  
    365363size and the type of operator used: 
     
    372370\end{equation} 
    373371where $e_{max}$ is the maximum of $e_1$ and $e_2$ taken over the whole masked  
    374 ocean domain, and $A_o^l$ is the \np{rn_ahm0} (momentum) or \np{rn_aht0} (tracer)  
     372ocean domain, and $A_o^l$ is the \np{rn\_ahm0} (momentum) or \np{rn\_aht0} (tracer)  
    375373namelist parameter. This variation is intended to reflect the lesser need for subgrid  
    376374scale eddy mixing where the grid size is smaller in the domain. It was introduced in  
     
    384382Other formulations can be introduced by the user for a given configuration.  
    385383For example, in the ORCA2 global ocean model (see Configurations), the laplacian  
    386 viscosity operator uses \np{rn_ahm0}~= 4.10$^4$ m$^2$/s poleward of 20$^{\circ}$  
    387 north and south and decreases linearly to \np{rn_aht0}~= 2.10$^3$ m$^2$/s  
     384viscosity operator uses \np{rn\_ahm0}~= 4.10$^4$ m$^2$/s poleward of 20$^{\circ}$  
     385north and south and decreases linearly to \np{rn\_aht0}~= 2.10$^3$ m$^2$/s  
    388386at the equator \citep{Madec_al_JPO96, Delecluse_Madec_Bk00}. This modification  
    389387can be found in routine \rou{ldf\_dyn\_c2d\_orca} defined in \mdl{ldfdyn\_c2d}.  
     
    391389sub-domain options of ORCA2 and ORCA05 (see \&namcfg namelist). 
    392390 
    393 \subsubsection{Space Varying Mixing Coefficients (\protect\key{traldf\_c3d} and \key{dynldf\_c3d})} 
     391\subsubsection{Space varying mixing coefficients (\protect\key{traldf\_c3d} and \key{dynldf\_c3d})} 
    394392 
    395393The 3D space variation of the mixing coefficient is simply the combination of the  
     
    397395a grid size dependence of the magnitude of the coefficient.  
    398396 
    399 \subsubsection{Space and Time Varying Mixing Coefficients} 
     397\subsubsection{Space and time varying mixing coefficients} 
    400398 
    401399There is no default specification of space and time varying mixing coefficient.  
     
    423421(3) for isopycnal diffusion on momentum or tracers, an additional purely  
    424422horizontal background diffusion with uniform coefficient can be added by  
    425 setting a non zero value of \np{rn_ahmb0} or \np{rn_ahtb0}, a background horizontal  
     423setting a non zero value of \np{rn\_ahmb0} or \np{rn\_ahtb0}, a background horizontal  
    426424eddy viscosity or diffusivity coefficient (namelist parameters whose default  
    427425values are $0$). However, the technique used to compute the isopycnal  
     
    438436(6) it is possible to use both the laplacian and biharmonic operators concurrently. 
    439437 
    440 (7) it is possible to run without explicit lateral diffusion on momentum (\np{ln_dynldf_lap} =  
    441 \np{ln_dynldf_bilap} = false). This is recommended when using the UBS advection  
    442 scheme on momentum (\np{ln_dynadv_ubs} = true, see \ref{DYN_adv_ubs})  
     438(7) it is possible to run without explicit lateral diffusion on momentum (\np{ln\_dynldf\_lap}\forcode{ =  
     439}\np{ln\_dynldf\_bilap}\forcode{ = .false.}). This is recommended when using the UBS advection  
     440scheme on momentum (\np{ln\_dynadv\_ubs}\forcode{ = .true.}, see \ref{DYN_adv_ubs})  
    443441and can be useful for testing purposes. 
    444442 
     
    446444% Eddy Induced Mixing 
    447445% ================================================================ 
    448 \section  [Eddy Induced Velocity (\textit{traadv\_eiv}, \textit{ldfeiv})] 
    449       {Eddy Induced Velocity (\protect\mdl{traadv\_eiv}, \protect\mdl{ldfeiv})} 
     446\section{Eddy induced velocity (\protect\mdl{traadv\_eiv}, \protect\mdl{ldfeiv})} 
    450447\label{LDF_eiv} 
    451448 
     
    455452described in \S\ref{LDF_coef}. If none of the keys \key{traldf\_cNd}, 
    456453N=1,2,3 is set (the default), spatially constant iso-neutral $A_l$ and 
    457 GM diffusivity $A_e$ are directly set by \np{rn_aeih_0} and 
    458 \np{rn_aeiv_0}. If 2D-varying coefficients are set with 
     454GM diffusivity $A_e$ are directly set by \np{rn\_aeih\_0} and 
     455\np{rn\_aeiv\_0}. If 2D-varying coefficients are set with 
    459456\key{traldf\_c2d} then $A_l$ is reduced in proportion with horizontal 
    460457scale factor according to \eqref{Eq_title} \footnote{Except in global ORCA 
     
    467464  case, $A_e$ at low latitudes $|\theta|<20^{\circ}$ is further 
    468465  reduced by a factor $|f/f_{20}|$, where $f_{20}$ is the value of $f$ 
    469   at $20^{\circ}$~N} (\mdl{ldfeiv}) and \np{rn_aeiv_0} is ignored 
     466  at $20^{\circ}$~N} (\mdl{ldfeiv}) and \np{rn\_aeiv\_0} is ignored 
    470467unless it is zero. 
    471468} 
     
    485482\end{equation} 
    486483where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set  
    487 through \np{rn_aeiv}, a \textit{nam\_traldf} namelist parameter.  
     484through \np{rn\_aeiv}, a \textit{nam\_traldf} namelist parameter.  
    488485The three components of the eddy induced velocity are computed and add  
    489486to the eulerian velocity in \mdl{traadv\_eiv}. This has been preferred to a  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_OBS.tex

    r9392 r9393  
    44% Chapter observation operator (OBS) 
    55% ================================================================ 
    6 \chapter{Observation and model comparison (OBS)} 
     6\chapter{Observation and Model Comparison (OBS)} 
    77\label{OBS} 
    88 
     
    2424The OBS code is called from \mdl{nemogcm} for model initialisation and to calculate the model 
    2525equivalent values for observations on the 0th timestep. The code is then called again after 
    26 each timestep from \mdl{step}. The code is only activated if the namelist logical \np{ln_diaobs} 
     26each timestep from \mdl{step}. The code is only activated if the namelist logical \np{ln\_diaobs} 
    2727is set to true. 
    2828 
     
    3434Some profile observation types (e.g. tropical moored buoys) are made available as daily averaged quantities. 
    3535The observation operator code can be set-up to calculate the equivalent daily average model temperature fields 
    36 using the \np{nn_profdavtypes} namelist array. Some SST observations are equivalent to a night-time 
     36using the \np{nn\_profdavtypes} namelist array. Some SST observations are equivalent to a night-time 
    3737average value and the observation operator code can calculate equivalent night-time average model SST fields by 
    38 setting the namelist value \np{ln_sstnight} to true. Otherwise the model value from the nearest timestep to the 
     38setting the namelist value \np{ln\_sstnight} to true. Otherwise the model value from the nearest timestep to the 
    3939observation time is used. 
    4040 
     
    8888 
    8989Options are defined through the  \ngn{namobs} namelist variables. 
    90 The options \np{ln_t3d} and \np{ln_s3d} switch on the temperature and salinity 
     90The options \np{ln\_t3d} and \np{ln\_s3d} switch on the temperature and salinity 
    9191profile observation operator code. The filename or array of filenames are 
    92 specified using the \np{cn_profbfiles} variable. The model grid points for a 
     92specified using the \np{cn\_profbfiles} variable. The model grid points for a 
    9393particular  observation latitude and longitude are found using the grid 
    9494searching part of the code. This can be expensive, particularly for large 
    95 numbers of observations, setting \np{ln_grid_search_lookup} allows the use of 
     95numbers of observations, setting \np{ln\_grid\_search\_lookup} allows the use of 
    9696a lookup table which is saved into an ``xypos`` file (or files). This will need 
    9797to be generated the first time if it does not exist in the run directory. 
    9898However, once produced it will significantly speed up future grid searches. 
    99 Setting \np{ln_grid_global} means that the code distributes the observations 
     99Setting \np{ln\_grid\_global} means that the code distributes the observations 
    100100evenly between processors. Alternatively each processor will work with 
    101101observations located within the model subdomain (see section~\ref{OBS_parallel}). 
     
    556556NEMO therefore has the capability to specify either an interpolation or an averaging (for surface observation types only).  
    557557 
    558 The main namelist option associated with the interpolation/averaging is \np{nn_2dint}. This default option can be set to values from 0 to 6.  
     558The main namelist option associated with the interpolation/averaging is \np{nn\_2dint}. This default option can be set to values from 0 to 6.  
    559559Values between 0 to 4 are associated with interpolation while values 5 or 6 are associated with averaging. 
    560560\begin{itemize} 
    561 \item \forcode{nn_2dint = 0}: Distance-weighted interpolation 
    562 \item \forcode{nn_2dint = 1}: Distance-weighted interpolation (small angle) 
    563 \item \forcode{nn_2dint = 2}: Bilinear interpolation (geographical grid) 
    564 \item \forcode{nn_2dint = 3}: Bilinear remapping interpolation (general grid) 
    565 \item \forcode{nn_2dint = 4}: Polynomial interpolation 
    566 \item \forcode{nn_2dint = 5}: Radial footprint averaging with diameter specified in the namelist as \np{rn\_???\_avglamscl} in degrees or metres (set using \np{ln\_???\_fp\_indegs}) 
    567 \item \forcode{nn_2dint = 6}: Rectangular footprint averaging with E/W and N/S size specified in the namelist as \np{rn\_???\_avglamscl} and \np{rn\_???\_avgphiscl} in degrees or metres (set using \np{ln\_???\_fp\_indegs}) 
     561\item \np{nn\_2dint}\forcode{ = 0}: Distance-weighted interpolation 
     562\item \np{nn\_2dint}\forcode{ = 1}: Distance-weighted interpolation (small angle) 
     563\item \np{nn\_2dint}\forcode{ = 2}: Bilinear interpolation (geographical grid) 
     564\item \np{nn\_2dint}\forcode{ = 3}: Bilinear remapping interpolation (general grid) 
     565\item \np{nn\_2dint}\forcode{ = 4}: Polynomial interpolation 
     566\item \np{nn\_2dint}\forcode{ = 5}: Radial footprint averaging with diameter specified in the namelist as \np{rn\_???\_avglamscl} in degrees or metres (set using \np{ln\_???\_fp\_indegs}) 
     567\item \np{nn\_2dint}\forcode{ = 6}: Rectangular footprint averaging with E/W and N/S size specified in the namelist as \np{rn\_???\_avglamscl} and \np{rn\_???\_avgphiscl} in degrees or metres (set using \np{ln\_???\_fp\_indegs}) 
    568568\end{itemize} 
    569569The ??? in the last two options indicate these options should be specified for each observation type for which the averaging is to be performed (see namelist example above). 
    570 The \np{nn_2dint} default option can be overridden for surface observation types using namelist values \np{nn\_2dint\_???} where ??? is one of sla,sst,sss,sic. 
     570The \np{nn\_2dint} default option can be overridden for surface observation types using namelist values \np{nn\_2dint\_???} where ??? is one of sla,sst,sss,sic. 
    571571 
    572572Below is some more detail on the various options for interpolation and averaging available in NEMO. 
     
    956956 
    957957The above namelist will result in feedback files whose first 12 hours contain 
    958 the first field of \ifile{foo} and the second 12 hours contain the second field. 
     958the first field of foo.nc and the second 12 hours contain the second field. 
    959959 
    960960%\begin{framed} 
     
    988988 
    989989%\begin{framed} 
    990 \textbf{Note: ln\_cl4} must be set to \emph{.TRUE.} in \textbf{namobs}  
     990\textbf{Note: ln\_cl4} must be set to \forcode{.true.} in \textbf{namobs}  
    991991to use class 4 outputs. 
    992992%\end{framed} 
     
    998998\noindent 
    999999\linebreak 
    1000 \ifile{\textbf{\$\{prefix\}\_\$\{yyyymmdd\}\_\$\{sys\}\_\$\{cfg\}\_\$\{vn\}\_\$\{kind\}\_\$\{nproc\}}} 
     1000\textbf{\$\{prefix\}\_\$\{yyyymmdd\}\_\$\{sys\}\_\$\{cfg\}\_\$\{vn\}\_\$\{kind\}\_\$\{nproc\}}.nc 
    10011001 
    10021002\noindent 
     
    11821182\newpage 
    11831183 
    1184 \section{Observation Utilities} 
     1184\section{Observation utilities} 
    11851185\label{OBS_obsutils} 
    11861186 
     
    13311331\end{cmds} 
    13321332 
    1333 \subsection{building the obstools} 
     1333\subsection{Building the obstools} 
    13341334 
    13351335To build the obstools use in the tools directory use ./maketools -n OBSTOOLS -m [ARCH]. 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_SBC.tex

    r9392 r9393  
    2828 
    2929Five different ways to provide the first six fields to the ocean are available which  
    30 are controlled by namelist \ngn{namsbc} variables: an analytical formulation (\np{ln_ana}~=~true),  
    31 a flux formulation (\np{ln_flx}~=~true), a bulk formulae formulation (CORE  
    32 (\np{ln_blk_core}~=~true), CLIO (\np{ln_blk_clio}~=~true) or MFS 
     30are controlled by namelist \ngn{namsbc} variables: an analytical formulation (\np{ln\_ana}\forcode{ = .true.}),  
     31a flux formulation (\np{ln\_flx}\forcode{ = .true.}), a bulk formulae formulation (CORE  
     32(\np{ln\_blk\_core}\forcode{ = .true.}), CLIO (\np{ln\_blk\_clio}\forcode{ = .true.}) or MFS 
    3333\footnote { Note that MFS bulk formulae compute fluxes only for the ocean component} 
    34 (\np{ln_blk_mfs}~=~true) bulk formulae) and a coupled or mixed forced/coupled formulation  
    35 (exchanges with a atmospheric model via the OASIS coupler) (\np{ln_cpl} or \np{ln_mixcpl}~=~true).  
    36 When used ($i.e.$ \np{ln_apr_dyn}~=~true), the atmospheric pressure forces both ocean and ice dynamics. 
    37  
    38 The frequency at which the forcing fields have to be updated is given by the \np{nn_fsbc} namelist parameter.  
     34(\np{ln\_blk\_mfs}\forcode{ = .true.}) bulk formulae) and a coupled or mixed forced/coupled formulation  
     35(exchanges with a atmospheric model via the OASIS coupler) (\np{ln\_cpl} or \np{ln\_mixcpl}\forcode{ = .true.}).  
     36When used ($i.e.$ \np{ln\_apr\_dyn}\forcode{ = .true.}), the atmospheric pressure forces both ocean and ice dynamics. 
     37 
     38The frequency at which the forcing fields have to be updated is given by the \np{nn\_fsbc} namelist parameter.  
    3939When the fields are supplied from data files (flux and bulk formulations), the input fields  
    4040need not be supplied on the model grid. Instead a file of coordinates and weights can  
     
    5050\item the rotation of vector components supplied relative to an east-north  
    5151coordinate system onto the local grid directions in the model ;  
    52 \item the addition of a surface restoring term to observed SST and/or SSS (\np{ln_ssr}~=~true) ;  
    53 \item the modification of fluxes below ice-covered areas (using observed ice-cover or a sea-ice model) (\np{nn_ice}~=~0,1, 2 or 3) ;  
    54 \item the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np{ln_rnf}~=~true) ;  
    55 \item the addition of isf melting as lateral inflow (parameterisation) or as fluxes applied at the land-ice ocean interface (\np{ln_isf}) ;  
    56 \item the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift (\np{nn_fwb}~=~0,~1~or~2) ;  
    57 \item the transformation of the solar radiation (if provided as daily mean) into a diurnal cycle (\np{ln_dm2dc}~=~true) ;  
    58 and a neutral drag coefficient can be read from an external wave model (\np{ln_cdgw}~=~true).  
     52\item the addition of a surface restoring term to observed SST and/or SSS (\np{ln\_ssr}\forcode{ = .true.}) ;  
     53\item the modification of fluxes below ice-covered areas (using observed ice-cover or a sea-ice model) (\np{nn\_ice}\forcode{ = 0..3}) ;  
     54\item the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np{ln\_rnf}\forcode{ = .true.}) ;  
     55\item the addition of isf melting as lateral inflow (parameterisation) or as fluxes applied at the land-ice ocean interface (\np{ln\_isf}) ;  
     56\item the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift (\np{nn\_fwb}\forcode{ = 0..2}) ;  
     57\item the transformation of the solar radiation (if provided as daily mean) into a diurnal cycle (\np{ln\_dm2dc}\forcode{ = .true.}) ;  
     58and a neutral drag coefficient can be read from an external wave model (\np{ln\_cdgw}\forcode{ = .true.}).  
    5959\end{itemize} 
    6060The latter option is possible only in case core or mfs bulk formulas are selected. 
     
    9191and \eqref{Eq_tra_sbc_lin} in \S\ref{TRA_sbc}).  
    9292The latter is the penetrative part of the heat flux. It is applied as a 3D  
    93 trends of the temperature equation (\mdl{traqsr} module) when \np{ln_traqsr}=\textit{true}. 
     93trends of the temperature equation (\mdl{traqsr} module) when \np{ln\_traqsr}\forcode{ = .true.}. 
    9494The way the light penetrates inside the water column is generally a sum of decreasing  
    9595exponentials (see \S\ref{TRA_qsr}).  
     
    110110%created!) 
    111111% 
    112 %Especially the \np{nn_fsbc}, the \mdl{sbc\_oce} module (fluxes + mean sst sss ssu  
     112%Especially the \np{nn\_fsbc}, the \mdl{sbc\_oce} module (fluxes + mean sst sss ssu  
    113113%ssv) i.e. information required by flux computation or sea-ice 
    114114% 
     
    130130The ocean model provides, at each time step, to the surface module (\mdl{sbcmod})  
    131131the surface currents, temperature and salinity.   
    132 These variables are averaged over \np{nn_fsbc} time-step (\ref{Tab_ssm}),  
     132These variables are averaged over \np{nn\_fsbc} time-step (\ref{Tab_ssm}),  
    133133and it is these averaged fields which are used to computes the surface fluxes  
    134 at a frequency of \np{nn_fsbc} time-step. 
     134at a frequency of \np{nn\_fsbc} time-step. 
    135135 
    136136 
     
    157157%       Input Data  
    158158% ================================================================ 
    159 \section{Input Data generic interface} 
     159\section{Input data generic interface} 
    160160\label{SBC_input} 
    161161 
     
    185185 
    186186Note that when an input data is archived on a disc which is accessible directly  
    187 from the workspace where the code is executed, then the use can set the \np{cn_dir}  
     187from the workspace where the code is executed, then the use can set the \np{cn\_dir}  
    188188to the pathway leading to the data. By default, the data are assumed to have been  
    189189copied so that cn\_dir='./'. 
     
    192192% Input Data specification (\mdl{fldread}) 
    193193% ------------------------------------------------------------------------------------------------------------- 
    194 \subsection{Input Data specification (\protect\mdl{fldread})} 
     194\subsection{Input data specification (\protect\mdl{fldread})} 
    195195\label{SBC_fldread} 
    196196 
     
    214214\hline 
    215215                         & daily or weekLLL          & monthly                   &   yearly          \\   \hline 
    216 clim = false   & \ifile{fn\_yYYYYmMMdDD}  &   \ifile{fn\_yYYYYmMM}   &   \ifile{fn\_yYYYY}  \\   \hline 
    217 clim = true       & not possible                  &  \ifile{fn\_m??}             &   fn                \\   \hline 
     216\np{clim}\forcode{ = .false.} & fn\_yYYYYmMMdDD.nc  &   fn\_yYYYYmMM.nc   &   fn\_yYYYY.nc  \\   \hline 
     217\np{clim}\forcode{ = .true.}        & not possible                  &  fn\_m??.nc             &   fn                \\   \hline 
    218218\end{tabular} 
    219219\end{center} 
     
    271271a time interpolation will be performed at the following time: 0h30'00", 1h30'00", 2h30'00", etc. 
    272272However, for forcing data related to the surface module, values are not needed at every  
    273 time-step but at every \np{nn_fsbc} time-step. For example with \np{nn_fsbc}~=~3,  
     273time-step but at every \np{nn\_fsbc} time-step. For example with \np{nn\_fsbc}\forcode{ = 3},  
    274274the surface module will be called at time-steps 1, 4, 7, etc. The date used for the time interpolation  
    275 is thus redefined to be at the middle of \np{nn_fsbc} time-step period. In the previous example,  
     275is thus redefined to be at the middle of \np{nn\_fsbc} time-step period. In the previous example,  
    276276this leads to: 1h30'00", 4h30'00", 7h30'00", etc. \\  
    277277(2) For code readablility and maintenance issues, we don't take into account the NetCDF input file  
     
    300300% Interpolation on the Fly 
    301301% ------------------------------------------------------------------------------------------------------------- 
    302 \subsection [Interpolation on-the-Fly] {Interpolation on-the-Fly} 
     302\subsection{Interpolation on-the-fly} 
    303303\label{SBC_iof} 
    304304 
     
    324324Note that nn\_lsm=0 forces the code to not apply the procedure even if a file for land/sea mask is supplied. 
    325325 
    326 \subsubsection{Bilinear Interpolation} 
     326\subsubsection{Bilinear interpolation} 
    327327\label{SBC_iof_bilinear} 
    328328 
     
    346346and wgt(1) corresponds to variable "wgt01" for example. 
    347347 
    348 \subsubsection{Bicubic Interpolation} 
     348\subsubsection{Bicubic interpolation} 
    349349\label{SBC_iof_bicubic} 
    350350 
     
    421421% Standalone Surface Boundary Condition Scheme 
    422422% ------------------------------------------------------------------------------------------------------------- 
    423 \subsection [Standalone Surface Boundary Condition Scheme] {Standalone Surface Boundary Condition Scheme} 
     423\subsection{Standalone surface boundary condition scheme} 
    424424\label{SAS_iof} 
    425425 
     
    438438\item  Development of sea-ice algorithms or parameterizations. 
    439439\item  spinup of the iceberg floats 
    440 \item  ocean/sea-ice simulation with both media running in parallel (\np{ln_mixcpl}~=~\textit{true}) 
     440\item  ocean/sea-ice simulation with both media running in parallel (\np{ln\_mixcpl}\forcode{ = .true.}) 
    441441\end{itemize} 
    442442 
     
    481481% Analytical formulation (sbcana module)  
    482482% ================================================================ 
    483 \section  [Analytical formulation (\textit{sbcana}) ] 
    484       {Analytical formulation (\protect\mdl{sbcana} module) } 
     483\section{Analytical formulation (\protect\mdl{sbcana})} 
    485484\label{SBC_ana} 
    486485 
     
    492491In this case, all the six fluxes needed by the ocean are assumed to  
    493492be uniform in space. They take constant values given in the namelist  
    494 \ngn{namsbc{\_}ana} by the variables \np{rn_utau0}, \np{rn_vtau0}, \np{rn_qns0},  
    495 \np{rn_qsr0}, and \np{rn_emp0} ($\textit{emp}=\textit{emp}_S$). The runoff is set to zero.  
     493\ngn{namsbc{\_}ana} by the variables \np{rn\_utau0}, \np{rn\_vtau0}, \np{rn\_qns0},  
     494\np{rn\_qsr0}, and \np{rn\_emp0} ($\textit{emp}=\textit{emp}_S$). The runoff is set to zero.  
    496495In addition, the wind is allowed to reach its nominal value within a given number  
    497 of time steps (\np{nn_tau000}). 
     496of time steps (\np{nn\_tau000}). 
    498497 
    499498If a user wants to apply a different analytical forcing, the \mdl{sbcana}  
     
    506505% Flux formulation  
    507506% ================================================================ 
    508 \section  [Flux formulation (\textit{sbcflx}) ] 
    509       {Flux formulation (\protect\mdl{sbcflx} module) } 
     507\section{Flux formulation (\protect\mdl{sbcflx})} 
    510508\label{SBC_flx} 
    511509%------------------------------------------namsbc_flx---------------------------------------------------- 
     
    513511%------------------------------------------------------------------------------------------------------------- 
    514512 
    515 In the flux formulation (\forcode{ln_flx = .true.}), the surface boundary  
     513In the flux formulation (\np{ln\_flx}\forcode{ = .true.}), the surface boundary  
    516514condition fields are directly read from input files. The user has to define  
    517515in the namelist \ngn{namsbc{\_}flx} the name of the file, the name of the variable  
     
    528526% Bulk formulation 
    529527% ================================================================ 
    530 \section  [Bulk formulation (\textit{sbcblk\_core}, \textit{sbcblk\_clio} or \textit{sbcblk\_mfs}) ] 
    531       {Bulk formulation \small{(\protect\mdl{sbcblk\_core} \protect\mdl{sbcblk\_clio} \protect\mdl{sbcblk\_mfs} modules)} } 
     528\section[Bulk formulation {(\textit{sbcblk\{\_core,\_clio,\_mfs\}.F90})}] 
     529         {Bulk formulation {(\protect\mdl{sbcblk\_core}, \protect\mdl{sbcblk\_clio}, \protect\mdl{sbcblk\_mfs})}} 
    532530\label{SBC_blk} 
    533531 
     
    537535The atmospheric fields used depend on the bulk formulae used. Three bulk formulations  
    538536are available : the CORE, the CLIO and the MFS bulk formulea. The choice is made by setting to true 
    539 one of the following namelist variable : \np{ln_core} ; \np{ln_clio} or  \np{ln_mfs}. 
     537one of the following namelist variable : \np{ln\_core} ; \np{ln\_clio} or  \np{ln\_mfs}. 
    540538 
    541539Note : in forced mode, when a sea-ice model is used, a bulk formulation (CLIO or CORE) have to be used.  
     
    546544%        CORE Bulk formulea 
    547545% ------------------------------------------------------------------------------------------------------------- 
    548 \subsection    [CORE Bulk formulea (\protect\forcode{ln_core = .true.})] 
    549             {CORE Bulk formulea (\protect\forcode{ln_core = .true.}, \protect\mdl{sbcblk\_core})} 
     546\subsection{CORE formulea (\protect\mdl{sbcblk\_core}, \protect\np{ln\_core}\forcode{ = .true.})} 
    550547\label{SBC_blk_core} 
    551548%------------------------------------------namsbc_core---------------------------------------------------- 
     
    592589or larger than the one of the input atmospheric fields. 
    593590 
    594 The \np{sn_wndi}, \np{sn_wndj}, \np{sn_qsr}, \np{sn_qlw}, \np{sn_tair}, \np{sn_humi}, 
    595 \np{sn_prec}, \np{sn_snow}, \np{sn_tdif} parameters describe the fields  
     591The \np{sn\_wndi}, \np{sn\_wndj}, \np{sn\_qsr}, \np{sn\_qlw}, \np{sn\_tair}, \np{sn\_humi}, 
     592\np{sn\_prec}, \np{sn\_snow}, \np{sn\_tdif} parameters describe the fields  
    596593and the way they have to be used (spatial and temporal interpolations).  
    597594 
    598 \np{cn_dir} is the directory of location of bulk files 
    599 \np{ln_taudif} is the flag to specify if we use Hight Frequency (HF) tau information (.true.) or not (.false.) 
    600 \np{rn_zqt}: is the height of humidity and temperature measurements (m) 
    601 \np{rn_zu}: is the height of wind measurements (m) 
     595\np{cn\_dir} is the directory of location of bulk files 
     596\np{ln\_taudif} is the flag to specify if we use Hight Frequency (HF) tau information (.true.) or not (.false.) 
     597\np{rn\_zqt}: is the height of humidity and temperature measurements (m) 
     598\np{rn\_zu}: is the height of wind measurements (m) 
    602599 
    603600Three multiplicative factors are availables :  
    604 \np{rn_pfac} and \np{rn_efac} allows to adjust (if necessary) the global freshwater budget  
     601\np{rn\_pfac} and \np{rn\_efac} allows to adjust (if necessary) the global freshwater budget  
    605602by increasing/reducing the precipitations (total and snow) and or evaporation, respectively. 
    606 The third one,\np{rn_vfac}, control to which extend the ice/ocean velocities are taken into account  
     603The third one,\np{rn\_vfac}, control to which extend the ice/ocean velocities are taken into account  
    607604in the calculation of surface wind stress. Its range should be between zero and one,  
    608605and it is recommended to set it to 0. 
     
    611608%        CLIO Bulk formulea 
    612609% ------------------------------------------------------------------------------------------------------------- 
    613 \subsection    [CLIO Bulk formulea (\protect\forcode{ln_clio = .true.})] 
    614             {CLIO Bulk formulea (\protect\forcode{ln_clio = .true.}, \protect\mdl{sbcblk\_clio})} 
     610\subsection{CLIO formulea (\protect\mdl{sbcblk\_clio}, \protect\np{ln\_clio}\forcode{ = .true.})} 
    615611\label{SBC_blk_clio} 
    616612%------------------------------------------namsbc_clio---------------------------------------------------- 
     
    652648%        MFS Bulk formulae 
    653649% ------------------------------------------------------------------------------------------------------------- 
    654 \subsection    [MFS Bulk formulea (\protect\forcode{ln_mfs = .true.})] 
    655             {MFS Bulk formulea (\protect\forcode{ln_mfs = .true.}, \protect\mdl{sbcblk\_mfs})} 
     650\subsection{MFS formulea (\protect\mdl{sbcblk\_mfs}, \protect\np{ln\_mfs}\forcode{ = .true.})} 
    656651\label{SBC_blk_mfs} 
    657652%------------------------------------------namsbc_mfs---------------------------------------------------- 
     
    679674The required 7 input fields must be provided on the model Grid-T and  are: 
    680675\begin{itemize} 
    681 \item          Zonal Component of the 10m wind ($ms^{-1}$)  (\np{sn_windi}) 
    682 \item          Meridional Component of the 10m wind ($ms^{-1}$)  (\np{sn_windj}) 
    683 \item          Total Claud Cover (\%)  (\np{sn_clc}) 
    684 \item          2m Air Temperature ($K$) (\np{sn_tair}) 
    685 \item          2m Dew Point Temperature ($K$)  (\np{sn_rhm}) 
    686 \item          Total Precipitation ${Kg} m^{-2} s^{-1}$ (\np{sn_prec}) 
    687 \item          Mean Sea Level Pressure (${Pa}$) (\np{sn_msl}) 
     676\item          Zonal Component of the 10m wind ($ms^{-1}$)  (\np{sn\_windi}) 
     677\item          Meridional Component of the 10m wind ($ms^{-1}$)  (\np{sn\_windj}) 
     678\item          Total Claud Cover (\%)  (\np{sn\_clc}) 
     679\item          2m Air Temperature ($K$) (\np{sn\_tair}) 
     680\item          2m Dew Point Temperature ($K$)  (\np{sn\_rhm}) 
     681\item          Total Precipitation ${Kg} m^{-2} s^{-1}$ (\np{sn\_prec}) 
     682\item          Mean Sea Level Pressure (${Pa}$) (\np{sn\_msl}) 
    688683\end{itemize} 
    689684% ------------------------------------------------------------------------------------------------------------- 
     
    691686% Coupled formulation 
    692687% ================================================================ 
    693 \section  [Coupled formulation (\textit{sbccpl}) ] 
    694       {Coupled formulation (\protect\mdl{sbccpl} module)} 
     688\section{Coupled formulation (\protect\mdl{sbccpl})} 
    695689\label{SBC_cpl} 
    696690%------------------------------------------namsbc_cpl---------------------------------------------------- 
     
    709703as well as to \href{http://wrf-model.org/}{WRF} (Weather Research and Forecasting Model). 
    710704 
    711 Note that in addition to the setting of \np{ln_cpl} to true, the \key{coupled} have to be defined.  
     705Note that in addition to the setting of \np{ln\_cpl} to true, the \key{coupled} have to be defined.  
    712706The CPP key is mainly used in sea-ice to ensure that the atmospheric fluxes are  
    713707actually recieved by the ice-ocean system (no calculation of ice sublimation in coupled mode). 
     
    730724%        Atmospheric pressure 
    731725% ================================================================ 
    732 \section   [Atmospheric pressure (\textit{sbcapr})] 
    733          {Atmospheric pressure (\protect\mdl{sbcapr})} 
     726\section{Atmospheric pressure (\protect\mdl{sbcapr})} 
    734727\label{SBC_apr} 
    735728%------------------------------------------namsbc_apr---------------------------------------------------- 
     
    738731 
    739732The optional atmospheric pressure can be used to force ocean and ice dynamics  
    740 (\np{ln_apr_dyn}~=~true, \textit{\ngn{namsbc}} namelist ). 
    741 The input atmospheric forcing defined via \np{sn_apr} structure (\textit{namsbc\_apr} namelist)  
     733(\np{ln\_apr\_dyn}\forcode{ = .true.}, \textit{\ngn{namsbc}} namelist ). 
     734The input atmospheric forcing defined via \np{sn\_apr} structure (\textit{namsbc\_apr} namelist)  
    742735can be interpolated in time to the model time step, and even in space when the  
    743736interpolation on-the-fly is used. When used to force the dynamics, the atmospheric  
     
    748741\end{equation} 
    749742where $P_{atm}$ is the atmospheric pressure and $P_o$ a reference atmospheric pressure. 
    750 A value of $101,000~N/m^2$ is used unless \np{ln_ref_apr} is set to true. In this case $P_o$  
     743A value of $101,000~N/m^2$ is used unless \np{ln\_ref\_apr} is set to true. In this case $P_o$  
    751744is set to the value of $P_{atm}$ averaged over the ocean domain, $i.e.$ the mean value of  
    752745$\eta_{ib}$ is kept to zero at all time step. 
     
    760753When using time-splitting and BDY package for open boundaries conditions, the equivalent  
    761754inverse barometer sea surface height $\eta_{ib}$ can be added to BDY ssh data:  
    762 \np{ln_apr_obc}  might be set to true. 
     755\np{ln\_apr\_obc}  might be set to true. 
    763756 
    764757% ================================================================ 
    765758%        Tidal Potential 
    766759% ================================================================ 
    767 \section   [Tidal Potential (\textit{sbctide})] 
    768                         {Tidal Potential (\protect\mdl{sbctide})} 
     760\section{Tidal potential (\protect\mdl{sbctide})} 
    769761\label{SBC_tide} 
    770762 
     
    774766 
    775767A module is available to compute the tidal potential and use it in the momentum equation. 
    776 This option is activated when \np{ln_tide} is set to true in \ngn{nam\_tide}. 
     768This option is activated when \np{ln\_tide} is set to true in \ngn{nam\_tide}. 
    777769 
    778770Some parameters are available in namelist \ngn{nam\_tide}: 
    779771 
    780 - \np{ln_tide_load} activate the load potential forcing and \np{filetide_load} is  the associated file  
    781  
    782 - \np{ln_tide_pot} activate the tidal potential forcing 
    783  
    784 - \np{nb_harmo} is the number of constituent used 
     772- \np{ln\_tide\_load} activate the load potential forcing and \np{filetide\_load} is  the associated file  
     773 
     774- \np{ln\_tide\_pot} activate the tidal potential forcing 
     775 
     776- \np{nb\_harmo} is the number of constituent used 
    785777 
    786778- \np{clname} is the name of constituent 
     
    821813%        River runoffs 
    822814% ================================================================ 
    823 \section   [River runoffs (\textit{sbcrnf})] 
    824          {River runoffs (\protect\mdl{sbcrnf})} 
     815\section{River runoffs (\protect\mdl{sbcrnf})} 
    825816\label{SBC_rnf} 
    826817%------------------------------------------namsbc_rnf---------------------------------------------------- 
     
    863854depth (in metres) which the river should be added to. 
    864855 
    865 Namelist variables in \ngn{namsbc\_rnf}, \np{ln_rnf_depth}, \np{ln_rnf_sal} and \np{ln_rnf_temp} control whether  
     856Namelist variables in \ngn{namsbc\_rnf}, \np{ln\_rnf\_depth}, \np{ln\_rnf\_sal} and \np{ln\_rnf\_temp} control whether  
    866857the river attributes (depth, salinity and temperature) are read in and used.  If these are set  
    867858as false the river is added to the surface box only, assumed to be fresh (0~psu), and/or  
     
    876867to give the heat and salt content of the river runoff. 
    877868After the user specified depth is read ini, the number of grid boxes this corresponds to is  
    878 calculated and stored in the variable \np{nz_rnf}. 
     869calculated and stored in the variable \np{nz\_rnf}. 
    879870The variable \textit{h\_dep} is then calculated to be the depth (in metres) of the bottom of the  
    880871lowest box the river water is being added to (i.e. the total depth that river water is being added to in the model). 
     
    937928%        Ice shelf melting 
    938929% ================================================================ 
    939 \section   [Ice shelf melting (\textit{sbcisf})] 
    940                         {Ice shelf melting (\protect\mdl{sbcisf})} 
     930\section{Ice shelf melting (\protect\mdl{sbcisf})} 
    941931\label{SBC_isf} 
    942932%------------------------------------------namsbc_isf---------------------------------------------------- 
    943933\forfile{../namelists/namsbc_isf} 
    944934%-------------------------------------------------------------------------------------------------------- 
    945 Namelist variable in \ngn{namsbc}, \np{nn_isf}, controls the ice shelf representation used.  
     935Namelist variable in \ngn{namsbc}, \np{nn\_isf}, controls the ice shelf representation used.  
    946936\begin{description} 
    947 \item[\np{nn_isf}~=~1] 
    948 The ice shelf cavity is represented (\np{ln_isfcav}~=~true needed). The fwf and heat flux are computed.  
     937\item[\np{nn\_isf}\forcode{ = 1}] 
     938The ice shelf cavity is represented (\np{ln\_isfcav}\forcode{ = .true.} needed). The fwf and heat flux are computed.  
    949939Two different bulk formula are available: 
    950940   \begin{description} 
    951    \item[\np{nn_isfblk}~=~1] 
     941   \item[\np{nn\_isfblk}\forcode{ = 1}] 
    952942   The bulk formula used to compute the melt is based the one described in \citet{Hunter2006}. 
    953943        This formulation is based on a balance between the upward ocean heat flux and the latent heat flux at the ice shelf base. 
    954944 
    955    \item[\np{nn_isfblk}~=~2]  
     945   \item[\np{nn\_isfblk}\forcode{ = 2}]  
    956946   The bulk formula used to compute the melt is based the one described in \citet{Jenkins1991}. 
    957947        This formulation is based on a 3 equations formulation (a heat flux budget, a salt flux budget 
     
    961951For this 2 bulk formulations, there are 3 different ways to compute the exchange coeficient: 
    962952   \begin{description} 
    963         \item[\np{nn\_gammablk~=~0~}] 
    964    The salt and heat exchange coefficients are constant and defined by \np{rn_gammas0} and \np{rn_gammat0} 
    965  
    966    \item[\np{nn\_gammablk~=~1~}] 
    967    The salt and heat exchange coefficients are velocity dependent and defined as $rn\_gammas0 \times u_{*}$ and $rn\_gammat0 \times u_{*}$ 
    968         where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_hisf_tbl} meters). 
     953        \item[\np{nn\_gammablk}\forcode{ = 0}] 
     954   The salt and heat exchange coefficients are constant and defined by \np{rn\_gammas0} and \np{rn\_gammat0} 
     955 
     956   \item[\np{nn\_gammablk}\forcode{ = 1}] 
     957   The salt and heat exchange coefficients are velocity dependent and defined as \np{rn\_gammas0}$ \times u_{*}$ and \np{rn\_gammat0}$ \times u_{*}$ 
     958        where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters). 
    969959        See \citet{Jenkins2010} for all the details on this formulation. 
    970960    
    971    \item[\np{nn\_gammablk~=~2~}] 
     961   \item[\np{nn\_gammablk}\forcode{ = 2}] 
    972962   The salt and heat exchange coefficients are velocity and stability dependent and defined as  
    973963        $\gamma_{T,S} = \frac{u_{*}}{\Gamma_{Turb} + \Gamma^{T,S}_{Mole}}$ 
    974         where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_hisf_tbl} meters),  
     964        where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters),  
    975965        $\Gamma_{Turb}$ the contribution of the ocean stability and  
    976966        $\Gamma^{T,S}_{Mole}$ the contribution of the molecular diffusion. 
     
    978968        \end{description} 
    979969 
    980 \item[\np{nn_isf}~=~2] 
     970\item[\np{nn\_isf}\forcode{ = 2}] 
    981971A parameterisation of isf is used. The ice shelf cavity is not represented.  
    982972The fwf is distributed along the ice shelf edge between the depth of the average grounding line (GL) 
    983 (\np{sn_depmax_isf}) and the base of the ice shelf along the calving front (\np{sn_depmin_isf}) as in (\np{nn_isf}~=~3).  
     973(\np{sn\_depmax\_isf}) and the base of the ice shelf along the calving front (\np{sn\_depmin\_isf}) as in (\np{nn\_isf}\forcode{ = 3}).  
    984974Furthermore the fwf and heat flux are computed using the \citet{Beckmann2003} parameterisation of isf melting.  
    985 The effective melting length (\np{sn_Leff_isf}) is read from a file. 
    986  
    987 \item[\np{nn_isf}~=~3] 
     975The effective melting length (\np{sn\_Leff\_isf}) is read from a file. 
     976 
     977\item[\np{nn\_isf}\forcode{ = 3}] 
    988978A simple parameterisation of isf is used. The ice shelf cavity is not represented.  
    989 The fwf (\np{sn_rnfisf}) is prescribed and distributed along the ice shelf edge between the depth of the average grounding line (GL) 
    990 (\np{sn_depmax_isf}) and the base of the ice shelf along the calving front (\np{sn_depmin_isf}).  
     979The fwf (\np{sn\_rnfisf}) is prescribed and distributed along the ice shelf edge between the depth of the average grounding line (GL) 
     980(\np{sn\_depmax\_isf}) and the base of the ice shelf along the calving front (\np{sn\_depmin\_isf}).  
    991981The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$. 
    992982 
    993 \item[\np{nn_isf}~=~4] 
    994 The ice shelf cavity is opened (\np{ln_isfcav}~=~true needed). However, the fwf is not computed but specified from file \np{sn_fwfisf}).  
     983\item[\np{nn\_isf}\forcode{ = 4}] 
     984The ice shelf cavity is opened (\np{ln\_isfcav}\forcode{ = .true.} needed). However, the fwf is not computed but specified from file \np{sn\_fwfisf}).  
    995985The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$.\\ 
    996986\end{description} 
    997987 
    998988 
    999 $\bullet$ \np{nn_isf}~=~1 and \np{nn_isf}~=~2 compute a melt rate based on the water mass properties, ocean velocities and depth. 
     989$\bullet$ \np{nn\_isf}\forcode{ = 1} and \np{nn\_isf}\forcode{ = 2} compute a melt rate based on the water mass properties, ocean velocities and depth. 
    1000990 This flux is thus highly dependent of the model resolution (horizontal and vertical), realism of the water masses onto the shelf ...\\ 
    1001991 
    1002992 
    1003 $\bullet$ \np{nn_isf}~=~3 and \np{nn_isf}~=~4 read the melt rate from a file. You have total control of the fwf forcing. 
     993$\bullet$ \np{nn\_isf}\forcode{ = 3} and \np{nn\_isf}\forcode{ = 4} read the melt rate from a file. You have total control of the fwf forcing. 
    1004994This can be usefull if the water masses on the shelf are not realistic or the resolution (horizontal/vertical) are too  
    1005995coarse to have realistic melting or for studies where you need to control your heat and fw input.\\  
    1006996 
    1007997A namelist parameters control over how many meters the heat and fw fluxes are spread.  
    1008 \np{rn_hisf_tbl}] is the top boundary layer thickness as defined in \citet{Losch2008}.  
    1009 This parameter is only used if \np{nn_isf}~=~1 or \np{nn_isf}~=~4 
    1010  
    1011 If \np{rn_hisf_tbl} = 0., the fluxes are put in the top level whatever is its tickness.  
    1012  
    1013 If \np{rn_hisf_tbl} $>$ 0., the fluxes are spread over the first \np{rn_hisf_tbl} m (ie over one or several cells).\\ 
     998\np{rn\_hisf\_tbl}] is the top boundary layer thickness as defined in \citet{Losch2008}.  
     999This parameter is only used if \np{nn\_isf}\forcode{ = 1} or \np{nn\_isf}\forcode{ = 4} 
     1000 
     1001If \np{rn\_hisf\_tbl}\forcode{ = 0}., the fluxes are put in the top level whatever is its tickness.  
     1002 
     1003If \np{rn\_hisf\_tbl} $>$ 0., the fluxes are spread over the first \np{rn\_hisf\_tbl} m (ie over one or several cells).\\ 
    10141004 
    10151005The ice shelf melt is implemented as a volume flux with in the same way as for the runoff. 
     
    10191009 
    10201010 
    1021 \section{ Ice sheet coupling} 
     1011\section{Ice sheet coupling} 
    10221012\label{SBC_iscpl} 
    10231013%------------------------------------------namsbc_iscpl---------------------------------------------------- 
     
    10261016Ice sheet/ocean coupling is done through file exchange at the restart step. NEMO, at each restart step,  
    10271017read the bathymetry and ice shelf draft variable in a netcdf file.  
    1028 If \np{ln\_iscpl = ~true}, the isf draft is assume to be different at each restart step  
     1018If \np{ln\_iscpl}\forcode{ = .true.}, the isf draft is assume to be different at each restart step  
    10291019with potentially some new wet/dry cells due to the ice sheet dynamics/thermodynamics. 
    10301020The wetting and drying scheme applied on the restart is very simple and described below for the 6 different cases: 
     
    10431033   set mask to 1, T/S is extrapolated from neighbours, ssh is extrapolated from neighbours and U/V set to 0. If no neighbour, T/S/U/V and mask set to 0. 
    10441034\end{description} 
    1045 The extrapolation is call \np{nn_drown} times. It means that if the grounding line retreat by more than \np{nn_drown} cells between 2 coupling steps, 
     1035The extrapolation is call \np{nn\_drown} times. It means that if the grounding line retreat by more than \np{nn\_drown} cells between 2 coupling steps, 
    10461036 the code will be unable to fill all the new wet cells properly. The default number is set up for the MISOMIP idealised experiments.\\ 
    10471037This coupling procedure is able to take into account grounding line and calving front migration. However, it is a non-conservative processe.  
    10481038This could lead to a trend in heat/salt content and volume. In order to remove the trend and keep the conservation level as close to 0 as possible, 
    1049  a simple conservation scheme is available with \np{ln\_hsb = ~true}. The heat/salt/vol. gain/loss is diagnose, as well as the location.  
     1039 a simple conservation scheme is available with \np{ln\_hsb}\forcode{ = .true.}. The heat/salt/vol. gain/loss is diagnose, as well as the location.  
    10501040Based on what is done on sbcrnf to prescribed a source of heat/salt/vol., the heat/salt/vol. gain/loss is removed/added, 
    1051  over a period of \np{rn_fiscpl} time step, into the system.  
    1052 So after \np{rn_fiscpl} time step, all the heat/salt/vol. gain/loss due to extrapolation process is canceled.\\ 
     1041 over a period of \np{rn\_fiscpl} time step, into the system.  
     1042So after \np{rn\_fiscpl} time step, all the heat/salt/vol. gain/loss due to extrapolation process is canceled.\\ 
    10531043 
    10541044As the before and now fields are not compatible (modification of the geometry), the restart time step is prescribed to be an euler time step instead of a leap frog and $fields_b = fields_n$. 
     
    10681058Icebergs are initially spawned into one of ten classes which have specific mass and thickness as described  
    10691059in the \ngn{namberg} namelist:  
    1070 \np{rn_initial_mass} and \np{rn_initial_thickness}. 
    1071 Each class has an associated scaling (\np{rn_mass_scaling}), which is an integer representing how many icebergs  
     1060\np{rn\_initial\_mass} and \np{rn\_initial\_thickness}. 
     1061Each class has an associated scaling (\np{rn\_mass\_scaling}), which is an integer representing how many icebergs  
    10721062of this class are being described as one lagrangian point (this reduces the numerical problem of tracking every single iceberg). 
    1073 They are enabled by setting \np{ln_icebergs}~=~true. 
     1063They are enabled by setting \np{ln\_icebergs}\forcode{ = .true.}. 
    10741064 
    10751065Two initialisation schemes are possible. 
    10761066\begin{description} 
    1077 \item[\np{nn_test_icebergs}~$>$~0] 
    1078 In this scheme, the value of \np{nn_test_icebergs} represents the class of iceberg to generate  
    1079 (so between 1 and 10), and \np{nn_test_icebergs} provides a lon/lat box in the domain at each  
     1067\item[\np{nn\_test\_icebergs}~$>$~0] 
     1068In this scheme, the value of \np{nn\_test\_icebergs} represents the class of iceberg to generate  
     1069(so between 1 and 10), and \np{nn\_test\_icebergs} provides a lon/lat box in the domain at each  
    10801070grid point of which an iceberg is generated at the beginning of the run.  
    1081 (Note that this happens each time the timestep equals \np{nn_nit000}.) 
    1082 \np{nn_test_icebergs} is defined by four numbers in \np{nn_test_box} representing the corners  
     1071(Note that this happens each time the timestep equals \np{nn\_nit000}.) 
     1072\np{nn\_test\_icebergs} is defined by four numbers in \np{nn\_test\_box} representing the corners  
    10831073of the geographical box: lonmin,lonmax,latmin,latmax 
    1084 \item[\np{nn_test_icebergs}~=~-1] 
    1085 In this scheme the model reads a calving file supplied in the \np{sn_icb} parameter. 
     1074\item[\np{nn\_test\_icebergs}\forcode{ = -1}] 
     1075In this scheme the model reads a calving file supplied in the \np{sn\_icb} parameter. 
    10861076This should be a file with a field on the configuration grid (typically ORCA) representing ice accumulation rate at each model point.  
    10871077These should be ocean points adjacent to land where icebergs are known to calve. 
     
    10951085Icebergs are influenced by wind, waves and currents, bottom melt and erosion. 
    10961086The latter act to disintegrate the iceberg. This is either all melted freshwater, or  
    1097 (if \np{rn_bits_erosion_fraction}~$>$~0) into melt and additionally small ice bits 
     1087(if \np{rn\_bits\_erosion\_fraction}~$>$~0) into melt and additionally small ice bits 
    10981088which are assumed to propagate with their larger parent and thus delay fluxing into the ocean. 
    10991089Melt water (and other variables on the configuration grid) are written into the main NEMO model output files. 
     
    11011091Extensive diagnostics can be produced. 
    11021092Separate output files are maintained for human-readable iceberg information. 
    1103 A separate file is produced for each processor (independent of \np{ln_ctl}). 
     1093A separate file is produced for each processor (independent of \np{ln\_ctl}). 
    11041094The amount of information is controlled by two integer parameters: 
    11051095\begin{description} 
    1106 \item[\np{nn_verbose_level}]  takes a value between one and four and represents  
     1096\item[\np{nn\_verbose\_level}]  takes a value between one and four and represents  
    11071097an increasing number of points in the code at which variables are written, and an  
    11081098increasing level of obscurity. 
    1109 \item[\np{nn_verbose_write}] is the number of timesteps between writes 
     1099\item[\np{nn\_verbose\_write}] is the number of timesteps between writes 
    11101100\end{description} 
    11111101 
    1112 Iceberg trajectories can also be written out and this is enabled by setting \np{nn_sample_rate}~$>$~0. 
     1102Iceberg trajectories can also be written out and this is enabled by setting \np{nn\_sample\_rate}~$>$~0. 
    11131103A non-zero value represents how many timesteps between writes of information into the output file. 
    11141104These output files are in NETCDF format. 
     
    11281118%        Diurnal cycle 
    11291119% ------------------------------------------------------------------------------------------------------------- 
    1130 \subsection   [Diurnal  cycle (\textit{sbcdcy})] 
    1131          {Diurnal cycle (\protect\mdl{sbcdcy})} 
     1120\subsection{Diurnal cycle (\protect\mdl{sbcdcy})} 
    11321121\label{SBC_dcy} 
    11331122%------------------------------------------namsbc_rnf---------------------------------------------------- 
     
    11551144the diurnal cycle of SWF is a scaling of the top of the atmosphere diurnal cycle  
    11561145of incident SWF. The \cite{Bernie_al_CD07} reconstruction algorithm is available 
    1157 in \NEMO by setting \np{ln_dm2dc}~=~true (a \textit{\ngn{namsbc}} namelist variable) when using  
    1158 CORE bulk formulea (\np{ln_blk_core}~=~true) or the flux formulation (\np{ln_flx}~=~true).  
     1146in \NEMO by setting \np{ln\_dm2dc}\forcode{ = .true.} (a \textit{\ngn{namsbc}} namelist variable) when using  
     1147CORE bulk formulea (\np{ln\_blk\_core}\forcode{ = .true.}) or the flux formulation (\np{ln\_flx}\forcode{ = .true.}).  
    11591148The reconstruction is performed in the \mdl{sbcdcy} module. The detail of the algoritm used  
    11601149can be found in the appendix~A of \cite{Bernie_al_CD07}. The algorithm preserve the daily  
     
    11621151of the analytical cycle over this time step (Fig.\ref{Fig_SBC_diurnal}).  
    11631152The use of diurnal cycle reconstruction requires the input SWF to be daily  
    1164 ($i.e.$ a frequency of 24 and a time interpolation set to true in \np{sn_qsr} namelist parameter). 
     1153($i.e.$ a frequency of 24 and a time interpolation set to true in \np{sn\_qsr} namelist parameter). 
    11651154Furthermore, it is recommended to have a least 8 surface module time step per day, 
    11661155that is  $\rdt \ nn\_fsbc < 10,800~s = 3~h$. An example of recontructed SWF  
     
    11891178\label{SBC_rotation} 
    11901179 
    1191 When using a flux (\forcode{ln_flx = .true.}) or bulk (\forcode{ln_clio = .true.} or \forcode{ln_core = .true.}) formulation,  
     1180When using a flux (\np{ln\_flx}\forcode{ = .true.}) or bulk (\np{ln\_clio}\forcode{ = .true.} or \np{ln\_core}\forcode{ = .true.}) formulation,  
    11921181pairs of vector components can be rotated from east-north directions onto the local grid directions.   
    11931182This is particularly useful when interpolation on the fly is used since here any vectors are likely to be defined  
     
    12051194%        Surface restoring to observed SST and/or SSS 
    12061195% ------------------------------------------------------------------------------------------------------------- 
    1207 \subsection    [Surface restoring to observed SST and/or SSS (\textit{sbcssr})] 
    1208          {Surface restoring to observed SST and/or SSS (\protect\mdl{sbcssr})} 
     1196\subsection{Surface restoring to observed SST and/or SSS (\protect\mdl{sbcssr})} 
    12091197\label{SBC_ssr} 
    12101198%------------------------------------------namsbc_ssr---------------------------------------------------- 
     
    12131201 
    12141202IOptions are defined through the  \ngn{namsbc\_ssr} namelist variables. 
    1215 n forced mode using a flux formulation (\np{ln_flx}~=~true), a  
     1203n forced mode using a flux formulation (\np{ln\_flx}\forcode{ = .true.}), a  
    12161204feedback term \emph{must} be added to the surface heat flux $Q_{ns}^o$: 
    12171205\begin{equation} \label{Eq_sbc_dmp_q} 
     
    12511239The presence at the sea surface of an ice covered area modifies all the fluxes  
    12521240transmitted to the ocean. There are several way to handle sea-ice in the system  
    1253 depending on the value of the \np{nn_ice} namelist parameter found in \ngn{namsbc} namelist.   
     1241depending on the value of the \np{nn\_ice} namelist parameter found in \ngn{namsbc} namelist.   
    12541242\begin{description} 
    12551243\item[nn{\_}ice = 0]  there will never be sea-ice in the computational domain.  
     
    12751263% {Description of Ice-ocean interface to be added here or in LIM 2 and 3 doc ?} 
    12761264 
    1277 \subsection   [Interface to CICE (\textit{sbcice\_cice})] 
    1278          {Interface to CICE (\protect\mdl{sbcice\_cice})} 
     1265\subsection{Interface to CICE (\protect\mdl{sbcice\_cice})} 
    12791266\label{SBC_cice} 
    12801267 
     
    12871274\textit{calc\_strair~=~true} and \textit{calc\_Tsfc~=~true} in the CICE name-list), or alternatively when NEMO  
    12881275is coupled to the HadGAM3 atmosphere model (with \textit{calc\_strair~=~false} and \textit{calc\_Tsfc~=~false}). 
    1289 The code is intended to be used with \np{nn_fsbc} set to 1 (although coupling ocean and ice less frequently  
     1276The code is intended to be used with \np{nn\_fsbc} set to 1 (although coupling ocean and ice less frequently  
    12901277should work, it is possible the calculation of some of the ocean-ice fluxes needs to be modified slightly - the 
    12911278user should check that results are not significantly different to the standard case). 
     
    13031290%        Freshwater budget control  
    13041291% ------------------------------------------------------------------------------------------------------------- 
    1305 \subsection   [Freshwater budget control (\textit{sbcfwb})] 
    1306          {Freshwater budget control (\protect\mdl{sbcfwb})} 
     1292\subsection{Freshwater budget control (\protect\mdl{sbcfwb})} 
    13071293\label{SBC_fwb} 
    13081294 
     
    13111297in the freshwater fluxes. In \NEMO, two way of controlling the the freshwater budget.  
    13121298\begin{description} 
    1313 \item[\forcode{nn_fwb = 0}]  no control at all. The mean sea level is free to drift, and will  
     1299\item[\np{nn\_fwb}\forcode{ = 0}]  no control at all. The mean sea level is free to drift, and will  
    13141300certainly do so. 
    1315 \item[\forcode{nn_fwb = 1}]  global mean \textit{emp} set to zero at each model time step.  
     1301\item[\np{nn\_fwb}\forcode{ = 1}]  global mean \textit{emp} set to zero at each model time step.  
    13161302%Note that with a sea-ice model, this technique only control the mean sea level with linear free surface (\key{vvl} not defined) and no mass flux between ocean and ice (as it is implemented in the current ice-ocean coupling).  
    1317 \item[\forcode{nn_fwb = 2}]  freshwater budget is adjusted from the previous year annual  
     1303\item[\np{nn\_fwb}\forcode{ = 2}]  freshwater budget is adjusted from the previous year annual  
    13181304mean budget which is read in the \textit{EMPave\_old.dat} file. As the model uses the  
    13191305Boussinesq approximation, the annual mean fresh water budget is simply evaluated  
     
    13251311%        Neutral Drag Coefficient from external wave model 
    13261312% ------------------------------------------------------------------------------------------------------------- 
    1327 \subsection   [Neutral drag coefficient from external wave model (\textit{sbcwave})] 
    1328               {Neutral drag coefficient from external wave model (\protect\mdl{sbcwave})} 
     1313\subsection[Neutral drag coeff. from external wave model (\protect\mdl{sbcwave})] 
     1314            {Neutral drag coefficient from external wave model (\protect\mdl{sbcwave})} 
    13291315\label{SBC_wave} 
    13301316%------------------------------------------namwave---------------------------------------------------- 
     
    13321318%------------------------------------------------------------------------------------------------------------- 
    13331319 
    1334 In order to read a neutral drag coeff, from an external data source ($i.e.$ a wave model), the  
    1335 logical variable \np{ln_cdgw} in \ngn{namsbc} namelist must be set to \textit{true}.  
    1336 The \mdl{sbcwave} module containing the routine \np{sbc_wave} reads the 
     1320In order to read a neutral drag coefficient, from an external data source ($i.e.$ a wave model), the  
     1321logical variable \np{ln\_cdgw} in \ngn{namsbc} namelist must be set to \forcode{.true.}.  
     1322The \mdl{sbcwave} module containing the routine \np{sbc\_wave} reads the 
    13371323namelist \ngn{namsbc\_wave} (for external data names, locations, frequency, interpolation and all  
    13381324the miscellanous options allowed by Input Data generic Interface see \S\ref{SBC_input})  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_STO.tex

    r9392 r9393  
    44% Chapter stochastic parametrization of EOS (STO) 
    55% ================================================================ 
    6 \chapter{Stochastic parametrization of EOS (STO)} 
     6\chapter{Stochastic Parametrization of EOS (STO)} 
    77\label{STO} 
    88 
     
    155155Parameters for the processes can be specified through the following \ngn{namsto} namelist parameters: 
    156156\begin{description} 
    157    \item[\np{nn_sto_eos}]   : number of independent random walks  
    158    \item[\np{rn_eos_stdxy}] : random walk horz. standard deviation (in grid points) 
    159    \item[\np{rn_eos_stdz}]  : random walk vert. standard deviation (in grid points) 
    160    \item[\np{rn_eos_tcor}]  : random walk time correlation (in timesteps) 
    161    \item[\np{nn_eos_ord}]   : order of autoregressive processes 
    162    \item[\np{nn_eos_flt}]   : passes of Laplacian filter 
    163    \item[\np{rn_eos_lim}]   : limitation factor (default = 3.0) 
     157   \item[\np{nn\_sto\_eos}]   : number of independent random walks  
     158   \item[\np{rn\_eos\_stdxy}] : random walk horz. standard deviation (in grid points) 
     159   \item[\np{rn\_eos\_stdz}]  : random walk vert. standard deviation (in grid points) 
     160   \item[\np{rn\_eos\_tcor}]  : random walk time correlation (in timesteps) 
     161   \item[\np{nn\_eos\_ord}]   : order of autoregressive processes 
     162   \item[\np{nn\_eos\_flt}]   : passes of Laplacian filter 
     163   \item[\np{rn\_eos\_lim}]   : limitation factor (default = 3.0) 
    164164\end{description} 
    165165This routine also includes the initialization (seeding) of the random number generator. 
    166166 
    167167The third routine (\rou{sto\_rst\_write}) writes a restart file (which suffix name is  
    168 given by \np{cn_storst_out} namelist parameter) containing the current value of  
     168given by \np{cn\_storst\_out} namelist parameter) containing the current value of  
    169169all autoregressive processes to allow restarting a simulation from where it has been interrupted. 
    170170This file also contains the current state of the random number generator. 
    171 When \np{ln_rststo} is set to \textit{true}), the restart file (which suffix name is  
    172 given by \np{cn_storst_in} namelist parameter) is read by the initialization routine  
     171When \np{ln\_rststo} is set to \forcode{.true.}), the restart file (which suffix name is  
     172given by \np{cn\_storst\_in} namelist parameter) is read by the initialization routine  
    173173(\rou{sto\_par\_init}). The simulation will continue exactly as if it was not interrupted 
    174 only  when \np{ln_rstseed} is set to \textit{true}, $i.e.$ when the state of  
     174only  when \np{ln\_rstseed} is set to \forcode{.true.}, $i.e.$ when the state of  
    175175the random number generator is read in the restart file. 
    176176 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_TRA.tex

    r9392 r9393  
    5757 
    5858The user has the option of extracting each tendency term on the RHS of the tracer  
    59 equation for output (\np{ln_tra_trd} or \np{ln_tra_mxl}~=~true), as described in Chap.~\ref{DIA}. 
     59equation for output (\np{ln\_tra\_trd} or \np{ln\_tra\_mxl}\forcode{ = .true.}), as described in Chap.~\ref{DIA}. 
    6060 
    6161$\ $\newline    % force a new ligne 
     
    6363% Tracer Advection 
    6464% ================================================================ 
    65 \section  [Tracer Advection (\textit{traadv})] 
    66       {Tracer Advection (\protect\mdl{traadv})} 
     65\section{Tracer advection (\protect\mdl{traadv})} 
    6766\label{TRA_adv} 
    6867%------------------------------------------namtra_adv----------------------------------------------------- 
     
    7069%------------------------------------------------------------------------------------------------------------- 
    7170 
    72 When considered ($i.e.$ when \np{ln_traadv_NONE} is not set to \textit{true}),  
     71When considered ($i.e.$ when \np{ln\_traadv\_NONE} is not set to \forcode{.true.}),  
    7372the advection tendency of a tracer is expressed in flux form,  
    7473$i.e.$ as the divergence of the advective fluxes. Its discrete expression is given by : 
     
    8483by using the following equality : $\nabla \cdot \left( \vect{U}\,T \right)=\vect{U} \cdot \nabla T$  
    8584which results from the use of the continuity equation,  $\partial _t e_3 + e_3\;\nabla \cdot \vect{U}=0$  
    86 (which reduces to $\nabla \cdot \vect{U}=0$ in linear free surface, $i.e.$ \forcode{ln_linssh = .true.}).  
     85(which reduces to $\nabla \cdot \vect{U}=0$ in linear free surface, $i.e.$ \np{ln\_linssh}\forcode{ = .true.}).  
    8786Therefore it is of paramount importance to design the discrete analogue of the  
    8887advection tendency so that it is consistent with the continuity equation in order to  
     
    114113boundary condition depends on the type of sea surface chosen:  
    115114\begin{description} 
    116 \item [linear free surface:] (\forcode{ln_linssh = .true.}) the first level thickness is constant in time:  
     115\item [linear free surface:] (\np{ln\_linssh}\forcode{ = .true.}) the first level thickness is constant in time:  
    117116the vertical boundary condition is applied at the fixed surface $z=0$  
    118117rather than on the moving surface $z=\eta$. There is a non-zero advective  
     
    120119$\left. {\tau _w } \right|_{k=1/2} =T_{k=1} $, $i.e.$  
    121120the product of surface velocity (at $z=0$) by the first level tracer value. 
    122 \item [non-linear free surface:] (\forcode{ln_linssh = .false.})  
     121\item [non-linear free surface:] (\np{ln\_linssh}\forcode{ = .false.})  
    123122convergence/divergence in the first ocean level moves the free surface  
    124123up/down. There is no tracer advection through it so that the advective  
     
    146145Estimated Streaming Terms scheme (QUICKEST). 
    147146The choice is made in the \textit{\ngn{namtra\_adv}} namelist, by  
    148 setting to \textit{true} one of the logicals \textit{ln\_traadv\_xxx}.  
     147setting to \forcode{.true.} one of the logicals \textit{ln\_traadv\_xxx}.  
    149148The corresponding code can be found in the \textit{traadv\_xxx.F90} module,  
    150149where \textit{xxx} is a 3 or 4 letter acronym corresponding to each scheme.  
    151150By default ($i.e.$ in the reference namelist, \ngn{namelist\_ref}), all the logicals  
    152 are set to \textit{false}. If the user does not select an advection scheme  
     151are set to \forcode{.false.}. If the user does not select an advection scheme  
    153152in the configuration namelist (\ngn{namelist\_cfg}), the tracers will \textit{not} be advected ! 
    154153 
     
    174173%        2nd and 4th order centred schemes 
    175174% ------------------------------------------------------------------------------------------------------------- 
    176 \subsection [Centred schemes (CEN) (\protect\np{ln_traadv_cen})] 
    177             {Centred schemes (CEN) (\protect\forcode{ln_traadv_cen = .true.})} 
     175\subsection{CEN: Centred scheme (\protect\np{ln\_traadv\_cen}\forcode{ = .true.})} 
    178176\label{TRA_adv_cen} 
    179177 
    180178%        2nd order centred scheme   
    181179 
    182 The centred advection scheme (CEN) is used when \np{ln_traadv_cen}~=~\textit{true}.  
     180The centred advection scheme (CEN) is used when \np{ln\_traadv\_cen}\forcode{ = .true.}.  
    183181Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level)  
    184 and vertical direction by setting \np{nn_cen_h} and \np{nn_cen_v} to $2$ or $4$.  
     182and vertical direction by setting \np{nn\_cen\_h} and \np{nn\_cen\_v} to $2$ or $4$.  
    185183CEN implementation can be found in the \mdl{traadv\_cen} module. 
    186184 
     
    212210=\overline{   T - \frac{1}{6}\,\delta _i \left[ \delta_{i+1/2}[T] \,\right]   }^{\,i+1/2} 
    213211\end{equation} 
    214 In the vertical direction (\np{nn_cen_v}=$4$), a $4^{th}$ COMPACT interpolation  
     212In the vertical direction (\np{nn\_cen\_v}\forcode{ = 4}), a $4^{th}$ COMPACT interpolation  
    215213has been prefered \citep{Demange_PhD2014}. 
    216214In the COMPACT scheme, both the field and its derivative are interpolated,  
     
    224222The expression \textit{$4^{th}$ order scheme} used in oceanographic literature  
    225223is usually associated with the scheme presented here.  
    226 Introducing a \textit{true} $4^{th}$ order advection scheme is feasible but,  
     224Introducing a \forcode{.true.} $4^{th}$ order advection scheme is feasible but,  
    227225for consistency reasons, it requires changes in the discretisation of the tracer  
    228226advection together with changes in the continuity equation,  
     
    246244%        FCT scheme   
    247245% ------------------------------------------------------------------------------------------------------------- 
    248 \subsection   [Flux Corrected Transport schemes (FCT) (\protect\np{ln_traadv_fct})] 
    249          {Flux Corrected Transport schemes (FCT) (\protect\forcode{ln_traadv_fct = .true.})} 
     246\subsection{FCT: Flux Corrected Transport scheme (\protect\np{ln\_traadv\_fct}\forcode{ = .true.})} 
    250247\label{TRA_adv_tvd} 
    251248 
    252 The Flux Corrected Transport schemes (FCT) is used when \np{ln_traadv_fct}~=~\textit{true}.  
     249The Flux Corrected Transport schemes (FCT) is used when \np{ln\_traadv\_fct}\forcode{ = .true.}.  
    253250Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level)  
    254 and vertical direction by setting \np{nn_fct_h} and \np{nn_fct_v} to $2$ or $4$. 
     251and vertical direction by setting \np{nn\_fct\_h} and \np{nn\_fct\_v} to $2$ or $4$. 
    255252FCT implementation can be found in the \mdl{traadv\_fct} module. 
    256253 
     
    269266where $c_u$ is a flux limiter function taking values between 0 and 1.  
    270267The FCT order is the one of the centred scheme used ($i.e.$ it depends on the setting of 
    271 \np{nn_fct_h} and \np{nn_fct_v}. 
     268\np{nn\_fct\_h} and \np{nn\_fct\_v}. 
    272269There exist many ways to define $c_u$, each corresponding to a different  
    273270FCT scheme. The one chosen in \NEMO is described in \citet{Zalesak_JCP79}.  
     
    277274A comparison of FCT-2 with MUSCL and a MPDATA scheme can be found in \citet{Levy_al_GRL01}.  
    278275 
    279 An additional option has been added controlled by \np{nn_fct_zts}. By setting this integer to  
     276An additional option has been added controlled by \np{nn\_fct\_zts}. By setting this integer to  
    280277a value larger than zero, a $2^{nd}$ order FCT scheme is used on both horizontal and vertical direction,  
    281278but on the latter, a split-explicit time stepping is used, with a number of sub-timestep equals 
    282 to \np{nn_fct_zts}. This option can be useful when the size of the timestep is limited  
     279to \np{nn\_fct\_zts}. This option can be useful when the size of the timestep is limited  
    283280by vertical advection \citep{Lemarie_OM2015}. Note that in this case, a similar split-explicit  
    284281time stepping should be used on vertical advection of momentum to insure a better stability 
     
    293290%        MUSCL scheme   
    294291% ------------------------------------------------------------------------------------------------------------- 
    295 \subsection[MUSCL scheme  (\protect\np{ln_traadv_mus})] 
    296    {Monotone Upstream Scheme for Conservative Laws (MUSCL) (\protect\forcode{ln_traadv_mus = .true.})} 
     292\subsection{MUSCL: Monotone Upstream Scheme for Conservative Laws (\protect\np{ln\_traadv\_mus}\forcode{ = .true.})} 
    297293\label{TRA_adv_mus} 
    298294 
    299 The Monotone Upstream Scheme for Conservative Laws (MUSCL) is used when \np{ln_traadv_mus}~=~\textit{true}.  
     295The Monotone Upstream Scheme for Conservative Laws (MUSCL) is used when \np{ln\_traadv\_mus}\forcode{ = .true.}.  
    300296MUSCL implementation can be found in the \mdl{traadv\_mus} module. 
    301297 
     
    321317the \textit{positive} character of the scheme.  
    322318In addition, fluxes round a grid-point where a runoff is applied can optionally be  
    323 computed using upstream fluxes (\np{ln_mus_ups}~=~\textit{true}). 
     319computed using upstream fluxes (\np{ln\_mus\_ups}\forcode{ = .true.}). 
    324320 
    325321% ------------------------------------------------------------------------------------------------------------- 
    326322%        UBS scheme   
    327323% ------------------------------------------------------------------------------------------------------------- 
    328 \subsection   [Upstream-Biased Scheme (UBS) (\protect\np{ln_traadv_ubs})] 
    329          {Upstream-Biased Scheme (UBS) (\protect\forcode{ln_traadv_ubs = .true.})} 
     324\subsection{UBS a.k.a. UP3: Upstream-Biased Scheme (\protect\np{ln\_traadv\_ubs}\forcode{ = .true.})} 
    330325\label{TRA_adv_ubs} 
    331326 
    332 The Upstream-Biased Scheme (UBS) is used when \np{ln_traadv_ubs}~=~\textit{true}.  
     327The Upstream-Biased Scheme (UBS) is used when \np{ln\_traadv\_ubs}\forcode{ = .true.}.  
    333328UBS implementation can be found in the \mdl{traadv\_mus} module. 
    334329 
     
    358353where the control of artificial diapycnal fluxes is of paramount importance \citep{Shchepetkin_McWilliams_OM05, Demange_PhD2014}.  
    359354Therefore the vertical flux is evaluated using either a $2^nd$ order FCT scheme  
    360 or a $4^th$ order COMPACT scheme (\forcode{nn_cen_v = 2} or 4). 
     355or a $4^th$ order COMPACT scheme (\np{nn\_cen\_v}\forcode{ = 2 or 4}). 
    361356 
    362357For stability reasons  (see \S\ref{STP}), 
     
    401396%        QCK scheme   
    402397% ------------------------------------------------------------------------------------------------------------- 
    403 \subsection   [QUICKEST scheme (QCK) (\protect\np{ln_traadv_qck})] 
    404          {QUICKEST scheme (QCK) (\protect\forcode{ln_traadv_qck = .true.})} 
     398\subsection{QCK: QuiCKest scheme (\protect\np{ln\_traadv\_qck}\forcode{ = .true.})} 
    405399\label{TRA_adv_qck} 
    406400 
    407401The Quadratic Upstream Interpolation for Convective Kinematics with  
    408402Estimated Streaming Terms (QUICKEST) scheme proposed by \citet{Leonard1979}  
    409 is used when \np{ln_traadv_qck}~=~\textit{true}.  
     403is used when \np{ln\_traadv\_qck}\forcode{ = .true.}.  
    410404QUICKEST implementation can be found in the \mdl{traadv\_qck} module. 
    411405 
     
    428422% Tracer Lateral Diffusion 
    429423% ================================================================ 
    430 \section  [Tracer Lateral Diffusion (\textit{traldf})] 
    431       {Tracer Lateral Diffusion (\protect\mdl{traldf})} 
     424\section{Tracer lateral diffusion (\protect\mdl{traldf})} 
    432425\label{TRA_ldf} 
    433426%-----------------------------------------nam_traldf------------------------------------------------------ 
     
    449442except for the pure vertical component that appears when a rotation tensor is used.  
    450443This latter component is solved implicitly together with the vertical diffusion term (see \S\ref{STP}).  
    451 When \np{ln_traldf_msc}~=~\textit{true}, a Method of Stabilizing Correction is used in which  
     444When \np{ln\_traldf\_msc}\forcode{ = .true.}, a Method of Stabilizing Correction is used in which  
    452445the pure vertical component is split into an explicit and an implicit part \citep{Lemarie_OM2012}. 
    453446 
     
    455448%        Type of operator 
    456449% ------------------------------------------------------------------------------------------------------------- 
    457 \subsection   [Type of operator (\protect\np{ln\_traldf\{\_NONE, \_lap, \_blp\}})] 
    458               {Type of operator (\protect\np{ln_traldf_NONE}, \protect\np{ln_traldf_lap}, or \protect\np{ln_traldf_blp} = true) }  
     450\subsection[Type of operator (\protect\np{ln\_traldf}\{\_NONE,\_lap,\_blp\}\})] 
     451              {Type of operator (\protect\np{ln\_traldf\_NONE}, \protect\np{ln\_traldf\_lap}, or \protect\np{ln\_traldf\_blp}) }  
    459452\label{TRA_ldf_op} 
    460453 
    461454Three operator options are proposed and, one and only one of them must be selected: 
    462455\begin{description} 
    463 \item [\np{ln_traldf_NONE}] = true : no operator selected, the lateral diffusive tendency will not be  
     456\item [\np{ln\_traldf\_NONE}\forcode{ = .true.}]: no operator selected, the lateral diffusive tendency will not be  
    464457applied to the tracer equation. This option can be used when the selected advection scheme  
    465458is diffusive enough (MUSCL scheme for example). 
    466 \item [ \np{ln_traldf_lap}] = true : a laplacian operator is selected. This harmonic operator  
     459\item [\np{ln\_traldf\_lap}\forcode{ = .true.}]: a laplacian operator is selected. This harmonic operator  
    467460takes the following expression:  $\mathpzc{L}(T)=\nabla \cdot A_{ht}\;\nabla T $,  
    468461where the gradient operates along the selected direction (see \S\ref{TRA_ldf_dir}), 
    469462and $A_{ht}$ is the eddy diffusivity coefficient expressed in $m^2/s$ (see Chap.~\ref{LDF}). 
    470 \item [\np{ln_traldf_blp}] = true : a bilaplacian operator is selected. This biharmonic operator  
     463\item [\np{ln\_traldf\_blp}\forcode{ = .true.}]: a bilaplacian operator is selected. This biharmonic operator  
    471464takes the following expression:   
    472465$\mathpzc{B}=- \mathpzc{L}\left(\mathpzc{L}(T) \right) = -\nabla \cdot b\nabla \left( {\nabla \cdot b\nabla T} \right)$  
     
    488481%        Direction of action 
    489482% ------------------------------------------------------------------------------------------------------------- 
    490 \subsection   [Direction of action (\protect\np{ln\_traldf\{\_lev, \_hor, \_iso, \_triad\}})] 
    491               {Direction of action (\protect\np{ln_traldf_lev}, \textit{...\_hor}, \textit{...\_iso}, or \textit{...\_triad} = true) }  
     483\subsection[Action direction (\protect\np{ln\_traldf}\{\_lev,\_hor,\_iso,\_triad\})] 
     484              {Direction of action (\protect\np{ln\_traldf\_lev}, \protect\np{ln\_traldf\_hor}, \protect\np{ln\_traldf\_iso}, or \protect\np{ln\_traldf\_triad}) }  
    492485\label{TRA_ldf_dir} 
    493486 
    494487The choice of a direction of action determines the form of operator used.  
    495488The operator is a simple (re-entrant) laplacian acting in the (\textbf{i},\textbf{j}) plane  
    496 when iso-level option is used (\np{ln_traldf_lev}~=~\textit{true}) 
     489when iso-level option is used (\np{ln\_traldf\_lev}\forcode{ = .true.}) 
    497490or when a horizontal ($i.e.$ geopotential) operator is demanded in \textit{z}-coordinate  
    498 (\np{ln_traldf_hor} and \np{ln_zco} equal \textit{true}).  
     491(\np{ln\_traldf\_hor} and \np{ln\_zco} equal \forcode{.true.}).  
    499492The associated code can be found in the \mdl{traldf\_lap\_blp} module. 
    500493The operator is a rotated (re-entrant) laplacian when the direction along which it acts  
    501494does not coincide with the iso-level surfaces,  
    502 that is when standard or triad iso-neutral option is used (\np{ln_traldf_iso} or  
    503  \np{ln_traldf_triad} equals \textit{true}, see \mdl{traldf\_iso} or \mdl{traldf\_triad} module, resp.),  
     495that is when standard or triad iso-neutral option is used (\np{ln\_traldf\_iso} or  
     496 \np{ln\_traldf\_triad} equals \forcode{.true.}, see \mdl{traldf\_iso} or \mdl{traldf\_triad} module, resp.),  
    504497or when a horizontal ($i.e.$ geopotential) operator is demanded in \textit{s}-coordinate  
    505 (\np{ln_traldf_hor} and \np{ln_sco} equal \textit{true}) 
     498(\np{ln\_traldf\_hor} and \np{ln\_sco} equal \forcode{.true.}) 
    506499\footnote{In this case, the standard iso-neutral operator will be automatically selected}.  
    507500In that case, a rotation is applied to the gradient(s) that appears in the operator  
     
    515508%       iso-level operator 
    516509% ------------------------------------------------------------------------------------------------------------- 
    517 \subsection   [Iso-level (bi-)laplacian operator ( \protect\np{ln_traldf_iso})] 
    518          {Iso-level (bi-)laplacian operator ( \protect\np{ln_traldf_iso}) } 
     510\subsection{Iso-level (bi-)laplacian operator ( \protect\np{ln\_traldf\_iso}) } 
    519511\label{TRA_ldf_lev} 
    520512 
     
    534526It is a \emph{horizontal} operator ($i.e.$ acting along geopotential surfaces) in the $z$-coordinate  
    535527with or without partial steps, but is simply an iso-level operator in the $s$-coordinate.  
    536 It is thus used when, in addition to \np{ln_traldf_lap} or \np{ln_traldf_blp}~=~\textit{true},  
    537 we have \np{ln_traldf_lev}~=~\textit{true} or \np{ln_traldf_hor}~=~\np{ln_zco}~=~\textit{true}.  
     528It is thus used when, in addition to \np{ln\_traldf\_lap} or \np{ln\_traldf\_blp}\forcode{ = .true.},  
     529we have \np{ln\_traldf\_lev}\forcode{ = .true.} or \np{ln\_traldf\_hor}~=~\np{ln\_zco}\forcode{ = .true.}.  
    538530In both cases, it significantly contributes to diapycnal mixing.  
    539531It is therefore never recommended, even when using it in the bilaplacian case. 
    540532 
    541 Note that in the partial step $z$-coordinate (\forcode{ln_zps = .true.}), tracers in horizontally  
     533Note that in the partial step $z$-coordinate (\np{ln\_zps}\forcode{ = .true.}), tracers in horizontally  
    542534adjacent cells are located at different depths in the vicinity of the bottom.  
    543535In this case, horizontal derivatives in (\ref{Eq_tra_ldf_lap}) at the bottom level  
     
    549541%         Rotated laplacian operator 
    550542% ------------------------------------------------------------------------------------------------------------- 
    551 \subsection   [Standard and triad rotated (bi-)laplacian operator] 
    552                {Standard and triad (bi-)laplacian operator} 
     543\subsection{Standard and triad (bi-)laplacian operator} 
    553544\label{TRA_ldf_iso_triad} 
    554545 
    555546%&&    Standard rotated (bi-)laplacian operator 
    556547%&& ---------------------------------------------- 
    557 \subsubsection   [Standard rotated (bi-)laplacian operator (\protect\mdl{traldf\_iso})] 
    558                  {Standard rotated (bi-)laplacian operator (\protect\mdl{traldf\_iso})} 
     548\subsubsection{Standard rotated (bi-)laplacian operator (\protect\mdl{traldf\_iso})} 
    559549\label{TRA_ldf_iso} 
    560550The general form of the second order lateral tracer subgrid scale physics  
     
    584574($z$- or $s$-surfaces) and the surface along which the diffusion operator  
    585575acts ($i.e.$ horizontal or iso-neutral surfaces).  It is thus used when,  
    586 in addition to \np{ln_traldf_lap}= true, we have \forcode{ln_traldf_iso = .true.},  
    587 or both \forcode{ln_traldf_hor = .true.} and \forcode{ln_zco = .true.}. The way these  
     576in addition to \np{ln\_traldf\_lap}\forcode{ = .true.}, we have \np{ln\_traldf\_iso}\forcode{ = .true.},  
     577or both \np{ln\_traldf\_hor}\forcode{ = .true.} and \np{ln\_zco}\forcode{ = .true.}. The way these  
    588578slopes are evaluated is given in \S\ref{LDF_slp}. At the surface, bottom  
    589579and lateral boundaries, the turbulent fluxes of heat and salt are set to zero  
     
    603593background horizontal diffusion \citep{Guilyardi_al_CD01}.  
    604594 
    605 Note that in the partial step $z$-coordinate (\forcode{ln_zps = .true.}), the horizontal derivatives  
     595Note that in the partial step $z$-coordinate (\np{ln\_zps}\forcode{ = .true.}), the horizontal derivatives  
    606596at the bottom level in \eqref{Eq_tra_ldf_iso} require a specific treatment.  
    607597They are calculated in module zpshde, described in \S\ref{TRA_zpshde}. 
     
    609599%&&     Triad rotated (bi-)laplacian operator 
    610600%&&  ------------------------------------------- 
    611 \subsubsection   [Triad rotated (bi-)laplacian operator (\protect\np{ln_traldf_triad})] 
    612                  {Triad rotated (bi-)laplacian operator (\protect\np{ln_traldf_triad})} 
     601\subsubsection{Triad rotated (bi-)laplacian operator (\protect\np{ln\_traldf\_triad})} 
    613602\label{TRA_ldf_triad} 
    614603 
    615 If the Griffies triad scheme is employed (\forcode{ln_traldf_triad = .true.} ; see App.\ref{sec:triad})  
     604If the Griffies triad scheme is employed (\np{ln\_traldf\_triad}\forcode{ = .true.} ; see App.\ref{sec:triad})  
    616605 
    617606An alternative scheme developed by \cite{Griffies_al_JPO98} which ensures tracer variance decreases  
    618 is also available in \NEMO (\forcode{ln_traldf_grif = .true.}). A complete description of  
     607is also available in \NEMO (\np{ln\_traldf\_grif}\forcode{ = .true.}). A complete description of  
    619608the algorithm is given in App.\ref{sec:triad}. 
    620609 
     
    631620%&&    Option for the rotated operators 
    632621%&& ---------------------------------------------- 
    633 \subsubsection   [Option for the rotated operators] 
    634                  {Option for the rotated operators} 
     622\subsubsection{Option for the rotated operators} 
    635623\label{TRA_ldf_options} 
    636624 
    637 \np{ln_traldf_msc} = Method of Stabilizing Correction (both operators) 
    638  
    639 \np{rn_slpmax} = slope limit (both operators) 
    640  
    641 \np{ln_triad_iso} = pure horizontal mixing in ML (triad only) 
    642  
    643 \np{rn_sw_triad} =1 switching triad ; =0 all 4 triads used (triad only)  
    644  
    645 \np{ln_botmix_triad} = lateral mixing on bottom (triad only) 
     625\np{ln\_traldf\_msc} = Method of Stabilizing Correction (both operators) 
     626 
     627\np{rn\_slpmax} = slope limit (both operators) 
     628 
     629\np{ln\_triad\_iso} = pure horizontal mixing in ML (triad only) 
     630 
     631\np{rn\_sw\_triad} =1 switching triad ; =0 all 4 triads used (triad only)  
     632 
     633\np{ln\_botmix\_triad} = lateral mixing on bottom (triad only) 
    646634 
    647635% ================================================================ 
    648636% Tracer Vertical Diffusion 
    649637% ================================================================ 
    650 \section  [Tracer Vertical Diffusion (\textit{trazdf})] 
    651       {Tracer Vertical Diffusion (\protect\mdl{trazdf})} 
     638\section{Tracer vertical diffusion (\protect\mdl{trazdf})} 
    652639\label{TRA_zdf} 
    653640%--------------------------------------------namzdf--------------------------------------------------------- 
     
    685672The large eddy coefficient found in the mixed layer together with high  
    686673vertical resolution implies that in the case of explicit time stepping  
    687 (\forcode{ln_zdfexp = .true.}) there would be too restrictive a constraint on  
     674(\np{ln\_zdfexp}\forcode{ = .true.}) there would be too restrictive a constraint on  
    688675the time step. Therefore, the default implicit time stepping is preferred  
    689676for the vertical diffusion since it overcomes the stability constraint.  
    690 A forward time differencing scheme (\forcode{ln_zdfexp = .true.}) using a time  
    691 splitting technique (\np{nn_zdfexp} $> 1$) is provided as an alternative.  
    692 Namelist variables \np{ln_zdfexp} and \np{nn_zdfexp} apply to both  
     677A forward time differencing scheme (\np{ln\_zdfexp}\forcode{ = .true.}) using a time  
     678splitting technique (\np{nn\_zdfexp} $> 1$) is provided as an alternative.  
     679Namelist variables \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both  
    693680tracers and dynamics.  
    694681 
     
    696683% External Forcing 
    697684% ================================================================ 
    698 \section{External Forcing} 
     685\section{External forcing} 
    699686\label{TRA_sbc_qsr_bbc} 
    700687 
     
    702689%        surface boundary condition 
    703690% ------------------------------------------------------------------------------------------------------------- 
    704 \subsection   [Surface boundary condition (\textit{trasbc})] 
    705          {Surface boundary condition (\protect\mdl{trasbc})} 
     691\subsection{Surface boundary condition (\protect\mdl{trasbc})} 
    706692\label{TRA_sbc} 
    707693 
     
    750736divergence of odd and even time step (see \S\ref{STP}). 
    751737 
    752 In the linear free surface case (\np{ln_linssh}~=~\textit{true}),  
     738In the linear free surface case (\np{ln\_linssh}\forcode{ = .true.}),  
    753739an additional term has to be added on both temperature and salinity.  
    754740On temperature, this term remove the heat content associated with mass exchange 
     
    773759%        Solar Radiation Penetration  
    774760% ------------------------------------------------------------------------------------------------------------- 
    775 \subsection   [Solar Radiation Penetration (\textit{traqsr})] 
    776          {Solar Radiation Penetration (\protect\mdl{traqsr})} 
     761\subsection{Solar radiation penetration (\protect\mdl{traqsr})} 
    777762\label{TRA_qsr} 
    778763%--------------------------------------------namqsr-------------------------------------------------------- 
     
    781766 
    782767Options are defined through the  \ngn{namtra\_qsr} namelist variables. 
    783 When the penetrative solar radiation option is used (\forcode{ln_flxqsr = .true.}),  
     768When the penetrative solar radiation option is used (\np{ln\_flxqsr}\forcode{ = .true.}),  
    784769the solar radiation penetrates the top few tens of meters of the ocean. If it is not used  
    785 (\forcode{ln_flxqsr = .false.}) all the heat flux is absorbed in the first ocean level.  
     770(\np{ln\_flxqsr}\forcode{ = .false.}) all the heat flux is absorbed in the first ocean level.  
    786771Thus, in the former case a term is added to the time evolution equation of  
    787772temperature \eqref{Eq_PE_tra_T} and the surface boundary condition is  
     
    805790wavelengths contribute to heating the upper few tens of centimetres. The fraction of $Q_{sr}$  
    806791that resides in these almost non-penetrative wavebands, $R$, is $\sim 58\%$ (specified  
    807 through namelist parameter \np{rn_abs}).  It is assumed to penetrate the ocean  
     792through namelist parameter \np{rn\_abs}).  It is assumed to penetrate the ocean  
    808793with a decreasing exponential profile, with an e-folding depth scale, $\xi_0$,  
    809 of a few tens of centimetres (typically $\xi_0=0.35~m$ set as \np{rn_si0} in the namtra\_qsr namelist). 
     794of a few tens of centimetres (typically $\xi_0=0.35~m$ set as \np{rn\_si0} in the namtra\_qsr namelist). 
    810795For shorter wavelengths (400-700~nm), the ocean is more transparent, and solar energy  
    811796propagates to larger depths where it contributes to  
    812797local heating.  
    813798The way this second part of the solar energy penetrates into the ocean depends on  
    814 which formulation is chosen. In the simple 2-waveband light penetration scheme  (\forcode{ln_qsr_2bd = .true.})  
     799which formulation is chosen. In the simple 2-waveband light penetration scheme  (\np{ln\_qsr\_2bd}\forcode{ = .true.})  
    815800a chlorophyll-independent monochromatic formulation is chosen for the shorter wavelengths,  
    816801leading to the following expression  \citep{Paulson1977}: 
     
    819804\end{equation} 
    820805where $\xi_1$ is the second extinction length scale associated with the shorter wavelengths.   
    821 It is usually chosen to be 23~m by setting the \np{rn_si0} namelist parameter.  
     806It is usually chosen to be 23~m by setting the \np{rn\_si0} namelist parameter.  
    822807The set of default values ($\xi_0$, $\xi_1$, $R$) corresponds to a Type I water in  
    823808Jerlov's (1968) classification (oligotrophic waters). 
     
    839824computational efficiency. The 2-bands formulation does not reproduce the full model very well.  
    840825 
    841 The RGB formulation is used when \forcode{ln_qsr_rgb = .true.}. The RGB attenuation coefficients 
     826The RGB formulation is used when \np{ln\_qsr\_rgb}\forcode{ = .true.}. The RGB attenuation coefficients 
    842827($i.e.$ the inverses of the extinction length scales) are tabulated over 61 nonuniform  
    843828chlorophyll classes ranging from 0.01 to 10 g.Chl/L (see the routine \rou{trc\_oce\_rgb}  
    844829in \mdl{trc\_oce} module). Four types of chlorophyll can be chosen in the RGB formulation: 
    845830\begin{description}  
    846 \item[\forcode{nn_chdta = 0}]  
     831\item[\np{nn\_chdta}\forcode{ = 0}]  
    847832a constant 0.05 g.Chl/L value everywhere ;  
    848 \item[\forcode{nn_chdta = 1}]   
     833\item[\np{nn\_chdta}\forcode{ = 1}]   
    849834an observed time varying chlorophyll deduced from satellite surface ocean color measurement  
    850835spread uniformly in the vertical direction ;  
    851 \item[\forcode{nn_chdta = 2}]   
     836\item[\np{nn\_chdta}\forcode{ = 2}]   
    852837same as previous case except that a vertical profile of chlorophyl is used.  
    853838Following \cite{Morel_Berthon_LO89}, the profile is computed from the local surface chlorophyll value ; 
    854 \item[\forcode{ln_qsr_bio = .true.}]   
     839\item[\np{ln\_qsr\_bio}\forcode{ = .true.}]   
    855840simulated time varying chlorophyll by TOP biogeochemical model.  
    856841In this case, the RGB formulation is used to calculate both the phytoplankton  
     
    884869%        Bottom Boundary Condition 
    885870% ------------------------------------------------------------------------------------------------------------- 
    886 \subsection   [Bottom Boundary Condition (\textit{trabbc})] 
    887          {Bottom Boundary Condition (\protect\mdl{trabbc})} 
     871\subsection{Bottom boundary condition (\protect\mdl{trabbc})} 
    888872\label{TRA_bbc} 
    889873%--------------------------------------------nambbc-------------------------------------------------------- 
     
    913897Options are defined through the  \ngn{namtra\_bbc} namelist variables. 
    914898The presence of geothermal heating is controlled by setting the namelist  
    915 parameter  \np{ln_trabbc} to true. Then, when \np{nn_geoflx} is set to 1,  
     899parameter  \np{ln\_trabbc} to true. Then, when \np{nn\_geoflx} is set to 1,  
    916900a constant geothermal heating is introduced whose value is given by the  
    917 \np{nn_geoflx_cst}, which is also a namelist parameter.  
    918 When  \np{nn_geoflx} is set to 2, a spatially varying geothermal heat flux is  
     901\np{nn\_geoflx\_cst}, which is also a namelist parameter.  
     902When  \np{nn\_geoflx} is set to 2, a spatially varying geothermal heat flux is  
    919903introduced which is provided in the \ifile{geothermal\_heating} NetCDF file  
    920904(Fig.\ref{Fig_geothermal}) \citep{Emile-Geay_Madec_OS09}. 
     
    923907% Bottom Boundary Layer 
    924908% ================================================================ 
    925 \section  [Bottom Boundary Layer (\protect\mdl{trabbl} - \protect\key{trabbl})] 
    926       {Bottom Boundary Layer (\protect\mdl{trabbl} - \protect\key{trabbl})} 
     909\section{Bottom boundary layer (\protect\mdl{trabbl} - \protect\key{trabbl})} 
    927910\label{TRA_bbl} 
    928911%--------------------------------------------nambbl--------------------------------------------------------- 
     
    959942%        Diffusive BBL 
    960943% ------------------------------------------------------------------------------------------------------------- 
    961 \subsection{Diffusive Bottom Boundary layer (\protect\forcode{nn_bbl_ldf = 1})} 
     944\subsection{Diffusive bottom boundary layer (\protect\np{nn\_bbl\_ldf}\forcode{ = 1})} 
    962945\label{TRA_bbl_diff} 
    963946 
    964 When applying sigma-diffusion (\key{trabbl} defined and \np{nn_bbl_ldf} set to 1),  
     947When applying sigma-diffusion (\key{trabbl} defined and \np{nn\_bbl\_ldf} set to 1),  
    965948the diffusive flux between two adjacent cells at the ocean floor is given by  
    966949\begin{equation} \label{Eq_tra_bbl_diff} 
     
    978961\end{equation}  
    979962where $A_{bbl}$ is the BBL diffusivity coefficient, given by the namelist  
    980 parameter \np{rn_ahtbbl} and usually set to a value much larger  
     963parameter \np{rn\_ahtbbl} and usually set to a value much larger  
    981964than the one used for lateral mixing in the open ocean. The constraint in \eqref{Eq_tra_bbl_coef}  
    982965implies that sigma-like diffusion only occurs when the density above the sea floor, at the top of  
     
    994977%        Advective BBL 
    995978% ------------------------------------------------------------------------------------------------------------- 
    996 \subsection   {Advective Bottom Boundary Layer  (\protect\np{nn_bbl_adv}= 1 or 2)} 
     979\subsection{Advective bottom boundary layer  (\protect\np{nn\_bbl\_adv}\forcode{ = 1..2})} 
    997980\label{TRA_bbl_adv} 
    998981 
     
    10221005%%%gmcomment   :  this section has to be really written 
    10231006 
    1024 When applying an advective BBL (\np{nn_bbl_adv} = 1 or 2), an overturning  
     1007When applying an advective BBL (\np{nn\_bbl\_adv}\forcode{ = 1..2}), an overturning  
    10251008circulation is added which connects two adjacent bottom grid-points only if dense  
    10261009water overlies less dense water on the slope. The density difference causes dense  
    10271010water to move down the slope.  
    10281011 
    1029 \np{nn_bbl_adv} = 1 : the downslope velocity is chosen to be the Eulerian 
     1012\np{nn\_bbl\_adv}\forcode{ = 1} : the downslope velocity is chosen to be the Eulerian 
    10301013ocean velocity just above the topographic step (see black arrow in Fig.\ref{Fig_bbl})  
    10311014\citep{Beckmann_Doscher1997}. It is a \textit{conditional advection}, that is, advection 
     
    10341017greater depth ($i.e.$ $\vect{U}  \cdot  \nabla H>0$). 
    10351018 
    1036 \np{nn_bbl_adv} = 2 : the downslope velocity is chosen to be proportional to $\Delta \rho$, 
     1019\np{nn\_bbl\_adv}\forcode{ = 2} : the downslope velocity is chosen to be proportional to $\Delta \rho$, 
    10371020the density difference between the higher cell and lower cell densities \citep{Campin_Goosse_Tel99}. 
    10381021The advection is allowed only  if dense water overlies less dense water on the slope ($i.e.$  
     
    10441027\end{equation} 
    10451028where $\gamma$, expressed in seconds, is the coefficient of proportionality  
    1046 provided as \np{rn_gambbl}, a namelist parameter, and \textit{kup} and \textit{kdwn}  
     1029provided as \np{rn\_gambbl}, a namelist parameter, and \textit{kup} and \textit{kdwn}  
    10471030are the vertical index of the higher and lower cells, respectively. 
    10481031The parameter $\gamma$ should take a different value for each bathymetric  
     
    10831066% Tracer damping 
    10841067% ================================================================ 
    1085 \section  [Tracer damping (\textit{tradmp})] 
    1086       {Tracer damping (\protect\mdl{tradmp})} 
     1068\section{Tracer damping (\protect\mdl{tradmp})} 
    10871069\label{TRA_dmp} 
    10881070%--------------------------------------------namtra_dmp------------------------------------------------- 
     
    11011083are given temperature and salinity fields (usually a climatology).  
    11021084Options are defined through the  \ngn{namtra\_dmp} namelist variables. 
    1103 The restoring term is added when the namelist parameter \np{ln_tradmp} is set to true.  
    1104 It also requires that both \np{ln_tsd_init} and \np{ln_tsd_tradmp} are set to true 
    1105 in \textit{namtsd} namelist as well as \np{sn_tem} and \np{sn_sal} structures are  
     1085The restoring term is added when the namelist parameter \np{ln\_tradmp} is set to true.  
     1086It also requires that both \np{ln\_tsd\_init} and \np{ln\_tsd\_tradmp} are set to true 
     1087in \textit{namtsd} namelist as well as \np{sn\_tem} and \np{sn\_sal} structures are  
    11061088correctly set  ($i.e.$ that $T_o$ and $S_o$ are provided in input files and read  
    11071089using \mdl{fldread}, see \S\ref{SBC_fldread}).  
    1108 The restoring coefficient $\gamma$ is a three-dimensional array read in during the \rou{tra\_dmp\_init} routine. The file name is specified by the namelist variable \np{cn_resto}. The DMP\_TOOLS tool is provided to allow users to generate the netcdf file. 
     1090The restoring coefficient $\gamma$ is a three-dimensional array read in during the \rou{tra\_dmp\_init} routine. The file name is specified by the namelist variable \np{cn\_resto}. The DMP\_TOOLS tool is provided to allow users to generate the netcdf file. 
    11091091 
    11101092The two main cases in which \eqref{Eq_tra_dmp} is used are \textit{(a)}  
     
    11281110by stabilising the water column too much. 
    11291111 
    1130 The namelist parameter \np{nn_zdmp} sets whether the damping should be applied in the whole water column or only below the mixed layer (defined either on a density or $S_o$ criterion). It is common to set the damping to zero in the mixed layer as the adjustment time scale is short here \citep{Madec_al_JPO96}. 
    1131  
    1132 \subsection[DMP\_TOOLS]{Generating \ifile{resto} using DMP\_TOOLS} 
     1112The namelist parameter \np{nn\_zdmp} sets whether the damping should be applied in the whole water column or only below the mixed layer (defined either on a density or $S_o$ criterion). It is common to set the damping to zero in the mixed layer as the adjustment time scale is short here \citep{Madec_al_JPO96}. 
     1113 
     1114\subsection{Generating \ifile{resto} using DMP\_TOOLS} 
    11331115 
    11341116DMP\_TOOLS can be used to generate a netcdf file containing the restoration coefficient $\gamma$.  
    11351117Note that in order to maintain bit comparison with previous NEMO versions DMP\_TOOLS must be compiled  
    11361118and run on the same machine as the NEMO model. A \ifile{mesh\_mask} file for the model configuration is required as an input.  
    1137 This can be generated by carrying out a short model run with the namelist parameter \np{nn_msh} set to 1.  
    1138 The namelist parameter \np{ln_tradmp} will also need to be set to .false. for this to work.  
     1119This can be generated by carrying out a short model run with the namelist parameter \np{nn\_msh} set to 1.  
     1120The namelist parameter \np{ln\_tradmp} will also need to be set to .false. for this to work.  
    11391121The \nl{nam\_dmp\_create} namelist in the DMP\_TOOLS directory is used to specify options for the restoration coefficient. 
    11401122 
     
    11431125%------------------------------------------------------------------------------------------------------- 
    11441126 
    1145 \np{cp_cfg}, \np{cp_cpz}, \np{jp_cfg} and \np{jperio} specify the model configuration being used and should be the same as specified in \nl{namcfg}. The variable \nl{lzoom} is used to specify that the damping is being used as in case \textit{a} above to provide boundary conditions to a zoom configuration. In the case of the arctic or antarctic zoom configurations this includes some specific treatment. Otherwise damping is applied to the 6 grid points along the ocean boundaries. The open boundaries are specified by the variables \np{lzoom_n}, \np{lzoom_e}, \np{lzoom_s}, \np{lzoom_w} in the \nl{nam\_zoom\_dmp} name list. 
     1127\np{cp\_cfg}, \np{cp\_cpz}, \np{jp\_cfg} and \np{jperio} specify the model configuration being used and should be the same as specified in \nl{namcfg}. The variable \nl{lzoom} is used to specify that the damping is being used as in case \textit{a} above to provide boundary conditions to a zoom configuration. In the case of the arctic or antarctic zoom configurations this includes some specific treatment. Otherwise damping is applied to the 6 grid points along the ocean boundaries. The open boundaries are specified by the variables \np{lzoom\_n}, \np{lzoom\_e}, \np{lzoom\_s}, \np{lzoom\_w} in the \nl{nam\_zoom\_dmp} name list. 
    11461128 
    11471129The remaining switch namelist variables determine the spatial variation of the restoration coefficient in non-zoom configurations.  
    1148 \np{ln_full_field} specifies that newtonian damping should be applied to the whole model domain.  
    1149 \np{ln_med_red_seas} specifies grid specific restoration coefficients in the Mediterranean Sea  
     1130\np{ln\_full\_field} specifies that newtonian damping should be applied to the whole model domain.  
     1131\np{ln\_med\_red\_seas} specifies grid specific restoration coefficients in the Mediterranean Sea  
    11501132for the ORCA4, ORCA2 and ORCA05 configurations.  
    1151 If \np{ln_old_31_lev_code} is set then the depth variation of the coeffients will be specified as  
     1133If \np{ln\_old\_31\_lev\_code} is set then the depth variation of the coeffients will be specified as  
    11521134a function of the model number. This option is included to allow backwards compatability of the ORCA2 reference  
    11531135configurations with previous model versions.  
    1154 \np{ln_coast} specifies that the restoration coefficient should be reduced near to coastlines.  
    1155 This option only has an effect if \np{ln_full_field} is true.  
    1156 \np{ln_zero_top_layer} specifies that the restoration coefficient should be zero in the surface layer.  
    1157 Finally \np{ln_custom} specifies that the custom module will be called.  
     1136\np{ln\_coast} specifies that the restoration coefficient should be reduced near to coastlines.  
     1137This option only has an effect if \np{ln\_full\_field} is true.  
     1138\np{ln\_zero\_top\_layer} specifies that the restoration coefficient should be zero in the surface layer.  
     1139Finally \np{ln\_custom} specifies that the custom module will be called.  
    11581140This module is contained in the file custom.F90 and can be edited by users. For example damping could be applied in a specific region. 
    11591141 
    1160 The restoration coefficient can be set to zero in equatorial regions by specifying a positive value of \np{nn_hdmp}.  
     1142The restoration coefficient can be set to zero in equatorial regions by specifying a positive value of \np{nn\_hdmp}.  
    11611143Equatorward of this latitude the restoration coefficient will be zero with a smooth transition to  
    11621144the full values of a 10\deg latitud band.  
    11631145This is often used because of the short adjustment time scale in the equatorial region  
    11641146\citep{Reverdin1991, Fujio1991, Marti_PhD92}. The time scale associated with the damping depends on the depth as a  
    1165 hyperbolic tangent, with \np{rn_surf} as surface value, \np{rn_bot} as bottom value and a transition depth of \np{rn_dep}.   
     1147hyperbolic tangent, with \np{rn\_surf} as surface value, \np{rn\_bot} as bottom value and a transition depth of \np{rn\_dep}.   
    11661148 
    11671149% ================================================================ 
    11681150% Tracer time evolution 
    11691151% ================================================================ 
    1170 \section  [Tracer time evolution (\textit{tranxt})] 
    1171       {Tracer time evolution (\protect\mdl{tranxt})} 
     1152\section{Tracer time evolution (\protect\mdl{tranxt})} 
    11721153\label{TRA_nxt} 
    11731154%--------------------------------------------namdom----------------------------------------------------- 
     
    11911172the subscript $f$ denotes filtered values, $\gamma$ is the Asselin coefficient, 
    11921173and $S$ is the total forcing applied on $T$ ($i.e.$ fluxes plus content in mass exchanges).  
    1193 $\gamma$ is initialized as \np{rn_atfp} (\textbf{namelist} parameter).  
    1194 Its default value is \np{rn_atfp}=$10^{-3}$. Note that the forcing correction term in the filter 
    1195 is not applied in linear free surface (\jp{lk\_vvl}=false) (see \S\ref{TRA_sbc}. 
     1174$\gamma$ is initialized as \np{rn\_atfp} (\textbf{namelist} parameter).  
     1175Its default value is \np{rn\_atfp}\forcode{ = 10.e-3}. Note that the forcing correction term in the filter 
     1176is not applied in linear free surface (\jp{lk\_vvl}\forcode{ = .false.}) (see \S\ref{TRA_sbc}. 
    11961177Not also that in constant volume case, the time stepping is performed on $T$,  
    11971178not on its content, $e_{3t}T$. 
     
    12071188% Equation of State (eosbn2)  
    12081189% ================================================================ 
    1209 \section  [Equation of State (\textit{eosbn2}) ] 
    1210       {Equation of State (\protect\mdl{eosbn2}) } 
     1190\section{Equation of state (\protect\mdl{eosbn2}) } 
    12111191\label{TRA_eosbn2} 
    12121192%--------------------------------------------nameos----------------------------------------------------- 
     
    12171197%        Equation of State 
    12181198% ------------------------------------------------------------------------------------------------------------- 
    1219 \subsection{Equation Of Seawater (\protect\np{nn_eos} = -1, 0, or 1)} 
     1199\subsection{Equation of seawater (\protect\np{nn\_eos}\forcode{ = -1..1})} 
    12201200\label{TRA_eos} 
    12211201 
     
    12481228density in the World Ocean varies by no more than 2$\%$ from that value \citep{Gill1982}. 
    12491229 
    1250 Options are defined through the  \ngn{nameos} namelist variables, and in particular \np{nn_eos}  
    1251 which controls the EOS used (=-1 for TEOS10 ; =0 for EOS-80 ; =1 for S-EOS). 
     1230Options are defined through the  \ngn{nameos} namelist variables, and in particular \np{nn\_eos}  
     1231which controls the EOS used (\forcode{= -1} for TEOS10 ; \forcode{= 0} for EOS-80 ; \forcode{= 1} for S-EOS). 
    12521232\begin{description} 
    12531233 
    1254 \item[\np{nn_eos}$=-1$] the polyTEOS10-bsq equation of seawater \citep{Roquet_OM2015} is used.   
     1234\item[\np{nn\_eos}\forcode{ = -1}] the polyTEOS10-bsq equation of seawater \citep{Roquet_OM2015} is used.   
    12551235The accuracy of this approximation is comparable to the TEOS-10 rational function approximation,  
    12561236but it is optimized for a boussinesq fluid and the polynomial expressions have simpler  
     
    12681248$\Theta$ and $S_A$. In particular, the initial state deined by the user have to be given as  
    12691249\textit{Conservative} Temperature and \textit{Absolute} Salinity.  
    1270 In addition, setting \np{ln_useCT} to \textit{true} convert the Conservative SST to potential SST  
     1250In addition, setting \np{ln\_useCT} to \forcode{.true.} convert the Conservative SST to potential SST  
    12711251prior to either computing the air-sea and ice-sea fluxes (forced mode)  
    12721252or sending the SST field to the atmosphere (coupled mode). 
    12731253 
    1274 \item[\np{nn_eos}$=0$] the polyEOS80-bsq equation of seawater is used. 
     1254\item[\np{nn\_eos}\forcode{ = 0}] the polyEOS80-bsq equation of seawater is used. 
    12751255It takes the same polynomial form as the polyTEOS10, but the coefficients have been optimized  
    12761256to accurately fit EOS80 (Roquet, personal comm.). The state variables used in both the EOS80  
     
    12831263value, the TEOS10 value.  
    12841264  
    1285 \item[\np{nn_eos}$=1$] a simplified EOS (S-EOS) inspired by \citet{Vallis06} is chosen,  
     1265\item[\np{nn\_eos}\forcode{ = 1}] a simplified EOS (S-EOS) inspired by \citet{Vallis06} is chosen,  
    12861266the coefficients of which has been optimized to fit the behavior of TEOS10 (Roquet, personal comm.)  
    12871267(see also \citet{Roquet_JPO2015}). It provides a simplistic linear representation of both  
     
    13151295\hline 
    13161296coeff.   & computer name   & S-EOS     &  description                      \\ \hline 
    1317 $a_0$       & \np{rn_a0}     & 1.6550 $10^{-1}$ &  linear thermal expansion coeff.  \\ \hline 
    1318 $b_0$       & \np{rn_b0}      & 7.6554 $10^{-1}$ &  linear haline  expansion coeff.    \\ \hline 
    1319 $\lambda_1$ & \np{rn_lambda1}& 5.9520 $10^{-2}$ &  cabbeling coeff. in $T^2$        \\ \hline 
    1320 $\lambda_2$ & \np{rn_lambda2}& 5.4914 $10^{-4}$ &  cabbeling coeff. in $S^2$        \\ \hline 
    1321 $\nu$       & \np{rn_nu}     & 2.4341 $10^{-3}$ &  cabbeling coeff. in $T \, S$     \\ \hline 
    1322 $\mu_1$     & \np{rn_mu1}  & 1.4970 $10^{-4}$ &  thermobaric coeff. in T         \\ \hline 
    1323 $\mu_2$     & \np{rn_mu2}  & 1.1090 $10^{-5}$ &  thermobaric coeff. in S            \\ \hline 
     1297$a_0$       & \np{rn\_a0}     & 1.6550 $10^{-1}$ &  linear thermal expansion coeff.    \\ \hline 
     1298$b_0$       & \np{rn\_b0}     & 7.6554 $10^{-1}$ &  linear haline  expansion coeff.    \\ \hline 
     1299$\lambda_1$ & \np{rn\_lambda1}& 5.9520 $10^{-2}$ &  cabbeling coeff. in $T^2$          \\ \hline 
     1300$\lambda_2$ & \np{rn\_lambda2}& 5.4914 $10^{-4}$ &  cabbeling coeff. in $S^2$       \\ \hline 
     1301$\nu$       & \np{rn\_nu}     & 2.4341 $10^{-3}$ &  cabbeling coeff. in $T \, S$       \\ \hline 
     1302$\mu_1$     & \np{rn\_mu1}    & 1.4970 $10^{-4}$ &  thermobaric coeff. in T         \\ \hline 
     1303$\mu_2$     & \np{rn\_mu2}    & 1.1090 $10^{-5}$ &  thermobaric coeff. in S            \\ \hline 
    13241304\end{tabular} 
    13251305\caption{ \protect\label{Tab_SEOS} 
     
    13331313%        Brunt-V\"{a}is\"{a}l\"{a} Frequency 
    13341314% ------------------------------------------------------------------------------------------------------------- 
    1335 \subsection{Brunt-V\"{a}is\"{a}l\"{a} Frequency (\protect\np{nn_eos} = 0, 1 or 2)} 
     1315\subsection{Brunt-V\"{a}is\"{a}l\"{a} frequency (\protect\np{nn\_eos}\forcode{ = 0..2})} 
    13361316\label{TRA_bn2} 
    13371317 
     
    13551335%        Freezing Point of Seawater 
    13561336% ------------------------------------------------------------------------------------------------------------- 
    1357 \subsection   [Freezing Point of Seawater] 
    1358          {Freezing Point of Seawater} 
     1337\subsection{Freezing point of seawater} 
    13591338\label{TRA_fzp} 
    13601339 
     
    13881367% Horizontal Derivative in zps-coordinate  
    13891368% ================================================================ 
    1390 \section  [Horizontal Derivative in \textit{zps}-coordinate (\textit{zpshde})] 
    1391       {Horizontal Derivative in \textit{zps}-coordinate (\protect\mdl{zpshde})} 
     1369\section{Horizontal derivative in \textit{zps}-coordinate (\protect\mdl{zpshde})} 
    13921370\label{TRA_zpshde} 
    13931371 
     
    13951373                   I've changed "derivative" to "difference" and "mean" to "average"} 
    13961374 
    1397 With partial cells (\forcode{ln_zps = .true.}) at bottom and top (\forcode{ln_isfcav = .true.}), in general,  
     1375With partial cells (\np{ln\_zps}\forcode{ = .true.}) at bottom and top (\np{ln\_isfcav}\forcode{ = .true.}), in general,  
    13981376tracers in horizontally adjacent cells live at different depths.  
    13991377Horizontal gradients of tracers are needed for horizontal diffusion (\mdl{traldf} module)  
    14001378and the hydrostatic pressure gradient calculations (\mdl{dynhpg} module).  
    1401 The partial cell properties at the top (\forcode{ln_isfcav = .true.}) are computed in the same way as for the bottom.  
     1379The partial cell properties at the top (\np{ln\_isfcav}\forcode{ = .true.}) are computed in the same way as for the bottom.  
    14021380So, only the bottom interpolation is explained below. 
    14031381 
     
    14131391\caption{   \protect\label{Fig_Partial_step_scheme}  
    14141392Discretisation of the horizontal difference and average of tracers in the $z$-partial  
    1415 step coordinate (\protect\forcode{ln_zps = .true.}) in the case $( e3w_k^{i+1} - e3w_k^i  )>0$.  
     1393step coordinate (\np{ln\_zps}\forcode{ = .true.}) in the case $( e3w_k^{i+1} - e3w_k^i  )>0$.  
    14161394A linear interpolation is used to estimate $\widetilde{T}_k^{i+1}$, the tracer value  
    14171395at the depth of the shallower tracer point of the two adjacent bottom $T$-points.  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_ZDF.tex

    r9392 r9393  
    1818% Vertical Mixing 
    1919% ================================================================ 
    20 \section{Vertical Mixing} 
     20\section{Vertical mixing} 
    2121\label{ZDF_zdf} 
    2222 
     
    4242general trend in the \mdl{dynzdf} and \mdl{trazdf} modules, respectively.  
    4343These trends can be computed using either a forward time stepping scheme  
    44 (namelist parameter \forcode{ln_zdfexp = .true.}) or a backward time stepping  
    45 scheme (\forcode{ln_zdfexp = .false.}) depending on the magnitude of the mixing  
     44(namelist parameter \np{ln\_zdfexp}\forcode{ = .true.}) or a backward time stepping  
     45scheme (\np{ln\_zdfexp}\forcode{ = .false.}) depending on the magnitude of the mixing  
    4646coefficients, and thus of the formulation used (see \S\ref{STP}). 
    4747 
     
    6565\end{align*} 
    6666 
    67 These values are set through the \np{rn_avm0} and \np{rn_avt0} namelist parameters.  
     67These values are set through the \np{rn\_avm0} and \np{rn\_avt0} namelist parameters.  
    6868In all cases, do not use values smaller that those associated with the molecular  
    6969viscosity and diffusivity, that is $\sim10^{-6}~m^2.s^{-1}$ for momentum,  
     
    7474%        Richardson Number Dependent 
    7575% ------------------------------------------------------------------------------------------------------------- 
    76 \subsection{Richardson Number Dependent (\protect\key{zdfric})} 
     76\subsection{Richardson number dependent (\protect\key{zdfric})} 
    7777\label{ZDF_ric} 
    7878 
     
    103103is the maximum value that can be reached by the coefficient when $Ri\leq 0$,  
    104104$a=5$ and $n=2$. The last three values can be modified by setting the  
    105 \np{rn_avmri}, \np{rn_alp} and \np{nn_ric} namelist parameters, respectively. 
     105\np{rn\_avmri}, \np{rn\_alp} and \np{nn\_ric} namelist parameters, respectively. 
    106106 
    107107A simple mixing-layer model to transfer and dissipate the atmospheric 
    108108 forcings (wind-stress and buoyancy fluxes) can be activated setting  
    109 the \np{ln_mldw} =.true. in the namelist. 
     109the \np{ln\_mldw}\forcode{ = .true.} in the namelist. 
    110110 
    111111In this case, the local depth of turbulent wind-mixing or "Ekman depth" 
     
    125125 
    126126is computed from the wind stress vector $|\tau|$ and the reference density $ \rho_o$. 
    127 The final $h_{e}$ is further constrained by the adjustable bounds \np{rn_mldmin} and \np{rn_mldmax}. 
     127The final $h_{e}$ is further constrained by the adjustable bounds \np{rn\_mldmin} and \np{rn\_mldmax}. 
    128128Once $h_{e}$ is computed, the vertical eddy coefficients within $h_{e}$ are set to  
    129 the empirical values \np{rn_wtmix} and \np{rn_wvmix} \citep{Lermusiaux2001}. 
     129the empirical values \np{rn\_wtmix} and \np{rn\_wvmix} \citep{Lermusiaux2001}. 
    130130 
    131131% ------------------------------------------------------------------------------------------------------------- 
    132132%        TKE Turbulent Closure Scheme  
    133133% ------------------------------------------------------------------------------------------------------------- 
    134 \subsection{TKE Turbulent Closure Scheme (\protect\key{zdftke})} 
     134\subsection{TKE turbulent closure scheme (\protect\key{zdftke})} 
    135135\label{ZDF_tke} 
    136136 
     
    170170and diffusivity coefficients. The constants $C_k =  0.1$ and $C_\epsilon = \sqrt {2} /2$   
    171171$\approx 0.7$ are designed to deal with vertical mixing at any depth \citep{Gaspar1990}.  
    172 They are set through namelist parameters \np{nn_ediff} and \np{nn_ediss}.  
     172They are set through namelist parameters \np{nn\_ediff} and \np{nn\_ediss}.  
    173173$P_{rt}$ can be set to unity or, following \citet{Blanke1993}, be a function  
    174174of the local Richardson number, $R_i$: 
     
    181181\end{align*} 
    182182Options are defined through the  \ngn{namzdfy\_tke} namelist variables. 
    183 The choice of $P_{rt}$ is controlled by the \np{nn_pdl} namelist variable. 
     183The choice of $P_{rt}$ is controlled by the \np{nn\_pdl} namelist variable. 
    184184 
    185185At the sea surface, the value of $\bar{e}$ is prescribed from the wind  
    186 stress field as $\bar{e}_o = e_{bb} |\tau| / \rho_o$, with $e_{bb}$ the \np{rn_ebb}  
     186stress field as $\bar{e}_o = e_{bb} |\tau| / \rho_o$, with $e_{bb}$ the \np{rn\_ebb}  
    187187namelist parameter. The default value of $e_{bb}$ is 3.75. \citep{Gaspar1990}),  
    188188however a much larger value can be used when taking into account the  
     
    191191The time integration of the $\bar{e}$ equation may formally lead to negative values  
    192192because the numerical scheme does not ensure its positivity. To overcome this  
    193 problem, a cut-off in the minimum value of $\bar{e}$ is used (\np{rn_emin}  
     193problem, a cut-off in the minimum value of $\bar{e}$ is used (\np{rn\_emin}  
    194194namelist parameter). Following \citet{Gaspar1990}, the cut-off value is set  
    195195to $\sqrt{2}/2~10^{-6}~m^2.s^{-2}$. This allows the subsequent formulations  
     
    199199instabilities associated with too weak vertical diffusion. They must be  
    200200specified at least larger than the molecular values, and are set through  
    201 \np{rn_avm0} and \np{rn_avt0} (namzdf namelist, see \S\ref{ZDF_cst}). 
     201\np{rn\_avm0} and \np{rn\_avt0} (namzdf namelist, see \S\ref{ZDF_cst}). 
    202202 
    203203\subsubsection{Turbulent length scale} 
    204204For computational efficiency, the original formulation of the turbulent length  
    205205scales proposed by \citet{Gaspar1990} has been simplified. Four formulations  
    206 are proposed, the choice of which is controlled by the \np{nn_mxl} namelist  
     206are proposed, the choice of which is controlled by the \np{nn\_mxl} namelist  
    207207parameter. The first two are based on the following first order approximation  
    208208\citep{Blanke1993}: 
     
    212212which is valid in a stable stratified region with constant values of the Brunt- 
    213213Vais\"{a}l\"{a} frequency. The resulting length scale is bounded by the distance  
    214 to the surface or to the bottom (\np{nn_mxl} = 0) or by the local vertical scale factor  
    215 (\np{nn_mxl} = 1). \citet{Blanke1993} notice that this simplification has two major  
     214to the surface or to the bottom (\np{nn\_mxl}\forcode{ = 0}) or by the local vertical scale factor  
     215(\np{nn\_mxl}\forcode{ = 1}). \citet{Blanke1993} notice that this simplification has two major  
    216216drawbacks: it makes no sense for locally unstable stratification and the  
    217217computation no longer uses all the information contained in the vertical density  
    218218profile. To overcome these drawbacks, \citet{Madec1998} introduces the  
    219 \np{nn_mxl} = 2 or 3 cases, which add an extra assumption concerning the vertical  
     219\np{nn\_mxl}\forcode{ = 2..3} cases, which add an extra assumption concerning the vertical  
    220220gradient of the computed length scale. So, the length scales are first evaluated  
    221221as in \eqref{Eq_tke_mxl0_1} and then bounded such that: 
     
    253253$i.e.$ $l^{(k)} = \sqrt {2 {\bar e}^{(k)} / {N^2}^{(k)} }$. 
    254254 
    255 In the \np{nn_mxl}~=~2 case, the dissipation and mixing length scales take the same  
     255In the \np{nn\_mxl}\forcode{ = 2} case, the dissipation and mixing length scales take the same  
    256256value: $ l_k=  l_\epsilon = \min \left(\ l_{up} \;,\;  l_{dwn}\ \right)$, while in the  
    257 \np{nn_mxl}~=~3 case, the dissipation and mixing turbulent length scales are give  
     257\np{nn\_mxl}\forcode{ = 3} case, the dissipation and mixing turbulent length scales are give  
    258258as in \citet{Gaspar1990}: 
    259259\begin{equation} \label{Eq_tke_mxl_gaspar} 
     
    264264\end{equation} 
    265265 
    266 At the ocean surface, a non zero length scale is set through the  \np{rn_mxl0} namelist  
     266At the ocean surface, a non zero length scale is set through the  \np{rn\_mxl0} namelist  
    267267parameter. Usually the surface scale is given by $l_o = \kappa \,z_o$  
    268268where $\kappa = 0.4$ is von Karman's constant and $z_o$ the roughness  
    269269parameter of the surface. Assuming $z_o=0.1$~m \citep{Craig_Banner_JPO94}  
    270 leads to a 0.04~m, the default value of \np{rn_mxl0}. In the ocean interior  
     270leads to a 0.04~m, the default value of \np{rn\_mxl0}. In the ocean interior  
    271271a minimum length scale is set to recover the molecular viscosity when $\bar{e}$  
    272272reach its minimum value ($1.10^{-6}= C_k\, l_{min} \,\sqrt{\bar{e}_{min}}$ ). 
     
    296296citing observation evidence, and $\alpha_{CB} = 100$ the Craig and Banner's value. 
    297297As the surface boundary condition on TKE is prescribed through $\bar{e}_o = e_{bb} |\tau| / \rho_o$,  
    298 with $e_{bb}$ the \np{rn_ebb} namelist parameter, setting \np{rn_ebb}~=~67.83 corresponds  
    299 to $\alpha_{CB} = 100$. Further setting  \np{ln_mxl0} to true applies \eqref{ZDF_Lsbc}  
     298with $e_{bb}$ the \np{rn\_ebb} namelist parameter, setting \np{rn\_ebb}\forcode{ = 67.83} corresponds  
     299to $\alpha_{CB} = 100$. Further setting  \np{ln\_mxl0} to true applies \eqref{ZDF_Lsbc}  
    300300as surface boundary condition on length scale, with $\beta$ hard coded to the Stacey's value. 
    301 Note that a minimal threshold of \np{rn_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters)  
     301Note that a minimal threshold of \np{rn\_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters)  
    302302is applied on surface $\bar{e}$ value. 
    303303 
     
    317317of LC in an extra source terms of TKE, $P_{LC}$. 
    318318The presence of $P_{LC}$ in \eqref{Eq_zdftke_e}, the TKE equation, is controlled  
    319 by setting \np{ln_lc} to \textit{true} in the namtke namelist. 
     319by setting \np{ln\_lc} to \forcode{.true.} in the namtke namelist. 
    320320  
    321321By making an analogy with the characteristic convective velocity scale  
     
    343343where $c_{LC} = 0.15$ has been chosen by \citep{Axell_JGR02} as a good compromise  
    344344to fit LES data. The chosen value yields maximum vertical velocities $w_{LC}$ of the order  
    345 of a few centimeters per second. The value of $c_{LC}$ is set through the \np{rn_lc}  
     345of a few centimeters per second. The value of $c_{LC}$ is set through the \np{rn\_lc}  
    346346namelist parameter, having in mind that it should stay between 0.15 and 0.54 \citep{Axell_JGR02}.  
    347347 
     
    366366($i.e.$ near-inertial oscillations and ocean swells and waves). 
    367367 
    368 When using this parameterization ($i.e.$ when \np{nn_etau}~=~1), the TKE input to the ocean ($S$)  
     368When using this parameterization ($i.e.$ when \np{nn\_etau}\forcode{ = 1}), the TKE input to the ocean ($S$)  
    369369imposed by the winds in the form of near-inertial oscillations, swell and waves is parameterized  
    370370by \eqref{ZDF_Esbc} the standard TKE surface boundary condition, plus a depth depend one given by: 
     
    379379and $f_i$ is the ice concentration (no penetration if $f_i=1$, that is if the ocean is entirely  
    380380covered by sea-ice). 
    381 The value of $f_r$, usually a few percents, is specified through \np{rn_efr} namelist parameter.  
    382 The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np{nn_etau}~=~0)  
     381The value of $f_r$, usually a few percents, is specified through \np{rn\_efr} namelist parameter.  
     382The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np{nn\_etau}\forcode{ = 0})  
    383383or a latitude dependent value (varying from 0.5~m at the Equator to a maximum value of 30~m  
    384 at high latitudes (\np{nn_etau}~=~1).  
    385  
    386 Note that two other option existe, \np{nn_etau}~=~2, or 3. They correspond to applying  
     384at high latitudes (\np{nn\_etau}\forcode{ = 1}).  
     385 
     386Note that two other option existe, \np{nn\_etau}\forcode{ = 2..3}. They correspond to applying  
    387387\eqref{ZDF_Ehtau} only at the base of the mixed layer, or to using the high frequency part  
    388388of the stress to evaluate the fraction of TKE that penetrate the ocean.  
     
    508508%        GLS Generic Length Scale Scheme  
    509509% ------------------------------------------------------------------------------------------------------------- 
    510 \subsection{GLS Generic Length Scale (\protect\key{zdfgls})} 
     510\subsection{GLS: Generic Length Scale (\protect\key{zdfgls})} 
    511511\label{ZDF_gls} 
    512512 
     
    558558The constants $C_1$, $C_2$, $C_3$, ${\sigma_e}$, ${\sigma_{\psi}}$ and the wall function ($Fw$)  
    559559depends of the choice of the turbulence model. Four different turbulent models are pre-defined  
    560 (Tab.\ref{Tab_GLS}). They are made available through the \np{nn_clo} namelist parameter.  
     560(Tab.\ref{Tab_GLS}). They are made available through the \np{nn\_clo} namelist parameter.  
    561561 
    562562%--------------------------------------------------TABLE-------------------------------------------------- 
     
    567567%                        & \citep{Mellor_Yamada_1982} &  \citep{Rodi_1987}       & \citep{Wilcox_1988} &                 \\   
    568568\hline  \hline  
    569 \np{nn_clo}     & \textbf{0} &   \textbf{1}  &   \textbf{2}   &    \textbf{3}   \\   
     569\np{nn\_clo}     & \textbf{0} &   \textbf{1}  &   \textbf{2}   &    \textbf{3}   \\   
    570570\hline  
    571571$( p , n , m )$          &   ( 0 , 1 , 1 )   & ( 3 , 1.5 , -1 )   & ( -1 , 0.5 , -1 )    &  ( 2 , 1 , -0.67 )  \\ 
     
    581581\caption{   \protect\label{Tab_GLS}  
    582582Set of predefined GLS parameters, or equivalently predefined turbulence models available  
    583 with \protect\key{zdfgls} and controlled by the \protect\np{nn_clos} namelist variable in \protect\ngn{namzdf\_gls} .} 
     583with \protect\key{zdfgls} and controlled by the \protect\np{nn\_clos} namelist variable in \protect\ngn{namzdf\_gls} .} 
    584584\end{center}   \end{table} 
    585585%-------------------------------------------------------------------------------------------------------------- 
     
    589589value near physical boundaries (logarithmic boundary layer law). $C_{\mu}$ and $C_{\mu'}$  
    590590are calculated from stability function proposed by \citet{Galperin_al_JAS88}, or by \citet{Kantha_Clayson_1994}  
    591 or one of the two functions suggested by \citet{Canuto_2001}  (\np{nn_stab_func} = 0, 1, 2 or 3, resp.).  
     591or one of the two functions suggested by \citet{Canuto_2001}  (\np{nn\_stab\_func}\forcode{ = 0..3}, resp.).  
    592592The value of $C_{0\mu}$ depends of the choice of the stability function. 
    593593 
    594594The surface and bottom boundary condition on both $\bar{e}$ and $\psi$ can be calculated  
    595 thanks to Dirichlet or Neumann condition through \np{nn_tkebc_surf} and \np{nn_tkebc_bot}, resp.  
    596 As for TKE closure , the wave effect on the mixing is considered when \np{ln_crban}~=~true 
    597 \citep{Craig_Banner_JPO94, Mellor_Blumberg_JPO04}. The \np{rn_crban} namelist parameter  
    598 is $\alpha_{CB}$ in \eqref{ZDF_Esbc} and \np{rn_charn} provides the value of $\beta$ in \eqref{ZDF_Lsbc}.  
     595thanks to Dirichlet or Neumann condition through \np{nn\_tkebc\_surf} and \np{nn\_tkebc\_bot}, resp.  
     596As for TKE closure , the wave effect on the mixing is considered when \np{ln\_crban}\forcode{ = .true.} 
     597\citep{Craig_Banner_JPO94, Mellor_Blumberg_JPO04}. The \np{rn\_crban} namelist parameter  
     598is $\alpha_{CB}$ in \eqref{ZDF_Esbc} and \np{rn\_charn} provides the value of $\beta$ in \eqref{ZDF_Lsbc}.  
    599599 
    600600The $\psi$ equation is known to fail in stably stratified flows, and for this reason  
     
    606606stably stratified situations, and that its value has to be chosen in accordance  
    607607with the algebraic model for the turbulent fluxes. The clipping is only activated  
    608 if \forcode{ln_length_lim = .true.}, and the $c_{lim}$ is set to the \np{rn_clim_galp} value. 
     608if \np{ln\_length\_lim}\forcode{ = .true.}, and the $c_{lim}$ is set to the \np{rn\_clim\_galp} value. 
    609609 
    610610The time and space discretization of the GLS equations follows the same energetic  
     
    615615%        OSM OSMOSIS BL Scheme  
    616616% ------------------------------------------------------------------------------------------------------------- 
    617 \subsection{OSM OSMOSIS Boundary Layer scheme (\protect\key{zdfosm})} 
     617\subsection{OSM: OSMOSIS boundary layer scheme (\protect\key{zdfosm})} 
    618618\label{ZDF_osm} 
    619619 
     
    646646%       Non-Penetrative Convective Adjustment  
    647647% ------------------------------------------------------------------------------------------------------------- 
    648 \subsection   [Non-Penetrative Convective Adjustment (\protect\np{ln_tranpc}) ] 
    649          {Non-Penetrative Convective Adjustment (\protect\np{ln_tranpc}=.true.) } 
     648\subsection[Non-penetrative convective adjmt (\protect\np{ln\_tranpc}\forcode{ = .true.})] 
     649            {Non-penetrative convective adjustment (\protect\np{ln\_tranpc}\forcode{ = .true.})} 
    650650\label{ZDF_npc} 
    651651 
     
    671671 
    672672Options are defined through the  \ngn{namzdf} namelist variables. 
    673 The non-penetrative convective adjustment is used when \np{ln_zdfnpc}~=~\textit{true}.  
    674 It is applied at each \np{nn_npc} time step and mixes downwards instantaneously  
     673The non-penetrative convective adjustment is used when \np{ln\_zdfnpc}\forcode{ = .true.}.  
     674It is applied at each \np{nn\_npc} time step and mixes downwards instantaneously  
    675675the statically unstable portion of the water column, but only until the density  
    676676structure becomes neutrally stable ($i.e.$ until the mixed portion of the water  
     
    713713%       Enhanced Vertical Diffusion  
    714714% ------------------------------------------------------------------------------------------------------------- 
    715 \subsection   [Enhanced Vertical Diffusion (\protect\np{ln_zdfevd})] 
    716               {Enhanced Vertical Diffusion (\protect\forcode{ln_zdfevd = .true.})} 
     715\subsection{Enhanced vertical diffusion (\protect\np{ln\_zdfevd}\forcode{ = .true.})} 
    717716\label{ZDF_evd} 
    718717 
     
    722721 
    723722Options are defined through the  \ngn{namzdf} namelist variables. 
    724 The enhanced vertical diffusion parameterisation is used when \forcode{ln_zdfevd = .true.}.  
     723The enhanced vertical diffusion parameterisation is used when \np{ln\_zdfevd}\forcode{ = .true.}.  
    725724In this case, the vertical eddy mixing coefficients are assigned very large values  
    726725(a typical value is $10\;m^2s^{-1})$ in regions where the stratification is unstable  
    727726($i.e.$ when $N^2$ the Brunt-Vais\"{a}l\"{a} frequency is negative)  
    728727\citep{Lazar_PhD97, Lazar_al_JPO99}. This is done either on tracers only  
    729 (\forcode{nn_evdm = 0}) or on both momentum and tracers (\forcode{nn_evdm = 1}). 
     728(\np{nn\_evdm}\forcode{ = 0}) or on both momentum and tracers (\np{nn\_evdm}\forcode{ = 1}). 
    730729 
    731730In practice, where $N^2\leq 10^{-12}$, $A_T^{vT}$ and $A_T^{vS}$, and  
    732 if \forcode{nn_evdm = 1}, the four neighbouring $A_u^{vm} \;\mbox{and}\;A_v^{vm}$  
    733 values also, are set equal to the namelist parameter \np{rn_avevd}. A typical value  
     731if \np{nn\_evdm}\forcode{ = 1}, the four neighbouring $A_u^{vm} \;\mbox{and}\;A_v^{vm}$  
     732values also, are set equal to the namelist parameter \np{rn\_avevd}. A typical value  
    734733for $rn\_avevd$ is between 1 and $100~m^2.s^{-1}$. This parameterisation of  
    735734convective processes is less time consuming than the convective adjustment  
    736735algorithm presented above when mixing both tracers and momentum in the  
    737736case of static instabilities. It requires the use of an implicit time stepping on  
    738 vertical diffusion terms (i.e. \forcode{ln_zdfexp = .false.}).  
     737vertical diffusion terms (i.e. \np{ln\_zdfexp}\forcode{ = .false.}).  
    739738 
    740739Note that the stability test is performed on both \textit{before} and \textit{now}  
     
    745744%       Turbulent Closure Scheme  
    746745% ------------------------------------------------------------------------------------------------------------- 
    747 \subsection[Turbulent Closure Scheme (\protect\key{zdf\{tke, gls, osm\}})]{Turbulent Closure Scheme (\protect\key{zdftke}, \protect\key{zdfgls} or \protect\key{zdfosm})} 
     746\subsection[Turbulent closure scheme (\protect\key{zdf}\{tke,gls,osm\})]{Turbulent Closure Scheme (\protect\key{zdftke}, \protect\key{zdfgls} or \protect\key{zdfosm})} 
    748747\label{ZDF_tcs} 
    749748 
     
    761760because the mixing length scale is bounded by the distance to the sea surface.  
    762761It can thus be useful to combine the enhanced vertical  
    763 diffusion with the turbulent closure scheme, $i.e.$ setting the \np{ln_zdfnpc}  
     762diffusion with the turbulent closure scheme, $i.e.$ setting the \np{ln\_zdfnpc}  
    764763namelist parameter to true and defining the turbulent closure CPP key all together. 
    765764 
    766765The KPP turbulent closure scheme already includes enhanced vertical diffusion  
    767766in the case of convection, as governed by the variables $bvsqcon$ and $difcon$  
    768 found in \mdl{zdfkpp}, therefore \forcode{ln_zdfevd = .false.} should be used with the KPP  
     767found in \mdl{zdfkpp}, therefore \np{ln\_zdfevd}\forcode{ = .false.} should be used with the KPP  
    769768scheme. %gm%  + one word on non local flux with KPP scheme trakpp.F90 module... 
    770769 
     
    772771% Double Diffusion Mixing 
    773772% ================================================================ 
    774 \section  [Double Diffusion Mixing (\protect\key{zdfddm})] 
    775       {Double Diffusion Mixing (\protect\key{zdfddm})} 
     773\section{Double diffusion mixing (\protect\key{zdfddm})} 
    776774\label{ZDF_ddm} 
    777775 
     
    855853% Bottom Friction 
    856854% ================================================================ 
    857 \section  [Bottom and Top Friction (\textit{zdfbfr})]   {Bottom and Top Friction (\protect\mdl{zdfbfr} module)} 
     855\section{Bottom and top friction (\protect\mdl{zdfbfr})} 
    858856\label{ZDF_bfr} 
    859857 
     
    918916%       Linear Bottom Friction 
    919917% ------------------------------------------------------------------------------------------------------------- 
    920 \subsection{Linear Bottom Friction (\protect\np{nn_botfr} = 0 or 1) } 
     918\subsection{Linear bottom friction (\protect\np{nn\_botfr}\forcode{ = 0..1})} 
    921919\label{ZDF_bfr_linear} 
    922920 
     
    940938$H = 4000$~m, the resulting friction coefficient is $r = 4\;10^{-4}$~m\;s$^{-1}$.  
    941939This is the default value used in \NEMO. It corresponds to a decay time scale  
    942 of 115~days. It can be changed by specifying \np{rn_bfri1} (namelist parameter). 
     940of 115~days. It can be changed by specifying \np{rn\_bfri1} (namelist parameter). 
    943941 
    944942For the linear friction case the coefficients defined in the general  
     
    950948\end{split} 
    951949\end{equation} 
    952 When \forcode{nn_botfr = 1}, the value of $r$ used is \np{rn_bfri1}.  
    953 Setting \forcode{nn_botfr = 0} is equivalent to setting $r=0$ and leads to a free-slip  
     950When \np{nn\_botfr}\forcode{ = 1}, the value of $r$ used is \np{rn\_bfri1}.  
     951Setting \np{nn\_botfr}\forcode{ = 0} is equivalent to setting $r=0$ and leads to a free-slip  
    954952bottom boundary condition. These values are assigned in \mdl{zdfbfr}.  
    955953From v3.2 onwards there is support for local enhancement of these values  
    956 via an externally defined 2D mask array (\forcode{ln_bfr2d = .true.}) given 
     954via an externally defined 2D mask array (\np{ln\_bfr2d}\forcode{ = .true.}) given 
    957955in the \ifile{bfr\_coef} input NetCDF file. The mask values should vary from 0 to 1.  
    958956Locations with a non-zero mask value will have the friction coefficient increased  
    959 by $mask\_value$*\np{rn_bfrien}*\np{rn_bfri1}. 
     957by $mask\_value$*\np{rn\_bfrien}*\np{rn\_bfri1}. 
    960958 
    961959% ------------------------------------------------------------------------------------------------------------- 
    962960%       Non-Linear Bottom Friction 
    963961% ------------------------------------------------------------------------------------------------------------- 
    964 \subsection{Non-Linear Bottom Friction (\protect\np{nn_botfr} = 2)} 
     962\subsection{Non-linear bottom friction (\protect\np{nn\_botfr}\forcode{ = 2})} 
    965963\label{ZDF_bfr_nonlinear} 
    966964 
     
    977975$e_b = 2.5\;10^{-3}$m$^2$\;s$^{-2}$, while the FRAM experiment \citep{Killworth1992}  
    978976uses $C_D = 1.4\;10^{-3}$ and $e_b =2.5\;\;10^{-3}$m$^2$\;s$^{-2}$.  
    979 The CME choices have been set as default values (\np{rn_bfri2} and \np{rn_bfeb2}  
     977The CME choices have been set as default values (\np{rn\_bfri2} and \np{rn\_bfeb2}  
    980978namelist parameters). 
    981979 
     
    993991 
    994992The coefficients that control the strength of the non-linear bottom friction are 
    995 initialised as namelist parameters: $C_D$= \np{rn_bfri2}, and $e_b$ =\np{rn_bfeb2}. 
     993initialised as namelist parameters: $C_D$= \np{rn\_bfri2}, and $e_b$ =\np{rn\_bfeb2}. 
    996994Note for applications which treat tides explicitly a low or even zero value of 
    997 \np{rn_bfeb2} is recommended. From v3.2 onwards a local enhancement of $C_D$ is possible 
    998 via an externally defined 2D mask array (\forcode{ln_bfr2d = .true.}).  This works in the same way 
     995\np{rn\_bfeb2} is recommended. From v3.2 onwards a local enhancement of $C_D$ is possible 
     996via an externally defined 2D mask array (\np{ln\_bfr2d}\forcode{ = .true.}).  This works in the same way 
    999997as for the linear bottom friction case with non-zero masked locations increased by 
    1000 $mask\_value$*\np{rn_bfrien}*\np{rn_bfri2}. 
     998$mask\_value$*\np{rn\_bfrien}*\np{rn\_bfri2}. 
    1001999 
    10021000% ------------------------------------------------------------------------------------------------------------- 
    10031001%       Bottom Friction Log-layer 
    10041002% ------------------------------------------------------------------------------------------------------------- 
    1005 \subsection[Log-layer Bottom Friction enhancement (\protect\np{ln_loglayer} = .true.)]{Log-layer Bottom Friction enhancement (\protect\np{nn_botfr} = 2, \protect\np{ln_loglayer} = .true.)} 
     1003\subsection[Log-layer btm frict enhncmnt (\protect\np{nn\_botfr}\forcode{ = 2}, \protect\np{ln\_loglayer}\forcode{ = .true.})] 
     1004            {Log-layer bottom friction enhancement (\protect\np{nn\_botfr}\forcode{ = 2}, \protect\np{ln\_loglayer}\forcode{ = .true.})} 
    10061005\label{ZDF_bfr_loglayer} 
    10071006 
    10081007In the non-linear bottom friction case, the drag coefficient, $C_D$, can be optionally 
    1009 enhanced using a "law of the wall" scaling. If  \np{ln_loglayer} = .true., $C_D$ is no 
     1008enhanced using a "law of the wall" scaling. If  \np{ln\_loglayer} = .true., $C_D$ is no 
    10101009longer constant but is related to the thickness of the last wet layer in each column by: 
    10111010 
     
    10141013\end{equation} 
    10151014 
    1016 \noindent where $\kappa$ is the von-Karman constant and \np{rn_bfrz0} is a roughness 
     1015\noindent where $\kappa$ is the von-Karman constant and \np{rn\_bfrz0} is a roughness 
    10171016length provided via the namelist. 
    10181017 
    10191018For stability, the drag coefficient is bounded such that it is kept greater or equal to 
    1020 the base \np{rn_bfri2} value and it is not allowed to exceed the value of an additional 
    1021 namelist parameter: \np{rn_bfri2_max}, i.e.: 
     1019the base \np{rn\_bfri2} value and it is not allowed to exceed the value of an additional 
     1020namelist parameter: \np{rn\_bfri2\_max}, i.e.: 
    10221021 
    10231022\begin{equation} 
     
    10261025 
    10271026\noindent Note also that a log-layer enhancement can also be applied to the top boundary 
    1028 friction if under ice-shelf cavities are in use (\np{ln_isfcav}=.true.).  In this case, the 
    1029 relevant namelist parameters are \np{rn_tfrz0}, \np{rn_tfri2} 
    1030 and \np{rn_tfri2_max}. 
     1027friction if under ice-shelf cavities are in use (\np{ln\_isfcav}\forcode{ = .true.}).  In this case, the 
     1028relevant namelist parameters are \np{rn\_tfrz0}, \np{rn\_tfri2} 
     1029and \np{rn\_tfri2\_max}. 
    10311030 
    10321031% ------------------------------------------------------------------------------------------------------------- 
    10331032%       Bottom Friction stability 
    10341033% ------------------------------------------------------------------------------------------------------------- 
    1035 \subsection{Bottom Friction stability considerations} 
     1034\subsection{Bottom friction stability considerations} 
    10361035\label{ZDF_bfr_stability} 
    10371036 
     
    10821081%       Implicit Bottom Friction 
    10831082% ------------------------------------------------------------------------------------------------------------- 
    1084 \subsection[Implicit Bottom Friction (\protect\np{ln_bfrimp})]{Implicit Bottom Friction (\protect\np{ln_bfrimp}$=$\textit{T})} 
     1083\subsection{Implicit bottom friction (\protect\np{ln\_bfrimp}\forcode{ = .true.})} 
    10851084\label{ZDF_bfr_imp} 
    10861085 
    10871086An optional implicit form of bottom friction has been implemented to improve 
    10881087model stability. We recommend this option for shelf sea and coastal ocean applications, especially  
    1089 for split-explicit time splitting. This option can be invoked by setting \np{ln_bfrimp}  
    1090 to \textit{true} in the \textit{nambfr} namelist. This option requires \np{ln_zdfexp} to be \textit{false}  
     1088for split-explicit time splitting. This option can be invoked by setting \np{ln\_bfrimp}  
     1089to \forcode{.true.} in the \textit{nambfr} namelist. This option requires \np{ln\_zdfexp} to be \forcode{.false.}  
    10911090in the \textit{namzdf} namelist.  
    10921091 
     
    11351134%       Bottom Friction with split-explicit time splitting 
    11361135% ------------------------------------------------------------------------------------------------------------- 
    1137 \subsection[Bottom Friction with split-explicit time splitting]{Bottom Friction with split-explicit time splitting (\protect\np{ln_bfrimp})} 
     1136\subsection[Bottom friction w/ split-explicit time splitting (\protect\np{ln\_bfrimp})] 
     1137            {Bottom friction with split-explicit time splitting (\protect\np{ln\_bfrimp})} 
    11381138\label{ZDF_bfr_ts} 
    11391139 
     
    11441144\key{dynspg\_flt}). Extra attention is required, however, when using  
    11451145split-explicit time stepping (\key{dynspg\_ts}). In this case the free surface  
    1146 equation is solved with a small time step \np{rn_rdt}/\np{nn_baro}, while the three  
     1146equation is solved with a small time step \np{rn\_rdt}/\np{nn\_baro}, while the three  
    11471147dimensional prognostic variables are solved with the longer time step  
    1148 of \np{rn_rdt} seconds. The trend in the barotropic momentum due to bottom  
     1148of \np{rn\_rdt} seconds. The trend in the barotropic momentum due to bottom  
    11491149friction appropriate to this method is that given by the selected parameterisation  
    11501150($i.e.$ linear or non-linear bottom friction) computed with the evolving velocities  
     
    11761176limiting is thought to be having a major effect (a more likely prospect in coastal and shelf seas 
    11771177applications) then the fully implicit form of the bottom friction should be used (see \S\ref{ZDF_bfr_imp} )  
    1178 which can be selected by setting \np{ln_bfrimp} $=$ \textit{true}. 
     1178which can be selected by setting \np{ln\_bfrimp} $=$ \forcode{.true.}. 
    11791179 
    11801180Otherwise, the implicit formulation takes the form: 
     
    11921192% Tidal Mixing 
    11931193% ================================================================ 
    1194 \section{Tidal Mixing (\protect\key{zdftmx})} 
     1194\section{Tidal mixing (\protect\key{zdftmx})} 
    11951195\label{ZDF_tmx} 
    11961196 
     
    12201220and $F(z)$ the vertical structure function.  
    12211221 
    1222 The mixing efficiency of turbulence is set by $\Gamma$ (\np{rn_me} namelist parameter) 
     1222The mixing efficiency of turbulence is set by $\Gamma$ (\np{rn\_me} namelist parameter) 
    12231223and is usually taken to be the canonical value of $\Gamma = 0.2$ (Osborn 1980).  
    1224 The tidal dissipation efficiency is given by the parameter $q$ (\np{rn_tfe} namelist parameter)  
     1224The tidal dissipation efficiency is given by the parameter $q$ (\np{rn\_tfe} namelist parameter)  
    12251225represents the part of the internal wave energy flux $E(x, y)$ that is dissipated locally,  
    12261226with the remaining $1-q$ radiating away as low mode internal waves and  
     
    12291229The vertical structure function $F(z)$ models the distribution of the turbulent mixing in the vertical.  
    12301230It is implemented as a simple exponential decaying upward away from the bottom,  
    1231 with a vertical scale of $h_o$ (\np{rn_htmx} namelist parameter, with a typical value of $500\,m$) \citep{St_Laurent_Nash_DSR04},  
     1231with a vertical scale of $h_o$ (\np{rn\_htmx} namelist parameter, with a typical value of $500\,m$) \citep{St_Laurent_Nash_DSR04},  
    12321232\begin{equation} \label{Eq_Fz} 
    12331233F(i,j,k) = \frac{ e^{ -\frac{H+z}{h_o} } }{ h_o \left( 1- e^{ -\frac{H}{h_o} } \right) } 
     
    12381238diffusivity assuming a Prandtl number of 1, $i.e.$ $A^{vm}_{tides}=A^{vT}_{tides}$.  
    12391239In the limit of $N \rightarrow 0$ (or becoming negative), the vertical diffusivity  
    1240 is capped at $300\,cm^2/s$ and impose a lower limit on $N^2$ of \np{rn_n2min}  
     1240is capped at $300\,cm^2/s$ and impose a lower limit on $N^2$ of \np{rn\_n2min}  
    12411241usually set to $10^{-8} s^{-2}$. These bounds are usually rarely encountered. 
    12421242 
     
    12661266%        Indonesian area specific treatment  
    12671267% ------------------------------------------------------------------------------------------------------------- 
    1268 \subsection{Indonesian area specific treatment (\protect\np{ln_zdftmx_itf})} 
     1268\subsection{Indonesian area specific treatment (\protect\np{ln\_zdftmx\_itf})} 
    12691269\label{ZDF_tmx_itf} 
    12701270 
    12711271When the Indonesian Through Flow (ITF) area is included in the model domain, 
    12721272a specific treatment of tidal induced mixing in this area can be used.  
    1273 It is activated through the namelist logical \np{ln_tmx_itf}, and the user must provide 
     1273It is activated through the namelist logical \np{ln\_tmx\_itf}, and the user must provide 
    12741274an input NetCDF file, \ifile{mask\_itf}, which contains a mask array defining the ITF area 
    12751275where the specific treatment is applied. 
    12761276 
    1277 When \forcode{ln_tmx_itf = .true.}, the two key parameters $q$ and $F(z)$ are adjusted following  
     1277When \np{ln\_tmx\_itf}\forcode{ = .true.}, the two key parameters $q$ and $F(z)$ are adjusted following  
    12781278the parameterisation developed by \citet{Koch-Larrouy_al_GRL07}: 
    12791279 
     
    12851285So it is assumed that $q = 1$, $i.e.$ all the energy generated is available for mixing. 
    12861286Note that for test purposed, the ITF tidal dissipation efficiency is a  
    1287 namelist parameter (\np{rn_tfe_itf}). A value of $1$ or close to is 
     1287namelist parameter (\np{rn\_tfe\_itf}). A value of $1$ or close to is 
    12881288this recommended for this parameter. 
    12891289 
     
    13291329\end{equation} 
    13301330where $R_f$ is the mixing efficiency and $\epsilon$ is a specified three dimensional distribution  
    1331 of the energy available for mixing. If the \np{ln_mevar} namelist parameter is set to false,  
     1331of the energy available for mixing. If the \np{ln\_mevar} namelist parameter is set to false,  
    13321332the mixing efficiency is taken as constant and equal to 1/6 \citep{Osborn_JPO80}.  
    13331333In the opposite (recommended) case, $R_f$ is instead a function of the turbulence intensity parameter  
     
    13381338 
    13391339In addition to the mixing efficiency, the ratio of salt to heat diffusivities can chosen to vary  
    1340 as a function of $Re_b$ by setting the \np{ln_tsdiff} parameter to true, a recommended choice).  
     1340as a function of $Re_b$ by setting the \np{ln\_tsdiff} parameter to true, a recommended choice).  
    13411341This parameterization of differential mixing, due to \cite{Jackson_Rehmann_JPO2014},  
    13421342is implemented as in \cite{de_lavergne_JPO2016_efficiency}. 
     
    13561356h_{wkb} = H \, \frac{ \int_{-H}^{z} N \, dz' } { \int_{-H}^{\eta} N \, dz'  } \; , 
    13571357\end{equation*} 
    1358 The $n_p$ parameter (given by \np{nn_zpyc} in \ngn{namzdf\_tmx\_new} namelist)  controls the stratification-dependence of the pycnocline-intensified dissipation.  
     1358The $n_p$ parameter (given by \np{nn\_zpyc} in \ngn{namzdf\_tmx\_new} namelist)  controls the stratification-dependence of the pycnocline-intensified dissipation.  
    13591359It can take values of 1 (recommended) or 2. 
    13601360Finally, the vertical structures $F_{cri}$ and $F_{bot}$ require the specification of  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_conservation.tex

    r9389 r9393  
    4747%       Conservation Properties on Ocean Dynamics 
    4848% ------------------------------------------------------------------------------------------------------------- 
    49 \section{Conservation Properties on Ocean Dynamics} 
     49\section{Conservation properties on ocean dynamics} 
    5050\label{Invariant_dyn} 
    5151 
     
    168168%       Conservation Properties on Ocean Thermodynamics 
    169169% ------------------------------------------------------------------------------------------------------------- 
    170 \section{Conservation Properties on Ocean Thermodynamics} 
     170\section{Conservation properties on ocean thermodynamics} 
    171171\label{Invariant_tra} 
    172172 
     
    188188%       Conservation Properties on Momentum Physics 
    189189% ------------------------------------------------------------------------------------------------------------- 
    190 \subsection{Conservation Properties on Momentum Physics} 
     190\subsection{Conservation properties on momentum physics} 
    191191\label{Invariant_dyn_physics} 
    192192 
     
    294294%       Conservation Properties on Tracer Physics 
    295295% ------------------------------------------------------------------------------------------------------------- 
    296 \subsection{Conservation Properties on Tracer Physics} 
     296\subsection{Conservation properties on tracer physics} 
    297297\label{Invariant_tra_physics} 
    298298 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_misc.tex

    r9392 r9393  
    1414% Representation of Unresolved Straits 
    1515% ================================================================ 
    16 \section{Representation of Unresolved Straits} 
     16\section{Representation of unresolved straits} 
    1717\label{MISC_strait} 
    1818 
     
    8989% Sub-Domain Functionality  
    9090% ================================================================ 
    91 \section{Sub-Domain Functionality} 
     91\section{Sub-domain functionality} 
    9292\label{MISC_zoom} 
    9393 
    94 \subsection{Simple subsetting of input files via netCDF attributes} 
     94\subsection{Simple subsetting of input files via NetCDF attributes} 
    9595 
    9696The extended grids for use with the under-shelf ice cavities will result in redundant rows 
     
    100100existing 'zoom' options are overly complex for this task and marked for deletion anyway. 
    101101This alternative subsetting operates for the j-direction only and works by optionally 
    102 looking for and using a global file attribute (named: \np{open_ocean_jstart}) to 
     102looking for and using a global file attribute (named: \np{open\_ocean\_jstart}) to 
    103103determine the starting j-row for input. The use of this option is best explained with an 
    104104example: Consider an ORCA1 configuration using the extended grid bathymetry and coordinate 
     
    109109\noindent These files define a horizontal domain of 362x332. Assuming the first row with 
    110110open ocean wet points in the non-isf bathymetry for this set is row 42 (Fortran indexing) 
    111 then the formally correct setting for \np{open_ocean_jstart} is 41. Using this value as the 
     111then the formally correct setting for \np{open\_ocean\_jstart} is 41. Using this value as the 
    112112first row to be read will result in a 362x292 domain which is the same size as the original 
    113113ORCA1 domain. Thus the extended coordinates and bathymetry files can be used with all the 
     
    128128 
    129129\noindent Note the j-size of the global domain is the (extended j-size minus 
    130 \np{open_ocean_jstart} + 1 ) and this must match the size of all datasets other than 
     130\np{open\_ocean\_jstart} + 1 ) and this must match the size of all datasets other than 
    131131bathymetry and coordinates currently. However the option can be extended to any global, 2D 
    132132and 3D, netcdf, input field by adding the: 
     
    135135lrowattr=ln_use_jattr 
    136136\end{forlines} 
    137 optional argument to the appropriate \np{iom_get} call and the \np{open_ocean_jstart} attribute to the corresponding input files. It remains the users responsibility to set \np{jpjdta} and \np{jpjglo} values in the \np{namelist_cfg} file according to their needs. 
     137optional argument to the appropriate \np{iom\_get} call and the \np{open\_ocean\_jstart} attribute to the corresponding input files. It remains the users responsibility to set \np{jpjdta} and \np{jpjglo} values in the \np{namelist\_cfg} file according to their needs. 
    138138 
    139139%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    149149% Accuracy and Reproducibility 
    150150% ================================================================ 
    151 \section{Accuracy and Reproducibility (\protect\mdl{lib\_fortran})} 
     151\section{Accuracy and reproducibility (\protect\mdl{lib\_fortran})} 
    152152\label{MISC_fortran} 
    153153 
     
    223223required by each individual for the fold operation. This alternative method should give identical 
    224224results to the default \textsc{ALLGATHER} method and is recommended for large values of \np{jpni}. 
    225 The new method is activated by setting \np{ln_nnogather} to be true ({\bf nammpp}). The 
     225The new method is activated by setting \np{ln\_nnogather} to be true ({\bf nammpp}). The 
    226226reproducibility of results using the two methods should be confirmed for each new, non-reference 
    227227configuration. 
     
    230230% Model optimisation, Control Print and Benchmark 
    231231% ================================================================ 
    232 \section{Model Optimisation, Control Print and Benchmark} 
     232\section{Model optimisation, control print and benchmark} 
    233233\label{MISC_opt} 
    234234%--------------------------------------------namctl------------------------------------------------------- 
     
    251251$\bullet$ Control print %: describe here 4 things: 
    252252 
    253 1- \np{ln_ctl} : compute and print the trends averaged over the interior domain  
     2531- \np{ln\_ctl} : compute and print the trends averaged over the interior domain  
    254254in all TRA, DYN, LDF and ZDF modules. This option is very helpful when  
    255255diagnosing the origin of an undesired change in model results.  
    256256 
    257 2- also \np{ln_ctl} but using the nictl and njctl namelist parameters to check  
     2572- also \np{ln\_ctl} but using the nictl and njctl namelist parameters to check  
    258258the source of differences between mono and multi processor runs. 
    259259 
    260260%%gm   to be removed both here and in the code 
    261 3- last digit comparison (\np{nn_bit_cmp}). In an MPP simulation, the computation of  
     2613- last digit comparison (\np{nn\_bit\_cmp}). In an MPP simulation, the computation of  
    262262a sum over the whole domain is performed as the summation over all processors of  
    263263each of their sums over their interior domains. This double sum never gives exactly  
     
    269269%%gm end 
    270270 
    271 $\bullet$  Benchmark (\np{nn_bench}). This option defines a benchmark run based on  
     271$\bullet$  Benchmark (\np{nn\_bench}). This option defines a benchmark run based on  
    272272a GYRE configuration (see \S\ref{CFG_gyre}) in which the resolution remains the same  
    273273whatever the domain size. This allows a very large model domain to be used, just by  
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics.tex

    r9389 r9393  
    55% ================================================================ 
    66 
    7 \chapter{Model basics} 
     7\chapter{Model Basics} 
    88\label{PE} 
    99\minitoc 
     
    1515% Primitive Equations 
    1616% ================================================================ 
    17 \section{Primitive Equations} 
     17\section{Primitive equations} 
    1818\label{PE_PE} 
    1919 
     
    2222% ------------------------------------------------------------------------------------------------------------- 
    2323 
    24 \subsection{Vector Invariant Formulation} 
     24\subsection{Vector invariant formulation} 
    2525\label{PE_Vector} 
    2626 
     
    100100% Boundary condition 
    101101% ------------------------------------------------------------------------------------------------------------- 
    102 \subsection{Boundary Conditions} 
     102\subsection{Boundary conditions} 
    103103\label{PE_boundary_condition} 
    104104 
     
    175175% The Horizontal Pressure Gradient 
    176176% ================================================================ 
    177 \section{The Horizontal Pressure Gradient } 
     177\section{Horizontal pressure gradient } 
    178178\label{PE_hor_pg} 
    179179 
     
    181181% Pressure Formulation 
    182182% ------------------------------------------------------------------------------------------------------------- 
    183 \subsection{Pressure Formulation} 
     183\subsection{Pressure formulation} 
    184184\label{PE_p_formulation} 
    185185 
     
    212212% Free Surface Formulation 
    213213% ------------------------------------------------------------------------------------------------------------- 
    214 \subsection{Free Surface Formulation} 
     214\subsection{Free surface formulation} 
    215215\label{PE_free_surface} 
    216216 
     
    264264% Curvilinear z-coordinate System 
    265265% ================================================================ 
    266 \section{Curvilinear \textit{z-}coordinate System} 
     266\section{Curvilinear \textit{z-}coordinate system} 
    267267\label{PE_zco} 
    268268 
     
    271271% Tensorial Formalism 
    272272% ------------------------------------------------------------------------------------------------------------- 
    273 \subsection{Tensorial Formalism} 
     273\subsection{Tensorial formalism} 
    274274\label{PE_tensorial} 
    275275 
     
    366366% Continuous Model Equations 
    367367% ------------------------------------------------------------------------------------------------------------- 
    368 \subsection{Continuous Model Equations} 
     368\subsection{Continuous model equations} 
    369369\label{PE_zco_Eq} 
    370370 
     
    639639% Curvilinear generalised vertical coordinate System 
    640640% ================================================================ 
    641 \section{Curvilinear generalised vertical coordinate System} 
     641\section{Curvilinear generalised vertical coordinate system} 
    642642\label{PE_gco} 
    643643 
     
    691691% The s-coordinate Formulation 
    692692% ------------------------------------------------------------------------------------------------------------- 
    693 \subsection{The \textit{s-}coordinate Formulation} 
     693\subsection{\textit{S-}coordinate formulation} 
    694694 
    695695Starting from the set of equations established in \S\ref{PE_zco} for the special case $k=z$  
     
    804804% Curvilinear z*-coordinate System 
    805805% ------------------------------------------------------------------------------------------------------------- 
    806 \subsection{Curvilinear \textit{z*}--coordinate System} 
     806\subsection{Curvilinear \textit{z*}--coordinate system} 
    807807\label{PE_zco_star} 
    808808 
     
    901901% Terrain following  coordinate System 
    902902% ------------------------------------------------------------------------------------------------------------- 
    903 \subsection{Curvilinear Terrain-following \textit{s}--coordinate} 
     903\subsection{Curvilinear terrain-following \textit{s}--coordinate} 
    904904\label{PE_sco} 
    905905 
     
    999999% Subgrid Scale Physics 
    10001000% ================================================================ 
    1001 \section{Subgrid Scale Physics} 
     1001\section{Subgrid scale physics} 
    10021002\label{PE_zdf_ldf} 
    10031003 
     
    10281028% Vertical Subgrid Scale Physics 
    10291029% ------------------------------------------------------------------------------------------------------------- 
    1030 \subsection{Vertical Subgrid Scale Physics} 
     1030\subsection{Vertical subgrid scale physics} 
    10311031\label{PE_zdf} 
    10321032 
     
    10631063% Lateral Diffusive and Viscous Operators Formulation 
    10641064% ------------------------------------------------------------------------------------------------------------- 
    1065 \subsection{Formulation of the Lateral Diffusive and Viscous Operators} 
     1065\subsection{Formulation of the lateral diffusive and viscous operators} 
    10661066\label{PE_ldf} 
    10671067 
     
    11221122geopotential surfaces, and UBS advection schemes when flux form is chosen for the momentum advection. 
    11231123 
    1124 \subsubsection{Lateral Laplacian tracer diffusive operator} 
     1124\subsubsection{Lateral laplacian tracer diffusive operator} 
    11251125 
    11261126The lateral Laplacian tracer diffusive operator is defined by (see Appendix~\ref{Apdx_B}): 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_model_basics_zstar.tex

    r9392 r9393  
    88% ================================================================ 
    99\chapter{ essai z* s*} 
    10 \section{Curvilinear \textit{z*}- or \textit{s*} coordinate System} 
     10\section{Curvilinear \textit{z*}- or \textit{s*} coordinate system} 
    1111 
    1212% ------------------------------------------------------------------------------------------------------------- 
     
    7575% Surface Pressure Gradient and Sea Surface Height 
    7676% ================================================================ 
    77 \section{Surface pressure gradient and Sea Surface Heigth (\protect\mdl{dynspg})} 
     77\section{Surface pressure gradient and sea surface heigth (\protect\mdl{dynspg})} 
    7878\label{DYN_hpg_spg} 
    7979%-----------------------------------------nam_dynspg---------------------------------------------------- 
     
    247247documented in \S\ref{MISC}. The amplitude of the extra term is given by the namelist variable \np{rnu}. The default value is 1, as recommended by \citet{Roullet2000} 
    248248 
    249 \colorbox{red}{\forcode{rnu = 1} to be suppressed from namelist !} 
     249\colorbox{red}{\np{rnu}\forcode{ = 1} to be suppressed from namelist !} 
    250250 
    251251%------------------------------------------------------------- 
  • branches/2017/dev_merge_2017/DOC/tex_sub/chap_time_domain.tex

    r9392 r9393  
    6565%        Non-Diffusive Part---Leapfrog Scheme 
    6666% ------------------------------------------------------------------------------------------------------------- 
    67 \section{Non-Diffusive Part --- Leapfrog Scheme} 
     67\section{Non-diffusive part --- Leapfrog scheme} 
    6868\label{STP_leap_frog} 
    6969 
     
    9191\end{equation}  
    9292where the subscript $F$ denotes filtered values and $\gamma$ is the Asselin  
    93 coefficient. $\gamma$ is initialized as \np{rn_atfp} (namelist parameter).  
    94 Its default value is \np{rn_atfp}=$10^{-3}$ (see \S~\ref{STP_mLF}),  
     93coefficient. $\gamma$ is initialized as \np{rn\_atfp} (namelist parameter).  
     94Its default value is \np{rn_atfp}\forcode{ = 10.e-3} (see \S~\ref{STP_mLF}),  
    9595causing only a weak dissipation of high frequency motions (\citep{Farge1987}).  
    9696The addition of a time filter degrades the accuracy of the  
     
    109109%        Diffusive Part---Forward or Backward Scheme 
    110110% ------------------------------------------------------------------------------------------------------------- 
    111 \section{Diffusive Part --- Forward or Backward Scheme} 
     111\section{Diffusive part --- Forward or backward scheme} 
    112112\label{STP_forward_imp} 
    113113 
     
    141141constraint on the time step. Two solutions are available in \NEMO to overcome  
    142142the stability constraint: $(a)$ a forward time differencing scheme using a  
    143 time splitting technique (\np{ln_zdfexp} = true) or $(b)$ a backward (or implicit)  
    144 time differencing scheme (\np{ln_zdfexp} = false). In $(a)$, the master  
     143time splitting technique (\np{ln\_zdfexp}\forcode{ = .true.}) or $(b)$ a backward (or implicit)  
     144time differencing scheme (\np{ln\_zdfexp}\forcode{ = .false.}). In $(a)$, the master  
    145145time step $\Delta $t is cut into $N$ fractional time steps so that the  
    146146stability criterion is reduced by a factor of $N$. The computation is performed as  
     
    156156\end{equation} 
    157157with DF a vertical diffusion term. The number of fractional time steps, $N$, is given  
    158 by setting \np{nn_zdfexp}, (namelist parameter). The scheme $(b)$ is unconditionally  
     158by setting \np{nn\_zdfexp}, (namelist parameter). The scheme $(b)$ is unconditionally  
    159159stable but diffusive. It can be written as follows: 
    160160\begin{equation} \label{Eq_STP_imp} 
     
    198198%        Surface Pressure gradient 
    199199% ------------------------------------------------------------------------------------------------------------- 
    200 \section{Surface Pressure Gradient} 
     200\section{Surface pressure gradient} 
    201201\label{STP_spg_ts} 
    202202 
     
    223223%        The Modified Leapfrog -- Asselin Filter scheme 
    224224% ------------------------------------------------------------------------------------------------------------- 
    225 \section{The Modified Leapfrog -- Asselin Filter scheme} 
     225\section{Modified Leapfrog -- Asselin filter scheme} 
    226226\label{STP_mLF} 
    227227 
     
    309309gradient (see \S\ref{DYN_hpg_imp}), an extra three-dimensional field has to be  
    310310added to the restart file to ensure an exact restartability. This is done optionally  
    311 via the  \np{nn_dynhpg_rst} namelist parameter, so that the size of the 
     311via the  \np{nn\_dynhpg\_rst} namelist parameter, so that the size of the 
    312312restart file can be reduced when restartability is not a key issue (operational  
    313313oceanography or in ensemble simulations for seasonal forecasting). 
  • branches/2017/dev_merge_2017/DOC/tex_sub/introduction.tex

    r9389 r9393  
    9292Some CPP keys are implemented in the FORTRAN code to allow code selection at compiling step. This selection of code at compilation time reduces the reliability of the whole platform since it changes the code from one set of CPP keys to the other. It is used only when the addition/suppression of the part of code highly changes the amount of memory at run time. 
    9393Usual coding looks like :  
    94 \vspace{-10pt} 
    9594\begin{forlines} 
    9695#if defined key_option1 
Note: See TracChangeset for help on using the changeset viewer.